From f86e04ac0c561d8c87c4f192fcf7f7c982967fa7 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Apr 2010 18:27:03 +0200 Subject: CWS gnumake2: remove duplicate header in solver: vcl/imagebtn.hxx is just a copy of vcl/button.hxx --- sc/source/ui/inc/anyrefdg.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source/ui/inc/anyrefdg.hxx') diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 0e7560fe0c50..62f7bfd865e7 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -29,7 +29,7 @@ #define SC_ANYREFDG_HXX #ifndef _IMAGEBTN_HXX -#include +#include #endif #ifndef _EDIT_HXX #include -- cgit v1.2.3 From cd42389ad67b403a07a0dda8e2a6e213def49251 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 17 Jan 2011 13:20:22 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from sc --- sc/inc/addincol.hxx | 42 +- sc/inc/address.hxx | 24 +- sc/inc/afmtuno.hxx | 16 +- sc/inc/appoptio.hxx | 60 +- sc/inc/arealink.hxx | 20 +- sc/inc/attarray.hxx | 88 +- sc/inc/attrib.hxx | 122 +-- sc/inc/autoform.hxx | 84 +- sc/inc/bigrange.hxx | 70 +- sc/inc/brdcst.hxx | 2 +- sc/inc/callform.hxx | 26 +- sc/inc/cell.hxx | 136 +-- sc/inc/cellform.hxx | 8 +- sc/inc/cellsuno.hxx | 28 +- sc/inc/chartarr.hxx | 16 +- sc/inc/charthelper.hxx | 4 +- sc/inc/chartlis.hxx | 30 +- sc/inc/chartpos.hxx | 28 +- sc/inc/chgtrack.hxx | 328 ++++---- sc/inc/chgviset.hxx | 74 +- sc/inc/collect.hxx | 66 +- sc/inc/column.hxx | 214 ++--- sc/inc/compiler.hxx | 120 +-- sc/inc/compressedarray.hxx | 2 +- sc/inc/conditio.hxx | 50 +- sc/inc/consoli.hxx | 16 +- sc/inc/dapiuno.hxx | 4 +- sc/inc/datauno.hxx | 8 +- sc/inc/dbcolect.hxx | 152 ++-- sc/inc/dbdocutl.hxx | 2 +- sc/inc/dbtoken.hxx | 8 +- sc/inc/detdata.hxx | 8 +- sc/inc/detfunc.hxx | 66 +- sc/inc/dociter.hxx | 96 +-- sc/inc/docoptio.hxx | 74 +- sc/inc/docpool.hxx | 28 +- sc/inc/document.hxx | 822 +++++++++--------- sc/inc/docuno.hxx | 6 +- sc/inc/dpcachetable.hxx | 2 +- sc/inc/dpglobal.hxx | 48 +- sc/inc/dpgroup.hxx | 16 +- sc/inc/dpobject.hxx | 74 +- sc/inc/dpoutput.hxx | 32 +- sc/inc/dpsave.hxx | 104 +-- sc/inc/dpsdbtab.hxx | 14 +- sc/inc/dpshttab.hxx | 18 +- sc/inc/dptabdat.hxx | 22 +- sc/inc/dptablecache.hxx | 24 +- sc/inc/dptabres.hxx | 166 ++-- sc/inc/dptabsrc.hxx | 98 +-- sc/inc/drawattr.hxx | 10 +- sc/inc/drawpage.hxx | 2 +- sc/inc/drwlayer.hxx | 36 +- sc/inc/editsrc.hxx | 12 +- sc/inc/editutil.hxx | 46 +- sc/inc/fielduno.hxx | 24 +- sc/inc/fillinfo.hxx | 62 +- sc/inc/filter.hxx | 20 +- sc/inc/filtopt.hxx | 4 +- sc/inc/fmtuno.hxx | 18 +- sc/inc/formularesult.hxx | 10 +- sc/inc/funcdesc.hxx | 18 +- sc/inc/funcuno.hxx | 6 +- sc/inc/global.hxx | 138 +-- sc/inc/hints.hxx | 34 +- sc/inc/inputopt.hxx | 60 +- sc/inc/linkuno.hxx | 10 +- sc/inc/lookupcache.hxx | 2 +- sc/inc/markarr.hxx | 22 +- sc/inc/markdata.hxx | 46 +- sc/inc/navicfg.hxx | 18 +- sc/inc/olinetab.hxx | 74 +- sc/inc/optutil.hxx | 2 +- sc/inc/pagepar.hxx | 52 +- sc/inc/paramisc.hxx | 8 +- sc/inc/patattr.hxx | 32 +- sc/inc/pivot.hxx | 24 +- sc/inc/postit.hxx | 24 +- sc/inc/printopt.hxx | 16 +- sc/inc/prnsave.hxx | 10 +- sc/inc/progress.hxx | 56 +- sc/inc/queryparam.hxx | 4 +- sc/inc/rangelst.hxx | 28 +- sc/inc/rangenam.hxx | 64 +- sc/inc/rangeseq.hxx | 20 +- sc/inc/rangeutl.hxx | 30 +- sc/inc/rechead.hxx | 14 +- sc/inc/recursionhelper.hxx | 14 +- sc/inc/refdata.hxx | 86 +- sc/inc/refreshtimer.hxx | 20 +- sc/inc/scabstdlg.hxx | 132 +-- sc/inc/scdll.hxx | 2 +- sc/inc/scmatrix.hxx | 54 +- sc/inc/scmod.hxx | 74 +- sc/inc/scresid.hxx | 2 +- sc/inc/shapeuno.hxx | 2 +- sc/inc/sortparam.hxx | 22 +- sc/inc/stlpool.hxx | 4 +- sc/inc/stlsheet.hxx | 12 +- sc/inc/strload.hxx | 2 +- sc/inc/styleuno.hxx | 10 +- sc/inc/subtotal.hxx | 10 +- sc/inc/table.hxx | 422 +++++----- sc/inc/tablink.hxx | 34 +- sc/inc/tabopparams.hxx | 12 +- sc/inc/textuno.hxx | 28 +- sc/inc/token.hxx | 36 +- sc/inc/tokenarray.hxx | 8 +- sc/inc/unitconv.hxx | 4 +- sc/inc/unowids.hxx | 4 +- sc/inc/userlist.hxx | 22 +- sc/inc/validat.hxx | 38 +- sc/inc/viewopti.hxx | 16 +- sc/inc/viewuno.hxx | 16 +- sc/inc/waitoff.hxx | 2 +- sc/inc/xmlwrap.hxx | 4 +- sc/inc/zforauto.hxx | 6 +- sc/source/core/data/attarray.cxx | 338 ++++---- sc/source/core/data/attrib.cxx | 200 ++--- sc/source/core/data/bcaslot.cxx | 36 +- sc/source/core/data/cell.cxx | 312 +++---- sc/source/core/data/cell2.cxx | 262 +++--- sc/source/core/data/column.cxx | 258 +++--- sc/source/core/data/column2.cxx | 326 ++++---- sc/source/core/data/column3.cxx | 164 ++-- sc/source/core/data/compressedarray.cxx | 22 +- sc/source/core/data/conditio.cxx | 280 +++---- sc/source/core/data/dbdocutl.cxx | 28 +- sc/source/core/data/dociter.cxx | 154 ++-- sc/source/core/data/docpool.cxx | 212 ++--- sc/source/core/data/documen2.cxx | 238 +++--- sc/source/core/data/documen3.cxx | 290 +++---- sc/source/core/data/documen4.cxx | 170 ++-- sc/source/core/data/documen5.cxx | 52 +- sc/source/core/data/documen6.cxx | 22 +- sc/source/core/data/documen7.cxx | 62 +- sc/source/core/data/documen8.cxx | 314 +++---- sc/source/core/data/documen9.cxx | 110 +-- sc/source/core/data/document.cxx | 796 +++++++++--------- sc/source/core/data/dpcachetable.cxx | 4 +- sc/source/core/data/dpdimsave.cxx | 4 +- sc/source/core/data/dpglobal.cxx | 14 +- sc/source/core/data/dpgroup.cxx | 54 +- sc/source/core/data/dpobject.cxx | 254 +++--- sc/source/core/data/dpoutput.cxx | 188 ++--- sc/source/core/data/dpsave.cxx | 148 ++-- sc/source/core/data/dpsdbtab.cxx | 10 +- sc/source/core/data/dpshttab.cxx | 26 +- sc/source/core/data/dptabdat.cxx | 30 +- sc/source/core/data/dptablecache.cxx | 170 ++-- sc/source/core/data/dptabres.cxx | 414 ++++----- sc/source/core/data/dptabsrc.cxx | 190 ++--- sc/source/core/data/drawpage.cxx | 2 +- sc/source/core/data/drwlayer.cxx | 214 ++--- sc/source/core/data/fillinfo.cxx | 180 ++-- sc/source/core/data/global.cxx | 168 ++-- sc/source/core/data/global2.cxx | 98 +-- sc/source/core/data/markarr.cxx | 62 +- sc/source/core/data/markdata.cxx | 106 +-- sc/source/core/data/olinetab.cxx | 244 +++--- sc/source/core/data/pagepar.cxx | 14 +- sc/source/core/data/patattr.cxx | 286 +++---- sc/source/core/data/pivot2.cxx | 4 +- sc/source/core/data/poolhelp.cxx | 4 +- sc/source/core/data/postit.cxx | 18 +- sc/source/core/data/scdpoutputimpl.cxx | 26 +- sc/source/core/data/scdpoutputimpl.hxx | 10 +- sc/source/core/data/sortparam.cxx | 68 +- sc/source/core/data/stlpool.cxx | 44 +- sc/source/core/data/stlsheet.cxx | 40 +- sc/source/core/data/table1.cxx | 310 +++---- sc/source/core/data/table2.cxx | 522 ++++++------ sc/source/core/data/table3.cxx | 270 +++--- sc/source/core/data/table4.cxx | 322 +++---- sc/source/core/data/table5.cxx | 76 +- sc/source/core/data/table6.cxx | 108 +-- sc/source/core/data/validat.cxx | 146 ++-- sc/source/core/inc/addinlis.hxx | 2 +- sc/source/core/inc/adiasync.hxx | 18 +- sc/source/core/inc/bcaslot.hxx | 30 +- sc/source/core/inc/ddelink.hxx | 14 +- sc/source/core/inc/interpre.hxx | 214 ++--- sc/source/core/inc/jumpmatrix.hxx | 8 +- sc/source/core/inc/parclass.hxx | 12 +- sc/source/core/inc/refupdat.hxx | 4 +- sc/source/core/tool/addincol.cxx | 130 +-- sc/source/core/tool/addinlis.cxx | 12 +- sc/source/core/tool/address.cxx | 98 +-- sc/source/core/tool/adiasync.cxx | 22 +- sc/source/core/tool/appoptio.cxx | 32 +- sc/source/core/tool/autoform.cxx | 232 ++--- sc/source/core/tool/callform.cxx | 108 +-- sc/source/core/tool/cellform.cxx | 12 +- sc/source/core/tool/chartarr.cxx | 56 +- sc/source/core/tool/charthelper.cxx | 36 +- sc/source/core/tool/chartlis.cxx | 94 +-- sc/source/core/tool/chartpos.cxx | 108 +-- sc/source/core/tool/chgtrack.cxx | 554 ++++++------ sc/source/core/tool/chgviset.cxx | 8 +- sc/source/core/tool/collect.cxx | 106 +-- sc/source/core/tool/compiler.cxx | 444 +++++----- sc/source/core/tool/consoli.cxx | 78 +- sc/source/core/tool/dbcolect.cxx | 114 +-- sc/source/core/tool/ddelink.cxx | 28 +- sc/source/core/tool/detdata.cxx | 24 +- sc/source/core/tool/detfunc.cxx | 320 +++---- sc/source/core/tool/docoptio.cxx | 38 +- sc/source/core/tool/doubleref.cxx | 28 +- sc/source/core/tool/editutil.cxx | 168 ++-- sc/source/core/tool/filtopt.cxx | 2 +- sc/source/core/tool/hints.cxx | 10 +- sc/source/core/tool/inputopt.cxx | 22 +- sc/source/core/tool/interpr1.cxx | 460 +++++----- sc/source/core/tool/interpr2.cxx | 276 +++--- sc/source/core/tool/interpr3.cxx | 172 ++-- sc/source/core/tool/interpr4.cxx | 408 ++++----- sc/source/core/tool/interpr5.cxx | 128 +-- sc/source/core/tool/navicfg.cxx | 6 +- sc/source/core/tool/optutil.cxx | 2 +- sc/source/core/tool/parclass.cxx | 20 +- sc/source/core/tool/printopt.cxx | 8 +- sc/source/core/tool/prnsave.cxx | 14 +- sc/source/core/tool/progress.cxx | 32 +- sc/source/core/tool/queryparam.cxx | 18 +- sc/source/core/tool/rangelst.cxx | 180 ++-- sc/source/core/tool/rangenam.cxx | 136 +-- sc/source/core/tool/rangeseq.cxx | 66 +- sc/source/core/tool/rangeutl.cxx | 100 +-- sc/source/core/tool/rechead.cxx | 24 +- sc/source/core/tool/refdata.cxx | 66 +- sc/source/core/tool/reffind.cxx | 18 +- sc/source/core/tool/refreshtimer.cxx | 6 +- sc/source/core/tool/reftokenhelper.cxx | 2 +- sc/source/core/tool/refupdat.cxx | 178 ++-- sc/source/core/tool/scmatrix.cxx | 48 +- sc/source/core/tool/subtotal.cxx | 18 +- sc/source/core/tool/token.cxx | 136 +-- sc/source/core/tool/unitconv.cxx | 12 +- sc/source/core/tool/userlist.cxx | 54 +- sc/source/core/tool/viewopti.cxx | 18 +- sc/source/core/tool/zforauto.cxx | 12 +- sc/source/filter/dif/difexp.cxx | 16 +- sc/source/filter/dif/difimp.cxx | 76 +- sc/source/filter/excel/colrowst.cxx | 6 +- sc/source/filter/excel/excdoc.cxx | 4 +- sc/source/filter/excel/excel.cxx | 6 +- sc/source/filter/excel/excform.cxx | 282 +++---- sc/source/filter/excel/excform8.cxx | 190 ++--- sc/source/filter/excel/excimp8.cxx | 86 +- sc/source/filter/excel/excrecds.cxx | 100 +-- sc/source/filter/excel/exctools.cxx | 96 +-- sc/source/filter/excel/expop2.cxx | 4 +- sc/source/filter/excel/fontbuff.cxx | 14 +- sc/source/filter/excel/frmbase.cxx | 26 +- sc/source/filter/excel/impop.cxx | 154 ++-- sc/source/filter/excel/namebuff.cxx | 54 +- sc/source/filter/excel/read.cxx | 14 +- sc/source/filter/excel/tokstack.cxx | 110 +-- sc/source/filter/excel/xecontent.cxx | 18 +- sc/source/filter/excel/xeescher.cxx | 12 +- sc/source/filter/excel/xeformula.cxx | 22 +- sc/source/filter/excel/xehelper.cxx | 28 +- sc/source/filter/excel/xelink.cxx | 6 +- sc/source/filter/excel/xename.cxx | 24 +- sc/source/filter/excel/xepivot.cxx | 6 +- sc/source/filter/excel/xestyle.cxx | 36 +- sc/source/filter/excel/xetable.cxx | 32 +- sc/source/filter/excel/xicontent.cxx | 6 +- sc/source/filter/excel/xiescher.cxx | 38 +- sc/source/filter/excel/xihelper.cxx | 4 +- sc/source/filter/excel/xiname.cxx | 4 +- sc/source/filter/excel/xipivot.cxx | 10 +- sc/source/filter/excel/xistyle.cxx | 26 +- sc/source/filter/excel/xiview.cxx | 4 +- sc/source/filter/excel/xlchart.cxx | 10 +- sc/source/filter/excel/xlformula.cxx | 2 +- sc/source/filter/excel/xlroot.cxx | 14 +- sc/source/filter/excel/xltools.cxx | 10 +- sc/source/filter/ftools/fprogressbar.cxx | 10 +- sc/source/filter/ftools/ftools.cxx | 6 +- sc/source/filter/html/htmlexp.cxx | 140 ++-- sc/source/filter/html/htmlexp2.cxx | 26 +- sc/source/filter/html/htmlimp.cxx | 18 +- sc/source/filter/html/htmlpars.cxx | 274 +++--- sc/source/filter/inc/XclExpChangeTrack.hxx | 40 +- sc/source/filter/inc/XclImpChangeTrack.hxx | 2 +- sc/source/filter/inc/decl.h | 2 +- sc/source/filter/inc/dif.hxx | 54 +- sc/source/filter/inc/eeimport.hxx | 6 +- sc/source/filter/inc/eeparser.hxx | 20 +- sc/source/filter/inc/excdoc.hxx | 6 +- sc/source/filter/inc/excform.hxx | 38 +- sc/source/filter/inc/excimp8.hxx | 24 +- sc/source/filter/inc/excrecds.hxx | 88 +- sc/source/filter/inc/excscen.hxx | 18 +- sc/source/filter/inc/exp_op.hxx | 16 +- sc/source/filter/inc/expbase.hxx | 10 +- sc/source/filter/inc/formel.hxx | 50 +- sc/source/filter/inc/fprogressbar.hxx | 6 +- sc/source/filter/inc/ftools.hxx | 36 +- sc/source/filter/inc/htmlexp.hxx | 56 +- sc/source/filter/inc/htmlimp.hxx | 4 +- sc/source/filter/inc/htmlpars.hxx | 86 +- sc/source/filter/inc/imp_op.hxx | 10 +- sc/source/filter/inc/lotattr.hxx | 40 +- sc/source/filter/inc/lotfntbf.hxx | 14 +- sc/source/filter/inc/lotform.hxx | 28 +- sc/source/filter/inc/lotimpop.hxx | 40 +- sc/source/filter/inc/lotrange.hxx | 22 +- sc/source/filter/inc/namebuff.hxx | 90 +- sc/source/filter/inc/op.h | 62 +- sc/source/filter/inc/optab.h | 2 +- sc/source/filter/inc/otlnbuff.hxx | 24 +- sc/source/filter/inc/rtfexp.hxx | 4 +- sc/source/filter/inc/rtfparse.hxx | 16 +- sc/source/filter/inc/scflt.hxx | 370 ++++---- sc/source/filter/inc/scfobj.hxx | 2 +- sc/source/filter/inc/scmem.h | 2 +- sc/source/filter/inc/tokstack.hxx | 112 +-- sc/source/filter/inc/tool.h | 38 +- sc/source/filter/inc/xcl97dum.hxx | 20 +- sc/source/filter/inc/xcl97esc.hxx | 12 +- sc/source/filter/inc/xcl97rec.hxx | 62 +- sc/source/filter/inc/xecontent.hxx | 10 +- sc/source/filter/inc/xename.hxx | 4 +- sc/source/filter/inc/xerecord.hxx | 2 +- sc/source/filter/inc/xestyle.hxx | 24 +- sc/source/filter/inc/xiescher.hxx | 6 +- sc/source/filter/inc/xihelper.hxx | 2 +- sc/source/filter/inc/xistyle.hxx | 14 +- sc/source/filter/inc/xlformula.hxx | 4 +- sc/source/filter/inc/xlpivot.hxx | 2 +- sc/source/filter/inc/xlstyle.hxx | 4 +- sc/source/filter/inc/xltools.hxx | 8 +- sc/source/filter/inc/xlview.hxx | 2 +- sc/source/filter/lotus/expop.cxx | 142 ++-- sc/source/filter/lotus/filter.cxx | 16 +- sc/source/filter/lotus/lotattr.cxx | 20 +- sc/source/filter/lotus/lotform.cxx | 84 +- sc/source/filter/lotus/lotimpop.cxx | 88 +- sc/source/filter/lotus/lotread.cxx | 22 +- sc/source/filter/lotus/lotus.cxx | 4 +- sc/source/filter/lotus/memory.cxx | 18 +- sc/source/filter/lotus/op.cxx | 172 ++-- sc/source/filter/lotus/tool.cxx | 128 +-- sc/source/filter/qpro/qpro.cxx | 14 +- sc/source/filter/qpro/qproform.cxx | 32 +- sc/source/filter/qpro/qprostyle.cxx | 6 +- sc/source/filter/rtf/eeimpars.cxx | 78 +- sc/source/filter/rtf/expbase.cxx | 10 +- sc/source/filter/rtf/rtfexp.cxx | 32 +- sc/source/filter/rtf/rtfparse.cxx | 44 +- sc/source/filter/starcalc/scflt.cxx | 348 ++++---- sc/source/filter/starcalc/scfobj.cxx | 2 +- sc/source/filter/xcl97/XclExpChangeTrack.cxx | 38 +- sc/source/filter/xcl97/XclImpChangeTrack.cxx | 18 +- sc/source/filter/xcl97/xcl97dum.cxx | 20 +- sc/source/filter/xcl97/xcl97esc.cxx | 8 +- sc/source/filter/xcl97/xcl97rec.cxx | 86 +- .../filter/xml/XMLCalculationSettingsContext.cxx | 12 +- .../filter/xml/XMLCalculationSettingsContext.hxx | 12 +- sc/source/filter/xml/XMLCellRangeSourceContext.cxx | 6 +- sc/source/filter/xml/XMLCellRangeSourceContext.hxx | 4 +- .../filter/xml/XMLChangeTrackingImportHelper.cxx | 6 +- sc/source/filter/xml/XMLConsolidationContext.cxx | 18 +- sc/source/filter/xml/XMLConsolidationContext.hxx | 4 +- sc/source/filter/xml/XMLDDELinksContext.cxx | 38 +- sc/source/filter/xml/XMLDDELinksContext.hxx | 28 +- sc/source/filter/xml/XMLDetectiveContext.cxx | 16 +- sc/source/filter/xml/XMLDetectiveContext.hxx | 12 +- sc/source/filter/xml/XMLEmptyContext.cxx | 4 +- sc/source/filter/xml/XMLEmptyContext.hxx | 4 +- sc/source/filter/xml/XMLExportDDELinks.cxx | 6 +- sc/source/filter/xml/XMLTableShapeResizer.cxx | 4 +- sc/source/filter/xml/XMLTableShapesContext.cxx | 4 +- sc/source/filter/xml/XMLTableShapesContext.hxx | 4 +- sc/source/filter/xml/XMLTableSourceContext.cxx | 8 +- sc/source/filter/xml/XMLTableSourceContext.hxx | 4 +- sc/source/filter/xml/XMLTextPContext.cxx | 8 +- sc/source/filter/xml/XMLTextPContext.hxx | 6 +- sc/source/filter/xml/XMLTrackedChangesContext.cxx | 180 ++-- sc/source/filter/xml/XMLTrackedChangesContext.hxx | 4 +- sc/source/filter/xml/xmlannoi.cxx | 6 +- sc/source/filter/xml/xmlannoi.hxx | 4 +- sc/source/filter/xml/xmlbodyi.cxx | 10 +- sc/source/filter/xml/xmlbodyi.hxx | 4 +- sc/source/filter/xml/xmlcelli.cxx | 8 +- sc/source/filter/xml/xmlcelli.hxx | 4 +- sc/source/filter/xml/xmlcoli.cxx | 8 +- sc/source/filter/xml/xmlcoli.hxx | 8 +- sc/source/filter/xml/xmlconti.cxx | 6 +- sc/source/filter/xml/xmlconti.hxx | 4 +- sc/source/filter/xml/xmlcvali.cxx | 44 +- sc/source/filter/xml/xmlcvali.hxx | 4 +- sc/source/filter/xml/xmldpimp.cxx | 114 +-- sc/source/filter/xml/xmldpimp.hxx | 76 +- sc/source/filter/xml/xmldrani.cxx | 58 +- sc/source/filter/xml/xmldrani.hxx | 40 +- sc/source/filter/xml/xmlexprt.cxx | 20 +- sc/source/filter/xml/xmlexternaltabi.cxx | 20 +- sc/source/filter/xml/xmlexternaltabi.hxx | 20 +- sc/source/filter/xml/xmlfilti.cxx | 40 +- sc/source/filter/xml/xmlfilti.hxx | 32 +- sc/source/filter/xml/xmlimprt.cxx | 24 +- sc/source/filter/xml/xmlimprt.hxx | 8 +- sc/source/filter/xml/xmllabri.cxx | 10 +- sc/source/filter/xml/xmllabri.hxx | 8 +- sc/source/filter/xml/xmlnexpi.cxx | 18 +- sc/source/filter/xml/xmlnexpi.hxx | 12 +- sc/source/filter/xml/xmlrowi.cxx | 8 +- sc/source/filter/xml/xmlrowi.hxx | 8 +- sc/source/filter/xml/xmlsceni.cxx | 10 +- sc/source/filter/xml/xmlsceni.hxx | 4 +- sc/source/filter/xml/xmlsorti.cxx | 12 +- sc/source/filter/xml/xmlsorti.hxx | 8 +- sc/source/filter/xml/xmlsubti.cxx | 4 +- sc/source/filter/xml/xmltabi.cxx | 18 +- sc/source/filter/xml/xmltabi.hxx | 4 +- sc/source/filter/xml/xmlwrap.cxx | 4 +- sc/source/ui/Accessibility/AccessibleCell.cxx | 2 +- sc/source/ui/Accessibility/AccessibleCellBase.cxx | 2 +- sc/source/ui/Accessibility/AccessibleDocument.cxx | 4 +- .../AccessibleDocumentPagePreview.cxx | 2 +- .../Accessibility/AccessiblePreviewHeaderCell.cxx | 2 +- .../ui/Accessibility/AccessiblePreviewTable.cxx | 2 +- sc/source/ui/Accessibility/AccessibleText.cxx | 66 +- sc/source/ui/app/client.cxx | 6 +- sc/source/ui/app/drwtrans.cxx | 46 +- sc/source/ui/app/inputhdl.cxx | 730 ++++++++-------- sc/source/ui/app/inputwin.cxx | 182 ++-- sc/source/ui/app/msgpool.cxx | 8 +- sc/source/ui/app/rfindlst.cxx | 4 +- sc/source/ui/app/scdll.cxx | 66 +- sc/source/ui/app/scmod.cxx | 240 +++--- sc/source/ui/app/scmod2.cxx | 12 +- sc/source/ui/app/seltrans.cxx | 26 +- sc/source/ui/app/template.cxx | 10 +- sc/source/ui/app/transobj.cxx | 74 +- sc/source/ui/app/uiitems.cxx | 50 +- sc/source/ui/attrdlg/attrdlg.cxx | 4 +- sc/source/ui/attrdlg/condfrmt.cxx | 44 +- sc/source/ui/attrdlg/scdlgfact.cxx | 140 ++-- sc/source/ui/attrdlg/scdlgfact.hxx | 142 ++-- sc/source/ui/attrdlg/tabpages.cxx | 32 +- sc/source/ui/cctrl/cbuttonw.cxx | 16 +- sc/source/ui/cctrl/dpcontrol.cxx | 8 +- sc/source/ui/cctrl/popmenu.cxx | 2 +- sc/source/ui/cctrl/tbinsert.cxx | 20 +- sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 46 +- sc/source/ui/dbgui/asciiopt.cxx | 64 +- sc/source/ui/dbgui/consdlg.cxx | 46 +- sc/source/ui/dbgui/csvgrid.cxx | 8 +- sc/source/ui/dbgui/csvruler.cxx | 2 +- sc/source/ui/dbgui/dapidata.cxx | 4 +- sc/source/ui/dbgui/dapitype.cxx | 6 +- sc/source/ui/dbgui/dbnamdlg.cxx | 82 +- sc/source/ui/dbgui/dpgroupdlg.cxx | 14 +- sc/source/ui/dbgui/fieldwnd.cxx | 22 +- sc/source/ui/dbgui/filtdlg.cxx | 232 ++--- sc/source/ui/dbgui/foptmgr.cxx | 26 +- sc/source/ui/dbgui/imoptdlg.cxx | 6 +- sc/source/ui/dbgui/pfiltdlg.cxx | 52 +- sc/source/ui/dbgui/pvfundlg.cxx | 64 +- sc/source/ui/dbgui/pvlaydlg.cxx | 154 ++-- sc/source/ui/dbgui/scendlg.cxx | 36 +- sc/source/ui/dbgui/scuiasciiopt.cxx | 20 +- sc/source/ui/dbgui/scuiimoptdlg.cxx | 24 +- sc/source/ui/dbgui/sfiltdlg.cxx | 64 +- sc/source/ui/dbgui/sortdlg.cxx | 8 +- sc/source/ui/dbgui/tpsort.cxx | 102 +-- sc/source/ui/dbgui/tpsubt.cxx | 108 +-- sc/source/ui/dbgui/validate.cxx | 98 +-- sc/source/ui/docshell/arealink.cxx | 60 +- sc/source/ui/docshell/autostyl.cxx | 50 +- sc/source/ui/docshell/dbdocfun.cxx | 312 +++---- sc/source/ui/docshell/dbdocimp.cxx | 104 +-- sc/source/ui/docshell/docfunc.cxx | 848 +++++++++---------- sc/source/ui/docshell/docsh.cxx | 360 ++++---- sc/source/ui/docshell/docsh2.cxx | 16 +- sc/source/ui/docshell/docsh3.cxx | 176 ++-- sc/source/ui/docshell/docsh4.cxx | 294 +++---- sc/source/ui/docshell/docsh5.cxx | 164 ++-- sc/source/ui/docshell/docsh6.cxx | 80 +- sc/source/ui/docshell/docsh8.cxx | 78 +- sc/source/ui/docshell/editable.cxx | 44 +- sc/source/ui/docshell/externalrefmgr.cxx | 8 +- sc/source/ui/docshell/impex.cxx | 314 +++---- sc/source/ui/docshell/olinefun.cxx | 226 ++--- sc/source/ui/docshell/pagedata.cxx | 14 +- sc/source/ui/docshell/pntlock.cxx | 6 +- sc/source/ui/docshell/servobj.cxx | 38 +- sc/source/ui/docshell/sizedev.cxx | 6 +- sc/source/ui/docshell/tablink.cxx | 106 +-- sc/source/ui/docshell/tpstat.cxx | 4 +- sc/source/ui/drawfunc/drawsh.cxx | 56 +- sc/source/ui/drawfunc/drawsh2.cxx | 52 +- sc/source/ui/drawfunc/drawsh4.cxx | 4 +- sc/source/ui/drawfunc/drawsh5.cxx | 52 +- sc/source/ui/drawfunc/drtxtob.cxx | 122 +-- sc/source/ui/drawfunc/drtxtob1.cxx | 10 +- sc/source/ui/drawfunc/drtxtob2.cxx | 28 +- sc/source/ui/drawfunc/fuconarc.cxx | 24 +- sc/source/ui/drawfunc/fuconcustomshape.cxx | 20 +- sc/source/ui/drawfunc/fuconpol.cxx | 38 +- sc/source/ui/drawfunc/fuconrec.cxx | 22 +- sc/source/ui/drawfunc/fuconstr.cxx | 48 +- sc/source/ui/drawfunc/fuconuno.cxx | 24 +- sc/source/ui/drawfunc/fudraw.cxx | 122 +-- sc/source/ui/drawfunc/fuins1.cxx | 24 +- sc/source/ui/drawfunc/fuins2.cxx | 44 +- sc/source/ui/drawfunc/fumark.cxx | 44 +- sc/source/ui/drawfunc/fupoor.cxx | 32 +- sc/source/ui/drawfunc/fusel.cxx | 88 +- sc/source/ui/drawfunc/fusel2.cxx | 20 +- sc/source/ui/drawfunc/futext.cxx | 92 +- sc/source/ui/drawfunc/futext3.cxx | 6 +- sc/source/ui/drawfunc/graphsh.cxx | 4 +- sc/source/ui/drawfunc/mediash.cxx | 4 +- sc/source/ui/formdlg/dwfunctr.cxx | 84 +- sc/source/ui/formdlg/formula.cxx | 78 +- sc/source/ui/formdlg/privsplt.cxx | 12 +- sc/source/ui/inc/IAnyRefDialog.hxx | 10 +- sc/source/ui/inc/acredlin.hxx | 60 +- sc/source/ui/inc/anyrefdg.hxx | 52 +- sc/source/ui/inc/areasave.hxx | 10 +- sc/source/ui/inc/areasdlg.hxx | 10 +- sc/source/ui/inc/asciiopt.hxx | 44 +- sc/source/ui/inc/attrdlg.hxx | 2 +- sc/source/ui/inc/auditsh.hxx | 2 +- sc/source/ui/inc/autofmt.hxx | 24 +- sc/source/ui/inc/autostyl.hxx | 10 +- sc/source/ui/inc/cbutton.hxx | 14 +- sc/source/ui/inc/cellsh.hxx | 4 +- sc/source/ui/inc/colrowba.hxx | 26 +- sc/source/ui/inc/condfrmt.hxx | 6 +- sc/source/ui/inc/conflictsdlg.hxx | 30 +- sc/source/ui/inc/consdlg.hxx | 16 +- sc/source/ui/inc/content.hxx | 48 +- sc/source/ui/inc/corodlg.hxx | 8 +- sc/source/ui/inc/crdlg.hxx | 2 +- sc/source/ui/inc/crnrdlg.hxx | 12 +- sc/source/ui/inc/csvruler.hxx | 6 +- sc/source/ui/inc/dapitype.hxx | 6 +- sc/source/ui/inc/dbdocfun.hxx | 36 +- sc/source/ui/inc/dbfunc.hxx | 64 +- sc/source/ui/inc/dbnamdlg.hxx | 8 +- sc/source/ui/inc/delcldlg.hxx | 2 +- sc/source/ui/inc/delcodlg.hxx | 12 +- sc/source/ui/inc/docfunc.hxx | 152 ++-- sc/source/ui/inc/docsh.hxx | 188 ++--- sc/source/ui/inc/dpcontrol.hxx | 2 +- sc/source/ui/inc/drawsh.hxx | 8 +- sc/source/ui/inc/drawview.hxx | 14 +- sc/source/ui/inc/drtxtob.hxx | 10 +- sc/source/ui/inc/drwtrans.hxx | 14 +- sc/source/ui/inc/dwfunctr.hxx | 22 +- sc/source/ui/inc/editable.hxx | 10 +- sc/source/ui/inc/editsh.hxx | 6 +- sc/source/ui/inc/fieldwnd.hxx | 14 +- sc/source/ui/inc/filldlg.hxx | 14 +- sc/source/ui/inc/filtdlg.hxx | 34 +- sc/source/ui/inc/foptmgr.hxx | 2 +- sc/source/ui/inc/formula.hxx | 22 +- sc/source/ui/inc/fuconarc.hxx | 8 +- sc/source/ui/inc/fuconcustomshape.hxx | 8 +- sc/source/ui/inc/fuconpol.hxx | 8 +- sc/source/ui/inc/fuconrec.hxx | 8 +- sc/source/ui/inc/fuconstr.hxx | 12 +- sc/source/ui/inc/fuconuno.hxx | 12 +- sc/source/ui/inc/fudraw.hxx | 10 +- sc/source/ui/inc/fuedipo.hxx | 8 +- sc/source/ui/inc/fumark.hxx | 14 +- sc/source/ui/inc/funcpage.hxx | 14 +- sc/source/ui/inc/funcutl.hxx | 6 +- sc/source/ui/inc/fupoor.hxx | 16 +- sc/source/ui/inc/fusel.hxx | 14 +- sc/source/ui/inc/futext.hxx | 14 +- sc/source/ui/inc/gridmerg.hxx | 4 +- sc/source/ui/inc/gridwin.hxx | 114 +-- sc/source/ui/inc/groupdlg.hxx | 8 +- sc/source/ui/inc/hdrcont.hxx | 36 +- sc/source/ui/inc/hfedtdlg.hxx | 4 +- sc/source/ui/inc/highred.hxx | 6 +- sc/source/ui/inc/hiranges.hxx | 4 +- sc/source/ui/inc/imoptdlg.hxx | 14 +- sc/source/ui/inc/impex.hxx | 86 +- sc/source/ui/inc/inputhdl.hxx | 102 +-- sc/source/ui/inc/inputwin.hxx | 36 +- sc/source/ui/inc/inscldlg.hxx | 2 +- sc/source/ui/inc/inscodlg.hxx | 40 +- sc/source/ui/inc/instbdlg.hxx | 12 +- sc/source/ui/inc/lbseldlg.hxx | 4 +- sc/source/ui/inc/linkarea.hxx | 4 +- sc/source/ui/inc/msgpool.hxx | 2 +- sc/source/ui/inc/mtrindlg.hxx | 4 +- sc/source/ui/inc/mvtabdlg.hxx | 12 +- sc/source/ui/inc/namecrea.hxx | 4 +- sc/source/ui/inc/namedlg.hxx | 10 +- sc/source/ui/inc/namepast.hxx | 2 +- sc/source/ui/inc/navcitem.hxx | 4 +- sc/source/ui/inc/navipi.hxx | 24 +- sc/source/ui/inc/navsett.hxx | 18 +- sc/source/ui/inc/notemark.hxx | 10 +- sc/source/ui/inc/olinefun.hxx | 24 +- sc/source/ui/inc/olinewin.hxx | 2 +- sc/source/ui/inc/opredlin.hxx | 2 +- sc/source/ui/inc/optload.hxx | 2 +- sc/source/ui/inc/optsolver.hxx | 20 +- sc/source/ui/inc/output.hxx | 86 +- sc/source/ui/inc/pagedata.hxx | 14 +- sc/source/ui/inc/parawin.hxx | 46 +- sc/source/ui/inc/pfiltdlg.hxx | 10 +- sc/source/ui/inc/pfuncache.hxx | 4 +- sc/source/ui/inc/pntlock.hxx | 24 +- sc/source/ui/inc/popmenu.hxx | 12 +- sc/source/ui/inc/preview.hxx | 64 +- sc/source/ui/inc/prevloc.hxx | 40 +- sc/source/ui/inc/prevwsh.hxx | 26 +- sc/source/ui/inc/printfun.hxx | 118 +-- sc/source/ui/inc/privsplt.hxx | 4 +- sc/source/ui/inc/pvfundlg.hxx | 10 +- sc/source/ui/inc/pvlaydlg.hxx | 26 +- sc/source/ui/inc/redcom.hxx | 2 +- sc/source/ui/inc/reffact.hxx | 16 +- sc/source/ui/inc/refundo.hxx | 2 +- sc/source/ui/inc/rfindlst.hxx | 16 +- sc/source/ui/inc/scendlg.hxx | 8 +- sc/source/ui/inc/scuiasciiopt.hxx | 12 +- sc/source/ui/inc/scuiautofmt.hxx | 8 +- sc/source/ui/inc/scuiimoptdlg.hxx | 10 +- sc/source/ui/inc/scuitphfedit.hxx | 16 +- sc/source/ui/inc/select.hxx | 24 +- sc/source/ui/inc/seltrans.hxx | 2 +- sc/source/ui/inc/servobj.hxx | 6 +- sc/source/ui/inc/shtabdlg.hxx | 8 +- sc/source/ui/inc/simpref.hxx | 22 +- sc/source/ui/inc/sizedev.hxx | 4 +- sc/source/ui/inc/solvrdlg.hxx | 8 +- sc/source/ui/inc/sortdlg.hxx | 20 +- sc/source/ui/inc/spelldialog.hxx | 2 +- sc/source/ui/inc/spelleng.hxx | 4 +- sc/source/ui/inc/styledlg.hxx | 6 +- sc/source/ui/inc/tabcont.hxx | 12 +- sc/source/ui/inc/tabopdlg.hxx | 6 +- sc/source/ui/inc/tabpages.hxx | 16 +- sc/source/ui/inc/tabsplit.hxx | 4 +- sc/source/ui/inc/tabview.hxx | 162 ++-- sc/source/ui/inc/tabvwsh.hxx | 142 ++-- sc/source/ui/inc/tbinsert.hxx | 10 +- sc/source/ui/inc/tbzoomsliderctrl.hxx | 10 +- sc/source/ui/inc/textdlgs.hxx | 4 +- sc/source/ui/inc/tpcalc.hxx | 6 +- sc/source/ui/inc/tphf.hxx | 12 +- sc/source/ui/inc/tphfedit.hxx | 20 +- sc/source/ui/inc/tpprint.hxx | 4 +- sc/source/ui/inc/tpsort.hxx | 24 +- sc/source/ui/inc/tpstat.hxx | 2 +- sc/source/ui/inc/tpsubt.hxx | 30 +- sc/source/ui/inc/tptable.hxx | 4 +- sc/source/ui/inc/tpusrlst.hxx | 22 +- sc/source/ui/inc/tpview.hxx | 4 +- sc/source/ui/inc/transobj.hxx | 14 +- sc/source/ui/inc/uiitems.hxx | 58 +- sc/source/ui/inc/undobase.hxx | 14 +- sc/source/ui/inc/undoblk.hxx | 258 +++--- sc/source/ui/inc/undocell.hxx | 76 +- sc/source/ui/inc/undodat.hxx | 108 +-- sc/source/ui/inc/undodraw.hxx | 10 +- sc/source/ui/inc/undoolk.hxx | 2 +- sc/source/ui/inc/undostyl.hxx | 4 +- sc/source/ui/inc/undotab.hxx | 92 +- sc/source/ui/inc/validate.hxx | 26 +- sc/source/ui/inc/viewdata.hxx | 122 +-- sc/source/ui/inc/viewfunc.hxx | 198 ++--- sc/source/ui/inc/viewutil.hxx | 16 +- sc/source/ui/miscdlgs/acredlin.cxx | 404 ++++----- sc/source/ui/miscdlgs/anyrefdg.cxx | 144 ++-- sc/source/ui/miscdlgs/autofmt.cxx | 88 +- sc/source/ui/miscdlgs/conflictsdlg.cxx | 38 +- sc/source/ui/miscdlgs/crdlg.cxx | 2 +- sc/source/ui/miscdlgs/crnrdlg.cxx | 106 +-- sc/source/ui/miscdlgs/delcldlg.cxx | 4 +- sc/source/ui/miscdlgs/delcodlg.cxx | 18 +- sc/source/ui/miscdlgs/filldlg.cxx | 30 +- sc/source/ui/miscdlgs/groupdlg.cxx | 8 +- sc/source/ui/miscdlgs/highred.cxx | 32 +- sc/source/ui/miscdlgs/inscldlg.cxx | 4 +- sc/source/ui/miscdlgs/inscodlg.cxx | 68 +- sc/source/ui/miscdlgs/instbdlg.cxx | 12 +- sc/source/ui/miscdlgs/lbseldlg.cxx | 4 +- sc/source/ui/miscdlgs/linkarea.cxx | 32 +- sc/source/ui/miscdlgs/mtrindlg.cxx | 10 +- sc/source/ui/miscdlgs/mvtabdlg.cxx | 32 +- sc/source/ui/miscdlgs/namecrea.cxx | 14 +- sc/source/ui/miscdlgs/namepast.cxx | 6 +- sc/source/ui/miscdlgs/optsolver.cxx | 30 +- sc/source/ui/miscdlgs/protectiondlg.cxx | 6 +- sc/source/ui/miscdlgs/redcom.cxx | 12 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 50 +- sc/source/ui/miscdlgs/sharedocdlg.cxx | 14 +- sc/source/ui/miscdlgs/shtabdlg.cxx | 8 +- sc/source/ui/miscdlgs/simpref.cxx | 34 +- sc/source/ui/miscdlgs/solveroptions.cxx | 26 +- sc/source/ui/miscdlgs/solvrdlg.cxx | 18 +- sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 14 +- sc/source/ui/miscdlgs/tabopdlg.cxx | 18 +- sc/source/ui/miscdlgs/textdlgs.cxx | 4 +- sc/source/ui/miscdlgs/warnbox.cxx | 4 +- sc/source/ui/namedlg/namedlg.cxx | 78 +- sc/source/ui/navipi/content.cxx | 226 ++--- sc/source/ui/navipi/navcitem.cxx | 8 +- sc/source/ui/navipi/navipi.cxx | 104 +-- sc/source/ui/navipi/scenwnd.cxx | 10 +- sc/source/ui/optdlg/opredlin.cxx | 30 +- sc/source/ui/optdlg/tpcalc.cxx | 18 +- sc/source/ui/optdlg/tpprint.cxx | 16 +- sc/source/ui/optdlg/tpusrlst.cxx | 68 +- sc/source/ui/optdlg/tpview.cxx | 98 +-- sc/source/ui/pagedlg/areasdlg.cxx | 104 +-- sc/source/ui/pagedlg/hfedtdlg.cxx | 10 +- sc/source/ui/pagedlg/scuitphfedit.cxx | 34 +- sc/source/ui/pagedlg/tphf.cxx | 20 +- sc/source/ui/pagedlg/tphfedit.cxx | 58 +- sc/source/ui/pagedlg/tptable.cxx | 102 +-- sc/source/ui/styleui/styledlg.cxx | 8 +- sc/source/ui/undo/areasave.cxx | 34 +- sc/source/ui/undo/refundo.cxx | 6 +- sc/source/ui/undo/undobase.cxx | 58 +- sc/source/ui/undo/undoblk.cxx | 276 +++--- sc/source/ui/undo/undoblk2.cxx | 16 +- sc/source/ui/undo/undoblk3.cxx | 220 ++--- sc/source/ui/undo/undocell.cxx | 130 +-- sc/source/ui/undo/undodat.cxx | 298 +++---- sc/source/ui/undo/undodraw.cxx | 16 +- sc/source/ui/undo/undoolk.cxx | 2 +- sc/source/ui/undo/undostyl.cxx | 24 +- sc/source/ui/undo/undotab.cxx | 310 +++---- sc/source/ui/undo/undoutil.cxx | 10 +- sc/source/ui/unoobj/addruno.cxx | 6 +- sc/source/ui/unoobj/afmtuno.cxx | 10 +- sc/source/ui/unoobj/appluno.cxx | 92 +- sc/source/ui/unoobj/cellsuno.cxx | 930 ++++++++++----------- sc/source/ui/unoobj/chart2uno.cxx | 12 +- sc/source/ui/unoobj/chartuno.cxx | 26 +- sc/source/ui/unoobj/confuno.cxx | 6 +- sc/source/ui/unoobj/cursuno.cxx | 10 +- sc/source/ui/unoobj/dapiuno.cxx | 84 +- sc/source/ui/unoobj/datauno.cxx | 146 ++-- sc/source/ui/unoobj/defltuno.cxx | 2 +- sc/source/ui/unoobj/dispuno.cxx | 16 +- sc/source/ui/unoobj/docuno.cxx | 236 +++--- sc/source/ui/unoobj/editsrc.cxx | 16 +- sc/source/ui/unoobj/fielduno.cxx | 54 +- sc/source/ui/unoobj/fmtuno.cxx | 40 +- sc/source/ui/unoobj/funcuno.cxx | 52 +- sc/source/ui/unoobj/linkuno.cxx | 100 +-- sc/source/ui/unoobj/miscuno.cxx | 6 +- sc/source/ui/unoobj/nameuno.cxx | 18 +- sc/source/ui/unoobj/optuno.cxx | 6 +- sc/source/ui/unoobj/scdetect.cxx | 106 +-- sc/source/ui/unoobj/servuno.cxx | 2 +- sc/source/ui/unoobj/shapeuno.cxx | 22 +- sc/source/ui/unoobj/srchuno.cxx | 22 +- sc/source/ui/unoobj/styleuno.cxx | 122 +-- sc/source/ui/unoobj/targuno.cxx | 2 +- sc/source/ui/unoobj/textuno.cxx | 68 +- sc/source/ui/unoobj/viewuno.cxx | 188 ++--- sc/source/ui/vba/excelvbahelper.cxx | 6 +- sc/source/ui/vba/vbafont.cxx | 18 +- sc/source/ui/vba/vbaformat.cxx | 8 +- sc/source/ui/vba/vbahelper.cxx | 10 +- sc/source/ui/vba/vbahyperlinks.cxx | 2 +- sc/source/ui/vba/vbapagesetup.cxx | 12 +- sc/source/ui/vba/vbarange.cxx | 106 +-- sc/source/ui/vba/vbawindow.cxx | 2 +- sc/source/ui/vba/vbaworksheets.cxx | 2 +- sc/source/ui/view/auditsh.cxx | 12 +- sc/source/ui/view/cellsh.cxx | 106 +-- sc/source/ui/view/cellsh1.cxx | 214 ++--- sc/source/ui/view/cellsh2.cxx | 216 ++--- sc/source/ui/view/cellsh3.cxx | 116 +-- sc/source/ui/view/cellsh4.cxx | 52 +- sc/source/ui/view/colrowba.cxx | 50 +- sc/source/ui/view/dbfunc.cxx | 76 +- sc/source/ui/view/dbfunc2.cxx | 4 +- sc/source/ui/view/dbfunc3.cxx | 322 +++---- sc/source/ui/view/dbfunc4.cxx | 14 +- sc/source/ui/view/drawattr.cxx | 6 +- sc/source/ui/view/drawutil.cxx | 4 +- sc/source/ui/view/drawvie3.cxx | 22 +- sc/source/ui/view/drawvie4.cxx | 42 +- sc/source/ui/view/drawview.cxx | 106 +-- sc/source/ui/view/editsh.cxx | 130 +-- sc/source/ui/view/formatsh.cxx | 242 +++--- sc/source/ui/view/galwrap.cxx | 4 +- sc/source/ui/view/gridmerg.cxx | 6 +- sc/source/ui/view/gridwin.cxx | 686 +++++++-------- sc/source/ui/view/gridwin2.cxx | 164 ++-- sc/source/ui/view/gridwin3.cxx | 76 +- sc/source/ui/view/gridwin4.cxx | 242 +++--- sc/source/ui/view/gridwin5.cxx | 46 +- sc/source/ui/view/hdrcont.cxx | 134 +-- sc/source/ui/view/hintwin.cxx | 2 +- sc/source/ui/view/imapwrap.cxx | 2 +- sc/source/ui/view/invmerge.cxx | 6 +- sc/source/ui/view/notemark.cxx | 10 +- sc/source/ui/view/olinewin.cxx | 64 +- sc/source/ui/view/output.cxx | 298 +++---- sc/source/ui/view/output2.cxx | 566 ++++++------- sc/source/ui/view/output3.cxx | 8 +- sc/source/ui/view/pfuncache.cxx | 6 +- sc/source/ui/view/pivotsh.cxx | 6 +- sc/source/ui/view/preview.cxx | 254 +++--- sc/source/ui/view/prevloc.cxx | 186 ++--- sc/source/ui/view/prevwsh.cxx | 104 +-- sc/source/ui/view/prevwsh2.cxx | 14 +- sc/source/ui/view/printfun.cxx | 374 ++++----- sc/source/ui/view/reffact.cxx | 28 +- sc/source/ui/view/select.cxx | 202 ++--- sc/source/ui/view/selectionstate.cxx | 6 +- sc/source/ui/view/spelldialog.cxx | 8 +- sc/source/ui/view/spelleng.cxx | 14 +- sc/source/ui/view/tabcont.cxx | 80 +- sc/source/ui/view/tabsplit.cxx | 6 +- sc/source/ui/view/tabview.cxx | 274 +++--- sc/source/ui/view/tabview2.cxx | 132 +-- sc/source/ui/view/tabview3.cxx | 330 ++++---- sc/source/ui/view/tabview4.cxx | 52 +- sc/source/ui/view/tabview5.cxx | 68 +- sc/source/ui/view/tabvwsh2.cxx | 48 +- sc/source/ui/view/tabvwsh3.cxx | 156 ++-- sc/source/ui/view/tabvwsh4.cxx | 374 ++++----- sc/source/ui/view/tabvwsh5.cxx | 26 +- sc/source/ui/view/tabvwsh8.cxx | 6 +- sc/source/ui/view/tabvwsh9.cxx | 34 +- sc/source/ui/view/tabvwsha.cxx | 78 +- sc/source/ui/view/tabvwshb.cxx | 16 +- sc/source/ui/view/tabvwshc.cxx | 18 +- sc/source/ui/view/tabvwshd.cxx | 2 +- sc/source/ui/view/tabvwshe.cxx | 24 +- sc/source/ui/view/tabvwshf.cxx | 74 +- sc/source/ui/view/tabvwshh.cxx | 12 +- sc/source/ui/view/viewdata.cxx | 304 +++---- sc/source/ui/view/viewfun2.cxx | 478 +++++------ sc/source/ui/view/viewfun3.cxx | 206 ++--- sc/source/ui/view/viewfun4.cxx | 96 +-- sc/source/ui/view/viewfun5.cxx | 72 +- sc/source/ui/view/viewfun6.cxx | 16 +- sc/source/ui/view/viewfun7.cxx | 50 +- sc/source/ui/view/viewfunc.cxx | 520 ++++++------ sc/source/ui/view/viewutil.cxx | 86 +- 851 files changed, 26988 insertions(+), 26988 deletions(-) mode change 100755 => 100644 sc/inc/dpglobal.hxx mode change 100755 => 100644 sc/source/core/data/dpglobal.cxx mode change 100755 => 100644 sc/source/core/data/dpshttab.cxx mode change 100755 => 100644 sc/source/core/data/dptabdat.cxx mode change 100755 => 100644 sc/source/core/data/dptabres.cxx mode change 100755 => 100644 sc/source/core/data/scdpoutputimpl.hxx mode change 100755 => 100644 sc/source/ui/inc/fieldwnd.hxx mode change 100755 => 100644 sc/source/ui/unoobj/dapiuno.cxx (limited to 'sc/source/ui/inc/anyrefdg.hxx') diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx index f8c47ab24446..41afe64a1753 100644 --- a/sc/inc/addincol.hxx +++ b/sc/inc/addincol.hxx @@ -83,7 +83,7 @@ struct ScAddInArgDesc String aName; String aDescription; ScAddInArgumentType eType; - BOOL bOptional; + sal_Bool bOptional; }; class ScUnoAddInFuncData @@ -99,15 +99,15 @@ private: long nArgCount; ScAddInArgDesc* pArgDescs; long nCallerPos; - USHORT nCategory; + sal_uInt16 nCategory; rtl::OString sHelpId; mutable com::sun::star::uno::Sequence< com::sun::star::sheet::LocalizedName> aCompNames; - mutable BOOL bCompInitialized; + mutable sal_Bool bCompInitialized; public: ScUnoAddInFuncData( const String& rNam, const String& rLoc, const String& rDesc, - USHORT nCat, const rtl::OString&, + sal_uInt16 nCat, const rtl::OString&, const com::sun::star::uno::Reference< com::sun::star::reflection::XIdlMethod>& rFunc, const com::sun::star::uno::Any& rO, @@ -126,11 +126,11 @@ public: const ScAddInArgDesc* GetArguments() const { return pArgDescs; } long GetCallerPos() const { return nCallerPos; } const String& GetDescription() const { return aDescription; } - USHORT GetCategory() const { return nCategory; } + sal_uInt16 GetCategory() const { return nCategory; } const rtl::OString GetHelpId() const { return sHelpId; } const com::sun::star::uno::Sequence< com::sun::star::sheet::LocalizedName>& GetCompNames() const; - BOOL GetExcelName( LanguageType eDestLang, String& rRetExcelName ) const; + sal_Bool GetExcelName( LanguageType eDestLang, String& rRetExcelName ) const; void SetFunction( const com::sun::star::uno::Reference< com::sun::star::reflection::XIdlMethod>& rNewFunc, const com::sun::star::uno::Any& rNewObj ); @@ -149,7 +149,7 @@ private: ScAddInHashMap* pExactHashMap; // exact internal name ScAddInHashMap* pNameHashMap; // internal name upper ScAddInHashMap* pLocalHashMap; // localized name upper - BOOL bInitialized; + sal_Bool bInitialized; void Initialize(); void ReadConfiguration(); @@ -165,7 +165,7 @@ public: ~ScUnoAddInCollection(); /// User enetered name. rUpperName MUST already be upper case! - String FindFunction( const String& rUpperName, BOOL bLocalFirst ); + String FindFunction( const String& rUpperName, sal_Bool bLocalFirst ); // rName is the exact Name. // Only if bComplete is set, the function reference and argument types @@ -183,12 +183,12 @@ public: void LocalizeString( String& rName ); // modify rName - input: exact name long GetFuncCount(); - BOOL FillFunctionDesc( long nFunc, ScFuncDesc& rDesc ); + sal_Bool FillFunctionDesc( long nFunc, ScFuncDesc& rDesc ); - static BOOL FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc ); + static sal_Bool FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc ); - BOOL GetExcelName( const String& rCalcName, LanguageType eDestLang, String& rRetExcelName ); - BOOL GetCalcName( const String& rExcelName, String& rRetCalcName ); + sal_Bool GetExcelName( const String& rCalcName, LanguageType eDestLang, String& rRetExcelName ); + sal_Bool GetCalcName( const String& rExcelName, String& rRetCalcName ); // both leave rRet... unchanged, if no matching name is found }; @@ -200,10 +200,10 @@ private: com::sun::star::uno::Sequence aArgs; com::sun::star::uno::Sequence aVarArg; com::sun::star::uno::Reference xCaller; - BOOL bValidCount; + sal_Bool bValidCount; // result: - USHORT nErrCode; - BOOL bHasString; + sal_uInt16 nErrCode; + sal_Bool bHasString; double fValue; String aString; ScMatrixRef xMatrix; @@ -218,12 +218,12 @@ public: long nParamCount ); ~ScUnoAddInCall(); - BOOL NeedsCaller() const; + sal_Bool NeedsCaller() const; void SetCaller( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface>& rInterface ); void SetCallerFromObjectShell( SfxObjectShell* pSh ); - BOOL ValidParamCount(); + sal_Bool ValidParamCount(); ScAddInArgumentType GetArgType( long nPos ); void SetParam( long nPos, const com::sun::star::uno::Any& rValue ); @@ -231,10 +231,10 @@ public: void SetResult( const com::sun::star::uno::Any& rNewRes ); - USHORT GetErrCode() const { return nErrCode; } - BOOL HasString() const { return bHasString; } - BOOL HasMatrix() const { return ( xMatrix.Is() ); } - BOOL HasVarRes() const { return ( xVarRes.is() ); } + sal_uInt16 GetErrCode() const { return nErrCode; } + sal_Bool HasString() const { return bHasString; } + sal_Bool HasMatrix() const { return ( xMatrix.Is() ); } + sal_Bool HasVarRes() const { return ( xVarRes.is() ); } double GetValue() const { return fValue; } const String& GetString() const { return aString; } ScMatrixRef GetMatrix() const { return xMatrix; } diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 64dd9e3e7ea6..de29aa671fac 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -315,13 +315,13 @@ public: inline void GetVars( SCCOL& nColP, SCROW& nRowP, SCTAB& nTabP ) const { nColP = nCol; nRowP = nRow; nTabP = nTab; } - SC_DLLPUBLIC USHORT Parse( const String&, ScDocument* = NULL, + SC_DLLPUBLIC sal_uInt16 Parse( const String&, ScDocument* = NULL, const Details& rDetails = detailsOOOa1, ExternalInfo* pExtInfo = NULL, const ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks = NULL ); - SC_DLLPUBLIC void Format( String&, USHORT = 0, ScDocument* = NULL, + SC_DLLPUBLIC void Format( String&, sal_uInt16 = 0, ScDocument* = NULL, const Details& rDetails = detailsOOOa1) const; // The document for the maximum defined sheet number @@ -336,7 +336,7 @@ public: inline size_t hash() const; /// "A1" or "$A$1" or R1C1 or R[1]C[1] - String GetColRowString( bool bAbsolute = FALSE, + String GetColRowString( bool bAbsolute = sal_False, const Details& rDetails = detailsOOOa1) const; }; @@ -389,7 +389,7 @@ inline bool ScAddress::operator!=( const ScAddress& r ) const inline bool ScAddress::operator<( const ScAddress& r ) const { - // Same behavior as the old UINT32 nAddress < r.nAddress with encoded + // Same behavior as the old sal_uInt32 nAddress < r.nAddress with encoded // tab|col|row bit fields. if (nTab == r.nTab) { @@ -477,17 +477,17 @@ public: inline bool In( const ScAddress& ) const; // is Address& in Range? inline bool In( const ScRange& ) const; // is Range& in Range? - USHORT Parse( const String&, ScDocument* = NULL, + sal_uInt16 Parse( const String&, ScDocument* = NULL, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1, ScAddress::ExternalInfo* pExtInfo = NULL, const ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks = NULL ); - USHORT ParseAny( const String&, ScDocument* = NULL, + sal_uInt16 ParseAny( const String&, ScDocument* = NULL, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); - SC_DLLPUBLIC USHORT ParseCols( const String&, ScDocument* = NULL, + SC_DLLPUBLIC sal_uInt16 ParseCols( const String&, ScDocument* = NULL, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); - SC_DLLPUBLIC USHORT ParseRows( const String&, ScDocument* = NULL, + SC_DLLPUBLIC sal_uInt16 ParseRows( const String&, ScDocument* = NULL, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); /** Parse an Excel style reference up to and including the sheet name @@ -511,12 +511,12 @@ public: bOnlyAcceptSingle==true was given. */ const sal_Unicode* Parse_XL_Header( const sal_Unicode* pString, const ScDocument* pDoc, - String& rExternDocName, String& rStartTabName, String& rEndTabName, USHORT& nFlags, + String& rExternDocName, String& rStartTabName, String& rEndTabName, sal_uInt16& nFlags, bool bOnlyAcceptSingle, const ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks = NULL ); - SC_DLLPUBLIC void Format( String&, USHORT = 0, ScDocument* = NULL, + SC_DLLPUBLIC void Format( String&, sal_uInt16 = 0, ScDocument* = NULL, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ) const; inline void GetVars( SCCOL& nCol1, SCROW& nRow1, SCTAB& nTab1, @@ -655,8 +655,8 @@ public: { aRange[0] = r1; aRange[1] = r2; } inline ScRangePair& operator= ( const ScRangePair& r ); - const ScRange& GetRange( USHORT n ) const { return aRange[n]; } - ScRange& GetRange( USHORT n ) { return aRange[n]; } + const ScRange& GetRange( sal_uInt16 n ) const { return aRange[n]; } + ScRange& GetRange( sal_uInt16 n ) { return aRange[n]; } inline int operator==( const ScRangePair& ) const; inline int operator!=( const ScRangePair& ) const; }; diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx index 9cb402a03764..e5fee96e5298 100644 --- a/sc/inc/afmtuno.hxx +++ b/sc/inc/afmtuno.hxx @@ -67,7 +67,7 @@ class ScAutoFormatsObj : public ::cppu::WeakImplHelper4< ::com::sun::star::lang::XServiceInfo > { private: - ScAutoFormatObj* GetObjectByIndex_Impl(USHORT nIndex); + ScAutoFormatObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); ScAutoFormatObj* GetObjectByName_Impl(const ::rtl::OUString& aName); public: @@ -144,19 +144,19 @@ class ScAutoFormatObj : public ::cppu::WeakImplHelper6< { private: SfxItemPropertySet aPropSet; - USHORT nFormatIndex; + sal_uInt16 nFormatIndex; - ScAutoFormatFieldObj* GetObjectByIndex_Impl(USHORT nIndex); + ScAutoFormatFieldObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); public: - ScAutoFormatObj(USHORT nIndex); + ScAutoFormatObj(sal_uInt16 nIndex); virtual ~ScAutoFormatObj(); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); // per getImplementation gerufen: sal_Bool IsInserted() const { return nFormatIndex != SC_AFMTOBJ_INVALID; } - void InitFormat( USHORT nNewIndex ); + void InitFormat( sal_uInt16 nNewIndex ); // XIndexAccess virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); @@ -246,11 +246,11 @@ class ScAutoFormatFieldObj : public ::cppu::WeakImplHelper2< { private: SfxItemPropertySet aPropSet; - USHORT nFormatIndex; - USHORT nFieldIndex; + sal_uInt16 nFormatIndex; + sal_uInt16 nFieldIndex; public: - ScAutoFormatFieldObj(USHORT nFormat, USHORT nField); + ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField); virtual ~ScAutoFormatFieldObj(); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx index 91fc43fc249a..04ac629cde92 100644 --- a/sc/inc/appoptio.hxx +++ b/sc/inc/appoptio.hxx @@ -46,22 +46,22 @@ public: void SetAppMetric( FieldUnit eUnit ) { eMetric = eUnit; } FieldUnit GetAppMetric() const { return eMetric; } - void SetZoom( USHORT nNew ) { nZoom = nNew; } - USHORT GetZoom() const { return nZoom; } + void SetZoom( sal_uInt16 nNew ) { nZoom = nNew; } + sal_uInt16 GetZoom() const { return nZoom; } void SetZoomType( SvxZoomType eNew ) { eZoomType = eNew; } SvxZoomType GetZoomType() const { return eZoomType; } - void SetSynchronizeZoom( BOOL bNew ) { bSynchronizeZoom = bNew; } - BOOL GetSynchronizeZoom() const { return bSynchronizeZoom; } - USHORT GetLRUFuncListCount() const { return nLRUFuncCount; } - USHORT* GetLRUFuncList() const { return pLRUList; } - void SetLRUFuncList( const USHORT* pList, - const USHORT nCount ); - void SetStatusFunc( USHORT nNew ) { nStatusFunc = nNew; } - USHORT GetStatusFunc() const { return nStatusFunc; } - void SetAutoComplete( BOOL bNew ) { bAutoComplete = bNew; } - BOOL GetAutoComplete() const { return bAutoComplete; } - void SetDetectiveAuto( BOOL bNew ) { bDetectiveAuto = bNew; } - BOOL GetDetectiveAuto() const { return bDetectiveAuto; } + void SetSynchronizeZoom( sal_Bool bNew ) { bSynchronizeZoom = bNew; } + sal_Bool GetSynchronizeZoom() const { return bSynchronizeZoom; } + sal_uInt16 GetLRUFuncListCount() const { return nLRUFuncCount; } + sal_uInt16* GetLRUFuncList() const { return pLRUList; } + void SetLRUFuncList( const sal_uInt16* pList, + const sal_uInt16 nCount ); + void SetStatusFunc( sal_uInt16 nNew ) { nStatusFunc = nNew; } + sal_uInt16 GetStatusFunc() const { return nStatusFunc; } + void SetAutoComplete( sal_Bool bNew ) { bAutoComplete = bNew; } + sal_Bool GetAutoComplete() const { return bAutoComplete; } + void SetDetectiveAuto( sal_Bool bNew ) { bDetectiveAuto = bNew; } + sal_Bool GetDetectiveAuto() const { return bDetectiveAuto; } void SetTrackContentColor(sal_uInt32 nNew) { nTrackContentColor = nNew; } sal_uInt32 GetTrackContentColor() const { return nTrackContentColor; } @@ -75,35 +75,35 @@ public: ScLkUpdMode GetLinkMode() const { return eLinkMode ;} void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;} - void SetDefaultObjectSizeWidth(INT32 nNew) { nDefaultObjectSizeWidth = nNew; } - INT32 GetDefaultObjectSizeWidth() const { return nDefaultObjectSizeWidth; } - void SetDefaultObjectSizeHeight(INT32 nNew) { nDefaultObjectSizeHeight = nNew; } - INT32 GetDefaultObjectSizeHeight() const { return nDefaultObjectSizeHeight; } + void SetDefaultObjectSizeWidth(sal_Int32 nNew) { nDefaultObjectSizeWidth = nNew; } + sal_Int32 GetDefaultObjectSizeWidth() const { return nDefaultObjectSizeWidth; } + void SetDefaultObjectSizeHeight(sal_Int32 nNew) { nDefaultObjectSizeHeight = nNew; } + sal_Int32 GetDefaultObjectSizeHeight() const { return nDefaultObjectSizeHeight; } - void SetShowSharedDocumentWarning( BOOL bNew ) { mbShowSharedDocumentWarning = bNew; } - BOOL GetShowSharedDocumentWarning() const { return mbShowSharedDocumentWarning; } + void SetShowSharedDocumentWarning( sal_Bool bNew ) { mbShowSharedDocumentWarning = bNew; } + sal_Bool GetShowSharedDocumentWarning() const { return mbShowSharedDocumentWarning; } const ScAppOptions& operator= ( const ScAppOptions& rOpt ); private: FieldUnit eMetric; - USHORT nLRUFuncCount; - USHORT* pLRUList; + sal_uInt16 nLRUFuncCount; + sal_uInt16* pLRUList; SvxZoomType eZoomType; - USHORT nZoom; - BOOL bSynchronizeZoom; - USHORT nStatusFunc; - BOOL bAutoComplete; - BOOL bDetectiveAuto; + sal_uInt16 nZoom; + sal_Bool bSynchronizeZoom; + sal_uInt16 nStatusFunc; + sal_Bool bAutoComplete; + sal_Bool bDetectiveAuto; sal_uInt32 nTrackContentColor; sal_uInt32 nTrackInsertColor; sal_uInt32 nTrackDeleteColor; sal_uInt32 nTrackMoveColor; ScLkUpdMode eLinkMode; - INT32 nDefaultObjectSizeWidth; - INT32 nDefaultObjectSizeHeight; - BOOL mbShowSharedDocumentWarning; + sal_Int32 nDefaultObjectSizeWidth; + sal_Int32 nDefaultObjectSizeHeight; + sal_Bool mbShowSharedDocumentWarning; }; diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx index 46ce98709df1..77053b48bde0 100644 --- a/sc/inc/arealink.hxx +++ b/sc/inc/arealink.hxx @@ -48,17 +48,17 @@ private: String aOptions; String aSourceArea; ScRange aDestArea; - BOOL bAddUndo; - BOOL bInCreate; - BOOL bDoInsert; // wird fuer das erste Update auf FALSE gesetzt + sal_Bool bAddUndo; + sal_Bool bInCreate; + sal_Bool bDoInsert; // wird fuer das erste Update auf sal_False gesetzt - BOOL FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName ); + sal_Bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName ); public: TYPEINFO(); ScAreaLink( SfxObjectShell* pShell, const String& rFile, const String& rFilter, const String& rOpt, - const String& rArea, const ScRange& rDest, ULONG nRefresh ); + const String& rArea, const ScRange& rDest, sal_uLong nRefresh ); virtual ~ScAreaLink(); virtual void Closed(); @@ -67,16 +67,16 @@ public: virtual void Edit( Window*, const Link& rEndEditHdl ); - BOOL Refresh( const String& rNewFile, const String& rNewFilter, - const String& rNewArea, ULONG nNewRefresh ); + sal_Bool Refresh( const String& rNewFile, const String& rNewFilter, + const String& rNewArea, sal_uLong nNewRefresh ); - void SetInCreate(BOOL bSet) { bInCreate = bSet; } - void SetDoInsert(BOOL bSet) { bDoInsert = bSet; } + void SetInCreate(sal_Bool bSet) { bInCreate = bSet; } + void SetDoInsert(sal_Bool bSet) { bDoInsert = bSet; } void SetDestArea(const ScRange& rNew); void SetSource(const String& rDoc, const String& rFlt, const String& rOpt, const String& rArea); - BOOL IsEqual( const String& rFile, const String& rFilter, const String& rOpt, + sal_Bool IsEqual( const String& rFile, const String& rFilter, const String& rOpt, const String& rSource, const ScRange& rDest ) const; const String& GetFile() const { return aFileName; } diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx index 11b21bab0162..3e7b31258c38 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -52,12 +52,12 @@ class SvxBoxInfoItem; struct ScLineFlags { - BYTE nLeft; - BYTE nRight; - BYTE nTop; - BYTE nBottom; - BYTE nHori; - BYTE nVert; + sal_uInt8 nLeft; + sal_uInt8 nRight; + sal_uInt8 nTop; + sal_uInt8 nBottom; + sal_uInt8 nHori; + sal_uInt8 nVert; ScLineFlags() : nLeft(SC_LINE_EMPTY),nRight(SC_LINE_EMPTY),nTop(SC_LINE_EMPTY), nBottom(SC_LINE_EMPTY),nHori(SC_LINE_EMPTY),nVert(SC_LINE_EMPTY) {} @@ -94,13 +94,13 @@ friend class ScDocument; // fuer FillInfo friend class ScDocumentIterator; friend class ScAttrIterator; friend class ScHorizontalAttrIterator; -friend void lcl_IterGetNumberFormat( ULONG& nFormat, +friend void lcl_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rpArr, SCROW& nAttrEndRow, const ScAttrArray* pNewArr, SCROW nRow, ScDocument* pDoc ); - BOOL ApplyFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner, + sal_Bool ApplyFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner, SCROW nStartRow, SCROW nEndRow, - BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom ); + sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom ); public: ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc ); @@ -111,79 +111,79 @@ public: #ifdef DBG_UTIL void TestData() const; #endif - void Reset( const ScPatternAttr* pPattern, BOOL bAlloc = TRUE ); - BOOL Concat(SCSIZE nPos); + void Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc = sal_True ); + sal_Bool Concat(SCSIZE nPos); const ScPatternAttr* GetPattern( SCROW nRow ) const; const ScPatternAttr* GetPatternRange( SCROW& rStartRow, SCROW& rEndRow, SCROW nRow ) const; - void MergePatternArea( SCROW nStartRow, SCROW nEndRow, ScMergePatternState& rState, BOOL bDeep ) const; + void MergePatternArea( SCROW nStartRow, SCROW nEndRow, ScMergePatternState& rState, sal_Bool bDeep ) const; void 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; void ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner, - SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ); + SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ); - void SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bPutToPool = FALSE ); - void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern, BOOL bPutToPool = FALSE); + void SetPattern( SCROW nRow, const ScPatternAttr* pPattern, sal_Bool bPutToPool = sal_False ); + void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern, sal_Bool bPutToPool = sal_False); void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle ); void ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache ); void ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow, - const SvxBorderLine* pLine, BOOL bColorOnly ); + const SvxBorderLine* pLine, sal_Bool bColorOnly ); - void ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich ); - void ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement ); + void ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich ); + void ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrement ); /// Including current, may return -1 - SCsROW GetNextUnprotected( SCsROW nRow, BOOL bUp ) const; + SCsROW GetNextUnprotected( SCsROW nRow, sal_Bool bUp ) const; /// May return -1 if not found SCsROW SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle, - BOOL bUp, ScMarkArray* pMarkArray = NULL ); - BOOL SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, - BOOL bUp, ScMarkArray* pMarkArray = NULL ); + sal_Bool bUp, ScMarkArray* pMarkArray = NULL ); + sal_Bool SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, + sal_Bool bUp, ScMarkArray* pMarkArray = NULL ); - BOOL ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags ); - BOOL RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags ); + sal_Bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ); + sal_Bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ); - BOOL Search( SCROW nRow, SCSIZE& nIndex ) const; + sal_Bool Search( SCROW nRow, SCSIZE& nIndex ) const; - BOOL HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, - BOOL bLeft, BOOL bRight ) const; - bool HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const; - BOOL ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, + sal_Bool HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, + sal_Bool bLeft, sal_Bool bRight ) const; + bool HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const; + sal_Bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL& rPaintCol, SCROW& rPaintRow, - BOOL bRefresh, BOOL bAttrs ); - BOOL RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow ); + sal_Bool bRefresh, sal_Bool bAttrs ); + sal_Bool RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow ); void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset ); - BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const; + sal_Bool IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const; void DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow); void SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow, - const ScPatternAttr* pWantedPattern, BOOL bDefault ); + const ScPatternAttr* pWantedPattern, sal_Bool bDefault ); void CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray ); - BOOL IsEmpty() const; + sal_Bool IsEmpty() const; //UNUSED2008-05 SCROW GetFirstEntryPos() const; -//UNUSED2008-05 SCROW GetLastEntryPos( BOOL bIncludeBottom ) const; +//UNUSED2008-05 SCROW GetLastEntryPos( sal_Bool bIncludeBottom ) const; - BOOL GetFirstVisibleAttr( SCROW& rFirstRow ) const; - BOOL GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const; - BOOL HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const; - BOOL IsVisibleEqual( const ScAttrArray& rOther, + sal_Bool GetFirstVisibleAttr( SCROW& rFirstRow ) const; + sal_Bool GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const; + sal_Bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const; + sal_Bool IsVisibleEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const; - BOOL IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const; + sal_Bool IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const; - BOOL TestInsertCol( SCROW nStartRow, SCROW nEndRow) const; - BOOL TestInsertRow( SCSIZE nSize ) const; + sal_Bool TestInsertCol( SCROW nStartRow, SCROW nEndRow) const; + sal_Bool TestInsertRow( SCSIZE nSize ) const; void InsertRow( SCROW nStartRow, SCSIZE nSize ); void DeleteRow( SCROW nStartRow, SCSIZE nSize ); void DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex ); void DeleteArea( SCROW nStartRow, SCROW nEndRow ); void MoveTo( SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray ); void CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray, - INT16 nStripFlags = 0 ); + sal_Int16 nStripFlags = 0 ); void DeleteHardAttr( SCROW nStartRow, SCROW nEndRow ); diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index 96a0529c48a1..d72c41037ae2 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -54,7 +54,7 @@ class EditTextObject; class SvxBorderLine; -BOOL SC_DLLPUBLIC ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther ); +sal_Bool SC_DLLPUBLIC ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther ); //------------------------------------------------------------------------ @@ -73,12 +73,12 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; SCsCOL GetColMerge() const {return nColMerge; } SCsROW GetRowMerge() const {return nRowMerge; } - BOOL IsMerged() const { return nColMerge>1 || nRowMerge>1; } + sal_Bool IsMerged() const { return nColMerge>1 || nRowMerge>1; } inline ScMergeAttr& operator=(const ScMergeAttr& rMerge) { @@ -94,34 +94,34 @@ class SC_DLLPUBLIC ScMergeFlagAttr: public SfxInt16Item { public: ScMergeFlagAttr(); - ScMergeFlagAttr(INT16 nFlags); + ScMergeFlagAttr(sal_Int16 nFlags); ~ScMergeFlagAttr(); - BOOL IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; } - BOOL IsVerOverlapped() const { return ( GetValue() & SC_MF_VER ) != 0; } - BOOL IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; } + sal_Bool IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; } + sal_Bool IsVerOverlapped() const { return ( GetValue() & SC_MF_VER ) != 0; } + sal_Bool IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; } - BOOL HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; } - BOOL HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; } + sal_Bool HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; } + sal_Bool HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; } bool HasDPTable() const { return ( GetValue() & SC_MF_DP_TABLE ) != 0; } - BOOL IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; } + sal_Bool IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; } }; //------------------------------------------------------------------------ class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem { - BOOL bProtection; // Zelle schuetzen - BOOL bHideFormula; // Formel nicht Anzeigen - BOOL bHideCell; // Zelle nicht Anzeigen - BOOL bHidePrint; // Zelle nicht Ausdrucken + sal_Bool bProtection; // Zelle schuetzen + sal_Bool bHideFormula; // Formel nicht Anzeigen + sal_Bool bHideCell; // Zelle nicht Anzeigen + sal_Bool bHidePrint; // Zelle nicht Ausdrucken public: TYPEINFO(); ScProtectionAttr(); - ScProtectionAttr( BOOL bProtect, - BOOL bHFormula = FALSE, - BOOL bHCell = FALSE, - BOOL bHPrint = FALSE); + ScProtectionAttr( sal_Bool bProtect, + sal_Bool bHFormula = sal_False, + sal_Bool bHCell = sal_False, + sal_Bool bHPrint = sal_False); ScProtectionAttr( const ScProtectionAttr& ); ~ScProtectionAttr(); @@ -135,19 +135,19 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; - - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - - BOOL GetProtection() const { return bProtection; } - BOOL SetProtection( BOOL bProtect); - BOOL GetHideFormula() const { return bHideFormula; } - BOOL SetHideFormula( BOOL bHFormula); - BOOL GetHideCell() const { return bHideCell; } - BOOL SetHideCell( BOOL bHCell); - BOOL GetHidePrint() const { return bHidePrint; } - BOOL SetHidePrint( BOOL bHPrint); + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + + sal_Bool GetProtection() const { return bProtection; } + sal_Bool SetProtection( sal_Bool bProtect); + sal_Bool GetHideFormula() const { return bHideFormula; } + sal_Bool SetHideFormula( sal_Bool bHFormula); + sal_Bool GetHideCell() const { return bHideCell; } + sal_Bool SetHideCell( sal_Bool bHCell); + sal_Bool GetHidePrint() const { return bHidePrint; } + sal_Bool SetHidePrint( sal_Bool bHPrint); inline ScProtectionAttr& operator=(const ScProtectionAttr& rProtection) { bProtection = rProtection.bProtection; @@ -171,10 +171,10 @@ class ScRangeItem : public SfxPoolItem public: TYPEINFO(); - inline ScRangeItem( const USHORT nWhich ); - inline ScRangeItem( const USHORT nWhich, + inline ScRangeItem( const sal_uInt16 nWhich ); + inline ScRangeItem( const sal_uInt16 nWhich, const ScRange& rRange, - const USHORT nNewFlags = 0 ); + const sal_uInt16 nNewFlags = 0 ); inline ScRangeItem( const ScRangeItem& rCpy ); inline ScRangeItem& operator=( const ScRangeItem &rCpy ); @@ -191,22 +191,22 @@ public: const ScRange& GetRange() const { return aRange; } void SetRange( const ScRange& rNew ) { aRange = rNew; } - USHORT GetFlags() const { return nFlags; } - void SetFlags( USHORT nNew ) { nFlags = nNew; } + sal_uInt16 GetFlags() const { return nFlags; } + void SetFlags( sal_uInt16 nNew ) { nFlags = nNew; } private: ScRange aRange; - USHORT nFlags; + sal_uInt16 nFlags; }; -inline ScRangeItem::ScRangeItem( const USHORT nWhichP ) +inline ScRangeItem::ScRangeItem( const sal_uInt16 nWhichP ) : SfxPoolItem( nWhichP ), nFlags( SCR_INVALID ) // == ungueltige Area { } -inline ScRangeItem::ScRangeItem( const USHORT nWhichP, +inline ScRangeItem::ScRangeItem( const sal_uInt16 nWhichP, const ScRange& rRange, - const USHORT nNew ) + const sal_uInt16 nNew ) : SfxPoolItem( nWhichP ), aRange( rRange ), nFlags( nNew ) { } @@ -229,9 +229,9 @@ class ScTableListItem : public SfxPoolItem public: TYPEINFO(); - inline ScTableListItem( const USHORT nWhich ); + inline ScTableListItem( const sal_uInt16 nWhich ); ScTableListItem( const ScTableListItem& rCpy ); -//UNUSED2008-05 ScTableListItem( const USHORT nWhich, const List& rList ); +//UNUSED2008-05 ScTableListItem( const sal_uInt16 nWhich, const List& rList ); ~ScTableListItem(); ScTableListItem& operator=( const ScTableListItem &rCpy ); @@ -245,15 +245,15 @@ public: const IntlWrapper* pIntl = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -//UNUSED2009-05 BOOL GetTableList( List& aList ) const; +//UNUSED2009-05 sal_Bool GetTableList( List& aList ) const; //UNUSED2009-05 void SetTableList( const List& aList ); public: - USHORT nCount; + sal_uInt16 nCount; SCTAB* pTabArr; }; -inline ScTableListItem::ScTableListItem( const USHORT nWhichP ) +inline ScTableListItem::ScTableListItem( const sal_uInt16 nWhichP ) : SfxPoolItem(nWhichP), nCount(0), pTabArr(NULL) {} @@ -272,7 +272,7 @@ class SC_DLLPUBLIC ScPageHFItem : public SfxPoolItem public: TYPEINFO(); - ScPageHFItem( USHORT nWhich ); + ScPageHFItem( sal_uInt16 nWhich ); ScPageHFItem( const ScPageHFItem& rItem ); ~ScPageHFItem(); @@ -280,10 +280,10 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); const EditTextObject* GetLeftArea() const { return pLeftArea; } const EditTextObject* GetCenterArea() const { return pCenterArea; } @@ -306,15 +306,15 @@ class SC_DLLPUBLIC ScViewObjectModeItem: public SfxEnumItem public: TYPEINFO(); - ScViewObjectModeItem( USHORT nWhich ); - ScViewObjectModeItem( USHORT nWhich, ScVObjMode eMode ); + ScViewObjectModeItem( sal_uInt16 nWhich ); + ScViewObjectModeItem( sal_uInt16 nWhich, ScVObjMode eMode ); ~ScViewObjectModeItem(); - virtual USHORT GetValueCount() const; - virtual String GetValueText( USHORT nVal ) const; + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueText( sal_uInt16 nVal ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, @@ -329,7 +329,7 @@ class ScDoubleItem : public SfxPoolItem { public: TYPEINFO(); - ScDoubleItem( USHORT nWhich, double nVal=0 ); + ScDoubleItem( sal_uInt16 nWhich, double nVal=0 ); ScDoubleItem( const ScDoubleItem& rItem ); ~ScDoubleItem(); @@ -337,7 +337,7 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; double GetValue() const { return nValue; } @@ -351,9 +351,9 @@ private: // ============================================================================ /** Member ID for "page scale to width" value in QueryValue() and PutValue(). */ -const BYTE SC_MID_PAGE_SCALETO_WIDTH = 1; +const sal_uInt8 SC_MID_PAGE_SCALETO_WIDTH = 1; /** Member ID for "page scale to height" value in QueryValue() and PutValue(). */ -const BYTE SC_MID_PAGE_SCALETO_HEIGHT = 2; +const sal_uInt8 SC_MID_PAGE_SCALETO_HEIGHT = 2; /** Contains the "scale to width/height" attribute in page styles. */ @@ -388,8 +388,8 @@ public: XubString& rText, const IntlWrapper* = 0 ) const; - virtual BOOL QueryValue( ::com::sun::star::uno::Any& rAny, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( ::com::sun::star::uno::Any& rAny, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const ::com::sun::star::uno::Any& rAny, sal_uInt8 nMemberId = 0 ); private: sal_uInt16 mnWidth; diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx index 094f618fbc7c..384293e9b7d4 100644 --- a/sc/inc/autoform.hxx +++ b/sc/inc/autoform.hxx @@ -187,11 +187,11 @@ public: void SetRotateAngle( const SfxInt32Item& rRotateAngle ) { aRotateAngle.SetValue( rRotateAngle.GetValue() ); } void SetRotateMode( const SvxRotateModeItem& rRotateMode ) { aRotateMode.SetValue( rRotateMode.GetValue() ); } - BOOL Load( SvStream& rStream, const ScAfVersions& rVersions, USHORT nVer ); - BOOL Save( SvStream& rStream ); + sal_Bool Load( SvStream& rStream, const ScAfVersions& rVersions, sal_uInt16 nVer ); + sal_Bool Save( SvStream& rStream ); #ifdef READ_OLDVERS - BOOL LoadOld( SvStream& rStream, const ScAfVersions& rVersions ); + sal_Bool LoadOld( SvStream& rStream, const ScAfVersions& rVersions ); #endif }; @@ -200,21 +200,21 @@ class SC_DLLPUBLIC ScAutoFormatData : public ScDataObject { private: String aName; - USHORT nStrResId; + sal_uInt16 nStrResId; // common flags of Calc and Writer - BOOL bIncludeFont : 1; - BOOL bIncludeJustify : 1; - BOOL bIncludeFrame : 1; - BOOL bIncludeBackground : 1; + sal_Bool bIncludeFont : 1; + sal_Bool bIncludeJustify : 1; + sal_Bool bIncludeFrame : 1; + sal_Bool bIncludeBackground : 1; // Calc specific flags - BOOL bIncludeValueFormat : 1; - BOOL bIncludeWidthHeight : 1; + sal_Bool bIncludeValueFormat : 1; + sal_Bool bIncludeWidthHeight : 1; ScAutoFormatDataField** ppDataField; - SC_DLLPRIVATE ScAutoFormatDataField& GetField( USHORT nIndex ); - SC_DLLPRIVATE const ScAutoFormatDataField& GetField( USHORT nIndex ) const; + SC_DLLPRIVATE ScAutoFormatDataField& GetField( sal_uInt16 nIndex ); + SC_DLLPRIVATE const ScAutoFormatDataField& GetField( sal_uInt16 nIndex ) const; public: ScAutoFormatData(); @@ -226,56 +226,56 @@ public: void SetName( const String& rName ) { aName = rName; nStrResId = USHRT_MAX; } void GetName( String& rName ) const { rName = aName; } - BOOL GetIncludeValueFormat() const { return bIncludeValueFormat; } - BOOL GetIncludeFont() const { return bIncludeFont; } - BOOL GetIncludeJustify() const { return bIncludeJustify; } - BOOL GetIncludeFrame() const { return bIncludeFrame; } - BOOL GetIncludeBackground() const { return bIncludeBackground; } - BOOL GetIncludeWidthHeight() const { return bIncludeWidthHeight; } + sal_Bool GetIncludeValueFormat() const { return bIncludeValueFormat; } + sal_Bool GetIncludeFont() const { return bIncludeFont; } + sal_Bool GetIncludeJustify() const { return bIncludeJustify; } + sal_Bool GetIncludeFrame() const { return bIncludeFrame; } + sal_Bool GetIncludeBackground() const { return bIncludeBackground; } + sal_Bool GetIncludeWidthHeight() const { return bIncludeWidthHeight; } - void SetIncludeValueFormat( BOOL bValueFormat ) { bIncludeValueFormat = bValueFormat; } - void SetIncludeFont( BOOL bFont ) { bIncludeFont = bFont; } - void SetIncludeJustify( BOOL bJustify ) { bIncludeJustify = bJustify; } - void SetIncludeFrame( BOOL bFrame ) { bIncludeFrame = bFrame; } - void SetIncludeBackground( BOOL bBackground ) { bIncludeBackground = bBackground; } - void SetIncludeWidthHeight( BOOL bWidthHeight ) { bIncludeWidthHeight = bWidthHeight; } + void SetIncludeValueFormat( sal_Bool bValueFormat ) { bIncludeValueFormat = bValueFormat; } + void SetIncludeFont( sal_Bool bFont ) { bIncludeFont = bFont; } + void SetIncludeJustify( sal_Bool bJustify ) { bIncludeJustify = bJustify; } + void SetIncludeFrame( sal_Bool bFrame ) { bIncludeFrame = bFrame; } + void SetIncludeBackground( sal_Bool bBackground ) { bIncludeBackground = bBackground; } + void SetIncludeWidthHeight( sal_Bool bWidthHeight ) { bIncludeWidthHeight = bWidthHeight; } - const SfxPoolItem* GetItem( USHORT nIndex, USHORT nWhich ) const; - void PutItem( USHORT nIndex, const SfxPoolItem& rItem ); - void CopyItem( USHORT nToIndex, USHORT nFromIndex, USHORT nWhich ); + const SfxPoolItem* GetItem( sal_uInt16 nIndex, sal_uInt16 nWhich ) const; + void PutItem( sal_uInt16 nIndex, const SfxPoolItem& rItem ); + void CopyItem( sal_uInt16 nToIndex, sal_uInt16 nFromIndex, sal_uInt16 nWhich ); - const ScNumFormatAbbrev& GetNumFormat( USHORT nIndex ) const; + const ScNumFormatAbbrev& GetNumFormat( sal_uInt16 nIndex ) const; - BOOL IsEqualData( USHORT nIndex1, USHORT nIndex2 ) const; + sal_Bool IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const; - void FillToItemSet( USHORT nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const; - void GetFromItemSet( USHORT nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat ); + void FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const; + void GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat ); - BOOL Load( SvStream& rStream, const ScAfVersions& rVersions ); - BOOL Save( SvStream& rStream ); + sal_Bool Load( SvStream& rStream, const ScAfVersions& rVersions ); + sal_Bool Save( SvStream& rStream ); #ifdef READ_OLDVERS - BOOL LoadOld( SvStream& rStream, const ScAfVersions& rVersions ); + sal_Bool LoadOld( SvStream& rStream, const ScAfVersions& rVersions ); #endif }; class SC_DLLPUBLIC ScAutoFormat : public ScSortedCollection { private: - BOOL bSaveLater; + sal_Bool bSaveLater; public: - ScAutoFormat( USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE ); + ScAutoFormat( sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False ); ScAutoFormat( const ScAutoFormat& AutoFormat ); virtual ~ScAutoFormat(); virtual ScDataObject* Clone() const { return new ScAutoFormat( *this ); } - ScAutoFormatData* operator[]( const USHORT nIndex ) const {return (ScAutoFormatData*)At( nIndex );} + ScAutoFormatData* operator[]( const sal_uInt16 nIndex ) const {return (ScAutoFormatData*)At( nIndex );} virtual short Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const; - BOOL Load(); - BOOL Save(); - USHORT FindIndexPerName( const String& rName ) const; - void SetSaveLater( BOOL bSet ); - BOOL IsSaveLater() const { return bSaveLater; } + sal_Bool Load(); + sal_Bool Save(); + sal_uInt16 FindIndexPerName( const String& rName ) const; + void SetSaveLater( sal_Bool bSet ); + sal_Bool IsSaveLater() const { return bSaveLater; } }; diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx index d5a066d522cc..7f0ee1934afb 100644 --- a/sc/inc/bigrange.hxx +++ b/sc/inc/bigrange.hxx @@ -33,43 +33,43 @@ #include "document.hxx" -static const INT32 nInt32Min = 0x80000000; -static const INT32 nInt32Max = 0x7fffffff; +static const sal_Int32 nInt32Min = 0x80000000; +static const sal_Int32 nInt32Max = 0x7fffffff; class ScBigAddress { - INT32 nRow; - INT32 nCol; - INT32 nTab; + sal_Int32 nRow; + sal_Int32 nCol; + sal_Int32 nTab; public: ScBigAddress() : nRow(0), nCol(0), nTab(0) {} - ScBigAddress( INT32 nColP, INT32 nRowP, INT32 nTabP ) + ScBigAddress( sal_Int32 nColP, sal_Int32 nRowP, sal_Int32 nTabP ) : nRow( nRowP ), nCol( nColP ), nTab( nTabP ) {} ScBigAddress( const ScBigAddress& r ) : nRow( r.nRow ), nCol( r.nCol ), nTab( r.nTab ) {} ScBigAddress( const ScAddress& r ) : nRow( r.Row() ), nCol( r.Col() ), nTab( r.Tab() ) {} - INT32 Col() const { return nCol; } - INT32 Row() const { return nRow; } - INT32 Tab() const { return nTab; } + sal_Int32 Col() const { return nCol; } + sal_Int32 Row() const { return nRow; } + sal_Int32 Tab() const { return nTab; } - void Set( INT32 nColP, INT32 nRowP, INT32 nTabP ) + void Set( sal_Int32 nColP, sal_Int32 nRowP, sal_Int32 nTabP ) { nCol = nColP; nRow = nRowP; nTab = nTabP; } - void SetCol( INT32 nColP ) { nCol = nColP; } - void SetRow( INT32 nRowP ) { nRow = nRowP; } - void SetTab( INT32 nTabP ) { nTab = nTabP; } - void IncCol( INT32 n = 1 ) { nCol += n; } - void IncRow( INT32 n = 1 ) { nRow += n; } - void IncTab( INT32 n = 1 ) { nTab += n; } - - void GetVars( INT32& nColP, INT32& nRowP, INT32& nTabP ) const + void SetCol( sal_Int32 nColP ) { nCol = nColP; } + void SetRow( sal_Int32 nRowP ) { nRow = nRowP; } + void SetTab( sal_Int32 nTabP ) { nTab = nTabP; } + void IncCol( sal_Int32 n = 1 ) { nCol += n; } + void IncRow( sal_Int32 n = 1 ) { nRow += n; } + void IncTab( sal_Int32 n = 1 ) { nTab += n; } + + void GetVars( sal_Int32& nColP, sal_Int32& nRowP, sal_Int32& nTabP ) const { nColP = nCol; nRowP = nRow; nTabP = nTab; } inline void PutInOrder( ScBigAddress& r ); - inline BOOL IsValid( const ScDocument* ) const; + inline sal_Bool IsValid( const ScDocument* ) const; inline ScAddress MakeAddress() const; ScBigAddress& operator=( const ScBigAddress& r ) @@ -88,7 +88,7 @@ public: inline void ScBigAddress::PutInOrder( ScBigAddress& r ) { - INT32 nTmp; + sal_Int32 nTmp; if ( r.nCol < nCol ) { nTmp = r.nCol; @@ -110,7 +110,7 @@ inline void ScBigAddress::PutInOrder( ScBigAddress& r ) } -inline BOOL ScBigAddress::IsValid( const ScDocument* pDoc ) const +inline sal_Bool ScBigAddress::IsValid( const ScDocument* pDoc ) const { //! Min/Max sind ok, kennzeichnen ganze Col/Row/Tab return ((0 <= nCol && nCol <= MAXCOL) @@ -186,32 +186,32 @@ public: : aStart( r ), aEnd( r ) {} ScBigRange( const ScAddress& r ) : aStart( r ), aEnd( r ) {} - ScBigRange( INT32 nCol, INT32 nRow, INT32 nTab ) + ScBigRange( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nTab ) : aStart( nCol, nRow, nTab ), aEnd( aStart ) {} - ScBigRange( INT32 nCol1, INT32 nRow1, INT32 nTab1, - INT32 nCol2, INT32 nRow2, INT32 nTab2 ) + ScBigRange( sal_Int32 nCol1, sal_Int32 nRow1, sal_Int32 nTab1, + sal_Int32 nCol2, sal_Int32 nRow2, sal_Int32 nTab2 ) : aStart( nCol1, nRow1, nTab1 ), aEnd( nCol2, nRow2, nTab2 ) {} - void Set( INT32 nCol1, INT32 nRow1, INT32 nTab1, - INT32 nCol2, INT32 nRow2, INT32 nTab2 ) + void Set( sal_Int32 nCol1, sal_Int32 nRow1, sal_Int32 nTab1, + sal_Int32 nCol2, sal_Int32 nRow2, sal_Int32 nTab2 ) { aStart.Set( nCol1, nRow1, nTab1 ); aEnd.Set( nCol2, nRow2, nTab2 ); } - void GetVars( INT32& nCol1, INT32& nRow1, INT32& nTab1, - INT32& nCol2, INT32& nRow2, INT32& nTab2 ) const + void GetVars( sal_Int32& nCol1, sal_Int32& nRow1, sal_Int32& nTab1, + sal_Int32& nCol2, sal_Int32& nRow2, sal_Int32& nTab2 ) const { aStart.GetVars( nCol1, nRow1, nTab1 ); aEnd.GetVars( nCol2, nRow2, nTab2 ); } - BOOL IsValid( const ScDocument* pDoc ) const + sal_Bool IsValid( const ScDocument* pDoc ) const { return aStart.IsValid( pDoc ) && aEnd.IsValid( pDoc ); } inline ScRange MakeRange() const { return ScRange( aStart.MakeAddress(), aEnd.MakeAddress() ); } - inline BOOL In( const ScBigAddress& ) const; // ist Address& in Range? - inline BOOL In( const ScBigRange& ) const; // ist Range& in Range? - inline BOOL Intersects( const ScBigRange& ) const; // ueberschneiden sich zwei Ranges? + inline sal_Bool In( const ScBigAddress& ) const; // ist Address& in Range? + inline sal_Bool In( const ScBigRange& ) const; // ist Range& in Range? + inline sal_Bool Intersects( const ScBigRange& ) const; // ueberschneiden sich zwei Ranges? ScBigRange& operator=( const ScBigRange& r ) { aStart = r.aStart; aEnd = r.aEnd; return *this; } @@ -225,7 +225,7 @@ public: }; -inline BOOL ScBigRange::In( const ScBigAddress& rAddr ) const +inline sal_Bool ScBigRange::In( const ScBigAddress& rAddr ) const { return aStart.Col() <= rAddr.Col() && rAddr.Col() <= aEnd.Col() && @@ -234,7 +234,7 @@ inline BOOL ScBigRange::In( const ScBigAddress& rAddr ) const } -inline BOOL ScBigRange::In( const ScBigRange& r ) const +inline sal_Bool ScBigRange::In( const ScBigRange& r ) const { return aStart.Col() <= r.aStart.Col() && r.aEnd.Col() <= aEnd.Col() && @@ -243,7 +243,7 @@ inline BOOL ScBigRange::In( const ScBigRange& r ) const } -inline BOOL ScBigRange::Intersects( const ScBigRange& r ) const +inline sal_Bool ScBigRange::Intersects( const ScBigRange& r ) const { return !( Min( aEnd.Col(), r.aEnd.Col() ) < Max( aStart.Col(), r.aStart.Col() ) diff --git a/sc/inc/brdcst.hxx b/sc/inc/brdcst.hxx index cdba4e3a78bb..186d1f918409 100644 --- a/sc/inc/brdcst.hxx +++ b/sc/inc/brdcst.hxx @@ -47,7 +47,7 @@ private: public: TYPEINFO(); - ScHint( ULONG n, const ScAddress& a, ScBaseCell* p ) + ScHint( sal_uLong n, const ScAddress& a, ScBaseCell* p ) : SfxSimpleHint( n ), aAddress( a ), pCell( p ) {} ScBaseCell* GetCell() const { return pCell; } void SetCell( ScBaseCell* p ) { pCell = p; } diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx index 1e78f0a951be..770b3c1f5760 100644 --- a/sc/inc/callform.hxx +++ b/sc/inc/callform.hxx @@ -64,8 +64,8 @@ friend class FuncCollection; const ModuleData* pModuleData; String aInternalName; String aFuncName; - USHORT nNumber; - USHORT nParamCount; + sal_uInt16 nNumber; + sal_uInt16 nParamCount; ParamType eAsyncType; ParamType eParamType[MAXFUNCPARAM]; private: @@ -74,8 +74,8 @@ public: 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); FuncData(const FuncData& rData); @@ -84,17 +84,17 @@ public: const String& GetModuleName() const; const String& GetInternalName() const { return aInternalName; } const String& GetFuncName() const { return aFuncName; } - USHORT GetParamCount() const { return nParamCount; } - ParamType GetParamType(USHORT nIndex) const { return eParamType[nIndex]; } + sal_uInt16 GetParamCount() const { return nParamCount; } + ParamType GetParamType(sal_uInt16 nIndex) const { return eParamType[nIndex]; } ParamType GetReturnType() const { return eParamType[0]; } ParamType GetAsyncType() const { return eAsyncType; } - BOOL Call(void** ppParam); - BOOL Unadvice(double nHandle); + sal_Bool Call(void** ppParam); + sal_Bool Unadvice(double nHandle); // Name und Beschreibung des Parameters nParam. // nParam==0 => Desc := Funktions-Beschreibung, // Name := n/a - BOOL GetParamDesc( String& aName, String& aDesc, USHORT nParam ); + sal_Bool GetParamDesc( String& aName, String& aDesc, sal_uInt16 nParam ); }; @@ -102,17 +102,17 @@ public: class FuncCollection : public ScSortedCollection { public: - FuncCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( nLim, nDel, bDup ) {} + FuncCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False) : ScSortedCollection ( nLim, nDel, bDup ) {} FuncCollection(const FuncCollection& rFuncCollection) : ScSortedCollection ( rFuncCollection ) {} virtual ScDataObject* Clone() const { return new FuncCollection(*this); } - FuncData* operator[]( const USHORT nIndex) const {return (FuncData*)At(nIndex);} + FuncData* operator[]( const sal_uInt16 nIndex) const {return (FuncData*)At(nIndex);} virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - BOOL SearchFunc( const String& rName, USHORT& rIndex ) const; + sal_Bool SearchFunc( const String& rName, sal_uInt16& rIndex ) const; }; -BOOL InitExternalFunc(const rtl::OUString& rModuleName); +sal_Bool InitExternalFunc(const rtl::OUString& rModuleName); void ExitExternalFunc(); #endif diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index ad9ed02a0415..54e767cc0555 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -110,11 +110,11 @@ public: bool IsBlank( bool bIgnoreNotes = false ) const; // fuer Idle-Berechnung - inline USHORT GetTextWidth() const { return nTextWidth; } - inline void SetTextWidth( USHORT nNew ) { nTextWidth = nNew; } + inline sal_uInt16 GetTextWidth() const { return nTextWidth; } + inline void SetTextWidth( sal_uInt16 nNew ) { nTextWidth = nNew; } - inline BYTE GetScriptType() const { return nScriptType; } - inline void SetScriptType( BYTE nNew ) { nScriptType = nNew; } + inline sal_uInt8 GetScriptType() const { return nScriptType; } + inline void SetScriptType( sal_uInt8 nNew ) { nScriptType = nNew; } /** Returns true, if the cell contains a note. */ inline bool HasNote() const { return mpNote != 0; } @@ -150,15 +150,15 @@ public: ScAddress aPos = ScAddress() ); /** Error code if ScFormulaCell, else 0. */ - USHORT GetErrorCode() const; + sal_uInt16 GetErrorCode() const; /** ScFormulaCell with formula::svEmptyCell result, or ScNoteCell (may have been created due to reference to empty cell). */ - BOOL HasEmptyData() const; - BOOL HasValueData() const; - BOOL HasStringData() const; + sal_Bool HasEmptyData() const; + sal_Bool HasValueData() const; + sal_Bool HasStringData() const; String GetStringData() const; // nur echte Strings - static BOOL CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 ); + static sal_Bool CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 ); private: ScBaseCell& operator=( const ScBaseCell& ); @@ -168,9 +168,9 @@ private: SvtBroadcaster* mpBroadcaster; /// Broadcaster for changed values. Cell takes ownership! protected: - USHORT nTextWidth; - BYTE eCellType; // enum CellType - BYTE spart Speicher - BYTE nScriptType; + sal_uInt16 nTextWidth; + sal_uInt8 eCellType; // enum CellType - sal_uInt8 spart Speicher + sal_uInt8 nScriptType; }; // ============================================================================ @@ -298,19 +298,19 @@ private: ScFormulaCell* pNext; ScFormulaCell* pPreviousTrack; ScFormulaCell* pNextTrack; - ULONG nFormatIndex; // Number format set by calculation + sal_uLong nFormatIndex; // Number format set by calculation short nFormatType; // Number format type set by calculation - USHORT nSeenInIteration; // Iteration cycle in which the cell was last encountered - BYTE cMatrixFlag; // One of ScMatrixMode - BOOL bDirty : 1; // Must be (re)calculated - BOOL bChanged : 1; // Whether something changed regarding display/representation - BOOL bRunning : 1; // Already interpreting right now - BOOL bCompile : 1; // Must be (re)compiled - BOOL bSubTotal : 1; // Cell is part of or contains a SubTotal - BOOL bIsIterCell : 1; // Cell is part of a circular reference - BOOL bInChangeTrack : 1; // Cell is in ChangeTrack - BOOL bTableOpDirty : 1; // Dirty flag for TableOp - BOOL bNeedListening : 1; // Listeners need to be re-established after UpdateReference + sal_uInt16 nSeenInIteration; // Iteration cycle in which the cell was last encountered + sal_uInt8 cMatrixFlag; // One of ScMatrixMode + sal_Bool bDirty : 1; // Must be (re)calculated + sal_Bool bChanged : 1; // Whether something changed regarding display/representation + sal_Bool bRunning : 1; // Already interpreting right now + sal_Bool bCompile : 1; // Must be (re)compiled + sal_Bool bSubTotal : 1; // Cell is part of or contains a SubTotal + sal_Bool bIsIterCell : 1; // Cell is part of a circular reference + sal_Bool bInChangeTrack : 1; // Cell is in ChangeTrack + sal_Bool bTableOpDirty : 1; // Dirty flag for TableOp + sal_Bool bNeedListening : 1; // Listeners need to be re-established after UpdateReference enum ScInterpretTailParameter { @@ -336,7 +336,7 @@ public: /** Empty formula cell, or with a preconstructed token array. */ ScFormulaCell( ScDocument*, const ScAddress&, const ScTokenArray* = NULL, const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT, - BYTE = MM_NONE ); + sal_uInt8 = MM_NONE ); /** With formula string and grammar to compile with. formula::FormulaGrammar::GRAM_DEFAULT effectively isformula::FormulaGrammar::GRAM_NATIVE_UI that @@ -345,7 +345,7 @@ public: ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos, const String& rFormula, const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT, - BYTE cMatInd = MM_NONE ); + sal_uInt8 cMatInd = MM_NONE ); ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, const ScAddress& rPos, int nCloneFlags = SC_CLONECELL_DEFAULT ); @@ -355,27 +355,27 @@ public: const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT ) const; void SetDirty(); - inline void SetDirtyVar() { bDirty = TRUE; } + inline void SetDirtyVar() { bDirty = sal_True; } // If setting entire document dirty after load, no broadcasts but still append to FormulaTree. void SetDirtyAfterLoad(); - inline void ResetTableOpDirtyVar() { bTableOpDirty = FALSE; } + inline void ResetTableOpDirtyVar() { bTableOpDirty = sal_False; } void SetTableOpDirty(); - BOOL IsDirtyOrInTableOpDirty() const; - BOOL GetDirty() const { return bDirty; } - BOOL NeedsListening() const { return bNeedListening; } - void SetNeedsListening( BOOL bVar ) { bNeedListening = bVar; } + sal_Bool IsDirtyOrInTableOpDirty() const; + sal_Bool GetDirty() const { return bDirty; } + sal_Bool NeedsListening() const { return bNeedListening; } + void SetNeedsListening( sal_Bool bVar ) { bNeedListening = bVar; } void Compile(const String& rFormula, - BOOL bNoListening = FALSE, + sal_Bool bNoListening = sal_False, const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT ); - void CompileTokenArray( BOOL bNoListening = FALSE ); + void CompileTokenArray( sal_Bool bNoListening = sal_False ); void CompileXML( ScProgress& rProgress ); // compile temporary string tokens void CalcAfterLoad(); bool MarkUsedExternalReferences(); void Interpret(); - inline BOOL IsIterCell() const { return bIsIterCell; } - inline USHORT GetSeenInIteration() const { return nSeenInIteration; } + inline sal_Bool IsIterCell() const { return bIsIterCell; } + inline sal_uInt16 GetSeenInIteration() const { return nSeenInIteration; } - BOOL HasOneReference( ScRange& r ) const; + sal_Bool HasOneReference( ScRange& r ) const; /* Checks if the formula contains reference list that can be expressed by one reference (like A1;A2;A3:A5 -> A1:A5). The reference list is not required to be sorted (i.e. A3;A1;A2 is @@ -385,8 +385,8 @@ public: It is similar to HasOneReference(), but more general. */ bool HasRefListExpressibleAsOneReference(ScRange& rRange) const; - BOOL HasRelNameReference() const; - BOOL HasColRowName() const; + sal_Bool HasRelNameReference() const; + sal_Bool HasColRowName() const; void UpdateReference(UpdateRefMode eUpdateRefMode, const ScRange& r, @@ -402,42 +402,42 @@ public: void UpdateInsertTab(SCTAB nTable); void UpdateInsertTabAbs(SCTAB nTable); - BOOL UpdateDeleteTab(SCTAB nTable, BOOL bIsMove = FALSE); + sal_Bool UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove = sal_False); void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo); void UpdateRenameTab(SCTAB nTable, const String& rName); - BOOL TestTabRefAbs(SCTAB nTable); - void UpdateCompile( BOOL bForceIfNameInUse = FALSE ); - BOOL IsRangeNameInUse(USHORT nIndex) const; - void FindRangeNamesInUse(std::set& rIndexes) const; + sal_Bool TestTabRefAbs(SCTAB nTable); + void UpdateCompile( sal_Bool bForceIfNameInUse = sal_False ); + sal_Bool IsRangeNameInUse(sal_uInt16 nIndex) const; + void FindRangeNamesInUse(std::set& rIndexes) const; void ReplaceRangeNamesInUse( const ScRangeData::IndexMap& rMap ); - BOOL IsSubTotal() const { return bSubTotal; } - BOOL IsChanged() const { return bChanged; } - void ResetChanged() { bChanged = FALSE; } - BOOL IsEmpty(); // formula::svEmptyCell result + sal_Bool IsSubTotal() const { return bSubTotal; } + sal_Bool IsChanged() const { return bChanged; } + void ResetChanged() { bChanged = sal_False; } + sal_Bool IsEmpty(); // formula::svEmptyCell result // display as empty string if formula::svEmptyCell result - BOOL IsEmptyDisplayedAsString(); - BOOL IsValue(); // also TRUE if formula::svEmptyCell + sal_Bool IsEmptyDisplayedAsString(); + sal_Bool IsValue(); // also sal_True if formula::svEmptyCell double GetValue(); double GetValueAlways(); // ignore errors void GetString( String& rString ); const ScMatrix* GetMatrix(); - BOOL GetMatrixOrigin( ScAddress& rPos ) const; + sal_Bool GetMatrixOrigin( ScAddress& rPos ) const; void GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows ); - USHORT GetMatrixEdge( ScAddress& rOrgPos ); - USHORT GetErrCode(); // interpret first if necessary - USHORT GetRawError(); // don't interpret, just return code or result error + sal_uInt16 GetMatrixEdge( ScAddress& rOrgPos ); + sal_uInt16 GetErrCode(); // interpret first if necessary + sal_uInt16 GetRawError(); // don't interpret, just return code or result error short GetFormatType() const { return nFormatType; } - ULONG GetFormatIndex() const { return nFormatIndex; } - void GetFormatInfo( short& nType, ULONG& nIndex ) const + sal_uLong GetFormatIndex() const { return nFormatIndex; } + void GetFormatInfo( short& nType, sal_uLong& nIndex ) const { nType = nFormatType; nIndex = nFormatIndex; } - BYTE GetMatrixFlag() const { return cMatrixFlag; } + sal_uInt8 GetMatrixFlag() const { return cMatrixFlag; } ScTokenArray* GetCode() const { return pCode; } - BOOL IsRunning() const { return bRunning; } - void SetRunning( BOOL bVal ) { bRunning = bVal; } + sal_Bool IsRunning() const { return bRunning; } + void SetRunning( sal_Bool bVal ) { bRunning = bVal; } void CompileDBFormula(); - void CompileDBFormula( BOOL bCreateFormulaString ); - void CompileNameFormula( BOOL bCreateFormulaString ); + void CompileDBFormula( sal_Bool bCreateFormulaString ); + void CompileNameFormula( sal_Bool bCreateFormulaString ); void CompileColRowNameFormula(); ScFormulaCell* GetPrevious() const { return pPrevious; } ScFormulaCell* GetNext() const { return pNext; } @@ -449,19 +449,19 @@ public: void SetNextTrack( ScFormulaCell* pF ) { pNextTrack = pF; } virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint); - void SetCompile( BOOL bVal ) { bCompile = bVal; } + void SetCompile( sal_Bool bVal ) { bCompile = bVal; } ScDocument* GetDocument() const { return pDocument; } void SetMatColsRows( SCCOL nCols, SCROW nRows ); void GetMatColsRows( SCCOL& nCols, SCROW& nRows ) const; // ob Zelle im ChangeTrack und nicht im echten Dokument ist - void SetInChangeTrack( BOOL bVal ) { bInChangeTrack = bVal; } - BOOL IsInChangeTrack() const { return bInChangeTrack; } + void SetInChangeTrack( sal_Bool bVal ) { bInChangeTrack = bVal; } + sal_Bool IsInChangeTrack() const { return bInChangeTrack; } // Zu Typ und Format das entsprechende Standardformat. // Bei Format "Standard" evtl. das in die Formelzelle // uebernommene Format. - ULONG GetStandardFormat( SvNumberFormatter& rFormatter, ULONG nFormat ) const; + sal_uLong GetStandardFormat( SvNumberFormatter& rFormatter, sal_uLong nFormat ) const; // For import filters! void AddRecalcMode( formula::ScRecalcMode ); @@ -480,8 +480,8 @@ public: void SetHybridFormula( const String& r, const formula::FormulaGrammar::Grammar eGrammar ) { aResult.SetHybridFormula( r); eTempGrammar = eGrammar; } - void SetErrCode( USHORT n ); - inline BOOL IsHyperLinkCell() const { return pCode && pCode->IsHyperLink(); } + void SetErrCode( sal_uInt16 n ); + inline sal_Bool IsHyperLinkCell() const { return pCode && pCode->IsHyperLink(); } EditTextObject* CreateURLObject() ; void GetURLResult( String& rURL, String& rCellText ); @@ -497,7 +497,7 @@ private: ScAddress aPos; public: ScDetectiveRefIter( ScFormulaCell* pCell ); - BOOL GetNextRef( ScRange& rRange ); + sal_Bool GetNextRef( ScRange& rRange ); }; // ============================================================================ diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx index b0b445a5993d..0a9ce4542b2c 100644 --- a/sc/inc/cellform.hxx +++ b/sc/inc/cellform.hxx @@ -48,13 +48,13 @@ enum ScForceTextFmt { class SC_DLLPUBLIC ScCellFormat { public: - static void GetString( ScBaseCell* pCell, ULONG nFormat, String& rString, + static void GetString( ScBaseCell* pCell, sal_uLong nFormat, String& rString, Color** ppColor, SvNumberFormatter& rFormatter, - BOOL bNullVals = TRUE, - BOOL bFormula = FALSE, + sal_Bool bNullVals = sal_True, + sal_Bool bFormula = sal_False, ScForceTextFmt eForceTextFmt = ftDontForce ); - static void GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString, + static void GetInputString( ScBaseCell* pCell, sal_uLong nFormat, String& rString, SvNumberFormatter& rFormatter ); }; diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index d3d02818b358..a72a9f729983 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -188,16 +188,16 @@ private: ScMarkData* pMarkData; ScRangeList aRanges; sal_Int64 nObjectId; - BOOL bChartColAsHdr; - BOOL bChartRowAsHdr; - BOOL bCursorOnly; - BOOL bGotDataChangedHint; + sal_Bool bChartColAsHdr; + sal_Bool bChartRowAsHdr; + sal_Bool bCursorOnly; + sal_Bool bGotDataChangedHint; XModifyListenerArr_Impl aValueListeners; DECL_LINK( ValueListenerHdl, SfxHint* ); private: - void PaintRanges_Impl( USHORT nPart ); + void PaintRanges_Impl( sal_uInt16 nPart ); ScRangeListRef GetLimitedChartRanges_Impl( long nDataColumns, long nDataRows ) const; void ForceChartListener_Impl(); ScMemChart* CreateMemChart_Impl() const; @@ -210,7 +210,7 @@ private: com::sun::star::uno::Reference QueryDifferences_Impl(const com::sun::star::table::CellAddress& aCompare, - BOOL bColumnDiff); + sal_Bool bColumnDiff); com::sun::star::uno::Reference Find_Impl(const com::sun::star::uno::Reference< com::sun::star::util::XSearchDescriptor>& xDesc, @@ -222,7 +222,7 @@ protected: // GetItemPropertyMap for derived classes must contain all entries, including base class virtual const SfxItemPropertyMap* GetItemPropertyMap(); virtual ::com::sun::star::beans::PropertyState GetOnePropertyState( - USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry ); + sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry ); virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, ::com::sun::star::uno::Any& ) throw(::com::sun::star::uno::RuntimeException); @@ -258,8 +258,8 @@ public: void SetNewRange(const ScRange& rNew); // fuer Cursor void SetNewRanges(const ScRangeList& rNew); - void SetCursorOnly(BOOL bSet); - BOOL IsCursorOnly() const { return bCursorOnly; } + void SetCursorOnly(sal_Bool bSet); + sal_Bool IsCursorOnly() const { return bCursorOnly; } // XSheetOperation virtual double SAL_CALL computeFunction( ::com::sun::star::sheet::GeneralFunction nFunction ) @@ -833,9 +833,9 @@ private: sal_Int16 nActionLockCount; private: - String GetInputString_Impl(BOOL bEnglish) const; + String GetInputString_Impl(sal_Bool bEnglish) const; String GetOutputString_Impl() const; - void SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish); + void SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish); double GetValue_Impl() const; void SetValue_Impl(double fValue); com::sun::star::table::CellContentType GetResultType_Impl(); @@ -1376,7 +1376,7 @@ private: ScRangeList aRanges; ScAddress aPos; ScMarkData* pMark; - BOOL bAtEnd; + sal_Bool bAtEnd; private: void Advance_Impl(); @@ -1459,8 +1459,8 @@ private: SCTAB nTab; ScAttrRectIterator* pIter; ScRange aNext; - BOOL bAtEnd; - BOOL bDirty; + sal_Bool bAtEnd; + sal_Bool bDirty; private: void Advance_Impl(); diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx index 62f30a17c62e..47558c5d53d9 100644 --- a/sc/inc/chartarr.hxx +++ b/sc/inc/chartarr.hxx @@ -73,7 +73,7 @@ class SC_DLLPUBLIC ScChartArray : public ScDataObject // nur noch String aName; ScDocument* pDocument; ScChartPositioner aPositioner; - BOOL bValid; // fuer Erzeugung aus SchMemChart + sal_Bool bValid; // fuer Erzeugung aus SchMemChart private: ScMemChart* CreateMemChartSingle(); @@ -95,14 +95,14 @@ public: void SetRangeList( const ScRange& rNew ) { aPositioner.SetRangeList(rNew); } const ScChartPositionMap* GetPositionMap() { return aPositioner.GetPositionMap(); } - void SetHeaders(BOOL bCol, BOOL bRow) { aPositioner.SetHeaders(bCol, bRow); } - BOOL HasColHeaders() const { return aPositioner.HasColHeaders(); } - BOOL HasRowHeaders() const { return aPositioner.HasRowHeaders(); } - BOOL IsValid() const { return bValid; } + void SetHeaders(sal_Bool bCol, sal_Bool bRow) { aPositioner.SetHeaders(bCol, bRow); } + sal_Bool HasColHeaders() const { return aPositioner.HasColHeaders(); } + sal_Bool HasRowHeaders() const { return aPositioner.HasRowHeaders(); } + sal_Bool IsValid() const { return bValid; } void SetName(const String& rNew) { aName = rNew; } const String& GetName() const { return aName; } - BOOL operator==(const ScChartArray& rCmp) const; + sal_Bool operator==(const ScChartArray& rCmp) const; ScMemChart* CreateMemChart(); }; @@ -115,10 +115,10 @@ public: ScCollection( rColl ) {} virtual ScDataObject* Clone() const; - ScChartArray* operator[](USHORT nIndex) const + ScChartArray* operator[](sal_uInt16 nIndex) const { return (ScChartArray*)At(nIndex); } - BOOL operator==(const ScChartCollection& rCmp) const; + sal_Bool operator==(const ScChartCollection& rCmp) const; }; diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx index 50b8586bdace..b7c3279370cf 100644 --- a/sc/inc/charthelper.hxx +++ b/sc/inc/charthelper.hxx @@ -41,8 +41,8 @@ class SdrObject; class ScChartHelper { public: - static USHORT DoUpdateAllCharts( ScDocument* pDoc ); - static USHORT DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc ); //use this to replace ScDBFunc::DoUpdateCharts in future + static sal_uInt16 DoUpdateAllCharts( ScDocument* pDoc ); + static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc ); //use this to replace ScDBFunc::DoUpdateCharts in future static void AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab ); static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > GetChartFromSdrObject( SdrObject* pObject ); static void GetChartRanges( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc, diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 26831970d5b7..f97344c8ca1e 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -75,9 +75,9 @@ private: ScChartUnoData* pUnoData; ScDocument* pDoc; - BOOL bUsed; // fuer ScChartListenerCollection::FreeUnused - BOOL bDirty; - BOOL bSeriesRangesScheduled; + sal_Bool bUsed; // fuer ScChartListenerCollection::FreeUnused + sal_Bool bDirty; + sal_Bool bSeriesRangesScheduled; // not implemented ScChartListener& operator=( const ScChartListener& ); @@ -98,34 +98,34 @@ public: com::sun::star::uno::Reference< com::sun::star::chart::XChartDataChangeEventListener > GetUnoListener() const; com::sun::star::uno::Reference< com::sun::star::chart::XChartData > GetUnoSource() const; - BOOL IsUno() const { return (pUnoData != NULL); } + sal_Bool IsUno() const { return (pUnoData != NULL); } virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint ); void StartListeningTo(); void EndListeningTo(); void ChangeListening( const ScRangeListRef& rRangeListRef, - BOOL bDirty = FALSE ); + sal_Bool bDirty = sal_False ); void Update(); ScRangeListRef GetRangeList() const; void SetRangeList( const ScRangeListRef& rNew ); void SetRangeList( const ScRange& rNew ); - BOOL IsUsed() const { return bUsed; } - void SetUsed( BOOL bFlg ) { bUsed = bFlg; } - BOOL IsDirty() const { return bDirty; } - void SetDirty( BOOL bFlg ) { bDirty = bFlg; } + sal_Bool IsUsed() const { return bUsed; } + void SetUsed( sal_Bool bFlg ) { bUsed = bFlg; } + sal_Bool IsDirty() const { return bDirty; } + void SetDirty( sal_Bool bFlg ) { bDirty = bFlg; } void UpdateChartIntersecting( const ScRange& rRange ); // if chart series ranges are to be updated later on (e.g. DeleteTab, InsertTab) - void ScheduleSeriesRanges() { bSeriesRangesScheduled = TRUE; } + void ScheduleSeriesRanges() { bSeriesRangesScheduled = sal_True; } void UpdateScheduledSeriesRanges(); void UpdateSeriesRanges(); ExternalRefListener* GetExtRefListener(); void SetUpdateQueue(); - BOOL operator==( const ScChartListener& ); - BOOL operator!=( const ScChartListener& r ) + sal_Bool operator==( const ScChartListener& ); + sal_Bool operator!=( const ScChartListener& r ) { return !operator==( r ); } }; @@ -176,7 +176,7 @@ public: void ChangeListening( const String& rName, const ScRangeListRef& rRangeListRef, - BOOL bDirty = FALSE ); + sal_Bool bDirty = sal_False ); // FreeUnused nur wie in ScDocument::UpdateChartListenerCollection verwenden! void FreeUnused(); void FreeUno( const com::sun::star::uno::Reference< com::sun::star::chart::XChartDataChangeEventListener >& rListener, @@ -185,14 +185,14 @@ public: void UpdateDirtyCharts(); void SC_DLLPUBLIC SetDirty(); void SetDiffDirty( const ScChartListenerCollection&, - BOOL bSetChartRangeLists = FALSE ); + sal_Bool bSetChartRangeLists = sal_False ); void SetRangeDirty( const ScRange& rRange ); // z.B. Zeilen/Spalten void UpdateScheduledSeriesRanges(); void UpdateChartsContainingTab( SCTAB nTab ); - BOOL operator==( const ScChartListenerCollection& ); + sal_Bool operator==( const ScChartListenerCollection& ); /** * Start listening on hide/show change within specified cell range. A diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx index 84ffd2e877e2..ecd9b89d1dea 100644 --- a/sc/inc/chartpos.hxx +++ b/sc/inc/chartpos.hxx @@ -44,7 +44,7 @@ class ScChartPositionMap ScAddress** ppData; ScAddress** ppColHeader; ScAddress** ppRowHeader; - ULONG nCount; + sal_uLong nCount; SCCOL nColCount; SCROW nRowCount; @@ -61,17 +61,17 @@ class ScChartPositionMap public: - ULONG GetCount() const { return nCount; } + sal_uLong GetCount() const { return nCount; } SCCOL GetColCount() const { return nColCount; } SCROW GetRowCount() const { return nRowCount; } - BOOL IsValid( SCCOL nCol, SCROW nRow ) const + sal_Bool IsValid( SCCOL nCol, SCROW nRow ) const { return nCol < nColCount && nRow < nRowCount; } // Daten spaltenweise - ULONG GetIndex( SCCOL nCol, SCROW nRow ) const - { return (ULONG) nCol * nRowCount + nRow; } + sal_uLong GetIndex( SCCOL nCol, SCROW nRow ) const + { return (sal_uLong) nCol * nRowCount + nRow; } - const ScAddress* GetPosition( ULONG nIndex ) const + const ScAddress* GetPosition( sal_uLong nIndex ) const { if ( nIndex < nCount ) return ppData[ nIndex ]; @@ -120,9 +120,9 @@ class ScChartPositioner // nur noch Parameter-Struct ScChartGlue eGlue; SCCOL nStartCol; SCROW nStartRow; - BOOL bColHeaders; - BOOL bRowHeaders; - BOOL bDummyUpperLeft; + sal_Bool bColHeaders; + sal_Bool bRowHeaders; + sal_Bool bDummyUpperLeft; private: void CheckColRowHeaders(); @@ -143,15 +143,15 @@ public: void SetRangeList( const ScRangeListRef& rNew ) { aRangeListRef = rNew; } void SetRangeList( const ScRange& rNew ); - void SetHeaders(BOOL bCol, BOOL bRow) { bColHeaders=bCol; bRowHeaders=bRow; } - BOOL HasColHeaders() const { return bColHeaders; } - BOOL HasRowHeaders() const { return bRowHeaders; } - void SetDummyUpperLeft(BOOL bNew) { bDummyUpperLeft = bNew; } + void SetHeaders(sal_Bool bCol, sal_Bool bRow) { bColHeaders=bCol; bRowHeaders=bRow; } + sal_Bool HasColHeaders() const { return bColHeaders; } + sal_Bool HasRowHeaders() const { return bRowHeaders; } + void SetDummyUpperLeft(sal_Bool bNew) { bDummyUpperLeft = bNew; } void SeteGlue(ScChartGlue eNew) { eGlue = eNew; } void SetStartCol(SCCOL nNew) { nStartCol = nNew; } void SetStartRow(SCROW nNew) { nStartRow = nNew; } - BOOL operator==(const ScChartPositioner& rCmp) const; + sal_Bool operator==(const ScChartPositioner& rCmp) const; void InvalidateGlue() { diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index 6cf3d59314ef..3a0d9b82f41c 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -250,8 +250,8 @@ protected: // Bereichen ScChangeActionLinkEntry* pLinkDeleted; // Links zu geloeschten ScChangeActionLinkEntry* pLinkDependent; // Links zu abhaengigen - ULONG nAction; - ULONG nRejectAction; + sal_uLong nAction; + sal_uLong nRejectAction; ScChangeActionType eType; ScChangeActionState eState; @@ -262,8 +262,8 @@ protected: // only to be used in the XML import ScChangeAction( ScChangeActionType, const ScBigRange&, - const ULONG nAction, - const ULONG nRejectAction, + const sal_uLong nAction, + const sal_uLong nRejectAction, const ScChangeActionState eState, const DateTime& aDateTime, const String& aUser, @@ -271,15 +271,15 @@ protected: // only to be used in the XML import ScChangeAction( ScChangeActionType, const ScBigRange&, - const ULONG nAction); + const sal_uLong nAction); virtual ~ScChangeAction(); String GetRefString( const ScBigRange&, - ScDocument*, BOOL bFlag3D = FALSE ) const; + ScDocument*, sal_Bool bFlag3D = sal_False ) const; - void SetActionNumber( ULONG n ) { nAction = n; } - void SetRejectAction( ULONG n ) { nRejectAction = n; } + void SetActionNumber( sal_uLong n ) { nAction = n; } + void SetRejectAction( sal_uLong n ) { nRejectAction = n; } void SetUser( const String& r ) { aUser = r; } void SetType( ScChangeActionType e ) { eType = e; } void SetState( ScChangeActionState e ) { eState = e; } @@ -307,7 +307,7 @@ protected: return new ScChangeActionLinkEntry( GetDeletedInAddress(), p ); } - BOOL RemoveDeletedIn( const ScChangeAction* ); + sal_Bool RemoveDeletedIn( const ScChangeAction* ); void SetDeletedIn( ScChangeAction* ); ScChangeActionLinkEntry* AddDeleted( ScChangeAction* p ) @@ -331,15 +331,15 @@ protected: virtual void UpdateReference( const ScChangeTrack*, UpdateRefMode, const ScBigRange&, - INT32 nDx, INT32 nDy, INT32 nDz ); + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ); void Accept(); - virtual BOOL Reject( ScDocument* ) = 0; + virtual sal_Bool Reject( ScDocument* ) = 0; void RejectRestoreContents( ScChangeTrack*, SCsCOL nDx, SCsROW nDy ); // used in Reject() instead of IsRejectable() - BOOL IsInternalRejectable() const; + sal_Bool IsInternalRejectable() const; // Derived classes that hold a pointer to the // ChangeTrack must return that. Otherwise NULL. @@ -347,51 +347,51 @@ protected: public: - BOOL IsInsertType() const + sal_Bool IsInsertType() const { return eType == SC_CAT_INSERT_COLS || eType == SC_CAT_INSERT_ROWS || eType == SC_CAT_INSERT_TABS; } - BOOL IsDeleteType() const + sal_Bool IsDeleteType() const { return eType == SC_CAT_DELETE_COLS || eType == SC_CAT_DELETE_ROWS || eType == SC_CAT_DELETE_TABS; } - BOOL IsVirgin() const + sal_Bool IsVirgin() const { return eState == SC_CAS_VIRGIN; } - BOOL IsAccepted() const + sal_Bool IsAccepted() const { return eState == SC_CAS_ACCEPTED; } - BOOL IsRejected() const + sal_Bool IsRejected() const { return eState == SC_CAS_REJECTED; } // Action rejects another Action - BOOL IsRejecting() const + sal_Bool IsRejecting() const { return nRejectAction != 0; } // ob Action im Dokument sichtbar ist - BOOL IsVisible() const; + sal_Bool IsVisible() const; // ob Action anfassbar ist - BOOL IsTouchable() const; + sal_Bool IsTouchable() const; // ob Action ein Eintrag in Dialog-Root ist - BOOL IsDialogRoot() const; + sal_Bool IsDialogRoot() const; // ob ein Eintrag im Dialog aufklappbar sein soll - BOOL IsDialogParent() const; + sal_Bool IsDialogParent() const; // ob Action ein Delete ist, unter dem // aufgeklappt mehrere einzelne Deletes sind - BOOL IsMasterDelete() const; + sal_Bool IsMasterDelete() const; // ob Action akzeptiert/selektiert/abgelehnt // werden kann - BOOL IsClickable() const; + sal_Bool IsClickable() const; // ob Action abgelehnt werden kann - BOOL IsRejectable() const; + sal_Bool IsRejectable() const; const ScBigRange& GetBigRange() const { return aBigRange; } SC_DLLPUBLIC DateTime GetDateTime() const; // local time @@ -401,27 +401,27 @@ public: const String& GetComment() const { return aComment; } ScChangeActionType GetType() const { return eType; } ScChangeActionState GetState() const { return eState; } - ULONG GetActionNumber() const { return nAction; } - ULONG GetRejectAction() const { return nRejectAction; } + sal_uLong GetActionNumber() const { return nAction; } + sal_uLong GetRejectAction() const { return nRejectAction; } ScChangeAction* GetNext() const { return pNext; } ScChangeAction* GetPrev() const { return pPrev; } - BOOL IsDeletedIn() const + sal_Bool IsDeletedIn() const { return GetDeletedIn() != NULL; } - BOOL IsDeleted() const + sal_Bool IsDeleted() const { return IsDeleteType() || IsDeletedIn(); } - BOOL IsDeletedIn( const ScChangeAction* ) const; - BOOL IsDeletedInDelType( ScChangeActionType ) const; + sal_Bool IsDeletedIn( const ScChangeAction* ) const; + sal_Bool IsDeletedInDelType( ScChangeActionType ) const; void RemoveAllDeletedIn(); const ScChangeActionLinkEntry* GetFirstDeletedEntry() const { return pLinkDeleted; } const ScChangeActionLinkEntry* GetFirstDependentEntry() const { return pLinkDependent; } - BOOL HasDependent() const + sal_Bool HasDependent() const { return pLinkDependent != NULL; } - BOOL HasDeleted() const + sal_Bool HasDeleted() const { return pLinkDeleted != NULL; } // Description wird an String angehaengt. @@ -429,10 +429,10 @@ public: // eine Spalte/Zeile beruecksichtigt (fuer // Auflistung der einzelnen Eintraege). virtual void GetDescription( String&, ScDocument*, - BOOL bSplitRange = FALSE, bool bWarning = true ) const; + sal_Bool bSplitRange = sal_False, bool bWarning = true ) const; virtual void GetRefString( String&, ScDocument*, - BOOL bFlag3D = FALSE ) const; + sal_Bool bFlag3D = sal_False ) const; // fuer DocumentMerge altes Datum einer anderen // Action setzen, mit GetDateTimeUTC geholt @@ -444,10 +444,10 @@ public: { aComment = rStr; } // only to be used in the XML import - void SetDeletedInThis( ULONG nActionNumber, + void SetDeletedInThis( sal_uLong nActionNumber, const ScChangeTrack* pTrack ); // only to be used in the XML import - void AddDependent( ULONG nActionNumber, + void AddDependent( sal_uLong nActionNumber, const ScChangeTrack* pTrack ); #if DEBUG_CHANGETRACK String ToString( ScDocument* pDoc ) const; @@ -467,14 +467,14 @@ class ScChangeActionIns : public ScChangeAction virtual void AddContent( ScChangeActionContent* ) {} virtual void DeleteCellEntries() {} - virtual BOOL Reject( ScDocument* ); + virtual sal_Bool Reject( ScDocument* ); virtual const ScChangeTrack* GetChangeTrack() const { return 0; } public: - ScChangeActionIns(const ULONG nActionNumber, + ScChangeActionIns(const sal_uLong nActionNumber, const ScChangeActionState eState, - const ULONG nRejectingNumber, + const sal_uLong nRejectingNumber, const ScBigRange& aBigRange, const String& aUser, const DateTime& aDateTime, @@ -482,7 +482,7 @@ public: const ScChangeActionType eType); // only to use in the XML import virtual void GetDescription( String&, ScDocument*, - BOOL bSplitRange = FALSE, bool bWarning = true ) const; + sal_Bool bSplitRange = sal_False, bool bWarning = true ) const; }; @@ -565,16 +565,16 @@ class ScChangeActionDel : public ScChangeAction virtual void UpdateReference( const ScChangeTrack*, UpdateRefMode, const ScBigRange&, - INT32 nDx, INT32 nDy, INT32 nDz ); + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ); - virtual BOOL Reject( ScDocument* ); + virtual sal_Bool Reject( ScDocument* ); virtual const ScChangeTrack* GetChangeTrack() const { return pTrack; } public: - ScChangeActionDel(const ULONG nActionNumber, + ScChangeActionDel(const sal_uLong nActionNumber, const ScChangeActionState eState, - const ULONG nRejectingNumber, + const sal_uLong nRejectingNumber, const ScBigRange& aBigRange, const String& aUser, const DateTime& aDateTime, @@ -586,17 +586,17 @@ public: // ob dieses das unterste einer Reihe (oder // auch einzeln) ist - BOOL IsBaseDelete() const; + sal_Bool IsBaseDelete() const; // ob dieses das oberste einer Reihe (oder // auch einzeln) ist - BOOL IsTopDelete() const; + sal_Bool IsTopDelete() const; // ob dieses ein Teil einer Reihe ist - BOOL IsMultiDelete() const; + sal_Bool IsMultiDelete() const; // ob es eine Col ist, die zu einem TabDelete gehoert - BOOL IsTabDeleteCol() const; + sal_Bool IsTabDeleteCol() const; SCsCOL GetDx() const { return nDx; } SCsROW GetDy() const { return nDy; } @@ -610,7 +610,7 @@ public: short GetCutOffCount() const { return nCutOff; } virtual void GetDescription( String&, ScDocument*, - BOOL bSplitRange = FALSE, bool bWarning = true ) const; + sal_Bool bSplitRange = sal_False, bool bWarning = true ) const; void SetCutOffInsert( ScChangeActionIns* p, short n ) { pCutOff = p; nCutOff = n; } // only to use in the XML import // this should be protected, but for the XML import it is public @@ -635,8 +635,8 @@ class ScChangeActionMove : public ScChangeAction ScBigRange aFromRange; ScChangeTrack* pTrack; ScChangeActionCellListEntry* pFirstCell; - ULONG nStartLastCut; // fuer PasteCut Undo - ULONG nEndLastCut; + sal_uLong nStartLastCut; // fuer PasteCut Undo + sal_uLong nEndLastCut; ScChangeActionMove( const ScRange& rFromRange, const ScRange& rToRange, @@ -655,16 +655,16 @@ class ScChangeActionMove : public ScChangeAction ScBigRange& GetFromRange() { return aFromRange; } - void SetStartLastCut( ULONG nVal ) { nStartLastCut = nVal; } - ULONG GetStartLastCut() const { return nStartLastCut; } - void SetEndLastCut( ULONG nVal ) { nEndLastCut = nVal; } - ULONG GetEndLastCut() const { return nEndLastCut; } + void SetStartLastCut( sal_uLong nVal ) { nStartLastCut = nVal; } + sal_uLong GetStartLastCut() const { return nStartLastCut; } + void SetEndLastCut( sal_uLong nVal ) { nEndLastCut = nVal; } + sal_uLong GetEndLastCut() const { return nEndLastCut; } virtual void UpdateReference( const ScChangeTrack*, UpdateRefMode, const ScBigRange&, - INT32 nDx, INT32 nDy, INT32 nDz ); + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ); - virtual BOOL Reject( ScDocument* ); + virtual sal_Bool Reject( ScDocument* ); virtual const ScChangeTrack* GetChangeTrack() const { return pTrack; } @@ -672,9 +672,9 @@ protected: using ScChangeAction::GetRefString; public: - ScChangeActionMove(const ULONG nActionNumber, + ScChangeActionMove(const sal_uLong nActionNumber, const ScChangeActionState eState, - const ULONG nRejectingNumber, + const sal_uLong nRejectingNumber, const ScBigRange& aToBigRange, const String& aUser, const DateTime& aDateTime, @@ -685,13 +685,13 @@ public: { return pFirstCell; } // only to use in the XML export const ScBigRange& GetFromRange() const { return aFromRange; } - SC_DLLPUBLIC void GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const; + SC_DLLPUBLIC void GetDelta( sal_Int32& nDx, sal_Int32& nDy, sal_Int32& nDz ) const; virtual void GetDescription( String&, ScDocument*, - BOOL bSplitRange = FALSE, bool bWarning = true ) const; + sal_Bool bSplitRange = sal_False, bool bWarning = true ) const; virtual void GetRefString( String&, ScDocument*, - BOOL bFlag3D = FALSE ) const; + sal_Bool bFlag3D = sal_False ) const; }; @@ -751,7 +751,7 @@ class ScChangeActionContent : public ScChangeAction static void GetStringOfCell( String& rStr, const ScBaseCell* pCell, const ScDocument* pDoc, - ULONG nFormat ); + sal_uLong nFormat ); static void SetValue( String& rStr, ScBaseCell*& pCell, const ScAddress& rPos, @@ -760,15 +760,15 @@ class ScChangeActionContent : public ScChangeAction ScDocument* pToDoc ); static void SetValue( String& rStr, ScBaseCell*& pCell, - ULONG nFormat, + sal_uLong nFormat, const ScBaseCell* pOrgCell, const ScDocument* pFromDoc, ScDocument* pToDoc ); static void SetCell( String& rStr, ScBaseCell* pCell, - ULONG nFormat, const ScDocument* pDoc ); + sal_uLong nFormat, const ScDocument* pDoc ); - static BOOL NeedsNumberFormat( const ScBaseCell* ); + static sal_Bool NeedsNumberFormat( const ScBaseCell* ); void SetValueString( String& rValue, ScBaseCell*& pCell, const String& rStr, @@ -786,16 +786,16 @@ class ScChangeActionContent : public ScChangeAction virtual void UpdateReference( const ScChangeTrack*, UpdateRefMode, const ScBigRange&, - INT32 nDx, INT32 nDy, INT32 nDz ); + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ); - virtual BOOL Reject( ScDocument* ); + virtual sal_Bool Reject( ScDocument* ); virtual const ScChangeTrack* GetChangeTrack() const { return 0; } // pRejectActions!=NULL: reject actions get // stacked, no SetNewValue, no Append - BOOL Select( ScDocument*, ScChangeTrack*, - BOOL bOldest, Stack* pRejectActions ); + sal_Bool Select( ScDocument*, ScChangeTrack*, + sal_Bool bOldest, Stack* pRejectActions ); void PutValueToDoc( ScBaseCell*, const String&, ScDocument*, SCsCOL nDx, SCsROW nDy ) const; @@ -816,9 +816,9 @@ public: pNextInSlot( NULL ), ppPrevInSlot( NULL ) {} - ScChangeActionContent(const ULONG nActionNumber, + ScChangeActionContent(const sal_uLong nActionNumber, const ScChangeActionState eState, - const ULONG nRejectingNumber, + const sal_uLong nRejectingNumber, const ScBigRange& aBigRange, const String& aUser, const DateTime& aDateTime, @@ -826,7 +826,7 @@ public: ScBaseCell* pOldCell, ScDocument* pDoc, const String& sOldValue); // to use for XML Import - ScChangeActionContent(const ULONG nActionNumber, + ScChangeActionContent(const sal_uLong nActionNumber, ScBaseCell* pNewCell, const ScBigRange& aBigRange, ScDocument* pDoc, @@ -836,7 +836,7 @@ public: ScChangeActionContent* GetNextContent() const { return pNextContent; } ScChangeActionContent* GetPrevContent() const { return pPrevContent; } ScChangeActionContent* GetTopContent() const; - BOOL IsTopContent() const + sal_Bool IsTopContent() const { return pNextContent == NULL; } virtual ScChangeActionLinkEntry* GetDeletedIn() const; @@ -850,7 +850,7 @@ public: void SetOldValue( const ScBaseCell*, const ScDocument* pFromDoc, ScDocument* pToDoc, - ULONG nFormat ); + sal_uLong nFormat ); void SetOldValue( const ScBaseCell*, const ScDocument* pFromDoc, ScDocument* pToDoc ); @@ -859,8 +859,8 @@ public: // Used in import filter AppendContentOnTheFly, // takes ownership of cells. void SetOldNewCells( ScBaseCell* pOldCell, - ULONG nOldFormat, ScBaseCell* pNewCell, - ULONG nNewFormat, ScDocument* pDoc ); + sal_uLong nOldFormat, ScBaseCell* pNewCell, + sal_uLong nNewFormat, ScDocument* pDoc ); // Use this only in the XML import, // takes ownership of cell. @@ -883,30 +883,30 @@ public: const ScBaseCell* GetOldCell() const { return pOldCell; } const ScBaseCell* GetNewCell() const { return pNewCell; } virtual void GetDescription( String&, ScDocument*, - BOOL bSplitRange = FALSE, bool bWarning = true ) const; + sal_Bool bSplitRange = sal_False, bool bWarning = true ) const; virtual void GetRefString( String&, ScDocument*, - BOOL bFlag3D = FALSE ) const; + sal_Bool bFlag3D = sal_False ) const; static ScChangeActionContentCellType GetContentCellType( const ScBaseCell* ); // NewCell - BOOL IsMatrixOrigin() const + sal_Bool IsMatrixOrigin() const { return GetContentCellType( GetNewCell() ) == SC_CACCT_MATORG; } - BOOL IsMatrixReference() const + sal_Bool IsMatrixReference() const { return GetContentCellType( GetNewCell() ) == SC_CACCT_MATREF; } // OldCell - BOOL IsOldMatrixOrigin() const + sal_Bool IsOldMatrixOrigin() const { return GetContentCellType( GetOldCell() ) == SC_CACCT_MATORG; } - BOOL IsOldMatrixReference() const + sal_Bool IsOldMatrixReference() const { return GetContentCellType( GetOldCell() ) == SC_CACCT_MATREF; @@ -924,7 +924,7 @@ class ScChangeActionReject : public ScChangeAction friend class ScChangeTrack; friend class ScChangeActionContent; - ScChangeActionReject( ULONG nReject ) + ScChangeActionReject( sal_uLong nReject ) : ScChangeAction( SC_CAT_REJECT, ScRange() ) { SetRejectAction( nReject ); @@ -934,14 +934,14 @@ class ScChangeActionReject : public ScChangeAction virtual void AddContent( ScChangeActionContent* ) {} virtual void DeleteCellEntries() {} - virtual BOOL Reject( ScDocument* ) { return FALSE; } + virtual sal_Bool Reject( ScDocument* ) { return sal_False; } virtual const ScChangeTrack* GetChangeTrack() const { return 0; } public: - ScChangeActionReject(const ULONG nActionNumber, + ScChangeActionReject(const sal_uLong nActionNumber, const ScChangeActionState eState, - const ULONG nRejectingNumber, + const sal_uLong nRejectingNumber, const ScBigRange& aBigRange, const String& aUser, const DateTime& aDateTime, @@ -965,8 +965,8 @@ struct ScChangeTrackMsgInfo DECL_FIXEDMEMPOOL_NEWDEL( ScChangeTrackMsgInfo ) ScChangeTrackMsgType eMsgType; - ULONG nStartAction; - ULONG nEndAction; + sal_uLong nStartAction; + sal_uLong nEndAction; }; // MsgQueue fuer Benachrichtigung via ModifiedLink @@ -989,15 +989,15 @@ DECLARE_TABLE( ScChangeActionTable, ScChangeAction* ) // Intern generierte Actions beginnen bei diesem Wert (fast alle Bits gesetzt) // und werden runtergezaehlt, um sich in einer Table wertemaessig nicht mit den // "normalen" Actions in die Quere zu kommen. -#define SC_CHGTRACK_GENERATED_START ((UINT32) 0xfffffff0) +#define SC_CHGTRACK_GENERATED_START ((sal_uInt32) 0xfffffff0) class ScChangeTrack : public utl::ConfigurationListener { friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCsCOL, SCsROW ); - friend BOOL ScChangeActionDel::Reject( ScDocument* pDoc ); + friend sal_Bool ScChangeActionDel::Reject( ScDocument* pDoc ); friend void ScChangeActionDel::DeleteCellEntries(); friend void ScChangeActionMove::DeleteCellEntries(); - friend BOOL ScChangeActionMove::Reject( ScDocument* pDoc ); + friend sal_Bool ScChangeActionMove::Reject( ScDocument* pDoc ); static const SCROW nContentRowsPerSlot; static const SCSIZE nContentSlots; @@ -1025,21 +1025,21 @@ class ScChangeTrack : public utl::ConfigurationListener ScChangeActionLinkEntry* pLinkMove; ScChangeTrackMsgInfo* pBlockModifyMsg; ScDocument* pDoc; - ULONG nActionMax; - ULONG nGeneratedMin; - ULONG nMarkLastSaved; - ULONG nStartLastCut; - ULONG nEndLastCut; - ULONG nLastMerge; + sal_uLong nActionMax; + sal_uLong nGeneratedMin; + sal_uLong nMarkLastSaved; + sal_uLong nStartLastCut; + sal_uLong nEndLastCut; + sal_uLong nLastMerge; ScChangeTrackMergeState eMergeState; - USHORT nLoadedFileFormatVersion; - BOOL bLoadSave; - BOOL bInDelete; - BOOL bInDeleteUndo; - BOOL bInDeleteTop; - BOOL bInPasteCut; - BOOL bUseFixDateTime; - BOOL bTime100thSeconds; + sal_uInt16 nLoadedFileFormatVersion; + sal_Bool bLoadSave; + sal_Bool bInDelete; + sal_Bool bInDeleteUndo; + sal_Bool bInDeleteTop; + sal_Bool bInPasteCut; + sal_Bool bUseFixDateTime; + sal_Bool bTime100thSeconds; // not implemented, prevent usage ScChangeTrack( const ScChangeTrack& ); @@ -1048,53 +1048,53 @@ class ScChangeTrack : public utl::ConfigurationListener #ifdef SC_CHGTRACK_CXX static SCROW InitContentRowsPerSlot(); - // TRUE if one is MM_FORMULA and the other is + // sal_True if one is MM_FORMULA and the other is // not, or if both are and range differs - static BOOL IsMatrixFormulaRangeDifferent( + static sal_Bool IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell, const ScBaseCell* pNewCell ); void Init(); void DtorClear(); - void SetLoadSave( BOOL bVal ) { bLoadSave = bVal; } + void SetLoadSave( sal_Bool bVal ) { bLoadSave = bVal; } void SetInDeleteRange( const ScRange& rRange ) { aInDeleteRange = rRange; } - void SetInDelete( BOOL bVal ) + void SetInDelete( sal_Bool bVal ) { bInDelete = bVal; } - void SetInDeleteTop( BOOL bVal ) + void SetInDeleteTop( sal_Bool bVal ) { bInDeleteTop = bVal; } - void SetInDeleteUndo( BOOL bVal ) + void SetInDeleteUndo( sal_Bool bVal ) { bInDeleteUndo = bVal; } - void SetInPasteCut( BOOL bVal ) + void SetInPasteCut( sal_Bool bVal ) { bInPasteCut = bVal; } void SetMergeState( ScChangeTrackMergeState eState ) { eMergeState = eState; } ScChangeTrackMergeState GetMergeState() const { return eMergeState; } - void SetLastMerge( ULONG nVal ) { nLastMerge = nVal; } - ULONG GetLastMerge() const { return nLastMerge; } + void SetLastMerge( sal_uLong nVal ) { nLastMerge = nVal; } + sal_uLong GetLastMerge() const { return nLastMerge; } void SetLastCutMoveRange( const ScRange&, ScDocument* ); // ModifyMsg blockweise und nicht einzeln erzeugen void StartBlockModify( ScChangeTrackMsgType, - ULONG nStartAction ); - void EndBlockModify( ULONG nEndAction ); + sal_uLong nStartAction ); + void EndBlockModify( sal_uLong nEndAction ); void AddDependentWithNotify( ScChangeAction* pParent, ScChangeAction* pDependent ); void Dependencies( ScChangeAction* ); - void UpdateReference( ScChangeAction*, BOOL bUndo ); + void UpdateReference( ScChangeAction*, sal_Bool bUndo ); void UpdateReference( ScChangeAction** ppFirstAction, - ScChangeAction* pAct, BOOL bUndo ); - void Append( ScChangeAction* pAppend, ULONG nAction ); + ScChangeAction* pAct, sal_Bool bUndo ); + void Append( ScChangeAction* pAppend, sal_uLong nAction ); SC_DLLPUBLIC void AppendDeleteRange( const ScRange&, ScDocument* pRefDoc, SCsTAB nDz, - ULONG nRejectingInsert ); + sal_uLong nRejectingInsert ); void AppendOneDeleteRange( const ScRange& rOrgRange, ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - ULONG nRejectingInsert ); + sal_uLong nRejectingInsert ); void LookUpContents( const ScRange& rOrgRange, ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); @@ -1118,8 +1118,8 @@ class ScChangeTrack : public utl::ConfigurationListener // ist nur bei Insert und Move (MasterType) // noetig, kann ansonsten NULL sein. // bRecursion == Aufruf aus Reject mit Table - BOOL Reject( ScChangeAction*, - ScChangeActionTable*, BOOL bRecursion ); + sal_Bool Reject( ScChangeAction*, + ScChangeActionTable*, sal_Bool bRecursion ); #endif // SC_CHGTRACK_CXX @@ -1128,7 +1128,7 @@ class ScChangeTrack : public utl::ConfigurationListener public: - static SCSIZE ComputeContentSlot( INT32 nRow ) + static SCSIZE ComputeContentSlot( sal_Int32 nRow ) { if ( nRow < 0 || nRow > MAXROW ) return nContentSlots - 1; @@ -1144,34 +1144,34 @@ public: ScChangeActionContent* GetFirstGenerated() const { return pFirstGeneratedDelContent; } ScChangeAction* GetFirst() const { return pFirst; } ScChangeAction* GetLast() const { return pLast; } - ULONG GetActionMax() const { return nActionMax; } - BOOL IsGenerated( ULONG nAction ) const + sal_uLong GetActionMax() const { return nActionMax; } + sal_Bool IsGenerated( sal_uLong nAction ) const { return nAction >= nGeneratedMin; } - ScChangeAction* GetAction( ULONG nAction ) const + ScChangeAction* GetAction( sal_uLong nAction ) const { return aTable.Get( nAction ); } - ScChangeAction* GetGenerated( ULONG nGenerated ) const + ScChangeAction* GetGenerated( sal_uLong nGenerated ) const { return aGeneratedTable.Get( nGenerated ); } - ScChangeAction* GetActionOrGenerated( ULONG nAction ) const + ScChangeAction* GetActionOrGenerated( sal_uLong nAction ) const { return IsGenerated( nAction ) ? GetGenerated( nAction ) : GetAction( nAction ); } - ULONG GetLastSavedActionNumber() const + sal_uLong GetLastSavedActionNumber() const { return nMarkLastSaved; } - void SetLastSavedActionNumber(ULONG nNew) + void SetLastSavedActionNumber(sal_uLong nNew) { nMarkLastSaved = nNew; } ScChangeAction* GetLastSaved() const { return aTable.Get( nMarkLastSaved ); } ScChangeActionContent** GetContentSlots() const { return ppContentSlots; } - BOOL IsLoadSave() const { return bLoadSave; } + sal_Bool IsLoadSave() const { return bLoadSave; } const ScRange& GetInDeleteRange() const { return aInDeleteRange; } - BOOL IsInDelete() const { return bInDelete; } - BOOL IsInDeleteTop() const { return bInDeleteTop; } - BOOL IsInDeleteUndo() const { return bInDeleteUndo; } - BOOL IsInPasteCut() const { return bInPasteCut; } + sal_Bool IsInDelete() const { return bInDelete; } + sal_Bool IsInDeleteTop() const { return bInDeleteTop; } + sal_Bool IsInDeleteUndo() const { return bInDeleteUndo; } + sal_Bool IsInPasteCut() const { return bInPasteCut; } SC_DLLPUBLIC void SetUser( const String& ); const String& GetUser() const { return aUser; } const ScStrCollection& GetUserCollection() const @@ -1183,7 +1183,7 @@ public: // set this if the date/time set with // SetFixDateTime...() shall be applied to // appended actions - void SetUseFixDateTime( BOOL bVal ) + void SetUseFixDateTime( sal_Bool bVal ) { bUseFixDateTime = bVal; } // for MergeDocument, apply original date/time as UTC void SetFixDateTimeUTC( const DateTime& rDT ) @@ -1198,7 +1198,7 @@ public: // => no generation of deleted contents SC_DLLPUBLIC void AppendDeleteRange( const ScRange&, ScDocument* pRefDoc, - ULONG& nStartAction, ULONG& nEndAction, + sal_uLong& nStartAction, sal_uLong& nEndAction, SCsTAB nDz = 0 ); // nDz: Multi-TabDel, LookUpContent ist // um -nDz verschoben zu suchen @@ -1211,14 +1211,14 @@ public: // alte Werte aus RefDoc/UndoDoc void AppendContentRange( const ScRange& rRange, ScDocument* pRefDoc, - ULONG& nStartAction, ULONG& nEndAction, + sal_uLong& nStartAction, sal_uLong& nEndAction, ScChangeActionClipMode eMode = SC_CACM_NONE ); // nachdem neuer Wert im Dokument gesetzt wurde, // alter Wert aus pOldCell, nOldFormat, // RefDoc==NULL => Doc void AppendContent( const ScAddress& rPos, const ScBaseCell* pOldCell, - ULONG nOldFormat, ScDocument* pRefDoc = NULL ); + sal_uLong nOldFormat, ScDocument* pRefDoc = NULL ); // nachdem neuer Wert im Dokument gesetzt wurde, // alter Wert aus pOldCell, Format aus Doc void AppendContent( const ScAddress& rPos, @@ -1227,7 +1227,7 @@ public: // alte Werte aus RefDoc/UndoDoc. // Alle Contents, wo im RefDoc eine Zelle steht. void AppendContentsIfInRefDoc( ScDocument* pRefDoc, - ULONG& nStartAction, ULONG& nEndAction ); + sal_uLong& nStartAction, sal_uLong& nEndAction ); // Meant for import filter, creates and inserts // an unconditional content action of the two @@ -1240,8 +1240,8 @@ public: SC_DLLPUBLIC ScChangeActionContent* AppendContentOnTheFly( const ScAddress& rPos, ScBaseCell* pOldCell, ScBaseCell* pNewCell, - ULONG nOldFormat = 0, - ULONG nNewFormat = 0 ); + sal_uLong nOldFormat = 0, + sal_uLong nNewFormat = 0 ); // die folgenden beiden nur benutzen wenn's // nicht anders geht (setzen nur String fuer @@ -1270,22 +1270,22 @@ public: pLastCutMove = NULL; } } - BOOL HasLastCut() const + sal_Bool HasLastCut() const { return nEndLastCut > 0 && nStartLastCut <= nEndLastCut && pLastCutMove; } - SC_DLLPUBLIC void Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge = false ); + SC_DLLPUBLIC void Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge = false ); // fuer MergeDocument, Referenzen anpassen, //! darf nur in einem temporaer geoeffneten //! Dokument verwendet werden, der Track //! ist danach verhunzt void MergePrepare( ScChangeAction* pFirstMerge, bool bShared = false ); - void MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bShared = false ); - static BOOL MergeIgnore( const ScChangeAction&, ULONG nFirstMerge ); + void MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool bShared = false ); + static sal_Bool MergeIgnore( const ScChangeAction&, sal_uLong nFirstMerge ); // Abhaengige in Table einfuegen. // Bei Insert sind es echte Abhaengige, @@ -1302,25 +1302,25 @@ public: // der Abhaengigen flach eingefuegt. SC_DLLPUBLIC void GetDependents( ScChangeAction*, ScChangeActionTable&, - BOOL bListMasterDelete = FALSE, - BOOL bAllFlat = FALSE ) const; + sal_Bool bListMasterDelete = sal_False, + sal_Bool bAllFlat = sal_False ) const; // Reject visible Action (und abhaengige) - BOOL Reject( ScChangeAction*, bool bShared = false ); + sal_Bool Reject( ScChangeAction*, bool bShared = false ); // Accept visible Action (und abhaengige) - SC_DLLPUBLIC BOOL Accept( ScChangeAction* ); + SC_DLLPUBLIC sal_Bool Accept( ScChangeAction* ); void AcceptAll(); // alle Virgins - BOOL RejectAll(); // alle Virgins + sal_Bool RejectAll(); // alle Virgins // Selektiert einen Content von mehreren an // gleicher Position und akzeptiert diesen und // die aelteren, rejected die neueren. - // Mit bOldest==TRUE wird der erste OldValue + // Mit bOldest==sal_True wird der erste OldValue // einer Virgin-Content-Kette restauriert. - BOOL SelectContent( ScChangeAction*, - BOOL bOldest = FALSE ); + sal_Bool SelectContent( ScChangeAction*, + sal_Bool bOldest = sal_False ); // wenn ModifiedLink gesetzt, landen // Aenderungen in ScChangeTrackMsgQueue @@ -1330,30 +1330,30 @@ public: ScChangeTrackMsgQueue& GetMsgQueue() { return aMsgQueue; } void NotifyModified( ScChangeTrackMsgType eMsgType, - ULONG nStartAction, ULONG nEndAction ); + sal_uLong nStartAction, sal_uLong nEndAction ); - USHORT GetLoadedFileFormatVersion() const + sal_uInt16 GetLoadedFileFormatVersion() const { return nLoadedFileFormatVersion; } - ULONG AddLoadedGenerated(ScBaseCell* pOldCell, + sal_uLong AddLoadedGenerated(ScBaseCell* pOldCell, const ScBigRange& aBigRange, const String& sNewValue ); // only to use in the XML import void AppendLoaded( ScChangeAction* pAppend ); // this is only for the XML import public, it should be protected - void SetActionMax(ULONG nTempActionMax) + void SetActionMax(sal_uLong nTempActionMax) { nActionMax = nTempActionMax; } // only to use in the XML import void SetProtection( const com::sun::star::uno::Sequence< sal_Int8 >& rPass ) { aProtectPass = rPass; } com::sun::star::uno::Sequence< sal_Int8 > GetProtection() const { return aProtectPass; } - BOOL IsProtected() const + sal_Bool IsProtected() const { return aProtectPass.getLength() != 0; } // If time stamps of actions of this // ChangeTrack and a second one are to be // compared including 100th seconds. - void SetTime100thSeconds( BOOL bVal ) + void SetTime100thSeconds( sal_Bool bVal ) { bTime100thSeconds = bVal; } - BOOL IsTime100thSeconds() const + sal_Bool IsTime100thSeconds() const { return bTime100thSeconds; } void AppendCloned( ScChangeAction* pAppend ); diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx index ddc0dcc14243..09794e885778 100644 --- a/sc/inc/chgviset.hxx +++ b/sc/inc/chgviset.hxx @@ -53,32 +53,32 @@ private: String aComment; ScRangeList aRangeList; ScChgsDateMode eDateMode; - BOOL bShowIt; - BOOL bIsDate; - BOOL bIsAuthor; - BOOL bIsComment; - BOOL bIsRange; - BOOL bEveryoneButMe; - BOOL bShowAccepted; - BOOL bShowRejected; + sal_Bool bShowIt; + sal_Bool bIsDate; + sal_Bool bIsAuthor; + sal_Bool bIsComment; + sal_Bool bIsRange; + sal_Bool bEveryoneButMe; + sal_Bool bShowAccepted; + sal_Bool bShowRejected; bool mbIsActionRange; - ULONG mnFirstAction; - ULONG mnLastAction; + sal_uLong mnFirstAction; + sal_uLong mnLastAction; public: ScChangeViewSettings() { pCommentSearcher=NULL; - bIsDate=FALSE; - bIsAuthor=FALSE; - bIsRange=FALSE; - bIsComment=FALSE; - bShowIt=FALSE; + bIsDate=sal_False; + bIsAuthor=sal_False; + bIsRange=sal_False; + bIsComment=sal_False; + bShowIt=sal_False; eDateMode=SCDM_DATE_BEFORE; - bEveryoneButMe=FALSE; - bShowAccepted=FALSE; - bShowRejected=FALSE; + bEveryoneButMe=sal_False; + bShowAccepted=sal_False; + bShowRejected=sal_False; mbIsActionRange = false; } @@ -86,11 +86,11 @@ public: ~ScChangeViewSettings(); - BOOL ShowChanges() const {return bShowIt;} - void SetShowChanges(BOOL nFlag=TRUE){bShowIt=nFlag;} + sal_Bool ShowChanges() const {return bShowIt;} + void SetShowChanges(sal_Bool nFlag=sal_True){bShowIt=nFlag;} - BOOL HasDate() const {return bIsDate;} - void SetHasDate(BOOL nFlag=TRUE) {bIsDate=nFlag;} + sal_Bool HasDate() const {return bIsDate;} + void SetHasDate(sal_Bool nFlag=sal_True) {bIsDate=nFlag;} void SetTheDateMode(ScChgsDateMode eDatMod){ eDateMode=eDatMod; } ScChgsDateMode GetTheDateMode() const { return eDateMode; } @@ -102,35 +102,35 @@ public: const DateTime& GetTheLastDateTime()const {return aLastDateTime;} - BOOL HasAuthor() const {return bIsAuthor;} - void SetHasAuthor(BOOL nFlag=TRUE) {bIsAuthor=nFlag;} + sal_Bool HasAuthor() const {return bIsAuthor;} + void SetHasAuthor(sal_Bool nFlag=sal_True) {bIsAuthor=nFlag;} String GetTheAuthorToShow()const {return aAuthorToShow;} void SetTheAuthorToShow(const String& aString){aAuthorToShow=aString;} - BOOL HasComment() const {return bIsComment;} - void SetHasComment(BOOL nFlag=TRUE) {bIsComment=nFlag;} + sal_Bool HasComment() const {return bIsComment;} + void SetHasComment(sal_Bool nFlag=sal_True) {bIsComment=nFlag;} String GetTheComment()const {return aComment;} void SetTheComment(const String& aString); - BOOL IsValidComment(const String* pCommentStr) const; + sal_Bool IsValidComment(const String* pCommentStr) const; - BOOL IsEveryoneButMe() const {return bEveryoneButMe;} - void SetEveryoneButMe(BOOL nFlag=TRUE) {bEveryoneButMe=nFlag;} + sal_Bool IsEveryoneButMe() const {return bEveryoneButMe;} + void SetEveryoneButMe(sal_Bool nFlag=sal_True) {bEveryoneButMe=nFlag;} - BOOL HasRange() const {return bIsRange;} - void SetHasRange(BOOL nFlag=TRUE) {bIsRange=nFlag;} + sal_Bool HasRange() const {return bIsRange;} + void SetHasRange(sal_Bool nFlag=sal_True) {bIsRange=nFlag;} const ScRangeList& GetTheRangeList()const {return aRangeList;} void SetTheRangeList(const ScRangeList& aRl){aRangeList=aRl;} - BOOL IsShowAccepted() const { return bShowAccepted; } - void SetShowAccepted( BOOL bVal ) { bShowAccepted = bVal; } + sal_Bool IsShowAccepted() const { return bShowAccepted; } + void SetShowAccepted( sal_Bool bVal ) { bShowAccepted = bVal; } - BOOL IsShowRejected() const { return bShowRejected; } - void SetShowRejected( BOOL bVal ) { bShowRejected = bVal; } + sal_Bool IsShowRejected() const { return bShowRejected; } + void SetShowRejected( sal_Bool bVal ) { bShowRejected = bVal; } ScChangeViewSettings& operator= ( const ScChangeViewSettings& r ); @@ -139,8 +139,8 @@ public: bool HasActionRange() const { return mbIsActionRange; } void SetHasActionRange( bool nFlag = true ) { mbIsActionRange = nFlag; } - void GetTheActionRange( ULONG& nFirst, ULONG& nLast ) const { nFirst = mnFirstAction; nLast = mnLastAction; } - void SetTheActionRange( ULONG nFirst, ULONG nLast ) { mnFirstAction = nFirst; mnLastAction = nLast; } + void GetTheActionRange( sal_uLong& nFirst, sal_uLong& nLast ) const { nFirst = mnFirstAction; nLast = mnLastAction; } + void SetTheActionRange( sal_uLong nFirst, sal_uLong nLast ) { mnFirstAction = nFirst; mnLastAction = nLast; } }; diff --git a/sc/inc/collect.hxx b/sc/inc/collect.hxx index 167ab5929c6a..546765054012 100644 --- a/sc/inc/collect.hxx +++ b/sc/inc/collect.hxx @@ -57,29 +57,29 @@ public: class SC_DLLPUBLIC ScCollection : public ScDataObject { protected: - USHORT nCount; - USHORT nLimit; - USHORT nDelta; + sal_uInt16 nCount; + sal_uInt16 nLimit; + sal_uInt16 nDelta; ScDataObject** pItems; public: - ScCollection(USHORT nLim = 4, USHORT nDel = 4); + ScCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4); ScCollection(const ScCollection& rCollection); virtual ~ScCollection(); virtual ScDataObject* Clone() const; - void AtFree(USHORT nIndex); + void AtFree(sal_uInt16 nIndex); void Free(ScDataObject* pScDataObject); void FreeAll(); - BOOL AtInsert(USHORT nIndex, ScDataObject* pScDataObject); - virtual BOOL Insert(ScDataObject* pScDataObject); + sal_Bool AtInsert(sal_uInt16 nIndex, ScDataObject* pScDataObject); + virtual sal_Bool Insert(ScDataObject* pScDataObject); - ScDataObject* At(USHORT nIndex) const; - virtual USHORT IndexOf(ScDataObject* pScDataObject) const; - USHORT GetCount() const; + ScDataObject* At(sal_uInt16 nIndex) const; + virtual sal_uInt16 IndexOf(ScDataObject* pScDataObject) const; + sal_uInt16 GetCount() const; - ScDataObject* operator[]( const USHORT nIndex) const {return At(nIndex);} + ScDataObject* operator[]( const sal_uInt16 nIndex) const {return At(nIndex);} ScCollection& operator=( const ScCollection& rCol ); }; @@ -87,25 +87,25 @@ public: class SC_DLLPUBLIC ScSortedCollection : public ScCollection { private: - BOOL bDuplicates; + sal_Bool bDuplicates; protected: // fuer ScStrCollection Load/Store - void SetDups( BOOL bVal ) { bDuplicates = bVal; } - BOOL IsDups() const { return bDuplicates; } + void SetDups( sal_Bool bVal ) { bDuplicates = bVal; } + sal_Bool IsDups() const { return bDuplicates; } public: - ScSortedCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE); + ScSortedCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False); ScSortedCollection(const ScSortedCollection& rScSortedCollection) : ScCollection(rScSortedCollection), bDuplicates(rScSortedCollection.bDuplicates) {} - virtual USHORT IndexOf(ScDataObject* pScDataObject) const; + virtual sal_uInt16 IndexOf(ScDataObject* pScDataObject) const; virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const = 0; - virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; - BOOL Search(ScDataObject* pScDataObject, USHORT& rIndex) const; - virtual BOOL Insert(ScDataObject* pScDataObject); - virtual BOOL InsertPos(ScDataObject* pScDataObject, USHORT& nIndex); + virtual sal_Bool IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; + sal_Bool Search(ScDataObject* pScDataObject, sal_uInt16& rIndex) const; + virtual sal_Bool Insert(ScDataObject* pScDataObject); + virtual sal_Bool InsertPos(ScDataObject* pScDataObject, sal_uInt16& nIndex); - BOOL operator==(const ScSortedCollection& rCmp) const; + sal_Bool operator==(const ScSortedCollection& rCmp) const; }; @@ -132,13 +132,13 @@ class SvStream; class SC_DLLPUBLIC ScStrCollection : public ScSortedCollection { public: - ScStrCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : + ScStrCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False) : ScSortedCollection ( nLim, nDel, bDup ) {} ScStrCollection(const ScStrCollection& rScStrCollection) : ScSortedCollection ( rScStrCollection ) {} virtual ScDataObject* Clone() const; - StrData* operator[]( const USHORT nIndex) const {return (StrData*)At(nIndex);} + StrData* operator[]( const sal_uInt16 nIndex) const {return (StrData*)At(nIndex);} virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; }; @@ -150,13 +150,13 @@ class TypedStrData : public ScDataObject { public: TypedStrData( const String& rStr, double nVal = 0.0, - USHORT nType = SC_STRTYPE_STANDARD ) + sal_uInt16 nType = SC_STRTYPE_STANDARD ) : aStrValue(rStr), nValue(nVal), nStrType(nType) {} //UNUSED2008-05 TypedStrData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, -//UNUSED2008-05 BOOL bAllStrings ); +//UNUSED2008-05 sal_Bool bAllStrings ); TypedStrData( const TypedStrData& rCpy ) : ScDataObject(), @@ -166,7 +166,7 @@ public: virtual ScDataObject* Clone() const; - BOOL IsStrData() const { return nStrType != 0; } + sal_Bool IsStrData() const { return nStrType != 0; } const String& GetString() const { return aStrValue; } double GetValue () const { return nValue; } @@ -175,16 +175,16 @@ private: String aStrValue; double nValue; - USHORT nStrType; // 0 = Value + sal_uInt16 nStrType; // 0 = Value }; class SC_DLLPUBLIC TypedScStrCollection : public ScSortedCollection { private: - BOOL bCaseSensitive; + sal_Bool bCaseSensitive; public: - TypedScStrCollection( USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE ); + TypedScStrCollection( sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False ); TypedScStrCollection( const TypedScStrCollection& rCpy ) : ScSortedCollection( rCpy ) { bCaseSensitive = rCpy.bCaseSensitive; } @@ -193,12 +193,12 @@ public: virtual ScDataObject* Clone() const; virtual short Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const; - TypedStrData* operator[]( const USHORT nIndex) const; + TypedStrData* operator[]( const sal_uInt16 nIndex) const; - void SetCaseSensitive( BOOL bSet ); + void SetCaseSensitive( sal_Bool bSet ); - BOOL FindText( const String& rStart, String& rResult, USHORT& rPos, BOOL bBack ) const; - BOOL GetExactMatch( String& rString ) const; + sal_Bool FindText( const String& rStart, String& rResult, sal_uInt16& rPos, sal_Bool bBack ) const; + sal_Bool GetExactMatch( String& rString ) const; }; #endif diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index af6292bbd830..36569d4efefb 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -72,18 +72,18 @@ class ScFlatBoolRowSegments; struct ScNeededSizeOptions { const ScPatternAttr* pPattern; - BOOL bFormula; - BOOL bSkipMerged; - BOOL bGetFont; - BOOL bTotalSize; + sal_Bool bFormula; + sal_Bool bSkipMerged; + sal_Bool bGetFont; + sal_Bool bTotalSize; ScNeededSizeOptions() { pPattern = NULL; - bFormula = FALSE; - bSkipMerged = TRUE; - bGetFont = TRUE; - bTotalSize = FALSE; + bFormula = sal_False; + bSkipMerged = sal_True; + bGetFont = sal_True; + bTotalSize = sal_False; } }; @@ -119,7 +119,7 @@ friend class ScHorizontalCellIterator; friend class ScHorizontalAttrIterator; public: -static BOOL bDoubleAlloc; // fuer Import: Groesse beim Allozieren verdoppeln +static sal_Bool bDoubleAlloc; // fuer Import: Groesse beim Allozieren verdoppeln public: ScColumn(); @@ -127,10 +127,10 @@ public: void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc); - BOOL Search( SCROW nRow, SCSIZE& nIndex ) const; + sal_Bool Search( SCROW nRow, SCSIZE& nIndex ) const; ScBaseCell* GetCell( SCROW nRow ) const; void Insert( SCROW nRow, ScBaseCell* pCell ); - void Insert( SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell ); + void Insert( SCROW nRow, sal_uLong nFormatIndex, ScBaseCell* pCell ); void Append( SCROW nRow, ScBaseCell* pCell ); void Delete( SCROW nRow ); void DeleteAtIndex( SCSIZE nIndex ); @@ -139,67 +139,67 @@ public: void SwapRow( SCROW nRow1, SCROW nRow2 ); void SwapCell( SCROW nRow, ScColumn& rCol); -//UNUSED2009-05 BOOL HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, -//UNUSED2009-05 BOOL bLeft, BOOL bRight ) const; - bool HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const; - BOOL HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const; - BOOL ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, +//UNUSED2009-05 sal_Bool HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, +//UNUSED2009-05 sal_Bool bLeft, sal_Bool bRight ) const; + bool HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const; + sal_Bool HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const; + sal_Bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL& rPaintCol, SCROW& rPaintRow, - BOOL bRefresh, BOOL bAttrs ); + sal_Bool bRefresh, sal_Bool bAttrs ); - BOOL IsEmptyVisData(BOOL bNotes) const; // ohne Broadcaster - BOOL IsEmptyData() const; - BOOL IsEmptyAttr() const; - BOOL IsEmpty() const; + sal_Bool IsEmptyVisData(sal_Bool bNotes) const; // ohne Broadcaster + sal_Bool IsEmptyData() const; + sal_Bool IsEmptyAttr() const; + sal_Bool IsEmpty() const; // nur Daten: - BOOL IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes = false) const; + sal_Bool IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes = false) const; SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const; - BOOL HasDataAt(SCROW nRow) const; - BOOL HasVisibleDataAt(SCROW nRow) const; + sal_Bool HasDataAt(SCROW nRow) const; + sal_Bool HasVisibleDataAt(SCROW nRow) const; SCROW GetFirstDataPos() const; SCROW GetLastDataPos() const; - SCROW GetLastVisDataPos(BOOL bNotes) const; // ohne Broadcaster - SCROW GetFirstVisDataPos(BOOL bNotes) const; - BOOL GetPrevDataPos(SCROW& rRow) const; - BOOL GetNextDataPos(SCROW& rRow) const; + SCROW GetLastVisDataPos(sal_Bool bNotes) const; // ohne Broadcaster + SCROW GetFirstVisDataPos(sal_Bool bNotes) const; + sal_Bool GetPrevDataPos(SCROW& rRow) const; + sal_Bool GetNextDataPos(SCROW& rRow) const; void FindDataAreaPos(SCROW& rRow, long nMovY) const; // (ohne Broadcaster) - void FindUsed( SCROW nStartRow, SCROW nEndRow, BOOL* pUsed ) const; + void FindUsed( SCROW nStartRow, SCROW nEndRow, sal_Bool* pUsed ) const; SCSIZE VisibleCount( SCROW nStartRow, SCROW nEndRow ) const; - USHORT GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) const; - BOOL HasSelectionMatrixFragment(const ScMarkData& rMark) const; + sal_uInt16 GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const; + sal_Bool HasSelectionMatrixFragment(const ScMarkData& rMark) const; - BOOL GetFirstVisibleAttr( SCROW& rFirstRow ) const; - BOOL GetLastVisibleAttr( SCROW& rLastRow ) const; - BOOL HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const; - BOOL IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow = 0, + sal_Bool GetFirstVisibleAttr( SCROW& rFirstRow ) const; + sal_Bool GetLastVisibleAttr( SCROW& rLastRow ) const; + sal_Bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const; + sal_Bool IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow = 0, SCROW nEndRow = MAXROW ) const; - BOOL IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const; + sal_Bool IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const; - BOOL TestInsertCol( SCROW nStartRow, SCROW nEndRow) const; - BOOL TestInsertRow( SCSIZE nSize ) const; + sal_Bool TestInsertCol( SCROW nStartRow, SCROW nEndRow) const; + sal_Bool TestInsertRow( SCSIZE nSize ) const; void InsertRow( SCROW nStartRow, SCSIZE nSize ); void DeleteRow( SCROW nStartRow, SCSIZE nSize ); - void DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFlag ); - void DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag ); - void CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions); + void DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDelFlag ); + void DeleteArea(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nDelFlag ); + void CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions); void CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy, - USHORT nInsFlag, BOOL bAsLink, BOOL bSkipAttrForEmpty, ScColumn& rColumn); + sal_uInt16 nInsFlag, sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty, ScColumn& rColumn); void StartListeningInArea( SCROW nRow1, SCROW nRow2 ); void BroadcastInArea( SCROW nRow1, SCROW nRow2 ); void RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow ); // Markierung von diesem Dokument - void MixMarked( const ScMarkData& rMark, USHORT nFunction, - BOOL bSkipEmpty, ScColumn& rSrcCol ); - void MixData( SCROW nRow1, SCROW nRow2, USHORT nFunction, BOOL bSkipEmpty, + void MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction, + sal_Bool bSkipEmpty, ScColumn& rSrcCol ); + void MixData( SCROW nRow1, SCROW nRow2, sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScColumn& rSrcCol ); ScFormulaCell* CreateRefCell( ScDocument* pDestDoc, const ScAddress& rDestPos, - SCSIZE nIndex, USHORT nFlags ) const; + SCSIZE nIndex, sal_uInt16 nFlags ) const; ScAttrIterator* CreateAttrIterator( SCROW nStartRow, SCROW nEndRow ) const; @@ -209,20 +209,20 @@ public: void UpdateSelectionFunction( const ScMarkData& rMark, ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows, - BOOL bDoExclude, SCROW nExStartRow, SCROW nExEndRow ); + sal_Bool bDoExclude, SCROW nExStartRow, SCROW nExEndRow ); void UpdateAreaFunction( ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows, SCROW nStartRow, SCROW nEndRow ); - void CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked, + void CopyToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, sal_Bool bMarked, ScColumn& rColumn, const ScMarkData* pMarkData = NULL, - BOOL bAsLink = FALSE ); - void UndoToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked, + sal_Bool bAsLink = sal_False ); + void UndoToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, sal_Bool bMarked, ScColumn& rColumn, const ScMarkData* pMarkData = NULL ); void CopyScenarioFrom( const ScColumn& rSrcCol ); void CopyScenarioTo( ScColumn& rDestCol ) const; - BOOL TestCopyScenarioTo( const ScColumn& rDestCol ) const; + sal_Bool TestCopyScenarioTo( const ScColumn& rDestCol ) const; void MarkScenarioIn( ScMarkData& rDestMark ) const; void CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const; @@ -230,31 +230,31 @@ public: void SwapCol(ScColumn& rCol); void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol); - BOOL HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const; + sal_Bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const; - // TRUE = Zahlformat gesetzt - BOOL SetString( SCROW nRow, SCTAB nTab, const String& rString, + // sal_True = Zahlformat gesetzt + sal_Bool SetString( SCROW nRow, SCTAB nTab, const String& rString, formula::FormulaGrammar::AddressConvention conv = formula::FormulaGrammar::CONV_OOO, SvNumberFormatter* pFormatter = NULL, bool bDetectNumberFormat = true ); void SetValue( SCROW nRow, const double& rVal); - void SetError( SCROW nRow, const USHORT nError); + void SetError( SCROW nRow, const sal_uInt16 nError); void GetString( SCROW nRow, String& rString ) const; void GetInputString( SCROW nRow, String& rString ) const; double GetValue( SCROW nRow ) const; void GetFormula( SCROW nRow, String& rFormula, - BOOL bAsciiExport = FALSE ) const; + sal_Bool bAsciiExport = sal_False ) const; CellType GetCellType( SCROW nRow ) const; SCSIZE GetCellCount() const { return nCount; } - ULONG GetWeightedCount() const; - ULONG GetCodeCount() const; // RPN-Code in Formeln - USHORT GetErrCode( SCROW nRow ) const; + sal_uLong GetWeightedCount() const; + sal_uLong GetCodeCount() const; // RPN-Code in Formeln + sal_uInt16 GetErrCode( SCROW nRow ) const; - BOOL HasStringData( SCROW nRow ) const; - BOOL HasValueData( SCROW nRow ) const; -//UNUSED2009-05 USHORT GetErrorData( SCROW nRow) const; - BOOL HasStringCells( SCROW nStartRow, SCROW nEndRow ) const; + sal_Bool HasStringData( SCROW nRow ) const; + sal_Bool HasValueData( SCROW nRow ) const; +//UNUSED2009-05 sal_uInt16 GetErrorData( SCROW nRow) const; + sal_Bool HasStringCells( SCROW nStartRow, SCROW nEndRow ) const; /** Returns the pointer to a cell note object at the passed row. */ ScPostIt* GetNote( SCROW nRow ); @@ -283,38 +283,38 @@ public: ScDocument* pUndoDoc = NULL ); void UpdateInsertTab( SCTAB nTable); void UpdateInsertTabOnlyCells( SCTAB nTable); - void UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScColumn* pRefUndo = NULL ); + void UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScColumn* pRefUndo = NULL ); void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo); - void UpdateCompile( BOOL bForceIfNameInUse = FALSE ); + void UpdateCompile( sal_Bool bForceIfNameInUse = sal_False ); void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest, ScDocument* pUndoDoc ); void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ); void SetTabNo(SCTAB nNewTab); - BOOL IsRangeNameInUse(SCROW nRow1, SCROW nRow2, USHORT nIndex) const; - void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set& rIndexes) const; + sal_Bool IsRangeNameInUse(SCROW nRow1, SCROW nRow2, sal_uInt16 nIndex) const; + void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set& rIndexes) const; void ReplaceRangeNamesInUse( SCROW nRow1, SCROW nRow2, const ScRangeData::IndexMap& rMap ); - const SfxPoolItem* GetAttr( SCROW nRow, USHORT nWhich ) const; + const SfxPoolItem* GetAttr( SCROW nRow, sal_uInt16 nWhich ) const; const ScPatternAttr* GetPattern( SCROW nRow ) const; const ScPatternAttr* GetMostUsedPattern( SCROW nStartRow, SCROW nEndRow ) const; - ULONG GetNumberFormat( SCROW nRow ) const; + sal_uLong GetNumberFormat( SCROW nRow ) const; - void MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, BOOL bDeep ) const; - void MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, BOOL bDeep ) const; + void MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, sal_Bool bDeep ) const; + void MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, sal_Bool bDeep ) const; void 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; void ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner, - SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ); + SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ); void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr ); void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr ); void ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr ); - void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE ); + void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, sal_Bool bPutToPool = sal_False ); void SetPatternArea( SCROW nStartRow, SCROW nEndRow, - const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE ); + const ScPatternAttr& rPatAttr, sal_Bool bPutToPool = sal_False ); void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, const ScPatternAttr& rPattern, short nNewType ); @@ -322,63 +322,63 @@ public: void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle ); void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark); void ApplySelectionLineStyle( const ScMarkData& rMark, - const SvxBorderLine* pLine, BOOL bColorOnly ); + const SvxBorderLine* pLine, sal_Bool bColorOnly ); const ScStyleSheet* GetStyle( SCROW nRow ) const; - const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const; - const ScStyleSheet* GetAreaStyle( BOOL& rFound, SCROW nRow1, SCROW nRow2 ) const; + const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const; + const ScStyleSheet* GetAreaStyle( sal_Bool& rFound, SCROW nRow1, SCROW nRow2 ) const; void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset ); - BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const; + sal_Bool IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const; /// May return -1 if not found SCsROW SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle, - BOOL bUp, BOOL bInSelection, const ScMarkData& rMark ); - BOOL SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, - BOOL bUp, BOOL bInSelection, const ScMarkData& rMark ); + sal_Bool bUp, sal_Bool bInSelection, const ScMarkData& rMark ); + sal_Bool SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, + sal_Bool bUp, sal_Bool bInSelection, const ScMarkData& rMark ); - BOOL ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags ); - BOOL RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags ); - void ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich ); + sal_Bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ); + sal_Bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ); + void ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich ); void RemoveProtected( SCROW nStartRow, SCROW nEndRow ); SCsROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark ); - void DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark ); + void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark ); - void ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark ); - void ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark ); + void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); + void ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ); long GetNeededSize( SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bWidth, const ScNeededSizeOptions& rOptions ); - USHORT GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY, + sal_Bool bWidth, const ScNeededSizeOptions& rOptions ); + sal_uInt16 GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bFormula, USHORT nOldWidth, + sal_Bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, - BOOL bSimpleTextImport ); - void GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight, + sal_Bool bSimpleTextImport ); + void GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16* pHeight, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bShrink, USHORT nMinHeight, SCROW nMinStart ); + sal_Bool bShrink, sal_uInt16 nMinHeight, SCROW nMinStart ); private: long GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev, - BOOL bWidth ); + sal_Bool bWidth ); public: /// Including current, may return -1 - SCsROW GetNextUnprotected( SCROW nRow, BOOL bUp ) const; + SCsROW GetNextUnprotected( SCROW nRow, sal_Bool bUp ) const; void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings, bool& rHasDates); - BOOL GetDataEntries(SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit); + sal_Bool GetDataEntries(SCROW nRow, TypedScStrCollection& rStrings, sal_Bool bLimit); //UNUSED2008-05 SCROW NoteCount( SCROW nMaxRow = MAXROW ) const; void UpdateInsertTabAbs(SCTAB nNewPos); - BOOL TestTabRefAbs(SCTAB nTable); - BOOL GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& rData) const; + sal_Bool TestTabRefAbs(SCTAB nTable); + sal_Bool GetNextSpellingCell(SCROW& nRow, sal_Bool bInSel, const ScMarkData& rData) const; void RemoveAutoSpellObj(); @@ -390,8 +390,8 @@ public: void SetRelNameDirty(); void CompileDBFormula(); - void CompileDBFormula( BOOL bCreateFormulaString ); - void CompileNameFormula( BOOL bCreateFormulaString ); + void CompileDBFormula( sal_Bool bCreateFormulaString ); + void CompileNameFormula( sal_Bool bCreateFormulaString ); void CompileColRowNameFormula(); sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const; @@ -399,7 +399,7 @@ public: SCROW nRowStart, SCROW nRowEnd ) const; private: - ScBaseCell* CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestDoc, const ScAddress& rDestPos); + ScBaseCell* CloneCell(SCSIZE nIndex, sal_uInt16 nFlags, ScDocument& rDestDoc, const ScAddress& rDestPos); //UNUSED2008-05 void CorrectSymbolCells( CharSet eStreamCharSet ); }; @@ -414,7 +414,7 @@ public: ScColumnIterator( const ScColumn* pCol, SCROW nStart=0, SCROW nEnd=MAXROW ); ~ScColumnIterator(); - BOOL Next( SCROW& rRow, ScBaseCell*& rpCell ); + sal_Bool Next( SCROW& rRow, ScBaseCell*& rpCell ); SCSIZE GetIndex() const; }; @@ -426,15 +426,15 @@ class ScMarkedDataIter // Daten in selektierten Bereichen durch ScMarkArrayIter* pMarkIter; SCROW nTop; SCROW nBottom; - BOOL bNext; - BOOL bAll; + sal_Bool bNext; + sal_Bool bAll; public: ScMarkedDataIter( const ScColumn* pCol, const ScMarkData* pMarkData, - BOOL bAllIfNone = FALSE ); + sal_Bool bAllIfNone = sal_False ); ~ScMarkedDataIter(); - BOOL Next( SCSIZE& rIndex ); + sal_Bool Next( SCSIZE& rIndex ); }; diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 7d045db3c2aa..27845bbc50cf 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -106,16 +106,16 @@ class ScTokenArray; /* OpCode eOp; // OpCode formula::StackVar eType; // type of data - USHORT nRefCnt; // reference count - BOOL bRaw; // not cloned yet and trimmed to real size + sal_uInt16 nRefCnt; // reference count + sal_Bool bRaw; // not cloned yet and trimmed to real size */ #endif #define SC_TOKEN_FIX_MEMBERS \ OpCode eOp; \ formula::StackVar eType; \ - USHORT nRefCnt; \ - BOOL bRaw; + sal_uInt16 nRefCnt; \ + sal_Bool bRaw; struct ScDoubleRawToken { @@ -126,7 +126,7 @@ public: { // union only to assure alignment identical to ScRawToken double nValue; struct { - BYTE cByte; + sal_uInt8 cByte; bool bHasForceArray; } sbyte; }; @@ -139,14 +139,14 @@ struct ScRawToken // Friends that use a temporary ScRawToken on the stack (and therefor need // the private dtor) and know what they're doing.. friend class ScTokenArray; - friend USHORT lcl_ScRawTokenOffset(); + friend sal_uInt16 lcl_ScRawTokenOffset(); private: SC_TOKEN_FIX_MEMBERS public: union { double nValue; struct { - BYTE cByte; + sal_uInt8 cByte; bool bHasForceArray; } sbyte; ScComplexRefData aRef; @@ -160,13 +160,13 @@ public: sal_Unicode cName[MAXSTRLEN+1]; } extname; ScMatrix* pMat; - USHORT nIndex; // index into name collection + sal_uInt16 nIndex; // index into name collection sal_Unicode cStr[ MAXSTRLEN+1 ]; // string (up to 255 characters + 0) short nJump[MAXJUMPCOUNT+1]; // If/Chose token }; //! other members not initialized - ScRawToken() : bRaw( TRUE ) {} + ScRawToken() : bRaw( sal_True ) {} private: ~ScRawToken() {} //! only delete via Delete() public: @@ -176,7 +176,7 @@ public: void NewOpCode( OpCode e ) { eOp = e; } void IncRef() { nRefCnt++; } void DecRef() { if( !--nRefCnt ) Delete(); } - USHORT GetRef() const { return nRefCnt; } + sal_uInt16 GetRef() const { return nRefCnt; } SC_DLLPUBLIC void Delete(); // Use these methods only on tokens that are not part of a token array, @@ -192,7 +192,7 @@ public: // These methods are ok to use, reference count not cleared. //UNUSED2008-05 ScComplexRefData& GetReference(); //UNUSED2008-05 void SetReference( ScComplexRefData& rRef ); - void SetName( USHORT n ); + void SetName( sal_uInt16 n ); void SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabName, const ScSingleRefData& rRef ); void SetExternalDoubleRef( sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& rRef ); void SetExternalName( sal_uInt16 nFileId, const String& rName ); @@ -201,7 +201,7 @@ public: ScRawToken* Clone() const; // real copy! formula::FormulaToken* CreateToken() const; // create typified token - void Load( SvStream&, USHORT nVer ); + void Load( SvStream&, sal_uInt16 nVer ); static xub_StrLen GetStrLen( const sal_Unicode* pStr ); // as long as a "string" is an array static size_t GetStrLenBytes( xub_StrLen nLen ) @@ -227,7 +227,7 @@ public: struct Convention { const formula::FormulaGrammar::AddressConvention meConv; - const ULONG* mpCharTable; + const sal_uLong* mpCharTable; Convention( formula::FormulaGrammar::AddressConvention eConvP ); @@ -236,7 +236,7 @@ public: virtual void MakeRefStr( rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler, const ScComplexRefData& rRef, - BOOL bSingleRef ) const = 0; + sal_Bool bSingleRef ) const = 0; virtual ::com::sun::star::i18n::ParseResult parseAnyToken( const String& rFormula, xub_StrLen nSrcPos, @@ -316,7 +316,7 @@ private: ScRawTokenRef pRawToken; const CharClass* pCharClass; // which character classification is used for parseAnyToken - USHORT mnPredetectedReference; // reference when reading ODF, 0 (none), 1 (single) or 2 (double) + sal_uInt16 mnPredetectedReference; // reference when reading ODF, 0 (none), 1 (single) or 2 (double) SCsTAB nMaxTab; // last sheet in document sal_Int32 mnRangeOpPosInSymbol; // if and where a range operator is in symbol const Convention *pConv; @@ -325,24 +325,24 @@ private: bool mbExtendedErrorDetection; bool mbRewind; // whether symbol is to be rewound to some step during lexical analysis - BOOL NextNewToken(bool bInArray = false); + sal_Bool NextNewToken(bool bInArray = false); - virtual void SetError(USHORT nError); + virtual void SetError(sal_uInt16 nError); xub_StrLen NextSymbol(bool bInArray); - BOOL IsValue( const String& ); - BOOL IsOpCode( const String&, bool bInArray ); - BOOL IsOpCode2( const String& ); - BOOL IsString(); - BOOL IsReference( const String& ); - BOOL IsSingleReference( const String& ); - BOOL IsPredetectedReference( const String& ); - BOOL IsDoubleReference( const String& ); - BOOL IsMacro( const String& ); - BOOL IsNamedRange( const String& ); + sal_Bool IsValue( const String& ); + sal_Bool IsOpCode( const String&, bool bInArray ); + sal_Bool IsOpCode2( const String& ); + sal_Bool IsString(); + sal_Bool IsReference( const String& ); + sal_Bool IsSingleReference( const String& ); + sal_Bool IsPredetectedReference( const String& ); + sal_Bool IsDoubleReference( const String& ); + sal_Bool IsMacro( const String& ); + sal_Bool IsNamedRange( const String& ); bool IsExternalNamedRange( const String& rSymbol ); - BOOL IsDBRange( const String& ); - BOOL IsColRowName( const String& ); - BOOL IsBoolean( const String& ); + sal_Bool IsDBRange( const String& ); + sal_Bool IsColRowName( const String& ); + sal_Bool IsBoolean( const String& ); void AutoCorrectParsedSymbol(); void SetRelNameReference(); @@ -361,7 +361,7 @@ public: static void CheckTabQuotes( String& aTabName, const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ); - static BOOL EnQuote( String& rStr ); + static sal_Bool EnQuote( String& rStr ); sal_Unicode GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const; @@ -370,7 +370,7 @@ public: //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both // #i101512# SetCompileForFAP is in formula::FormulaCompiler - void SetAutoCorrection( BOOL bVal ) + void SetAutoCorrection( sal_Bool bVal ) { bAutoCorrect = bVal; bIgnoreErrors = bVal; } void SetCloseBrackets( bool bVal ) { mbCloseBrackets = bVal; } void SetRefConvention( const Convention *pConvP ); @@ -410,7 +410,7 @@ public: void SetExtendedErrorDetection( bool bVal ) { mbExtendedErrorDetection = bVal; } - BOOL IsCorrected() { return bCorrected; } + sal_Bool IsCorrected() { return bCorrected; } const String& GetCorrectedFormula() { return aCorrectedFormula; } // Use convention from this->aPos by default @@ -423,15 +423,15 @@ public: static void MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ); - BOOL UpdateNameReference( UpdateRefMode eUpdateRefMode, + sal_Bool UpdateNameReference( UpdateRefMode eUpdateRefMode, const ScRange&, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - BOOL& rChanged, BOOL bSharedFormula = FALSE); + sal_Bool& rChanged, sal_Bool bSharedFormula = sal_False); ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode, const ScAddress& rOldPos, const ScRange&, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - BOOL& rChanged, BOOL& rRefSizeChanged ); + sal_Bool& rChanged, sal_Bool& rRefSizeChanged ); /// Only once for converted shared formulas, /// token array has to be compiled afterwards. @@ -439,24 +439,24 @@ public: const ScAddress& rOldPos, const ScRange&, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - ScRangeData* UpdateInsertTab(SCTAB nTable, BOOL bIsName ); - ScRangeData* UpdateDeleteTab(SCTAB nTable, BOOL bIsMove, BOOL bIsName, BOOL& bCompile); - ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, BOOL bIsName ); + ScRangeData* UpdateInsertTab(SCTAB nTable, sal_Bool bIsName ); + ScRangeData* UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove, sal_Bool bIsName, sal_Bool& bCompile); + ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, sal_Bool bIsName ); - BOOL HasModifiedRange(); + sal_Bool HasModifiedRange(); /** If the character is allowed as first character in sheet names or references, includes '$' and '?'. */ - static inline BOOL IsCharWordChar( String const & rStr, + static inline sal_Bool IsCharWordChar( String const & rStr, xub_StrLen nPos, const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ) { sal_Unicode c = rStr.GetChar( nPos ); if (c < 128) { - return pConventions[eConv] ? static_cast( - (pConventions[eConv]->mpCharTable[ UINT8(c) ] & SC_COMPILER_C_CHAR_WORD) == SC_COMPILER_C_CHAR_WORD) : - FALSE; // no convention => assume invalid + return pConventions[eConv] ? static_cast( + (pConventions[eConv]->mpCharTable[ sal_uInt8(c) ] & SC_COMPILER_C_CHAR_WORD) == SC_COMPILER_C_CHAR_WORD) : + sal_False; // no convention => assume invalid } else return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos ); @@ -464,16 +464,16 @@ public: /** If the character is allowed in sheet names, thus may be part of a reference, includes '$' and '?' and such. */ - static inline BOOL IsWordChar( String const & rStr, + static inline sal_Bool IsWordChar( String const & rStr, xub_StrLen nPos, const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ) { sal_Unicode c = rStr.GetChar( nPos ); if (c < 128) { - return pConventions[eConv] ? static_cast( - (pConventions[eConv]->mpCharTable[ UINT8(c) ] & SC_COMPILER_C_WORD) == SC_COMPILER_C_WORD) : - FALSE; // convention not known => assume invalid + return pConventions[eConv] ? static_cast( + (pConventions[eConv]->mpCharTable[ sal_uInt8(c) ] & SC_COMPILER_C_WORD) == SC_COMPILER_C_WORD) : + sal_False; // convention not known => assume invalid } else return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos ); @@ -481,11 +481,11 @@ public: /** If the character is allowed as tested by nFlags (SC_COMPILER_C_... bits) for all known address conventions. If more than one bit is given - in nFlags, all bits must match. If bTestLetterNumeric is FALSE and - char>=128, no LetterNumeric test is done and FALSE is returned. */ + in nFlags, all bits must match. If bTestLetterNumeric is sal_False and + char>=128, no LetterNumeric test is done and sal_False is returned. */ static inline bool IsCharFlagAllConventions( String const & rStr, xub_StrLen nPos, - ULONG nFlags, + sal_uLong nFlags, bool bTestLetterNumeric = true ) { sal_Unicode c = rStr.GetChar( nPos ); @@ -495,7 +495,7 @@ public: ++nConv < formula::FormulaGrammar::CONV_LAST; ) { if (pConventions[nConv] && - ((pConventions[nConv]->mpCharTable[ UINT8(c) ] & nFlags) != nFlags)) + ((pConventions[nConv]->mpCharTable[ sal_uInt8(c) ] & nFlags) != nFlags)) return false; // convention not known => assume valid } @@ -509,16 +509,16 @@ public: private: // FormulaCompiler - virtual String FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const; + virtual String FindAddInFunction( const String& rUpperName, sal_Bool bLocalFirst ) const; virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const; virtual void fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr xMap ) const; virtual void fillFromAddInMap( NonConstOpCodeMapPtr xMap, formula::FormulaGrammar::Grammar _eGrammar ) const; virtual void fillAddInToken(::std::vector< ::com::sun::star::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const; - virtual BOOL HandleExternalReference(const formula::FormulaToken& _aToken); - virtual BOOL HandleRange(); - virtual BOOL HandleSingleRef(); - virtual BOOL HandleDbData(); + virtual sal_Bool HandleExternalReference(const formula::FormulaToken& _aToken); + virtual sal_Bool HandleRange(); + virtual sal_Bool HandleSingleRef(); + virtual sal_Bool HandleDbData(); virtual formula::FormulaTokenRef ExtendRangeReference( formula::FormulaToken & rTok1, formula::FormulaToken & rTok2, bool bReuseDoubleRef ); virtual void CreateStringFromExternal(rtl::OUStringBuffer& rBuffer, formula::FormulaToken* pTokenP); @@ -527,11 +527,11 @@ private: virtual void CreateStringFromMatrix( rtl::OUStringBuffer& rBuffer, formula::FormulaToken* _pTokenP); virtual void CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,formula::FormulaToken* _pTokenP); virtual void LocalizeString( String& rName ); // modify rName - input: exact name - virtual BOOL IsImportingXML() const; + virtual sal_Bool IsImportingXML() const; /// Access the CharTable flags - inline ULONG GetCharTableFlags( sal_Unicode c ) - { return c < 128 ? pConv->mpCharTable[ UINT8(c) ] : 0; } + inline sal_uLong GetCharTableFlags( sal_Unicode c ) + { return c < 128 ? pConv->mpCharTable[ sal_uInt8(c) ] : 0; } }; SC_DLLPUBLIC String GetScCompilerNativeSymbol( OpCode eOp ); //CHINA001 diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx index 3b6f35366976..ba7a351a3c49 100644 --- a/sc/inc/compressedarray.hxx +++ b/sc/inc/compressedarray.hxx @@ -51,7 +51,7 @@ template< typename A, typename D > class ScCompressedArrayIterator; typename A := access type, e.g. SCROW or SCCOL, must be a POD. - typename D := data type, e.g. USHORT or BYTE or whatever, may also be a + typename D := data type, e.g. sal_uInt16 or sal_uInt8 or whatever, may also be a struct or class. D::operator==() and D::operator=() must be implemented. Force template diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index 75758841af7a..672f1dca688b 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -74,7 +74,7 @@ class SC_DLLPUBLIC ScConditionEntry { // gespeicherte Daten: ScConditionMode eOp; - USHORT nOptions; + sal_uInt16 nOptions; double nVal1; // eingegeben oder berechnet double nVal2; String aStrVal1; // eingegeben oder berechnet @@ -83,8 +83,8 @@ class SC_DLLPUBLIC ScConditionEntry String aStrNmsp2; // namespace to be used on (re)compilation, e.g. in XML import formula::FormulaGrammar::Grammar eTempGrammar1; // grammar to be used on (re)compilation, e.g. in XML import formula::FormulaGrammar::Grammar eTempGrammar2; // grammar to be used on (re)compilation, e.g. in XML import - BOOL bIsStr1; // um auch leere Strings zu erkennen - BOOL bIsStr2; + sal_Bool bIsStr1; // um auch leere Strings zu erkennen + sal_Bool bIsStr2; ScTokenArray* pFormula1; // eingegebene Formel ScTokenArray* pFormula2; ScAddress aSrcPos; // source position for formulas @@ -93,20 +93,20 @@ class SC_DLLPUBLIC ScConditionEntry ScFormulaCell* pFCell1; ScFormulaCell* pFCell2; ScDocument* pDoc; - BOOL bRelRef1; - BOOL bRelRef2; - BOOL bFirstRun; + sal_Bool bRelRef1; + sal_Bool bRelRef2; + sal_Bool bFirstRun; void MakeCells( const ScAddress& rPos ); void Compile( const String& rExpr1, const String& rExpr2, const String& rExprNmsp1, const String& rExprNmsp2, formula::FormulaGrammar::Grammar eGrammar1, formula::FormulaGrammar::Grammar eGrammar2, - BOOL bTextToReal ); + sal_Bool bTextToReal ); void Interpret( const ScAddress& rPos ); - BOOL IsValid( double nArg ) const; - BOOL IsValidStr( const String& rArg ) const; + sal_Bool IsValid( double nArg ) const; + sal_Bool IsValidStr( const String& rArg ) const; public: ScConditionEntry( ScConditionMode eOper, @@ -125,11 +125,11 @@ public: int operator== ( const ScConditionEntry& r ) const; - BOOL IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) const; + sal_Bool IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) const; ScConditionMode GetOperation() const { return eOp; } - BOOL IsIgnoreBlank() const { return ( nOptions & SC_COND_NOBLANKS ) == 0; } - void SetIgnoreBlank(BOOL bSet); + sal_Bool IsIgnoreBlank() const { return ( nOptions & SC_COND_NOBLANKS ) == 0; } + void SetIgnoreBlank(sal_Bool bSet); ScAddress GetSrcPos() const { return aSrcPos; } ScAddress GetValidSrcPos() const; // adjusted to allow textual representation of expressions @@ -139,10 +139,10 @@ public: void SetFormula1( const ScTokenArray& rArray ); void SetFormula2( const ScTokenArray& rArray ); - String GetExpression( const ScAddress& rCursor, USHORT nPos, ULONG nNumFmt = 0, + String GetExpression( const ScAddress& rCursor, sal_uInt16 nPos, sal_uLong nNumFmt = 0, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const; - ScTokenArray* CreateTokenArry( USHORT nPos ) const; + ScTokenArray* CreateTokenArry( sal_uInt16 nPos ) const; void CompileAll(); void CompileXML(); @@ -210,8 +210,8 @@ class SC_DLLPUBLIC ScConditionalFormat ScRangeList* pAreas; // Bereiche fuer Paint sal_uInt32 nKey; // Index in Attributen ScCondFormatEntry** ppEntries; - USHORT nEntryCount; - BOOL bIsUsed; // temporaer beim Speichern + sal_uInt16 nEntryCount; + sal_Bool bIsUsed; // temporaer beim Speichern public: ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument); @@ -223,8 +223,8 @@ public: void AddEntry( const ScCondFormatEntry& rNew ); - BOOL IsEmpty() const { return (nEntryCount == 0); } - USHORT Count() const { return nEntryCount; } + sal_Bool IsEmpty() const { return (nEntryCount == 0); } + sal_uInt16 Count() const { return nEntryCount; } void CompileAll(); void CompileXML(); @@ -235,11 +235,11 @@ public: void SourceChanged( const ScAddress& rAddr ); - const ScCondFormatEntry* GetEntry( USHORT nPos ) const; + const ScCondFormatEntry* GetEntry( sal_uInt16 nPos ) const; const String& GetCellStyle( ScBaseCell* pCell, const ScAddress& rPos ) const; - BOOL EqualEntries( const ScConditionalFormat& r ) const; + sal_Bool EqualEntries( const ScConditionalFormat& r ) const; void DoRepaint( const ScRange* pModified ); void InvalidateArea(); @@ -247,15 +247,15 @@ public: sal_uInt32 GetKey() const { return nKey; } void SetKey(sal_uInt32 nNew) { nKey = nNew; } // nur wenn nicht eingefuegt! - void SetUsed(BOOL bSet) { bIsUsed = bSet; } - BOOL IsUsed() const { return bIsUsed; } + void SetUsed(sal_Bool bSet) { bIsUsed = bSet; } + sal_Bool IsUsed() const { return bIsUsed; } bool MarkUsedExternalReferences() const; // sortiert (per PTRARR) nach Index // operator== nur fuer die Sortierung - BOOL operator ==( const ScConditionalFormat& r ) const { return nKey == r.nKey; } - BOOL operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; } + sal_Bool operator ==( const ScConditionalFormat& r ) const { return nKey == r.nKey; } + sal_Bool operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; } }; // @@ -293,7 +293,7 @@ public: * references are marked now. */ bool MarkUsedExternalReferences() const; - BOOL operator==( const ScConditionalFormatList& r ) const; // fuer Ref-Undo + sal_Bool operator==( const ScConditionalFormatList& r ) const; // fuer Ref-Undo }; #endif diff --git a/sc/inc/consoli.hxx b/sc/inc/consoli.hxx index 4eb30b12c432..866c2c1ec3d7 100644 --- a/sc/inc/consoli.hxx +++ b/sc/inc/consoli.hxx @@ -84,13 +84,13 @@ class ScConsData { private: ScSubTotalFunc eFunction; - BOOL bReference; - BOOL bColByName; - BOOL bRowByName; - BOOL bSubTitles; + sal_Bool bReference; + sal_Bool bColByName; + sal_Bool bRowByName; + sal_Bool bSubTitles; SCSIZE nColCount; SCSIZE nRowCount; - BOOL** ppUsed; + sal_Bool** ppUsed; double** ppSum; double** ppCount; double** ppSumSqr; @@ -101,7 +101,7 @@ private: SCSIZE nTitleCount; String** ppTitles; SCSIZE** ppTitlePos; - BOOL bCornerUsed; + sal_Bool bCornerUsed; String aCornerText; // nur bei bColByName && bRowByName public: @@ -109,9 +109,9 @@ public: ~ScConsData(); void SetSize( SCCOL nCols, SCROW nRows ); - void SetFlags( ScSubTotalFunc eFunc, BOOL bColName, BOOL bRowName, BOOL bRef ); + void SetFlags( ScSubTotalFunc eFunc, sal_Bool bColName, sal_Bool bRowName, sal_Bool bRef ); - void InitData(BOOL bDelete=TRUE); + void InitData(sal_Bool bDelete=sal_True); void DeleteData(); void AddFields( ScDocument* pSrcDoc, SCTAB nTab, diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx index c9a5305a05ca..e11066a8d8b6 100644 --- a/sc/inc/dapiuno.hxx +++ b/sc/inc/dapiuno.hxx @@ -85,8 +85,8 @@ class ScDataPilotItemObj; class ScDataPilotConversion { public: - static com::sun::star::sheet::GeneralFunction FirstFunc( USHORT nBits ); - static USHORT FunctionBit( com::sun::star::sheet::GeneralFunction eFunc ); + static com::sun::star::sheet::GeneralFunction FirstFunc( sal_uInt16 nBits ); + static sal_uInt16 FunctionBit( com::sun::star::sheet::GeneralFunction eFunc ); static void FillGroupInfo( ::com::sun::star::sheet::DataPilotFieldGroupInfo& rInfo, diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx index 79902b367ac7..43c26b9fdb0d 100644 --- a/sc/inc/datauno.hxx +++ b/sc/inc/datauno.hxx @@ -121,7 +121,7 @@ class ScSubTotalDescriptorBase : public cppu::WeakImplHelper6< private: SfxItemPropertySet aPropSet; - ScSubTotalFieldObj* GetObjectByIndex_Impl(USHORT nIndex); + ScSubTotalFieldObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); public: ScSubTotalDescriptorBase(); @@ -260,10 +260,10 @@ class ScSubTotalFieldObj : public cppu::WeakImplHelper2< private: com::sun::star::uno::Reference xRef; ScSubTotalDescriptorBase& rParent; - USHORT nPos; + sal_uInt16 nPos; public: - ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, USHORT nP ); + ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP ); virtual ~ScSubTotalFieldObj(); // XSubTotalField @@ -608,7 +608,7 @@ class ScDatabaseRangesObj : public cppu::WeakImplHelper4< private: ScDocShell* pDocShell; - ScDatabaseRangeObj* GetObjectByIndex_Impl(USHORT nIndex); + ScDatabaseRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); ScDatabaseRangeObj* GetObjectByName_Impl(const ::rtl::OUString& aName); public: diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx index 72356683d1a4..2398a142ee4e 100644 --- a/sc/inc/dbcolect.hxx +++ b/sc/inc/dbcolect.hxx @@ -53,70 +53,70 @@ private: SCROW nStartRow; SCCOL nEndCol; SCROW nEndRow; - BOOL bByRow; - BOOL bHasHeader; - BOOL bDoSize; - BOOL bKeepFmt; - BOOL bStripData; + sal_Bool bByRow; + sal_Bool bHasHeader; + sal_Bool bDoSize; + sal_Bool bKeepFmt; + sal_Bool bStripData; // SortParam - BOOL bSortCaseSens; - BOOL bIncludePattern; - BOOL bSortInplace; - BOOL bSortUserDef; - USHORT nSortUserIndex; + sal_Bool bSortCaseSens; + sal_Bool bIncludePattern; + sal_Bool bSortInplace; + sal_Bool bSortUserDef; + sal_uInt16 nSortUserIndex; SCTAB nSortDestTab; SCCOL nSortDestCol; SCROW nSortDestRow; - BOOL bDoSort[MAXSORT]; + sal_Bool bDoSort[MAXSORT]; SCCOLROW nSortField[MAXSORT]; - BOOL bAscending[MAXSORT]; + sal_Bool bAscending[MAXSORT]; ::com::sun::star::lang::Locale aSortLocale; String aSortAlgorithm; // QueryParam - BOOL bQueryInplace; - BOOL bQueryCaseSens; - BOOL bQueryRegExp; - BOOL bQueryDuplicate; + sal_Bool bQueryInplace; + sal_Bool bQueryCaseSens; + sal_Bool bQueryRegExp; + sal_Bool bQueryDuplicate; SCTAB nQueryDestTab; SCCOL nQueryDestCol; SCROW nQueryDestRow; - BOOL bDoQuery[MAXQUERY]; + sal_Bool bDoQuery[MAXQUERY]; SCCOLROW nQueryField[MAXQUERY]; ScQueryOp eQueryOp[MAXQUERY]; - BOOL bQueryByString[MAXQUERY]; + sal_Bool bQueryByString[MAXQUERY]; bool bQueryByDate[MAXQUERY]; String* pQueryStr[MAXQUERY]; double nQueryVal[MAXQUERY]; ScQueryConnect eQueryConnect[MAXQUERY]; - BOOL bIsAdvanced; // TRUE if created by advanced filter + sal_Bool bIsAdvanced; // sal_True if created by advanced filter ScRange aAdvSource; // source range // SubTotalParam - BOOL bSubRemoveOnly; - BOOL bSubReplace; - BOOL bSubPagebreak; - BOOL bSubCaseSens; - BOOL bSubDoSort; - BOOL bSubAscending; - BOOL bSubIncludePattern; - BOOL bSubUserDef; - USHORT nSubUserIndex; - BOOL bDoSubTotal[MAXSUBTOTAL]; + sal_Bool bSubRemoveOnly; + sal_Bool bSubReplace; + sal_Bool bSubPagebreak; + sal_Bool bSubCaseSens; + sal_Bool bSubDoSort; + sal_Bool bSubAscending; + sal_Bool bSubIncludePattern; + sal_Bool bSubUserDef; + sal_uInt16 nSubUserIndex; + sal_Bool bDoSubTotal[MAXSUBTOTAL]; SCCOL nSubField[MAXSUBTOTAL]; SCCOL nSubTotals[MAXSUBTOTAL]; SCCOL* pSubTotals[MAXSUBTOTAL]; ScSubTotalFunc* pFunctions[MAXSUBTOTAL]; // Datenbank-Import - BOOL bDBImport; + sal_Bool bDBImport; String aDBName; String aDBStatement; - BOOL bDBNative; - BOOL bDBSelection; // nicht im Param: Wenn Selektion, Update sperren - BOOL bDBSql; // aDBStatement ist SQL und kein Name - BYTE nDBType; // enum DBObject (bisher nur dbTable, dbQuery) + sal_Bool bDBNative; + sal_Bool bDBSelection; // nicht im Param: Wenn Selektion, Update sperren + sal_Bool bDBSql; // aDBStatement ist SQL und kein Name + sal_uInt8 nDBType; // enum DBObject (bisher nur dbTable, dbQuery) - USHORT nIndex; // eindeutiger Index fuer Formeln - BOOL bAutoFilter; // AutoFilter? (nicht gespeichert) - BOOL bModified; // wird bei UpdateReference gesetzt/geloescht + sal_uInt16 nIndex; // eindeutiger Index fuer Formeln + sal_Bool bAutoFilter; // AutoFilter? (nicht gespeichert) + sal_Bool bModified; // wird bei UpdateReference gesetzt/geloescht using ScRefreshTimer::operator==; @@ -124,7 +124,7 @@ public: SC_DLLPUBLIC ScDBData(const String& rName, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - BOOL bByR = TRUE, BOOL bHasH = TRUE); + sal_Bool bByR = sal_True, sal_Bool bHasH = sal_True); ScDBData(const ScDBData& rData); ~ScDBData(); @@ -132,7 +132,7 @@ public: ScDBData& operator= (const ScDBData& rData); - BOOL operator== (const ScDBData& rData) const; + sal_Bool operator== (const ScDBData& rData) const; const String& GetName() const { return aName; } void GetName(String& rName) const { rName = aName; } @@ -141,20 +141,20 @@ public: SC_DLLPUBLIC void GetArea(ScRange& rRange) const; void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); void MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); - BOOL IsByRow() const { return bByRow; } - void SetByRow(BOOL bByR) { bByRow = bByR; } - BOOL HasHeader() const { return bHasHeader; } - void SetHeader(BOOL bHasH) { bHasHeader = bHasH; } - void SetIndex(USHORT nInd) { nIndex = nInd; } - USHORT GetIndex() const { return nIndex; } - BOOL IsDoSize() const { return bDoSize; } - void SetDoSize(BOOL bSet) { bDoSize = bSet; } - BOOL IsKeepFmt() const { return bKeepFmt; } - void SetKeepFmt(BOOL bSet) { bKeepFmt = bSet; } - BOOL IsStripData() const { return bStripData; } - void SetStripData(BOOL bSet) { bStripData = bSet; } - -//UNUSED2008-05 BOOL IsBeyond(SCROW nMaxRow) const; + sal_Bool IsByRow() const { return bByRow; } + void SetByRow(sal_Bool bByR) { bByRow = bByR; } + sal_Bool HasHeader() const { return bHasHeader; } + void SetHeader(sal_Bool bHasH) { bHasHeader = bHasH; } + void SetIndex(sal_uInt16 nInd) { nIndex = nInd; } + sal_uInt16 GetIndex() const { return nIndex; } + sal_Bool IsDoSize() const { return bDoSize; } + void SetDoSize(sal_Bool bSet) { bDoSize = bSet; } + sal_Bool IsKeepFmt() const { return bKeepFmt; } + void SetKeepFmt(sal_Bool bSet) { bKeepFmt = bSet; } + sal_Bool IsStripData() const { return bStripData; } + void SetStripData(sal_Bool bSet) { bStripData = bSet; } + +//UNUSED2008-05 sal_Bool IsBeyond(SCROW nMaxRow) const; String GetSourceString() const; String GetOperations() const; @@ -164,7 +164,7 @@ public: SC_DLLPUBLIC void GetQueryParam(ScQueryParam& rQueryParam) const; SC_DLLPUBLIC void SetQueryParam(const ScQueryParam& rQueryParam); - SC_DLLPUBLIC BOOL GetAdvancedQuerySource(ScRange& rSource) const; + SC_DLLPUBLIC sal_Bool GetAdvancedQuerySource(ScRange& rSource) const; SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange* pSource); void GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const; @@ -173,22 +173,22 @@ public: void GetImportParam(ScImportParam& rImportParam) const; void SetImportParam(const ScImportParam& rImportParam); - BOOL IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const; - BOOL IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; + sal_Bool IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const; + sal_Bool IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; - BOOL HasImportParam() const { return bDBImport; } - BOOL HasQueryParam() const { return bDoQuery[0]; } - BOOL HasSortParam() const { return bDoSort[0]; } - BOOL HasSubTotalParam() const { return bDoSubTotal[0]; } + sal_Bool HasImportParam() const { return bDBImport; } + sal_Bool HasQueryParam() const { return bDoQuery[0]; } + sal_Bool HasSortParam() const { return bDoSort[0]; } + sal_Bool HasSubTotalParam() const { return bDoSubTotal[0]; } - BOOL HasImportSelection() const { return bDBSelection; } - void SetImportSelection(BOOL bSet) { bDBSelection = bSet; } + sal_Bool HasImportSelection() const { return bDBSelection; } + void SetImportSelection(sal_Bool bSet) { bDBSelection = bSet; } - BOOL HasAutoFilter() const { return bAutoFilter; } - void SetAutoFilter(BOOL bSet) { bAutoFilter = bSet; } + sal_Bool HasAutoFilter() const { return bAutoFilter; } + void SetAutoFilter(sal_Bool bSet) { bAutoFilter = bSet; } - BOOL IsModified() const { return bModified; } - void SetModified(BOOL bMod) { bModified = bMod; } + sal_Bool IsModified() const { return bModified; } + void SetModified(sal_Bool bMod) { bModified = bMod; } }; @@ -199,10 +199,10 @@ class SC_DLLPUBLIC ScDBCollection : public ScSortedCollection private: Link aRefreshHandler; ScDocument* pDoc; - USHORT nEntryIndex; // Zaehler fuer die eindeutigen Indizes + sal_uInt16 nEntryIndex; // Zaehler fuer die eindeutigen Indizes public: - ScDBCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE, ScDocument* pDocument = NULL) : + ScDBCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False, ScDocument* pDocument = NULL) : ScSortedCollection ( nLim, nDel, bDup ), pDoc ( pDocument ), nEntryIndex ( SC_START_INDEX_DB_COLL ) // oberhalb der Namen @@ -214,13 +214,13 @@ public: {} virtual ScDataObject* Clone() const { return new ScDBCollection(*this); } - ScDBData* operator[]( const USHORT nIndex) const {return (ScDBData*)At(nIndex);} + ScDBData* operator[]( const sal_uInt16 nIndex) const {return (ScDBData*)At(nIndex);} virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; - ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const; + virtual sal_Bool IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; + ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const; ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; - BOOL SearchName( const String& rName, USHORT& rIndex ) const; + sal_Bool SearchName( const String& rName, sal_uInt16& rIndex ) const; void DeleteOnTab( SCTAB nTab ); void UpdateReference(UpdateRefMode eUpdateRefMode, @@ -229,10 +229,10 @@ public: SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); - ScDBData* FindIndex(USHORT nIndex); - USHORT GetEntryIndex() { return nEntryIndex; } - void SetEntryIndex(USHORT nInd) { nEntryIndex = nInd; } - virtual BOOL Insert(ScDataObject* pScDataObject); + ScDBData* FindIndex(sal_uInt16 nIndex); + sal_uInt16 GetEntryIndex() { return nEntryIndex; } + void SetEntryIndex(sal_uInt16 nInd) { nEntryIndex = nInd; } + virtual sal_Bool Insert(ScDataObject* pScDataObject); void SetRefreshHandler( const Link& rLink ) { aRefreshHandler = rLink; } diff --git a/sc/inc/dbdocutl.hxx b/sc/inc/dbdocutl.hxx index 3071b542f4b6..2a3f2500d170 100644 --- a/sc/inc/dbdocutl.hxx +++ b/sc/inc/dbdocutl.hxx @@ -45,7 +45,7 @@ public: static void PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow>& xRow, long nRowPos, - long nType, BOOL bCurrency, BOOL* pSimpleFlag = NULL ); + long nType, sal_Bool bCurrency, sal_Bool* pSimpleFlag = NULL ); }; #endif diff --git a/sc/inc/dbtoken.hxx b/sc/inc/dbtoken.hxx index 1cdacfd97323..d19033e367e6 100644 --- a/sc/inc/dbtoken.hxx +++ b/sc/inc/dbtoken.hxx @@ -37,17 +37,17 @@ // aA - dump old/new token array // uU - dump old/new UPN array -BOOL DbgToken( char ); +sal_Bool DbgToken( char ); ScTokenArray* DbgMakeTokenArray - ( ScDocument* pDoc, SCTAB nTab, const String& r, USHORT& rErr ); -void DbgDumpTokenArray( const BYTE* pArr, USHORT nLen, const char* pMsg ); + ( ScDocument* pDoc, SCTAB nTab, const String& r, sal_uInt16& rErr ); +void DbgDumpTokenArray( const sal_uInt8* pArr, sal_uInt16 nLen, const char* pMsg ); void DbgDelTokenArray( ScTokenArray* ); formula::StackVar DbgInterpret( ScDocument* pDok, const ScTokenArray* pToken, SCCOL nCOL, SCROW nROW, SCTAB nTAB, formula::StackVar eformula::StackVar, char* &rStringErgPtr, double& rDoubleErg, - USHORT& rError, + sal_uInt16& rError, ScMatrix** ppMat); #endif diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx index 31055c270fbf..42798af66bba 100644 --- a/sc/inc/detdata.hxx +++ b/sc/inc/detdata.hxx @@ -83,10 +83,10 @@ SV_DECL_PTRARR_DEL(ScDetOpArr_Impl, ScDetOpDataPtr, SC_DETOP_GROW, SC_DETOP_GROW class ScDetOpList : public ScDetOpArr_Impl { - BOOL bHasAddError; // updated in Append + sal_Bool bHasAddError; // updated in Append public: - ScDetOpList() : bHasAddError(FALSE) {} + ScDetOpList() : bHasAddError(sal_False) {} ScDetOpList(const ScDetOpList& rList); ~ScDetOpList() {} @@ -94,11 +94,11 @@ public: void UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - BOOL operator==( const ScDetOpList& r ) const; // fuer Ref-Undo + sal_Bool operator==( const ScDetOpList& r ) const; // fuer Ref-Undo void Append( ScDetOpData* pData ); - BOOL HasAddError() const { return bHasAddError; } + sal_Bool HasAddError() const { return bHasAddError; } }; diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx index 5c57d32af898..c13da22f7453 100644 --- a/sc/inc/detfunc.hxx +++ b/sc/inc/detfunc.hxx @@ -62,7 +62,7 @@ class SC_DLLPUBLIC ScDetectiveFunc static ColorData nArrowColor; static ColorData nErrorColor; static ColorData nCommentColor; - static BOOL bColorsInitialized; + static sal_Bool bColorsInitialized; ScDocument* pDoc; SCTAB nTab; @@ -85,80 +85,80 @@ class SC_DLLPUBLIC ScDetectiveFunc /** Returns the drawing layer rectangle for the passed cell address. */ Rectangle GetDrawRect( SCCOL nCol, SCROW nRow ) const; - BOOL HasArrow( const ScAddress& rStart, + sal_Bool HasArrow( const ScAddress& rStart, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab ); - void DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt ); + void DeleteArrowsAt( SCCOL nCol, SCROW nRow, sal_Bool bDestPnt ); void DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); - BOOL HasError( const ScRange& rRange, ScAddress& rErrPos ); + sal_Bool HasError( const ScRange& rRange, ScAddress& rErrPos ); void FillAttributes( ScDetectiveData& rData ); // called from DrawEntry/DrawAlienEntry and InsertObject - BOOL InsertArrow( SCCOL nCol, SCROW nRow, + sal_Bool 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 ); - BOOL InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, BOOL bRed, + sal_Bool InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, + SCCOL nEndCol, SCROW nEndRow, sal_Bool bRed, ScDetectiveData& rData ); // DrawEntry / DrawAlienEntry check for existing arrows and errors - BOOL DrawEntry( SCCOL nCol, SCROW nRow, const ScRange& rRef, + sal_Bool DrawEntry( SCCOL nCol, SCROW nRow, const ScRange& rRef, ScDetectiveData& rData ); - BOOL DrawAlienEntry( const ScRange& rRef, + sal_Bool DrawAlienEntry( const ScRange& rRef, ScDetectiveData& rData ); void DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData ); - USHORT InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData, USHORT nLevel ); - USHORT InsertPredLevelArea( const ScRange& rRef, - ScDetectiveData& rData, USHORT nLevel ); - USHORT FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, USHORT nDeleteLevel ); - USHORT FindPredLevelArea( const ScRange& rRef, - USHORT nLevel, USHORT nDeleteLevel ); + sal_uInt16 InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData, sal_uInt16 nLevel ); + sal_uInt16 InsertPredLevelArea( const ScRange& rRef, + ScDetectiveData& rData, sal_uInt16 nLevel ); + sal_uInt16 FindPredLevel( SCCOL nCol, SCROW nRow, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel ); + sal_uInt16 FindPredLevelArea( const ScRange& rRef, + sal_uInt16 nLevel, sal_uInt16 nDeleteLevel ); - USHORT InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData, USHORT nLevel ); + sal_uInt16 InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData, sal_uInt16 nLevel ); - USHORT InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - ScDetectiveData& rData, USHORT nLevel ); - USHORT FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - USHORT nLevel, USHORT nDeleteLevel ); + sal_uInt16 InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + ScDetectiveData& rData, sal_uInt16 nLevel ); + sal_uInt16 FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + sal_uInt16 nLevel, sal_uInt16 nDeleteLevel ); - BOOL FindFrameForObject( SdrObject* pObject, ScRange& rRange ); + sal_Bool FindFrameForObject( SdrObject* pObject, ScRange& rRange ); void Modified(); public: ScDetectiveFunc(ScDocument* pDocument, SCTAB nTable) : pDoc(pDocument),nTab(nTable) {} - BOOL ShowSucc( SCCOL nCol, SCROW nRow ); - BOOL ShowPred( SCCOL nCol, SCROW nRow ); - BOOL ShowError( SCCOL nCol, SCROW nRow ); + sal_Bool ShowSucc( SCCOL nCol, SCROW nRow ); + sal_Bool ShowPred( SCCOL nCol, SCROW nRow ); + sal_Bool ShowError( SCCOL nCol, SCROW nRow ); - BOOL DeleteSucc( SCCOL nCol, SCROW nRow ); - BOOL DeletePred( SCCOL nCol, SCROW nRow ); - BOOL DeleteAll( ScDetectiveDelete eWhat ); + sal_Bool DeleteSucc( SCCOL nCol, SCROW nRow ); + sal_Bool DeletePred( SCCOL nCol, SCROW nRow ); + sal_Bool DeleteAll( ScDetectiveDelete eWhat ); - BOOL MarkInvalid(BOOL& rOverflow); + sal_Bool MarkInvalid(sal_Bool& rOverflow); static void UpdateAllComments( ScDocument& rDoc ); // on all tables void UpdateAllArrowColors(); // on all tables - static BOOL IsNonAlienArrow( SdrObject* pObject ); + static sal_Bool IsNonAlienArrow( SdrObject* pObject ); ScDetectiveObjType GetDetectiveObjectType( SdrObject* pObject, SCTAB nObjTab, - ScAddress& rPosition, ScRange& rSource, BOOL& rRedLine ); + ScAddress& rPosition, ScRange& rSource, sal_Bool& rRedLine ); void InsertObject( ScDetectiveObjType eType, const ScAddress& rPosition, - const ScRange& rSource, BOOL bRedLine ); + const ScRange& rSource, sal_Bool bRedLine ); static ColorData GetArrowColor(); static ColorData GetErrorColor(); static ColorData GetCommentColor(); static void InitializeColors(); - static BOOL IsColorsInitialized(); + static sal_Bool IsColorsInitialized(); }; diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index d995550a2f1d..e61d1f0281c8 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -64,15 +64,15 @@ private: SCSIZE nColPos; SCSIZE nAttrPos; - BOOL GetThis(); - BOOL GetThisCol(); + sal_Bool GetThis(); + sal_Bool GetThisCol(); public: ScDocumentIterator( ScDocument* pDocument, SCTAB nStartTable, SCTAB nEndTable ); ~ScDocumentIterator(); - BOOL GetFirst(); - BOOL GetNext(); + sal_Bool GetFirst(); + sal_Bool GetNext(); ScBaseCell* GetCell(); const ScPatternAttr* GetPattern(); @@ -85,8 +85,8 @@ private: double fNextValue; ScDocument* pDoc; const ScAttrArray* pAttrArray; - ULONG nNumFormat; // fuer CalcAsShown - ULONG nNumFmtIndex; + sal_uLong nNumFormat; // fuer CalcAsShown + sal_uLong nNumFmtIndex; SCCOL nStartCol; SCROW nStartRow; SCTAB nStartTab; @@ -100,31 +100,31 @@ private: SCROW nNextRow; SCROW nAttrEndRow; short nNumFmtType; - BOOL bNumValid; - BOOL bSubTotal; - BOOL bNextValid; - BOOL bCalcAsShown; - BOOL bTextAsZero; + sal_Bool bNumValid; + sal_Bool bSubTotal; + sal_Bool bNextValid; + sal_Bool bCalcAsShown; + sal_Bool bTextAsZero; - BOOL GetThis(double& rValue, USHORT& rErr); + sal_Bool GetThis(double& rValue, sal_uInt16& rErr); public: //UNUSED2008-05 ScValueIterator(ScDocument* pDocument, //UNUSED2008-05 SCCOL nSCol, SCROW nSRow, SCTAB nSTab, //UNUSED2008-05 SCCOL nECol, SCROW nERow, SCTAB nETab, -//UNUSED2008-05 BOOL bSTotal = FALSE, BOOL bTextAsZero = FALSE); +//UNUSED2008-05 sal_Bool bSTotal = sal_False, sal_Bool bTextAsZero = sal_False); ScValueIterator(ScDocument* pDocument, - const ScRange& rRange, BOOL bSTotal = FALSE, - BOOL bTextAsZero = FALSE ); - void GetCurNumFmtInfo( short& nType, ULONG& nIndex ); + const ScRange& rRange, sal_Bool bSTotal = sal_False, + sal_Bool bTextAsZero = sal_False ); + void GetCurNumFmtInfo( short& nType, sal_uLong& nIndex ); /// Does NOT reset rValue if no value found! - BOOL GetFirst(double& rValue, USHORT& rErr); + sal_Bool GetFirst(double& rValue, sal_uInt16& rErr); /// Does NOT reset rValue if no value found! - BOOL GetNext(double& rValue, USHORT& rErr) + sal_Bool GetNext(double& rValue, sal_uInt16& rErr) { - return bNextValid ? ( bNextValid = FALSE, rValue = fNextValue, + return bNextValid ? ( bNextValid = sal_False, rValue = fNextValue, rErr = 0, nRow = nNextRow, - ++nColRow, bNumValid = FALSE, TRUE ) + ++nColRow, bNumValid = sal_False, sal_True ) : ( ++nRow, GetThis(rValue, rErr) ); } }; @@ -176,8 +176,8 @@ private: ScDBQueryParamInternal* mpParam; ScDocument* mpDoc; const ScAttrArray* pAttrArray; - ULONG nNumFormat; // for CalcAsShown - ULONG nNumFmtIndex; + sal_uLong nNumFormat; // for CalcAsShown + sal_uLong nNumFmtIndex; SCCOL nCol; SCROW nRow; SCSIZE nColRow; @@ -232,16 +232,16 @@ private: // SubTotalZeilen SCROW nRow; SCTAB nTab; SCSIZE nColRow; - BOOL bSubTotal; + sal_Bool bSubTotal; ScBaseCell* GetThis(); public: ScCellIterator(ScDocument* pDocument, SCCOL nSCol, SCROW nSRow, SCTAB nSTab, SCCOL nECol, SCROW nERow, SCTAB nETab, - BOOL bSTotal = FALSE); + sal_Bool bSTotal = sal_False); ScCellIterator(ScDocument* pDocument, - const ScRange& rRange, BOOL bSTotal = FALSE); + const ScRange& rRange, sal_Bool bSTotal = sal_False); ScBaseCell* GetFirst(); ScBaseCell* GetNext(); SCCOL GetCol() const { return nCol; } @@ -272,16 +272,16 @@ private: ScQueryParam aParam; ScDocument* pDoc; const ScAttrArray* pAttrArray; - ULONG nNumFormat; + sal_uLong nNumFormat; SCTAB nTab; SCCOL nCol; SCROW nRow; SCSIZE nColRow; SCROW nAttrEndRow; - BYTE nStopOnMismatch; - BYTE nTestEqualCondition; - BOOL bAdvanceQuery; - BOOL bIgnoreMismatchOnLeadingStrings; + sal_uInt8 nStopOnMismatch; + sal_uInt8 nTestEqualCondition; + sal_Bool bAdvanceQuery; + sal_Bool bIgnoreMismatchOnLeadingStrings; ScBaseCell* GetThis(); @@ -298,8 +298,8 @@ private: public: ScQueryCellIterator(ScDocument* pDocument, SCTAB nTable, - const ScQueryParam& aParam, BOOL bMod = TRUE); - // fuer bMod = FALSE muss der QueryParam + const ScQueryParam& aParam, sal_Bool bMod = sal_True); + // fuer bMod = sal_False muss der QueryParam // weiter aufgefuellt sein (bIsString) ScBaseCell* GetFirst(); ScBaseCell* GetNext(); @@ -308,7 +308,7 @@ public: // setzt alle Entry.nField einen weiter, wenn Spalte // wechselt, fuer ScInterpreter ScHLookup() - void SetAdvanceQueryParamEntryField( BOOL bVal ) + void SetAdvanceQueryParamEntryField( sal_Bool bVal ) { bAdvanceQuery = bVal; } void AdvanceQueryParamEntryField(); @@ -317,17 +317,17 @@ public: cell range is assumed to be sorted; stops on first value being greater than the queried value and GetFirst()/GetNext() return NULL. StoppedOnMismatch() - returns TRUE then. + returns sal_True then. However, the iterator's conditions are not set to end all queries, GetCol() and GetRow() return values for the non-matching cell, further GetNext() calls may be executed. */ - void SetStopOnMismatch( BOOL bVal ) + void SetStopOnMismatch( sal_Bool bVal ) { - nStopOnMismatch = sal::static_int_cast(bVal ? nStopOnMismatchEnabled : + nStopOnMismatch = sal::static_int_cast(bVal ? nStopOnMismatchEnabled : nStopOnMismatchDisabled); } - BOOL StoppedOnMismatch() const + sal_Bool StoppedOnMismatch() const { return nStopOnMismatch == nStopOnMismatchExecuted; } /** If set, an additional test for SC_EQUAL condition is @@ -335,13 +335,13 @@ public: SC_GREATER_EQUAL conditions are to be tested. May be used where a cell range is assumed to be sorted to stop if an equal match is found. */ - void SetTestEqualCondition( BOOL bVal ) + void SetTestEqualCondition( sal_Bool bVal ) { - nTestEqualCondition = sal::static_int_cast(bVal ? + nTestEqualCondition = sal::static_int_cast(bVal ? nTestEqualConditionEnabled : nTestEqualConditionDisabled); } - BOOL IsEqualConditionFulfilled() const + sal_Bool IsEqualConditionFulfilled() const { return nTestEqualCondition == nTestEqualConditionFulfilled; } /** In a range assumed to be sorted find either the last of @@ -359,7 +359,7 @@ public: @param bIgnoreMismatchOnLeadingStrings Normally strings are sorted behind numerical - values. If this parameter is TRUE, the search does + values. If this parameter is sal_True, the search does not stop when encountering a string and does not assume that no values follow anymore. If querying for a string a mismatch on the first @@ -371,9 +371,9 @@ public: iterator is not usable anymore except for obtaining the number format! */ - BOOL FindEqualOrSortedLastInRange( SCCOL& nFoundCol, - SCROW& nFoundRow, BOOL bSearchForEqualAfterMismatch = FALSE, - BOOL bIgnoreMismatchOnLeadingStrings = TRUE ); + sal_Bool FindEqualOrSortedLastInRange( SCCOL& nFoundCol, + SCROW& nFoundRow, sal_Bool bSearchForEqualAfterMismatch = sal_False, + sal_Bool bIgnoreMismatchOnLeadingStrings = sal_True ); }; class ScDocAttrIterator // alle Attribut-Bereiche @@ -428,7 +428,7 @@ private: SCSIZE* pNextIndices; SCCOL nCol; SCROW nRow; - BOOL bMore; + sal_Bool bMore; public: ScHorizontalCellIterator(ScDocument* pDocument, SCTAB nTable, @@ -436,7 +436,7 @@ public: ~ScHorizontalCellIterator(); ScBaseCell* GetNext( SCCOL& rCol, SCROW& rRow ); - BOOL ReturnNext( SCCOL& rCol, SCROW& rRow ); + sal_Bool ReturnNext( SCCOL& rCol, SCROW& rRow ); private: void Advance(); @@ -462,7 +462,7 @@ private: const ScPatternAttr** ppPatterns; SCCOL nCol; SCROW nRow; - BOOL bRowEmpty; + sal_Bool bRowEmpty; public: ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB nTable, @@ -504,7 +504,7 @@ public: SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); ~ScUsedAreaIterator(); - BOOL GetNext(); + sal_Bool GetNext(); SCCOL GetStartCol() const { return nFoundStartCol; } SCCOL GetEndCol() const { return nFoundEndCol; } diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx index 6f6d4c859a5c..0c365fe06051 100644 --- a/sc/inc/docoptio.hxx +++ b/sc/inc/docoptio.hxx @@ -37,47 +37,47 @@ class SC_DLLPUBLIC ScDocOptions { double fIterEps; // Epsilon-Wert dazu - USHORT nIterCount; // Anzahl + sal_uInt16 nIterCount; // Anzahl sal_uInt16 nPrecStandardFormat; // precision for standard format - USHORT nDay; // Nulldatum: - USHORT nMonth; - USHORT nYear; - USHORT nYear2000; // bis zu welcher zweistelligen Jahreszahl 20xx angenommen wird - USHORT nTabDistance; // Abstand Standardtabulatoren - BOOL bIsIgnoreCase; // Gross-/Kleinschr. bei Vergleichen - BOOL bIsIter; // Iteration bei cirk. Ref - BOOL bCalcAsShown; // berechnen wie angezeigt (Precision) - BOOL bMatchWholeCell; // Suchkriterien muessen ganze Zelle matchen - BOOL bDoAutoSpell; // Auto-Spelling - BOOL bLookUpColRowNames; // Spalten-/Zeilenbeschriftungen automagisch suchen - BOOL bFormulaRegexEnabled; // regular expressions in formulas enabled + sal_uInt16 nDay; // Nulldatum: + sal_uInt16 nMonth; + sal_uInt16 nYear; + sal_uInt16 nYear2000; // bis zu welcher zweistelligen Jahreszahl 20xx angenommen wird + sal_uInt16 nTabDistance; // Abstand Standardtabulatoren + sal_Bool bIsIgnoreCase; // Gross-/Kleinschr. bei Vergleichen + sal_Bool bIsIter; // Iteration bei cirk. Ref + sal_Bool bCalcAsShown; // berechnen wie angezeigt (Precision) + sal_Bool bMatchWholeCell; // Suchkriterien muessen ganze Zelle matchen + sal_Bool bDoAutoSpell; // Auto-Spelling + sal_Bool bLookUpColRowNames; // Spalten-/Zeilenbeschriftungen automagisch suchen + sal_Bool bFormulaRegexEnabled; // regular expressions in formulas enabled public: ScDocOptions(); ScDocOptions( const ScDocOptions& rCpy ); ~ScDocOptions(); - BOOL IsLookUpColRowNames() const { return bLookUpColRowNames; } - void SetLookUpColRowNames( BOOL bVal ) { bLookUpColRowNames = bVal; } - BOOL IsAutoSpell() const { return bDoAutoSpell; } - void SetAutoSpell( BOOL bVal ) { bDoAutoSpell = bVal; } - BOOL IsMatchWholeCell() const { return bMatchWholeCell; } - void SetMatchWholeCell( BOOL bVal ){ bMatchWholeCell = bVal; } - BOOL IsIgnoreCase() const { return bIsIgnoreCase; } - void SetIgnoreCase( BOOL bVal ) { bIsIgnoreCase = bVal; } - BOOL IsIter() const { return bIsIter; } - void SetIter( BOOL bVal ) { bIsIter = bVal; } - USHORT GetIterCount() const { return nIterCount; } - void SetIterCount( USHORT nCount) { nIterCount = nCount; } + sal_Bool IsLookUpColRowNames() const { return bLookUpColRowNames; } + void SetLookUpColRowNames( sal_Bool bVal ) { bLookUpColRowNames = bVal; } + sal_Bool IsAutoSpell() const { return bDoAutoSpell; } + void SetAutoSpell( sal_Bool bVal ) { bDoAutoSpell = bVal; } + sal_Bool IsMatchWholeCell() const { return bMatchWholeCell; } + void SetMatchWholeCell( sal_Bool bVal ){ bMatchWholeCell = bVal; } + sal_Bool IsIgnoreCase() const { return bIsIgnoreCase; } + void SetIgnoreCase( sal_Bool bVal ) { bIsIgnoreCase = bVal; } + sal_Bool IsIter() const { return bIsIter; } + void SetIter( sal_Bool bVal ) { bIsIter = bVal; } + sal_uInt16 GetIterCount() const { return nIterCount; } + void SetIterCount( sal_uInt16 nCount) { nIterCount = nCount; } double GetIterEps() const { return fIterEps; } void SetIterEps( double fEps ) { fIterEps = fEps; } - void GetDate( USHORT& rD, USHORT& rM, USHORT& rY ) const + void GetDate( sal_uInt16& rD, sal_uInt16& rM, sal_uInt16& rY ) const { rD = nDay; rM = nMonth; rY = nYear;} - void SetDate (USHORT nD, USHORT nM, USHORT nY) + void SetDate (sal_uInt16 nD, sal_uInt16 nM, sal_uInt16 nY) { nDay = nD; nMonth = nM; nYear = nY; } - USHORT GetTabDistance() const { return nTabDistance;} - void SetTabDistance( USHORT nTabDist ) {nTabDistance = nTabDist;} + sal_uInt16 GetTabDistance() const { return nTabDistance;} + void SetTabDistance( sal_uInt16 nTabDist ) {nTabDistance = nTabDist;} void ResetDocOptions(); inline void CopyTo(ScDocOptions& rOpt); @@ -89,14 +89,14 @@ public: sal_uInt16 GetStdPrecision() const { return nPrecStandardFormat; } void SetStdPrecision( sal_uInt16 n ) { nPrecStandardFormat = n; } - BOOL IsCalcAsShown() const { return bCalcAsShown; } - void SetCalcAsShown( BOOL bVal ) { bCalcAsShown = bVal; } + sal_Bool IsCalcAsShown() const { return bCalcAsShown; } + void SetCalcAsShown( sal_Bool bVal ) { bCalcAsShown = bVal; } - void SetYear2000( USHORT nVal ) { nYear2000 = nVal; } - USHORT GetYear2000() const { return nYear2000; } + void SetYear2000( sal_uInt16 nVal ) { nYear2000 = nVal; } + sal_uInt16 GetYear2000() const { return nYear2000; } - void SetFormulaRegexEnabled( BOOL bVal ) { bFormulaRegexEnabled = bVal; } - BOOL IsFormulaRegexEnabled() const { return bFormulaRegexEnabled; } + void SetFormulaRegexEnabled( sal_Bool bVal ) { bFormulaRegexEnabled = bVal; } + sal_Bool IsFormulaRegexEnabled() const { return bFormulaRegexEnabled; } }; @@ -174,8 +174,8 @@ class SC_DLLPUBLIC ScTpCalcItem : public SfxPoolItem { public: TYPEINFO(); -//UNUSED2008-05 ScTpCalcItem( USHORT nWhich ); - ScTpCalcItem( USHORT nWhich, +//UNUSED2008-05 ScTpCalcItem( sal_uInt16 nWhich ); + ScTpCalcItem( sal_uInt16 nWhich, const ScDocOptions& rOpt ); ScTpCalcItem( const ScTpCalcItem& rItem ); ~ScTpCalcItem(); diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx index 59bd70592725..7eebb5a834c5 100644 --- a/sc/inc/docpool.hxx +++ b/sc/inc/docpool.hxx @@ -39,28 +39,28 @@ class SC_DLLPUBLIC ScDocumentPool: public SfxItemPool { SfxPoolItem** ppPoolDefaults; SfxItemPool* pSecondary; - static USHORT* pVersionMap1; - static USHORT* pVersionMap2; - static USHORT* pVersionMap3; - static USHORT* pVersionMap4; - static USHORT* pVersionMap5; - static USHORT* pVersionMap6; - static USHORT* pVersionMap7; - static USHORT* pVersionMap8; - static USHORT* pVersionMap9; - static USHORT* pVersionMap10; - static USHORT* pVersionMap11; + static sal_uInt16* pVersionMap1; + static sal_uInt16* pVersionMap2; + static sal_uInt16* pVersionMap3; + static sal_uInt16* pVersionMap4; + static sal_uInt16* pVersionMap5; + static sal_uInt16* pVersionMap6; + static sal_uInt16* pVersionMap7; + static sal_uInt16* pVersionMap8; + static sal_uInt16* pVersionMap9; + static sal_uInt16* pVersionMap10; + static sal_uInt16* pVersionMap11; public: - ScDocumentPool( SfxItemPool* pSecPool = NULL, BOOL bLoadRefCounts = FALSE ); + ScDocumentPool( SfxItemPool* pSecPool = NULL, sal_Bool bLoadRefCounts = sal_False ); protected: virtual ~ScDocumentPool(); public: virtual SfxItemPool* Clone() const; - virtual SfxMapUnit GetMetric( USHORT nWhich ) const; + virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const; - virtual const SfxPoolItem& Put( const SfxPoolItem&, USHORT nWhich = 0 ); + virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 ); virtual void Remove( const SfxPoolItem& ); static void CheckRef( const SfxPoolItem& ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 90aac02aab7f..d550ea023878 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -201,8 +201,8 @@ struct ScDocStat { String aDocName; SCTAB nTableCount; - ULONG nCellCount; - USHORT nPageCount; + sal_uLong nCellCount; + sal_uInt16 nPageCount; }; // The constant parameters to CopyBlockFromClip @@ -210,11 +210,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; }; @@ -229,10 +229,10 @@ struct ScSymbolStringCellEntry // ----------------------------------------------------------------------- // DDE link modes -const BYTE SC_DDE_DEFAULT = 0; -const BYTE SC_DDE_ENGLISH = 1; -const BYTE SC_DDE_TEXT = 2; -const BYTE SC_DDE_IGNOREMODE = 255; /// For usage in FindDdeLink() only! +const sal_uInt8 SC_DDE_DEFAULT = 0; +const sal_uInt8 SC_DDE_ENGLISH = 1; +const sal_uInt8 SC_DDE_TEXT = 2; +const sal_uInt8 SC_DDE_IGNOREMODE = 255; /// For usage in FindDdeLink() only! // ----------------------------------------------------------------------- @@ -359,77 +359,77 @@ private: importer. */ formula::FormulaGrammar::Grammar eXmlImportGrammar; - ULONG nFormulaCodeInTree; // FormelRPN im Formelbaum - ULONG nXMLImportedFormulaCount; // progress count during XML import - USHORT nInterpretLevel; // >0 wenn im Interpreter - USHORT nMacroInterpretLevel; // >0 wenn Macro im Interpreter - USHORT nInterpreterTableOpLevel; // >0 if in Interpreter TableOp + sal_uLong nFormulaCodeInTree; // FormelRPN im Formelbaum + sal_uLong nXMLImportedFormulaCount; // progress count during XML import + sal_uInt16 nInterpretLevel; // >0 wenn im Interpreter + sal_uInt16 nMacroInterpretLevel; // >0 wenn Macro im Interpreter + sal_uInt16 nInterpreterTableOpLevel; // >0 if in Interpreter TableOp SCTAB nMaxTableNumber; - USHORT nSrcVer; // Dateiversion (Laden/Speichern) + sal_uInt16 nSrcVer; // Dateiversion (Laden/Speichern) SCROW nSrcMaxRow; // Zeilenzahl zum Laden/Speichern - USHORT nFormulaTrackCount; - USHORT nHardRecalcState; // 0: soft, 1: hard-warn, 2: hard + sal_uInt16 nFormulaTrackCount; + sal_uInt16 nHardRecalcState; // 0: soft, 1: hard-warn, 2: hard SCTAB nVisibleTab; // fuer OLE etc. ScLkUpdMode eLinkMode; - BOOL bAutoCalc; // Automatisch Berechnen - BOOL bAutoCalcShellDisabled; // in/von/fuer ScDocShell disabled + sal_Bool bAutoCalc; // Automatisch Berechnen + sal_Bool bAutoCalcShellDisabled; // in/von/fuer ScDocShell disabled // ob noch ForcedFormulas berechnet werden muessen, // im Zusammenspiel mit ScDocShell SetDocumentModified, // AutoCalcShellDisabled und TrackFormulas - BOOL bForcedFormulaPending; - BOOL bCalculatingFormulaTree; - BOOL bIsClip; - BOOL bIsUndo; - BOOL bIsVisible; // set from view ctor + sal_Bool bForcedFormulaPending; + sal_Bool bCalculatingFormulaTree; + sal_Bool bIsClip; + sal_Bool bIsUndo; + sal_Bool bIsVisible; // set from view ctor - BOOL bIsEmbedded; // Embedded-Bereich anzeigen/anpassen ? + sal_Bool bIsEmbedded; // Embedded-Bereich anzeigen/anpassen ? // kein SetDirty bei ScFormulaCell::CompileTokenArray sondern am Ende // von ScDocument::CompileAll[WithFormats], CopyScenario, CopyBlockFromClip - BOOL bNoSetDirty; + sal_Bool bNoSetDirty; // kein Broadcast, keine Listener aufbauen waehrend aus einem anderen // Doc (per Filter o.ae.) inserted wird, erst bei CompileAll / CalcAfterLoad - BOOL bInsertingFromOtherDoc; + sal_Bool bInsertingFromOtherDoc; bool bLoadingMedium; bool bImportingXML; // special handling of formula text - BOOL bXMLFromWrapper; // distinguish ScXMLImportWrapper from external component - BOOL bCalcingAfterLoad; // in CalcAfterLoad TRUE + sal_Bool bXMLFromWrapper; // distinguish ScXMLImportWrapper from external component + sal_Bool bCalcingAfterLoad; // in CalcAfterLoad TRUE // wenn temporaer keine Listener auf/abgebaut werden sollen - BOOL bNoListening; - BOOL bIdleDisabled; - BOOL bInLinkUpdate; // TableLink or AreaLink - BOOL bChartListenerCollectionNeedsUpdate; + sal_Bool bNoListening; + sal_Bool bIdleDisabled; + sal_Bool bInLinkUpdate; // TableLink or AreaLink + sal_Bool bChartListenerCollectionNeedsUpdate; // ob RC_FORCED Formelzellen im Dokument sind/waren (einmal an immer an) - BOOL bHasForcedFormulas; + sal_Bool bHasForcedFormulas; // ob das Doc gerade zerstoert wird (kein Notify-Tracking etc. mehr) - BOOL bInDtorClear; + sal_Bool bInDtorClear; // ob bei Spalte/Zeile einfuegen am Rand einer Referenz die Referenz // erweitert wird, wird in jedem UpdateReference aus InputOptions geholt, // gesetzt und am Ende von UpdateReference zurueckgesetzt - BOOL bExpandRefs; + sal_Bool bExpandRefs; // fuer Detektiv-Update, wird bei jeder Aenderung an Formeln gesetzt - BOOL bDetectiveDirty; + sal_Bool bDetectiveDirty; - BYTE nMacroCallMode; // Makros per Warnung-Dialog disabled? - BOOL bHasMacroFunc; // valid only after loading + sal_uInt8 nMacroCallMode; // Makros per Warnung-Dialog disabled? + sal_Bool bHasMacroFunc; // valid only after loading - BYTE nVisSpellState; + sal_uInt8 nVisSpellState; - BYTE nAsianCompression; - BYTE nAsianKerning; - BOOL bSetDrawDefaults; + sal_uInt8 nAsianCompression; + sal_uInt8 nAsianKerning; + sal_Bool bSetDrawDefaults; - BOOL bPastingDrawFromOtherDoc; + sal_Bool bPastingDrawFromOtherDoc; - BYTE nInDdeLinkUpdate; // originating DDE links (stacked bool) + sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool) - BOOL bInUnoBroadcast; - BOOL bInUnoListenerCall; + sal_Bool bInUnoBroadcast; + sal_Bool bInUnoListenerCall; formula::FormulaGrammar::Grammar eGrammar; - mutable BOOL bStyleSheetUsageInvalid; + mutable sal_Bool bStyleSheetUsageInvalid; bool mbUndoEnabled; bool mbAdjustHeightEnabled; @@ -440,11 +440,11 @@ private: sal_Int16 mnNamedRangesLockCount; public: - SC_DLLPUBLIC ULONG GetCellCount() const; // alle Zellen + SC_DLLPUBLIC sal_uLong GetCellCount() const; // alle Zellen SCSIZE GetCellCount(SCTAB nTab, SCCOL nCol) const; - ULONG GetWeightedCount() const; // Formeln und Edit staerker gewichtet - ULONG GetCodeCount() const; // RPN-Code in Formeln - DECL_LINK( GetUserDefinedColor, USHORT * ); + sal_uLong GetWeightedCount() const; // Formeln und Edit staerker gewichtet + sal_uLong GetCodeCount() const; // RPN-Code in Formeln + DECL_LINK( GetUserDefinedColor, sal_uInt16 * ); // Numberformatter public: @@ -501,13 +501,13 @@ public: SC_DLLPUBLIC ScDBCollection* GetDBCollection() const; void SetDBCollection( ScDBCollection* pNewDBCollection, - BOOL bRemoveAutoFilter = FALSE ); + sal_Bool bRemoveAutoFilter = sal_False ); ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, - BOOL bStartOnly = FALSE) const; + sal_Bool bStartOnly = sal_False) const; ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; //UNUSED2008-05 ScRangeData* GetRangeAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, -//UNUSED2008-05 BOOL bStartOnly = FALSE) const; +//UNUSED2008-05 sal_Bool bStartOnly = sal_False) const; SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& rBlock, String* pName=NULL ) const; SC_DLLPUBLIC ScDPCollection* GetDPCollection(); @@ -531,19 +531,19 @@ public: void EnsureGraphicNames(); SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos ); - BOOL HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName = NULL ); + sal_Bool HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName = NULL ); ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > GetChartByName( const String& rChartName ); SC_DLLPUBLIC void GetChartRanges( const String& rChartName, ::std::vector< ScRangeList >& rRanges, ScDocument* pSheetNameDoc ); void SetChartRanges( const String& rChartName, const ::std::vector< ScRangeList >& rRanges ); void UpdateChartArea( const String& rChartName, const ScRange& rNewArea, - BOOL bColHeaders, BOOL bRowHeaders, BOOL bAdd ); + sal_Bool bColHeaders, sal_Bool bRowHeaders, sal_Bool bAdd ); void UpdateChartArea( const String& rChartName, const ScRangeListRef& rNewList, - BOOL bColHeaders, BOOL bRowHeaders, BOOL bAdd ); + sal_Bool bColHeaders, sal_Bool bRowHeaders, sal_Bool bAdd ); void GetOldChartParameters( const String& rName, - ScRangeList& rRanges, BOOL& rColHeaders, BOOL& rRowHeaders ); + ScRangeList& rRanges, sal_Bool& rColHeaders, sal_Bool& rRowHeaders ); ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > FindOleObjectByName( const String& rName ); @@ -553,19 +553,19 @@ public: SCTAB GetVisibleTab() const { return nVisibleTab; } SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; } - SC_DLLPUBLIC BOOL HasTable( SCTAB nTab ) const; - SC_DLLPUBLIC BOOL GetName( SCTAB nTab, String& rName ) const; - SC_DLLPUBLIC BOOL GetCodeName( SCTAB nTab, String& rName ) const; - SC_DLLPUBLIC BOOL SetCodeName( SCTAB nTab, const String& rName ); - SC_DLLPUBLIC BOOL GetTable( const String& rName, SCTAB& rTab ) const; + SC_DLLPUBLIC sal_Bool HasTable( SCTAB nTab ) const; + SC_DLLPUBLIC sal_Bool GetName( SCTAB nTab, String& rName ) const; + SC_DLLPUBLIC sal_Bool GetCodeName( SCTAB nTab, String& rName ) const; + SC_DLLPUBLIC sal_Bool SetCodeName( SCTAB nTab, const String& rName ); + SC_DLLPUBLIC sal_Bool GetTable( const String& rName, SCTAB& rTab ) const; SC_DLLPUBLIC inline SCTAB GetTableCount() const { return nMaxTableNumber; } SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; } SC_DLLPUBLIC ScDocProtection* GetDocProtection() const; SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect); - SC_DLLPUBLIC BOOL IsDocProtected() const; - BOOL IsDocEditable() const; - SC_DLLPUBLIC BOOL IsTabProtected( SCTAB nTab ) const; + SC_DLLPUBLIC sal_Bool IsDocProtected() const; + sal_Bool IsDocEditable() const; + SC_DLLPUBLIC sal_Bool IsTabProtected( SCTAB nTab ) const; SC_DLLPUBLIC ScTableProtection* GetTabProtection( SCTAB nTab ) const; SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect); void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest); @@ -573,18 +573,18 @@ public: void LockTable(SCTAB nTab); void UnlockTable(SCTAB nTab); - BOOL IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + sal_Bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - BOOL* pOnlyNotBecauseOfMatrix = NULL ) const; - BOOL IsSelectionEditable( const ScMarkData& rMark, - BOOL* pOnlyNotBecauseOfMatrix = NULL ) const; - BOOL HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, + sal_Bool* pOnlyNotBecauseOfMatrix = NULL ) const; + sal_Bool IsSelectionEditable( const ScMarkData& rMark, + sal_Bool* pOnlyNotBecauseOfMatrix = NULL ) const; + sal_Bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData& rMark ) const; - BOOL GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix ); + sal_Bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix ); - BOOL IsEmbedded() const; + sal_Bool IsEmbedded() const; void GetEmbedded( ScRange& rRange ) const; void SetEmbedded( const ScRange& rRange ); void ResetEmbedded(); @@ -592,61 +592,61 @@ public: void SetEmbedded( const Rectangle& rRect ); // aus VisArea (1/100 mm) void SnapVisArea( Rectangle& rRect ) const; // 1/100 mm - SC_DLLPUBLIC BOOL ValidTabName( const String& rName ) const; - SC_DLLPUBLIC BOOL ValidNewTabName( const String& rName ) const; + SC_DLLPUBLIC sal_Bool ValidTabName( const String& rName ) const; + SC_DLLPUBLIC sal_Bool ValidNewTabName( const String& rName ) const; SC_DLLPUBLIC void CreateValidTabName(String& rName) const; - SC_DLLPUBLIC BOOL InsertTab( SCTAB nPos, const String& rName, - BOOL bExternalDocument = FALSE ); - SC_DLLPUBLIC BOOL DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL ); - SC_DLLPUBLIC BOOL RenameTab( SCTAB nTab, const String& rName, - BOOL bUpdateRef = TRUE, - BOOL bExternalDocument = FALSE ); - BOOL MoveTab( SCTAB nOldPos, SCTAB nNewPos ); - BOOL CopyTab( SCTAB nOldPos, SCTAB nNewPos, + SC_DLLPUBLIC sal_Bool InsertTab( SCTAB nPos, const String& rName, + sal_Bool bExternalDocument = sal_False ); + SC_DLLPUBLIC sal_Bool DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL ); + SC_DLLPUBLIC sal_Bool RenameTab( SCTAB nTab, const String& rName, + sal_Bool bUpdateRef = sal_True, + sal_Bool bExternalDocument = sal_False ); + sal_Bool MoveTab( SCTAB nOldPos, SCTAB nNewPos ); + sal_Bool CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked = NULL ); - SC_DLLPUBLIC ULONG TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, - BOOL bInsertNew = TRUE, - BOOL bResultsOnly = FALSE ); + SC_DLLPUBLIC sal_uLong TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, + sal_Bool bInsertNew = sal_True, + sal_Bool bResultsOnly = sal_False ); SC_DLLPUBLIC void TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos); - SC_DLLPUBLIC void SetVisible( SCTAB nTab, BOOL bVisible ); - SC_DLLPUBLIC BOOL IsVisible( SCTAB nTab ) const; - BOOL IsStreamValid( SCTAB nTab ) const; - void SetStreamValid( SCTAB nTab, BOOL bSet, BOOL bIgnoreLock = FALSE ); + SC_DLLPUBLIC void SetVisible( SCTAB nTab, sal_Bool bVisible ); + SC_DLLPUBLIC sal_Bool IsVisible( SCTAB nTab ) const; + sal_Bool IsStreamValid( SCTAB nTab ) const; + void SetStreamValid( SCTAB nTab, sal_Bool bSet, sal_Bool bIgnoreLock = sal_False ); void LockStreamValid( bool bLock ); bool IsStreamValidLocked() const { return mbStreamValidLocked; } - BOOL IsPendingRowHeights( SCTAB nTab ) const; - void SetPendingRowHeights( SCTAB nTab, BOOL bSet ); - SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, BOOL bRTL ); - SC_DLLPUBLIC BOOL IsLayoutRTL( SCTAB nTab ) const; - BOOL IsNegativePage( SCTAB nTab ) const; - SC_DLLPUBLIC void SetScenario( SCTAB nTab, BOOL bFlag ); - SC_DLLPUBLIC BOOL IsScenario( SCTAB nTab ) const; + sal_Bool IsPendingRowHeights( SCTAB nTab ) const; + void SetPendingRowHeights( SCTAB nTab, sal_Bool bSet ); + SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, sal_Bool bRTL ); + SC_DLLPUBLIC sal_Bool IsLayoutRTL( SCTAB nTab ) const; + sal_Bool IsNegativePage( SCTAB nTab ) const; + SC_DLLPUBLIC void SetScenario( SCTAB nTab, sal_Bool bFlag ); + SC_DLLPUBLIC sal_Bool IsScenario( SCTAB nTab ) const; SC_DLLPUBLIC void GetScenarioData( SCTAB nTab, String& rComment, - Color& rColor, USHORT& rFlags ) const; + Color& rColor, sal_uInt16& rFlags ) const; SC_DLLPUBLIC void SetScenarioData( SCTAB nTab, const String& rComment, - const Color& rColor, USHORT nFlags ); + const Color& rColor, sal_uInt16 nFlags ); SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const; SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor ); SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const; - void GetScenarioFlags( SCTAB nTab, USHORT& rFlags ) const; - SC_DLLPUBLIC BOOL IsActiveScenario( SCTAB nTab ) const; - SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, BOOL bActive ); // nur fuer Undo etc. + void GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const; + SC_DLLPUBLIC sal_Bool IsActiveScenario( SCTAB nTab ) const; + SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, sal_Bool bActive ); // nur fuer Undo etc. SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const; SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const; void SetGrammar( formula::FormulaGrammar::Grammar eGram ); - SC_DLLPUBLIC BYTE GetLinkMode( SCTAB nTab ) const; - BOOL IsLinked( SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt8 GetLinkMode( SCTAB nTab ) const; + sal_Bool IsLinked( SCTAB nTab ) const; SC_DLLPUBLIC const String& GetLinkDoc( SCTAB nTab ) const; const String& GetLinkFlt( SCTAB nTab ) const; const String& GetLinkOpt( SCTAB nTab ) const; SC_DLLPUBLIC const String& GetLinkTab( SCTAB nTab ) const; - ULONG GetLinkRefreshDelay( SCTAB nTab ) const; - void SetLink( SCTAB nTab, BYTE nMode, const String& rDoc, + sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const; + void SetLink( SCTAB nTab, sal_uInt8 nMode, const String& rDoc, const String& rFilter, const String& rOptions, - const String& rTabName, ULONG nRefreshDelay ); - BOOL HasLink( const String& rDoc, + const String& rTabName, sal_uLong nRefreshDelay ); + sal_Bool HasLink( const String& rDoc, const String& rFilter, const String& rOptions ) const; - SC_DLLPUBLIC BOOL LinkExternalTab( SCTAB& nTab, const String& aDocTab, + SC_DLLPUBLIC sal_Bool LinkExternalTab( SCTAB& nTab, const String& aDocTab, const String& aFileName, const String& aTabName ); @@ -660,8 +660,8 @@ public: on first call. */ ScFormulaParserPool& GetFormulaParserPool() const; - BOOL HasDdeLinks() const; - BOOL HasAreaLinks() const; + sal_Bool HasDdeLinks() const; + sal_Bool HasAreaLinks() const; void UpdateExternalRefLinks(); void UpdateDdeLinks(); void UpdateAreaLinks(); @@ -669,19 +669,19 @@ public: // originating DDE links void IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; } void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; } - BOOL IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; } + sal_Bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; } SC_DLLPUBLIC void CopyDdeLinks( ScDocument* pDestDoc ) const; void DisconnectDdeLinks(); // Fuer StarOne Api: - USHORT GetDdeLinkCount() const; - BOOL UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem ); + sal_uInt16 GetDdeLinkCount() const; + sal_Bool UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem ); /** Tries to find a DDE link with the specified connection data. @param rnDdePos (out-param) Returns the index of the DDE link (does not include other links from link manager). @return true = DDE link found, rnDdePos valid. */ - SC_DLLPUBLIC bool FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, USHORT& rnDdePos ); + SC_DLLPUBLIC bool FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, sal_uInt16& rnDdePos ); /** Returns the connection data of the specified DDE link. @param nDdePos Index of the DDE link (does not include other links from link manager). @@ -689,26 +689,26 @@ public: @param rTopic (out-param) The DDE topic. @param rItem (out-param) The DDE item. @return true = DDE link found, out-parameters valid. */ - bool GetDdeLinkData( USHORT nDdePos, String& rAppl, String& rTopic, String& rItem ) const; + bool GetDdeLinkData( sal_uInt16 nDdePos, String& rAppl, String& rTopic, String& rItem ) const; /** Returns the link mode of the specified DDE link. @param nDdePos Index of the DDE link (does not include other links from link manager). @param rnMode (out-param) The link mode of the specified DDE link. @return true = DDE link found, rnMode valid. */ - bool GetDdeLinkMode( USHORT nDdePos, BYTE& rnMode ) const; + bool GetDdeLinkMode( sal_uInt16 nDdePos, sal_uInt8& rnMode ) const; /** Returns the result matrix of the specified DDE link. @param nDdePos Index of the DDE link (does not include other links from link manager). @return The result matrix, if the DDE link has been found, 0 otherwise. */ - SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( USHORT nDdePos ) const; + SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( sal_uInt16 nDdePos ) const; /** Tries to find a DDE link or creates a new, if not extant. @param pResults If not 0, sets the matrix as as DDE link result matrix (also for existing links). @return true = DDE link found; false = Unpredictable error occured, no DDE link created. */ - SC_DLLPUBLIC bool CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, ScMatrix* pResults = NULL ); + SC_DLLPUBLIC bool CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, ScMatrix* pResults = NULL ); /** Sets a result matrix for the specified DDE link. @param nDdePos Index of the DDE link (does not include other links from link manager). @param pResults The array containing all results of the DDE link (intrusive-ref-counted, do not delete). @return true = DDE link found and matrix set. */ - bool SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrix* pResults ); + bool SetDdeLinkResultMatrix( sal_uInt16 nDdePos, ScMatrix* pResults ); SfxBindings* GetViewBindings(); @@ -735,13 +735,13 @@ public: void SetChartRangeList( const String& rChartName, const ScRangeListRef& rNewRangeListRef ); - BOOL HasControl( SCTAB nTab, const Rectangle& rMMRect ); + sal_Bool HasControl( SCTAB nTab, const Rectangle& rMMRect ); void InvalidateControls( Window* pWin, SCTAB nTab, const Rectangle& rMMRect ); void StartAnimations( SCTAB nTab, Window* pWin ); - BOOL HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ); - BOOL HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ); + sal_Bool HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ); + sal_Bool HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ); const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const; void SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew ); @@ -749,34 +749,34 @@ public: bool HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents = false ) const; // on any sheet bool HasAnyCalcNotification() const; - BOOL HasCalcNotification( SCTAB nTab ) const; + sal_Bool HasCalcNotification( SCTAB nTab ) const; void SetCalcNotification( SCTAB nTab ); void ResetCalcNotifications(); - SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE ); - BOOL SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline ); + SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, sal_Bool bCreate = sal_False ); + sal_Bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline ); void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - BOOL DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam ); + sal_Bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam ); void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam ); - BOOL TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam ); - BOOL HasSubTotalCells( const ScRange& rRange ); + sal_Bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam ); + sal_Bool HasSubTotalCells( const ScRange& rRange ); - SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, BOOL bForceTab = FALSE ); + SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, sal_Bool bForceTab = sal_False ); //UNUSED2009-05 SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, -//UNUSED2009-05 ULONG nFormatIndex, BOOL bForceTab = FALSE); +//UNUSED2009-05 sal_uLong nFormatIndex, sal_Bool bForceTab = sal_False); SC_DLLPUBLIC void PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, - BOOL bForceTab = FALSE ); + sal_Bool bForceTab = sal_False ); SC_DLLPUBLIC void PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, - ULONG nFormatIndex, BOOL bForceTab = FALSE); - // return TRUE = Zahlformat gesetzt - SC_DLLPUBLIC BOOL SetString( + sal_uLong nFormatIndex, sal_Bool bForceTab = sal_False); + // return sal_True = Zahlformat gesetzt + SC_DLLPUBLIC sal_Bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, SvNumberFormatter* pFormatter = NULL, bool bDetectNumberFormat = true ); SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal ); - void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError); + void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError); SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, @@ -792,7 +792,7 @@ public: SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString ); SC_DLLPUBLIC double GetValue( const ScAddress& ); SC_DLLPUBLIC void GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue ); - SC_DLLPUBLIC double RoundValueAsShown( double fVal, ULONG nFormat ); + SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uLong nFormat ); SC_DLLPUBLIC void GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32& rFormat ); SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScAddress& ) const; @@ -800,10 +800,10 @@ public: pointer passed is of type formula cell, the calculated number format of the formula cell is returned. pCell may be NULL. */ - SC_DLLPUBLIC void GetNumberFormatInfo( short& nType, ULONG& nIndex, + SC_DLLPUBLIC void GetNumberFormatInfo( short& nType, sal_uLong& nIndex, const ScAddress& rPos, const ScBaseCell* pCell ) const; void GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormula, - BOOL bAsciiExport = FALSE ) const; + sal_Bool bAsciiExport = sal_False ) const; SC_DLLPUBLIC void GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const; SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const; SC_DLLPUBLIC void GetCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell ) const; @@ -811,13 +811,13 @@ public: //UNUSED2008-05 void RefreshNoteFlags(); - SC_DLLPUBLIC BOOL HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ); - SC_DLLPUBLIC BOOL HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - SC_DLLPUBLIC BOOL HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - BOOL HasStringCells( const ScRange& rRange ) const; + SC_DLLPUBLIC sal_Bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ); + SC_DLLPUBLIC sal_Bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + SC_DLLPUBLIC sal_Bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + sal_Bool HasStringCells( const ScRange& rRange ) const; /** Returns true, if there is any data to create a selection list for rPos. */ - BOOL HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + sal_Bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; /** Returns the pointer to a cell note object at the passed cell address. */ ScPostIt* GetNote( const ScAddress& rPos ); @@ -836,19 +836,19 @@ public: @param bForced True = always create all captions, false = skip when Undo is disabled. */ void InitializeAllNoteCaptions( bool bForced = false ); - BOOL ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, + sal_Bool ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark, - BOOL bRefresh = FALSE, BOOL bAttrs = FALSE ); - BOOL ExtendMerge( SCCOL nStartCol, SCROW nStartRow, + sal_Bool bRefresh = sal_False, sal_Bool bAttrs = sal_False ); + sal_Bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab, - BOOL bRefresh = FALSE, BOOL bAttrs = FALSE ); - BOOL ExtendMerge( ScRange& rRange, BOOL bRefresh = FALSE, BOOL bAttrs = FALSE ); - BOOL ExtendTotalMerge( ScRange& rRange ); - SC_DLLPUBLIC BOOL ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, + sal_Bool bRefresh = sal_False, sal_Bool bAttrs = sal_False ); + sal_Bool ExtendMerge( ScRange& rRange, sal_Bool bRefresh = sal_False, sal_Bool bAttrs = sal_False ); + sal_Bool ExtendTotalMerge( ScRange& rRange ); + SC_DLLPUBLIC sal_Bool ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - SC_DLLPUBLIC BOOL ExtendOverlapped( ScRange& rRange ); + SC_DLLPUBLIC sal_Bool ExtendOverlapped( ScRange& rRange ); - BOOL RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, + sal_Bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, @@ -858,20 +858,20 @@ public: SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true ); void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab ); - BOOL IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + sal_Bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const; - BOOL IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + sal_Bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - BOOL bLeftIsEmpty = FALSE, + sal_Bool bLeftIsEmpty = sal_False, ScRange* pLastRange = NULL, Rectangle* pLastMM = NULL ) const; - BOOL IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - BOOL IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + sal_Bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + sal_Bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1, - SCCOL nCol2, SCROW nRow2, SCTAB nTab2, USHORT nMask ); - SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, USHORT nMask ); + SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt16 nMask ); + SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, sal_uInt16 nMask ); void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab, const SvxBorderLine** ppLeft, @@ -905,18 +905,18 @@ public: void ClearLookupCaches(); // Automatisch Berechnen - void SetAutoCalc( BOOL bNewAutoCalc ); - BOOL GetAutoCalc() const { return bAutoCalc; } + void SetAutoCalc( sal_Bool bNewAutoCalc ); + sal_Bool GetAutoCalc() const { return bAutoCalc; } // Automatisch Berechnen in/von/fuer ScDocShell disabled - void SetAutoCalcShellDisabled( BOOL bNew ) { bAutoCalcShellDisabled = bNew; } - BOOL IsAutoCalcShellDisabled() const { return bAutoCalcShellDisabled; } + void SetAutoCalcShellDisabled( sal_Bool bNew ) { bAutoCalcShellDisabled = bNew; } + sal_Bool IsAutoCalcShellDisabled() const { return bAutoCalcShellDisabled; } // ForcedFormulas zu berechnen - void SetForcedFormulaPending( BOOL bNew ) { bForcedFormulaPending = bNew; } - BOOL IsForcedFormulaPending() const { return bForcedFormulaPending; } + void SetForcedFormulaPending( sal_Bool bNew ) { bForcedFormulaPending = bNew; } + sal_Bool IsForcedFormulaPending() const { return bForcedFormulaPending; } // if CalcFormulaTree() is currently running - BOOL IsCalculatingFormulaTree() { return bCalculatingFormulaTree; } + sal_Bool IsCalculatingFormulaTree() { return bCalculatingFormulaTree; } - USHORT GetErrCode( const ScAddress& ) const; + sal_uInt16 GetErrCode( const ScAddress& ) const; /** Shrink a range to only include data area. This is not the actually used area within the @@ -928,19 +928,19 @@ public: bool ShrinkToUsedDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const; SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, - SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld, bool bOnlyDown ) const; - SC_DLLPUBLIC BOOL GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; - SC_DLLPUBLIC BOOL GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; - SC_DLLPUBLIC BOOL GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, - BOOL bNotes = TRUE ) const; - SC_DLLPUBLIC BOOL GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, - SCCOL& rEndCol, BOOL bNotes = TRUE ) const; - SC_DLLPUBLIC BOOL GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, - SCROW& rEndRow, BOOL bNotes = TRUE ) const; + SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bIncludeOld, bool bOnlyDown ) const; + SC_DLLPUBLIC sal_Bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; + SC_DLLPUBLIC sal_Bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; + SC_DLLPUBLIC sal_Bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, + sal_Bool bNotes = sal_True ) const; + SC_DLLPUBLIC sal_Bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, + SCCOL& rEndCol, sal_Bool bNotes = sal_True ) const; + SC_DLLPUBLIC sal_Bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, + SCROW& rEndRow, sal_Bool bNotes = sal_True ) const; void InvalidateTableArea(); - SC_DLLPUBLIC BOOL GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const; + SC_DLLPUBLIC sal_Bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const; /** * Find the maximum column position that contains printable data for the @@ -956,49 +956,49 @@ public: void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY ); SC_DLLPUBLIC void 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 ); - BOOL GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, + sal_Bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, const ScMarkData& rMark ); void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ); void LimitChartIfAll( ScRangeListRef& rRangeList ); - BOOL InsertRow( SCCOL nStartCol, SCTAB nStartTab, + sal_Bool InsertRow( SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL, const ScMarkData* pTabMark = NULL ); - SC_DLLPUBLIC BOOL InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); + SC_DLLPUBLIC sal_Bool InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); void DeleteRow( SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, - ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL, + ScDocument* pRefUndoDoc = NULL, sal_Bool* pUndoOutline = NULL, const ScMarkData* pTabMark = NULL ); void DeleteRow( const ScRange& rRange, - ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL ); - BOOL InsertCol( SCROW nStartRow, SCTAB nStartTab, + ScDocument* pRefUndoDoc = NULL, sal_Bool* pUndoOutline = NULL ); + sal_Bool InsertCol( SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL, const ScMarkData* pTabMark = NULL ); - SC_DLLPUBLIC BOOL InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); + SC_DLLPUBLIC sal_Bool InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); void DeleteCol( SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, - ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL, + ScDocument* pRefUndoDoc = NULL, sal_Bool* pUndoOutline = NULL, const ScMarkData* pTabMark = NULL ); void DeleteCol( const ScRange& rRange, - ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL ); + ScDocument* pRefUndoDoc = NULL, sal_Bool* pUndoOutline = NULL ); - BOOL CanInsertRow( const ScRange& rRange ) const; - BOOL CanInsertCol( const ScRange& rRange ) const; + sal_Bool CanInsertRow( const ScRange& rRange ) const; + sal_Bool CanInsertCol( const ScRange& rRange ) const; - void FitBlock( const ScRange& rOld, const ScRange& rNew, BOOL bClear = TRUE ); - BOOL CanFitBlock( const ScRange& rOld, const ScRange& rNew ); + void FitBlock( const ScRange& rOld, const ScRange& rNew, sal_Bool bClear = sal_True ); + sal_Bool CanFitBlock( const ScRange& rOld, const ScRange& rNew ); - BOOL IsClipOrUndo() const { return bIsClip || bIsUndo; } - BOOL IsUndo() const { return bIsUndo; } - BOOL IsClipboard() const { return bIsClip; } + sal_Bool IsClipOrUndo() const { return bIsClip || bIsUndo; } + sal_Bool IsUndo() const { return bIsUndo; } + sal_Bool IsClipboard() const { return bIsClip; } bool IsUndoEnabled() const { return mbUndoEnabled; } void EnableUndo( bool bVal ); @@ -1012,24 +1012,24 @@ public: void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; } SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks ); SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab ); - void SetCutMode( BOOL bCut ); - BOOL IsCutMode(); - void SetClipArea( const ScRange& rArea, BOOL bCut = FALSE ); + void SetCutMode( sal_Bool bCut ); + sal_Bool IsCutMode(); + void SetClipArea( const ScRange& rArea, sal_Bool bCut = sal_False ); - SC_DLLPUBLIC BOOL IsDocVisible() const { return bIsVisible; } - void SetDocVisible( BOOL bSet ); + SC_DLLPUBLIC sal_Bool IsDocVisible() const { return bIsVisible; } + void SetDocVisible( sal_Bool bSet ); - BOOL HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL ); + sal_Bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL ); void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark ); void DeleteObjectsInSelection( const ScMarkData& rMark ); void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, USHORT nDelFlag); + const ScMarkData& rMark, sal_uInt16 nDelFlag); void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCTAB nTab, USHORT nDelFlag); - void DeleteAreaTab(const ScRange& rRange, USHORT nDelFlag); + SCTAB nTab, sal_uInt16 nDelFlag); + void DeleteAreaTab(const ScRange& rRange, sal_uInt16 nDelFlag); void CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc, const ScMarkData* pMarks = NULL, bool bAllTabs = false, bool bKeepScenarioFlags = false, @@ -1046,20 +1046,20 @@ public: SCROW & rClipStartRow ); void StartListeningFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, USHORT nInsFlag ); + const ScMarkData& rMark, sal_uInt16 nInsFlag ); void BroadcastFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, USHORT nInsFlag ); + const ScMarkData& rMark, sal_uInt16 nInsFlag ); /** If pDestRanges is given it overrides rDestRange, rDestRange in this case is the overall encompassing range. */ void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark, - USHORT nInsFlag, + sal_uInt16 nInsFlag, ScDocument* pRefUndoDoc = NULL, ScDocument* pClipDoc = NULL, - BOOL bResetCut = TRUE, - BOOL bAsLink = FALSE, - BOOL bIncludeFiltered = TRUE, - BOOL bSkipAttrForEmpty = FALSE, + sal_Bool bResetCut = sal_True, + sal_Bool bAsLink = sal_False, + sal_Bool bIncludeFiltered = sal_True, + sal_Bool bSkipAttrForEmpty = sal_False, const ScRangeList * pDestRanges = NULL ); void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark, @@ -1068,60 +1068,60 @@ public: bool bIncludeFiltered = true, bool bSkipAttrForEmpty = false); - void GetClipArea(SCCOL& nClipX, SCROW& nClipY, BOOL bIncludeFiltered); + void GetClipArea(SCCOL& nClipX, SCROW& nClipY, sal_Bool bIncludeFiltered); void GetClipStart(SCCOL& nClipX, SCROW& nClipY); - BOOL HasClipFilteredRows(); + sal_Bool HasClipFilteredRows(); - BOOL IsClipboardSource() const; + sal_Bool IsClipboardSource() const; - SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsLink ); + SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink ); ScClipParam& GetClipParam(); void SetClipParam(const ScClipParam& rParam); - void MixDocument( const ScRange& rRange, USHORT nFunction, BOOL bSkipEmpty, + void MixDocument( const ScRange& rRange, sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScDocument* pSrcDoc ); void 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 ); void 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 ); void TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType ); SC_DLLPUBLIC void InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, - BOOL bColInfo = FALSE, BOOL bRowInfo = FALSE ); + sal_Bool bColInfo = sal_False, sal_Bool bRowInfo = sal_False ); void AddUndoTab( SCTAB nTab1, SCTAB nTab2, - BOOL bColInfo = FALSE, BOOL bRowInfo = FALSE ); + sal_Bool bColInfo = sal_False, sal_Bool bRowInfo = sal_False ); SC_DLLPUBLIC void InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection, - BOOL bColInfo = FALSE, BOOL bRowInfo = FALSE ); + sal_Bool bColInfo = sal_False, sal_Bool bRowInfo = sal_False ); // nicht mehr benutzen: void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - USHORT nFlags, BOOL bMarked, ScDocument* pDestDoc, - const ScMarkData* pMarks = NULL, BOOL bColRowFlags = TRUE); + sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, + const ScMarkData* pMarks = NULL, sal_Bool bColRowFlags = sal_True); void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - USHORT nFlags, BOOL bMarked, ScDocument* pDestDoc, + sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL); void CopyToDocument(const ScRange& rRange, - USHORT nFlags, BOOL bMarked, ScDocument* pDestDoc, - const ScMarkData* pMarks = NULL, BOOL bColRowFlags = TRUE); + sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, + const ScMarkData* pMarks = NULL, sal_Bool bColRowFlags = sal_True); void UndoToDocument(const ScRange& rRange, - USHORT nFlags, BOOL bMarked, ScDocument* pDestDoc, + sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL); - void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario = FALSE ); - BOOL TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const; + void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScenario = sal_False ); + sal_Bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const; void MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, - ScMarkData& rDestMark, BOOL bResetMark = TRUE, - USHORT nNeededBits = 0 ) const; - BOOL HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const; + ScMarkData& rDestMark, sal_Bool bResetMark = sal_True, + sal_uInt16 nNeededBits = 0 ) const; + sal_Bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const; SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const; SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc ); @@ -1129,7 +1129,7 @@ public: void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - ScDocument* pUndoDoc = NULL, BOOL bIncludeDraw = TRUE, + ScDocument* pUndoDoc = NULL, sal_Bool bIncludeDraw = sal_True, bool bUpdateNoteCaptionPos = true ); SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc, @@ -1139,38 +1139,38 @@ public: void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, - ULONG nFillCount, FillDir eFillDir = FILL_TO_BOTTOM, + sal_uLong nFillCount, FillDir eFillDir = FILL_TO_BOTTOM, FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY, double nStepValue = 1.0, double nMaxValue = 1E307); String GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ); - BOOL GetSelectionFunction( ScSubTotalFunc eFunc, + sal_Bool GetSelectionFunction( ScSubTotalFunc eFunc, const ScAddress& rCursor, const ScMarkData& rMark, double& rResult ); - SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const; + SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const; SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const; - const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark, BOOL bDeep = TRUE ); - ScPatternAttr* CreateSelectionPattern( const ScMarkData& rMark, BOOL bDeep = TRUE ); + const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep = sal_True ); + ScPatternAttr* CreateSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep = sal_True ); const ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const; + const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const; SC_DLLPUBLIC const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator(); - BOOL HasStringWeakCharacters( const String& rString ); - SC_DLLPUBLIC BYTE GetStringScriptType( const String& rString ); - SC_DLLPUBLIC BYTE GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat ); - SC_DLLPUBLIC BYTE GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell = NULL ); + sal_Bool HasStringWeakCharacters( const String& rString ); + SC_DLLPUBLIC sal_uInt8 GetStringScriptType( const String& rString ); + SC_DLLPUBLIC sal_uInt8 GetCellScriptType( ScBaseCell* pCell, sal_uLong nNumberFormat ); + SC_DLLPUBLIC sal_uInt8 GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell = NULL ); - BOOL HasDetectiveOperations() const; + sal_Bool HasDetectiveOperations() const; void AddDetectiveOperation( const ScDetOpData& rData ); void ClearDetectiveOperations(); ScDetOpList* GetDetOpList() const { return pDetOpList; } void SetDetOpList(ScDetOpList* pNew); - BOOL HasDetectiveObjects(SCTAB nTab) const; + sal_Bool HasDetectiveObjects(SCTAB nTab) const; void GetSelectionFrame( const ScMarkData& rMark, SvxBoxItem& rLineOuter, @@ -1182,17 +1182,17 @@ public: const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner ); - void ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark ); - void ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark ); + void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); + void ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ); - SC_DLLPUBLIC ULONG AddCondFormat( const ScConditionalFormat& rNew ); - SC_DLLPUBLIC void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges ); - SC_DLLPUBLIC void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges, SCTAB nTab ); - void ConditionalChanged( ULONG nKey ); + SC_DLLPUBLIC sal_uLong AddCondFormat( const ScConditionalFormat& rNew ); + SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges ); + SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab ); + void ConditionalChanged( sal_uLong nKey ); - SC_DLLPUBLIC ULONG AddValidationEntry( const ScValidationData& rNew ); + SC_DLLPUBLIC sal_uLong AddValidationEntry( const ScValidationData& rNew ); - SC_DLLPUBLIC const ScValidationData* GetValidationEntry( ULONG nIndex ) const; + SC_DLLPUBLIC const ScValidationData* GetValidationEntry( sal_uLong nIndex ) const; ScConditionalFormatList* GetCondFormList() const // Ref-Undo { return pCondFormList; } @@ -1226,36 +1226,36 @@ public: void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark ); void ApplySelectionLineStyle( const ScMarkData& rMark, - const SvxBorderLine* pLine, BOOL bColorOnly ); + const SvxBorderLine* pLine, sal_Bool bColorOnly ); const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const; - void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRemoved, + void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY ); - BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const; + sal_Bool IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const; - SC_DLLPUBLIC BOOL ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, + SC_DLLPUBLIC sal_Bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - SCTAB nTab, INT16 nFlags ); - BOOL RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, + SCTAB nTab, sal_Int16 nFlags ); + sal_Bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - SCTAB nTab, INT16 nFlags ); + SCTAB nTab, sal_Int16 nFlags ); SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr, - BOOL bPutToPool = FALSE ); + sal_Bool bPutToPool = sal_False ); SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr, - BOOL bPutToPool = FALSE ); + sal_Bool bPutToPool = sal_False ); void DeleteNumberFormat( const sal_uInt32* pDelKeys, sal_uInt32 nCount ); void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - USHORT nFormatNo, const ScMarkData& rMark ); + sal_uInt16 nFormatNo, const ScMarkData& rMark ); void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData& rData ); - BOOL SearchAndReplace( const SvxSearchItem& rSearchItem, + sal_Bool SearchAndReplace( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, SCTAB& rTab, ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc = NULL ); @@ -1265,50 +1265,50 @@ public: static void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow ); - BOOL Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, + sal_Bool Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, SCCOL nVCol, SCROW nVRow, SCTAB nVTab, const String& sValStr, double& nX); void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark ); - void DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark ); - void DeleteSelectionTab( SCTAB nTab, USHORT nDelFlag, const ScMarkData& rMark ); + void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark ); + void DeleteSelectionTab( SCTAB nTab, sal_uInt16 nDelFlag, const ScMarkData& rMark ); - SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, USHORT nNewWidth ); - SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, USHORT nNewHeight ); + SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth ); + SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight ); SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, - USHORT nNewHeight ); + sal_uInt16 nNewHeight ); SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, - USHORT nNewHeight ); - void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bManual ); + sal_uInt16 nNewHeight ); + void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bManual ); - SC_DLLPUBLIC USHORT GetColWidth( SCCOL nCol, SCTAB nTab ) const; - SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; - SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const; - SC_DLLPUBLIC ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const; - SCROW GetRowForHeight( SCTAB nTab, ULONG nHeight ) const; - ULONG GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const; - SC_DLLPUBLIC ULONG GetColOffset( SCCOL nCol, SCTAB nTab ) const; - SC_DLLPUBLIC ULONG GetRowOffset( SCROW nRow, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; + SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const; + SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const; + SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const; + sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const; + SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab ) const; - SC_DLLPUBLIC USHORT GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const; - SC_DLLPUBLIC USHORT GetOriginalHeight( SCROW nRow, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const; - USHORT GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const; + sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const; SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const; - USHORT GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev, + sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bFormula, + sal_Bool bFormula, const ScMarkData* pMarkData = NULL, - BOOL bSimpleTextImport = FALSE ); - SC_DLLPUBLIC BOOL SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nExtra, + sal_Bool bSimpleTextImport = sal_False ); + SC_DLLPUBLIC sal_Bool 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 ); void UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, @@ -1317,20 +1317,20 @@ public: OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bWidth, BOOL bTotalSize = FALSE ); + sal_Bool bWidth, sal_Bool bTotalSize = sal_False ); - SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, BOOL bShow); - SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, BOOL bShow); - SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow); - SC_DLLPUBLIC void SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags ); - SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags ); - SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BYTE nNewFlags ); + SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, sal_Bool bShow); + SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, sal_Bool bShow); + SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, sal_Bool bShow); + SC_DLLPUBLIC void SetColFlags( SCCOL nCol, SCTAB nTab, sal_uInt8 nNewFlags ); + SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, sal_uInt8 nNewFlags ); + SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt8 nNewFlags ); - SC_DLLPUBLIC BYTE GetColFlags( SCCOL nCol, SCTAB nTab ) const; - SC_DLLPUBLIC BYTE GetRowFlags( SCROW nRow, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt8 GetColFlags( SCCOL nCol, SCTAB nTab ) const; + SC_DLLPUBLIC sal_uInt8 GetRowFlags( SCROW nRow, SCTAB nTab ) const; - SC_DLLPUBLIC const ScBitMaskCompressedArray< SCROW, BYTE> & GetRowFlagsArray( SCTAB nTab ) const; - SC_DLLPUBLIC ScBitMaskCompressedArray< SCROW, BYTE> & GetRowFlagsArrayModifiable( SCTAB nTab ); + SC_DLLPUBLIC const ScBitMaskCompressedArray< SCROW, sal_uInt8> & GetRowFlagsArray( SCTAB nTab ) const; + SC_DLLPUBLIC ScBitMaskCompressedArray< SCROW, sal_uInt8> & GetRowFlagsArrayModifiable( SCTAB nTab ); SC_DLLPUBLIC void GetAllRowBreaks(::std::set& rBreaks, SCTAB nTab, bool bPage, bool bManual) const; SC_DLLPUBLIC void GetAllColBreaks(::std::set& rBreaks, SCTAB nTab, bool bPage, bool bManual) const; @@ -1388,11 +1388,11 @@ public: // returns whether to export a Default style for this col/row or not // nDefault is setted to one possition in the current row/col where the Default style is - BOOL GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); - BOOL GetRowDefault( SCTAB nTab, SCROW nRow, SCCOL nLastCol, SCCOL& nDefault); + sal_Bool GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); + sal_Bool GetRowDefault( SCTAB nTab, SCROW nRow, SCCOL nLastCol, SCCOL& nDefault); - BOOL UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, BOOL bShow ); - BOOL UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bShow ); + sal_Bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, sal_Bool bShow ); + sal_Bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bShow ); void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab ); void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab ); @@ -1410,26 +1410,26 @@ public: void InvalidatePageBreaks(SCTAB nTab); void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = NULL ); void RemoveManualBreaks( SCTAB nTab ); - BOOL HasManualBreaks( SCTAB nTab ) const; + sal_Bool HasManualBreaks( SCTAB nTab ) const; - BOOL IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab = NULL ); - BOOL RemovePageStyleInUse( const String& rStrPageStyle ); - BOOL RenamePageStyleInUse( const String& rOld, const String& rNew ); + sal_Bool IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab = NULL ); + sal_Bool RemovePageStyleInUse( const String& rStrPageStyle ); + sal_Bool RenamePageStyleInUse( const String& rOld, const String& rNew ); void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle, const SfxItemSet& rChanges ); void PageStyleModified( SCTAB nTab, const String& rNewName ); - SC_DLLPUBLIC BOOL NeedPageResetAfterTab( SCTAB nTab ) const; + SC_DLLPUBLIC sal_Bool NeedPageResetAfterTab( SCTAB nTab ) const; // war vorher im PageStyle untergracht. Jetzt an jeder Tabelle: - SC_DLLPUBLIC BOOL HasPrintRange(); - SC_DLLPUBLIC USHORT GetPrintRangeCount( SCTAB nTab ); - SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, USHORT nPos ); + SC_DLLPUBLIC sal_Bool HasPrintRange(); + SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab ); + SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos ); SC_DLLPUBLIC const ScRange* GetRepeatColRange( SCTAB nTab ); SC_DLLPUBLIC const ScRange* GetRepeatRowRange( SCTAB nTab ); /** Returns true, if the specified sheet is always printed. */ - BOOL IsPrintEntireSheet( SCTAB nTab ) const; + sal_Bool IsPrintEntireSheet( SCTAB nTab ) const; /** Removes all print ranges. */ SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab ); @@ -1454,7 +1454,7 @@ public: SC_DLLPUBLIC void CopyStdStylesFrom( ScDocument* pSrcDoc ); CharSet GetSrcCharSet() const { return eSrcSet; } - ULONG GetSrcVersion() const { return nSrcVer; } + sal_uLong GetSrcVersion() const { return nSrcVer; } SCROW GetSrcMaxRow() const { return nSrcMaxRow; } void SetSrcCharSet( CharSet eNew ) { eSrcSet = eNew; } @@ -1462,105 +1462,105 @@ public: void FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, SCTAB nTab, double nScaleX, double nScaleY, - BOOL bPageMode, BOOL bFormulaMode, + sal_Bool bPageMode, sal_Bool bFormulaMode, const ScMarkData* pMarkData = NULL ); SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const; - void Sort( SCTAB nTab, const ScSortParam& rSortParam, BOOL bKeepQuery ); - SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeepSub ); - BOOL ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, BOOL* pSpecial = NULL ); - SC_DLLPUBLIC BOOL CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + void Sort( SCTAB nTab, const ScSortParam& rSortParam, sal_Bool bKeepQuery ); + SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool bKeepSub ); + sal_Bool ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool* pSpecial = NULL ); + SC_DLLPUBLIC sal_Bool CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam ); void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr); - BOOL GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, + sal_Bool GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates); - SC_DLLPUBLIC BOOL GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, + SC_DLLPUBLIC sal_Bool GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates ); - BOOL GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, - TypedScStrCollection& rStrings, BOOL bLimit = FALSE ); - BOOL GetFormulaEntries( TypedScStrCollection& rStrings ); + sal_Bool GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, + TypedScStrCollection& rStrings, sal_Bool bLimit = sal_False ); + sal_Bool GetFormulaEntries( TypedScStrCollection& rStrings ); - BOOL HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); + sal_Bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); - SC_DLLPUBLIC BOOL HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, + SC_DLLPUBLIC sal_Bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - SC_DLLPUBLIC BOOL HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, + SC_DLLPUBLIC sal_Bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - SfxPrinter* GetPrinter( BOOL bCreateIfNotExist = TRUE ); + SfxPrinter* GetPrinter( sal_Bool bCreateIfNotExist = sal_True ); void SetPrinter( SfxPrinter* pNewPrinter ); VirtualDevice* GetVirtualDevice_100th_mm(); SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice... - void EraseNonUsedSharedNames(USHORT nLevel); - BOOL GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, - BOOL bInSel, const ScMarkData& rMark) const; + void EraseNonUsedSharedNames(sal_uInt16 nLevel); + sal_Bool GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, + sal_Bool bInSel, const ScMarkData& rMark) const; - BOOL ReplaceStyle(const SvxSearchItem& rSearchItem, + sal_Bool ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, - ScMarkData& rMark, BOOL bIsUndo); + ScMarkData& rMark, sal_Bool bIsUndo); void DoColResize( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd ); void InvalidateTextWidth( const String& rStyleName ); void InvalidateTextWidth( SCTAB nTab ); - void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, BOOL bNumFormatChanged ); + void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, sal_Bool bNumFormatChanged ); - BOOL IdleCalcTextWidth(); - BOOL IdleCheckLinks(); + sal_Bool IdleCalcTextWidth(); + sal_Bool IdleCheckLinks(); - BOOL ContinueOnlineSpelling(); // TRUE = etwas gefunden + sal_Bool ContinueOnlineSpelling(); // sal_True = etwas gefunden - BOOL IsIdleDisabled() const { return bIdleDisabled; } - void DisableIdle(BOOL bDo) { bIdleDisabled = bDo; } + sal_Bool IsIdleDisabled() const { return bIdleDisabled; } + void DisableIdle(sal_Bool bDo) { bIdleDisabled = bDo; } - BOOL IsDetectiveDirty() const { return bDetectiveDirty; } - void SetDetectiveDirty(BOOL bSet) { bDetectiveDirty = bSet; } + sal_Bool IsDetectiveDirty() const { return bDetectiveDirty; } + void SetDetectiveDirty(sal_Bool bSet) { bDetectiveDirty = bSet; } void RemoveAutoSpellObj(); void SetOnlineSpellPos( const ScAddress& rPos ); - SC_DLLPUBLIC BOOL SetVisibleSpellRange( const ScRange& rRange ); // TRUE = changed + SC_DLLPUBLIC sal_Bool SetVisibleSpellRange( const ScRange& rRange ); // sal_True = changed - BYTE GetMacroCallMode() const { return nMacroCallMode; } - void SetMacroCallMode(BYTE nNew) { nMacroCallMode = nNew; } + sal_uInt8 GetMacroCallMode() const { return nMacroCallMode; } + void SetMacroCallMode(sal_uInt8 nNew) { nMacroCallMode = nNew; } - BOOL GetHasMacroFunc() const { return bHasMacroFunc; } - void SetHasMacroFunc(BOOL bSet) { bHasMacroFunc = bSet; } + sal_Bool GetHasMacroFunc() const { return bHasMacroFunc; } + void SetHasMacroFunc(sal_Bool bSet) { bHasMacroFunc = bSet; } - BOOL CheckMacroWarn(); + sal_Bool CheckMacroWarn(); void SetRangeOverflowType(sal_uInt32 nType) { nRangeOverflowType = nType; } sal_Bool HasRangeOverflow() const { return nRangeOverflowType != 0; } SC_DLLPUBLIC sal_uInt32 GetRangeOverflowType() const { return nRangeOverflowType; } // fuer Broadcasting/Listening - void SetNoSetDirty( BOOL bVal ) { bNoSetDirty = bVal; } - BOOL GetNoSetDirty() const { return bNoSetDirty; } - void SetInsertingFromOtherDoc( BOOL bVal ) { bInsertingFromOtherDoc = bVal; } - BOOL IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; } + void SetNoSetDirty( sal_Bool bVal ) { bNoSetDirty = bVal; } + sal_Bool GetNoSetDirty() const { return bNoSetDirty; } + void SetInsertingFromOtherDoc( sal_Bool bVal ) { bInsertingFromOtherDoc = bVal; } + sal_Bool IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; } void SetLoadingMedium( bool bVal ); void SetImportingXML( bool bVal ); bool IsImportingXML() const { return bImportingXML; } - void SetXMLFromWrapper( BOOL bVal ); - BOOL IsXMLFromWrapper() const { return bXMLFromWrapper; } - void SetCalcingAfterLoad( BOOL bVal ) { bCalcingAfterLoad = bVal; } - BOOL IsCalcingAfterLoad() const { return bCalcingAfterLoad; } - void SetNoListening( BOOL bVal ) { bNoListening = bVal; } - BOOL GetNoListening() const { return bNoListening; } + void SetXMLFromWrapper( sal_Bool bVal ); + sal_Bool IsXMLFromWrapper() const { return bXMLFromWrapper; } + void SetCalcingAfterLoad( sal_Bool bVal ) { bCalcingAfterLoad = bVal; } + sal_Bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; } + void SetNoListening( sal_Bool bVal ) { bNoListening = bVal; } + sal_Bool GetNoListening() const { return bNoListening; } ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM; } ScChartListenerCollection* GetChartListenerCollection() const { return pChartListenerCollection; } void SetChartListenerCollection( ScChartListenerCollection*, - BOOL bSetChartRangeLists = FALSE ); + sal_Bool bSetChartRangeLists = sal_False ); void UpdateChart( const String& rName ); void RestoreChartListener( const String& rName ); SC_DLLPUBLIC void UpdateChartListenerCollection(); - BOOL IsChartListenerCollectionNeedsUpdate() const + sal_Bool IsChartListenerCollectionNeedsUpdate() const { return bChartListenerCollectionNeedsUpdate; } - void SetChartListenerCollectionNeedsUpdate( BOOL bFlg ) + void SetChartListenerCollectionNeedsUpdate( sal_Bool bFlg ) { bChartListenerCollectionNeedsUpdate = bFlg; } void AddOLEObjectToCollection(const String& rName); @@ -1570,15 +1570,15 @@ public: vos::ORef GetForbiddenCharacters(); void SetForbiddenCharacters( const vos::ORef xNew ); - BYTE GetAsianCompression() const; // CharacterCompressionType values - BOOL IsValidAsianCompression() const; - void SetAsianCompression(BYTE nNew); + sal_uInt8 GetAsianCompression() const; // CharacterCompressionType values + sal_Bool IsValidAsianCompression() const; + void SetAsianCompression(sal_uInt8 nNew); - BOOL GetAsianKerning() const; - BOOL IsValidAsianKerning() const; - void SetAsianKerning(BOOL bNew); + sal_Bool GetAsianKerning() const; + sal_Bool IsValidAsianKerning() const; + void SetAsianKerning(sal_Bool bNew); - BYTE GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values + sal_uInt8 GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const { return eLinkMode ;} void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;} @@ -1590,21 +1590,21 @@ private: void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2 ) const; - USHORT RowDifferences( SCROW nThisRow, SCTAB nThisTab, + sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab, ScDocument& rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, SCCOLROW* pOtherCols ); - USHORT ColDifferences( SCCOL nThisCol, SCTAB nThisTab, + sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab, ScDocument& rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab, SCROW nMaxRow, SCCOLROW* pOtherRows ); void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow, - BOOL bColumns, + sal_Bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, SCCOLROW nEndCol, SCCOLROW* pTranslate, - ScProgress* pProgress, ULONG nProAdd ); - BOOL OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos, - USHORT nMaxTest ); + ScProgress* pProgress, sal_uLong nProAdd ); + sal_Bool OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos, + sal_uInt16 nMaxTest ); DECL_LINK( TrackTimeHdl, Timer* ); @@ -1623,7 +1623,7 @@ public: */ void Broadcast( const ScHint& rHint ); /// deprecated - void Broadcast( ULONG nHint, const ScAddress& rAddr, + void Broadcast( sal_uLong nHint, const ScAddress& rAddr, ScBaseCell* pCell ); /// only area, no cell broadcast void AreaBroadcast( const ScHint& rHint ); @@ -1642,24 +1642,24 @@ public: SvtListener* pListener ); void PutInFormulaTree( ScFormulaCell* pCell ); void RemoveFromFormulaTree( ScFormulaCell* pCell ); - void CalcFormulaTree( BOOL bOnlyForced = FALSE, - BOOL bNoProgressBar = FALSE ); + void CalcFormulaTree( sal_Bool bOnlyForced = sal_False, + sal_Bool bNoProgressBar = sal_False ); void ClearFormulaTree(); void AppendToFormulaTrack( ScFormulaCell* pCell ); void RemoveFromFormulaTrack( ScFormulaCell* pCell ); - void TrackFormulas( ULONG nHintId = SC_HINT_DATACHANGED ); - USHORT GetFormulaTrackCount() const { return nFormulaTrackCount; } - BOOL IsInFormulaTree( ScFormulaCell* pCell ) const; - BOOL IsInFormulaTrack( ScFormulaCell* pCell ) const; - USHORT GetHardRecalcState() { return nHardRecalcState; } - void SetHardRecalcState( USHORT nVal ) { nHardRecalcState = nVal; } + void TrackFormulas( sal_uLong nHintId = SC_HINT_DATACHANGED ); + sal_uInt16 GetFormulaTrackCount() const { return nFormulaTrackCount; } + sal_Bool IsInFormulaTree( ScFormulaCell* pCell ) const; + sal_Bool IsInFormulaTrack( ScFormulaCell* pCell ) const; + sal_uInt16 GetHardRecalcState() { return nHardRecalcState; } + void SetHardRecalcState( sal_uInt16 nVal ) { nHardRecalcState = nVal; } void StartAllListeners(); const ScFormulaCell* GetFormulaTree() const { return pFormulaTree; } - BOOL HasForcedFormulas() const { return bHasForcedFormulas; } - void SetForcedFormulas( BOOL bVal ) { bHasForcedFormulas = bVal; } - ULONG GetFormulaCodeInTree() const { return nFormulaCodeInTree; } - BOOL IsInInterpreter() const { return nInterpretLevel != 0; } - USHORT GetInterpretLevel() { return nInterpretLevel; } + sal_Bool HasForcedFormulas() const { return bHasForcedFormulas; } + void SetForcedFormulas( sal_Bool bVal ) { bHasForcedFormulas = bVal; } + sal_uLong GetFormulaCodeInTree() const { return nFormulaCodeInTree; } + sal_Bool IsInInterpreter() const { return nInterpretLevel != 0; } + sal_uInt16 GetInterpretLevel() { return nInterpretLevel; } void IncInterpretLevel() { if ( nInterpretLevel < USHRT_MAX ) @@ -1670,8 +1670,8 @@ public: if ( nInterpretLevel ) nInterpretLevel--; } - BOOL IsInMacroInterpreter() const { return nMacroInterpretLevel != 0; } - USHORT GetMacroInterpretLevel() { return nMacroInterpretLevel; } + sal_Bool IsInMacroInterpreter() const { return nMacroInterpretLevel != 0; } + sal_uInt16 GetMacroInterpretLevel() { return nMacroInterpretLevel; } void IncMacroInterpretLevel() { if ( nMacroInterpretLevel < USHRT_MAX ) @@ -1682,8 +1682,8 @@ public: if ( nMacroInterpretLevel ) nMacroInterpretLevel--; } - BOOL IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; } - USHORT GetInterpreterTableOpLevel() { return nInterpreterTableOpLevel; } + sal_Bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; } + sal_uInt16 GetInterpreterTableOpLevel() { return nInterpreterTableOpLevel; } void IncInterpreterTableOpLevel() { if ( nInterpreterTableOpLevel < USHRT_MAX ) @@ -1696,27 +1696,27 @@ public: } // add a formula to be remembered for TableOp broadcasts void AddTableOpFormulaCell( ScFormulaCell* ); - void InvalidateLastTableOpParams() { aLastTableOpParams.bValid = FALSE; } + void InvalidateLastTableOpParams() { aLastTableOpParams.bValid = sal_False; } ScRecursionHelper& GetRecursionHelper() { if (!pRecursionHelper) pRecursionHelper = CreateRecursionHelperInstance(); return *pRecursionHelper; } - BOOL IsInDtorClear() const { return bInDtorClear; } - void SetExpandRefs( BOOL bVal ) { bExpandRefs = bVal; } - BOOL IsExpandRefs() { return bExpandRefs; } + sal_Bool IsInDtorClear() const { return bInDtorClear; } + void SetExpandRefs( sal_Bool bVal ) { bExpandRefs = bVal; } + sal_Bool IsExpandRefs() { return bExpandRefs; } SC_DLLPUBLIC void IncSizeRecalcLevel( SCTAB nTab ); SC_DLLPUBLIC void DecSizeRecalcLevel( SCTAB nTab, bool bUpdateNoteCaptionPos = true ); - ULONG GetXMLImportedFormulaCount() const { return nXMLImportedFormulaCount; } - void IncXMLImportedFormulaCount( ULONG nVal ) + sal_uLong GetXMLImportedFormulaCount() const { return nXMLImportedFormulaCount; } + void IncXMLImportedFormulaCount( sal_uLong nVal ) { if ( nXMLImportedFormulaCount + nVal > nXMLImportedFormulaCount ) nXMLImportedFormulaCount += nVal; } - void DecXMLImportedFormulaCount( ULONG nVal ) + void DecXMLImportedFormulaCount( sal_uLong nVal ) { if ( nVal <= nXMLImportedFormulaCount ) nXMLImportedFormulaCount -= nVal; @@ -1727,8 +1727,8 @@ public: void StartTrackTimer(); void CompileDBFormula(); - void CompileDBFormula( BOOL bCreateFormulaString ); - void CompileNameFormula( BOOL bCreateFormulaString ); + void CompileDBFormula( sal_Bool bCreateFormulaString ); + void CompileNameFormula( sal_Bool bCreateFormulaString ); void CompileColRowNameFormula(); /** Maximum string length of a column, e.g. for dBase export. @@ -1765,8 +1765,8 @@ public: ::com::sun::star::util::XModifyListener >& rListener, const ::com::sun::star::lang::EventObject& rEvent ); - void SetInLinkUpdate(BOOL bSet); // TableLink or AreaLink - BOOL IsInLinkUpdate() const; // including DdeLink + void SetInLinkUpdate(sal_Bool bSet); // TableLink or AreaLink + sal_Bool IsInLinkUpdate() const; // including DdeLink SC_DLLPUBLIC SfxItemPool* GetEditPool() const; SC_DLLPUBLIC SfxItemPool* GetEnginePool() const; @@ -1779,16 +1779,16 @@ public: ScRefreshTimerControl * const * GetRefreshTimerControlAddress() const { return &pRefreshTimerControl; } - void SetPastingDrawFromOtherDoc( BOOL bVal ) + void SetPastingDrawFromOtherDoc( sal_Bool bVal ) { bPastingDrawFromOtherDoc = bVal; } - BOOL PastingDrawFromOtherDoc() const + sal_Bool PastingDrawFromOtherDoc() const { return bPastingDrawFromOtherDoc; } /// an ID unique to each document instance sal_uInt32 GetDocumentID() const; void InvalidateStyleSheetUsage() - { bStyleSheetUsageInvalid = TRUE; } + { bStyleSheetUsageInvalid = sal_True; } void GetSortParam( ScSortParam& rParam, SCTAB nTab ); void SetSortParam( ScSortParam& rParam, SCTAB nTab ); @@ -1830,9 +1830,9 @@ private: // CLOOK-Impl-Methoden void DeleteDrawLayer(); void DeleteColorTable(); - SC_DLLPUBLIC BOOL DrawGetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const; - void DrawMovePage( USHORT nOldPos, USHORT nNewPos ); - void DrawCopyPage( USHORT nOldPos, USHORT nNewPos ); + SC_DLLPUBLIC sal_Bool DrawGetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const; + void DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ); + void DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ); void UpdateDrawPrinter(); void UpdateDrawLanguages(); @@ -1852,7 +1852,7 @@ private: // CLOOK-Impl-Methoden ScClipRangeNameData& rRangeNames, const ScRangeList& rDestRanges, const ScMarkData& rMark, SCCOL nXw, SCROW nYw); - BOOL HasPartOfMerged( const ScRange& rRange ); + sal_Bool HasPartOfMerged( const ScRange& rRange ); std::map< SCTAB, ScSortParam > mSheetSortParams; diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index 92424e8178f4..5a1535686e74 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -109,7 +109,7 @@ private: ::cppu::OInterfaceContainerHelper maChangesListeners; - BOOL FillRenderMarkData( const com::sun::star::uno::Any& aSelection, + sal_Bool FillRenderMarkData( const com::sun::star::uno::Any& aSelection, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rOptions, ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const; com::sun::star::uno::Reference GetFormatter(); @@ -333,7 +333,7 @@ private: ScDocShell* pDocShell; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > - GetObjectByIndex_Impl(INT32 nIndex) const; + GetObjectByIndex_Impl(sal_Int32 nIndex) const; public: ScDrawPagesObj(ScDocShell* pDocSh); @@ -800,7 +800,7 @@ private: ScDocShell* pDocShell; SCTAB nTab; - BOOL GetScenarioIndex_Impl( const ::rtl::OUString& rName, SCTAB& rIndex ); + sal_Bool GetScenarioIndex_Impl( const ::rtl::OUString& rName, SCTAB& rIndex ); ScTableSheetObj* GetObjectByIndex_Impl(sal_Int32 nIndex); ScTableSheetObj* GetObjectByName_Impl(const ::rtl::OUString& aName); diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx index eab01d078081..dd02e0256a83 100644 --- a/sc/inc/dpcachetable.hxx +++ b/sc/inc/dpcachetable.hxx @@ -168,7 +168,7 @@ public: ScDPTableDataCache* GetCache() const; /** Fill the internal table from the cell range provided. This function assumes that the first row is the column header. */ - void fillTable( const ScQueryParam& rQuery, BOOL* pSpecial, + void fillTable( const ScQueryParam& rQuery, sal_Bool* pSpecial, bool bIgnoreEmptyRows, bool bRepeatIfEmpty ); /** Fill the internal table from database connection object. This function assumes that the first row is the column header. */ diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx old mode 100755 new mode 100644 index 7de5947cc969..b1c00d0636c6 --- a/sc/inc/dpglobal.hxx +++ b/sc/inc/dpglobal.hxx @@ -114,32 +114,32 @@ public: private: union { - ULONG nNumFormat; + sal_uLong nNumFormat; sal_Int32 mnDatePart; }; String aString; double fValue; - BYTE mbFlag; - //BOOL bHasValue: 1 ; - //BOOL bHasData: 1; - //BOOL bErr: 1; + sal_uInt8 mbFlag; + //sal_Bool bHasValue: 1 ; + //sal_Bool bHasData: 1; + //sal_Bool bErr: 1; friend class ScDPTableDataCache; public: ScDPItemData() : nNumFormat( 0 ), fValue(0.0), mbFlag( 0 ){} - ScDPItemData( ULONG nNF, const String & rS, double fV, BYTE bF ):nNumFormat(nNF), aString(rS), fValue(fV), mbFlag( bF ){} - ScDPItemData( const String& rS, double fV = 0.0, BOOL bHV = FALSE, const ULONG nNumFormat = 0 , BOOL bData = TRUE) ; - ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nDocTab ); + ScDPItemData( sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF ):nNumFormat(nNF), aString(rS), fValue(fV), mbFlag( bF ){} + ScDPItemData( const String& rS, double fV = 0.0, sal_Bool bHV = sal_False, const sal_uLong nNumFormat = 0 , sal_Bool bData = sal_True) ; + ScDPItemData( ScDocument* pDoc, SCROW nRow, sal_uInt16 nCol, sal_uInt16 nDocTab ); void SetString( const String& rS ) { aString = rS; mbFlag &= ~(MK_VAL|MK_DATE); nNumFormat = 0; mbFlag |= MK_DATA; } -// void SetValue ( double value , ULONG nNumFormat = 0 ) { bHasValue = TRUE; nNumFormat = 0;bHasData = TRUE; bDate = FALSE; fValue = value ;} - BOOL IsCaseInsEqual( const ScDPItemData& r ) const; +// void SetValue ( double value , sal_uLong nNumFormat = 0 ) { bHasValue = sal_True; nNumFormat = 0;bHasData = sal_True; bDate = sal_False; fValue = value ;} + sal_Bool IsCaseInsEqual( const ScDPItemData& r ) const; size_t Hash() const; // exact equality - BOOL operator==( const ScDPItemData& r ) const; + sal_Bool operator==( const ScDPItemData& r ) const; // case insensitive equality static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB ); @@ -148,21 +148,21 @@ public: #endif public: - BOOL IsHasData() const ; - BOOL IsHasErr() const ; - BOOL IsValue() const; + sal_Bool IsHasData() const ; + sal_Bool IsHasErr() const ; + sal_Bool IsValue() const; String GetString() const ; double GetValue() const ; - ULONG GetNumFormat() const ; - BOOL HasStringData() const ; - BOOL IsDate() const; - BOOL HasDatePart() const; - void SetDate( BOOL b ) ; + sal_uLong GetNumFormat() const ; + sal_Bool HasStringData() const ; + sal_Bool IsDate() const; + sal_Bool HasDatePart() const; + void SetDate( sal_Bool b ) ; TypedStrData* CreateTypeString( ); sal_uInt8 GetType() const; - BYTE & GetFlag() throw() { return mbFlag; } - const BYTE & GetFlag() const throw() { return const_cast(this)->GetFlag(); } + sal_uInt8 & GetFlag() throw() { return mbFlag; } + const sal_uInt8 & GetFlag() const throw() { return const_cast(this)->GetFlag(); } }; class SC_DLLPUBLIC ScDPItemDataPool @@ -194,8 +194,8 @@ class ScTabViewShell; namespace ScDPGlobal { // used for core data - String GetFieldFuncString( const String& rSourceName, USHORT &rFuncMask, BOOL bIsValue ); - String GetFuncString( const String &rString, const USHORT nIndex ); + String GetFieldFuncString( const String& rSourceName, sal_uInt16 &rFuncMask, sal_Bool bIsValue ); + String GetFuncString( const String &rString, const sal_uInt16 nIndex ); com::sun::star::uno::Reference DP_GetMembers( const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>&rSrc, long nField ); // common operation @@ -203,7 +203,7 @@ namespace ScDPGlobal Rectangle operator *( const Rectangle &rLeft, const std::pair & rRight ); // used for DataPilot Panel ScDPInfoWnd* GetDPInfoWnd( ScTabViewShell *pViewShell ); - bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, USHORT nEndTab, BOOL bExcludeClip = FALSE ); + bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, sal_uInt16 nEndTab, sal_Bool bExcludeClip = sal_False ); } #endif diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index a22b6fd6a2eb..b8fde6ecf4b7 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -235,11 +235,11 @@ public: // End Comments virtual String getDimensionName(long nColumn); - virtual BOOL getIsDataLayoutDimension(long nColumn); - virtual BOOL IsDateDimension(long nDim); - virtual ULONG GetNumberFormat(long nDim); + virtual sal_Bool getIsDataLayoutDimension(long nColumn); + virtual sal_Bool IsDateDimension(long nDim); + virtual sal_uLong GetNumberFormat(long nDim); virtual void DisposeData(); - virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty ); + virtual void SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty ); virtual bool IsRepeatIfEmpty(); @@ -251,12 +251,12 @@ public: virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow); virtual const ScDPCacheTable& GetCacheTable() const; - virtual BOOL IsBaseForGroup(long nDim) const; + virtual sal_Bool IsBaseForGroup(long nDim) const; virtual long GetGroupBase(long nGroupDim) const; - virtual BOOL IsNumOrDateGroup(long nDim) const; - virtual BOOL IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex, + virtual sal_Bool IsNumOrDateGroup(long nDim) const; + virtual sal_Bool IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex, const ScDPItemData& rBaseData, long nBaseIndex ) const; - virtual BOOL HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex, + virtual sal_Bool HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex, const ScDPItemData& rSecondData, long nSecondIndex ) const; }; diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index e1b88919dad6..8e15bd55068d 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -79,7 +79,7 @@ struct ScDPServiceDesc aServiceName( rServ ), aParSource( rSrc ), aParName( rNam ), aParUser( rUser ), aParPass( rPass ) { } - BOOL operator== ( const ScDPServiceDesc& rOther ) const + sal_Bool operator== ( const ScDPServiceDesc& rOther ) const { return aServiceName == rOther.aServiceName && aParSource == rOther.aParSource && aParName == rOther.aParName && @@ -104,28 +104,28 @@ private: // cached data com::sun::star::uno::Reference xSource; ScDPOutput* pOutput; - BOOL bSettingsChanged; - BOOL bAlive; // FALSE if only used to hold settings + sal_Bool bSettingsChanged; + sal_Bool bAlive; // sal_False if only used to hold settings sal_uInt16 mnAutoFormatIndex; - BOOL bAllowMove; + sal_Bool bAllowMove; long nHeaderRows; // page fields plus filter button - bool mbHeaderLayout; // TRUE : grid, FALSE : standard + bool mbHeaderLayout; // sal_True : grid, sal_False : standard SC_DLLPRIVATE ScDPTableData* GetTableData(); SC_DLLPRIVATE void CreateObjects(); SC_DLLPRIVATE void CreateOutput(); - BOOL bRefresh; + sal_Bool bRefresh; long mnCacheId; public: // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - inline void SetRefresh() { bRefresh = TRUE; } + inline void SetRefresh() { bRefresh = sal_True; } const ScDPTableDataCache* GetCache() const; long GetCacheId() const; void SetCacheId( long nCacheId ); - ULONG RefreshCache(); + sal_uLong RefreshCache(); // End Comments ScDPObject( ScDocument* pD ); ScDPObject(const ScDPObject& r); @@ -133,15 +133,15 @@ public: virtual ScDataObject* Clone() const; - void SetAlive(BOOL bSet); - void SetAllowMove(BOOL bSet); + void SetAlive(sal_Bool bSet); + void SetAllowMove(sal_Bool bSet); void InvalidateData(); void InvalidateSource(); void Output( const ScAddress& rPos ); - ScRange GetNewOutputRange( BOOL& rOverflow ); + ScRange GetNewOutputRange( sal_Bool& rOverflow ); const ScRange GetOutputRangeByType( sal_Int32 nType ); void SetSaveData(const ScDPSaveData& rData); @@ -169,9 +169,9 @@ public: com::sun::star::uno::Reference GetSource(); - BOOL IsSheetData() const; - BOOL IsImportData() const { return(pImpDesc != NULL); } - BOOL IsServiceData() const { return(pServDesc != NULL); } + sal_Bool IsSheetData() const; + sal_Bool IsImportData() const { return(pImpDesc != NULL); } + sal_Bool IsServiceData() const { return(pServDesc != NULL); } void SetName(const String& rNew); const String& GetName() const { return aTableName; } @@ -186,19 +186,19 @@ public: bool IsDataDescriptionCell(const ScAddress& rPos); bool IsDimNameInUse(const ::rtl::OUString& rName) const; - String GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags = NULL ); - BOOL IsDuplicated( long nDim ); + String GetDimName( long nDim, sal_Bool& rIsDataLayout, sal_Int32* pFlags = NULL ); + sal_Bool IsDuplicated( long nDim ); long GetDimCount(); void GetHeaderPositionData(const ScAddress& rPos, ::com::sun::star::sheet::DataPilotTableHeaderData& rData); - long GetHeaderDim( const ScAddress& rPos, USHORT& rOrient ); - BOOL GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMouseTop, + long GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ); + sal_Bool GetHeaderDrag( const ScAddress& rPos, sal_Bool bMouseLeft, sal_Bool bMouseTop, long nDragDim, - Rectangle& rPosRect, USHORT& rOrient, long& rDimPos ); - BOOL IsFilterButton( const ScAddress& rPos ); + Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ); + sal_Bool IsFilterButton( const ScAddress& rPos ); - BOOL GetPivotData( ScDPGetPivotDataField& rTarget, /* returns result */ + sal_Bool GetPivotData( ScDPGetPivotDataField& rTarget, /* returns result */ const std::vector< ScDPGetPivotDataField >& rFilters ); - BOOL ParseFilters( ScDPGetPivotDataField& rTarget, + sal_Bool ParseFilters( ScDPGetPivotDataField& rTarget, std::vector< ScDPGetPivotDataField >& rFilters, const String& rFilterList ); @@ -208,24 +208,24 @@ public: void ToggleDetails(const ::com::sun::star::sheet::DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj); - BOOL FillOldParam(ScPivotParam& rParam, BOOL bForFile) const; - BOOL FillLabelData(ScPivotParam& rParam); - void InitFromOldPivot(const ScPivot& rOld, ScDocument* pDoc, BOOL bSetSource); + sal_Bool FillOldParam(ScPivotParam& rParam, sal_Bool bForFile) const; + sal_Bool FillLabelData(ScPivotParam& rParam); + void InitFromOldPivot(const ScPivot& rOld, ScDocument* pDoc, sal_Bool bSetSource); - BOOL GetHierarchiesNA( sal_Int32 nDim, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xHiers ); - BOOL GetHierarchies( sal_Int32 nDim, com::sun::star::uno::Sequence< rtl::OUString >& rHiers ); + sal_Bool GetHierarchiesNA( sal_Int32 nDim, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xHiers ); + sal_Bool GetHierarchies( sal_Int32 nDim, com::sun::star::uno::Sequence< rtl::OUString >& rHiers ); sal_Int32 GetUsedHierarchy( sal_Int32 nDim ); - BOOL GetMembersNA( sal_Int32 nDim, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers ); - BOOL GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers ); + sal_Bool GetMembersNA( sal_Int32 nDim, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers ); + sal_Bool GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers ); bool GetMemberNames( sal_Int32 nDim, ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames ); bool GetMembers( sal_Int32 nDim, sal_Int32 nHier, ::std::vector& rMembers ); void UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - BOOL RefsEqual( const ScDPObject& r ) const; + sal_Bool RefsEqual( const ScDPObject& r ) const; void WriteRefsTo( ScDPObject& r ) const; void GetPositionData(const ScAddress& rPos, ::com::sun::star::sheet::DataPilotTablePositionData& rPosData); @@ -245,22 +245,22 @@ public: void BuildAllDimensionMembers(); - static BOOL HasRegisteredSources(); + static sal_Bool HasRegisteredSources(); static com::sun::star::uno::Sequence GetRegisteredSources(); static com::sun::star::uno::Reference CreateSource( const ScDPServiceDesc& rDesc ); static void ConvertOrientation( ScDPSaveData& rSaveData, - PivotField* pFields, SCSIZE nCount, USHORT nOrient, + PivotField* pFields, SCSIZE nCount, sal_uInt16 nOrient, ScDocument* pDoc, SCROW nRow, SCTAB nTab, const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>& xSource, - BOOL bOldDefaults, + sal_Bool bOldDefaults, PivotField* pRefColFields = NULL, SCSIZE nRefColCount = 0, PivotField* pRefRowFields = NULL, SCSIZE nRefRowCount = 0, PivotField* pRefPageFields = NULL, SCSIZE nRefPageCount = 0 ); - static bool IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags ); + static bool IsOrientationAllowed( sal_uInt16 nOrient, sal_Int32 nDimFlags ); }; @@ -277,17 +277,17 @@ public: virtual ScDataObject* Clone() const; - ScDPObject* operator[](USHORT nIndex) const {return (ScDPObject*)At(nIndex);} + ScDPObject* operator[](sal_uInt16 nIndex) const {return (ScDPObject*)At(nIndex);} ScDPObject* GetByName(const String& rName) const; void DeleteOnTab( SCTAB nTab ); void UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - BOOL RefsEqual( const ScDPCollection& r ) const; + sal_Bool RefsEqual( const ScDPCollection& r ) const; void WriteRefsTo( ScDPCollection& r ) const; - String CreateNewName( USHORT nMin = 1 ) const; + String CreateNewName( sal_uInt16 nMin = 1 ) const; void FreeTable(ScDPObject* pDPObj); SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj); diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx index e97a56a9ecf2..c4bb203ecbb8 100644 --- a/sc/inc/dpoutput.hxx +++ b/sc/inc/dpoutput.hxx @@ -80,7 +80,7 @@ private: com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier> xSource; ScAddress aStartPos; - BOOL bDoFilter; + sal_Bool bDoFilter; ScDPOutLevelData* pColFields; ScDPOutLevelData* pRowFields; ScDPOutLevelData* pPageFields; @@ -90,24 +90,24 @@ private: com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::sheet::DataResult> > aData; - BOOL bResultsError; + sal_Bool bResultsError; bool mbHasDataLayout; String aDataDescription; // Number format related parameters - UINT32* pColNumFmt; - UINT32* pRowNumFmt; + sal_uInt32* pColNumFmt; + sal_uInt32* pRowNumFmt; long nColFmtCount; long nRowFmtCount; - UINT32 nSingleNumFmt; + sal_uInt32 nSingleNumFmt; // Output geometry related parameters - BOOL bSizesValid; - BOOL bSizeOverflow; + sal_Bool bSizesValid; + sal_Bool bSizeOverflow; long nColCount; long nRowCount; long nHeaderSize; - bool mbHeaderLayout; // TRUE : grid, FALSE : standard + bool mbHeaderLayout; // sal_True : grid, sal_False : standard SCCOL nTabStartCol; SCROW nTabStartRow; SCCOL nMemberStartCol; @@ -121,7 +121,7 @@ private: const com::sun::star::sheet::DataResult& rData ); void HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const com::sun::star::sheet::MemberResult& rData, - BOOL bColHeader, long nLevel ); + sal_Bool bColHeader, long nLevel ); void FieldCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rCaption, bool bInTable, bool bPopup, bool bHasHiddenMember ); void CalcSizes(); @@ -135,7 +135,7 @@ public: ScDPOutput( ScDocument* pD, const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>& xSrc, - const ScAddress& rPos, BOOL bFilter ); + const ScAddress& rPos, sal_Bool bFilter ); ~ScDPOutput(); void SetPosition( const ScAddress& rPos ); @@ -143,7 +143,7 @@ public: void Output(); //! Refresh? ScRange GetOutputRange( sal_Int32 nRegionType = ::com::sun::star::sheet::DataPilotOutputRangeType::WHOLE ); long GetHeaderRows(); - BOOL HasError(); // range overflow or exception from source + sal_Bool HasError(); // range overflow or exception from source void GetPositionData(const ScAddress& rPos, ::com::sun::star::sheet::DataPilotTablePositionData& rPosData); @@ -151,13 +151,13 @@ public: field region. */ bool GetDataResultPositionData(::std::vector< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters, const ScAddress& rPos); - BOOL GetPivotData( ScDPGetPivotDataField& rTarget, /* returns result */ + sal_Bool GetPivotData( ScDPGetPivotDataField& rTarget, /* returns result */ const std::vector< ScDPGetPivotDataField >& rFilters ); - long GetHeaderDim( const ScAddress& rPos, USHORT& rOrient ); - BOOL GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMouseTop, + long GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ); + sal_Bool GetHeaderDrag( const ScAddress& rPos, sal_Bool bMouseLeft, sal_Bool bMouseTop, long nDragDim, - Rectangle& rPosRect, USHORT& rOrient, long& rDimPos ); - BOOL IsFilterButton( const ScAddress& rPos ); + Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ); + sal_Bool IsFilterButton( const ScAddress& rPos ); void GetMemberResultNames( ScStrCollection& rNames, long nDimension ); diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx index 8272b850b27e..8c4babc77da3 100644 --- a/sc/inc/dpsave.hxx +++ b/sc/inc/dpsave.hxx @@ -58,23 +58,23 @@ class ScDPSaveMember private: String aName; ::std::auto_ptr mpLayoutName; // custom name to be displayed in the table. - USHORT nVisibleMode; - USHORT nShowDetailsMode; + sal_uInt16 nVisibleMode; + sal_uInt16 nShowDetailsMode; public: ScDPSaveMember(const String& rName); ScDPSaveMember(const ScDPSaveMember& r); ~ScDPSaveMember(); - BOOL operator== ( const ScDPSaveMember& r ) const; + sal_Bool operator== ( const ScDPSaveMember& r ) const; const String& GetName() const { return aName; } - BOOL HasIsVisible() const; - SC_DLLPUBLIC void SetIsVisible(BOOL bSet); - BOOL GetIsVisible() const { return BOOL(nVisibleMode); } - BOOL HasShowDetails() const; - SC_DLLPUBLIC void SetShowDetails(BOOL bSet); - BOOL GetShowDetails() const { return BOOL(nShowDetailsMode); } + sal_Bool HasIsVisible() const; + SC_DLLPUBLIC void SetIsVisible(sal_Bool bSet); + sal_Bool GetIsVisible() const { return sal_Bool(nVisibleMode); } + sal_Bool HasShowDetails() const; + SC_DLLPUBLIC void SetShowDetails(sal_Bool bSet); + sal_Bool GetShowDetails() const { return sal_Bool(nShowDetailsMode); } void SetName( const String& rNew ); // used if the source member was renamed (groups) @@ -98,15 +98,15 @@ private: String* pSelectedPage; ::std::auto_ptr mpLayoutName; ::std::auto_ptr mpSubtotalName; - BOOL bIsDataLayout; - BOOL bDupFlag; - USHORT nOrientation; - USHORT nFunction; // enum GeneralFunction, for data dimensions + sal_Bool bIsDataLayout; + sal_Bool bDupFlag; + sal_uInt16 nOrientation; + sal_uInt16 nFunction; // enum GeneralFunction, for data dimensions long nUsedHierarchy; - USHORT nShowEmptyMode; //! at level - BOOL bSubTotalDefault; //! at level + sal_uInt16 nShowEmptyMode; //! at level + sal_Bool bSubTotalDefault; //! at level long nSubTotalCount; - USHORT* pSubTotalFuncs; // enum GeneralFunction + sal_uInt16* pSubTotalFuncs; // enum GeneralFunction ::com::sun::star::sheet::DataPilotFieldReference* pReferenceValue; ::com::sun::star::sheet::DataPilotFieldSortInfo* pSortInfo; // (level) ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* pAutoShowInfo; // (level) @@ -119,32 +119,32 @@ private: MemberHash maMemberHash; MemberList maMemberList; public: - ScDPSaveDimension(const String& rName, BOOL bDataLayout); + ScDPSaveDimension(const String& rName, sal_Bool bDataLayout); ScDPSaveDimension(const ScDPSaveDimension& r); ~ScDPSaveDimension(); - BOOL operator== ( const ScDPSaveDimension& r ) const; + sal_Bool operator== ( const ScDPSaveDimension& r ) const; const MemberList& GetMembers() const { return maMemberList; } void AddMember(ScDPSaveMember* pMember); - void SetDupFlag(BOOL bSet) { bDupFlag = bSet; } - BOOL GetDupFlag() const { return bDupFlag; } + void SetDupFlag(sal_Bool bSet) { bDupFlag = bSet; } + sal_Bool GetDupFlag() const { return bDupFlag; } const String& GetName() const { return aName; } - BOOL IsDataLayout() const { return bIsDataLayout; } + sal_Bool IsDataLayout() const { return bIsDataLayout; } void SetName( const String& rNew ); // used if the source dim was renamed (groups) - void SetOrientation(USHORT nNew); - void SetSubTotals(long nCount, const USHORT* pFuncs); + void SetOrientation(sal_uInt16 nNew); + void SetSubTotals(long nCount, const sal_uInt16* pFuncs); long GetSubTotalsCount() const { return nSubTotalCount; } - USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; } + sal_uInt16 GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; } bool HasShowEmpty() const; - void SetShowEmpty(BOOL bSet); - BOOL GetShowEmpty() const { return BOOL(nShowEmptyMode); } - void SetFunction(USHORT nNew); // enum GeneralFunction - USHORT GetFunction() const { return nFunction; } + void SetShowEmpty(sal_Bool bSet); + sal_Bool GetShowEmpty() const { return sal_Bool(nShowEmptyMode); } + void SetFunction(sal_uInt16 nNew); // enum GeneralFunction + sal_uInt16 GetFunction() const { return nFunction; } void SetUsedHierarchy(long nNew); long GetUsedHierarchy() const { return nUsedHierarchy; } @@ -167,10 +167,10 @@ public: void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew); void SetCurrentPage( const String* pPage ); // NULL = no selection (all) - BOOL HasCurrentPage() const; + sal_Bool HasCurrentPage() const; const String& GetCurrentPage() const; - USHORT GetOrientation() const { return nOrientation; } + sal_uInt16 GetOrientation() const { return nOrientation; } ScDPSaveMember* GetExistingMemberByName(const String& rName); ScDPSaveMember* GetMemberByName(const String& rName); @@ -194,12 +194,12 @@ class ScDPSaveData private: List aDimList; ScDPDimensionSaveData* pDimensionData; // settings that create new dimensions - USHORT nColumnGrandMode; - USHORT nRowGrandMode; - USHORT nIgnoreEmptyMode; - USHORT nRepeatEmptyMode; - BOOL bFilterButton; // not passed to DataPilotSource - BOOL bDrillDown; // not passed to DataPilotSource + sal_uInt16 nColumnGrandMode; + sal_uInt16 nRowGrandMode; + sal_uInt16 nIgnoreEmptyMode; + sal_uInt16 nRepeatEmptyMode; + sal_Bool bFilterButton; // not passed to DataPilotSource + sal_Bool bDrillDown; // not passed to DataPilotSource // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance long mnCacheId; @@ -218,7 +218,7 @@ public: ScDPSaveData& operator= ( const ScDPSaveData& r ); - BOOL operator== ( const ScDPSaveData& r ) const; + sal_Bool operator== ( const ScDPSaveData& r ) const; SC_DLLPUBLIC void SetGrandTotalName(const ::rtl::OUString& rName); SC_DLLPUBLIC const ::rtl::OUString* GetGrandTotalName() const; @@ -238,25 +238,25 @@ public: void RemoveDimensionByName(const String& rName); - ScDPSaveDimension* GetInnermostDimension(USHORT nOrientation); + ScDPSaveDimension* GetInnermostDimension(sal_uInt16 nOrientation); ScDPSaveDimension* GetFirstDimension(::com::sun::star::sheet::DataPilotFieldOrientation eOrientation); long GetDataDimensionCount() const; void SetPosition( ScDPSaveDimension* pDim, long nNew ); - SC_DLLPUBLIC void SetColumnGrand( BOOL bSet ); - BOOL GetColumnGrand() const { return BOOL(nColumnGrandMode); } - SC_DLLPUBLIC void SetRowGrand( BOOL bSet ); - BOOL GetRowGrand() const { return BOOL(nRowGrandMode); } - void SetIgnoreEmptyRows( BOOL bSet ); - BOOL GetIgnoreEmptyRows() const { return BOOL(nIgnoreEmptyMode); } - void SetRepeatIfEmpty( BOOL bSet ); - BOOL GetRepeatIfEmpty() const { return BOOL(nRepeatEmptyMode); } - - SC_DLLPUBLIC void SetFilterButton( BOOL bSet ); - BOOL GetFilterButton() const { return bFilterButton; } - SC_DLLPUBLIC void SetDrillDown( BOOL bSet ); - BOOL GetDrillDown() const { return bDrillDown; } + SC_DLLPUBLIC void SetColumnGrand( sal_Bool bSet ); + sal_Bool GetColumnGrand() const { return sal_Bool(nColumnGrandMode); } + SC_DLLPUBLIC void SetRowGrand( sal_Bool bSet ); + sal_Bool GetRowGrand() const { return sal_Bool(nRowGrandMode); } + void SetIgnoreEmptyRows( sal_Bool bSet ); + sal_Bool GetIgnoreEmptyRows() const { return sal_Bool(nIgnoreEmptyMode); } + void SetRepeatIfEmpty( sal_Bool bSet ); + sal_Bool GetRepeatIfEmpty() const { return sal_Bool(nRepeatEmptyMode); } + + SC_DLLPUBLIC void SetFilterButton( sal_Bool bSet ); + sal_Bool GetFilterButton() const { return bFilterButton; } + SC_DLLPUBLIC void SetDrillDown( sal_Bool bSet ); + sal_Bool GetDrillDown() const { return bDrillDown; } void WriteToSource( const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>& xSource ); @@ -264,7 +264,7 @@ public: // DataPilot Migration - Cache&&Performance void Refresh( const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>& xSource ); - BOOL IsEmpty() const; + sal_Bool IsEmpty() const; inline long GetCacheId() const{ return mnCacheId; } inline void SetCacheId( long nCacheId ){ mnCacheId = nCacheId; } // End Comments diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx index 732e3d30e8df..0e41af8f17bb 100644 --- a/sc/inc/dpsdbtab.hxx +++ b/sc/inc/dpsdbtab.hxx @@ -47,12 +47,12 @@ struct ScImportSourceDesc { String aDBName; String aObject; - USHORT nType; // enum DataImportMode - BOOL bNative; + sal_uInt16 nType; // enum DataImportMode + sal_Bool bNative; - ScImportSourceDesc() : nType(0), bNative(FALSE) {} + ScImportSourceDesc() : nType(0), bNative(sal_False) {} - BOOL operator== ( const ScImportSourceDesc& rOther ) const + sal_Bool operator== ( const ScImportSourceDesc& rOther ) const { return aDBName == rOther.aDBName && aObject == rOther.aObject && nType == rOther.nType && @@ -77,10 +77,10 @@ public: virtual long GetColumnCount(); virtual String getDimensionName(long nColumn); - virtual BOOL getIsDataLayoutDimension(long nColumn); - virtual BOOL IsDateDimension(long nDim); + virtual sal_Bool getIsDataLayoutDimension(long nColumn); + virtual sal_Bool IsDateDimension(long nDim); virtual void DisposeData(); - virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty ); + virtual void SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty ); virtual void CreateCacheTable(); virtual void FilterCacheTable(const ::std::vector& rCriteria, const ::std::hash_set& rDataDims); diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx index a8d80072c68a..198ee240c92c 100644 --- a/sc/inc/dpshttab.hxx +++ b/sc/inc/dpshttab.hxx @@ -55,13 +55,13 @@ struct ScSheetSourceDesc ScRange aSourceRange; ScQueryParam aQueryParam; - BOOL operator== ( const ScSheetSourceDesc& rOther ) const + sal_Bool operator== ( const ScSheetSourceDesc& rOther ) const { return aSourceRange == rOther.aSourceRange && aQueryParam == rOther.aQueryParam; } // Wang Xu Ming - DataPilot migration // Buffer&&Performance ScDPTableDataCache* CreateCache( ScDocument* pDoc, long nID = -1) const; - ULONG CheckValidate( ScDocument* pDoc ) const; + sal_uLong CheckValidate( ScDocument* pDoc ) const; ScDPTableDataCache* GetCache( ScDocument* pDoc, long nID ) const; ScDPTableDataCache* GetExistDPObjectCache ( ScDocument* pDoc ) const; long GetCacheId( ScDocument* pDoc, long nID ) const; @@ -73,9 +73,9 @@ class SC_DLLPUBLIC ScSheetDPData : public ScDPTableData { private: ScQueryParam aQuery; - BOOL* pSpecial; - BOOL bIgnoreEmptyRows; - BOOL bRepeatIfEmpty; + sal_Bool* pSpecial; + sal_Bool bIgnoreEmptyRows; + sal_Bool bRepeatIfEmpty; ScDPCacheTable aCacheTable; @@ -87,11 +87,11 @@ public: // End Comments virtual long GetColumnCount(); virtual String getDimensionName(long nColumn); - virtual BOOL getIsDataLayoutDimension(long nColumn); - virtual BOOL IsDateDimension(long nDim); - virtual ULONG GetNumberFormat(long nDim); + virtual sal_Bool getIsDataLayoutDimension(long nColumn); + virtual sal_Bool IsDateDimension(long nDim); + virtual sal_uLong GetNumberFormat(long nDim); virtual void DisposeData(); - virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty ); + virtual void SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty ); virtual bool IsRepeatIfEmpty(); diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx index 6323434ca4ad..0496c8e94b79 100644 --- a/sc/inc/dptabdat.hxx +++ b/sc/inc/dptabdat.hxx @@ -80,9 +80,9 @@ namespace com { namespace sun { namespace star { namespace sheet { struct ScDPValueData { double fValue; - BYTE nType; + sal_uInt8 nType; - void Set( double fV, BYTE nT ) { fValue = fV; nType = nT; } + void Set( double fV, sal_uInt8 nT ) { fValue = fV; nType = nT; } }; class ScDPResultMember; @@ -147,12 +147,12 @@ public: long GetCacheId() const; // End Comments virtual String getDimensionName(long nColumn) = 0; - virtual BOOL getIsDataLayoutDimension(long nColumn) = 0; - virtual BOOL IsDateDimension(long nDim) = 0; - virtual ULONG GetNumberFormat(long nDim); - virtual UINT32 GetNumberFormatByIdx( NfIndexTableOffset ); + virtual sal_Bool getIsDataLayoutDimension(long nColumn) = 0; + virtual sal_Bool IsDateDimension(long nDim) = 0; + virtual sal_uLong GetNumberFormat(long nDim); + virtual sal_uInt32 GetNumberFormatByIdx( NfIndexTableOffset ); virtual void DisposeData() = 0; - virtual void SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty ) = 0; + virtual void SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty ) = 0; virtual bool IsRepeatIfEmpty(); @@ -165,12 +165,12 @@ public: virtual const ScDPCacheTable& GetCacheTable() const = 0; // overloaded in ScDPGroupTableData: - virtual BOOL IsBaseForGroup(long nDim) const; + virtual sal_Bool IsBaseForGroup(long nDim) const; virtual long GetGroupBase(long nGroupDim) const; - virtual BOOL IsNumOrDateGroup(long nDim) const; - virtual BOOL IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex, + virtual sal_Bool IsNumOrDateGroup(long nDim) const; + virtual sal_Bool IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex, const ScDPItemData& rBaseData, long nBaseIndex ) const; - virtual BOOL HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex, + virtual sal_Bool HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex, const ScDPItemData& rSecondData, long nSecondIndex ) const; // Wang Xu Ming -- 2009-8-17 diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx index 953c793093be..be9c0659996d 100644 --- a/sc/inc/dptablecache.hxx +++ b/sc/inc/dptablecache.hxx @@ -67,7 +67,7 @@ class SC_DLLPUBLIC ScDPTableDataCache std::vector* mpGlobalOrder; //Sorted members index std::vector* mpIndexOrder; //Index the sorted number std::vector mrLabelNames; //Source Label data - std::vector mbEmptyRow; //If empty row? + std::vector mbEmptyRow; //If empty row? mutable ScDPItemDataPool maAdditionalDatas; public: SCROW GetOrder( long nDim, SCROW nIndex ) const; @@ -79,26 +79,26 @@ public: SCCOL GetDimensionIndex( String sName) const; const ScDPItemData* GetSortedItemData( SCCOL nDim, SCROW nOrder ) const; - ULONG GetNumType ( ULONG nFormat ) const; - ULONG GetNumberFormat( long nDim ) const; - BOOL IsDateDimension( long nDim ) const ; - ULONG GetDimNumType( SCCOL nDim) const; + sal_uLong GetNumType ( sal_uLong nFormat ) const; + sal_uLong GetNumberFormat( long nDim ) const; + sal_Bool IsDateDimension( long nDim ) const ; + sal_uLong GetDimNumType( SCCOL nDim) const; SCROW GetDimMemberCount( SCCOL nDim ) const; SCROW GetSortedItemDataId( SCCOL nDim, SCROW nOrder ) const; const std::vector& GetDimMemberValues( SCCOL nDim )const; void SetId( long nId ){ mnID = nId;} - void AddRow( ScDPItemData* pRow, USHORT nCount ); + void AddRow( ScDPItemData* pRow, sal_uInt16 nCount ); bool InitFromDoc( ScDocument* pDoc, const ScRange& rRange ); bool InitFromDataBase (const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& xRowSet, const Date& rNullDate); SCROW GetRowCount() const; - SCROW GetItemDataId( USHORT nDim, SCROW nRow, BOOL bRepeatIfEmpty ) const; - String GetDimensionName( USHORT nColumn ) const; - bool IsEmptyMember( SCROW nRow, USHORT nColumn ) const; + SCROW GetItemDataId( sal_uInt16 nDim, SCROW nRow, sal_Bool bRepeatIfEmpty ) const; + String GetDimensionName( sal_uInt16 nColumn ) const; + bool IsEmptyMember( SCROW nRow, sal_uInt16 nColumn ) const; bool IsRowEmpty( SCROW nRow ) const; bool IsValid() const; - bool ValidQuery( SCROW nRow, const ScQueryParam& rQueryParam, BOOL* pSpecial ); + bool ValidQuery( SCROW nRow, const ScQueryParam& rQueryParam, sal_Bool* pSpecial ); ScDocument* GetDoc() const;//ms-cache-core long GetColumnCount() const; @@ -106,7 +106,7 @@ public: const ScDPItemData* GetItemDataById( long nDim, SCROW nId ) const; - BOOL operator== ( const ScDPTableDataCache& r ) const; + sal_Bool operator== ( const ScDPTableDataCache& r ) const; //construction ScDPTableDataCache( ScDocument* pDoc ); @@ -116,7 +116,7 @@ public: protected: private: void AddLabel( ScDPItemData* pData); - BOOL AddData( long nDim, ScDPItemData* itemData ); + sal_Bool AddData( long nDim, ScDPItemData* itemData ); }; #endif //DPTABLECACHE_HXX diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index 7f9720a4b143..33673cbc135e 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -184,14 +184,14 @@ public: void Update( const ScDPValueData& rNext, ScSubTotalFunc eFunc, const ScDPSubTotalState& rSubState ); void Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSubState ); - BOOL IsCalculated() const; + sal_Bool IsCalculated() const; double GetResult() const; - BOOL HasError() const; - BOOL HasData() const; + sal_Bool HasError() const; + sal_Bool HasData() const; void SetResult( double fNew ); - void SetEmpty( BOOL bSet ); + void SetEmpty( sal_Bool bSet ); void SetError(); double GetAuxiliary() const; @@ -211,7 +211,7 @@ class ScDPRowTotals { ScDPAggData aRowTotal; ScDPAggData aGrandTotal; - BOOL bIsInColRoot; + sal_Bool bIsInColRoot; public: ScDPRowTotals(); @@ -220,8 +220,8 @@ public: ScDPAggData* GetRowTotal( long nMeasure ); ScDPAggData* GetGrandTotal( long nMeasure ); - BOOL IsInColRoot() const { return bIsInColRoot; } - void SetInColRoot(BOOL bSet) { bIsInColRoot = bSet; } + sal_Bool IsInColRoot() const { return bIsInColRoot; } + void SetInColRoot(sal_Bool bSet) { bIsInColRoot = bSet; } }; // -------------------------------------------------------------------- @@ -263,12 +263,12 @@ typedef std::hash_map < SCROW, ScDPParentDimData *, MemberHashIndexFunc> DimMem class ResultMembers { DimMemberHash maMemberHash; - BOOL mbHasHideDetailsMember; + sal_Bool mbHasHideDetailsMember; public: ScDPParentDimData* FindMember( const SCROW& nIndex ) const; void InsertMember( ScDPParentDimData* pNew ); - BOOL IsHasHideDetailsMembers() const { return mbHasHideDetailsMember; } - void SetHasHideDetailsMembers( BOOL b ) { mbHasHideDetailsMember=b; } + sal_Bool IsHasHideDetailsMembers() const { return mbHasHideDetailsMember; } + void SetHasHideDetailsMembers( sal_Bool b ) { mbHasHideDetailsMember=b; } ResultMembers(); virtual ~ResultMembers(); }; @@ -279,24 +279,24 @@ private: const ::std::vector& mppDim; const ::std::vector& mppLev; - BOOL mbRow; - BOOL mbInitChild; - BOOL mbAllChildren; + sal_Bool mbRow; + sal_Bool mbInitChild; + sal_Bool mbAllChildren; public: LateInitParams( const ::std::vector& ppDim, const ::std::vector& ppLev, - BOOL bRow, BOOL bInitChild = TRUE , BOOL bAllChildren = FALSE); + sal_Bool bRow, sal_Bool bInitChild = sal_True , sal_Bool bAllChildren = sal_False); ~LateInitParams(); - void SetInitChild( BOOL b ) { mbInitChild = b; } - void SetInitAllChildren( BOOL b ) { mbAllChildren = b; } + void SetInitChild( sal_Bool b ) { mbInitChild = b; } + void SetInitAllChildren( sal_Bool b ) { mbAllChildren = b; } inline ScDPDimension* GetDim( size_t nPos ) const { return mppDim[nPos];} inline ScDPLevel* GetLevel( size_t nPos ) const { return mppLev[nPos];} - inline BOOL GetInitChild() const {return mbInitChild; } - inline BOOL GetInitAllChild() const { return mbAllChildren; } - inline BOOL IsRow() const { return mbRow; } - BOOL IsEnd( size_t nPos ) const ; + inline sal_Bool GetInitChild() const {return mbInitChild; } + inline sal_Bool GetInitAllChild() const { return mbAllChildren; } + inline sal_Bool IsRow() const { return mbRow; } + sal_Bool IsEnd( size_t nPos ) const ; }; // End Comments @@ -309,11 +309,11 @@ private: long nMeasCount; ScSubTotalFunc* pMeasFuncs; ::com::sun::star::sheet::DataPilotFieldReference* pMeasRefs; - USHORT* pMeasRefOrient; + sal_uInt16* pMeasRefOrient; String* pMeasNames; - BOOL bLateInit; - BOOL bDataAtCol; - BOOL bDataAtRow; + sal_Bool bLateInit; + sal_Bool bDataAtCol; + sal_Bool bDataAtRow; //! add "displayed values" settings mutable std::vector< ResultMembers* > mpDimMembers; @@ -323,20 +323,20 @@ public: void SetMeasureData( long nCount, const ScSubTotalFunc* pFunctions, const ::com::sun::star::sheet::DataPilotFieldReference* pRefs, - const USHORT* pRefOrient, const String* pNames ); - void SetDataLayoutOrientation( USHORT nOrient ); - void SetLateInit( BOOL bSet ); + const sal_uInt16* pRefOrient, const String* pNames ); + void SetDataLayoutOrientation( sal_uInt16 nOrient ); + void SetLateInit( sal_Bool bSet ); long GetMeasureCount() const { return nMeasCount; } ScSubTotalFunc GetMeasureFunction(long nMeasure) const; - String GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const; + String GetMeasureString(long nMeasure, sal_Bool bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const; String GetMeasureDimensionName(long nMeasure) const; const ::com::sun::star::sheet::DataPilotFieldReference& GetMeasureRefVal(long nMeasure) const; - USHORT GetMeasureRefOrient(long nMeasure) const; + sal_uInt16 GetMeasureRefOrient(long nMeasure) const; - BOOL IsDataAtCol() const { return bDataAtCol; } - BOOL IsDataAtRow() const { return bDataAtRow; } - BOOL IsLateInit() const { return bLateInit; } + sal_Bool IsDataAtCol() const { return bDataAtCol; } + sal_Bool IsDataAtRow() const { return bDataAtRow; } + sal_Bool IsLateInit() const { return bLateInit; } long GetColStartMeasure() const; long GetRowStartMeasure() const; @@ -344,16 +344,16 @@ public: long GetCountForMeasure( long nMeas ) const { return ( nMeas == SC_DPMEASURE_ALL ) ? nMeasCount : 1; } - BOOL IsBaseForGroup( long nDim ) const; // any group + sal_Bool IsBaseForGroup( long nDim ) const; // any group long GetGroupBase( long nGroupDim ) const; - BOOL IsNumOrDateGroup( long nDim ) const; + sal_Bool IsNumOrDateGroup( long nDim ) const; // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - BOOL IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex, + sal_Bool IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex, long nBaseDataId, long nBaseIndex ) const; - BOOL IsInGroup( SCROW nGroupDataId, long nGroupIndex, + sal_Bool IsInGroup( SCROW nGroupDataId, long nGroupIndex, const ScDPItemData& rBaseData, long nBaseIndex ) const; - BOOL HasCommonElement( SCROW nFirstDataId, long nFirstIndex, + sal_Bool HasCommonElement( SCROW nFirstDataId, long nFirstIndex, const ScDPItemData& rSecondData, long nSecondIndex ) const; ResultMembers* GetDimResultMembers( long nDim , ScDPDimension* pDim , ScDPLevel* pLevel) const ; @@ -373,20 +373,20 @@ private: // End Comments ScDPResultDimension* pChildDimension; ScDPDataMember* pDataRoot; - BOOL bHasElements; - BOOL bForceSubTotal; - BOOL bHasHiddenDetails; - BOOL bInitialized; - BOOL bAutoHidden; + sal_Bool bHasElements; + sal_Bool bForceSubTotal; + sal_Bool bHasHiddenDetails; + sal_Bool bInitialized; + sal_Bool bAutoHidden; ScDPAggData aColTotal; // to store column totals - USHORT nMemberStep; // step to show details + sal_uInt16 nMemberStep; // step to show details public: // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance ScDPResultMember( const ScDPResultData* pData, const ScDPParentDimData& rParentDimData, - BOOL bForceSub ); //! Ref - ScDPResultMember( const ScDPResultData* pData, BOOL bForceSub ); + sal_Bool bForceSub ); //! Ref + ScDPResultMember( const ScDPResultData* pData, sal_Bool bForceSub ); // End Comments ~ScDPResultMember(); @@ -396,33 +396,33 @@ public: const ::std::vector& ppLev, size_t nPos, ScDPInitState& rInitState, - BOOL bInitChild = TRUE ); + sal_Bool bInitChild = sal_True ); void LateInitFrom( LateInitParams& rParams, const ::std::vector< SCROW >& pItemData, size_t nPos, ScDPInitState& rInitState); - void CheckShowEmpty( BOOL bShow = FALSE ); + void CheckShowEmpty( sal_Bool bShow = sal_False ); // End Comments String GetName() const; void FillItemData( ScDPItemData& rData ) const; - BOOL IsValid() const; - BOOL IsVisible() const; + sal_Bool IsValid() const; + sal_Bool IsVisible() const; long GetSize(long nMeasure) const; - BOOL HasHiddenDetails() const; - BOOL IsSubTotalInTitle(long nMeasure) const; + sal_Bool HasHiddenDetails() const; + sal_Bool IsSubTotalInTitle(long nMeasure) const; -// BOOL SubTotalEnabled() const; +// sal_Bool SubTotalEnabled() const; long GetSubTotalCount( long* pUserSubStart = NULL ) const; // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - BOOL IsNamedItem( SCROW nIndex ) const; + sal_Bool IsNamedItem( SCROW nIndex ) const; bool IsValidEntry( const ::std::vector< SCROW >& aMembers ) const; // End Comments - void SetHasElements() { bHasElements = TRUE; } - void SetAutoHidden() { bAutoHidden = TRUE; } + void SetHasElements() { bHasElements = sal_True; } + void SetAutoHidden() { bAutoHidden = sal_True; } // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance @@ -433,7 +433,7 @@ public: // End Comments void FillMemberResults( com::sun::star::uno::Sequence< com::sun::star::sheet::MemberResult>* pSequences, - long& rPos, long nMeasure, BOOL bRoot, + long& rPos, long nMeasure, sal_Bool bRoot, const String* pMemberName, const String* pMemberCaption ); @@ -450,7 +450,7 @@ public: void SortMembers( ScDPResultMember* pRefMember ); void DoAutoShow( ScDPResultMember* pRefMember ); - void ResetResults( BOOL bRoot ); + void ResetResults( sal_Bool bRoot ); void DumpState( const ScDPResultMember* pRefMember, ScDocument* pDoc, ScAddress& rPos ) const; @@ -466,7 +466,7 @@ public: const ScDPLevel* GetParentLevel() const { return aParentDimData.mpParentLevel; } //! Ref const ScDPMember* GetDPMember()const { return aParentDimData.mpMemberDesc; } //! Ref inline SCROW GetOrder() const { return aParentDimData.mnOrder; } //! Ref - inline BOOL IsRoot() const { return GetParentLevel() == NULL; } + inline sal_Bool IsRoot() const { return GetParentLevel() == NULL; } SCROW GetDataId( ) const ; // End Comments ScDPAggData* GetColTotal( long nMeasure ) const; @@ -491,33 +491,33 @@ public: void InitFrom( const ScDPResultDimension* pDim ); String GetName() const; - BOOL IsVisible() const; - BOOL HasData( long nMeasure, const ScDPSubTotalState& rSubState ) const; + sal_Bool IsVisible() const; + sal_Bool HasData( long nMeasure, const ScDPSubTotalState& rSubState ) const; // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - BOOL IsNamedItem( SCROW r ) const; + sal_Bool IsNamedItem( SCROW r ) const; // End Comments - BOOL HasHiddenDetails() const; + sal_Bool HasHiddenDetails() const; // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance void ProcessData( const ::std::vector< SCROW >& aChildMembers, const ::std::vector& aValues, const ScDPSubTotalState& rSubState ); // End Comments - BOOL HasError( long nMeasure, const ScDPSubTotalState& rSubState ) const; + sal_Bool HasError( long nMeasure, const ScDPSubTotalState& rSubState ) const; double GetAggregate( long nMeasure, const ScDPSubTotalState& rSubState ) const; const ScDPAggData* GetConstAggData( long nMeasure, const ScDPSubTotalState& rSubState ) const; ScDPAggData* GetAggData( long nMeasure, const ScDPSubTotalState& rSubState ); void FillDataRow( const ScDPResultMember* pRefMember, com::sun::star::uno::Sequence& rSequence, - long& rCol, long nMeasure, BOOL bIsSubTotalRow, + long& rCol, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState ) const; - void UpdateDataRow( const ScDPResultMember* pRefMember, long nMeasure, BOOL bIsSubTotalRow, + void UpdateDataRow( const ScDPResultMember* pRefMember, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState ); - void UpdateRunningTotals( const ScDPResultMember* pRefMember, long nMeasure, BOOL bIsSubTotalRow, + void UpdateRunningTotals( const ScDPResultMember* pRefMember, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState, ScDPRunningTotalState& rRunning, ScDPRowTotals& rTotals, const ScDPResultMember& rRowParent ); @@ -553,15 +553,15 @@ private: const ScDPResultData* pResultData; MemberArray maMemberArray; MemberHash maMemberHash; - BOOL bInitialized; + sal_Bool bInitialized; String aDimensionName; //! or ptr to IntDimension? - BOOL bIsDataLayout; //! or ptr to IntDimension? - BOOL bSortByData; - BOOL bSortAscending; + sal_Bool bIsDataLayout; //! or ptr to IntDimension? + sal_Bool bSortByData; + sal_Bool bSortAscending; long nSortMeasure; ScMemberSortOrder aMemberOrder; // used when sorted by measure - BOOL bAutoShow; - BOOL bAutoTopItems; + sal_Bool bAutoShow; + sal_Bool bAutoTopItems; long nAutoMeasure; long nAutoCount; @@ -586,12 +586,12 @@ public: void InitFrom( const ::std::vector& ppDim, const ::std::vector& ppLev, size_t nPos, - ScDPInitState& rInitState , BOOL bInitChild = TRUE ); + ScDPInitState& rInitState , sal_Bool bInitChild = sal_True ); void LateInitFrom( LateInitParams& rParams, const ::std::vector< SCROW >& pItemData, size_t nPos, ScDPInitState& rInitState ); - void CheckShowEmpty( BOOL bShow = FALSE ); + void CheckShowEmpty( sal_Bool bShow = sal_False ); // End Comments long GetSize(long nMeasure) const; @@ -645,15 +645,15 @@ public: const ScMemberSortOrder& GetMemberOrder() const { return aMemberOrder; } ScMemberSortOrder& GetMemberOrder() { return aMemberOrder; } - BOOL IsDataLayout() const { return bIsDataLayout; } + sal_Bool IsDataLayout() const { return bIsDataLayout; } String GetName() const { return aDimensionName; } - BOOL IsSortByData() const { return bSortByData; } - BOOL IsSortAscending() const { return bSortAscending; } + sal_Bool IsSortByData() const { return bSortByData; } + sal_Bool IsSortAscending() const { return bSortAscending; } long GetSortMeasure() const { return nSortMeasure; } - BOOL IsAutoShow() const { return bAutoShow; } - BOOL IsAutoTopItems() const { return bAutoTopItems; } + sal_Bool IsAutoShow() const { return bAutoShow; } + sal_Bool IsAutoTopItems() const { return bAutoTopItems; } long GetAutoMeasure() const { return nAutoMeasure; } long GetAutoCount() const { return nAutoCount; } @@ -668,7 +668,7 @@ private: const ScDPResultData* pResultData; const ScDPResultDimension* pResultDimension; // column ScDPDataMembers aMembers; - BOOL bIsDataLayout; //! or ptr to IntDimension? + sal_Bool bIsDataLayout; //! or ptr to IntDimension? public: ScDPDataDimension( const ScDPResultData* pData ); @@ -682,12 +682,12 @@ public: // End Comments void FillDataRow( const ScDPResultDimension* pRefDim, com::sun::star::uno::Sequence& rSequence, - long nCol, long nMeasure, BOOL bIsSubTotalRow, + long nCol, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState ) const; - void UpdateDataRow( const ScDPResultDimension* pRefDim, long nMeasure, BOOL bIsSubTotalRow, + void UpdateDataRow( const ScDPResultDimension* pRefDim, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState ) const; - void UpdateRunningTotals( const ScDPResultDimension* pRefDim, long nMeasure, BOOL bIsSubTotalRow, + void UpdateRunningTotals( const ScDPResultDimension* pRefDim, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState, ScDPRunningTotalState& rRunning, ScDPRowTotals& rTotals, const ScDPResultMember& rRowParent ) const; diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 18210f38e80e..cf0685636178 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -127,10 +127,10 @@ private: long nRowDimCount; long nDataDimCount; long nPageDimCount; - BOOL bColumnGrand; - BOOL bRowGrand; - BOOL bIgnoreEmptyRows; - BOOL bRepeatIfEmpty; + sal_Bool bColumnGrand; + sal_Bool bRowGrand; + sal_Bool bIgnoreEmptyRows; + sal_Bool bRepeatIfEmpty; long nDupCount; @@ -142,13 +142,13 @@ private: com::sun::star::uno::Sequence* pRowResults; List aColLevelList; List aRowLevelList; - BOOL bResultOverflow; + sal_Bool bResultOverflow; ::std::auto_ptr mpGrandTotalName; void CreateRes_Impl(); void FillMemberResults(); - void FillLevelList( USHORT nOrientation, List& rList ); + void FillLevelList( sal_uInt16 nOrientation, List& rList ); void FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool &bHasAutoShow); /** @@ -175,8 +175,8 @@ public: void SetGrandTotalName(const ::rtl::OUString& rName); const ::rtl::OUString* GetGrandTotalName() const; - USHORT GetOrientation(long nColumn); - void SetOrientation(long nColumn, USHORT nNew); + sal_uInt16 GetOrientation(long nColumn); + void SetOrientation(long nColumn, sal_uInt16 nNew); long GetPosition(long nColumn); long GetDataDimensionCount(); @@ -189,13 +189,13 @@ public: long GetDataLayoutDim(){ return pData->GetColumnCount(); } SCROW GetMemberId( long nDim, const ScDPItemData& rData ); // End Comments - BOOL IsDataLayoutDimension(long nDim); - USHORT GetDataLayoutOrientation(); + sal_Bool IsDataLayoutDimension(long nDim); + sal_uInt16 GetDataLayoutOrientation(); - BOOL IsDateDimension(long nDim); - UINT32 GetNumberFormat(long nDim); + sal_Bool IsDateDimension(long nDim); + sal_uInt32 GetNumberFormat(long nDim); - BOOL SubTotalAllowed(long nColumn); //! move to ScDPResultData + sal_Bool SubTotalAllowed(long nColumn); //! move to ScDPResultData ScDPDimension* AddDuplicated(long nSource, const String& rNewName); long GetDupCount() const { return nDupCount; } @@ -285,15 +285,15 @@ public: virtual String getDataDescription(); //! ??? - virtual BOOL getColumnGrand() const; - virtual void setColumnGrand(BOOL bSet); - virtual BOOL getRowGrand() const; - virtual void setRowGrand(BOOL bSet); + virtual sal_Bool getColumnGrand() const; + virtual void setColumnGrand(sal_Bool bSet); + virtual sal_Bool getRowGrand() const; + virtual void setRowGrand(sal_Bool bSet); - virtual BOOL getIgnoreEmptyRows() const; - virtual void setIgnoreEmptyRows(BOOL bSet); - virtual BOOL getRepeatIfEmpty() const; - virtual void setRepeatIfEmpty(BOOL bSet); + virtual sal_Bool getIgnoreEmptyRows() const; + virtual void setIgnoreEmptyRows(sal_Bool bSet); + virtual sal_Bool getRepeatIfEmpty() const; + virtual void setRepeatIfEmpty(sal_Bool bSet); virtual void validate(); //! ??? virtual void disposeData(); @@ -353,14 +353,14 @@ private: long nDim; // dimension index (== column ID) ScDPHierarchies* pHierarchies; long nUsedHier; - USHORT nFunction; // enum GeneralFunction + sal_uInt16 nFunction; // enum GeneralFunction String aName; // if empty, take from source ::std::auto_ptr mpLayoutName; ::std::auto_ptr mpSubtotalName; long nSourceDim; // >=0 if dup'ed ::com::sun::star::sheet::DataPilotFieldReference aReferenceValue; // settings for "show data as" / "displayed value" - BOOL bHasSelectedPage; + sal_Bool bHasSelectedPage; String aSelectedPage; ScDPItemData* pSelectedData; // internal, temporary, created from aSelectedPage sal_Bool mbHasHiddenMember; @@ -440,26 +440,26 @@ public: virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); - virtual USHORT getOrientation() const; - virtual void setOrientation(USHORT nNew); + virtual sal_uInt16 getOrientation() const; + virtual void setOrientation(sal_uInt16 nNew); virtual long getPosition() const; virtual void setPosition(long nNew); - virtual BOOL getIsDataLayoutDimension() const; - virtual USHORT getFunction() const; - virtual void setFunction(USHORT nNew); // for data dimension + virtual sal_Bool getIsDataLayoutDimension() const; + virtual sal_uInt16 getFunction() const; + virtual void setFunction(sal_uInt16 nNew); // for data dimension virtual long getUsedHierarchy() const; virtual void setUsedHierarchy(long nNew); - virtual BOOL isDuplicated() const; + virtual sal_Bool isDuplicated() const; - BOOL HasSelectedPage() const { return bHasSelectedPage; } + sal_Bool HasSelectedPage() const { return bHasSelectedPage; } const ScDPItemData& GetSelectedData(); const ::com::sun::star::sheet::DataPilotFieldReference& GetReferenceValue() const; -//UNUSED2009-05 BOOL IsValidPage( const ScDPItemData& rData ); +//UNUSED2009-05 sal_Bool IsValidPage( const ScDPItemData& rData ); // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - BOOL IsVisible( const ScDPItemData& rData ); + sal_Bool IsVisible( const ScDPItemData& rData ); // End Comments }; @@ -595,7 +595,7 @@ private: long nLev; ScDPMembers* pMembers; com::sun::star::uno::Sequence aSubTotals; - BOOL bShowEmpty; + sal_Bool bShowEmpty; ::com::sun::star::sheet::DataPilotFieldSortInfo aSortInfo; // stored user settings ::com::sun::star::sheet::DataPilotFieldAutoShowInfo aAutoShowInfo; // stored user settings ::com::sun::star::sheet::DataPilotFieldLayoutInfo aLayoutInfo; // stored user settings @@ -603,7 +603,7 @@ private: ::std::vector aGlobalOrder; // result of sorting by name or position long nSortMeasure; // measure (index of data dimension) to sort by long nAutoMeasure; // measure (index of data dimension) for AutoShow - BOOL bEnableLayout; // enabled only for row fields, not for the innermost one + sal_Bool bEnableLayout; // enabled only for row fields, not for the innermost one public: ScDPLevel( ScDPSource* pSrc, long nD, long nH, long nL ); @@ -676,31 +676,31 @@ public: virtual com::sun::star::uno::Sequence getSubTotals() const; virtual void setSubTotals(const com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction>& rNew); - virtual BOOL getShowEmpty() const; - virtual void setShowEmpty(BOOL bSet); + virtual sal_Bool getShowEmpty() const; + virtual void setShowEmpty(sal_Bool bSet); const ::com::sun::star::sheet::DataPilotFieldSortInfo& GetSortInfo() const { return aSortInfo; } const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo& GetAutoShow() const { return aAutoShowInfo; } void EvaluateSortOrder(); - void SetEnableLayout( BOOL bSet ); + void SetEnableLayout( sal_Bool bSet ); const ::std::vector& GetGlobalOrder() const { return aGlobalOrder; } ::std::vector& GetGlobalOrder() { return aGlobalOrder; } long GetSortMeasure() const { return nSortMeasure; } long GetAutoMeasure() const { return nAutoMeasure; } - BOOL IsOutlineLayout() const + sal_Bool IsOutlineLayout() const { return bEnableLayout && aLayoutInfo.LayoutMode != ::com::sun::star::sheet::DataPilotFieldLayoutMode::TABULAR_LAYOUT; } - BOOL IsSubtotalsAtTop() const + sal_Bool IsSubtotalsAtTop() const { return bEnableLayout && aLayoutInfo.LayoutMode == ::com::sun::star::sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP; } - BOOL IsAddEmpty() const { return bEnableLayout && aLayoutInfo.AddEmptyLines; } + sal_Bool IsAddEmpty() const { return bEnableLayout && aLayoutInfo.AddEmptyLines; } //! number format (for data fields and date fields) }; @@ -781,18 +781,18 @@ private: ::std::auto_ptr mpLayoutName; sal_Int32 nPosition; // manual sorting - BOOL bVisible; - BOOL bShowDet; + sal_Bool bVisible; + sal_Bool bShowDet; public: // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance 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 */); // End Comments virtual ~ScDPMember(); - BOOL IsNamedItem( const ScDPItemData& r ) const; + sal_Bool IsNamedItem( const ScDPItemData& r ) const; String GetNameStr() const; void FillItemData( ScDPItemData& rData ) const; // Wang Xu Ming -- 2009-8-17 @@ -800,7 +800,7 @@ public: // const ScDPItemData& GetItemData() const{ return maData; } const ScDPItemData& GetItemData() const; inline SCROW GetItemDataId() const { return mnDataId; } - BOOL IsNamedItem( SCROW nIndex ) const; + sal_Bool IsNamedItem( SCROW nIndex ) const; // End Comments SC_DLLPUBLIC const ::rtl::OUString* GetLayoutName() const; @@ -861,10 +861,10 @@ public: virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); - virtual BOOL getIsVisible() const; - virtual void setIsVisible(BOOL bSet); - virtual BOOL getShowDetails() const; - virtual void setShowDetails(BOOL bSet); + virtual sal_Bool getIsVisible() const; + virtual void setIsVisible(sal_Bool bSet); + virtual sal_Bool getShowDetails() const; + virtual void setShowDetails(sal_Bool bSet); sal_Int32 getPosition() const; void setPosition(sal_Int32 nNew); diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx index ee4f48ad9cf5..b2111c1a33ca 100644 --- a/sc/inc/drawattr.hxx +++ b/sc/inc/drawattr.hxx @@ -38,19 +38,19 @@ public: SvxDrawToolItem( const SvxDrawToolItem& rDrawToolItem ) : SfxEnumItem( rDrawToolItem ){} - SvxDrawToolItem(USHORT nWhichP) : SfxEnumItem(nWhichP){} + SvxDrawToolItem(sal_uInt16 nWhichP) : SfxEnumItem(nWhichP){} virtual String GetValueText() const; - virtual String GetValueText(USHORT nVal) const; - virtual USHORT GetValueCount() const - {return((USHORT)SVX_SNAP_DRAW_TEXT);} + virtual String GetValueText(sal_uInt16 nVal) const; + virtual sal_uInt16 GetValueCount() const + {return((sal_uInt16)SVX_SNAP_DRAW_TEXT);} virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; inline SvxDrawToolItem& operator=(const SvxDrawToolItem& rDrawTool) diff --git a/sc/inc/drawpage.hxx b/sc/inc/drawpage.hxx index 9c39fc71e5af..30a5f1c55c90 100644 --- a/sc/inc/drawpage.hxx +++ b/sc/inc/drawpage.hxx @@ -40,7 +40,7 @@ class ScDrawLayer; class ScDrawPage: public FmFormPage { public: - ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, BOOL bMasterPage=FALSE); + ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, sal_Bool bMasterPage=sal_False); ~ScDrawPage(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage(); diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx index 7dd9903f82a1..6afe2ca9e003 100644 --- a/sc/inc/drwlayer.hxx +++ b/sc/inc/drwlayer.hxx @@ -83,7 +83,7 @@ private: ScAddress aOldEnd; ScAddress aNewStt; ScAddress aNewEnd; - BOOL bHasNew; + sal_Bool bHasNew; public: ScUndoObjData( SdrObject* pObj, const ScAddress& rOS, const ScAddress& rOE, const ScAddress& rNS, const ScAddress& rNE ); @@ -102,9 +102,9 @@ private: String aName; ScDocument* pDoc; SdrUndoGroup* pUndoGroup; - BOOL bRecording; - BOOL bAdjustEnabled; - BOOL bHyphenatorSet; + sal_Bool bRecording; + sal_Bool bAdjustEnabled; + sal_Bool bHyphenatorSet; private: void MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, const Point& rMove, @@ -129,37 +129,37 @@ public: //REMOVE void ReleasePictureStorage(); - BOOL HasObjects() const; + sal_Bool HasObjects() const; - BOOL ScAddPage( SCTAB nTab ); + sal_Bool ScAddPage( SCTAB nTab ); void ScRemovePage( SCTAB nTab ); void ScRenamePage( SCTAB nTab, const String& rNewName ); - void ScMovePage( USHORT nOldPos, USHORT nNewPos ); - // inkl. Inhalt, bAlloc=FALSE -> nur Inhalt - void ScCopyPage( USHORT nOldPos, USHORT nNewPos, BOOL bAlloc ); + void ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ); + // inkl. Inhalt, bAlloc=sal_False -> nur Inhalt + void ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool bAlloc ); ScDocument* GetDocument() const { return pDoc; } void UpdateBasic(); // DocShell-Basic in DrawPages setzen void UseHyphenator(); - BOOL GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const; + sal_Bool GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const; // automatische Anpassungen - void EnableAdjust( BOOL bSet = TRUE ) { bAdjustEnabled = bSet; } + void EnableAdjust( sal_Bool bSet = sal_True ) { bAdjustEnabled = bSet; } void BeginCalcUndo(); SdrUndoGroup* GetCalcUndo(); - BOOL IsRecording() const { return bRecording; } + sal_Bool IsRecording() const { return bRecording; } void AddCalcUndo( SdrUndoAction* pUndo ); void MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2, - SCsCOL nDx,SCsROW nDy, BOOL bInsDel, bool bUpdateNoteCaptionPos = true ); + SCsCOL nDx,SCsROW nDy, sal_Bool bInsDel, bool bUpdateNoteCaptionPos = true ); void WidthChanged( SCTAB nTab, SCCOL nCol, long nDifTwips ); void HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips ); - BOOL HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ); + sal_Bool HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ); void DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 ); @@ -173,7 +173,7 @@ public: SCTAB nSourceTab, const Rectangle& rSourceRange, const ScAddress& rDestPos, const Rectangle& rDestRange ); - void SetPageSize( USHORT nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos = true ); + void SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos = true ); // mirror or move between positive and negative positions for RTL void MirrorRTL( SdrObject* pObj ); @@ -187,7 +187,7 @@ public: // (ChartListenerCollection etc. must use GetPersistName directly) static String GetVisibleName( SdrObject* pObj ); - SdrObject* GetNamedObject( const String& rName, USHORT nId, SCTAB& rFoundTab ) const; + SdrObject* GetNamedObject( const String& rName, sal_uInt16 nId, SCTAB& rFoundTab ) const; // if pnCounter != NULL, the search for a name starts with this index + 1, // and the index really used is returned. String GetNewGraphicName( long* pnCounter = NULL ) const; @@ -198,7 +198,7 @@ public: static ScAnchorType GetAnchor( const SdrObject* ); // Positionen fuer Detektivlinien - static ScDrawObjData* GetObjData( SdrObject* pObj, BOOL bCreate=FALSE ); + static ScDrawObjData* GetObjData( SdrObject* pObj, sal_Bool bCreate=sal_False ); // The sheet information in ScDrawObjData isn't updated when sheets are inserted/deleted. // Use this method to get an object with positions on the specified sheet (should be the @@ -217,7 +217,7 @@ public: static IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const Window& rCmpWnd ); - static ScMacroInfo* GetMacroInfo( SdrObject* pObj, BOOL bCreate = FALSE ); + static ScMacroInfo* GetMacroInfo( SdrObject* pObj, sal_Bool bCreate = sal_False ); private: static SfxObjectShell* pGlobalDrawPersist; // fuer AllocModel diff --git a/sc/inc/editsrc.hxx b/sc/inc/editsrc.hxx index ed4423d629a8..fe9e6e0abf10 100644 --- a/sc/inc/editsrc.hxx +++ b/sc/inc/editsrc.hxx @@ -47,14 +47,14 @@ class SdrObject; class ScHeaderFooterChangedHint : public SfxHint { - USHORT nPart; + sal_uInt16 nPart; public: TYPEINFO(); - ScHeaderFooterChangedHint(USHORT nP); + ScHeaderFooterChangedHint(sal_uInt16 nP); ~ScHeaderFooterChangedHint(); - USHORT GetPart() const { return nPart; } + sal_uInt16 GetPart() const { return nPart; } }; @@ -87,8 +87,8 @@ public: class ScHeaderFooterEditSource : public ScSharedHeaderFooterEditSource { public: - ScHeaderFooterEditSource( ScHeaderFooterContentObj* pContent, USHORT nP ); - ScHeaderFooterEditSource( ScHeaderFooterContentObj& rContent, USHORT nP ); + ScHeaderFooterEditSource( ScHeaderFooterContentObj* pContent, sal_uInt16 nP ); + ScHeaderFooterEditSource( ScHeaderFooterContentObj& rContent, sal_uInt16 nP ); virtual ~ScHeaderFooterEditSource(); virtual SvxEditSource* Clone() const; @@ -140,7 +140,7 @@ private: ScAddress aCellPos; ScEditEngineDefaulter* pEditEngine; SvxEditEngineForwarder* pForwarder; - BOOL bDataValid; + sal_Bool bDataValid; SdrObject* GetCaptionObj(); public: diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index aefa789d2587..7c1273aad3d6 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -76,7 +76,7 @@ public: aScrPos(rScrPosPixel),pDev(pDevice), nPPTX(nScaleX),nPPTY(nScaleY),aZoomX(rX),aZoomY(rY) {} - Rectangle GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToTop ); + Rectangle GetEditArea( const ScPatternAttr* pPattern, sal_Bool bForceToTop ); }; @@ -84,15 +84,15 @@ class ScEditAttrTester { ScEditEngineDefaulter* pEngine; SfxItemSet* pEditAttrs; - BOOL bNeedsObject; - BOOL bNeedsCellAttr; + sal_Bool bNeedsObject; + sal_Bool bNeedsCellAttr; public: ScEditAttrTester( ScEditEngineDefaulter* pEng ); ~ScEditAttrTester(); - BOOL NeedsObject() const { return bNeedsObject; } - BOOL NeedsCellAttr() const { return bNeedsCellAttr; } + sal_Bool NeedsObject() const { return bNeedsObject; } + sal_Bool NeedsCellAttr() const { return bNeedsCellAttr; } const SfxItemSet& GetAttribs() const { return *pEditAttrs; } }; @@ -103,11 +103,11 @@ class ScEnginePoolHelper protected: SfxItemPool* pEnginePool; SfxItemSet* pDefaults; - BOOL bDeleteEnginePool; - BOOL bDeleteDefaults; + sal_Bool bDeleteEnginePool; + sal_Bool bDeleteDefaults; ScEnginePoolHelper( SfxItemPool* pEnginePool, - BOOL bDeleteEnginePool = FALSE ); + sal_Bool bDeleteEnginePool = sal_False ); ScEnginePoolHelper( const ScEnginePoolHelper& rOrg ); virtual ~ScEnginePoolHelper(); }; @@ -122,17 +122,17 @@ public: /// bDeleteEnginePool: Engine becomes the owner of the pool /// and deletes it on destruction ScEditEngineDefaulter( SfxItemPool* pEnginePool, - BOOL bDeleteEnginePool = FALSE ); + sal_Bool bDeleteEnginePool = sal_False ); /// If rOrg.bDeleteEnginePool: pool gets cloned and will be /// deleted on destruction. Defaults are not set. ScEditEngineDefaulter( const ScEditEngineDefaulter& rOrg ); virtual ~ScEditEngineDefaulter(); /// Creates a copy of SfxItemSet if bRememberCopy set - void SetDefaults( const SfxItemSet& rDefaults, BOOL bRememberCopy = TRUE ); + void SetDefaults( const SfxItemSet& rDefaults, sal_Bool bRememberCopy = sal_True ); /// Becomes the owner of the SfxItemSet if bTakeOwnership set - void SetDefaults( SfxItemSet* pDefaults, BOOL bTakeOwnership = TRUE ); + void SetDefaults( SfxItemSet* pDefaults, sal_Bool bTakeOwnership = sal_True ); /// Set the item in the default ItemSet which is created /// if it doesn't exist yet. @@ -146,19 +146,19 @@ public: void SetText( const EditTextObject& rTextObject ); /// Current defaults are not applied, new defaults are applied void SetTextNewDefaults( const EditTextObject& rTextObject, - const SfxItemSet& rDefaults, BOOL bRememberCopy = TRUE ); + const SfxItemSet& rDefaults, sal_Bool bRememberCopy = sal_True ); /// Current defaults are not applied, new defaults are applied void SetTextNewDefaults( const EditTextObject& rTextObject, - SfxItemSet* pDefaults, BOOL bTakeOwnership = TRUE ); + SfxItemSet* pDefaults, sal_Bool bTakeOwnership = sal_True ); /// Overwritten method to be able to apply defaults already set void SetText( const String& rText ); /// Current defaults are not applied, new defaults are applied void SetTextNewDefaults( const String& rText, - const SfxItemSet& rDefaults, BOOL bRememberCopy = TRUE ); + const SfxItemSet& rDefaults, sal_Bool bRememberCopy = sal_True ); /// Current defaults are not applied, new defaults are applied void SetTextNewDefaults( const String& rText, - SfxItemSet* pDefaults, BOOL bTakeOwnership = TRUE ); + SfxItemSet* pDefaults, sal_Bool bTakeOwnership = sal_True ); /// Paragraph attributes that are not defaults are copied to /// character attributes and all paragraph attributes reset @@ -205,19 +205,19 @@ struct ScHeaderFieldData class SC_DLLPUBLIC ScFieldEditEngine : public ScEditEngineDefaulter { private: - BOOL bExecuteURL; + sal_Bool bExecuteURL; public: // pEnginePool = ScDocument.GetEnginePool() // pTextObjectPool = ScDocument.GetEditPool() ScFieldEditEngine( SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = NULL, - BOOL bDeleteEnginePool = FALSE ); + sal_Bool bDeleteEnginePool = sal_False ); - void SetExecuteURL(BOOL bSet) { bExecuteURL = bSet; } + void SetExecuteURL(sal_Bool bSet) { bExecuteURL = bSet; } - virtual void FieldClicked( const SvxFieldItem& rField, USHORT, USHORT ); - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16, sal_uInt16 ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ); }; @@ -228,8 +228,8 @@ private: ScHeaderFieldData aData; public: - ScHeaderEditEngine( SfxItemPool* pEnginePool, BOOL bDeleteEnginePool = FALSE ); - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); + ScHeaderEditEngine( SfxItemPool* pEnginePool, sal_Bool bDeleteEnginePool = sal_False ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ); void SetTitle(const String& rNew) { aData.aTitle = rNew; } void SetLongDocName(const String& rNew) { aData.aLongDocName = rNew; } @@ -252,7 +252,7 @@ public: // pTextObjectPool = ScDocument.GetEditPool() ScNoteEditEngine( SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = NULL, - BOOL bDeleteEnginePool = FALSE ); + sal_Bool bDeleteEnginePool = sal_False ); }; diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index 584d62451cc6..d7630b468f34 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -74,7 +74,7 @@ private: /// mutex to lock the InterfaceContainerHelper osl::Mutex aMutex; - ScCellFieldObj* GetObjectByIndex_Impl(INT32 Index) const; + ScCellFieldObj* GetObjectByIndex_Impl(sal_Int32 Index) const; public: ScCellFieldsObj(ScDocShell* pDocSh, const ScAddress& rPos); @@ -155,7 +155,7 @@ public: // per getImplementation gerufen: void DeleteField(); - BOOL IsInserted() const { return pEditSource != NULL; } + sal_Bool IsInserted() const { return pEditSource != NULL; } SvxFieldItem CreateFieldItem(); void InitDoc( ScDocShell* pDocSh, const ScAddress& rPos, const ESelection& rSel ); @@ -266,8 +266,8 @@ class ScHeaderFieldsObj : public cppu::WeakImplHelper5< { private: ScHeaderFooterContentObj* pContentObj; - USHORT nPart; - UINT16 nType; + sal_uInt16 nPart; + sal_uInt16 nType; SvxEditSource* pEditSource; /// List of refresh listeners. @@ -275,11 +275,11 @@ private: /// mutex to lock the InterfaceContainerHelper osl::Mutex aMutex; - ScHeaderFieldObj* GetObjectByIndex_Impl(INT32 Index) const; + ScHeaderFieldObj* GetObjectByIndex_Impl(sal_Int32 Index) const; public: ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, - USHORT nP, USHORT nT); + sal_uInt16 nP, sal_uInt16 nT); virtual ~ScHeaderFieldsObj(); // XIndexAccess @@ -336,23 +336,23 @@ class ScHeaderFieldObj : public ScMutexHelper, private: const SfxItemPropertySet* pPropSet; ScHeaderFooterContentObj* pContentObj; - USHORT nPart; - UINT16 nType; + sal_uInt16 nPart; + sal_uInt16 nType; SvxEditSource* pEditSource; ESelection aSelection; sal_Int16 nFileFormat; // enum SvxFileFormat, valid if not inserted ScHeaderFieldObj(); // disabled public: - ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, USHORT nP, - USHORT nT, const ESelection& rSel); + ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, + sal_uInt16 nT, const ESelection& rSel); virtual ~ScHeaderFieldObj(); // per getImplementation gerufen: void DeleteField(); - BOOL IsInserted() const { return pEditSource != NULL; } + sal_Bool IsInserted() const { return pEditSource != NULL; } SvxFieldItem CreateFieldItem(); - void InitDoc( ScHeaderFooterContentObj* pContent, USHORT nP, + void InitDoc( ScHeaderFooterContentObj* pContent, sal_uInt16 nP, const ESelection& rSel ); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx index 8dead5b4fb05..fbd1b8c20ec3 100644 --- a/sc/inc/fillinfo.hxx +++ b/sc/inc/fillinfo.hxx @@ -42,16 +42,16 @@ class ScPatternAttr; // ============================================================================ -const BYTE SC_ROTDIR_NONE = 0; -const BYTE SC_ROTDIR_STANDARD = 1; -const BYTE SC_ROTDIR_LEFT = 2; -const BYTE SC_ROTDIR_RIGHT = 3; -const BYTE SC_ROTDIR_CENTER = 4; +const sal_uInt8 SC_ROTDIR_NONE = 0; +const sal_uInt8 SC_ROTDIR_STANDARD = 1; +const sal_uInt8 SC_ROTDIR_LEFT = 2; +const sal_uInt8 SC_ROTDIR_RIGHT = 3; +const sal_uInt8 SC_ROTDIR_CENTER = 4; -const BYTE SC_CLIPMARK_NONE = 0; -const BYTE SC_CLIPMARK_LEFT = 1; -const BYTE SC_CLIPMARK_RIGHT = 2; -const BYTE SC_CLIPMARK_SIZE = 64; +const sal_uInt8 SC_CLIPMARK_NONE = 0; +const sal_uInt8 SC_CLIPMARK_LEFT = 1; +const sal_uInt8 SC_CLIPMARK_RIGHT = 2; +const sal_uInt8 SC_CLIPMARK_SIZE = 64; enum ScShadowPart { @@ -84,25 +84,25 @@ struct CellInfo ScShadowPart eHShadowPart : 4; // Schatten effektiv zum Zeichnen ScShadowPart eVShadowPart : 4; - BYTE nClipMark; - USHORT nWidth; - BYTE nRotateDir; - - BOOL bMarked : 1; - BOOL bEmptyCellText : 1; - - BOOL bMerged : 1; - BOOL bHOverlapped : 1; - BOOL bVOverlapped : 1; - BOOL bAutoFilter : 1; - BOOL bPushButton : 1; + sal_uInt8 nClipMark; + sal_uInt16 nWidth; + sal_uInt8 nRotateDir; + + sal_Bool bMarked : 1; + sal_Bool bEmptyCellText : 1; + + sal_Bool bMerged : 1; + sal_Bool bHOverlapped : 1; + sal_Bool bVOverlapped : 1; + sal_Bool bAutoFilter : 1; + sal_Bool bPushButton : 1; bool bPopupButton: 1; bool bFilterActive:1; - BOOL bPrinted : 1; // bei Bedarf (Pagebreak-Modus) + sal_Bool bPrinted : 1; // bei Bedarf (Pagebreak-Modus) - BOOL bHideGrid : 1; // output-intern - BOOL bEditEngine : 1; // output-intern + sal_Bool bHideGrid : 1; // output-intern + sal_Bool bEditEngine : 1; // output-intern }; const SCCOL SC_ROTMAX_NONE = SCCOL_MAX; @@ -113,15 +113,15 @@ struct RowInfo { CellInfo* pCellInfo; - USHORT nHeight; + sal_uInt16 nHeight; SCROW nRowNo; SCCOL nRotMaxCol; // SC_ROTMAX_NONE, wenn nichts - BOOL bEmptyBack; - BOOL bEmptyText; - BOOL bAutoFilter; - BOOL bPushButton; - BOOL bChanged; // TRUE, wenn nicht getestet + sal_Bool bEmptyBack; + sal_Bool bEmptyText; + sal_Bool bAutoFilter; + sal_Bool bPushButton; + sal_Bool bChanged; // sal_True, wenn nicht getestet inline explicit RowInfo() : pCellInfo( 0 ) {} @@ -136,7 +136,7 @@ struct ScTableInfo { svx::frame::Array maArray; RowInfo* mpRowInfo; - USHORT mnArrCount; + sal_uInt16 mnArrCount; bool mbPageMode; explicit ScTableInfo(); diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx index ae0fd92f6858..c678e71535f6 100644 --- a/sc/inc/filter.hxx +++ b/sc/inc/filter.hxx @@ -41,9 +41,9 @@ class ScDocument; class ScRange; class SvNumberFormatter; -// Return-Werte Im-/Exportfilter (ULONG) +// Return-Werte Im-/Exportfilter (sal_uLong) -typedef ULONG FltError; +typedef sal_uLong FltError; //enum FltError { #define eERR_OK ERRCODE_NONE // kein Fehler, alles OK @@ -88,10 +88,10 @@ class ScHTMLImport; class ScEEAbsImport { public: virtual ~ScEEAbsImport() {} - virtual ULONG Read( SvStream& rStream, const String& rBaseURL ) = 0; + virtual sal_uLong Read( SvStream& rStream, const String& rBaseURL ) = 0; virtual ScRange GetRange() = 0; virtual void WriteToDocument( - BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0, + sal_Bool bSizeColsRows = sal_False, double nOutputFactor = 1.0, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0; }; @@ -107,14 +107,14 @@ class ScFormatFilterPlugin { // eFormat == EIF_BIFF_LE4 -> nur Nicht-Storage-Dateien _koennen_ zum Erfolg fuehren virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) = 0; virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos, - const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0; + const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange ) = 0; virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, - BOOL bCalcWidthHeight = TRUE, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0; + sal_Bool bCalcWidthHeight = sal_True, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0; // various import helpers virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) = 0; - virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ) = 0; + virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight ) = 0; virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ) = 0; // various export filters @@ -123,10 +123,10 @@ class ScFormatFilterPlugin { #endif virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest ) = 0; virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const CharSet eDest, - UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0; + sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest, - UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0; - virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, BOOL bAll, + sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; + virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, sal_Bool bAll, const String& rStreamPath, String& rNonConvertibleChars ) = 0; virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest ) = 0; }; diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx index 0efdfeeb5a30..b30ad8dba9f8 100644 --- a/sc/inc/filtopt.hxx +++ b/sc/inc/filtopt.hxx @@ -38,7 +38,7 @@ class SC_DLLPUBLIC ScFilterOptions : public utl::ConfigItem { - BOOL bWK3Flag; + sal_Bool bWK3Flag; double fExcelColScale; double fExcelRowScale; @@ -50,7 +50,7 @@ public: virtual void Notify( const com::sun::star::uno::Sequence& aPropertyNames ); virtual void Commit(); - BOOL GetWK3Flag() const { return bWK3Flag; } + sal_Bool GetWK3Flag() const { return bWK3Flag; } double GetExcelColScale() const { return fExcelColScale; } double GetExcelRowScale() const { return fExcelRowScale; } diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx index eebd808c30a4..62a020d68d6d 100644 --- a/sc/inc/fmtuno.hxx +++ b/sc/inc/fmtuno.hxx @@ -84,12 +84,12 @@ class ScTableConditionalFormat : public cppu::WeakImplHelper5< private: List aEntries; - ScTableConditionalEntry* GetObjectByIndex_Impl(USHORT nIndex) const; + ScTableConditionalEntry* GetObjectByIndex_Impl(sal_uInt16 nIndex) const; void AddEntry_Impl(const ScCondFormatEntryItem& aEntry); ScTableConditionalFormat(); // disable public: - ScTableConditionalFormat(ScDocument* pDoc, ULONG nKey, + ScTableConditionalFormat(ScDocument* pDoc, sal_uLong nKey, formula::FormulaGrammar::Grammar eGrammar); virtual ~ScTableConditionalFormat(); @@ -209,7 +209,7 @@ class ScTableValidationObj : public cppu::WeakImplHelper5< { private: SfxItemPropertySet aPropSet; - USHORT nMode; // enum ScConditionMode + sal_uInt16 nMode; // enum ScConditionMode String aExpr1; String aExpr2; String maExprNmsp1; @@ -220,14 +220,14 @@ private: ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > aTokens2; ScAddress aSrcPos; String aPosString; // formula position as text - USHORT nValMode; // enum ScValidationMode - BOOL bIgnoreBlank; + sal_uInt16 nValMode; // enum ScValidationMode + sal_Bool bIgnoreBlank; sal_Int16 nShowList; - BOOL bShowInput; + sal_Bool bShowInput; String aInputTitle; String aInputMessage; - BOOL bShowError; - USHORT nErrorStyle; // enum ScValidErrorStyle + sal_Bool bShowError; + sal_uInt16 nErrorStyle; // enum ScValidErrorStyle String aErrorTitle; String aErrorMessage; @@ -235,7 +235,7 @@ private: ScTableValidationObj(); // disabled public: - ScTableValidationObj(ScDocument* pDoc, ULONG nKey, + ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey, const formula::FormulaGrammar::Grammar eGrammar); virtual ~ScTableValidationObj(); diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx index bd99cca8f5d9..b89f3da543ca 100644 --- a/sc/inc/formularesult.hxx +++ b/sc/inc/formularesult.hxx @@ -45,7 +45,7 @@ class ScFormulaResult double mfValue; // double result direct for performance and memory consumption const formula::FormulaToken* mpToken; // if not, result token obtained from interpreter }; - USHORT mnError; // error code + sal_uInt16 mnError; // error code bool mbToken :1; // whether content of union is a token bool mbEmpty :1; // empty cell result bool mbEmptyDisplayedAsString :1; // only if mbEmpty @@ -165,10 +165,10 @@ public: /** Get error code if set or GetCellResultType() is formula::svError or svUnknown, else 0. */ - inline USHORT GetResultError() const; + inline sal_uInt16 GetResultError() const; /** Set error code, don't touch token or double. */ - inline void SetResultError( USHORT nErr ); + inline void SetResultError( sal_uInt16 nErr ); /** Set direct double. Shouldn't be used externally except in ScFormulaCell for rounded CalcAsShown or SetErrCode(). If @@ -434,7 +434,7 @@ inline bool ScFormulaResult::IsMultiline() const } -inline USHORT ScFormulaResult::GetResultError() const +inline sal_uInt16 ScFormulaResult::GetResultError() const { if (mnError) return mnError; @@ -452,7 +452,7 @@ inline USHORT ScFormulaResult::GetResultError() const } -inline void ScFormulaResult::SetResultError( USHORT nErr ) +inline void ScFormulaResult::SetResultError( sal_uInt16 nErr ) { mnError = nErr; } diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx index a46b8f52a638..b386b6522683 100644 --- a/sc/inc/funcdesc.hxx +++ b/sc/inc/funcdesc.hxx @@ -54,7 +54,7 @@ public: /** Returns mapping from visible arguments to real arguments, e.g. if of 4 parameters the second one is suppressed {0,2,3}. For VAR_ARGS parameters only one element is added to the end of the sequence. */ - virtual void fillVisibleArgumentMapping(::std::vector& _rArguments) const ; + virtual void fillVisibleArgumentMapping(::std::vector& _rArguments) const ; virtual void initArgumentInfo() const; virtual ::rtl::OUString getSignature() const ; virtual rtl::OString getHelpId() const ; @@ -90,16 +90,16 @@ public: variable arguments the number of fixed non-suppressed arguments plus VAR_ARGS, same as for nArgCount (variable arguments can't be suppressed). */ - USHORT GetSuppressedArgCount() const; + sal_uInt16 GetSuppressedArgCount() const; String *pFuncName; // Function name String *pFuncDesc; // Description of function String **ppDefArgNames; // Parameter name(s) String **ppDefArgDescs; // Description(s) of parameter(s) ParameterFlags *pDefArgFlags; // Flags for each parameter - USHORT nFIndex; // Unique function index - USHORT nCategory; // Function category - USHORT nArgCount; // All parameter count, suppressed and unsuppressed + sal_uInt16 nFIndex; // Unique function index + sal_uInt16 nCategory; // Function category + sal_uInt16 nArgCount; // All parameter count, suppressed and unsuppressed rtl::OString sHelpId; // HelpID of function bool bIncomplete :1; // Incomplete argument info (set for add-in info from configuration) bool bHasSuppressedArgs :1; // Whether there is any suppressed parameter. @@ -113,7 +113,7 @@ public: ScFunctionList(); ~ScFunctionList(); - ULONG GetCount() const + sal_uLong GetCount() const { return aFunctionList.Count(); } const ScFuncDesc* First() @@ -122,7 +122,7 @@ public: const ScFuncDesc* Next() { return (const ScFuncDesc*) aFunctionList.Next(); } - const ScFuncDesc* GetFunction( ULONG nIndex ) const + const ScFuncDesc* GetFunction( sal_uLong nIndex ) const { return (const ScFuncDesc*) aFunctionList.GetObject( nIndex ); } xub_StrLen GetMaxFuncNameLen() const @@ -160,8 +160,8 @@ public: static String GetCategoryName(sal_uInt32 _nCategoryNumber ); const ScFuncDesc* Get( const String& rFName ) const; - const ScFuncDesc* Get( USHORT nFIndex ) const; - const ScFuncDesc* First( USHORT nCategory = 0 ) const; + const ScFuncDesc* Get( sal_uInt16 nFIndex ) const; + const ScFuncDesc* First( sal_uInt16 nCategory = 0 ) const; const ScFuncDesc* Next() const; // formula::IFunctionManager diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx index 4413782a0e2f..deb337d27f06 100644 --- a/sc/inc/funcuno.hxx +++ b/sc/inc/funcuno.hxx @@ -48,15 +48,15 @@ class ScTempDocCache { private: ScDocument* pDoc; - BOOL bInUse; + sal_Bool bInUse; public: ScTempDocCache(); ~ScTempDocCache(); ScDocument* GetDocument() const { return pDoc; } - BOOL IsInUse() const { return bInUse; } - void SetInUse( BOOL bSet ) { bInUse = bSet; } + sal_Bool IsInUse() const { return bInUse; } + void SetInUse( sal_Bool bSet ) { bInUse = bSet; } void SetDocument( ScDocument* pNew ); void Clear(); diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 8178eb4a01d2..d0df5e3e2426 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -201,38 +201,38 @@ const SCSIZE PIVOT_MAXPAGEFIELD = 10; // Flags fuer Spalten / Zeilen // FILTERED immer zusammen mit HIDDEN // FILTERED und MANUALSIZE nur fuer Zeilen moeglich -const BYTE CR_HIDDEN = 1; -//const BYTE CR_MARKED = 2; -//const BYTE CR_PAGEBREAK = 4; -const BYTE CR_MANUALBREAK = 8; -const BYTE CR_FILTERED = 16; -const BYTE CR_MANUALSIZE = 32; -const BYTE CR_ALL = (CR_HIDDEN | CR_MANUALBREAK | CR_FILTERED | CR_MANUALSIZE); - -typedef BYTE ScBreakType; +const sal_uInt8 CR_HIDDEN = 1; +//const sal_uInt8 CR_MARKED = 2; +//const sal_uInt8 CR_PAGEBREAK = 4; +const sal_uInt8 CR_MANUALBREAK = 8; +const sal_uInt8 CR_FILTERED = 16; +const sal_uInt8 CR_MANUALSIZE = 32; +const sal_uInt8 CR_ALL = (CR_HIDDEN | CR_MANUALBREAK | CR_FILTERED | CR_MANUALSIZE); + +typedef sal_uInt8 ScBreakType; const ScBreakType BREAK_NONE = 0; const ScBreakType BREAK_PAGE = 1; const ScBreakType BREAK_MANUAL = 2; // Insert-/Delete-Flags -const USHORT IDF_NONE = 0x0000; -const USHORT IDF_VALUE = 0x0001; /// Numeric values (and numeric results if IDF_FORMULA is not set). -const USHORT IDF_DATETIME = 0x0002; /// Dates, times, datetime values. -const USHORT IDF_STRING = 0x0004; /// Strings (and string results if IDF_FORMULA is not set). -const USHORT IDF_NOTE = 0x0008; /// Cell notes. -const USHORT IDF_FORMULA = 0x0010; /// Formula cells. -const USHORT IDF_HARDATTR = 0x0020; /// Hard cell attributes. -const USHORT IDF_STYLES = 0x0040; /// Cell styles. -const USHORT IDF_OBJECTS = 0x0080; /// Drawing objects. -const USHORT IDF_EDITATTR = 0x0100; /// Rich-text attributes. -const USHORT IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES; -const USHORT IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA; -const USHORT IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS; -const USHORT IDF_NOCAPTIONS = 0x0200; /// Internal use only (undo etc.): do not copy/delete caption objects of cell notes. -const USHORT IDF_ADDNOTES = 0x0400; /// Internal use only (copy from clip): do not delete existing cell contents when pasting notes. +const sal_uInt16 IDF_NONE = 0x0000; +const sal_uInt16 IDF_VALUE = 0x0001; /// Numeric values (and numeric results if IDF_FORMULA is not set). +const sal_uInt16 IDF_DATETIME = 0x0002; /// Dates, times, datetime values. +const sal_uInt16 IDF_STRING = 0x0004; /// Strings (and string results if IDF_FORMULA is not set). +const sal_uInt16 IDF_NOTE = 0x0008; /// Cell notes. +const sal_uInt16 IDF_FORMULA = 0x0010; /// Formula cells. +const sal_uInt16 IDF_HARDATTR = 0x0020; /// Hard cell attributes. +const sal_uInt16 IDF_STYLES = 0x0040; /// Cell styles. +const sal_uInt16 IDF_OBJECTS = 0x0080; /// Drawing objects. +const sal_uInt16 IDF_EDITATTR = 0x0100; /// Rich-text attributes. +const sal_uInt16 IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES; +const sal_uInt16 IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA; +const sal_uInt16 IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS; +const sal_uInt16 IDF_NOCAPTIONS = 0x0200; /// Internal use only (undo etc.): do not copy/delete caption objects of cell notes. +const sal_uInt16 IDF_ADDNOTES = 0x0400; /// Internal use only (copy from clip): do not delete existing cell contents when pasting notes. /// Copy flags for auto/series fill functions: do not touch notes and drawing objects. -const USHORT IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS); +const sal_uInt16 IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS); #define PASTE_NOFUNC 0 #define PASTE_ADD 1 @@ -468,19 +468,19 @@ struct ScImportParam SCROW nRow1; SCCOL nCol2; SCROW nRow2; - BOOL bImport; + sal_Bool bImport; String aDBName; // Alias der Datenbank String aStatement; - BOOL bNative; - BOOL bSql; // Statement oder Name? - BYTE nType; // enum DBObject + sal_Bool bNative; + sal_Bool bSql; // Statement oder Name? + sal_uInt8 nType; // enum DBObject ScImportParam(); ScImportParam( const ScImportParam& r ); ~ScImportParam(); ScImportParam& operator= ( const ScImportParam& r ); - BOOL operator== ( const ScImportParam& r ) const; + sal_Bool operator== ( const ScImportParam& r ) const; //UNUSED2009-05 void Clear (); }; @@ -600,24 +600,24 @@ public: SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection(); SC_DLLPUBLIC static ScUserList* GetUserList(); static void SetUserList( const ScUserList* pNewList ); - SC_DLLPUBLIC static const String& GetRscString( USHORT nIndex ); + SC_DLLPUBLIC static const String& GetRscString( sal_uInt16 nIndex ); static void OpenURL( const String& rURL, const String& rTarget ); SC_DLLPUBLIC static String GetAbsDocName( const String& rFileName, SfxObjectShell* pShell ); SC_DLLPUBLIC static String GetDocTabName( const String& rFileName, const String& rTabName ); - SC_DLLPUBLIC static ULONG GetStandardFormat( SvNumberFormatter&, - ULONG nFormat, short nType ); - SC_DLLPUBLIC static ULONG GetStandardFormat( double, SvNumberFormatter&, - ULONG nFormat, short nType ); + SC_DLLPUBLIC static sal_uLong GetStandardFormat( SvNumberFormatter&, + sal_uLong nFormat, short nType ); + SC_DLLPUBLIC static sal_uLong GetStandardFormat( double, SvNumberFormatter&, + sal_uLong nFormat, short nType ); SC_DLLPUBLIC static double nScreenPPTX; SC_DLLPUBLIC static double nScreenPPTY; static ScDocShellRef* pDrawClipDocShellRef; - static USHORT nDefFontHeight; - static USHORT nStdRowHeight; + static sal_uInt16 nDefFontHeight; + static sal_uInt16 nStdRowHeight; SC_DLLPUBLIC static long nLastRowHeightExtra; static long nLastColWidthExtra; @@ -648,16 +648,16 @@ public: static ScFunctionMgr* GetStarCalcFunctionMgr(); static void ResetFunctionList(); - static String GetErrorString(USHORT nErrNumber); - static String GetLongErrorString(USHORT nErrNumber); - static BOOL EETextObjEqual( const EditTextObject* pObj1, + static String GetErrorString(sal_uInt16 nErrNumber); + static String GetLongErrorString(sal_uInt16 nErrNumber); + static sal_Bool EETextObjEqual( const EditTextObject* pObj1, const EditTextObject* pObj2 ); - static BOOL CheckWidthInvalidate( BOOL& bNumFormatChanged, + static sal_Bool CheckWidthInvalidate( sal_Bool& bNumFormatChanged, const SfxItemSet& rNewAttrs, const SfxItemSet& rOldAttrs ); - static BOOL HasAttrChanged( const SfxItemSet& rNewAttrs, + static sal_Bool HasAttrChanged( const SfxItemSet& rNewAttrs, const SfxItemSet& rOldAttrs, - const USHORT nWhich ); + const sal_uInt16 nWhich ); static ScUnitConverter* GetUnitConverter(); @@ -717,13 +717,13 @@ SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pStri /// a "ReadOnly" formatter for UNO/XML export static SvNumberFormatter* GetEnglishFormatter(); - static BOOL IsSystemRTL(); // depending on system language + static sal_Bool IsSystemRTL(); // depending on system language static LanguageType GetEditDefaultLanguage(); // for EditEngine::SetDefaultLanguage - SC_DLLPUBLIC static BYTE GetDefaultScriptType(); // for all WEAK characters + SC_DLLPUBLIC static sal_uInt8 GetDefaultScriptType(); // for all WEAK characters /** Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs. If more than one SCRIPTTYPE_... values are or'ed together, prefers first COMPLEX, then ASIAN */ - SC_DLLPUBLIC static USHORT GetScriptedWhichID( BYTE nScriptType, USHORT nWhich ); + SC_DLLPUBLIC static sal_uInt16 GetScriptedWhichID( sal_uInt8 nScriptType, sal_uInt16 nWhich ); /** Adds a language item to the item set, if the number format item contains a language that differs from its parent's language. */ @@ -803,8 +803,8 @@ namespace utl struct ScQueryEntry { - BOOL bDoQuery; - BOOL bQueryByString; + sal_Bool bDoQuery; + sal_Bool bQueryByString; bool bQueryByDate; SCCOLROW nField; ScQueryOp eOp; @@ -819,11 +819,11 @@ struct ScQueryEntry ~ScQueryEntry(); // legt ggbf. pSearchParam und pSearchText an, immer RegExp! - utl::TextSearch* GetSearchTextPtr( BOOL bCaseSens ); + utl::TextSearch* GetSearchTextPtr( sal_Bool bCaseSens ); void Clear(); ScQueryEntry& operator=( const ScQueryEntry& r ); - BOOL operator==( const ScQueryEntry& r ) const; + sal_Bool operator==( const ScQueryEntry& r ) const; }; // ----------------------------------------------------------------------- @@ -834,16 +834,16 @@ struct SC_DLLPUBLIC ScSubTotalParam SCROW nRow1; SCCOL nCol2; SCROW nRow2; - BOOL bRemoveOnly; - BOOL bReplace; // vorhandene Ergebnisse ersetzen - BOOL bPagebreak; // Seitenumbruch bei Gruppenwechsel - BOOL bCaseSens; // Gross-/Kleinschreibung - BOOL bDoSort; // vorher sortieren - BOOL bAscending; // aufsteigend sortieren - BOOL bUserDef; // Benutzer-def. Sort.Reihenfolge - USHORT nUserIndex; // Index auf Liste - BOOL bIncludePattern; // Formate mit sortieren - BOOL bGroupActive[MAXSUBTOTAL]; // aktive Gruppen + sal_Bool bRemoveOnly; + sal_Bool bReplace; // vorhandene Ergebnisse ersetzen + sal_Bool bPagebreak; // Seitenumbruch bei Gruppenwechsel + sal_Bool bCaseSens; // Gross-/Kleinschreibung + sal_Bool bDoSort; // vorher sortieren + sal_Bool bAscending; // aufsteigend sortieren + sal_Bool bUserDef; // Benutzer-def. Sort.Reihenfolge + sal_uInt16 nUserIndex; // Index auf Liste + sal_Bool bIncludePattern; // Formate mit sortieren + sal_Bool bGroupActive[MAXSUBTOTAL]; // aktive Gruppen SCCOL nField[MAXSUBTOTAL]; // zugehoeriges Feld SCCOL nSubTotals[MAXSUBTOTAL]; // Anzahl der SubTotals SCCOL* pSubTotals[MAXSUBTOTAL]; // Array der zu berechnenden Spalten @@ -853,12 +853,12 @@ struct SC_DLLPUBLIC ScSubTotalParam ScSubTotalParam( const ScSubTotalParam& r ); ScSubTotalParam& operator= ( const ScSubTotalParam& r ); - BOOL operator== ( const ScSubTotalParam& r ) const; + sal_Bool operator== ( const ScSubTotalParam& r ) const; void Clear (); - void SetSubTotals ( USHORT nGroup, + void SetSubTotals ( sal_uInt16 nGroup, const SCCOL* ptrSubTotals, const ScSubTotalFunc* ptrFuncions, - USHORT nCount ); + sal_uInt16 nCount ); }; // ----------------------------------------------------------------------- @@ -870,21 +870,21 @@ struct ScConsolidateParam SCROW nRow; // bzw. Anfang des Zielbereiches SCTAB nTab; ScSubTotalFunc eFunction; // Berechnungsvorschrift - USHORT nDataAreaCount; // Anzahl der Datenbereiche + sal_uInt16 nDataAreaCount; // Anzahl der Datenbereiche ScArea** ppDataAreas; // Zeiger-Array auf Datenbereiche - BOOL bByCol; // nach Spalten - BOOL bByRow; // nach Zeilen - BOOL bReferenceData; // Quelldaten referenzieren + sal_Bool bByCol; // nach Spalten + sal_Bool bByRow; // nach Zeilen + sal_Bool bReferenceData; // Quelldaten referenzieren ScConsolidateParam(); ScConsolidateParam( const ScConsolidateParam& r ); ~ScConsolidateParam(); ScConsolidateParam& operator= ( const ScConsolidateParam& r ); - BOOL operator== ( const ScConsolidateParam& r ) const; + sal_Bool operator== ( const ScConsolidateParam& r ) const; void Clear (); // = ClearDataAreas()+Members void ClearDataAreas (); - void SetAreas ( ScArea* const* ppAreas, USHORT nCount ); + void SetAreas ( ScArea* const* ppAreas, sal_uInt16 nCount ); }; // ----------------------------------------------------------------------- diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx index fca3d184a4a2..dbae6a3a5944 100644 --- a/sc/inc/hints.hxx +++ b/sc/inc/hints.hxx @@ -37,17 +37,17 @@ class ScPaintHint : public SfxHint { ScRange aRange; - USHORT nParts; - BOOL bPrint; // Flag, ob auch Druck/Vorschau betroffen ist + sal_uInt16 nParts; + sal_Bool bPrint; // Flag, ob auch Druck/Vorschau betroffen ist ScPaintHint(); // disabled public: TYPEINFO(); - ScPaintHint( const ScRange& rRng, USHORT nPaint = PAINT_ALL ); + ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL ); ~ScPaintHint(); - void SetPrintFlag(BOOL bSet) { bPrint = bSet; } + void SetPrintFlag(sal_Bool bSet) { bPrint = bSet; } const ScRange& GetRange() const { return aRange; } SCCOL GetStartCol() const { return aRange.aStart.Col(); } @@ -56,8 +56,8 @@ public: SCCOL GetEndCol() const { return aRange.aEnd.Col(); } SCROW GetEndRow() const { return aRange.aEnd.Row(); } SCTAB GetEndTab() const { return aRange.aEnd.Tab(); } - USHORT GetParts() const { return nParts; } - BOOL GetPrintFlag() const { return bPrint; } + sal_uInt16 GetParts() const { return nParts; } + sal_Bool GetPrintFlag() const { return bPrint; } }; @@ -88,15 +88,15 @@ public: class ScPointerChangedHint : public SfxHint { - USHORT nFlags; + sal_uInt16 nFlags; public: TYPEINFO(); -//UNUSED2008-05 ScPointerChangedHint( USHORT nF ); +//UNUSED2008-05 ScPointerChangedHint( sal_uInt16 nF ); ~ScPointerChangedHint(); - USHORT GetFlags() const { return nFlags; } + sal_uInt16 GetFlags() const { return nFlags; } }; @@ -109,12 +109,12 @@ public: class ScLinkRefreshedHint : public SfxHint { - USHORT nLinkType; // SC_LINKREFTYPE_... + sal_uInt16 nLinkType; // SC_LINKREFTYPE_... String aUrl; // used for sheet links String aDdeAppl; // used for dde links: String aDdeTopic; String aDdeItem; - BYTE nDdeMode; + sal_uInt8 nDdeMode; ScAddress aDestPos; // used to identify area links //! also use source data for area links? @@ -124,15 +124,15 @@ public: ~ScLinkRefreshedHint(); void SetSheetLink( const String& rSourceUrl ); - void SetDdeLink( const String& rA, const String& rT, const String& rI, BYTE nM ); + void SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM ); void SetAreaLink( const ScAddress& rPos ); - USHORT GetLinkType() const { return nLinkType; } + sal_uInt16 GetLinkType() const { return nLinkType; } const String& GetUrl() const { return aUrl; } const String& GetDdeAppl() const { return aDdeAppl; } const String& GetDdeTopic() const { return aDdeTopic; } const String& GetDdeItem() const { return aDdeItem; } - BYTE GetDdeMode() const { return nDdeMode; } + sal_uInt8 GetDdeMode() const { return nDdeMode; } const ScAddress& GetDestPos() const { return aDestPos; } }; @@ -144,17 +144,17 @@ class ScAutoStyleHint : public SfxHint ScRange aRange; String aStyle1; String aStyle2; - ULONG nTimeout; + sal_uLong nTimeout; public: TYPEINFO(); ScAutoStyleHint( const ScRange& rR, const String& rSt1, - ULONG nT, const String& rSt2 ); + sal_uLong nT, const String& rSt2 ); ~ScAutoStyleHint(); const ScRange& GetRange() const { return aRange; } const String& GetStyle1() const { return aStyle1; } - UINT32 GetTimeout() const { return nTimeout; } + sal_uInt32 GetTimeout() const { return nTimeout; } const String& GetStyle2() const { return aStyle2; } }; diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx index 62e258b76500..b461900f7811 100644 --- a/sc/inc/inputopt.hxx +++ b/sc/inc/inputopt.hxx @@ -38,16 +38,16 @@ class SvStream; class ScInputOptions { private: - USHORT nMoveDir; // enum ScDirection - BOOL bMoveSelection; - BOOL bEnterEdit; - BOOL bExtendFormat; - BOOL bRangeFinder; - BOOL bExpandRefs; - BOOL bMarkHeader; - BOOL bUseTabCol; - BOOL bTextWysiwyg; - BOOL bReplCellsWarn; + sal_uInt16 nMoveDir; // enum ScDirection + sal_Bool bMoveSelection; + sal_Bool bEnterEdit; + sal_Bool bExtendFormat; + sal_Bool bRangeFinder; + sal_Bool bExpandRefs; + sal_Bool bMarkHeader; + sal_Bool bUseTabCol; + sal_Bool bTextWysiwyg; + sal_Bool bReplCellsWarn; public: ScInputOptions(); @@ -56,26 +56,26 @@ public: void SetDefaults(); - void SetMoveDir(USHORT nNew) { nMoveDir = nNew; } - USHORT GetMoveDir() const { return nMoveDir; } - void SetMoveSelection(BOOL bSet) { bMoveSelection = bSet; } - BOOL GetMoveSelection() const { return bMoveSelection; } - void SetEnterEdit(BOOL bSet) { bEnterEdit = bSet; } - BOOL GetEnterEdit() const { return bEnterEdit; } - void SetExtendFormat(BOOL bSet) { bExtendFormat = bSet; } - BOOL GetExtendFormat() const { return bExtendFormat; } - void SetRangeFinder(BOOL bSet) { bRangeFinder = bSet; } - BOOL GetRangeFinder() const { return bRangeFinder; } - void SetExpandRefs(BOOL bSet) { bExpandRefs = bSet; } - BOOL GetExpandRefs() const { return bExpandRefs; } - void SetMarkHeader(BOOL bSet) { bMarkHeader = bSet; } - BOOL GetMarkHeader() const { return bMarkHeader; } - void SetUseTabCol(BOOL bSet) { bUseTabCol = bSet; } - BOOL GetUseTabCol() const { return bUseTabCol; } - void SetTextWysiwyg(BOOL bSet) { bTextWysiwyg = bSet; } - BOOL GetTextWysiwyg() const { return bTextWysiwyg; } - void SetReplaceCellsWarn(BOOL bSet) { bReplCellsWarn = bSet; } - BOOL GetReplaceCellsWarn() const { return bReplCellsWarn; } + void SetMoveDir(sal_uInt16 nNew) { nMoveDir = nNew; } + sal_uInt16 GetMoveDir() const { return nMoveDir; } + void SetMoveSelection(sal_Bool bSet) { bMoveSelection = bSet; } + sal_Bool GetMoveSelection() const { return bMoveSelection; } + void SetEnterEdit(sal_Bool bSet) { bEnterEdit = bSet; } + sal_Bool GetEnterEdit() const { return bEnterEdit; } + void SetExtendFormat(sal_Bool bSet) { bExtendFormat = bSet; } + sal_Bool GetExtendFormat() const { return bExtendFormat; } + void SetRangeFinder(sal_Bool bSet) { bRangeFinder = bSet; } + sal_Bool GetRangeFinder() const { return bRangeFinder; } + void SetExpandRefs(sal_Bool bSet) { bExpandRefs = bSet; } + sal_Bool GetExpandRefs() const { return bExpandRefs; } + void SetMarkHeader(sal_Bool bSet) { bMarkHeader = bSet; } + sal_Bool GetMarkHeader() const { return bMarkHeader; } + void SetUseTabCol(sal_Bool bSet) { bUseTabCol = bSet; } + sal_Bool GetUseTabCol() const { return bUseTabCol; } + void SetTextWysiwyg(sal_Bool bSet) { bTextWysiwyg = bSet; } + sal_Bool GetTextWysiwyg() const { return bTextWysiwyg; } + void SetReplaceCellsWarn(sal_Bool bSet) { bReplCellsWarn = bSet; } + sal_Bool GetReplaceCellsWarn() const { return bReplCellsWarn; } const ScInputOptions& operator= ( const ScInputOptions& rOpt ); }; diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx index 284d851a45da..fd74625dcd73 100644 --- a/sc/inc/linkuno.hxx +++ b/sc/inc/linkuno.hxx @@ -173,7 +173,7 @@ class ScSheetLinksObj : public cppu::WeakImplHelper4< private: ScDocShell* pDocShell; - ScSheetLinkObj* GetObjectByIndex_Impl(INT32 nIndex); + ScSheetLinkObj* GetObjectByIndex_Impl(sal_Int32 nIndex); ScSheetLinkObj* GetObjectByName_Impl(const ::rtl::OUString& aName); public: @@ -228,7 +228,7 @@ class ScAreaLinkObj : public cppu::WeakImplHelper4< private: SfxItemPropertySet aPropSet; ScDocShell* pDocShell; - USHORT nPos; + sal_uInt16 nPos; XRefreshListenerArr_Impl aRefreshListeners; void Modify_Impl( const ::rtl::OUString* pNewFile, const ::rtl::OUString* pNewFilter, @@ -238,7 +238,7 @@ private: void Refreshed_Impl(); public: - ScAreaLinkObj(ScDocShell* pDocSh, USHORT nP); + ScAreaLinkObj(ScDocShell* pDocSh, sal_uInt16 nP); virtual ~ScAreaLinkObj(); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -331,7 +331,7 @@ class ScAreaLinksObj : public cppu::WeakImplHelper3< private: ScDocShell* pDocShell; - ScAreaLinkObj* GetObjectByIndex_Impl(INT32 nIndex); + ScAreaLinkObj* GetObjectByIndex_Impl(sal_Int32 nIndex); public: ScAreaLinksObj(ScDocShell* pDocSh); @@ -448,7 +448,7 @@ class ScDDELinksObj : public cppu::WeakImplHelper4< private: ScDocShell* pDocShell; - ScDDELinkObj* GetObjectByIndex_Impl(INT32 nIndex); + ScDDELinkObj* GetObjectByIndex_Impl(sal_Int32 nIndex); ScDDELinkObj* GetObjectByName_Impl(const ::rtl::OUString& aName); public: diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx index 431f995d27c2..9f212f5b74be 100644 --- a/sc/inc/lookupcache.hxx +++ b/sc/inc/lookupcache.hxx @@ -174,7 +174,7 @@ public: /** Insert query and result. @param bAvailable - Pass FALSE if the search didn't deliver a result. A subsequent + Pass sal_False if the search didn't deliver a result. A subsequent lookup() then will return Result::NOT_AVAILABLE. @returns successful insertion. */ diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx index 78bb2a6bba3d..46352e5b6ee0 100644 --- a/sc/inc/markarr.hxx +++ b/sc/inc/markarr.hxx @@ -36,7 +36,7 @@ struct ScMarkEntry { SCROW nRow; - BOOL bMarked; + sal_Bool bMarked; }; class ScMarkArray @@ -51,22 +51,22 @@ friend class ScDocument; // fuer FillInfo public: ScMarkArray(); ~ScMarkArray(); - void Reset( BOOL bMarked = FALSE ); - BOOL GetMark( SCROW nRow ) const; - void SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked ); - BOOL IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const; - BOOL HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const; + void Reset( sal_Bool bMarked = sal_False ); + sal_Bool GetMark( SCROW nRow ) const; + void SetMarkArea( SCROW nStartRow, SCROW nEndRow, sal_Bool bMarked ); + sal_Bool IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const; + sal_Bool HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const; - BOOL HasMarks() const { return ( nCount > 1 || ( nCount == 1 && pData[0].bMarked ) ); } + sal_Bool HasMarks() const { return ( nCount > 1 || ( nCount == 1 && pData[0].bMarked ) ); } void CopyMarksTo( ScMarkArray& rDestMarkArray ) const; - BOOL Search( SCROW nRow, SCSIZE& nIndex ) const; + sal_Bool Search( SCROW nRow, SCSIZE& nIndex ) const; //UNUSED2009-05 void DeleteArea(SCROW nStartRow, SCROW nEndRow); /// Including current row, may return -1 if bUp and not found - SCsROW GetNextMarked( SCsROW nRow, BOOL bUp ) const; - SCROW GetMarkEnd( SCROW nRow, BOOL bUp ) const; + SCsROW GetNextMarked( SCsROW nRow, sal_Bool bUp ) const; + SCROW GetMarkEnd( SCROW nRow, sal_Bool bUp ) const; }; @@ -78,7 +78,7 @@ public: ScMarkArrayIter( const ScMarkArray* pNewArray ); ~ScMarkArrayIter(); - BOOL Next( SCROW& rTop, SCROW& rBottom ); + sal_Bool Next( SCROW& rTop, SCROW& rBottom ); }; diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx index a982c8db47dd..3887a5da70eb 100644 --- a/sc/inc/markdata.hxx +++ b/sc/inc/markdata.hxx @@ -46,12 +46,12 @@ private: ScRange aMarkRange; // Bereich ScRange aMultiRange; // maximaler Bereich insgesamt ScMarkArray* pMultiSel; // Mehrfachselektion - BOOL bTabMarked[MAXTABCOUNT];// Tabelle selektiert - BOOL bMarked; // Rechteck markiert - BOOL bMultiMarked; // mehrfach markiert + sal_Bool bTabMarked[MAXTABCOUNT];// Tabelle selektiert + sal_Bool bMarked; // Rechteck markiert + sal_Bool bMultiMarked; // mehrfach markiert - BOOL bMarking; // Bereich wird aufgezogen -> kein MarkToMulti - BOOL bMarkIsNeg; // Aufheben bei Mehrfachselektion + sal_Bool bMarking; // Bereich wird aufgezogen -> kein MarkToMulti + sal_Bool bMarkIsNeg; // Aufheben bei Mehrfachselektion public: ScMarkData(); @@ -63,51 +63,51 @@ public: void ResetMark(); void SetMarkArea( const ScRange& rRange ); - void SetMultiMarkArea( const ScRange& rRange, BOOL bMark = TRUE ); + void SetMultiMarkArea( const ScRange& rRange, sal_Bool bMark = sal_True ); void MarkToMulti(); void MarkToSimple(); - BOOL IsMarked() const { return bMarked; } - BOOL IsMultiMarked() const { return bMultiMarked; } + sal_Bool IsMarked() const { return bMarked; } + sal_Bool IsMultiMarked() const { return bMultiMarked; } void GetMarkArea( ScRange& rRange ) const; void GetMultiMarkArea( ScRange& rRange ) const; void SetAreaTab( SCTAB nTab ); - void SelectTable( SCTAB nTab, BOOL bNew ) { bTabMarked[nTab] = bNew; } - BOOL GetTableSelect( SCTAB nTab ) const { return bTabMarked[nTab]; } + void SelectTable( SCTAB nTab, sal_Bool bNew ) { bTabMarked[nTab] = bNew; } + sal_Bool GetTableSelect( SCTAB nTab ) const { return bTabMarked[nTab]; } void SelectOneTable( SCTAB nTab ); SCTAB GetSelectCount() const; SCTAB GetFirstSelected() const; - void SetMarkNegative( BOOL bFlag ) { bMarkIsNeg = bFlag; } - BOOL IsMarkNegative() const { return bMarkIsNeg; } - void SetMarking( BOOL bFlag ) { bMarking = bFlag; } - BOOL GetMarkingFlag() const { return bMarking; } + void SetMarkNegative( sal_Bool bFlag ) { bMarkIsNeg = bFlag; } + sal_Bool IsMarkNegative() const { return bMarkIsNeg; } + void SetMarking( sal_Bool bFlag ) { bMarking = bFlag; } + sal_Bool GetMarkingFlag() const { return bMarking; } // fuer FillInfo / Document etc. const ScMarkArray* GetArray() const { return pMultiSel; } - BOOL IsCellMarked( SCCOL nCol, SCROW nRow, BOOL bNoSimple = FALSE ) const; - void FillRangeListWithMarks( ScRangeList* pList, BOOL bClear ) const; + sal_Bool IsCellMarked( SCCOL nCol, SCROW nRow, sal_Bool bNoSimple = sal_False ) const; + void FillRangeListWithMarks( ScRangeList* pList, sal_Bool bClear ) const; void ExtendRangeListTables( ScRangeList* pList ) const; - void MarkFromRangeList( const ScRangeList& rList, BOOL bReset ); + void MarkFromRangeList( const ScRangeList& rList, sal_Bool bReset ); SCCOLROW GetMarkColumnRanges( SCCOLROW* pRanges ); SCCOLROW GetMarkRowRanges( SCCOLROW* pRanges ); - BOOL IsColumnMarked( SCCOL nCol ) const; - BOOL IsRowMarked( SCROW nRow ) const; - BOOL IsAllMarked( const ScRange& rRange ) const; // Multi + sal_Bool IsColumnMarked( SCCOL nCol ) const; + sal_Bool IsRowMarked( SCROW nRow ) const; + sal_Bool IsAllMarked( const ScRange& rRange ) const; // Multi /// May return -1 - SCsROW GetNextMarked( SCCOL nCol, SCsROW nRow, BOOL bUp ) const; - BOOL HasMultiMarks( SCCOL nCol ) const; - BOOL HasAnyMultiMarks() const; + SCsROW GetNextMarked( SCCOL nCol, SCsROW nRow, sal_Bool bUp ) const; + sal_Bool HasMultiMarks( SCCOL nCol ) const; + sal_Bool HasAnyMultiMarks() const; // Tabellen-Markierungen anpassen: void InsertTab( SCTAB nTab ); diff --git a/sc/inc/navicfg.hxx b/sc/inc/navicfg.hxx index 23cd38e1f10a..3eb9aa10b18a 100644 --- a/sc/inc/navicfg.hxx +++ b/sc/inc/navicfg.hxx @@ -38,19 +38,19 @@ class ScNavipiCfg { private: - USHORT nListMode; - USHORT nDragMode; - USHORT nRootType; + sal_uInt16 nListMode; + sal_uInt16 nDragMode; + sal_uInt16 nRootType; public: ScNavipiCfg(); - void SetListMode(USHORT nNew); - USHORT GetListMode() const { return nListMode; } - void SetDragMode(USHORT nNew); - USHORT GetDragMode() const { return nDragMode; } - void SetRootType(USHORT nNew); - USHORT GetRootType() const { return nRootType; } + void SetListMode(sal_uInt16 nNew); + sal_uInt16 GetListMode() const { return nListMode; } + void SetDragMode(sal_uInt16 nNew); + sal_uInt16 GetDragMode() const { return nDragMode; } + void SetRootType(sal_uInt16 nNew); + sal_uInt16 GetRootType() const { return nRootType; } }; diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx index 82a49b3ba025..35ef69eea05e 100644 --- a/sc/inc/olinetab.hxx +++ b/sc/inc/olinetab.hxx @@ -47,7 +47,7 @@ class ScOutlineEntry : public ScDataObject public: ScOutlineEntry( SCCOLROW nNewStart, SCCOLROW nNewSize, - bool bNewHidden = FALSE ); + bool bNewHidden = sal_False ); ScOutlineEntry( const ScOutlineEntry& rEntry ); virtual ScDataObject* Clone() const; @@ -73,7 +73,7 @@ public: virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - USHORT FindStart( SCCOLROW nMinStart ); + sal_uInt16 FindStart( SCCOLROW nMinStart ); }; @@ -82,46 +82,46 @@ class SC_DLLPUBLIC ScOutlineArray friend class ScSubOutlineIterator; private: - USHORT nDepth; + sal_uInt16 nDepth; ScOutlineCollection aCollections[SC_OL_MAXDEPTH]; - BOOL DecDepth(); - void FindEntry( SCCOLROW nSearchPos, USHORT& rFindLevel, USHORT& rFindIndex, - USHORT nMaxLevel = SC_OL_MAXDEPTH ); - void RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nLevel ); - void PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nStartLevel ); + sal_Bool DecDepth(); + void FindEntry( SCCOLROW nSearchPos, sal_uInt16& rFindLevel, sal_uInt16& rFindIndex, + sal_uInt16 nMaxLevel = SC_OL_MAXDEPTH ); + void RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_uInt16 nLevel ); + void PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_uInt16 nStartLevel ); public: ScOutlineArray(); ScOutlineArray( const ScOutlineArray& rArray ); - USHORT GetDepth() const { return nDepth; } + sal_uInt16 GetDepth() const { return nDepth; } - BOOL FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, - USHORT& rFindLevel ) const; + sal_Bool FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, + sal_uInt16& rFindLevel ) const; - BOOL Insert( SCCOLROW nStartPos, SCCOLROW nEndPos, BOOL& rSizeChanged, - BOOL bHidden = FALSE, BOOL bVisible = TRUE ); - BOOL Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, BOOL& rSizeChanged ); + sal_Bool Insert( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_Bool& rSizeChanged, + sal_Bool bHidden = sal_False, sal_Bool bVisible = sal_True ); + sal_Bool Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_Bool& rSizeChanged ); - ScOutlineEntry* GetEntry( USHORT nLevel, USHORT nIndex ) const; - USHORT GetCount( USHORT nLevel ) const; - ScOutlineEntry* GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const; + ScOutlineEntry* GetEntry( sal_uInt16 nLevel, sal_uInt16 nIndex ) const; + sal_uInt16 GetCount( sal_uInt16 nLevel ) const; + ScOutlineEntry* GetEntryByPos( sal_uInt16 nLevel, SCCOLROW nPos ) const; - BOOL GetEntryIndex( USHORT nLevel, SCCOLROW nPos, USHORT& rnIndex ) const; - BOOL GetEntryIndexInRange( - USHORT nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, - USHORT& rnIndex ) const; + sal_Bool GetEntryIndex( sal_uInt16 nLevel, SCCOLROW nPos, sal_uInt16& rnIndex ) const; + sal_Bool GetEntryIndexInRange( + sal_uInt16 nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, + sal_uInt16& rnIndex ) const; - void SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue, - BOOL bSkipHidden = FALSE ); + void SetVisibleBelow( sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bValue, + sal_Bool bSkipHidden = sal_False ); void GetRange( SCCOLROW& rStart, SCCOLROW& rEnd ) const; - void ExtendBlock( USHORT nLevel, SCCOLROW& rBlkStart, SCCOLROW& rBlkEnd ); + void ExtendBlock( sal_uInt16 nLevel, SCCOLROW& rBlkStart, SCCOLROW& rBlkEnd ); - BOOL TestInsertSpace( SCSIZE nSize, SCCOLROW nMaxVal ) const; + sal_Bool TestInsertSpace( SCSIZE nSize, SCCOLROW nMaxVal ) const; void InsertSpace( SCCOLROW nStartPos, SCSIZE nSize ); - BOOL DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize ); + sal_Bool DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize ); bool ManualAction( SCCOLROW nStartPos, SCCOLROW nEndPos, bool bShow, ScTable& rTable, bool bCol ); @@ -144,12 +144,12 @@ public: const ScOutlineArray* GetRowArray() const { return &aRowOutline; } ScOutlineArray* GetRowArray() { return &aRowOutline; } - BOOL TestInsertCol( SCSIZE nSize ); + sal_Bool TestInsertCol( SCSIZE nSize ); void InsertCol( SCCOL nStartCol, SCSIZE nSize ); - BOOL DeleteCol( SCCOL nStartCol, SCSIZE nSize ); // TRUE: Undo nur ueber Original - BOOL TestInsertRow( SCSIZE nSize ); + sal_Bool DeleteCol( SCCOL nStartCol, SCSIZE nSize ); // TRUE: Undo nur ueber Original + sal_Bool TestInsertRow( SCSIZE nSize ); void InsertRow( SCROW nStartRow, SCSIZE nSize ); - BOOL DeleteRow( SCROW nStartRow, SCSIZE nSize ); + sal_Bool DeleteRow( SCROW nStartRow, SCSIZE nSize ); }; @@ -159,18 +159,18 @@ private: ScOutlineArray* pArray; SCCOLROW nStart; SCCOLROW nEnd; - USHORT nSubLevel; - USHORT nSubEntry; - USHORT nCount; - USHORT nDepth; + sal_uInt16 nSubLevel; + sal_uInt16 nSubEntry; + sal_uInt16 nCount; + sal_uInt16 nDepth; public: ScSubOutlineIterator( ScOutlineArray* pOutlineArray ); ScSubOutlineIterator( ScOutlineArray* pOutlineArray, - USHORT nLevel, USHORT nEntry ); + sal_uInt16 nLevel, sal_uInt16 nEntry ); ScOutlineEntry* GetNext(); - USHORT LastLevel() const; - USHORT LastEntry() const; + sal_uInt16 LastLevel() const; + sal_uInt16 LastEntry() const; void DeleteLast(); }; diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx index 83b23a3c9ef9..1cb39f8c48c8 100644 --- a/sc/inc/optutil.hxx +++ b/sc/inc/optutil.hxx @@ -36,7 +36,7 @@ class ScOptionsUtil { public: - static BOOL IsMetricSystem(); + static sal_Bool IsMetricSystem(); }; diff --git a/sc/inc/pagepar.hxx b/sc/inc/pagepar.hxx index 935046e81a48..e449ad24c3c6 100644 --- a/sc/inc/pagepar.hxx +++ b/sc/inc/pagepar.hxx @@ -35,40 +35,40 @@ struct ScPageTableParam { - BOOL bCellContent; - BOOL bNotes; - BOOL bGrid; - BOOL bHeaders; - BOOL bCharts; - BOOL bObjects; - BOOL bDrawings; - BOOL bFormulas; - BOOL bNullVals; - BOOL bTopDown; - BOOL bLeftRight; - BOOL bSkipEmpty; - BOOL bScaleNone; - BOOL bScaleAll; - BOOL bScaleTo; - BOOL bScalePageNum; - USHORT nScaleAll; - USHORT nScaleWidth; - USHORT nScaleHeight; - USHORT nScalePageNum; - USHORT nFirstPageNo; + sal_Bool bCellContent; + sal_Bool bNotes; + sal_Bool bGrid; + sal_Bool bHeaders; + sal_Bool bCharts; + sal_Bool bObjects; + sal_Bool bDrawings; + sal_Bool bFormulas; + sal_Bool bNullVals; + sal_Bool bTopDown; + sal_Bool bLeftRight; + sal_Bool bSkipEmpty; + sal_Bool bScaleNone; + sal_Bool bScaleAll; + sal_Bool bScaleTo; + sal_Bool bScalePageNum; + sal_uInt16 nScaleAll; + sal_uInt16 nScaleWidth; + sal_uInt16 nScaleHeight; + sal_uInt16 nScalePageNum; + sal_uInt16 nFirstPageNo; ScPageTableParam(); ~ScPageTableParam(); - BOOL operator== ( const ScPageTableParam& r ) const; + sal_Bool operator== ( const ScPageTableParam& r ) const; void Reset (); }; struct ScPageAreaParam { - BOOL bPrintArea; - BOOL bRepeatRow; - BOOL bRepeatCol; + sal_Bool bPrintArea; + sal_Bool bRepeatRow; + sal_Bool bRepeatCol; ScRange aPrintArea; ScRange aRepeatRow; ScRange aRepeatCol; @@ -76,7 +76,7 @@ struct ScPageAreaParam ScPageAreaParam(); ~ScPageAreaParam(); - BOOL operator== ( const ScPageAreaParam& r ) const; + sal_Bool operator== ( const ScPageAreaParam& r ) const; void Reset (); }; diff --git a/sc/inc/paramisc.hxx b/sc/inc/paramisc.hxx index 896fec2e88d9..63aa5eda8d31 100644 --- a/sc/inc/paramisc.hxx +++ b/sc/inc/paramisc.hxx @@ -47,7 +47,7 @@ struct ScSolveParam ~ScSolveParam(); ScSolveParam& operator= ( const ScSolveParam& r ); - BOOL operator== ( const ScSolveParam& r ) const; + sal_Bool operator== ( const ScSolveParam& r ) const; }; //----------------------------------------------------------------------- @@ -58,7 +58,7 @@ struct ScTabOpParam ScRefAddress aRefFormulaEnd; ScRefAddress aRefRowCell; ScRefAddress aRefColCell; - BYTE nMode; + sal_uInt8 nMode; ScTabOpParam() {}; ScTabOpParam( const ScTabOpParam& r ); @@ -66,11 +66,11 @@ struct ScTabOpParam const ScRefAddress& rFormulaEnd, const ScRefAddress& rRowCell, const ScRefAddress& rColCell, - BYTE nMd); + sal_uInt8 nMd); ~ScTabOpParam() {}; ScTabOpParam& operator= ( const ScTabOpParam& r ); - BOOL operator== ( const ScTabOpParam& r ) const; + sal_Bool operator== ( const ScTabOpParam& r ) const; }; #endif // SC_PARAMISC_HXX diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index b8929a450576..43844119804e 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -70,20 +70,20 @@ public: ~ScPatternAttr(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream& rStream, USHORT nVersion) const; - virtual SvStream& Store(SvStream& rStream, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVersion) const; + virtual SvStream& Store(SvStream& rStream, sal_uInt16 nItemVersion) const; virtual int operator==(const SfxPoolItem& rCmp) const; - const SfxPoolItem& GetItem( USHORT nWhichP ) const + const SfxPoolItem& GetItem( sal_uInt16 nWhichP ) const { return GetItemSet().Get(nWhichP); } - static const SfxPoolItem& GetItem( USHORT nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet ); - const SfxPoolItem& GetItem( USHORT nWhich, const SfxItemSet* pCondSet ) const; + static const SfxPoolItem& GetItem( sal_uInt16 nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet ); + const SfxPoolItem& GetItem( sal_uInt16 nWhich, const SfxItemSet* pCondSet ) const; // pWhich sind keine Ranges, sondern einzelne IDs, 0-terminiert - BOOL HasItemsSet( const USHORT* pWhich ) const; - void ClearItems( const USHORT* pWhich ); + sal_Bool HasItemsSet( const sal_uInt16* pWhich ) const; + void ClearItems( const sal_uInt16* pWhich ); void DeleteUnchanged( const ScPatternAttr* pOldAttrs ); @@ -96,14 +96,14 @@ public: OutputDevice* pOutDev = NULL, const Fraction* pScale = NULL, const SfxItemSet* pCondSet = NULL, - BYTE nScript = 0, const Color* pBackConfigColor = NULL, + sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL, const Color* pTextConfigColor = NULL ); /** Fills a font object from the own item set. */ void GetFont( Font& rFont, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev = NULL, const Fraction* pScale = NULL, const SfxItemSet* pCondSet = NULL, - BYTE nScript = 0, const Color* pBackConfigColor = NULL, + sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL, const Color* pTextConfigColor = NULL ) const; /** Converts all Calc items contained in rSrcSet to edit engine items and puts them into rEditSet. */ @@ -126,12 +126,12 @@ public: void UpdateStyleSheet(); void StyleToName(); - BOOL IsVisible() const; - BOOL IsVisibleEqual( const ScPatternAttr& rOther ) const; + sal_Bool IsVisible() const; + sal_Bool IsVisibleEqual( const ScPatternAttr& rOther ) const; /** If font is an old symbol font StarBats/StarMath with text encoding RTL_TEXTENC_SYMBOL */ - BOOL IsSymbolFont() const; + sal_Bool IsSymbolFont() const; //UNUSED2008-05 /** Create a FontToSubsFontConverter if needed for //UNUSED2008-05 this pattern, else return 0. @@ -144,14 +144,14 @@ public: //UNUSED2008-05 should be accomplished using the //UNUSED2008-05 ScFontToSubsFontConverter_AutoPtr //UNUSED2008-05 */ -//UNUSED2008-05 FontToSubsFontConverter GetSubsFontConverter( ULONG nFlags ) const; +//UNUSED2008-05 FontToSubsFontConverter GetSubsFontConverter( sal_uLong nFlags ) const; - ULONG GetNumberFormat( SvNumberFormatter* ) const; - ULONG GetNumberFormat( SvNumberFormatter* pFormatter, + sal_uLong GetNumberFormat( SvNumberFormatter* ) const; + sal_uLong GetNumberFormat( SvNumberFormatter* pFormatter, const SfxItemSet* pCondSet ) const; long GetRotateVal( const SfxItemSet* pCondSet ) const; - BYTE GetRotateDir( const SfxItemSet* pCondSet ) const; + sal_uInt8 GetRotateDir( const SfxItemSet* pCondSet ) const; }; diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx index 489f272bc8ba..dbf54fb6ed82 100644 --- a/sc/inc/pivot.hxx +++ b/sc/inc/pivot.hxx @@ -77,11 +77,11 @@ typedef ::boost::shared_ptr ScDPLabelDataRef; struct PivotField { SCsCOL nCol; - USHORT nFuncMask; - USHORT nFuncCount; + sal_uInt16 nFuncMask; + sal_uInt16 nFuncCount; ::com::sun::star::sheet::DataPilotFieldReference maFieldRef; - explicit PivotField( SCsCOL nNewCol = 0, USHORT nNewFuncMask = PIVOT_FUNC_NONE ); + explicit PivotField( SCsCOL nNewCol = 0, sal_uInt16 nNewFuncMask = PIVOT_FUNC_NONE ); bool operator==( const PivotField& r ) const; }; @@ -103,17 +103,17 @@ struct ScPivotParam SCSIZE nColCount; SCSIZE nRowCount; SCSIZE nDataCount; - BOOL bIgnoreEmptyRows; - BOOL bDetectCategories; - BOOL bMakeTotalCol; - BOOL bMakeTotalRow; + sal_Bool bIgnoreEmptyRows; + sal_Bool bDetectCategories; + sal_Bool bMakeTotalCol; + sal_Bool bMakeTotalRow; ScPivotParam(); ScPivotParam( const ScPivotParam& r ); ~ScPivotParam(); ScPivotParam& operator= ( const ScPivotParam& r ); - BOOL operator== ( const ScPivotParam& r ) const; + sal_Bool operator== ( const ScPivotParam& r ) const; //UNUSED2009-05 void Clear (); void ClearPivotArrays(); void SetLabelData (const ::std::vector& r); @@ -139,7 +139,7 @@ struct ScDPLabelData ::rtl::OUString maName; /// Original name of the dimension. ::rtl::OUString maLayoutName; /// Layout name (display name) SCsCOL mnCol; - USHORT mnFuncMask; /// Page/Column/Row subtotal function. + sal_uInt16 mnFuncMask; /// Page/Column/Row subtotal function. sal_Int32 mnUsedHier; /// Used hierarchy. sal_Int32 mnFlags; /// Flags from the DataPilotSource dimension bool mbShowAll; /// true = Show all (also empty) results. @@ -181,11 +181,11 @@ struct ScDPLabelData struct ScDPFuncData { short mnCol; - USHORT mnFuncMask; + sal_uInt16 mnFuncMask; ::com::sun::star::sheet::DataPilotFieldReference maFieldRef; - explicit ScDPFuncData( short nNewCol, USHORT nNewFuncMask ); - explicit ScDPFuncData( short nNewCol, USHORT nNewFuncMask, + explicit ScDPFuncData( short nNewCol, sal_uInt16 nNewFuncMask ); + explicit ScDPFuncData( short nNewCol, sal_uInt16 nNewFuncMask, const ::com::sun::star::sheet::DataPilotFieldReference& rFieldRef ); }; diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index a4363e3adfbc..9141e477c4b7 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -79,9 +79,9 @@ public: @param bAlwaysCreateCaption Instead of a pointer to an existing caption object, the passed note data structure may contain a reference to an ScCaptionInitData structure containing information - about how to construct a missing caption object. If TRUE is passed, + about how to construct a missing caption object. If sal_True is passed, the caption drawing object will be created immediately from that - data. If FALSE is passed and the note is not visible, it will + data. If sal_False is passed and the note is not visible, it will continue to cache that data until the caption object is requested. */ explicit ScPostIt( @@ -93,9 +93,9 @@ public: /** Clones this note and its caption object, if specified. - @param bCloneCaption If TRUE is passed, clones the caption object and + @param bCloneCaption If sal_True is passed, clones the caption object and inserts it into the drawing layer of the destination document. If - FALSE is passed, the cloned note will refer to the old caption + sal_False is passed, the cloned note will refer to the old caption object (used e.g. in Undo documents to restore the pointer to the existing caption object). */ @@ -220,11 +220,11 @@ public: object. The rectangle may be empty, in this case the default position and size is used. - @param bAlwaysCreateCaption If TRUE is passed, the caption drawing - object will be created immediately. If FALSE is passed, the caption + @param bAlwaysCreateCaption If sal_True is passed, the caption drawing + object will be created immediately. If sal_False is passed, the caption drawing object will not be created if the note is not visible - (bShown = FALSE), but the cell note will cache the passed data. - MUST be set to FALSE outside of import filter implementations! + (bShown = sal_False), but the cell note will cache the passed data. + MUST be set to sal_False outside of import filter implementations! @return Pointer to the new cell note object if insertion was successful (i.e. the passed cell position was valid), null @@ -242,11 +242,11 @@ public: @param rNoteText The text used to create the note caption object. Must not be empty. - @param bAlwaysCreateCaption If TRUE is passed, the caption drawing - object will be created immediately. If FALSE is passed, the caption + @param bAlwaysCreateCaption If sal_True is passed, the caption drawing + object will be created immediately. If sal_False is passed, the caption drawing object will not be created if the note is not visible - (bShown = FALSE), but the cell note will cache the passed data. - MUST be set to FALSE outside of import filter implementations! + (bShown = sal_False), but the cell note will cache the passed data. + MUST be set to sal_False outside of import filter implementations! @return Pointer to the new cell note object if insertion was successful (i.e. the passed cell position was valid), null diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index ec063d2d0e9b..1f8ad784f5a4 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -35,18 +35,18 @@ class SC_DLLPUBLIC ScPrintOptions { private: - BOOL bSkipEmpty; - BOOL bAllSheets; + sal_Bool bSkipEmpty; + sal_Bool bAllSheets; public: ScPrintOptions(); ScPrintOptions( const ScPrintOptions& rCpy ); ~ScPrintOptions(); - BOOL GetSkipEmpty() const { return bSkipEmpty; } - void SetSkipEmpty( BOOL bVal ) { bSkipEmpty = bVal; } - BOOL GetAllSheets() const { return bAllSheets; } - void SetAllSheets( BOOL bVal ) { bAllSheets = bVal; } + sal_Bool GetSkipEmpty() const { return bSkipEmpty; } + void SetSkipEmpty( sal_Bool bVal ) { bSkipEmpty = bVal; } + sal_Bool GetAllSheets() const { return bAllSheets; } + void SetAllSheets( sal_Bool bVal ) { bAllSheets = bVal; } void SetDefaults(); @@ -63,8 +63,8 @@ class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem { public: TYPEINFO(); -//UNUSED2008-05 ScTpPrintItem( USHORT nWhich ); - ScTpPrintItem( USHORT nWhich, +//UNUSED2008-05 ScTpPrintItem( sal_uInt16 nWhich ); + ScTpPrintItem( sal_uInt16 nWhich, const ScPrintOptions& rOpt ); ScTpPrintItem( const ScTpPrintItem& rItem ); ~ScTpPrintItem(); diff --git a/sc/inc/prnsave.hxx b/sc/inc/prnsave.hxx index b28d04cf48bf..acca6b6a8c4c 100644 --- a/sc/inc/prnsave.hxx +++ b/sc/inc/prnsave.hxx @@ -42,21 +42,21 @@ class ScPrintSaverTab ScRangeVec maPrintRanges; // Array ScRange* mpRepeatCol; // einzeln ScRange* mpRepeatRow; // einzeln - BOOL mbEntireSheet; + sal_Bool mbEntireSheet; public: ScPrintSaverTab(); ~ScPrintSaverTab(); - void SetAreas( const ScRangeVec& rRanges, BOOL bEntireSheet ); + void SetAreas( const ScRangeVec& rRanges, sal_Bool bEntireSheet ); void SetRepeat( const ScRange* pCol, const ScRange* pRow ); const ScRangeVec& GetPrintRanges() const { return maPrintRanges; } - BOOL IsEntireSheet() const { return mbEntireSheet; } + sal_Bool IsEntireSheet() const { return mbEntireSheet; } const ScRange* GetRepeatCol() const { return mpRepeatCol; } const ScRange* GetRepeatRow() const { return mpRepeatRow; } - BOOL operator==( const ScPrintSaverTab& rCmp ) const; + sal_Bool operator==( const ScPrintSaverTab& rCmp ) const; }; class ScPrintRangeSaver @@ -72,7 +72,7 @@ public: ScPrintSaverTab& GetTabData(SCTAB nTab); const ScPrintSaverTab& GetTabData(SCTAB nTab) const; - BOOL operator==( const ScPrintRangeSaver& rCmp ) const; + sal_Bool operator==( const ScPrintRangeSaver& rCmp ) const; }; diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx index a9cd3d2544bd..3db5c9cd726d 100644 --- a/sc/inc/progress.hxx +++ b/sc/inc/progress.hxx @@ -48,15 +48,15 @@ class SC_DLLPUBLIC ScProgress { private: static SfxProgress* pGlobalProgress; - static ULONG nGlobalRange; - static ULONG nGlobalPercent; - static BOOL bGlobalNoUserBreak; + static sal_uLong nGlobalRange; + static sal_uLong nGlobalPercent; + static sal_Bool bGlobalNoUserBreak; static ScProgress* pInterpretProgress; static ScProgress* pOldInterpretProgress; - static ULONG nInterpretProgress; - static BOOL bAllowInterpretProgress; + static sal_uLong nInterpretProgress; + static sal_Bool bAllowInterpretProgress; static ScDocument* pInterpretDoc; - static BOOL bIdleWasDisabled; + static sal_Bool bIdleWasDisabled; SfxProgress* pProgress; @@ -64,7 +64,7 @@ private: ScProgress( const ScProgress& ); ScProgress& operator=( const ScProgress& ); - static void CalcGlobalPercent( ULONG nVal ) + static void CalcGlobalPercent( sal_uLong nVal ) { nGlobalPercent = nGlobalRange ? nVal * 100 / nGlobalRange : 0; @@ -72,19 +72,19 @@ private: public: static SfxProgress* GetGlobalSfxProgress() { return pGlobalProgress; } - static BOOL IsUserBreak() { return !bGlobalNoUserBreak; } + static sal_Bool IsUserBreak() { return !bGlobalNoUserBreak; } static void CreateInterpretProgress( ScDocument* pDoc, - BOOL bWait = TRUE ); + sal_Bool bWait = sal_True ); static ScProgress* GetInterpretProgress() { return pInterpretProgress; } static void DeleteInterpretProgress(); - static ULONG GetInterpretCount() { return nInterpretProgress; } - static ULONG GetGlobalRange() { return nGlobalRange; } - static ULONG GetGlobalPercent() { return nGlobalPercent; } + static sal_uLong GetInterpretCount() { return nInterpretProgress; } + static sal_uLong GetGlobalRange() { return nGlobalRange; } + static sal_uLong GetGlobalPercent() { return nGlobalPercent; } ScProgress( SfxObjectShell* pObjSh, const String& rText, - ULONG nRange, BOOL bAllDocs = FALSE, - BOOL bWait = TRUE ); + sal_uLong nRange, sal_Bool bAllDocs = sal_False, + sal_Bool bWait = sal_True ); ~ScProgress(); #ifdef SC_PROGRESS_CXX @@ -94,7 +94,7 @@ public: // kann NULL sein! SfxProgress* GetSfxProgress() const { return pProgress; } - BOOL SetStateText( ULONG nVal, const String &rVal, ULONG nNewRange = 0 ) + sal_Bool SetStateText( sal_uLong nVal, const String &rVal, sal_uLong nNewRange = 0 ) { if ( pProgress ) { @@ -102,12 +102,12 @@ public: nGlobalRange = nNewRange; CalcGlobalPercent( nVal ); if ( !pProgress->SetStateText( nVal, rVal, nNewRange ) ) - bGlobalNoUserBreak = FALSE; + bGlobalNoUserBreak = sal_False; return bGlobalNoUserBreak; } - return TRUE; + return sal_True; } - BOOL SetState( ULONG nVal, ULONG nNewRange = 0 ) + sal_Bool SetState( sal_uLong nVal, sal_uLong nNewRange = 0 ) { if ( pProgress ) { @@ -115,38 +115,38 @@ public: nGlobalRange = nNewRange; CalcGlobalPercent( nVal ); if ( !pProgress->SetState( nVal, nNewRange ) ) - bGlobalNoUserBreak = FALSE; + bGlobalNoUserBreak = sal_False; return bGlobalNoUserBreak; } - return TRUE; + return sal_True; } - BOOL SetStateCountDown( ULONG nVal ) + sal_Bool SetStateCountDown( sal_uLong nVal ) { if ( pProgress ) { CalcGlobalPercent( nGlobalRange - nVal ); if ( !pProgress->SetState( nGlobalRange - nVal ) ) - bGlobalNoUserBreak = FALSE; + bGlobalNoUserBreak = sal_False; return bGlobalNoUserBreak; } - return TRUE; + return sal_True; } - BOOL SetStateOnPercent( ULONG nVal ) + sal_Bool SetStateOnPercent( sal_uLong nVal ) { // nur wenn Prozent mehr als vorher if ( nGlobalRange && (nVal * 100 / nGlobalRange) > nGlobalPercent ) return SetState( nVal ); - return TRUE; + return sal_True; } - BOOL SetStateCountDownOnPercent( ULONG nVal ) + sal_Bool SetStateCountDownOnPercent( sal_uLong nVal ) { // nur wenn Prozent mehr als vorher if ( nGlobalRange && ((nGlobalRange - nVal) * 100 / nGlobalRange) > nGlobalPercent ) return SetStateCountDown( nVal ); - return TRUE; + return sal_True; } - ULONG GetState() + sal_uLong GetState() { if ( pProgress ) return pProgress->GetState(); diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx index 8e84f1e53e36..9ffe038b7255 100644 --- a/sc/inc/queryparam.hxx +++ b/sc/inc/queryparam.hxx @@ -82,7 +82,7 @@ struct ScQueryParamTable struct SC_DLLPUBLIC ScQueryParam : public ScQueryParamBase, public ScQueryParamTable { - BOOL bDestPers; // nicht gespeichert + sal_Bool bDestPers; // nicht gespeichert SCTAB nDestTab; SCCOL nDestCol; SCROW nDestRow; @@ -93,7 +93,7 @@ struct SC_DLLPUBLIC ScQueryParam : public ScQueryParamBase, public ScQueryParamT virtual ~ScQueryParam(); ScQueryParam& operator= ( const ScQueryParam& r ); - BOOL operator== ( const ScQueryParam& rOther ) const; + sal_Bool operator== ( const ScQueryParam& rOther ) const; void Clear(); void ClearDestParams(); void MoveToDest(); diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index e00fce10da1c..70c8658de5da 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -53,23 +53,23 @@ public: ScRangePtr pR = new ScRange( rRange ); Insert( pR, LIST_APPEND ); } - USHORT Parse( const String&, ScDocument* = NULL, - USHORT nMask = SCA_VALID, + sal_uInt16 Parse( const String&, ScDocument* = NULL, + sal_uInt16 nMask = SCA_VALID, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO, sal_Unicode cDelimiter = 0 ); - void Format( String&, USHORT nFlags = 0, ScDocument* = NULL, + void Format( String&, sal_uInt16 nFlags = 0, ScDocument* = NULL, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO, sal_Unicode cDelimiter = 0 ) const; - void Join( const ScRange&, BOOL bIsInList = FALSE ); - BOOL UpdateReference( UpdateRefMode, ScDocument*, + void Join( const ScRange&, sal_Bool bIsInList = sal_False ); + sal_Bool UpdateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); ScRange* Find( const ScAddress& ) const; - BOOL operator==( const ScRangeList& ) const; - BOOL operator!=( const ScRangeList& r ) const; - BOOL Intersects( const ScRange& ) const; - BOOL In( const ScRange& ) const; - ULONG GetCellCount() const; + sal_Bool operator==( const ScRangeList& ) const; + sal_Bool operator!=( const ScRangeList& r ) const; + sal_Bool Intersects( const ScRange& ) const; + sal_Bool In( const ScRange& ) const; + sal_uLong GetCellCount() const; }; SV_DECL_IMPL_REF( ScRangeList ); @@ -90,15 +90,15 @@ public: ScRangePair* pR = new ScRangePair( rRangePair ); Insert( pR, LIST_APPEND ); } - void Join( const ScRangePair&, BOOL bIsInList = FALSE ); - BOOL UpdateReference( UpdateRefMode, ScDocument*, + void Join( const ScRangePair&, sal_Bool bIsInList = sal_False ); + sal_Bool UpdateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); void DeleteOnTab( SCTAB nTab ); ScRangePair* Find( const ScAddress& ) const; ScRangePair* Find( const ScRange& ) const; - ScRangePair** CreateNameSortedArray( ULONG& nCount, ScDocument* ) const; - BOOL operator==( const ScRangePairList& ) const; + ScRangePair** CreateNameSortedArray( sal_uLong& nCount, ScDocument* ) const; + sal_Bool operator==( const ScRangePairList& ) const; }; SV_DECL_IMPL_REF( ScRangePairList ); diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index a9f324b8b737..453530c0e1f6 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -47,7 +47,7 @@ namespace rtl { //------------------------------------------------------------------------ -typedef USHORT RangeType; +typedef sal_uInt16 RangeType; #define RT_NAME ((RangeType)0x0000) #define RT_DATABASE ((RangeType)0x0001) @@ -74,8 +74,8 @@ private: ScAddress aPos; RangeType eType; ScDocument* pDoc; - USHORT nIndex; - BOOL bModified; // wird bei UpdateReference gesetzt/geloescht + sal_uInt16 nIndex; + sal_Bool bModified; // wird bei UpdateReference gesetzt/geloescht // max row and column to use for wrapping of references. If -1 use the // application's default. @@ -83,7 +83,7 @@ private: SCCOL mnMaxCol; friend class ScRangeName; - ScRangeData( USHORT nIndex ); + ScRangeData( sal_uInt16 nIndex ); public: typedef ::std::map IndexMap; @@ -109,45 +109,45 @@ public: virtual ScDataObject* Clone() const; - BOOL operator== (const ScRangeData& rData) const; + sal_Bool operator== (const ScRangeData& rData) const; void GetName( String& rName ) const { rName = aName; } const String& GetName( void ) const { return aName; } const String& GetUpperName( void ) const { return aUpperName; } ScAddress GetPos() const { return aPos; } // Der Index muss eindeutig sein. Ist er 0, wird ein neuer Index vergeben - void SetIndex( USHORT nInd ) { nIndex = nInd; } - USHORT GetIndex() const { return nIndex; } + void SetIndex( sal_uInt16 nInd ) { nIndex = nInd; } + sal_uInt16 GetIndex() const { return nIndex; } ScTokenArray* GetCode() { return pCode; } - USHORT GetErrCode(); - BOOL HasReferences() const; + sal_uInt16 GetErrCode(); + sal_Bool HasReferences() const; void SetDocument( ScDocument* pDocument){ pDoc = pDocument; } ScDocument* GetDocument() const { return pDoc; } void SetType( RangeType nType ) { eType = nType; } void AddType( RangeType nType ) { eType = eType|nType; } RangeType GetType() const { return eType; } - BOOL HasType( RangeType nType ) const; + sal_Bool HasType( RangeType nType ) const; SC_DLLPUBLIC void GetSymbol( String& rSymbol, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const; void UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress&, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ); void UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - BOOL IsModified() const { return bModified; } + sal_Bool IsModified() const { return bModified; } SC_DLLPUBLIC void GuessPosition(); void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest ); void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ); - SC_DLLPUBLIC BOOL IsReference( ScRange& rRef ) const; - BOOL IsReference( ScRange& rRef, const ScAddress& rPos ) const; - BOOL IsValidReference( ScRange& rRef ) const; + SC_DLLPUBLIC sal_Bool IsReference( ScRange& rRef ) const; + sal_Bool IsReference( ScRange& rRef, const ScAddress& rPos ) const; + sal_Bool IsValidReference( ScRange& rRef ) const; -//UNUSED2009-05 BOOL IsRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const; - BOOL IsRangeAtBlock( const ScRange& ) const; +//UNUSED2009-05 sal_Bool IsRangeAtCursor( const ScAddress&, sal_Bool bStartOnly ) const; + sal_Bool IsRangeAtBlock( const ScRange& ) const; - void UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable); + void UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable); void TransferTabRef( SCTAB nOldTab, SCTAB nNewTab ); void ValidateTabRefs(); @@ -155,7 +155,7 @@ public: void ReplaceRangeNamesInUse( const IndexMap& rMap ); static void MakeValidName( String& rName ); - SC_DLLPUBLIC static BOOL IsNameValid( const String& rName, ScDocument* pDoc ); + SC_DLLPUBLIC static sal_Bool IsNameValid( const String& rName, ScDocument* pDoc ); SC_DLLPUBLIC void SetMaxRow(SCROW nRow); SCROW GetMaxRow() const; @@ -163,7 +163,7 @@ public: SCCOL GetMaxCol() const; }; -inline BOOL ScRangeData::HasType( RangeType nType ) const +inline sal_Bool ScRangeData::HasType( RangeType nType ) const { return ( ( eType & nType ) == nType ); } @@ -181,12 +181,12 @@ class ScRangeName : public ScSortedCollection { private: ScDocument* pDoc; - USHORT nSharedMaxIndex; + sal_uInt16 nSharedMaxIndex; using ScSortedCollection::Clone; // calcwarnings: shouldn't be used public: - ScRangeName(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE, + ScRangeName(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False, ScDocument* pDocument = NULL) : ScSortedCollection ( nLim, nDel, bDup ), pDoc ( pDocument ), @@ -196,28 +196,28 @@ public: virtual ScDataObject* Clone(ScDocument* pDocP) const { return new ScRangeName(*this, pDocP); } - ScRangeData* operator[]( const USHORT nIndex) const + ScRangeData* operator[]( const sal_uInt16 nIndex) const { return (ScRangeData*)At(nIndex); } virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; + virtual sal_Bool IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; -//UNUSED2009-05 ScRangeData* GetRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const; +//UNUSED2009-05 ScRangeData* GetRangeAtCursor( const ScAddress&, sal_Bool bStartOnly ) const; SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& ) const; - SC_DLLPUBLIC BOOL SearchName( const String& rName, USHORT& rPos ) const; + SC_DLLPUBLIC sal_Bool SearchName( const String& rName, sal_uInt16& rPos ) const; // SearchNameUpper must be called with an upper-case search string - BOOL SearchNameUpper( const String& rUpperName, USHORT& rPos ) const; + sal_Bool SearchNameUpper( const String& rUpperName, sal_uInt16& rPos ) const; void UpdateReference(UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - void UpdateTabRef(SCTAB nTable, USHORT nFlag, SCTAB nNewTable = 0); + void UpdateTabRef(SCTAB nTable, sal_uInt16 nFlag, SCTAB nNewTable = 0); void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest ); void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ); - virtual BOOL Insert(ScDataObject* pScDataObject); - SC_DLLPUBLIC ScRangeData* FindIndex(USHORT nIndex); - USHORT GetSharedMaxIndex() { return nSharedMaxIndex; } - void SetSharedMaxIndex(USHORT nInd) { nSharedMaxIndex = nInd; } - USHORT GetEntryIndex(); + virtual sal_Bool Insert(ScDataObject* pScDataObject); + SC_DLLPUBLIC ScRangeData* FindIndex(sal_uInt16 nIndex); + sal_uInt16 GetSharedMaxIndex() { return nSharedMaxIndex; } + void SetSharedMaxIndex(sal_uInt16 nInd) { nSharedMaxIndex = nInd; } + sal_uInt16 GetEntryIndex(); }; #endif diff --git a/sc/inc/rangeseq.hxx b/sc/inc/rangeseq.hxx index 6238ea5f8050..735985df1779 100644 --- a/sc/inc/rangeseq.hxx +++ b/sc/inc/rangeseq.hxx @@ -39,21 +39,21 @@ class ScRange; class ScRangeToSequence { public: - static BOOL FillLongArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillLongArray( com::sun::star::uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange ); - static BOOL FillLongArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillLongArray( com::sun::star::uno::Any& rAny, const ScMatrix* pMatrix ); - static BOOL FillDoubleArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillDoubleArray( com::sun::star::uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange ); - static BOOL FillDoubleArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillDoubleArray( com::sun::star::uno::Any& rAny, const ScMatrix* pMatrix ); - static BOOL FillStringArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillStringArray( com::sun::star::uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange ); - static BOOL FillStringArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillStringArray( com::sun::star::uno::Any& rAny, const ScMatrix* pMatrix, SvNumberFormatter* pFormatter ); - static BOOL FillMixedArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillMixedArray( com::sun::star::uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange, - BOOL bAllowNV = FALSE ); + sal_Bool bAllowNV = sal_False ); /** @param bDataTypes Additionally to the differentiation between string and double allow @@ -61,7 +61,7 @@ public: implementation of XFormulaParser. If , boolean values are treated as ordinary double values 1 (true) and 0 (false). */ - static BOOL FillMixedArray( com::sun::star::uno::Any& rAny, + static sal_Bool FillMixedArray( com::sun::star::uno::Any& rAny, const ScMatrix* pMatrix, bool bDataTypes = false ); }; @@ -106,7 +106,7 @@ class ScByteSequenceToString public: // rAny must contain Sequence, // may or may not contain 0-bytes at the end - static BOOL GetString( String& rString, const com::sun::star::uno::Any& rAny, + static sal_Bool GetString( String& rString, const com::sun::star::uno::Any& rAny, sal_uInt16 nEncoding ); }; diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index ea5d2a901b54..d461315c2c34 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -56,7 +56,7 @@ public: ScRangeUtil() {} ~ScRangeUtil() {} - BOOL MakeArea ( const String& rAreaStr, + sal_Bool MakeArea ( const String& rAreaStr, ScArea& rArea, ScDocument* pDoc, SCTAB nTab, @@ -65,14 +65,14 @@ public: void CutPosString ( const String& theAreaStr, String& thePosStr ) const; - BOOL IsAbsTabArea ( const String& rAreaStr, + sal_Bool IsAbsTabArea ( const String& rAreaStr, ScDocument* pDoc, ScArea*** pppAreas = 0, - USHORT* pAreaCount = 0, - BOOL bAcceptCellRef = FALSE, + sal_uInt16* pAreaCount = 0, + sal_Bool bAcceptCellRef = sal_False, ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; - BOOL IsAbsArea ( const String& rAreaStr, + sal_Bool IsAbsArea ( const String& rAreaStr, ScDocument* pDoc, SCTAB nTab, String* pCompleteStr = 0, @@ -80,21 +80,21 @@ public: ScRefAddress* pEndPos = 0, ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; - BOOL IsRefArea ( const String&, + sal_Bool IsRefArea ( const String&, ScDocument*, SCTAB, String* = 0, ScRefAddress* = 0 ) const - { return FALSE; } + { return sal_False; } - BOOL IsAbsPos ( const String& rPosStr, + sal_Bool IsAbsPos ( const String& rPosStr, ScDocument* pDoc, SCTAB nTab, String* pCompleteStr = 0, ScRefAddress* pPosTripel = 0, ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ) const; - BOOL MakeRangeFromName ( const String& rName, + sal_Bool MakeRangeFromName ( const String& rName, ScDocument* pDoc, SCTAB nCurTab, ScRange& rRange, @@ -282,8 +282,8 @@ public: ScArea( const ScArea& r ); ScArea& operator= ( const ScArea& r ); - BOOL operator== ( const ScArea& r ) const; - BOOL operator!= ( const ScArea& r ) const { return !( operator==(r) ); } + sal_Bool operator== ( const ScArea& r ) const; + sal_Bool operator!= ( const ScArea& r ) const { return !( operator==(r) ); } public: SCTAB nTab; @@ -304,16 +304,16 @@ class SC_DLLPUBLIC ScAreaNameIterator private: ScRangeName* pRangeName; ScDBCollection* pDBCollection; - BOOL bFirstPass; - USHORT nPos; + sal_Bool bFirstPass; + sal_uInt16 nPos; String aStrNoName; public: ScAreaNameIterator( ScDocument* pDoc ); ~ScAreaNameIterator() {} - BOOL Next( String& rName, ScRange& rRange ); - BOOL WasDBName() const { return !bFirstPass; } + sal_Bool Next( String& rName, ScRange& rRange ); + sal_Bool WasDBName() const { return !bFirstPass; } }; diff --git a/sc/inc/rechead.hxx b/sc/inc/rechead.hxx index 348159c12ce1..0f56ef5b5ab4 100644 --- a/sc/inc/rechead.hxx +++ b/sc/inc/rechead.hxx @@ -133,11 +133,11 @@ class ScMultipleReadHeader { private: SvStream& rStream; - BYTE* pBuf; + sal_uInt8* pBuf; SvMemoryStream* pMemStream; - ULONG nEndPos; - ULONG nEntryEnd; - ULONG nTotalEnd; + sal_uLong nEndPos; + sal_uLong nEntryEnd; + sal_uLong nTotalEnd; public: ScMultipleReadHeader(SvStream& rNewStream); @@ -145,7 +145,7 @@ public: void StartEntry(); void EndEntry(); - ULONG BytesLeft() const; + sal_uLong BytesLeft() const; }; class ScMultipleWriteHeader @@ -153,9 +153,9 @@ class ScMultipleWriteHeader private: SvStream& rStream; SvMemoryStream aMemStream; - ULONG nDataPos; + sal_uLong nDataPos; sal_uInt32 nDataSize; - ULONG nEntryStart; + sal_uLong nEntryStart; public: ScMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0); diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx index 7b24e1a409b4..c15b31fd197b 100644 --- a/sc/inc/recursionhelper.hxx +++ b/sc/inc/recursionhelper.hxx @@ -39,9 +39,9 @@ class ScFormulaCell; struct ScFormulaRecursionEntry { ScFormulaCell* pCell; - BOOL bOldRunning; + sal_Bool bOldRunning; ScFormulaResult aPreviousResult; - ScFormulaRecursionEntry( ScFormulaCell* p, BOOL bR, + ScFormulaRecursionEntry( ScFormulaCell* p, sal_Bool bR, const ScFormulaResult & rRes ) : pCell(p), bOldRunning(bR), aPreviousResult( rRes) { @@ -57,8 +57,8 @@ class ScRecursionHelper ScFormulaRecursionList::iterator aInsertPos; ScFormulaRecursionList::iterator aLastIterationStart; ScRecursionInIterationStack aRecursionInIterationStack; - USHORT nRecursionCount; - USHORT nIteration; + sal_uInt16 nRecursionCount; + sal_uInt16 nIteration; bool bInRecursionReturn; bool bDoingRecursion; bool bInIterationReturn; @@ -81,7 +81,7 @@ class ScRecursionHelper public: ScRecursionHelper() { Init(); } - USHORT GetRecursionCount() const { return nRecursionCount; } + sal_uInt16 GetRecursionCount() const { return nRecursionCount; } void IncRecursionCount() { ++nRecursionCount; } void DecRecursionCount() { --nRecursionCount; } /// A pure recursion return, no iteration. @@ -96,7 +96,7 @@ class ScRecursionHelper } bool IsDoingRecursion() const { return bDoingRecursion; } void SetDoingRecursion( bool b ) { bDoingRecursion = b; } - void Insert( ScFormulaCell* p, BOOL bOldRunning, + void Insert( ScFormulaCell* p, sal_Bool bOldRunning, const ScFormulaResult & rRes ) { aRecursionFormulas.insert( aInsertPos, ScFormulaRecursionEntry( p, @@ -118,7 +118,7 @@ class ScRecursionHelper bInIterationReturn = b; } bool IsDoingIteration() const { return nIteration > 0; } - USHORT GetIteration() const { return nIteration; } + sal_uInt16 GetIteration() const { return nIteration; } bool & GetConvergingReference() { return bConverging; } void StartIteration() { diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx index f42f930084be..a386263efaf8 100644 --- a/sc/inc/refdata.hxx +++ b/sc/inc/refdata.hxx @@ -37,10 +37,10 @@ struct OldSingleRefBools { - BYTE bRelCol; // Flag values (see further down), 2 bits each in file format - BYTE bRelRow; - BYTE bRelTab; - BYTE bOldFlag3D; // two BOOL flags (see further down) + sal_uInt8 bRelCol; // Flag values (see further down), 2 bits each in file format + sal_uInt8 bRelRow; + sal_uInt8 bRelTab; + sal_uInt8 bOldFlag3D; // two sal_Bool flags (see further down) }; #define SR_ABSOLUTE 0 // Absolute value @@ -48,7 +48,7 @@ struct OldSingleRefBools #define SR_RELATIVE 2 // Relative value as delta value (after release 3.1) #define SR_DELETED 3 // Deleted col/row/tab -#define SRF_3D 0x01 // 3D reference, was the BOOL (before build 304a) +#define SRF_3D 0x01 // 3D reference, was the sal_Bool (before build 304a) #define SRF_RELNAME 0x02 // Reference derived from RangeName with relative values #define SRF_BITS 0x03 // Mask of possible bits @@ -64,17 +64,17 @@ struct SC_DLLPUBLIC ScSingleRefData // Single reference (one address) int union { - BOOL bFlags; + sal_Bool bFlags; struct { - BOOL bColRel :1; - BOOL bColDeleted :1; - BOOL bRowRel :1; - BOOL bRowDeleted :1; - BOOL bTabRel :1; - BOOL bTabDeleted :1; - BOOL bFlag3D :1; // 3D-Ref - BOOL bRelName :1; // Reference derived from RangeName with relative values + sal_Bool bColRel :1; + sal_Bool bColDeleted :1; + sal_Bool bRowRel :1; + sal_Bool bRowDeleted :1; + sal_Bool bTabRel :1; + sal_Bool bTabDeleted :1; + sal_Bool bFlag3D :1; // 3D-Ref + sal_Bool bRelName :1; // Reference derived from RangeName with relative values }Flags; }; @@ -85,34 +85,34 @@ struct SC_DLLPUBLIC ScSingleRefData // Single reference (one address) int inline void InitAddress( SCCOL nCol, SCROW nRow, SCTAB nTab ); // InitAddressRel: InitFlags and set address, everything relative to rPos inline void InitAddressRel( const ScAddress& rAdr, const ScAddress& rPos ); - inline void SetColRel( BOOL bVal ) { Flags.bColRel = (bVal ? TRUE : FALSE ); } - inline BOOL IsColRel() const { return Flags.bColRel; } - inline void SetRowRel( BOOL bVal ) { Flags.bRowRel = (bVal ? TRUE : FALSE ); } - inline BOOL IsRowRel() const { return Flags.bRowRel; } - inline void SetTabRel( BOOL bVal ) { Flags.bTabRel = (bVal ? TRUE : FALSE ); } - inline BOOL IsTabRel() const { return Flags.bTabRel; } - - inline void SetColDeleted( BOOL bVal ) { Flags.bColDeleted = (bVal ? TRUE : FALSE ); } - inline BOOL IsColDeleted() const { return Flags.bColDeleted; } - inline void SetRowDeleted( BOOL bVal ) { Flags.bRowDeleted = (bVal ? TRUE : FALSE ); } - inline BOOL IsRowDeleted() const { return Flags.bRowDeleted; } - inline void SetTabDeleted( BOOL bVal ) { Flags.bTabDeleted = (bVal ? TRUE : FALSE ); } - inline BOOL IsTabDeleted() const { return Flags.bTabDeleted; } - inline BOOL IsDeleted() const { return IsColDeleted() || IsRowDeleted() || IsTabDeleted(); } - - inline void SetFlag3D( BOOL bVal ) { Flags.bFlag3D = (bVal ? TRUE : FALSE ); } - inline BOOL IsFlag3D() const { return Flags.bFlag3D; } - inline void SetRelName( BOOL bVal ) { Flags.bRelName = (bVal ? TRUE : FALSE ); } - inline BOOL IsRelName() const { return Flags.bRelName; } - - inline BOOL Valid() const; + inline void SetColRel( sal_Bool bVal ) { Flags.bColRel = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsColRel() const { return Flags.bColRel; } + inline void SetRowRel( sal_Bool bVal ) { Flags.bRowRel = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsRowRel() const { return Flags.bRowRel; } + inline void SetTabRel( sal_Bool bVal ) { Flags.bTabRel = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsTabRel() const { return Flags.bTabRel; } + + inline void SetColDeleted( sal_Bool bVal ) { Flags.bColDeleted = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsColDeleted() const { return Flags.bColDeleted; } + inline void SetRowDeleted( sal_Bool bVal ) { Flags.bRowDeleted = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsRowDeleted() const { return Flags.bRowDeleted; } + inline void SetTabDeleted( sal_Bool bVal ) { Flags.bTabDeleted = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsTabDeleted() const { return Flags.bTabDeleted; } + inline sal_Bool IsDeleted() const { return IsColDeleted() || IsRowDeleted() || IsTabDeleted(); } + + inline void SetFlag3D( sal_Bool bVal ) { Flags.bFlag3D = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsFlag3D() const { return Flags.bFlag3D; } + inline void SetRelName( sal_Bool bVal ) { Flags.bRelName = (bVal ? sal_True : sal_False ); } + inline sal_Bool IsRelName() const { return Flags.bRelName; } + + inline sal_Bool Valid() const; /// In external references nTab is -1 inline bool ValidExternal() const; void SmartRelAbs( const ScAddress& rPos ); void CalcRelFromAbs( const ScAddress& rPos ); void CalcAbsIfRel( const ScAddress& rPos ); - BOOL operator==( const ScSingleRefData& ) const; + sal_Bool operator==( const ScSingleRefData& ) const; bool operator!=( const ScSingleRefData& ) const; }; @@ -133,13 +133,13 @@ inline void ScSingleRefData::InitAddressRel( const ScAddress& rAdr, const ScAddress& rPos ) { InitAddress( rAdr.Col(), rAdr.Row(), rAdr.Tab()); - SetColRel( TRUE ); - SetRowRel( TRUE ); - SetTabRel( TRUE ); + SetColRel( sal_True ); + SetRowRel( sal_True ); + SetTabRel( sal_True ); CalcRelFromAbs( rPos ); } -inline BOOL ScSingleRefData::Valid() const +inline sal_Bool ScSingleRefData::Valid() const { return nCol >= 0 && nCol <= MAXCOL && nRow >= 0 && nRow <= MAXROW && @@ -183,9 +183,9 @@ struct ScComplexRefData // Complex reference (a range) into the sheet { Ref1.CalcRelFromAbs( rPos ); Ref2.CalcRelFromAbs( rPos ); } inline void CalcAbsIfRel( const ScAddress& rPos ) { Ref1.CalcAbsIfRel( rPos ); Ref2.CalcAbsIfRel( rPos ); } - inline BOOL IsDeleted() const + inline sal_Bool IsDeleted() const { return Ref1.IsDeleted() || Ref2.IsDeleted(); } - inline BOOL Valid() const + inline sal_Bool Valid() const { return Ref1.Valid() && Ref2.Valid(); } /** In external references nTab is -1 for the start tab and -1 for the end tab if one sheet, or >=0 if more than one sheets. */ @@ -193,7 +193,7 @@ struct ScComplexRefData // Complex reference (a range) into the sheet /// Absolute references have to be up-to-date when calling this! void PutInOrder(); - inline BOOL operator==( const ScComplexRefData& r ) const + inline sal_Bool operator==( const ScComplexRefData& r ) const { return Ref1 == r.Ref1 && Ref2 == r.Ref2; } /** Enlarge range if reference passed is not within existing range. ScAddress position is used to calculate absolute references from diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx index 2a8512848ef0..4ad28d354568 100644 --- a/sc/inc/refreshtimer.hxx +++ b/sc/inc/refreshtimer.hxx @@ -43,7 +43,7 @@ class ScRefreshTimerControl { private: ::vos::OMutex aMutex; - USHORT nBlockRefresh; + sal_uInt16 nBlockRefresh; public: #if SC_REFRESHTIMER_CONTROL_LIST @@ -52,14 +52,14 @@ public: ScRefreshTimerControl() : nBlockRefresh(0) {} - void SetAllowRefresh( BOOL b ) + void SetAllowRefresh( sal_Bool b ) { if ( b && nBlockRefresh ) --nBlockRefresh; - else if ( !b && nBlockRefresh < (USHORT)(~0) ) + else if ( !b && nBlockRefresh < (sal_uInt16)(~0) ) ++nBlockRefresh; } - BOOL IsRefreshAllowed() const { return !nBlockRefresh; } + sal_Bool IsRefreshAllowed() const { return !nBlockRefresh; } ::vos::OMutex& GetMutex() { return aMutex; } }; @@ -73,7 +73,7 @@ public: ~ScRefreshTimerProtector() { if ( ppControl && *ppControl ) - (*ppControl)->SetAllowRefresh( TRUE ); + (*ppControl)->SetAllowRefresh( sal_True ); } }; @@ -107,7 +107,7 @@ private: public: ScRefreshTimer() : ppControl(0) { SetTimeout( 0 ); } - ScRefreshTimer( ULONG nSeconds ) : ppControl(0) + ScRefreshTimer( sal_uLong nSeconds ) : ppControl(0) { SetTimeout( nSeconds * 1000 ); Start(); @@ -124,10 +124,10 @@ public: return *this; } - BOOL operator==( const ScRefreshTimer& r ) const + sal_Bool operator==( const ScRefreshTimer& r ) const { return GetTimeout() == r.GetTimeout(); } - BOOL operator!=( const ScRefreshTimer& r ) const + sal_Bool operator!=( const ScRefreshTimer& r ) const { return !ScRefreshTimer::operator==( r ); } void StartRefreshTimer() @@ -143,13 +143,13 @@ public: void SetRefreshHandler( const Link& rLink ) { SetTimeoutHdl( rLink ); } - ULONG GetRefreshDelay() const + sal_uLong GetRefreshDelay() const { return GetTimeout() / 1000; } void StopRefreshTimer() { Stop(); } - SC_DLLPUBLIC virtual void SetRefreshDelay( ULONG nSeconds ); + SC_DLLPUBLIC virtual void SetRefreshDelay( sal_uLong nSeconds ); SC_DLLPUBLIC virtual void Timeout(); }; diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 40711a200e19..247ee21fe76b 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -73,15 +73,15 @@ public: class AbstractScAutoFormatDlg : public VclAbstractDialog //add for ScAutoFormatDlg { public: - virtual USHORT GetIndex() const = 0 ; + virtual sal_uInt16 GetIndex() const = 0 ; virtual String GetCurrFormatName() = 0; }; class AbstractScColRowLabelDlg : public VclAbstractDialog //add for ScColRowLabelDlg { public: - virtual BOOL IsCol() = 0; - virtual BOOL IsRow() = 0; + virtual sal_Bool IsCol() = 0; + virtual sal_Bool IsRow() = 0; }; class AbstractScDataPilotDatabaseDlg :public VclAbstractDialog //add for ScDataPilotDatabaseDlg @@ -93,8 +93,8 @@ public: class AbstractScDataPilotSourceTypeDlg : public VclAbstractDialog //add for ScDataPilotSourceTypeDlg { public: - virtual BOOL IsDatabase() const = 0; - virtual BOOL IsExternal() const = 0; + virtual sal_Bool IsDatabase() const = 0; + virtual sal_Bool IsExternal() const = 0; }; class AbstractScDataPilotServiceDlg : public VclAbstractDialog //add for ScDataPilotServiceDlg @@ -117,7 +117,7 @@ class AbstractScDeleteContentsDlg: public VclAbstractDialog //add for ScDeleteC { public: virtual void DisableObjects() = 0 ; - virtual USHORT GetDelContentsCmdBits() const = 0; + virtual sal_uInt16 GetDelContentsCmdBits() const = 0; }; class AbstractScFillSeriesDlg: public VclAbstractDialog //add for ScFillSeriesDlg @@ -130,13 +130,13 @@ public: virtual double GetStep() const = 0; virtual double GetMax() const = 0; virtual String GetStartStr() const = 0; - virtual void SetEdStartValEnabled(BOOL bFlag=FALSE) = 0; + virtual void SetEdStartValEnabled(sal_Bool bFlag=sal_False) = 0; }; class AbstractScGroupDlg : public VclAbstractDialog //add for ScGroupDlg { public: - virtual BOOL GetColsChecked() const = 0; + virtual sal_Bool GetColsChecked() const = 0; }; class AbstractScInsertCellDlg : public VclAbstractDialog //add for ScInsertCellDlg @@ -148,14 +148,14 @@ public: class AbstractScInsertContentsDlg : public VclAbstractDialog //add for ScInsertContentsDlg { public: - virtual USHORT GetInsContentsCmdBits() const = 0; - virtual USHORT GetFormulaCmdBits() const = 0 ; - virtual BOOL IsSkipEmptyCells() const = 0; - virtual BOOL IsLink() const = 0; - virtual void SetFillMode( BOOL bSet ) = 0; - virtual void SetOtherDoc( BOOL bSet ) = 0; - virtual BOOL IsTranspose() const = 0; - virtual void SetChangeTrack( BOOL bSet ) = 0; + virtual sal_uInt16 GetInsContentsCmdBits() const = 0; + virtual sal_uInt16 GetFormulaCmdBits() const = 0 ; + virtual sal_Bool IsSkipEmptyCells() const = 0; + virtual sal_Bool IsLink() const = 0; + virtual void SetFillMode( sal_Bool bSet ) = 0; + virtual void SetOtherDoc( sal_Bool bSet ) = 0; + virtual sal_Bool IsTranspose() const = 0; + virtual void SetChangeTrack( sal_Bool bSet ) = 0; virtual void SetCellShiftDisabled( int nDisable ) = 0; virtual InsCellCmd GetMoveMode() = 0; }; @@ -163,13 +163,13 @@ public: class AbstractScInsertTableDlg : public VclAbstractDialog //add for ScInsertTableDlg { public: - virtual BOOL GetTablesFromFile() = 0; - virtual BOOL GetTablesAsLink() = 0; - virtual const String* GetFirstTable( USHORT* pN = NULL ) = 0; + virtual sal_Bool GetTablesFromFile() = 0; + virtual sal_Bool GetTablesAsLink() = 0; + virtual const String* GetFirstTable( sal_uInt16* pN = NULL ) = 0; virtual ScDocShell* GetDocShellTables() = 0; - virtual BOOL IsTableBefore() = 0; - virtual USHORT GetTableCount() = 0; - virtual const String* GetNextTable( USHORT* pN = NULL ) = 0; + virtual sal_Bool IsTableBefore() = 0; + virtual sal_uInt16 GetTableCount() = 0; + virtual const String* GetNextTable( sal_uInt16* pN = NULL ) = 0; }; @@ -184,12 +184,12 @@ class AbstractScLinkedAreaDlg : public VclAbstractDialog2 //add for ScLinkedAre public: virtual void InitFromOldLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - ULONG nRefresh ) = 0; + sal_uLong nRefresh ) = 0; virtual String GetURL() = 0; virtual String GetFilter() = 0; // may be empty virtual String GetOptions() = 0; // filter options virtual String GetSource() = 0; // separated by ";" - virtual ULONG GetRefresh() = 0; // 0 if disabled + virtual sal_uLong GetRefresh() = 0; // 0 if disabled }; class AbstractScMetricInputDlg : public VclAbstractDialog //add for ScMetricInputDlg @@ -201,17 +201,17 @@ public: class AbstractScMoveTableDlg : public VclAbstractDialog //add for ScMoveTableDlg { public: - virtual USHORT GetSelectedDocument () const = 0; - virtual USHORT GetSelectedTable () const = 0; - virtual BOOL GetCopyTable () const = 0; - virtual void SetCopyTable (BOOL bFlag=TRUE) = 0; - virtual void EnableCopyTable (BOOL bFlag=TRUE) = 0; + virtual sal_uInt16 GetSelectedDocument () const = 0; + virtual sal_uInt16 GetSelectedTable () const = 0; + virtual sal_Bool GetCopyTable () const = 0; + virtual void SetCopyTable (sal_Bool bFlag=sal_True) = 0; + virtual void EnableCopyTable (sal_Bool bFlag=sal_True) = 0; }; class AbstractScNameCreateDlg : public VclAbstractDialog //add for ScNameCreateDlg { public: - virtual USHORT GetFlags() const = 0; + virtual sal_uInt16 GetFlags() const = 0; }; class AbstractScNamePasteDlg : public VclAbstractDialog //add for ScNamePasteDlg @@ -229,14 +229,14 @@ public: class AbstractScDPFunctionDlg : public VclAbstractDialog //add for ScDPFunctionDlg { public: - virtual USHORT GetFuncMask() const = 0; + virtual sal_uInt16 GetFuncMask() const = 0; virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const = 0; }; class AbstractScDPSubtotalDlg : public VclAbstractDialog //add for ScDPSubtotalDlg { public: - virtual USHORT GetFuncMask() const = 0; + virtual sal_uInt16 GetFuncMask() const = 0; virtual void FillLabelData( ScDPLabelData& rLabelData ) const = 0; }; @@ -264,20 +264,20 @@ class AbstractScNewScenarioDlg : public VclAbstractDialog //add for ScNewScenar public: virtual void SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ) = 0; + const Color& rColor, sal_uInt16 nFlags ) = 0; virtual void GetScenarioData( String& rName, String& rComment, - Color& rColor, USHORT& rFlags ) const = 0; + Color& rColor, sal_uInt16& rFlags ) const = 0; }; class AbstractScShowTabDlg : public VclAbstractDialog //add for ScShowTabDlg { public: - virtual void Insert( const String& rString, BOOL bSelected ) = 0; - virtual USHORT GetSelectEntryCount() const = 0; + virtual void Insert( const String& rString, sal_Bool bSelected ) = 0; + virtual sal_uInt16 GetSelectEntryCount() const = 0; virtual void SetDescription(const String& rTitle, const String& rFixedText, const rtl::OString& nDlgHelpId, const rtl::OString& nLbHelpId ) = 0; - virtual String GetSelectEntry(USHORT nPos) const = 0; - virtual USHORT GetSelectEntryPos(USHORT nPos) const = 0; + virtual String GetSelectEntry(sal_uInt16 nPos) const = 0; + virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const = 0; }; class AbstractScStringInputDlg : public VclAbstractDialog //add for ScStringInputDlg @@ -324,27 +324,27 @@ public: int nId) = 0; virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg int nId, - BOOL bCol = FALSE, - BOOL bRow = FALSE) = 0; + sal_Bool bCol = sal_False, + sal_Bool bRow = sal_False) = 0; virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent, //add for ScColOrRowDlg const String& rStrTitle, const String& rStrLabel, int nId, - BOOL bColDefault = TRUE ) = 0; + sal_Bool bColDefault = sal_True ) = 0; virtual VclAbstractDialog * CreateScSortWarningDlg ( Window* pParent, const String& rExtendText, const String& rCurrentText, int nId ) = 0; //add for ScSortWarningDlg virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ) = 0; //add for ScDataPilotDatabaseDlg - virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, BOOL bEnableExternal, int nId ) = 0; //add for ScDataPilotSourceTypeDlg + virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, sal_Bool bEnableExternal, int nId ) = 0; //add for ScDataPilotSourceTypeDlg virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( Window* pParent, //add for ScDataPilotServiceDlg const com::sun::star::uno::Sequence& rServices, int nId ) = 0; - virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, BOOL bDisallowCellMove = FALSE ) = 0 ; //add for ScDeleteCellDlg + virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, sal_Bool bDisallowCellMove = sal_False ) = 0 ; //add for ScDeleteCellDlg virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg - USHORT nCheckDefaults = 0 ) = 0; + sal_uInt16 nCheckDefaults = 0 ) = 0; virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg ScDocument& rDocument, FillDir eFillDir, @@ -353,29 +353,29 @@ public: String aStartStr, double fStep, double fMax, - USHORT nPossDir, + sal_uInt16 nPossDir, int nId) = 0; virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg - USHORT nResId, + sal_uInt16 nResId, int nId, - BOOL bUnGroup = FALSE, - BOOL bRows = TRUE ) = 0; + sal_Bool bUnGroup = sal_False, + sal_Bool bRows = sal_True ) = 0; virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg int nId, - BOOL bDisallowCellMove = FALSE ) = 0; + sal_Bool bDisallowCellMove = sal_False ) = 0; virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg int nId, - USHORT nCheckDefaults = 0, + sal_uInt16 nCheckDefaults = 0, const String* pStrTitle = NULL ) = 0; virtual AbstractScInsertTableDlg * CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData, //add for ScInsertTableDlg SCTAB nTabCount, bool bFromFile, int nId) = 0; virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg - USHORT nResId, + sal_uInt16 nResId, const String& aTitle, const String& aLbTitle, List& aEntryList, @@ -383,12 +383,12 @@ public: virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg ( Window* pParent, int nId) = 0; //add for ScLinkedAreaDlg 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, @@ -396,13 +396,13 @@ public: virtual AbstractScMoveTableDlg * CreateScMoveTableDlg( Window* pParent, int nId ) = 0; //add for ScMoveTableDlg - virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ) = 0; //add for ScNameCreateDlg + virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ) = 0; //add for ScNameCreateDlg virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg - int nId , BOOL bInsList=TRUE ) = 0; + int nId , sal_Bool bInsList=sal_True ) = 0; virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg - const SfxItemSet& rArgSet, USHORT nSourceTab , int nId ) = 0; + const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ) = 0; virtual AbstractScDPFunctionDlg * CreateScDPFunctionDlg( Window* pParent, int nId, const ScDPLabelDataVec& rLabelVec, @@ -428,11 +428,11 @@ public: virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId, ScDPObject& rDPObj, - USHORT nOrient ) = 0; + sal_uInt16 nOrient ) = 0; virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const String& rName, //add for ScNewScenarioDlg int nId, - BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE ) = 0; + sal_Bool bEdit = sal_False, sal_Bool bSheetProtected = sal_False ) = 0; virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ) = 0; //add for ScShowTabDlg virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent, //add for ScStringInputDlg @@ -451,12 +451,12 @@ public: 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 ) = 0; + sal_Bool bMultiByte = sal_False, + sal_Bool bOnlyDbtoolsEncodings = sal_False, + sal_Bool bImport = sal_True ) = 0; virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame, //add for ScAttrDlg Window* pParent, @@ -468,11 +468,11 @@ public: const SfxItemSet& rCoreSet, const String& rPageStyle, int nId, - USHORT nResId = RID_SCDLG_HFEDIT ) = 0; + sal_uInt16 nResId = RID_SCDLG_HFEDIT ) = 0; virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,//add for ScStyleDlg SfxStyleSheetBase& rStyleBase, - USHORT nRscId, + sal_uInt16 nRscId, int nId) = 0; virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent, //add for ScSubTotalDlg @@ -495,8 +495,8 @@ public: virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg const SfxItemSet* pArgSet,int nId ) = 0; // for tabpage - virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0; - virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0; + virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0; + virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0; }; #endif diff --git a/sc/inc/scdll.hxx b/sc/inc/scdll.hxx index a10c794b9c43..fde9c31ed326 100644 --- a/sc/inc/scdll.hxx +++ b/sc/inc/scdll.hxx @@ -67,7 +67,7 @@ public: static void Init(); // called directly after loading the DLL static void Exit(); // called directly befor unloading the DLL - static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter, + static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ); }; diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index b788672aa715..971b32336e6c 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -38,7 +38,7 @@ class SvStream; class ScInterpreter; class SvNumberFormatter; -typedef BYTE ScMatValType; +typedef sal_uInt8 ScMatValType; const ScMatValType SC_MATVAL_VALUE = 0x00; const ScMatValType SC_MATVAL_BOOLEAN = 0x01; const ScMatValType SC_MATVAL_STRING = 0x02; @@ -55,7 +55,7 @@ union ScMatrixValue const String& GetString() const { return pS ? *pS : EMPTY_STRING; } /// Only valid if ScMatrix methods indicate that this is no string! - USHORT GetError() const { return GetDoubleErrorValue( fVal); } + sal_uInt16 GetError() const { return GetDoubleErrorValue( fVal); } /// Only valid if ScMatrix methods indicate that this is a boolean bool GetBoolean() const { return fVal != 0.; } @@ -94,9 +94,9 @@ class SC_DLLPUBLIC ScMatrix { ScMatrixValue* pMat; ScMatValType* mnValType; - ULONG mnNonValue; // how many strings and empties + sal_uLong mnNonValue; // how many strings and empties ScInterpreter* pErrorInterpreter; - mutable ULONG nRefCnt; // reference count + mutable sal_uLong nRefCnt; // reference count SCSIZE nColCount; SCSIZE nRowCount; bool mbCloneIfConst; // Whether the matrix is cloned with a CloneIfConst() call. @@ -107,7 +107,7 @@ class SC_DLLPUBLIC ScMatrix void Clear(); // pStr may be NULL, bFlag MUST NOT be 0 - void PutStringEntry( const String* pStr, BYTE bFlag, SCSIZE nIndex ); + void PutStringEntry( const String* pStr, sal_uInt8 bFlag, SCSIZE nIndex ); // only delete via Delete() ~ScMatrix(); @@ -116,7 +116,7 @@ class SC_DLLPUBLIC ScMatrix ScMatrix( const ScMatrix& ); ScMatrix& operator=( const ScMatrix&); - void SetErrorAtInterpreter( USHORT nError) const; + void SetErrorAtInterpreter( sal_uInt16 nError) const; public: @@ -278,12 +278,12 @@ public: void PutString( const String& rStr, SCSIZE nIndex); void PutEmpty( SCSIZE nC, SCSIZE nR); void PutEmpty( SCSIZE nIndex); - /// Jump FALSE without path + /// Jump sal_False without path void PutEmptyPath( SCSIZE nC, SCSIZE nR); void PutEmptyPath( SCSIZE nIndex); - void PutError( USHORT nErrorCode, SCSIZE nC, SCSIZE nR ) + void PutError( sal_uInt16 nErrorCode, SCSIZE nC, SCSIZE nR ) { PutDouble( CreateDoubleError( nErrorCode ), nC, nR ); } - void PutError( USHORT nErrorCode, SCSIZE nIndex ) + void PutError( sal_uInt16 nErrorCode, SCSIZE nIndex ) { PutDouble( CreateDoubleError( nErrorCode ), nIndex ); } void PutBoolean( bool bVal, SCSIZE nC, SCSIZE nR); void PutBoolean( bool bVal, SCSIZE nIndex); @@ -296,15 +296,15 @@ public: @ATTENTION: MUST NOT be used if the element is a string! Use GetErrorIfNotString() instead if not sure. @returns 0 if no error, else one of err... constants */ - USHORT GetError( SCSIZE nC, SCSIZE nR) const; - USHORT GetError( SCSIZE nIndex) const + sal_uInt16 GetError( SCSIZE nC, SCSIZE nR) const; + sal_uInt16 GetError( SCSIZE nIndex) const { return pMat[nIndex].GetError(); } /** Use in ScInterpreter to obtain the error code, if any. @returns 0 if no error or string element, else one of err... constants */ - USHORT GetErrorIfNotString( SCSIZE nC, SCSIZE nR) const + sal_uInt16 GetErrorIfNotString( SCSIZE nC, SCSIZE nR) const { return IsValue( nC, nR) ? GetError( nC, nR) : 0; } - USHORT GetErrorIfNotString( SCSIZE nIndex) const + sal_uInt16 GetErrorIfNotString( SCSIZE nIndex) const { return IsValue( nIndex) ? GetError( nIndex) : 0; } /// @return 0.0 if empty or empty path, else value or DoubleError. @@ -314,7 +314,7 @@ public: { if ( pErrorInterpreter ) { - USHORT nError = GetDoubleErrorValue( pMat[nIndex].fVal); + sal_uInt16 nError = GetDoubleErrorValue( pMat[nIndex].fVal); if ( nError ) SetErrorAtInterpreter( nError); } @@ -339,56 +339,56 @@ public: const ScMatrixValue* Get( SCSIZE nC, SCSIZE nR, ScMatValType& nType) const; /// @return if string or empty or empty path, in fact non-value. - BOOL IsString( SCSIZE nIndex ) const + sal_Bool IsString( SCSIZE nIndex ) const { return mnValType && IsNonValueType( mnValType[nIndex]); } /// @return if string or empty or empty path, in fact non-value. - BOOL IsString( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsString( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && IsNonValueType( mnValType[ nC * nRowCount + nR ]); } /// @return if empty or empty path. - BOOL IsEmpty( SCSIZE nIndex ) const + sal_Bool IsEmpty( SCSIZE nIndex ) const { return mnValType && ((mnValType[nIndex] & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY); } /// @return if empty or empty path. - BOOL IsEmpty( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsEmpty( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && ((mnValType[ nC * nRowCount + nR ] & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY); } /// @return if empty path. - BOOL IsEmptyPath( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && ((mnValType[ nC * nRowCount + nR ] & SC_MATVAL_EMPTYPATH) == SC_MATVAL_EMPTYPATH); } /// @return if empty path. - BOOL IsEmptyPath( SCSIZE nIndex ) const + sal_Bool IsEmptyPath( SCSIZE nIndex ) const { return mnValType && ((mnValType[nIndex] & SC_MATVAL_EMPTYPATH) == SC_MATVAL_EMPTYPATH); } /// @return if value or boolean. - BOOL IsValue( SCSIZE nIndex ) const + sal_Bool IsValue( SCSIZE nIndex ) const { return !mnValType || IsValueType( mnValType[nIndex]); } /// @return if value or boolean. - BOOL IsValue( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsValue( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return !mnValType || IsValueType( mnValType[ nC * nRowCount + nR ]); } /// @return if value or boolean or empty or empty path. - BOOL IsValueOrEmpty( SCSIZE nIndex ) const + sal_Bool IsValueOrEmpty( SCSIZE nIndex ) const { return !mnValType || IsValueType( mnValType[nIndex] ) || ((mnValType[nIndex] & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY); } /// @return if value or boolean or empty or empty path. - BOOL IsValueOrEmpty( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsValueOrEmpty( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return !mnValType || IsValueType( mnValType[ nC * nRowCount + nR ]) || @@ -397,18 +397,18 @@ public: } /// @return if boolean. - BOOL IsBoolean( SCSIZE nIndex ) const + sal_Bool IsBoolean( SCSIZE nIndex ) const { return mnValType && IsBooleanType( mnValType[nIndex]); } /// @return if boolean. - BOOL IsBoolean( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsBoolean( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && IsBooleanType( mnValType[ nC * nRowCount + nR ]); } /// @return if entire matrix is numeric, including booleans, with no strings or empties - BOOL IsNumeric() const + sal_Bool IsNumeric() const { return 0 == mnNonValue; } void MatTrans( ScMatrix& mRes) const; diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index e1d9ab0fd4b9..b4ec23838225 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -139,15 +139,15 @@ class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener SfxErrorHandler* pErrorHdl; SvxErrorHandler* pSvxErrorHdl; ScFormEditData* pFormEditData; - USHORT nCurRefDlgId; - BOOL bIsWaterCan; - BOOL bIsInEditCommand; - BOOL bIsInExecuteDrop; + sal_uInt16 nCurRefDlgId; + sal_Bool bIsWaterCan; + sal_Bool bIsInEditCommand; + sal_Bool bIsInExecuteDrop; bool mbIsInSharedDocLoading; bool mbIsInSharedDocSaving; //Added by PengYunQuan for Validity Cell Range Picker public: SFX_DECL_INTERFACE(SCID_APP) @@ -189,14 +189,14 @@ public: ScSelectionTransferObj* GetSelectionTransfer() const { return pSelTransfer; } void SetSelectionTransfer( ScSelectionTransferObj* pNew ); - void SetWaterCan( BOOL bNew ) { bIsWaterCan = bNew; } - BOOL GetIsWaterCan() const { return bIsWaterCan; } + void SetWaterCan( sal_Bool bNew ) { bIsWaterCan = bNew; } + sal_Bool GetIsWaterCan() const { return bIsWaterCan; } - void SetInEditCommand( BOOL bNew ) { bIsInEditCommand = bNew; } - BOOL IsInEditCommand() const { return bIsInEditCommand; } + void SetInEditCommand( sal_Bool bNew ) { bIsInEditCommand = bNew; } + sal_Bool IsInEditCommand() const { return bIsInEditCommand; } - void SetInExecuteDrop( BOOL bNew ) { bIsInExecuteDrop = bNew; } - BOOL IsInExecuteDrop() const { return bIsInExecuteDrop; } + void SetInExecuteDrop( sal_Bool bNew ) { bIsInExecuteDrop = bNew; } + sal_Bool IsInExecuteDrop() const { return bIsInExecuteDrop; } // Options: const ScViewOptions& GetViewOptions (); @@ -209,15 +209,15 @@ SC_DLLPUBLIC const ScPrintOptions& GetPrintOptions (); SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rOpt ); void SetInputOptions ( const ScInputOptions& rOpt ); void SetPrintOptions ( const ScPrintOptions& rOpt ); - void InsertEntryToLRUList(USHORT nFIndex); + void InsertEntryToLRUList(sal_uInt16 nFIndex); void RecentFunctionsChanged(); - static void GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang, - BOOL& rAutoSpell ); - static void SetAutoSpellProperty( BOOL bSet ); - static BOOL HasThesaurusLanguage( USHORT nLang ); + static void GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang, + sal_Bool& rAutoSpell ); + static void SetAutoSpellProperty( sal_Bool bSet ); + static sal_Bool HasThesaurusLanguage( sal_uInt16 nLang ); - USHORT GetOptDigitLanguage(); // from CTL options + sal_uInt16 GetOptDigitLanguage(); // from CTL options ScNavipiCfg& GetNavipiCfg(); ScAddInCfg& GetAddInCfg(); @@ -229,15 +229,15 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO void ModifyOptions( const SfxItemSet& rOptSet ); // InputHandler: - BOOL IsEditMode(); // nicht bei SC_INPUT_TYPE - BOOL IsInputMode(); // auch bei SC_INPUT_TYPE + sal_Bool IsEditMode(); // nicht bei SC_INPUT_TYPE + sal_Bool IsInputMode(); // auch bei SC_INPUT_TYPE void SetInputMode( ScInputMode eMode ); - BOOL InputKeyEvent( const KeyEvent& rKEvt, BOOL bStartEdit = FALSE ); - SC_DLLPUBLIC void InputEnterHandler( BYTE nBlockMode = 0 ); + sal_Bool InputKeyEvent( const KeyEvent& rKEvt, sal_Bool bStartEdit = sal_False ); + SC_DLLPUBLIC void InputEnterHandler( sal_uInt8 nBlockMode = 0 ); void InputCancelHandler(); void InputSelection( EditView* pView ); void InputChanged( EditView* pView ); - ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = NULL, BOOL bUseRef = TRUE ); + ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = NULL, sal_Bool bUseRef = sal_True ); void SetRefInputHdl( ScInputHandler* pNew ); ScInputHandler* GetRefInputHdl(); @@ -250,7 +250,7 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO void InputReplaceSelection( const String& rStr ); String InputGetFormulaStr(); void ActivateInputWindow( const String* pStr = NULL, - BOOL bMatrix = FALSE ); + sal_Bool bMatrix = sal_False ); void InitFormEditData(); void ClearFormEditData(); @@ -258,33 +258,33 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO // Referenzeingabe: //Added by PengYunQuan for Validity Cell Range Picker - BOOL IsModalMode(SfxObjectShell* pDocSh = NULL); - BOOL IsFormulaMode(); - BOOL IsRefDialogOpen(); - BOOL IsTableLocked(); + sal_Bool IsModalMode(SfxObjectShell* pDocSh = NULL); + sal_Bool IsFormulaMode(); + sal_Bool IsRefDialogOpen(); + sal_Bool IsTableLocked(); void SetReference( const ScRange& rRef, ScDocument* pDoc, const ScMarkData* pMarkData = NULL ); void AddRefEntry(); void EndReference(); - USHORT GetCurRefDlgId() const { return nCurRefDlgId; } + sal_uInt16 GetCurRefDlgId() const { return nCurRefDlgId; } //virtuelle Methoden fuer den Optionendialog - virtual SfxItemSet* CreateItemSet( USHORT nId ); - virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet ); - virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ); + virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ); + virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ); + virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet ); void SetInSharedDocLoading( bool bNew ) { mbIsInSharedDocLoading = bNew; } bool IsInSharedDocLoading() const { return mbIsInSharedDocLoading; } void SetInSharedDocSaving( bool bNew ) { mbIsInSharedDocSaving = bNew; } bool IsInSharedDocSaving() const { return mbIsInSharedDocSaving; } - SC_DLLPUBLIC BOOL RegisterRefWindow( USHORT nSlotId, Window *pWnd ); - SC_DLLPUBLIC BOOL UnregisterRefWindow( USHORT nSlotId, Window *pWnd ); - SC_DLLPUBLIC BOOL IsAliveRefDlg( USHORT nSlotId, Window *pWnd ); - SC_DLLPUBLIC Window * Find1RefWindow( USHORT nSlotId, Window *pWndAncestor ); + SC_DLLPUBLIC sal_Bool RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ); + SC_DLLPUBLIC sal_Bool UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ); + SC_DLLPUBLIC sal_Bool IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd ); + SC_DLLPUBLIC Window * Find1RefWindow( sal_uInt16 nSlotId, Window *pWndAncestor ); SC_DLLPUBLIC Window * Find1RefWindow( Window *pWndAncestor ); }; diff --git a/sc/inc/scresid.hxx b/sc/inc/scresid.hxx index 067e5f03e307..660404bda5a9 100644 --- a/sc/inc/scresid.hxx +++ b/sc/inc/scresid.hxx @@ -36,7 +36,7 @@ class SC_DLLPUBLIC ScResId : public ResId { public: - ScResId( USHORT nId ); // in scdll.cxx + ScResId( sal_uInt16 nId ); // in scdll.cxx }; diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx index ddbbf3108daf..74ae321bd409 100644 --- a/sc/inc/shapeuno.hxx +++ b/sc/inc/shapeuno.hxx @@ -76,7 +76,7 @@ private: ::com::sun::star::beans::XPropertyState* pShapePropertyState; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > mxPropSetInfo; com::sun::star::uno::Sequence< sal_Int8 >* pImplementationId; - BOOL bIsTextShape; + sal_Bool bIsTextShape; bool bInitializedNotifier; SdrObject* GetSdrObject() const throw(); diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx index 650293893678..862d0271e617 100644 --- a/sc/inc/sortparam.hxx +++ b/sc/inc/sortparam.hxx @@ -46,22 +46,22 @@ struct SC_DLLPUBLIC ScSortParam SCROW nRow1; SCCOL nCol2; SCROW nRow2; - BOOL bHasHeader; - BOOL bByRow; - BOOL bCaseSens; - BOOL bUserDef; - USHORT nUserIndex; - BOOL bIncludePattern; - BOOL bInplace; + sal_Bool bHasHeader; + sal_Bool bByRow; + sal_Bool bCaseSens; + sal_Bool bUserDef; + sal_uInt16 nUserIndex; + sal_Bool bIncludePattern; + sal_Bool bInplace; SCTAB nDestTab; SCCOL nDestCol; SCROW nDestRow; - BOOL bDoSort[MAXSORT]; + sal_Bool bDoSort[MAXSORT]; SCCOLROW nField[MAXSORT]; - BOOL bAscending[MAXSORT]; + sal_Bool bAscending[MAXSORT]; ::com::sun::star::lang::Locale aCollatorLocale; String aCollatorAlgorithm; - USHORT nCompatHeader; + sal_uInt16 nCompatHeader; ScSortParam(); ScSortParam( const ScSortParam& r ); @@ -71,7 +71,7 @@ struct SC_DLLPUBLIC ScSortParam ScSortParam( const ScQueryParam&, SCCOL nCol ); ScSortParam& operator= ( const ScSortParam& r ); - BOOL operator== ( const ScSortParam& rOther ) const; + sal_Bool operator== ( const ScSortParam& rOther ) const; void Clear (); void MoveToDest(); diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx index 946a861231d9..81352c0a989e 100644 --- a/sc/inc/stlpool.hxx +++ b/sc/inc/stlpool.hxx @@ -64,7 +64,7 @@ public: const String* GetForceStdName() const { return pForceStdName; } virtual SfxStyleSheetBase& Make( const String&, SfxStyleFamily eFam, - USHORT nMask = 0xffff, USHORT nPos = 0xffff ); + sal_uInt16 nMask = 0xffff, sal_uInt16 nPos = 0xffff ); protected: virtual ~ScStyleSheetPool(); @@ -73,7 +73,7 @@ protected: virtual SfxStyleSheetBase* Create( const String& rName, SfxStyleFamily eFamily, - USHORT nMask); + sal_uInt16 nMask); virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& rStyle ); private: diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx index 4e42be6e2563..087bf44d3b51 100644 --- a/sc/inc/stlsheet.hxx +++ b/sc/inc/stlsheet.hxx @@ -59,17 +59,17 @@ public: ScStyleSheet( const ScStyleSheet& rStyle ); - virtual BOOL SetParent ( const String& rParentName ); + virtual sal_Bool SetParent ( const String& rParentName ); virtual SfxItemSet& GetItemSet (); - virtual BOOL IsUsed () const; - virtual BOOL HasFollowSupport () const; - virtual BOOL HasParentSupport () const; + virtual sal_Bool IsUsed () const; + virtual sal_Bool HasFollowSupport () const; + virtual sal_Bool HasParentSupport () const; virtual const String& GetName() const; virtual const String& GetParent() const; virtual const String& GetFollow() const; - virtual BOOL SetName( const String& ); + virtual sal_Bool SetName( const String& ); void SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; } @@ -82,7 +82,7 @@ protected: ScStyleSheet( const String& rName, ScStyleSheetPool& rPool, SfxStyleFamily eFamily, - USHORT nMask ); + sal_uInt16 nMask ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); }; diff --git a/sc/inc/strload.hxx b/sc/inc/strload.hxx index 6b44d8e4e3ef..311d8fe05b05 100644 --- a/sc/inc/strload.hxx +++ b/sc/inc/strload.hxx @@ -34,7 +34,7 @@ class ScRscStrLoader : public Resource { public: - ScRscStrLoader( USHORT nRsc, USHORT nStrId ) : + ScRscStrLoader( sal_uInt16 nRsc, sal_uInt16 nStrId ) : Resource( ScResId( nRsc ) ), theStr( ScResId( nStrId ) ) { FreeResource(); diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx index a1dee10fd75d..8f9aa2ff0ab1 100644 --- a/sc/inc/styleuno.hxx +++ b/sc/inc/styleuno.hxx @@ -56,8 +56,8 @@ class ScStyleObj; class ScStyleNameConversion { public: - static String DisplayToProgrammaticName( const String& rDispName, UINT16 nType ); - static String ProgrammaticToDisplayName( const String& rProgName, UINT16 nType ); + static String DisplayToProgrammaticName( const String& rDispName, sal_uInt16 nType ); + static String ProgrammaticToDisplayName( const String& rProgName, sal_uInt16 nType ); }; @@ -71,8 +71,8 @@ class ScStyleFamiliesObj : public ::cppu::WeakImplHelper4< private: ScDocShell* pDocShell; - ScStyleFamilyObj* GetObjectByType_Impl(UINT16 Type) const; - ScStyleFamilyObj* GetObjectByIndex_Impl(UINT32 nIndex) const; + ScStyleFamilyObj* GetObjectByType_Impl(sal_uInt16 Type) const; + ScStyleFamilyObj* GetObjectByIndex_Impl(sal_uInt32 nIndex) const; ScStyleFamilyObj* GetObjectByName_Impl(const rtl::OUString& aName) const; public: @@ -133,7 +133,7 @@ private: ScDocShell* pDocShell; SfxStyleFamily eFamily; // Familie - ScStyleObj* GetObjectByIndex_Impl(UINT32 nIndex); + ScStyleObj* GetObjectByIndex_Impl(sal_uInt32 nIndex); ScStyleObj* GetObjectByName_Impl(const rtl::OUString& Name); public: diff --git a/sc/inc/subtotal.hxx b/sc/inc/subtotal.hxx index 4349c2759ae9..5a413c95e5ee 100644 --- a/sc/inc/subtotal.hxx +++ b/sc/inc/subtotal.hxx @@ -34,9 +34,9 @@ class SubTotal { public: - static BOOL SafePlus( double& fVal1, double fVal2); - static BOOL SafeMult( double& fVal1, double fVal2); - static BOOL SafeDiv( double& fVal1, double fVal2); + static sal_Bool SafePlus( double& fVal1, double fVal2); + static sal_Bool SafeMult( double& fVal1, double fVal2); + static sal_Bool SafeDiv( double& fVal1, double fVal2); }; @@ -45,10 +45,10 @@ struct ScFunctionData // zum Berechnen von einzelnen Funktione ScSubTotalFunc eFunc; double nVal; long nCount; - BOOL bError; + sal_Bool bError; ScFunctionData( ScSubTotalFunc eFn ) : - eFunc(eFn), nVal(0.0), nCount(0), bError(FALSE) {} + eFunc(eFn), nVal(0.0), nCount(0), bError(sal_False) {} }; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 63cefe22626a..2502c7c36ebd 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -100,20 +100,20 @@ private: String aName; String aCodeName; String aComment; - BOOL bScenario; - BOOL bLayoutRTL; - BOOL bLoadingRTL; + sal_Bool bScenario; + sal_Bool bLayoutRTL; + sal_Bool bLoadingRTL; String aLinkDoc; String aLinkFlt; String aLinkOpt; String aLinkTab; - ULONG nLinkRefreshDelay; - BYTE nLinkMode; + sal_uLong nLinkRefreshDelay; + sal_uInt8 nLinkMode; // Seitenformatvorlage String aPageStyle; - BOOL bPageSizeValid; + sal_Bool bPageSizeValid; Size aPageSizeTwips; // Groesse der Druck-Seite SCCOL nRepeatStartX; // Wiederholungszeilen/Spalten SCCOL nRepeatEndX; // REPEAT_NONE, wenn nicht benutzt @@ -122,11 +122,11 @@ private: ::std::auto_ptr pTabProtection; - USHORT* pColWidth; + sal_uInt16* pColWidth; ::boost::shared_ptr mpRowHeights; - BYTE* pColFlags; - ScBitMaskCompressedArray< SCROW, BYTE>* pRowFlags; + sal_uInt8* pColFlags; + ScBitMaskCompressedArray< SCROW, sal_uInt8>* pRowFlags; ::boost::shared_ptr mpHiddenCols; ::boost::shared_ptr mpHiddenRows; ::boost::shared_ptr mpFilteredCols; @@ -143,16 +143,16 @@ private: SCCOL nTableAreaX; SCROW nTableAreaY; - BOOL bTableAreaValid; + sal_Bool bTableAreaValid; // interne Verwaltung ------------------ - BOOL bVisible; - BOOL bStreamValid; - BOOL bPendingRowHeights; - BOOL bCalcNotification; + sal_Bool bVisible; + sal_Bool bStreamValid; + sal_Bool bPendingRowHeights; + sal_Bool bCalcNotification; SCTAB nTab; - USHORT nRecalcLvl; // Rekursionslevel Size-Recalc + sal_uInt16 nRecalcLvl; // Rekursionslevel Size-Recalc ScDocument* pDocument; utl::SearchParam* pSearchParam; utl::TextSearch* pSearchText; @@ -164,22 +164,22 @@ private: // SortierParameter um den Stackbedarf von Quicksort zu Minimieren ScSortParam aSortParam; CollatorWrapper* pSortCollator; - BOOL bGlobalKeepQuery; - BOOL bSharedNameInserted; + sal_Bool bGlobalKeepQuery; + sal_Bool bSharedNameInserted; ScRangeVec aPrintRanges; - BOOL bPrintEntireSheet; + sal_Bool bPrintEntireSheet; ScRange* pRepeatColRange; ScRange* pRepeatRowRange; - USHORT nLockCount; + sal_uInt16 nLockCount; ScRangeList* pScenarioRanges; Color aScenarioColor; Color aTabBgColor; - USHORT nScenarioFlags; - BOOL bActiveScenario; + sal_uInt16 nScenarioFlags; + sal_Bool bActiveScenario; bool mbPageBreaksValid; friend class ScDocument; // fuer FillInfo @@ -196,68 +196,68 @@ friend class ScAttrRectIterator; public: ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName, - BOOL bColInfo = TRUE, BOOL bRowInfo = TRUE ); + sal_Bool bColInfo = sal_True, sal_Bool bRowInfo = sal_True ); ~ScTable(); ScOutlineTable* GetOutlineTable() { return pOutlineTable; } SCSIZE GetCellCount(SCCOL nCol) const; - ULONG GetCellCount() const; - ULONG GetWeightedCount() const; - ULONG GetCodeCount() const; // RPN-Code in Formeln + sal_uLong GetCellCount() const; + sal_uLong GetWeightedCount() const; + sal_uLong GetCodeCount() const; // RPN-Code in Formeln - BOOL SetOutlineTable( const ScOutlineTable* pNewOutline ); + sal_Bool SetOutlineTable( const ScOutlineTable* pNewOutline ); void StartOutlineTable(); void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); - BOOL TestRemoveSubTotals( const ScSubTotalParam& rParam ); + sal_Bool TestRemoveSubTotals( const ScSubTotalParam& rParam ); void RemoveSubTotals( ScSubTotalParam& rParam ); - BOOL DoSubTotals( ScSubTotalParam& rParam ); + sal_Bool DoSubTotals( ScSubTotalParam& rParam ); const ScSheetEvents* GetSheetEvents() const { return pSheetEvents; } void SetSheetEvents( const ScSheetEvents* pNew ); - BOOL IsVisible() const { return bVisible; } - void SetVisible( BOOL bVis ); + sal_Bool IsVisible() const { return bVisible; } + void SetVisible( sal_Bool bVis ); - BOOL IsStreamValid() const { return bStreamValid; } - void SetStreamValid( BOOL bSet, BOOL bIgnoreLock = FALSE ); + sal_Bool IsStreamValid() const { return bStreamValid; } + void SetStreamValid( sal_Bool bSet, sal_Bool bIgnoreLock = sal_False ); - BOOL IsPendingRowHeights() const { return bPendingRowHeights; } - void SetPendingRowHeights( BOOL bSet ); + sal_Bool IsPendingRowHeights() const { return bPendingRowHeights; } + void SetPendingRowHeights( sal_Bool bSet ); - BOOL GetCalcNotification() const { return bCalcNotification; } - void SetCalcNotification( BOOL bSet ); + sal_Bool GetCalcNotification() const { return bCalcNotification; } + void SetCalcNotification( sal_Bool bSet ); - BOOL IsLayoutRTL() const { return bLayoutRTL; } - BOOL IsLoadingRTL() const { return bLoadingRTL; } - void SetLayoutRTL( BOOL bSet ); - void SetLoadingRTL( BOOL bSet ); + sal_Bool IsLayoutRTL() const { return bLayoutRTL; } + sal_Bool IsLoadingRTL() const { return bLoadingRTL; } + void SetLayoutRTL( sal_Bool bSet ); + void SetLoadingRTL( sal_Bool bSet ); - BOOL IsScenario() const { return bScenario; } - void SetScenario( BOOL bFlag ); + sal_Bool IsScenario() const { return bScenario; } + void SetScenario( sal_Bool bFlag ); void GetScenarioComment( String& rComment) const { rComment = aComment; } void SetScenarioComment( const String& rComment ) { aComment = rComment; } const Color& GetScenarioColor() const { return aScenarioColor; } void SetScenarioColor(const Color& rNew) { aScenarioColor = rNew; } const Color& GetTabBgColor() const; void SetTabBgColor(const Color& rColor); - USHORT GetScenarioFlags() const { return nScenarioFlags; } - void SetScenarioFlags(USHORT nNew) { nScenarioFlags = nNew; } - void SetActiveScenario(BOOL bSet) { bActiveScenario = bSet; } - BOOL IsActiveScenario() const { return bActiveScenario; } + sal_uInt16 GetScenarioFlags() const { return nScenarioFlags; } + void SetScenarioFlags(sal_uInt16 nNew) { nScenarioFlags = nNew; } + void SetActiveScenario(sal_Bool bSet) { bActiveScenario = bSet; } + sal_Bool IsActiveScenario() const { return bActiveScenario; } - BYTE GetLinkMode() const { return nLinkMode; } - BOOL IsLinked() const { return nLinkMode != SC_LINK_NONE; } + sal_uInt8 GetLinkMode() const { return nLinkMode; } + sal_Bool IsLinked() const { return nLinkMode != SC_LINK_NONE; } const String& GetLinkDoc() const { return aLinkDoc; } const String& GetLinkFlt() const { return aLinkFlt; } const String& GetLinkOpt() const { return aLinkOpt; } const String& GetLinkTab() const { return aLinkTab; } - ULONG GetLinkRefreshDelay() const { return nLinkRefreshDelay; } + sal_uLong GetLinkRefreshDelay() const { return nLinkRefreshDelay; } - void SetLink( BYTE nMode, const String& rDoc, const String& rFlt, - const String& rOpt, const String& rTab, ULONG nRefreshDelay ); + void SetLink( sal_uInt8 nMode, const String& rDoc, const String& rFlt, + const String& rOpt, const String& rTab, sal_uLong nRefreshDelay ); void GetName( String& rName ) const; void SetName( const String& rNewName ); @@ -271,7 +271,7 @@ public: void SetPageStyle( const String& rName ); void PageStyleModified( const String& rNewName ); - BOOL IsProtected() const; + sal_Bool IsProtected() const; void SetProtection(const ScTableProtection* pProtect); ScTableProtection* GetProtection(); @@ -284,25 +284,25 @@ public: void LockTable(); void UnlockTable(); - BOOL IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, - SCROW nRow2, BOOL* pOnlyNotBecauseOfMatrix = NULL ) const; - BOOL IsSelectionEditable( const ScMarkData& rMark, - BOOL* pOnlyNotBecauseOfMatrix = NULL ) const; + sal_Bool IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, + SCROW nRow2, sal_Bool* pOnlyNotBecauseOfMatrix = NULL ) const; + sal_Bool IsSelectionEditable( const ScMarkData& rMark, + sal_Bool* pOnlyNotBecauseOfMatrix = NULL ) const; - BOOL HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const; - BOOL HasSelectionMatrixFragment( const ScMarkData& rMark ) const; + sal_Bool HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const; + sal_Bool HasSelectionMatrixFragment( const ScMarkData& rMark ) const; - BOOL IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const; + sal_Bool IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const; void PutCell( const ScAddress&, ScBaseCell* pCell ); -//UNUSED2009-05 void PutCell( const ScAddress&, ULONG nFormatIndex, ScBaseCell* pCell); +//UNUSED2009-05 void PutCell( const ScAddress&, sal_uLong nFormatIndex, ScBaseCell* pCell); void PutCell( SCCOL nCol, SCROW nRow, ScBaseCell* pCell ); - void PutCell(SCCOL nCol, SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell); - // TRUE = Zahlformat gesetzt - BOOL SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, + void PutCell(SCCOL nCol, SCROW nRow, sal_uLong nFormatIndex, ScBaseCell* pCell); + // sal_True = Zahlformat gesetzt + sal_Bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, SvNumberFormatter* pFormatter = NULL, bool bDetectNumberFormat = true ); void SetValue( SCCOL nCol, SCROW nRow, const double& rVal ); - void SetError( SCCOL nCol, SCROW nRow, USHORT nError); + void SetError( SCCOL nCol, SCROW nRow, sal_uInt16 nError); void GetString( SCCOL nCol, SCROW nRow, String& rString ); void GetInputString( SCCOL nCol, SCROW nRow, String& rString ); @@ -314,7 +314,7 @@ public: } double GetValue( SCCOL nCol, SCROW nRow ); void GetFormula( SCCOL nCol, SCROW nRow, String& rFormula, - BOOL bAsciiExport = FALSE ); + sal_Bool bAsciiExport = sal_False ); CellType GetCellType( const ScAddress& rPos ) const { @@ -346,53 +346,53 @@ public: @param bForced True = always create all captions, false = skip when Undo is disabled. */ void InitializeNoteCaptions( bool bForced = false ); - BOOL TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize ); + sal_Bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize ); void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ); void DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize, - BOOL* pUndoOutline = NULL ); + sal_Bool* pUndoOutline = NULL ); - BOOL TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ); + sal_Bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ); void InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ); void DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, - BOOL* pUndoOutline = NULL ); + sal_Bool* pUndoOutline = NULL ); - void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nDelFlag); + void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nDelFlag); void CopyToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTable, - BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions); + sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions); void CopyToClip(const ScRangeList& rRanges, ScTable* pTable, bool bKeepScenarioFlags, bool bCloneNoteCaptions); void CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCsCOL nDx, SCsROW nDy, - USHORT nInsFlag, BOOL bAsLink, BOOL bSkipAttrForEmpty, ScTable* pTable); + sal_uInt16 nInsFlag, sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty, ScTable* pTable); void StartListeningInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void BroadcastInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void 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 = NULL, - BOOL bAsLink = FALSE, BOOL bColRowFlags = TRUE); + sal_Bool bAsLink = sal_False, sal_Bool bColRowFlags = sal_True); void 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 = NULL); void TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - ScTable* pTransClip, USHORT nFlags, BOOL bAsLink ); + ScTable* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink ); // Markierung von diesem Dokument - void MixMarked( const ScMarkData& rMark, USHORT nFunction, - BOOL bSkipEmpty, ScTable* pSrcTab ); + void MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction, + sal_Bool bSkipEmpty, ScTable* pSrcTab ); void MixData( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - USHORT nFunction, BOOL bSkipEmpty, ScTable* pSrcTab ); + sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScTable* pSrcTab ); void CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab ); void CopyScenarioFrom( const ScTable* pSrcTab ); void CopyScenarioTo( ScTable* pDestTab ) const; - BOOL TestCopyScenarioTo( const ScTable* pDestTab ) const; - void MarkScenarioIn( ScMarkData& rMark, USHORT nNeededBits ) const; - BOOL HasScenarioRange( const ScRange& rRange ) const; + sal_Bool TestCopyScenarioTo( const ScTable* pDestTab ) const; + void MarkScenarioIn( ScMarkData& rMark, sal_uInt16 nNeededBits ) const; + sal_Bool HasScenarioRange( const ScRange& rRange ) const; void InvalidateScenarioRanges(); const ScRangeList* GetScenarioRanges() const; @@ -401,21 +401,21 @@ public: void InvalidateTableArea(); void InvalidatePageBreaks(); - BOOL GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const; // FALSE = leer - BOOL GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const; - BOOL GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const; - BOOL GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow, - SCCOL& rEndCol, BOOL bNotes ) const; - BOOL GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol, - SCROW& rEndRow, BOOL bNotes ) const; + sal_Bool GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const; // sal_False = leer + sal_Bool GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const; + sal_Bool GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bNotes ) const; + sal_Bool GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow, + SCCOL& rEndCol, sal_Bool bNotes ) const; + sal_Bool GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol, + SCROW& rEndRow, sal_Bool bNotes ) const; - BOOL GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const; + sal_Bool GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const; void ExtendPrintArea( OutputDevice* pDev, SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow ); void GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, - BOOL bIncludeOld, bool bOnlyDown ) const; + sal_Bool bIncludeOld, bool bOnlyDown ) const; bool ShrinkToUsedDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const; @@ -424,24 +424,24 @@ public: void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY ); void 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 ); void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ); - BOOL HasData( SCCOL nCol, SCROW nRow ); - BOOL HasStringData( SCCOL nCol, SCROW nRow ); - BOOL HasValueData( SCCOL nCol, SCROW nRow ); -//UNUSED2008-05 USHORT GetErrorData(SCCOL nCol, SCROW nRow) const; - BOOL HasStringCells( SCCOL nStartCol, SCROW nStartRow, + sal_Bool HasData( SCCOL nCol, SCROW nRow ); + sal_Bool HasStringData( SCCOL nCol, SCROW nRow ); + sal_Bool HasValueData( SCCOL nCol, SCROW nRow ); +//UNUSED2008-05 sal_uInt16 GetErrorData(SCCOL nCol, SCROW nRow) const; + sal_Bool HasStringCells( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const; - USHORT GetErrCode( const ScAddress& rPos ) const + sal_uInt16 GetErrCode( const ScAddress& rPos ) const { return ValidColRow(rPos.Col(),rPos.Row()) ? aCol[rPos.Col()].GetErrCode( rPos.Row() ) : 0; } -//UNUSED2008-05 USHORT GetErrCode( SCCOL nCol, SCROW nRow ) const; +//UNUSED2008-05 sal_uInt16 GetErrCode( SCCOL nCol, SCROW nRow ) const; void ResetChanged( const ScRange& rRange ); @@ -458,7 +458,7 @@ public: void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - ScDocument* pUndoDoc = NULL, BOOL bIncludeDraw = TRUE, bool bUpdateNoteCaptionPos = true ); + ScDocument* pUndoDoc = NULL, sal_Bool bIncludeDraw = sal_True, bool bUpdateNoteCaptionPos = true ); void UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, @@ -471,18 +471,18 @@ public: void UpdateInsertTab(SCTAB nTable); //UNUSED2008-05 void UpdateInsertTabOnlyCells(SCTAB nTable); - void UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScTable* pRefUndo = NULL ); + void UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo = NULL ); void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo, ScProgress& ); - void UpdateCompile( BOOL bForceIfNameInUse = FALSE ); + void UpdateCompile( sal_Bool bForceIfNameInUse = sal_False ); void SetTabNo(SCTAB nNewTab); - BOOL IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - USHORT nIndex) const; + sal_Bool IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + sal_uInt16 nIndex) const; void FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - std::set& rIndexes) const; + std::set& rIndexes) const; void ReplaceRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScRangeData::IndexMap& rMap ); void 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); String GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ); @@ -491,10 +491,10 @@ public: const ScMarkData& rMark ); void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - USHORT nFormatNo ); + sal_uInt16 nFormatNo ); void GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData& rData); void ScReplaceTabsStr( String& rStr, const String& rSrch, const String& rRepl ); // aus sw - BOOL SearchAndReplace(const SvxSearchItem& rSearchItem, + sal_Bool SearchAndReplace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc); @@ -504,27 +504,27 @@ public: const SvxBorderLine** ppLeft, const SvxBorderLine** ppTop, const SvxBorderLine** ppRight, const SvxBorderLine** ppBottom ) const; -//UNUSED2009-05 BOOL HasLines( const ScRange& rRange, Rectangle& rSizes ) const; - bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nMask ) const; - BOOL HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const; - BOOL ExtendMerge( SCCOL nStartCol, SCROW nStartRow, +//UNUSED2009-05 sal_Bool HasLines( const ScRange& rRange, Rectangle& rSizes ) const; + bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nMask ) const; + sal_Bool HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const; + sal_Bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, - BOOL bRefresh, BOOL bAttrs ); - const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, USHORT nWhich ) const; + sal_Bool bRefresh, sal_Bool bAttrs ); + const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const; const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow ) const; const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const; - ULONG GetNumberFormat( const ScAddress& rPos ) const + sal_uLong GetNumberFormat( const ScAddress& rPos ) const { return ValidColRow(rPos.Col(),rPos.Row()) ? aCol[rPos.Col()].GetNumberFormat( rPos.Row() ) : 0; } - ULONG GetNumberFormat( SCCOL nCol, SCROW nRow ) const; + sal_uLong GetNumberFormat( SCCOL nCol, SCROW nRow ) const; void MergeSelectionPattern( ScMergePatternState& rState, - const ScMarkData& rMark, BOOL bDeep ) const; + const ScMarkData& rMark, sal_Bool bDeep ) const; void MergePatternArea( ScMergePatternState& rState, SCCOL nCol1, SCROW nRow1, - SCCOL nCol2, SCROW nRow2, BOOL bDeep ) const; + SCCOL nCol2, SCROW nRow2, sal_Bool bDeep ) const; void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner, ScLineFlags& rFlags, SCCOL nStartCol, SCROW nStartRow, @@ -537,12 +537,12 @@ public: void ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr ); void ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr ); void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScPatternAttr& rAttr ); - void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, BOOL bPutToPool = FALSE ) + void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, sal_Bool bPutToPool = sal_False ) { if (ValidColRow(rPos.Col(),rPos.Row())) aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr, bPutToPool ); } - void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, BOOL bPutToPool = FALSE ); + void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, sal_Bool bPutToPool = sal_False ); void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, const ScPatternAttr& rPattern, short nNewType ); @@ -550,38 +550,38 @@ public: void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle ); void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark); void ApplySelectionLineStyle( const ScMarkData& rMark, - const SvxBorderLine* pLine, BOOL bColorOnly ); + const SvxBorderLine* pLine, sal_Bool bColorOnly ); const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow ) const; - const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const; - const ScStyleSheet* GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow1, + const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const; + const ScStyleSheet* GetAreaStyle( sal_Bool& rFound, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const; - void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRemoved, + void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY ); - BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const; + sal_Bool IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const; - BOOL ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags ); - BOOL RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags ); + sal_Bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags ); + sal_Bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags ); void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark ); - void DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark ); + void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark ); - void ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark ); - void ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark ); + void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); + void ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ); const ScRange* GetRepeatColRange() const { return pRepeatColRange; } const ScRange* GetRepeatRowRange() const { return pRepeatRowRange; } void SetRepeatColRange( const ScRange* pNew ); void SetRepeatRowRange( const ScRange* pNew ); - USHORT GetPrintRangeCount() const { return static_cast< USHORT >( aPrintRanges.size() ); } - const ScRange* GetPrintRange(USHORT nPos) const; + sal_uInt16 GetPrintRangeCount() const { return static_cast< sal_uInt16 >( aPrintRanges.size() ); } + const ScRange* GetPrintRange(sal_uInt16 nPos) const; /** Returns true, if the sheet is always printed. */ - BOOL IsPrintEntireSheet() const { return bPrintEntireSheet; } + sal_Bool IsPrintEntireSheet() const { return bPrintEntireSheet; } /** Removes all print ranges. */ void ClearPrintRanges(); @@ -595,25 +595,25 @@ public: void FillPrintSaver( ScPrintSaverTab& rSaveTab ) const; void RestorePrintRanges( const ScPrintSaverTab& rSaveTab ); - USHORT GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev, + sal_uInt16 GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bFormula, const ScMarkData* pMarkData, - BOOL bSimpleTextImport ); - BOOL SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra, + sal_Bool bFormula, const ScMarkData* pMarkData, + sal_Bool bSimpleTextImport ); + sal_Bool SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bForce, - ScProgress* pOuterProgress = NULL, ULONG nProgressStart = 0 ); + sal_Bool bForce, + ScProgress* pOuterProgress = NULL, sal_uLong nProgressStart = 0 ); long GetNeededSize( SCCOL nCol, SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bWidth, BOOL bTotalSize ); - void SetColWidth( SCCOL nCol, USHORT nNewWidth ); - void SetRowHeight( SCROW nRow, USHORT nNewHeight ); - BOOL SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeight, + sal_Bool bWidth, sal_Bool bTotalSize ); + void SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth ); + void SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight ); + sal_Bool SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight, double nPPTX, double nPPTY ); /** @@ -623,17 +623,17 @@ public: * Note that setting a new row height via this function will not * invalidate page breaks. */ - void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeight ); + void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight ); // nPPT fuer Test auf Veraenderung - void SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual ); + void SetManualHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bManual ); - USHORT GetColWidth( SCCOL nCol ) const; - SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true ) const; - ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const; - ULONG GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const; - ULONG GetColOffset( SCCOL nCol ) const; - ULONG GetRowOffset( SCROW nRow ) const; + sal_uInt16 GetColWidth( SCCOL nCol ) const; + SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true ) const; + sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const; + sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const; + sal_uLong GetColOffset( SCCOL nCol ) const; + sal_uLong GetRowOffset( SCROW nRow ) const; /** * Get the last row such that the height of row 0 to the end row is as @@ -643,12 +643,12 @@ public: * * @return SCROW last row of the range within specified height. */ - SCROW GetRowForHeight(ULONG nHeight) const; + SCROW GetRowForHeight(sal_uLong nHeight) const; - USHORT GetOriginalWidth( SCCOL nCol ) const; - USHORT GetOriginalHeight( SCROW nRow ) const; + sal_uInt16 GetOriginalWidth( SCCOL nCol ) const; + sal_uInt16 GetOriginalHeight( SCROW nRow ) const; - USHORT GetCommonWidth( SCCOL nEndCol ); + sal_uInt16 GetCommonWidth( SCCOL nEndCol ); SCROW GetHiddenRowCount( SCROW nRow ); @@ -659,9 +659,9 @@ public: void ShowRows(SCROW nRow1, SCROW nRow2, bool bShow); void DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow); - void SetColFlags( SCCOL nCol, BYTE nNewFlags ); - void SetRowFlags( SCROW nRow, BYTE nNewFlags ); - void SetRowFlags( SCROW nStartRow, SCROW nEndRow, BYTE nNewFlags ); + void SetColFlags( SCCOL nCol, sal_uInt8 nNewFlags ); + void SetRowFlags( SCROW nRow, sal_uInt8 nNewFlags ); + void SetRowFlags( SCROW nStartRow, SCROW nEndRow, sal_uInt8 nNewFlags ); /// @return the index of the last row with any set flags (auto-pagebreak is ignored). SCROW GetLastFlaggedRow() const; @@ -671,18 +671,18 @@ public: /// @return the index of the last changed row (flags and row height, auto pagebreak is ignored). SCROW GetLastChangedRow() const; - BYTE GetColFlags( SCCOL nCol ) const; - BYTE GetRowFlags( SCROW nRow ) const; + sal_uInt8 GetColFlags( SCCOL nCol ) const; + sal_uInt8 GetRowFlags( SCROW nRow ) const; - const ScBitMaskCompressedArray< SCROW, BYTE> * GetRowFlagsArray() const + const ScBitMaskCompressedArray< SCROW, sal_uInt8> * GetRowFlagsArray() const { return pRowFlags; } - BOOL UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, BOOL bShow ); - BOOL UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, BOOL bShow ); + sal_Bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, sal_Bool bShow ); + sal_Bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, sal_Bool bShow ); void UpdatePageBreaks( const ScRange* pUserArea ); void RemoveManualBreaks(); - BOOL HasManualBreaks() const; + sal_Bool HasManualBreaks() const; void SetRowManualBreaks( const ::std::set& rBreaks ); void SetColManualBreaks( const ::std::set& rBreaks ); @@ -746,20 +746,20 @@ public: void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); - void Sort(const ScSortParam& rSortParam, BOOL bKeepQuery); - BOOL ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam, - BOOL* pSpecial = NULL, ScBaseCell* pCell = NULL, - BOOL* pbTestEqualCondition = NULL ); + void Sort(const ScSortParam& rSortParam, sal_Bool bKeepQuery); + sal_Bool ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam, + sal_Bool* pSpecial = NULL, ScBaseCell* pCell = NULL, + sal_Bool* pbTestEqualCondition = NULL ); void TopTenQuery( ScQueryParam& ); - SCSIZE Query(ScQueryParam& rQueryParam, BOOL bKeepSub); - BOOL CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); + SCSIZE Query(ScQueryParam& rQueryParam, sal_Bool bKeepSub); + sal_Bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates); void GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedScStrCollection& rStrings, bool& rHasDates ); - BOOL GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit); + sal_Bool GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, sal_Bool bLimit); - BOOL HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); - BOOL HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); + sal_Bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); + sal_Bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); void DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd ); @@ -770,60 +770,60 @@ public: SCCOL nCol, SCROW nRowStart, SCROW nRowEnd ) const; - void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges ); + void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges ); void IncRecalcLevel() { ++nRecalcLvl; } void DecRecalcLevel( bool bUpdateNoteCaptionPos = true ) { if (!--nRecalcLvl) SetDrawPageSize(true, bUpdateNoteCaptionPos); } - BOOL IsSortCollatorGlobal() const; + sal_Bool IsSortCollatorGlobal() const; void InitSortCollator( const ScSortParam& rPar ); void DestroySortCollator(); private: void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, + sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, - double nStepValue, double nMaxValue, USHORT nMinDigits, - BOOL bAttribs, ScProgress& rProgress ); + double nStepValue, double nMaxValue, sal_uInt16 nMinDigits, + sal_Bool bAttribs, ScProgress& rProgress ); void 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); void FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - ULONG nFillCount, FillDir eFillDir, ScProgress& rProgress ); + sal_uLong nFillCount, FillDir eFillDir, ScProgress& rProgress ); - BOOL ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark, - BOOL bMarked, BOOL bUnprotected ); + sal_Bool ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark, + sal_Bool bMarked, sal_Bool bUnprotected ); void AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - const ScPatternAttr& rAttr, USHORT nFormatNo); - void GetAutoFormatAttr(SCCOL nCol, SCROW nRow, USHORT nIndex, ScAutoFormatData& rData); - void GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT nIndex, ScAutoFormatData& rData); - BOOL SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, + const ScPatternAttr& rAttr, sal_uInt16 nFormatNo); + void GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData& rData); + void GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData& rData); + sal_Bool SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc); - BOOL Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, + sal_Bool Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc); - BOOL SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark, + sal_Bool SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc); - BOOL Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, + sal_Bool Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc); - BOOL ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark, + sal_Bool ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc); - BOOL SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, + sal_Bool SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, ScMarkData& rMark); - BOOL ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, - ScMarkData& rMark, BOOL bIsUndo); - BOOL SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark); - BOOL ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark, + sal_Bool ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, + ScMarkData& rMark, sal_Bool bIsUndo); + sal_Bool SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark); + sal_Bool ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark, ScDocument* pUndoDoc); // benutzen globalen SortParam: - BOOL IsSorted(SCCOLROW nStart, SCCOLROW nEnd); + sal_Bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd); void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 ); void SwapCol(SCCOL nCol1, SCCOL nCol2); void SwapRow(SCROW nRow1, SCROW nRow2); - short CompareCell( USHORT nSort, + short CompareCell( sal_uInt16 nSort, ScBaseCell* pCell1, SCCOL nCell1Col, SCROW nCell1Row, ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row ); short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2); @@ -832,26 +832,26 @@ private: void QuickSort( ScSortInfoArray*, SCsCOLROW nLo, SCsCOLROW nHi); void SortReorder( ScSortInfoArray*, ScProgress& ); - BOOL CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); - BOOL CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); + sal_Bool CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); + sal_Bool CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); void GetUpperCellString(SCCOL nCol, SCROW nRow, String& rStr); - BOOL RefVisible(ScFormulaCell* pCell); + sal_Bool RefVisible(ScFormulaCell* pCell); - BOOL IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol); + sal_Bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol); - void IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateCmd eCmd); - void FillFormula(ULONG& nFormulaCounter, BOOL bFirst, ScFormulaCell* pSrcCell, - SCCOL nDestCol, SCROW nDestRow, BOOL bLast ); + void IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd); + void FillFormula(sal_uLong& nFormulaCounter, sal_Bool bFirst, ScFormulaCell* pSrcCell, + SCCOL nDestCol, SCROW nDestRow, sal_Bool bLast ); void UpdateInsertTabAbs(SCTAB nNewPos); - BOOL GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel, + sal_Bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, sal_Bool bInSel, const ScMarkData& rMark) const; - BOOL GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ); + sal_Bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ); void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true ); - BOOL TestTabRefAbs(SCTAB nTable); + sal_Bool TestTabRefAbs(SCTAB nTable); void CompileDBFormula(); - void CompileDBFormula( BOOL bCreateFormulaString ); - void CompileNameFormula( BOOL bCreateFormulaString ); + void CompileDBFormula( sal_Bool bCreateFormulaString ); + void CompileNameFormula( sal_Bool bCreateFormulaString ); void CompileColRowNameFormula(); void StartListening( const ScAddress& rAddress, SvtListener* pListener ); @@ -869,7 +869,7 @@ private: // idle calculation of OutputDevice text width for cell // also invalidates script type, broadcasts for "calc as shown" void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, - BOOL bNumFormatChanged, BOOL bBroadcast ); + sal_Bool bNumFormatChanged, sal_Bool bBroadcast ); /** * In case the cell text goes beyond the column width, move the max column diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx index 72b4de611c2e..3f70a9cbed98 100644 --- a/sc/inc/tablink.hxx +++ b/sc/inc/tablink.hxx @@ -48,17 +48,17 @@ private: String aFileName; String aFilterName; String aOptions; - BOOL bInCreate; - BOOL bInEdit; - BOOL bAddUndo; - BOOL bDoPaint; + sal_Bool bInCreate; + sal_Bool bInEdit; + sal_Bool bAddUndo; + sal_Bool bDoPaint; public: TYPEINFO(); ScTableLink( ScDocShell* pDocSh, const String& rFile, - const String& rFilter, const String& rOpt, ULONG nRefresh ); + const String& rFilter, const String& rOpt, sal_uLong nRefresh ); ScTableLink( SfxObjectShell* pShell, const String& rFile, - const String& rFilter, const String& rOpt, ULONG nRefresh ); + const String& rFilter, const String& rOpt, sal_uLong nRefresh ); virtual ~ScTableLink(); virtual void Closed(); virtual void DataChanged( const String& rMimeType, @@ -66,17 +66,17 @@ public: virtual void Edit( Window*, const Link& rEndEditHdl ); - BOOL Refresh(const String& rNewFile, const String& rNewFilter, - const String* pNewOptions /* = NULL */, ULONG nNewRefresh ); - void SetInCreate(BOOL bSet) { bInCreate = bSet; } - void SetAddUndo(BOOL bSet) { bAddUndo = bSet; } - void SetPaint(BOOL bSet) { bDoPaint = bSet; } + sal_Bool Refresh(const String& rNewFile, const String& rNewFilter, + const String* pNewOptions /* = NULL */, sal_uLong nNewRefresh ); + void SetInCreate(sal_Bool bSet) { bInCreate = bSet; } + void SetAddUndo(sal_Bool bSet) { bAddUndo = bSet; } + void SetPaint(sal_Bool bSet) { bDoPaint = bSet; } const String& GetFileName() const { return aFileName; } const String& GetFilterName() const { return aFilterName; } const String& GetOptions() const { return aOptions; } - BOOL IsUsed() const; + sal_Bool IsUsed() const; DECL_LINK( RefreshHdl, ScTableLink* ); DECL_LINK( TableEndEditHdl, ::sfx2::SvBaseLink* ); @@ -95,11 +95,11 @@ private: public: ScDocumentLoader( const String& rFileName, String& rFilterName, String& rOptions, - UINT32 nRekCnt = 0, BOOL bWithInteraction = FALSE ); + sal_uInt32 nRekCnt = 0, sal_Bool bWithInteraction = sal_False ); ~ScDocumentLoader(); ScDocument* GetDocument(); ScDocShell* GetDocShell() { return pDocShell; } - BOOL IsError() const; + sal_Bool IsError() const; String GetTitle() const; void ReleaseDocRef(); // without calling DoClose @@ -110,10 +110,10 @@ public: @param bWithContent true = Tries to detect the filter by looking at the file contents. false = Detects filter by file name extension only (should be used in filter code only). - @return TRUE if a filter could be found, FALSE otherwise. */ - static BOOL GetFilterName( const String& rFileName, + @return sal_True if a filter could be found, sal_False otherwise. */ + static sal_Bool GetFilterName( const String& rFileName, String& rFilter, String& rOptions, - BOOL bWithContent, BOOL bWithInteraction ); + sal_Bool bWithContent, sal_Bool bWithInteraction ); static void RemoveAppPrefix( String& rFilterName ); }; diff --git a/sc/inc/tabopparams.hxx b/sc/inc/tabopparams.hxx index 7baa461061fd..6589e51ee3bc 100644 --- a/sc/inc/tabopparams.hxx +++ b/sc/inc/tabopparams.hxx @@ -44,14 +44,14 @@ struct ScInterpreterTableOpParams ScAddress aFormulaPos; ::std::vector< ScFormulaCell* > aNotifiedFormulaCells; ::std::vector< ScAddress > aNotifiedFormulaPos; - BOOL bValid; - BOOL bRefresh; - BOOL bCollectNotifications; + sal_Bool bValid; + sal_Bool bRefresh; + sal_Bool bCollectNotifications; ScInterpreterTableOpParams() - : bValid( FALSE ) - , bRefresh( FALSE ) - , bCollectNotifications( TRUE ) + : bValid( sal_False ) + , bRefresh( sal_False ) + , bCollectNotifications( sal_True ) { } diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index e8ff73bf7d85..17889de08ad3 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -90,7 +90,7 @@ public: void AddListener( SfxListener& rListener ); void RemoveListener( SfxListener& rListener ); - void UpdateText( USHORT nPart, EditEngine& rSource ); + void UpdateText( sal_uInt16 nPart, EditEngine& rSource ); // XHeaderFooterContent virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL @@ -125,15 +125,15 @@ class ScHeaderFooterTextData : public SfxListener { private: ScHeaderFooterContentObj& rContentObj; - USHORT nPart; + sal_uInt16 nPart; ScEditEngineDefaulter* pEditEngine; SvxEditEngineForwarder* pForwarder; - BOOL bDataValid; - BOOL bInUpdate; + sal_Bool bDataValid; + sal_Bool bInUpdate; public: ScHeaderFooterTextData( ScHeaderFooterContentObj& rContent, - USHORT nP ); + sal_uInt16 nP ); ~ScHeaderFooterTextData(); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -143,7 +143,7 @@ public: void UpdateData(); ScEditEngineDefaulter* GetEditEngine() { GetTextForwarder(); return pEditEngine; } - USHORT GetPart() const { return nPart; } + sal_uInt16 GetPart() const { return nPart; } ScHeaderFooterContentObj& GetContentObj() const { return rContentObj; } }; @@ -164,7 +164,7 @@ private: public: ScHeaderFooterTextObj( ScHeaderFooterContentObj& rContent, - USHORT nP ); + sal_uInt16 nP ); virtual ~ScHeaderFooterTextObj(); const SvxUnoText& GetUnoText(); @@ -376,10 +376,10 @@ protected: ScFieldEditEngine* pEditEngine; SvxEditEngineForwarder* pForwarder; ScSharedCellEditSource* pOriginalSource; - BOOL bDataValid; - BOOL bInUpdate; - BOOL bDirty; - BOOL bDoUpdate; + sal_Bool bDataValid; + sal_Bool bInUpdate; + sal_Bool bDirty; + sal_Bool bDoUpdate; protected: virtual void GetCellText(const ScAddress& rCellPos, String& rText); @@ -401,9 +401,9 @@ public: ScDocShell* GetDocShell() const { return pDocShell; } const ScAddress& GetCellPos() const { return aCellPos; } - void SetDirty(BOOL bValue) { bDirty = bValue; } - BOOL IsDirty() const { return bDirty; } - void SetDoUpdate(BOOL bValue) { bDoUpdate = bValue; } + void SetDirty(sal_Bool bValue) { bDirty = bValue; } + sal_Bool IsDirty() const { return bDirty; } + void SetDoUpdate(sal_Bool bValue) { bDoUpdate = bValue; } }; class ScCellTextObj : public ScCellTextData, public SvxUnoText diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index e4659921e7be..13a8038a4109 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -103,8 +103,8 @@ public: virtual const ScRefList* GetRefList() const; virtual ScRefList* GetRefList(); - virtual BOOL TextEqual( const formula::FormulaToken& rToken ) const; - virtual BOOL Is3DRef() const; // reference with 3D flag set + virtual sal_Bool TextEqual( const formula::FormulaToken& rToken ) const; + virtual sal_Bool Is3DRef() const; // reference with 3D flag set /** If rTok1 and rTok2 both are SingleRef or DoubleRef tokens, extend/merge ranges as needed for ocRange. @@ -112,7 +112,7 @@ public: The formula's position, used to calculate absolute positions from relative references. @param bReuseDoubleRef - If TRUE, a DoubleRef token is reused if passed as rTok1 or rTok2, + If sal_True, a DoubleRef token is reused if passed as rTok1 or rTok2, else a new DoubleRef token is created and returned. @return A reused or new'ed ScDoubleRefToken, or a NULL TokenRef if rTok1 or @@ -134,7 +134,7 @@ public: virtual ScSingleRefData& GetSingleRef(); virtual void CalcAbsIfRel( const ScAddress& ); virtual void CalcRelFromAbs( const ScAddress& ); - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScSingleRefToken(*this); } DECL_FIXEDMEMPOOL_NEWDEL( ScSingleRefToken ); @@ -163,7 +163,7 @@ public: virtual ScSingleRefData& GetSingleRef2(); virtual void CalcAbsIfRel( const ScAddress& ); virtual void CalcRelFromAbs( const ScAddress& ); - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScDoubleRefToken(*this); } DECL_FIXEDMEMPOOL_NEWDEL( ScDoubleRefToken ); @@ -180,7 +180,7 @@ public: ScToken( r ), pMatrix( r.pMatrix ) {} virtual const ScMatrix* GetMatrix() const; virtual ScMatrix* GetMatrix(); - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScMatrixToken(*this); } }; @@ -198,13 +198,13 @@ public: ScExternalSingleRefToken( const ScExternalSingleRefToken& r ); virtual ~ScExternalSingleRefToken(); - virtual USHORT GetIndex() const; + virtual sal_uInt16 GetIndex() const; virtual const String& GetString() const; virtual const ScSingleRefData& GetSingleRef() const; virtual ScSingleRefData& GetSingleRef(); virtual void CalcAbsIfRel( const ScAddress& ); virtual void CalcRelFromAbs( const ScAddress& ); - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScExternalSingleRefToken(*this); } }; @@ -222,7 +222,7 @@ public: ScExternalDoubleRefToken( const ScExternalDoubleRefToken& r ); virtual ~ScExternalDoubleRefToken(); - virtual USHORT GetIndex() const; + virtual sal_uInt16 GetIndex() const; virtual const String& GetString() const; virtual const ScSingleRefData& GetSingleRef() const; virtual ScSingleRefData& GetSingleRef(); @@ -232,7 +232,7 @@ public: virtual ScComplexRefData& GetDoubleRef(); virtual void CalcAbsIfRel( const ScAddress& ); virtual void CalcRelFromAbs( const ScAddress& ); - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScExternalDoubleRefToken(*this); } }; @@ -248,9 +248,9 @@ public: ScExternalNameToken( sal_uInt16 nFileId, const String& rName ); ScExternalNameToken( const ScExternalNameToken& r ); virtual ~ScExternalNameToken(); - virtual USHORT GetIndex() const; + virtual sal_uInt16 GetIndex() const; virtual const String& GetString() const; - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScExternalNameToken(*this); } }; @@ -268,7 +268,7 @@ public: ScToken( r ), pJumpMatrix( r.pJumpMatrix ) {} virtual ~ScJumpMatrixToken(); virtual ScJumpMatrix* GetJumpMatrix() const; - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScJumpMatrixToken(*this); } }; @@ -288,7 +288,7 @@ public: virtual void CalcRelFromAbs( const ScAddress& ); virtual const ScRefList* GetRefList() const; virtual ScRefList* GetRefList(); - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScRefListToken(*this); } }; @@ -310,7 +310,7 @@ public: bool IsDisplayedAsString() const { return bDisplayedAsString; } virtual double GetDouble() const; virtual const String & GetString() const; - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScEmptyCellToken(*this); } }; @@ -335,7 +335,7 @@ public: virtual double GetDouble() const; virtual const String & GetString() const; virtual const ScMatrix* GetMatrix() const; - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScMatrixCellResultToken(*this); } formula::StackVar GetUpperLeftType() const { @@ -372,7 +372,7 @@ public: if (xUpperLeft) xUpperLeft = xUpperLeft->Clone(); } - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScMatrixFormulaCellToken(*this); } void SetMatColsRows( SCCOL nC, SCROW nR ) { @@ -436,7 +436,7 @@ public: const String & GetFormula() const { return aFormula; } virtual double GetDouble() const; virtual const String & GetString() const; - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new ScHybridCellToken(*this); } }; diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 5ded8f4410d3..eb9318b86854 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -41,7 +41,7 @@ class ScMatrix; class SC_DLLPUBLIC ScTokenArray : public formula::FormulaTokenArray { friend class ScCompiler; - BOOL ImplGetReference( ScRange& rRange, BOOL bValidOnly ) const; + sal_Bool ImplGetReference( ScRange& rRange, sal_Bool bValidOnly ) const; public: ScTokenArray(); @@ -51,15 +51,15 @@ public: ScTokenArray* Clone() const; /// True copy! /// Exactly and only one range (valid or deleted) - BOOL IsReference( ScRange& rRange ) const; + sal_Bool IsReference( ScRange& rRange ) const; /// Exactly and only one valid range (no #REF!s) - BOOL IsValidReference( ScRange& rRange ) const; + sal_Bool IsValidReference( ScRange& rRange ) const; /** Determines the extent of direct adjacent references. Only use with real functions, e.g. GetOuterFuncOpCode() == ocSum ! */ - BOOL GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, + sal_Bool GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, const ScAddress& rPos, ScDirection ); formula::FormulaToken* AddRawToken( const ScRawToken& ); diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx index e21140699e4c..478d4b97e712 100644 --- a/sc/inc/unitconv.hxx +++ b/sc/inc/unitconv.hxx @@ -61,10 +61,10 @@ class ScUnitConverter : public ScStrCollection ScUnitConverter& operator=( const ScUnitConverter& ); public: - ScUnitConverter( USHORT nInit = 16, USHORT nDelta = 4 ); + ScUnitConverter( sal_uInt16 nInit = 16, sal_uInt16 nDelta = 4 ); virtual ~ScUnitConverter() {}; - BOOL GetValue( double& fValue, const String& rFromUnit, + sal_Bool GetValue( double& fValue, const String& rFromUnit, const String& rToUnit ) const; }; diff --git a/sc/inc/unowids.hxx b/sc/inc/unowids.hxx index 175022a0ba14..2a1ffdbbbfc7 100644 --- a/sc/inc/unowids.hxx +++ b/sc/inc/unowids.hxx @@ -82,12 +82,12 @@ #define SC_WID_UNO_END ( SC_WID_UNO_START + 41 ) -inline BOOL IsScUnoWid( USHORT nWid ) +inline sal_Bool IsScUnoWid( sal_uInt16 nWid ) { return nWid >= SC_WID_UNO_START && nWid <= SC_WID_UNO_END; } -inline BOOL IsScItemWid( USHORT nWid ) +inline sal_Bool IsScItemWid( sal_uInt16 nWid ) { return nWid >= ATTR_STARTINDEX && nWid <= ATTR_ENDINDEX; // incl. page } diff --git a/sc/inc/userlist.hxx b/sc/inc/userlist.hxx index 7190cd189156..98caa8146c41 100644 --- a/sc/inc/userlist.hxx +++ b/sc/inc/userlist.hxx @@ -37,7 +37,7 @@ class SC_DLLPUBLIC ScUserListData : public ScDataObject { friend class ScUserList; String aStr; - USHORT nTokenCount; + sal_uInt16 nTokenCount; String* pSubStrings; String* pUpperSub; @@ -52,9 +52,9 @@ public: const String& GetString() const { return aStr; } void SetString( const String& rStr); - USHORT GetSubCount() const; - BOOL GetSubIndex(const String& rSubStr, USHORT& rIndex) const; - String GetSubStr(USHORT nIndex) const; + sal_uInt16 GetSubCount() const; + sal_Bool GetSubIndex(const String& rSubStr, sal_uInt16& rIndex) const; + String GetSubStr(sal_uInt16 nIndex) const; StringCompare Compare(const String& rSubStr1, const String& rSubStr2) const; StringCompare ICompare(const String& rSubStr1, const String& rSubStr2) const; }; @@ -63,28 +63,28 @@ public: class SC_DLLPUBLIC ScUserList : public ScCollection { public: - ScUserList( USHORT nLim = 4, USHORT nDel = 4); + ScUserList( sal_uInt16 nLim = 4, sal_uInt16 nDel = 4); ScUserList( const ScUserList& rUserList ) : ScCollection ( rUserList ) {} virtual ScDataObject* Clone() const; ScUserListData* GetData( const String& rSubStr ) const; /// If the list in rStr is already inserted - BOOL HasEntry( const String& rStr ) const; + sal_Bool HasEntry( const String& rStr ) const; - inline ScUserListData* operator[]( const USHORT nIndex) const; + inline ScUserListData* operator[]( const sal_uInt16 nIndex) const; inline ScUserList& operator= ( const ScUserList& r ); - BOOL operator==( const ScUserList& r ) const; - inline BOOL operator!=( const ScUserList& r ) const; + sal_Bool operator==( const ScUserList& r ) const; + inline sal_Bool operator!=( const ScUserList& r ) const; }; inline ScUserList& ScUserList::operator=( const ScUserList& r ) { return (ScUserList&)ScCollection::operator=( r ); } -inline ScUserListData* ScUserList::operator[]( const USHORT nIndex) const +inline ScUserListData* ScUserList::operator[]( const sal_uInt16 nIndex) const { return (ScUserListData*)At(nIndex); } -inline BOOL ScUserList::operator!=( const ScUserList& r ) const +inline sal_Bool ScUserList::operator!=( const ScUserList& r ) const { return !operator==( r ); } #endif diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 1bff57055f82..285f18a0c4d3 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -67,8 +67,8 @@ class SC_DLLPUBLIC ScValidationData : public ScConditionEntry sal_uInt32 nKey; // Index in Attributen ScValidationMode eDataMode; - BOOL bShowInput; - BOOL bShowError; + sal_Bool bShowInput; + sal_Bool bShowError; ScValidErrorStyle eErrorStyle; sal_Int16 mnListType; // selection list type: none, unsorted, sorted. String aInputTitle; @@ -76,12 +76,12 @@ class SC_DLLPUBLIC ScValidationData : public ScConditionEntry String aErrorTitle; String aErrorMessage; - BOOL bIsUsed; // temporaer beim Speichern + sal_Bool bIsUsed; // temporaer beim Speichern - BOOL DoMacro( const ScAddress& rPos, const String& rInput, + sal_Bool DoMacro( const ScAddress& rPos, const String& rInput, ScFormulaCell* pCell, Window* pParent ) const; - BOOL DoScript( const ScAddress& rPos, const String& rInput, + sal_Bool DoScript( const ScAddress& rPos, const String& rInput, ScFormulaCell* pCell, Window* pParent ) const; using ScConditionEntry::operator==; @@ -111,11 +111,11 @@ public: void SetError( const String& rTitle, const String& rMsg, ScValidErrorStyle eStyle ); - BOOL GetInput( String& rTitle, String& rMsg ) const + sal_Bool GetInput( String& rTitle, String& rMsg ) const { rTitle = aInputTitle; rMsg = aInputMessage; return bShowInput; } - BOOL GetErrMsg( String& rTitle, String& rMsg, ScValidErrorStyle& rStyle ) const; + sal_Bool GetErrMsg( String& rTitle, String& rMsg, ScValidErrorStyle& rStyle ) const; - BOOL HasErrMsg() const { return bShowError; } + sal_Bool HasErrMsg() const { return bShowError; } ScValidationMode GetDataMode() const { return eDataMode; } @@ -133,27 +133,27 @@ public: bool FillSelectionList( TypedScStrCollection& rStrings, const ScAddress& rPos ) const; // mit String: bei Eingabe, mit Zelle: fuer Detektiv / RC_FORCED - BOOL IsDataValid( const String& rTest, const ScPatternAttr& rPattern, + sal_Bool IsDataValid( const String& rTest, const ScPatternAttr& rPattern, const ScAddress& rPos ) const; - BOOL IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) const; + sal_Bool IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) const; - // TRUE -> Abbruch - BOOL DoError( Window* pParent, const String& rInput, const ScAddress& rPos ) const; + // sal_True -> Abbruch + sal_Bool DoError( Window* pParent, const String& rInput, const ScAddress& rPos ) const; void DoCalcError( ScFormulaCell* pCell ) const; - BOOL IsEmpty() const; + sal_Bool IsEmpty() const; sal_uInt32 GetKey() const { return nKey; } void SetKey(sal_uInt32 nNew) { nKey = nNew; } // nur wenn nicht eingefuegt! - void SetUsed(BOOL bSet) { bIsUsed = bSet; } - BOOL IsUsed() const { return bIsUsed; } + void SetUsed(sal_Bool bSet) { bIsUsed = bSet; } + sal_Bool IsUsed() const { return bIsUsed; } - BOOL EqualEntries( const ScValidationData& r ) const; // fuer Undo + sal_Bool EqualEntries( const ScValidationData& r ) const; // fuer Undo // sortiert (per PTRARR) nach Index // operator== nur fuer die Sortierung - BOOL operator ==( const ScValidationData& r ) const { return nKey == r.nKey; } - BOOL operator < ( const ScValidationData& r ) const { return nKey < r.nKey; } + sal_Bool operator ==( const ScValidationData& r ) const { return nKey == r.nKey; } + sal_Bool operator < ( const ScValidationData& r ) const { return nKey < r.nKey; } private: /** Tries to fill the passed collection with list validation entries. @@ -206,7 +206,7 @@ public: * references are marked now. */ bool MarkUsedExternalReferences() const; - BOOL operator==( const ScValidationDataList& r ) const; // fuer Ref-Undo + sal_Bool operator==( const ScValidationDataList& r ) const; // fuer Ref-Undo }; #endif diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index 44625ad2aeb5..6277aeee21d9 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -68,8 +68,8 @@ enum ScVObjType VOBJ_TYPE_DRAW }; -#define MAX_OPT (USHORT)VOPT_BIGHANDLES+1 -#define MAX_TYPE (USHORT)VOBJ_TYPE_DRAW+1 +#define MAX_OPT (sal_uInt16)VOPT_BIGHANDLES+1 +#define MAX_TYPE (sal_uInt16)VOBJ_TYPE_DRAW+1 #define SC_STD_GRIDCOLOR COL_LIGHTGRAY @@ -102,8 +102,8 @@ public: void SetDefaults(); - void SetOption( ScViewOption eOpt, BOOL bNew = TRUE ) { aOptArr[eOpt] = bNew; } - BOOL GetOption( ScViewOption eOpt ) const { return aOptArr[eOpt]; } + void SetOption( ScViewOption eOpt, sal_Bool bNew = sal_True ) { aOptArr[eOpt] = bNew; } + sal_Bool GetOption( ScViewOption eOpt ) const { return aOptArr[eOpt]; } void SetObjMode( ScVObjType eObj, ScVObjMode eMode ) { aModeArr[eObj] = eMode; } ScVObjMode GetObjMode( ScVObjType eObj ) const { return aModeArr[eObj]; } @@ -113,14 +113,14 @@ public: const ScGridOptions& GetGridOptions() const { return aGridOpt; } void SetGridOptions( const ScGridOptions& rNew ) { aGridOpt = rNew; } - SvxGridItem* CreateGridItem( USHORT nId = SID_ATTR_GRID_OPTIONS ) const; + SvxGridItem* CreateGridItem( sal_uInt16 nId = SID_ATTR_GRID_OPTIONS ) const; const ScViewOptions& operator= ( const ScViewOptions& rCpy ); int operator== ( const ScViewOptions& rOpt ) const; int operator!= ( const ScViewOptions& rOpt ) const { return !(operator==(rOpt)); } private: - BOOL aOptArr [MAX_OPT]; + sal_Bool aOptArr [MAX_OPT]; ScVObjMode aModeArr [MAX_TYPE]; Color aGridCol; String aGridColName; @@ -135,8 +135,8 @@ class SC_DLLPUBLIC ScTpViewItem : public SfxPoolItem { public: TYPEINFO(); -//UNUSED2008-05 ScTpViewItem( USHORT nWhich ); - ScTpViewItem( USHORT nWhich, const ScViewOptions& rOpt ); +//UNUSED2008-05 ScTpViewItem( sal_uInt16 nWhich ); + ScTpViewItem( sal_uInt16 nWhich, const ScViewOptions& rOpt ); ScTpViewItem( const ScTpViewItem& rItem ); ~ScTpViewItem(); diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx index 0f03e0e9b111..2895574dc609 100644 --- a/sc/inc/viewuno.hxx +++ b/sc/inc/viewuno.hxx @@ -92,13 +92,13 @@ class ScViewPaneBase : public com::sun::star::sheet::XViewPane, { private: ScTabViewShell* pViewShell; - USHORT nPane; // ScSplitPos oder SC_VIEWPANE_ACTIVE + sal_uInt16 nPane; // ScSplitPos oder SC_VIEWPANE_ACTIVE protected: ::com::sun::star::awt::Rectangle GetVisArea() const; public: - ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP); + ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP); virtual ~ScViewPaneBase(); ScTabViewShell* GetViewShell() const { return pViewShell; } @@ -162,7 +162,7 @@ public: class ScViewPaneObj : public ScViewPaneBase, public cppu::OWeakObject { public: - ScViewPaneObj(ScTabViewShell* pViewSh, USHORT nP); + ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP); virtual ~ScViewPaneObj(); virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( @@ -200,11 +200,11 @@ private: SCTAB nPreviousTab; sal_Bool bDrawSelModeSet; - ScViewPaneObj* GetObjectByIndex_Impl(USHORT nIndex) const; - INT16 GetZoom(void) const; - void SetZoom(INT16 Zoom); - INT16 GetZoomType(void) const; - void SetZoomType(INT16 ZoomType); + ScViewPaneObj* GetObjectByIndex_Impl(sal_uInt16 nIndex) const; + sal_Int16 GetZoom(void) const; + void SetZoom(sal_Int16 Zoom); + sal_Int16 GetZoomType(void) const; + void SetZoomType(sal_Int16 ZoomType); com::sun::star::uno::Reference< com::sun::star::uno::XInterface > GetClickedObject(const Point& rPoint) const; void StartMouseListening(); diff --git a/sc/inc/waitoff.hxx b/sc/inc/waitoff.hxx index b17435f23d7f..e181dcf70306 100644 --- a/sc/inc/waitoff.hxx +++ b/sc/inc/waitoff.hxx @@ -36,7 +36,7 @@ class ScWaitCursorOff { private: Window* pWin; - ULONG nWaiters; + sal_uLong nWaiters; public: ScWaitCursorOff( Window* pWin ); ~ScWaitCursorOff(); diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx index 926b6ef50cd1..5b5061aac038 100644 --- a/sc/inc/xmlwrap.hxx +++ b/sc/inc/xmlwrap.hxx @@ -77,8 +77,8 @@ class ScXMLImportWrapper public: ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >&); - BOOL Import(sal_Bool bStylesOnly, ErrCode& ); - BOOL Export(sal_Bool bStylesOnly); + sal_Bool Import(sal_Bool bStylesOnly, ErrCode& ); + sal_Bool Export(sal_Bool bStylesOnly); }; #endif diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx index 7c5e9a2f07cb..84d5070e2b8c 100644 --- a/sc/inc/zforauto.hxx +++ b/sc/inc/zforauto.hxx @@ -44,11 +44,11 @@ class ScNumFormatAbbrev public: ScNumFormatAbbrev(); ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat); - ScNumFormatAbbrev(ULONG nFormat, SvNumberFormatter& rFormatter); + ScNumFormatAbbrev(sal_uLong nFormat, SvNumberFormatter& rFormatter); void Load( SvStream& rStream, CharSet eByteStrSet ); // Laden der Zahlenformate void Save( SvStream& rStream, CharSet eByteStrSet ) const; // Speichern der Zahlenformate - void PutFormatIndex(ULONG nFormat, SvNumberFormatter& rFormatter); - ULONG GetFormatIndex( SvNumberFormatter& rFormatter); + void PutFormatIndex(sal_uLong nFormat, SvNumberFormatter& rFormatter); + sal_uLong GetFormatIndex( SvNumberFormatter& rFormatter); inline int operator==(const ScNumFormatAbbrev& rNumFormat) const { return ((sFormatstring == rNumFormat.sFormatstring) diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index f3443312bd4e..3c2569cc143f 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -104,7 +104,7 @@ ScAttrArray::~ScAttrArray() void ScAttrArray::TestData() const { - USHORT nErr = 0; + sal_uInt16 nErr = 0; if (pData) { SCSIZE nPos; @@ -131,7 +131,7 @@ void ScAttrArray::TestData() const //------------------------------------------------------------------------ -void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc ) +void ScAttrArray::Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc ) { if (pData) { @@ -144,7 +144,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc ) { // ueberpruefen, ob Attributierung die Textbreite der Zelle aendert pOldPattern = pData[i].pPattern; - BOOL bNumFormatChanged; + sal_Bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, pPattern->GetItemSet(), pOldPattern->GetItemSet() ) ) { @@ -168,7 +168,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc ) delete[] pData; if (pDocument->IsStreamValid(nTab)) - pDocument->SetStreamValid(nTab, FALSE); + pDocument->SetStreamValid(nTab, sal_False); if (bAlloc) { @@ -190,9 +190,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 = sal_False; if (pData && (nPos < nCount)) { if (nPos > 0) @@ -206,7 +206,7 @@ BOOL ScAttrArray::Concat(SCSIZE nPos) pData[nCount - 1].nRow = 0; nCount--; nPos--; - bRet = TRUE; + bRet = sal_True; } } if (nPos + 1 < nCount) @@ -219,7 +219,7 @@ BOOL ScAttrArray::Concat(SCSIZE nPos) pData[nCount - 1].pPattern = NULL; pData[nCount - 1].nRow = 0; nCount--; - bRet = TRUE; + bRet = sal_True; } } } @@ -228,14 +228,14 @@ BOOL ScAttrArray::Concat(SCSIZE nPos) //------------------------------------------------------------------------ -BOOL ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const +sal_Bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const { long nLo = 0; long nHi = static_cast(nCount) - 1; long nStartRow = 0; long nEndRow = 0; long i = 0; - BOOL bFound = (nCount == 1); + sal_Bool bFound = (nCount == 1); if (pData) { while ( !bFound && nLo <= nHi ) @@ -252,11 +252,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 = sal_False; if (bFound) nIndex=(SCSIZE)i; @@ -294,13 +294,13 @@ 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 ); } -void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, BOOL bPutToPool ) +void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, sal_Bool bPutToPool ) { if (ValidRow(nStartRow) && ValidRow(nEndRow)) { @@ -350,7 +350,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 ) ) { @@ -375,8 +375,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 = sal_False; + sal_Bool bSplit = sal_False; if ( nStartRow > 0 ) { nInsert = MAXROWCOUNT; @@ -386,7 +386,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; } @@ -397,7 +397,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern { // combine pData[ni-1].nRow = nEndRow; nInsert = MAXROWCOUNT; - bCombined = TRUE; + bCombined = sal_True; } } else @@ -421,7 +421,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 @@ -474,7 +474,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern } if (pDocument->IsStreamValid(nTab)) - pDocument->SetStreamValid(nTab, FALSE); + pDocument->SetStreamValid(nTab, sal_False); } } // InfoBox(0, String(nCount) + String(" Eintraege") ).Execute(); @@ -519,7 +519,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 @@ -530,7 +530,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 ) ) { @@ -555,7 +555,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, sal_False); } #ifdef DBG_UTIL @@ -582,7 +582,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; @@ -602,11 +602,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) ) { @@ -677,7 +677,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 @@ -733,7 +733,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) @@ -756,7 +756,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 ) ) { @@ -797,7 +797,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac while (nStart <= nEndRow); if (pDocument->IsStreamValid(nTab)) - pDocument->SetStreamValid(nTab, FALSE); + pDocument->SetStreamValid(nTab, sal_False); } #ifdef DBG_UTIL @@ -810,14 +810,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 hat keinen Parent - SfxItemState eOldState = rMergeSet.GetItemState( nId, FALSE, &pOldItem ); + SfxItemState eOldState = rMergeSet.GetItemState( nId, sal_False, &pOldItem ); if ( eOldState == SFX_ITEM_DEFAULT ) // 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) ) @@ -826,7 +826,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 @@ -844,7 +844,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)) { @@ -866,13 +866,13 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow, const SfxItemSet& rThisSet = pPattern->GetItemSet(); if (rState.pItemSet) { - // (*ppSet)->MergeValues( rThisSet, FALSE ); + // (*ppSet)->MergeValues( rThisSet, sal_False ); // geht nicht, weil die Vorlagen nicht beruecksichtigt werden if (bDeep) lcl_MergeDeep( *rState.pItemSet, rThisSet ); else - rState.pItemSet->MergeValues( rThisSet, FALSE ); + rState.pItemSet->MergeValues( rThisSet, sal_False ); } else { @@ -896,41 +896,41 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow, // Umrandung zusammenbauen -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; // weiter geht's nicht + return sal_False; // weiter geht's nicht if (rModified == SC_LINE_EMPTY) { rModified = SC_LINE_SET; rpNew = pNewLine; - return TRUE; // zum ersten mal gesetzt + return sal_True; // zum ersten mal gesetzt } if (pOldLine == pNewLine) { rpNew = pOldLine; - return FALSE; + return sal_False; } if (pOldLine && pNewLine) if (*pOldLine == *pNewLine) { rpNew = pOldLine; - return FALSE; + return sal_False; } rModified = SC_LINE_DONTCARE; rpNew = NULL; - return TRUE; // andere Linie -> dontcare + return sal_True; // andere Linie -> dontcare } 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 ) { // rechten/unteren Rahmen setzen, wenn Zelle bis zum Ende zusammengefasst: const ScMergeAttr& rMerge = (const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE); @@ -994,19 +994,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; @@ -1016,13 +1016,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, sal_False, nEndRow - Min( pData[i].nRow, (SCROW)(nEndRow-1) ) ); // nDistBottom hier immer > 0 } pPattern = GetPattern( nEndRow ); - lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, FALSE, 0 ); + lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_False, 0 ); } } @@ -1033,10 +1033,10 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine // ApplyFrame - auf einen Eintrag im 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!" ); @@ -1069,7 +1069,7 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem, if (aNewFrame == *pOldFrame) { // nothing to do - return FALSE; + return sal_False; } else { @@ -1078,22 +1078,22 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem, /* ScPatternAttr* pNewPattern = (ScPatternAttr*) pPattern->Clone(); pNewPattern->GetItemSet().Put( aNewFrame ); - SetPatternArea( nStartRow, nEndRow, pNewPattern, TRUE ); + SetPatternArea( nStartRow, nEndRow, pNewPattern, sal_True ); */ - return TRUE; + return sal_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 ) // innerer Teil vorhanden? { @@ -1106,8 +1106,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, sal_False, nEndRow-nTmpEnd ); nTmpStart = nTmpEnd+1; if (bChanged) { @@ -1119,7 +1119,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, sal_False, 0 ); } } @@ -1130,8 +1130,8 @@ long lcl_LineSize( const SvxBorderLine& rLine ) // doppelte Linie -> halber Abstand + eine Linie (je 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(), @@ -1151,14 +1151,14 @@ long lcl_LineSize( const SvxBorderLine& rLine ) } -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 = sal_False; const SvxBoxItem* pItem = 0; const SvxBorderLine* pLine = 0; @@ -1173,7 +1173,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; } // unten @@ -1186,7 +1186,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 ) @@ -1204,7 +1204,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; } } @@ -1218,7 +1218,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; } } } @@ -1228,7 +1228,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, // Testen, ob Bereich bestimmtes Attribut enthaelt -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; @@ -1291,7 +1291,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; } @@ -1344,9 +1344,9 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const // Bereich um evtl. enthaltene Zusammenfassungen erweitern // und evtl. MergeFlag anpassen (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; @@ -1354,7 +1354,7 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nEndIndex; Search( nStartRow, nStartIndex ); Search( nEndRow, nEndIndex ); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (SCSIZE i=nStartIndex; i<=nEndIndex; i++) { @@ -1371,7 +1371,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) { @@ -1409,9 +1409,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 = sal_False; const ScPatternAttr* pPattern; const ScMergeAttr* pItem; SCSIZE nIndex; @@ -1473,12 +1473,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; @@ -1486,7 +1486,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; @@ -1509,7 +1509,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 @@ -1517,7 +1517,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow, if ( !bDefault ) { if (bFirstUse) - bFirstUse = FALSE; + bFirstUse = sal_False; else pDocument->GetPool()->Put( *pWantedPattern ); // im Pool ist es schon! } @@ -1533,15 +1533,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 = sal_False; Search( nStartRow, nIndex ); nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0; @@ -1557,9 +1557,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, sal_True ); Search( nThisRow, nIndex ); // Daten wurden veraendert !!! - bChanged = TRUE; + bChanged = sal_True; } ++nIndex; @@ -1570,15 +1570,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 = sal_False; Search( nStartRow, nIndex ); nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0; @@ -1594,9 +1594,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, sal_True ); Search( nThisRow, nIndex ); // Daten wurden veraendert !!! - bChanged = TRUE; + bChanged = sal_True; } ++nIndex; @@ -1607,7 +1607,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; @@ -1629,7 +1629,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, sal_True ); Search( nThisRow, nIndex ); // Daten wurden veraendert !!! } @@ -1639,7 +1639,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 ); @@ -1652,10 +1652,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, sal_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 ) @@ -1684,7 +1684,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 ); // Daten wurden veraendert !!! @@ -1698,7 +1698,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)) @@ -1737,7 +1737,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo if (pData[nPos].pPattern->GetStyleSheet() == pStyleSheet) { // for (SCROW nRow = nStart; nRow <= nEnd; nRow++) -// pUsed[nRow] = TRUE; +// pUsed[nRow] = sal_True; rUsedRows.setTrue(nStart, nEnd); @@ -1767,10 +1767,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 = sal_False; SCSIZE nPos = 0; while ( nPos < nCount ) @@ -1782,8 +1782,8 @@ BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle, if ( pStyle == &rStyle ) { if ( !bGatherAllStyles ) - return TRUE; - bIsUsed = TRUE; + return sal_True; + bIsUsed = sal_True; } } nPos++; @@ -1793,17 +1793,17 @@ 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 sal_False; else - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } @@ -1823,7 +1823,7 @@ BOOL ScAttrArray::IsEmpty() const //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 -//UNUSED2008-05 SCROW ScAttrArray::GetLastEntryPos( BOOL bIncludeBottom ) const +//UNUSED2008-05 SCROW ScAttrArray::GetLastEntryPos( sal_Bool bIncludeBottom ) const //UNUSED2008-05 { //UNUSED2008-05 DBG_ASSERT( nCount, "nCount == 0" ); //UNUSED2008-05 @@ -1842,11 +1842,11 @@ BOOL ScAttrArray::IsEmpty() const //UNUSED2008-05 } -BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const +sal_Bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const { DBG_ASSERT( nCount, "nCount == 0" ); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCSIZE nStart = 0; // Skip first entry if more than 1 row. @@ -1863,7 +1863,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; @@ -1877,7 +1877,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 @@ -1886,10 +1886,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 = sal_False; // loop backwards from the end instead of using Search, assuming that // there usually aren't many attributes below the last cell @@ -1910,12 +1910,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 = sal_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 @@ -1925,16 +1925,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 = sal_False; while ( nIndex < nCount && nThisStart <= nEndRow && !bFound ) { if ( pData[nIndex].pPattern->IsVisible() ) - bFound = TRUE; + bFound = sal_True; nThisStart = pData[nIndex].nRow + 1; ++nIndex; @@ -1944,10 +1944,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 ) @@ -1981,11 +1981,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 { //! mit IsVisibleEqual zusammenfassen? - BOOL bEqual = TRUE; + sal_Bool bEqual = sal_True; SCSIZE nThisPos = 0; SCSIZE nOtherPos = 0; if ( nStartRow > 0 ) @@ -2018,12 +2018,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 zusammengefasste duerfen nicht herausgeschoben werden // (ob die ganze Zusammenfassung betroffen ist, ist hier nicht zu erkennen) - BOOL bTest = TRUE; + sal_Bool bTest = sal_True; if (!IsEmpty()) { SCSIZE nIndex = 0; @@ -2035,7 +2035,7 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const if ( ((const ScMergeFlagAttr&)pData[nIndex].pPattern-> GetItem(ATTR_MERGE_FLAG)).IsHorOverlapped() ) { - bTest = FALSE; // darf nicht herausgeschoben werden + bTest = sal_False; // darf nicht herausgeschoben werden break; } if ( pData[nIndex].nRow >= nEndRow ) // Ende des Bereichs @@ -2046,7 +2046,7 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const } -BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const +sal_Bool ScAttrArray::TestInsertRow( SCSIZE nSize ) const { // wenn die erste herausgeschobene Zeile vertikal ueberlappt ist, // wuerde eine kaputte Zusammenfassung uebrigbleiben @@ -2061,10 +2061,10 @@ BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const if ( ((const ScMergeFlagAttr&)pData[nFirstLost].pPattern-> GetItem(ATTR_MERGE_FLAG)).IsVerOverlapped() ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } @@ -2080,7 +2080,7 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize ) // ein gesetztes ScMergeAttr darf nicht ausgedehnt werden // (darum hinterher wieder loeschen) - 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; @@ -2122,7 +2122,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; @@ -2133,7 +2133,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize ) if (bFirst) { nStartIndex = i; - bFirst = FALSE; + bFirst = sal_False; } nEndIndex = i; } @@ -2216,14 +2216,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, sal_False ); else - SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE ); + SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True ); Search( nThisRow, nIndex ); // Daten wurden veraendert !!! } @@ -2240,11 +2240,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)) { - // Kopieren (bPutToPool=TRUE) + // Kopieren (bPutToPool=sal_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) ); } @@ -2255,7 +2255,7 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray // Kopieren zwischen Dokumenten (Clipboard) void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray, - INT16 nStripFlags ) + sal_Int16 nStripFlags ) { nStartRow -= nDy; // Source nEndRow -= nDy; @@ -2265,7 +2265,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++) { @@ -2284,7 +2284,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; @@ -2337,7 +2337,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++) { @@ -2352,7 +2352,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, sal_False); } // when pasting from clipboard and skipping filtered rows, the adjusted end position @@ -2363,9 +2363,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 = sal_False; if (pMarkArray) { @@ -2387,10 +2387,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) @@ -2425,8 +2425,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)) @@ -2443,7 +2443,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; } @@ -2453,16 +2453,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, sal_False ); if (nMarkEndGetPool(); - USHORT nSaveCount = nCount; + sal_uInt16 nSaveCount = nCount; SCROW nSaveMaxRow = pDocument->GetSrcMaxRow(); if ( nSaveMaxRow != MAXROW ) { @@ -2503,11 +2503,11 @@ void ScAttrArray::Save( SvStream& /* rStream */ ) const const ScPatternAttr* pPattern = pData[i].pPattern; pDocPool->StoreSurrogate( rStream, pPattern ); - // FALSE, weil ATTR_CONDITIONAL (noch) nicht in Vorlagen: - if (pPattern->GetItemSet().GetItemState(ATTR_CONDITIONAL,FALSE,&pItem) == SFX_ITEM_SET) + // sal_False, weil ATTR_CONDITIONAL (noch) nicht in Vorlagen: + if (pPattern->GetItemSet().GetItemState(ATTR_CONDITIONAL,sal_False,&pItem) == SFX_ITEM_SET) pDocument->SetConditionalUsed( ((const SfxUInt32Item*)pItem)->GetValue() ); - if (pPattern->GetItemSet().GetItemState(ATTR_VALIDDATA,FALSE,&pItem) == SFX_ITEM_SET) + if (pPattern->GetItemSet().GetItemState(ATTR_VALIDDATA,sal_False,&pItem) == SFX_ITEM_SET) pDocument->SetValidationUsed( ((const SfxUInt32Item*)pItem)->GetValue() ); } #endif // SC_ROWLIMIT_STREAM_ACCESS @@ -2522,7 +2522,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ ) ScReadHeader aHdr( rStream ); - USHORT nNewCount; + sal_uInt16 nNewCount; rStream >> nNewCount; if ( nNewCount > MAXROW+1 ) // wuerde das Array zu gross? { @@ -2531,13 +2531,13 @@ void ScAttrArray::Load( SvStream& /* rStream */ ) return; } - Reset( pDocument->GetDefPattern(), FALSE ); // loeschen + Reset( pDocument->GetDefPattern(), sal_False ); // loeschen pData = new ScAttrEntry[nNewCount]; // neu anlegen for (SCSIZE i=0; i> pData[i].nRow; - USHORT nWhich = ATTR_PATTERN; + sal_uInt16 nWhich = ATTR_PATTERN; const ScPatternAttr* pNewPattern = (const ScPatternAttr*) pDocPool->LoadSurrogate( rStream, nWhich, ATTR_PATTERN ); if (!pNewPattern) @@ -2575,7 +2575,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ ) //UNUSED2008-05 void ScAttrArray::ConvertFontsAfterLoad() //UNUSED2008-05 { //UNUSED2008-05 ScFontToSubsFontConverter_AutoPtr xFontConverter; -//UNUSED2008-05 const ULONG nFlags = FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS; +//UNUSED2008-05 const sal_uLong nFlags = FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS; //UNUSED2008-05 SCSIZE nIndex = 0; //UNUSED2008-05 SCROW nThisRow = 0; //UNUSED2008-05 @@ -2583,7 +2583,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ ) //UNUSED2008-05 { //UNUSED2008-05 const ScPatternAttr* pOldPattern = pData[nIndex].pPattern; //UNUSED2008-05 const SfxPoolItem* pItem; -//UNUSED2008-05 if( pOldPattern->GetItemSet().GetItemState( ATTR_FONT, FALSE, &pItem ) == SFX_ITEM_SET ) +//UNUSED2008-05 if( pOldPattern->GetItemSet().GetItemState( ATTR_FONT, sal_False, &pItem ) == SFX_ITEM_SET ) //UNUSED2008-05 { //UNUSED2008-05 const SvxFontItem* pFontItem = (const SvxFontItem*) pItem; //UNUSED2008-05 const String& rOldName = pFontItem->GetFamilyName(); @@ -2599,7 +2599,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ ) //UNUSED2008-05 RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ); //UNUSED2008-05 ScPatternAttr aNewPattern( *pOldPattern ); //UNUSED2008-05 aNewPattern.GetItemSet().Put( aNewItem ); -//UNUSED2008-05 SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE ); +//UNUSED2008-05 SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True ); //UNUSED2008-05 Search( nThisRow, nIndex ); //! data changed //UNUSED2008-05 } //UNUSED2008-05 } diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 301883197fb8..0573e4fda76f 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -74,31 +74,31 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem); // allgemeine Hilfsfunktionen // -BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther ) +sal_Bool ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther ) { // DBG_ASSERT( pThis || pOther, "LineAttr == 0" ); if (!pThis) - return FALSE; + return sal_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 sal_False; else { if ( pOther->GetInWidth() && !pThis->GetInWidth() ) - return TRUE; + return sal_True; else if ( pThis->GetInWidth() && !pOther->GetInWidth() ) - return FALSE; + return sal_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(nCol),static_cast(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(sal_False), + bHideCell(sal_False), + bHidePrint(sal_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 +sal_Bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) @@ -266,15 +266,15 @@ BOOL ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= (sal_Bool ) bHidePrint; break; default: DBG_ERROR("Wrong MemberID!"); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -BOOL ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; sal_Bool bVal = sal_Bool(); nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) @@ -288,7 +288,7 @@ BOOL ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId ) bHideFormula = aProtection.IsFormulaHidden; bHideCell = aProtection.IsHidden; bHidePrint = aProtection.IsPrintHidden; - bRet = TRUE; + bRet = sal_True; } else { @@ -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 0 ) { pTabArr = new SCTAB [rCpy.nCount]; - for ( USHORT i=0; i 0 ) { - USHORT i=0; + sal_uInt16 i=0; bEqual = ( pTabArr && rCmp.pTabArr ); @@ -608,7 +608,7 @@ SfxItemPresentation ScTableListItem::GetPresentation { rText = '('; if ( nCount>0 && pTabArr ) - for ( USHORT i=0; i 0 ); @@ -645,7 +645,7 @@ SfxItemPresentation ScTableListItem::GetPresentation //UNUSED2009-05 void ScTableListItem::SetTableList( const List& rList ) //UNUSED2009-05 { -//UNUSED2009-05 nCount = (USHORT)rList.Count(); +//UNUSED2009-05 nCount = (sal_uInt16)rList.Count(); //UNUSED2009-05 //UNUSED2009-05 delete [] pTabArr; //UNUSED2009-05 @@ -653,7 +653,7 @@ SfxItemPresentation ScTableListItem::GetPresentation //UNUSED2009-05 { //UNUSED2009-05 pTabArr = new SCTAB [nCount]; //UNUSED2009-05 -//UNUSED2009-05 for ( USHORT i=0; i xContent = new ScHeaderFooterContentObj( pLeftArea, pCenterArea, pRightArea ); rVal <<= xContent; - return TRUE; + return sal_True; } -BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ ) +sal_Bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; uno::Reference xContent; if ( rVal >>= xContent ) { @@ -736,7 +736,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) @@ -745,7 +745,7 @@ BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ ) pRightArea = aEngine.CreateTextObject(); } - bRet = TRUE; + bRet = sal_True; } } } @@ -796,11 +796,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; nParGetParagraphCount() == 0 ) { delete pLeft; @@ -883,7 +883,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; iType() == aExtFileId ) //UNUSED2009-05 { -//UNUSED2009-05 bConvert = TRUE; +//UNUSED2009-05 bConvert = sal_True; //UNUSED2009-05 nConvPara = nPara; //UNUSED2009-05 nConvPos = nPos; //UNUSED2009-05 } //UNUSED2009-05 return EMPTY_STRING; //UNUSED2009-05 } //UNUSED2009-05 -//UNUSED2009-05 BOOL ScFieldChangerEditEngine::ConvertFields() +//UNUSED2009-05 sal_Bool ScFieldChangerEditEngine::ConvertFields() //UNUSED2009-05 { -//UNUSED2009-05 BOOL bConverted = FALSE; +//UNUSED2009-05 sal_Bool bConverted = sal_False; //UNUSED2009-05 do //UNUSED2009-05 { -//UNUSED2009-05 bConvert = FALSE; +//UNUSED2009-05 bConvert = sal_False; //UNUSED2009-05 UpdateFields(); //UNUSED2009-05 if ( bConvert ) //UNUSED2009-05 { //UNUSED2009-05 ESelection aSel( nConvPara, nConvPos, nConvPara, nConvPos+1 ); //UNUSED2009-05 QuickInsertField( SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD), aSel ); -//UNUSED2009-05 bConverted = TRUE; +//UNUSED2009-05 bConverted = sal_True; //UNUSED2009-05 } //UNUSED2009-05 } while ( bConvert ); //UNUSED2009-05 return bConverted; @@ -1027,15 +1027,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(eMode) ) +ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP, ScVObjMode eMode ) + : SfxEnumItem( nWhichP, sal::static_int_cast(eMode) ) { } @@ -1100,7 +1100,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!" ); @@ -1109,7 +1109,7 @@ String ScViewObjectModeItem::GetValueText( USHORT nVal ) const //------------------------------------------------------------------------ -USHORT ScViewObjectModeItem::GetValueCount() const +sal_uInt16 ScViewObjectModeItem::GetValueCount() const { return 2; } @@ -1123,7 +1123,7 @@ SfxPoolItem* ScViewObjectModeItem::Clone( SfxItemPool* ) const //------------------------------------------------------------------------ -USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const +sal_uInt16 ScViewObjectModeItem::GetVersion( sal_uInt16 /* nFileVersion */ ) const { return 1; } @@ -1132,7 +1132,7 @@ USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const SfxPoolItem* ScViewObjectModeItem::Create( SvStream& rStream, - USHORT nVersion ) const + sal_uInt16 nVersion ) const { if ( nVersion == 0 ) { @@ -1141,11 +1141,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); } @@ -1155,7 +1155,7 @@ SfxPoolItem* ScViewObjectModeItem::Create( // double // ----------------------------------------------------------------------- -ScDoubleItem::ScDoubleItem( USHORT nWhichP, double nVal ) +ScDoubleItem::ScDoubleItem( sal_uInt16 nWhichP, double nVal ) : SfxPoolItem ( nWhichP ), nValue ( nVal ) { @@ -1195,7 +1195,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; @@ -1296,23 +1296,23 @@ SfxItemPresentation ScPageScaleToItem::GetPresentation( return ePres; } -BOOL ScPageScaleToItem::QueryValue( uno::Any& rAny, BYTE nMemberId ) const +sal_Bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nMemberId ) { case SC_MID_PAGE_SCALETO_WIDTH: rAny <<= mnWidth; break; case SC_MID_PAGE_SCALETO_HEIGHT: rAny <<= mnHeight; break; default: DBG_ERRORFILE( "ScPageScaleToItem::QueryValue - unknown member ID" ); - bRet = FALSE; + bRet = sal_False; } return bRet; } -BOOL ScPageScaleToItem::PutValue( const uno::Any& rAny, BYTE nMemberId ) +sal_Bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_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 540fb577a79b..90bce11563a0 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -166,7 +166,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( sal_False ); pDoc->SetHardRecalcState( 2 ); } return true; @@ -278,11 +278,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 sal_False; + sal_Bool bIsBroadcasted = sal_False; const ScAddress& rAddress = rHint.GetAddress(); for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin()); aIter != aBroadcastAreaTbl.end(); /* increment in body */ ) @@ -298,7 +298,7 @@ BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea)) { pArea->GetBroadcaster().Broadcast( rHint); - bIsBroadcasted = TRUE; + bIsBroadcasted = sal_True; } } } @@ -306,12 +306,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 sal_False; + sal_Bool bIsBroadcasted = sal_False; for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin()); aIter != aBroadcastAreaTbl.end(); /* increment in body */ ) { @@ -326,7 +326,7 @@ BOOL ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange, if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea)) { pArea->GetBroadcaster().Broadcast( rHint); - bIsBroadcasted = TRUE; + bIsBroadcasted = sal_True; } } } @@ -389,7 +389,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 ); @@ -643,7 +643,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 ) @@ -651,30 +651,30 @@ BOOL ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const if ( pBCAlways ) { pBCAlways->Broadcast( rHint ); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } else { TableSlotsMap::const_iterator iTab( aTableSlotsMap.find( rAddress.Tab())); if (iTab == aTableSlotsMap.end()) - return FALSE; + return sal_False; ScBroadcastAreaSlot* pSlot = (*iTab).second->getAreaSlot( ComputeSlotOffset( rAddress)); if ( pSlot ) return pSlot->AreaBroadcast( rHint ); else - return FALSE; + return sal_False; } } -BOOL ScBroadcastAreaSlotMachine::AreaBroadcastInRange( const ScRange& rRange, +sal_Bool ScBroadcastAreaSlotMachine::AreaBroadcastInRange( const ScRange& rRange, const ScHint& rHint ) const { - BOOL bBroadcasted = FALSE; + sal_Bool bBroadcasted = sal_False; SCTAB nEndTab = rRange.aEnd.Tab(); for (TableSlotsMap::const_iterator iTab( aTableSlotsMap.lower_bound( rRange.aStart.Tab())); iTab != aTableSlotsMap.end() && (*iTab).first <= nEndTab; ++iTab) @@ -898,7 +898,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas( // unchain pArea->SetUpdateChainNext( NULL ); - pArea->SetInUpdateChain( FALSE ); + pArea->SetInUpdateChain( sal_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 aa492630ab0e..3f7cc4cbfdc9 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -64,16 +64,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 ) @@ -86,7 +86,7 @@ ScBaseCell::ScBaseCell( CellType eNewType ) : mpNote( 0 ), mpBroadcaster( 0 ), nTextWidth( TEXTWIDTH_DIRTY ), - eCellType( sal::static_int_cast(eNewType) ), + eCellType( sal::static_int_cast(eNewType) ), nScriptType( SC_SCRIPTTYPE_UNKNOWN ) { } @@ -240,7 +240,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(); @@ -312,7 +312,7 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc ) } } } - pFormCell->SetNeedsListening( FALSE); + pFormCell->SetNeedsListening( sal_False); } } @@ -326,7 +326,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() ) @@ -406,7 +406,7 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr, } -USHORT ScBaseCell::GetErrorCode() const +sal_uInt16 ScBaseCell::GetErrorCode() const { switch ( eCellType ) { @@ -418,45 +418,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 sal_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 sal_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 sal_False; } } @@ -479,7 +479,7 @@ String ScBaseCell::GetStringData() const } // static -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; @@ -500,12 +500,12 @@ BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 ) eType2 = CELLTYPE_NONE; } if ( eType1 != eType2 ) - return FALSE; + return sal_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() ); @@ -534,27 +534,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; iTextEqual(*(ppToken2[i])) ) { - bEqual = FALSE; + bEqual = sal_False; break; } if (bEqual) - return TRUE; + return sal_True; } - return FALSE; // unterschiedlich lang oder unterschiedliche Tokens + return sal_False; // unterschiedlich lang oder unterschiedliche Tokens } default: DBG_ERROR("huch, was fuer Zellen???"); } - return FALSE; + return sal_False; } // ============================================================================ @@ -639,15 +639,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( sal_False ), + bChanged( sal_False ), + bRunning( sal_False ), + bCompile( sal_False ), + bSubTotal( sal_False ), + bIsIterCell( sal_False ), + bInChangeTrack( sal_False ), + bTableOpDirty( sal_False ), + bNeedListening( sal_False ), aPos(0,0,0) { } @@ -655,7 +655,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 ), @@ -668,25 +668,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( sal_False ), + bRunning( sal_False ), + bCompile( sal_False ), + bSubTotal( sal_False ), + bIsIterCell( sal_False ), + bInChangeTrack( sal_False ), + bTableOpDirty( sal_False ), + bNeedListening( sal_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 ), @@ -700,14 +700,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( sal_False ), + bRunning( sal_False ), + bCompile( sal_False ), + bSubTotal( sal_False ), + bIsIterCell( sal_False ), + bInChangeTrack( sal_False ), + bTableOpDirty( sal_False ), + bNeedListening( sal_False ), aPos( rPos ) { // UPN-Array erzeugen @@ -722,7 +722,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos, { pCode->Reset(); if ( pCode->GetNextOpCodeRPN( ocSubTotal ) ) - bSubTotal = TRUE; + bSubTotal = sal_True; } } @@ -742,13 +742,13 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons cMatrixFlag ( rCell.cMatrixFlag ), bDirty( rCell.bDirty ), bChanged( rCell.bChanged ), - bRunning( FALSE ), + bRunning( sal_False ), bCompile( rCell.bCompile ), bSubTotal( rCell.bSubTotal ), - bIsIterCell( FALSE ), - bInChangeTrack( FALSE ), - bTableOpDirty( FALSE ), - bNeedListening( FALSE ), + bIsIterCell( sal_False ), + bInChangeTrack( sal_False ), + bTableOpDirty( sal_False ), + bNeedListening( sal_False ), aPos( rPos ) { pCode = rCell.pCode->Clone(); @@ -762,11 +762,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 = sal_False; + sal_Bool bClipMode = rCell.pDocument->IsClipboard(); if( !bCompile ) { // Name references with references and ColRowNames pCode->Reset(); @@ -784,14 +784,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; } } @@ -808,7 +808,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 ); } } @@ -913,11 +913,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 @@ -938,12 +938,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 ); } @@ -952,7 +952,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() ) @@ -960,13 +960,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 ); @@ -977,9 +977,9 @@ void ScFormulaCell::CompileTokenArray( BOOL bNoListening ) { nFormatType = aComp.GetNumFormatType(); nFormatIndex = 0; - bChanged = TRUE; + bChanged = sal_True; aResult.SetToken( NULL); - bCompile = FALSE; + bCompile = sal_False; if ( !bNoListening ) StartListeningTo( pDocument ); } @@ -1024,14 +1024,14 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) { nFormatType = aComp.GetNumFormatType(); nFormatIndex = 0; - bChanged = TRUE; - bCompile = FALSE; + bChanged = sal_True; + bCompile = sal_False; StartListeningTo( pDocument ); } } else { - bChanged = TRUE; + bChanged = sal_True; SetTextWidth( TEXTWIDTH_DIRTY ); SetScriptType( SC_SCRIPTTYPE_UNKNOWN ); } @@ -1039,21 +1039,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 = sal_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. @@ -1064,9 +1064,9 @@ void ScFormulaCell::CalcAfterLoad() bSubTotal = aComp.CompileTokenArray(); nFormatType = aComp.GetNumFormatType(); nFormatIndex = 0; - bDirty = TRUE; - bCompile = FALSE; - bNewCompiled = TRUE; + bDirty = sal_True; + bCompile = sal_False; + bNewCompiled = sal_True; } // irgendwie koennen unter os/2 mit rotter FPU-Exception /0 ohne Err503 // gespeichert werden, woraufhin spaeter im NumberFormatter die BLC Lib @@ -1076,7 +1076,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 @@ -1093,12 +1093,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. @@ -1275,10 +1275,10 @@ void ScFormulaCell::Interpret() erDEBUGDOT_OUT( pDocument->GetRecursionHelper().GetIteration() ? "magenta" : ""); ScRecursionHelper& rRecursionHelper = pDocument->GetRecursionHelper(); - BOOL bOldRunning = bRunning; + sal_Bool bOldRunning = bRunning; if (rRecursionHelper.GetRecursionCount() > MAXRECURSION) { - bRunning = TRUE; + bRunning = sal_True; rRecursionHelper.SetInRecursionReturn( true); } else @@ -1318,13 +1318,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) @@ -1338,7 +1338,7 @@ void ScFormulaCell::Interpret() } --pIterCell->nSeenInIteration; } - pIterCell->bDirty = TRUE; + pIterCell->bDirty = sal_True; } } else @@ -1355,11 +1355,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()) { @@ -1396,7 +1396,7 @@ void ScFormulaCell::Interpret() ++aIter) { pIterCell = (*aIter).pCell; - pIterCell->bIsIterCell = FALSE; + pIterCell->bIsIterCell = sal_False; pIterCell->nSeenInIteration = 0; pIterCell->bRunning = (*aIter).bOldRunning; } @@ -1409,16 +1409,16 @@ void ScFormulaCell::Interpret() ++aIter) { pIterCell = (*aIter).pCell; - pIterCell->bIsIterCell = FALSE; + pIterCell->bIsIterCell = sal_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 = sal_False; + pIterCell->bTableOpDirty = sal_False; pIterCell->aResult.SetResultError( errNoConvergence); - pIterCell->bChanged = TRUE; + pIterCell->bChanged = sal_True; pIterCell->SetTextWidth( TEXTWIDTH_DIRTY); pIterCell->SetScriptType( SC_SCRIPTTYPE_UNKNOWN); } @@ -1533,12 +1533,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 ); } @@ -1549,8 +1549,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) { @@ -1562,17 +1562,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 = sal_False; // Do not create a HyperLink() cell if the formula results in an error. if( p->GetError() && pCode->IsHyperLink()) - pCode->SetHyperLink(FALSE); + pCode->SetHyperLink(sal_False); if( p->GetError() && p->GetError() != errCircularReference) { - bDirty = FALSE; - bTableOpDirty = FALSE; - bChanged = TRUE; + bDirty = sal_False; + bTableOpDirty = sal_False; + bChanged = sal_True; } if (eTailParam == SCITP_FROM_ITERATION && IsDirtyOrInTableOpDirty()) { @@ -1594,8 +1594,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) if (nSeenInIteration > 1 || pDocument->GetDocOptions().GetIterCount() == 1) { - bDirty = FALSE; - bTableOpDirty = FALSE; + bDirty = sal_False; + bTableOpDirty = sal_False; } } } @@ -1603,21 +1603,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 @@ -1670,7 +1670,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) // no change, see above } else - bContentChanged = TRUE; + bContentChanged = sal_True; } aResult.Assign( aNewResult); @@ -1683,7 +1683,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 ) @@ -1694,8 +1694,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) } if (eTailParam == SCITP_NORMAL) { - bDirty = FALSE; - bTableOpDirty = FALSE; + bDirty = sal_False; + bTableOpDirty = sal_False; } if( aResult.GetMatrix().Is() ) { @@ -1707,7 +1707,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; } @@ -1718,9 +1718,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(), sal_False, sal_True); } if ( !pCode->IsRecalcModeAlways() ) pDocument->RemoveFromFormulaTree( this ); @@ -1729,7 +1729,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 ) { @@ -1747,8 +1747,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 = sal_False; + bTableOpDirty = sal_False; } } @@ -1776,7 +1776,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; @@ -1793,23 +1793,23 @@ void __EXPORT 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 = sal_False; if ( nHint & SC_HINT_TABLEOPDIRTY ) { bForceTrack = !bTableOpDirty; if ( !bTableOpDirty ) { pDocument->AddTableOpFormulaCell( this ); - bTableOpDirty = TRUE; + bTableOpDirty = sal_True; } } else { bForceTrack = !bDirty; - bDirty = TRUE; + bDirty = sal_True; } // #35962# Don't remove from FormulaTree to put in FormulaTrack to // put in FormulaTree again and again, only if necessary. @@ -1832,29 +1832,29 @@ void ScFormulaCell::SetDirty() if ( !IsInChangeTrack() ) { if ( pDocument->GetHardRecalcState() ) - bDirty = TRUE; + bDirty = sal_True; else { // 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 ) ) { - bDirty = TRUE; + bDirty = sal_True; pDocument->AppendToFormulaTrack( this ); pDocument->TrackFormulas(); } } if (pDocument->IsStreamValid(aPos.Tab())) - pDocument->SetStreamValid(aPos.Tab(), FALSE); + pDocument->SetStreamValid(aPos.Tab(), sal_False); } } void ScFormulaCell::SetDirtyAfterLoad() { - bDirty = TRUE; + bDirty = sal_True; if ( !pDocument->GetHardRecalcState() ) pDocument->PutInFormulaTree( this ); } @@ -1864,7 +1864,7 @@ void ScFormulaCell::SetTableOpDirty() if ( !IsInChangeTrack() ) { if ( pDocument->GetHardRecalcState() ) - bTableOpDirty = TRUE; + bTableOpDirty = sal_True; else { if ( !bTableOpDirty || !pDocument->IsInFormulaTree( this ) ) @@ -1872,7 +1872,7 @@ void ScFormulaCell::SetTableOpDirty() if ( !bTableOpDirty ) { pDocument->AddTableOpFormulaCell( this ); - bTableOpDirty = TRUE; + bTableOpDirty = sal_True; } pDocument->AppendToFormulaTrack( this ); pDocument->TrackFormulas( SC_HINT_TABLEOPDIRTY ); @@ -1882,13 +1882,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 @@ -1903,7 +1903,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; @@ -1920,13 +1920,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() ) { @@ -1992,25 +1992,25 @@ 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 sal_True; if ( p->GetType() == svDoubleRef ) { ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2; if ( rRef2.IsColDeleted() || rRef2.IsRowDeleted() || rRef2.IsTabDeleted() || !rRef2.Valid() ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange ) +sal_Bool ScDetectiveRefIter::GetNextRef( ScRange& rRange ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ScToken* p = static_cast(pCode->GetNextReferenceRPN()); if (p) @@ -2028,7 +2028,7 @@ BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange ) 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 = sal_True; } return bRet; diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index 1aab26acf3aa..e4631dde2d9a 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -57,7 +57,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 @@ -153,9 +153,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 ); @@ -393,21 +393,21 @@ bool lcl_isReference(const FormulaToken& rToken) } -BOOL ScFormulaCell::IsEmpty() +sal_Bool ScFormulaCell::IsEmpty() { if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc()) Interpret(); return aResult.GetCellResultType() == formula::svEmptyCell; } -BOOL ScFormulaCell::IsEmptyDisplayedAsString() +sal_Bool ScFormulaCell::IsEmptyDisplayedAsString() { if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc()) Interpret(); return aResult.IsEmptyDisplayedAsString(); } -BOOL ScFormulaCell::IsValue() +sal_Bool ScFormulaCell::IsValue() { if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc()) Interpret(); @@ -451,20 +451,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().Is()) - bDirty = TRUE; + bDirty = sal_True; if ( IsDirtyOrInTableOpDirty() ) Interpret(); } return aResult.GetMatrix(); } -BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const +sal_Bool ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const { switch ( cMatrixFlag ) { case MM_FORMULA : rPos = aPos; - return TRUE; + return sal_True; // break; case MM_REFERENCE : { @@ -477,13 +477,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 sal_False; } @@ -499,7 +499,7 @@ BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const (reserviert: offen: 32) */ -USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) +sal_uInt16 ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) { switch ( cMatrixFlag ) { @@ -532,7 +532,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 ); @@ -544,11 +544,11 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) aAdr.IncCol(); } else - bCont = FALSE; + bCont = sal_False; } while ( bCont ); aAdr = aOrg; aAdr.IncRow(); - bCont = TRUE; + bCont = sal_True; do { pCell = pDocument->GetCell( aAdr ); @@ -560,7 +560,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) aAdr.IncRow(); } else - bCont = FALSE; + bCont = sal_False; } while ( bCont ); pFCell->SetMatColsRows( nC, nR ); } @@ -583,7 +583,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 ) @@ -626,28 +626,28 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) } } -USHORT ScFormulaCell::GetErrCode() +sal_uInt16 ScFormulaCell::GetErrCode() { if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc()) Interpret(); /* 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(pCode->GetNextReferenceRPN()); @@ -661,10 +661,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 sal_False; } bool @@ -721,7 +721,7 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const return false; } -BOOL ScFormulaCell::HasRelNameReference() const +sal_Bool ScFormulaCell::HasRelNameReference() const { pCode->Reset(); ScToken* t; @@ -730,12 +730,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 sal_False; } -BOOL ScFormulaCell::HasColRowName() const +sal_Bool ScFormulaCell::HasColRowName() const { pCode->Reset(); return (pCode->GetNextColRowName() != NULL); @@ -759,8 +759,8 @@ void 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 = sal_False; if (eUpdateRefMode == URM_INSDEL) { bIsInsert = (nDx >= 0 && nDy >= 0 && nDz >= 0); @@ -775,7 +775,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, else if ( nCol > MAXCOL ) nCol = MAXCOL; aPos.SetCol( nCol ); -// bPosChanged = TRUE; +// bPosChanged = sal_True; } } if ( nDy && nCol >= nCol1 && nCol <= nCol2 && @@ -789,7 +789,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, else if ( nRow > MAXROW ) nRow = MAXROW; aPos.SetRow( nRow ); -// bPosChanged = TRUE; +// bPosChanged = sal_True; } } if ( nDz && nCol >= nCol1 && nCol <= nCol2 && @@ -804,19 +804,19 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, else if ( nTab > nMaxTab ) nTab = nMaxTab; aPos.SetTab( nTab ); -// bPosChanged = TRUE; +// bPosChanged = sal_True; } } } else if ( r.In( aPos ) ) { aOldPos.Set( nCol - nDx, nRow - nDy, nTab - nDz ); -// bPosChanged = TRUE; +// bPosChanged = sal_True; } - BOOL bHasRefs = FALSE; - BOOL bHasColRowNames = FALSE; - BOOL bOnRefMove = FALSE; + sal_Bool bHasRefs = sal_False; + sal_Bool bHasColRowNames = sal_False; + sal_Bool bOnRefMove = sal_False; if ( !pDocument->IsClipOrUndo() ) { pCode->Reset(); @@ -832,10 +832,10 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, if( bHasRefs || bOnRefMove ) { ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL; - BOOL bValChanged; + sal_Bool bValChanged; ScRangeData* pRangeData; - BOOL bRangeModified; // any range, not only shared formula - BOOL bRefSizeChanged; + sal_Bool bRangeModified; // any range, not only shared formula + sal_Bool bRefSizeChanged; if ( bHasRefs ) { ScCompiler aComp(pDocument, aPos, *pCode); @@ -847,16 +847,16 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, } else { - bValChanged = FALSE; + bValChanged = sal_False; pRangeData = NULL; - bRangeModified = FALSE; - bRefSizeChanged = FALSE; + bRangeModified = sal_False; + bRefSizeChanged = sal_False; } if ( bOnRefMove ) 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 @@ -865,7 +865,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, (eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0)); if ( bColRowNameCompile ) { - bColRowNameCompile = FALSE; + bColRowNameCompile = sal_False; ScToken* t; ScRangePairList* pColList = pDocument->GetColNameRanges(); ScRangePairList* pRowList = pDocument->GetRowNameRanges(); @@ -881,12 +881,12 @@ void 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() ) @@ -897,12 +897,12 @@ void 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; } } } @@ -913,11 +913,11 @@ void 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(pCode->GetNextColRowName()); if ( t && bMoved ) - bColRowNameCompile = TRUE; + bColRowNameCompile = sal_True; while ( t && !bColRowNameCompile ) { ScSingleRefData& rRef = t->GetSingleRef(); @@ -926,7 +926,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, { ScAddress aAdr( rRef.nCol, rRef.nRow, rRef.nTab ); if ( r.In( aAdr ) ) - bColRowNameCompile = TRUE; + bColRowNameCompile = sal_True; } t = static_cast(pCode->GetNextColRowName()); } @@ -934,13 +934,13 @@ void 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 = sal_False; // RelNameRefs are always moved bHasRelName = HasRelNameReference(); // Reference changed and new listening needed? @@ -960,19 +960,19 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, else { bColRowNameCompile = bHasRelName = bNewListening = bInDeleteUndo = - FALSE; + sal_False; } - BOOL bNeedDirty; + sal_Bool bNeedDirty; // NeedDirty bei Aenderungen ausser Copy und Move/Insert ohne RelNames if ( bRangeModified || pRangeData || bColRowNameCompile || (bValChanged && eUpdateRefMode != URM_COPY && (eUpdateRefMode != URM_MOVE || bHasRelName) && (!bIsInsert || bHasRelName || bInDeleteUndo || bRefSizeChanged)) || bOnRefMove) - bNeedDirty = TRUE; + bNeedDirty = sal_True; else - bNeedDirty = FALSE; + bNeedDirty = sal_False; if (pUndoDoc && (bValChanged || pRangeData || bOnRefMove)) { // Copy the cell to aUndoPos, which is its current position in the document, @@ -990,7 +990,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, pUndoDoc->PutCell( aUndoPos, pFCell ); } } - bValChanged = FALSE; + bValChanged = sal_False; if ( pRangeData ) { // Replace shared formula with own formula pDocument->RemoveFromFormulaTree( this ); // update formula count @@ -1002,13 +1002,13 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, aComp2.SetGrammar(pDocument->GetGrammar()); aComp2.UpdateSharedFormulaReference( eUpdateRefMode, aOldPos, r, nDx, nDy, nDz ); - bValChanged = TRUE; - bNeedDirty = TRUE; + bValChanged = sal_True; + bNeedDirty = sal_True; } if ( ( bCompile = (bCompile || bValChanged || bRangeModified || bColRowNameCompile) ) != 0 ) { CompileTokenArray( bNewListening ); // kein Listening - bNeedDirty = TRUE; + bNeedDirty = sal_True; } if ( !bInDeleteUndo ) { // In ChangeTrack Delete-Reject listeners are established in @@ -1021,7 +1021,7 @@ void 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 ); @@ -1029,9 +1029,9 @@ void 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( sal_False ); SetDirty(); pDocument->SetAutoCalc( bOldAutoCalc ); } @@ -1042,7 +1042,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, void ScFormulaCell::UpdateInsertTab(SCTAB nTable) { - BOOL bPosChanged = ( aPos.Tab() >= nTable ? TRUE : FALSE ); + sal_Bool bPosChanged = ( aPos.Tab() >= nTable ? sal_True : sal_False ); pCode->Reset(); if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() ) { @@ -1053,21 +1053,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, sal_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, sal_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, sal_False, sal_True, bRefChanged ); + bCompile = sal_True; } // kein StartListeningTo weil pTab[nTab] noch nicht existiert! } @@ -1075,10 +1075,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 = sal_False; + sal_Bool bPosChanged = ( aPos.Tab() > nTable ? sal_True : sal_False ); pCode->Reset(); if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() ) { @@ -1089,7 +1089,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, sal_False, bRefChanged); if (pRangeData) // Shared Formula gegen echte Formel { // austauschen pDocument->RemoveFromFormulaTree( this ); // update formula count @@ -1099,13 +1099,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, sal_False, sal_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! } @@ -1126,7 +1126,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, sal_False ); if (pRangeData) // Shared Formula gegen echte Formel { // austauschen pDocument->RemoveFromFormulaTree( this ); // update formula count @@ -1136,8 +1136,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! } @@ -1167,9 +1167,9 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable) } } -BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable) +sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( !pDocument->IsClipOrUndo() ) { pCode->Reset(); @@ -1180,7 +1180,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(); } @@ -1190,7 +1190,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(); } @@ -1201,7 +1201,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(); @@ -1214,7 +1214,7 @@ void ScFormulaCell::UpdateCompile( BOOL bForceIfNameInUse ) void ScFormulaCell::TransposeReference() { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; pCode->Reset(); ScToken* t; while ( ( t = static_cast(pCode->GetNextReference()) ) != NULL ) @@ -1222,11 +1222,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(rRef1.nRelRow); @@ -1239,13 +1239,13 @@ void ScFormulaCell::TransposeReference() rRef2.nRelRow = static_cast(nTemp); } - bFound = TRUE; + bFound = sal_True; } } } if (bFound) - bCompile = TRUE; + bCompile = sal_True; } void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest, @@ -1254,7 +1254,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 = sal_False; // ob diese Zelle bewegt wurde ScRange aDestRange( rDest, ScAddress( static_cast(rDest.Col() + rSource.aEnd.Row() - rSource.aStart.Row()), @@ -1268,11 +1268,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 = sal_False; ScToken* t; ScRangeData* pShared = NULL; @@ -1285,7 +1285,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; } @@ -1293,7 +1293,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(); @@ -1303,7 +1303,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD if ( bMod ) { t->CalcRelFromAbs( aPos ); - bRefChanged = TRUE; + bRefChanged = sal_True; } } } @@ -1313,14 +1313,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(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(); @@ -1343,7 +1343,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(); } @@ -1357,7 +1357,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY { EndListeningTo( pDocument ); - BOOL bRefChanged = FALSE; + sal_Bool bRefChanged = sal_False; ScToken* t; ScRangeData* pShared = NULL; @@ -1370,7 +1370,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; } @@ -1378,7 +1378,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(); @@ -1388,7 +1388,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY if ( bMod ) { t->CalcRelFromAbs( aPos ); - bRefChanged = TRUE; + bRefChanged = sal_True; } } } @@ -1398,14 +1398,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(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(); @@ -1420,7 +1420,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY if (bRefChanged) { - bCompile = TRUE; + bCompile = sal_True; CompileTokenArray(); // ruft auch StartListeningTo SetDirty(); } @@ -1428,39 +1428,39 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY StartListeningTo( pDocument ); // Listener wie vorher } -BOOL lcl_IsRangeNameInUse(USHORT nIndex, ScTokenArray* pCode, ScRangeName* pNames) +sal_Bool lcl_IsRangeNameInUse(sal_uInt16 nIndex, ScTokenArray* pCode, ScRangeName* pNames) { for (FormulaToken* p = pCode->First(); p; p = pCode->Next()) { if (p->GetOpCode() == ocName) { if (p->GetIndex() == nIndex) - return TRUE; + return sal_True; else { // RangeData kann Null sein in bestimmten Excel-Dateien (#31168#) ScRangeData* pSubName = pNames->FindIndex(p->GetIndex()); if (pSubName && lcl_IsRangeNameInUse(nIndex, pSubName->GetCode(), pNames)) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_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& rIndexes, ScTokenArray* pCode, ScRangeName* pNames) +void lcl_FindRangeNamesInUse(std::set& 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->FindIndex(p->GetIndex()); @@ -1470,7 +1470,7 @@ void lcl_FindRangeNamesInUse(std::set& rIndexes, ScTokenArray* pCode, Sc } } -void ScFormulaCell::FindRangeNamesInUse(std::set& rIndexes) const +void ScFormulaCell::FindRangeNamesInUse(std::set& rIndexes) const { lcl_FindRangeNamesInUse( rIndexes, pCode, pDocument->GetRangeName() ); } @@ -1487,7 +1487,7 @@ void ScFormulaCell::ReplaceRangeNamesInUse( const ScRangeData::IndexMap& rMap ) if ( nIndex != nNewIndex ) { p->SetIndex( nNewIndex ); - bCompile = TRUE; + bCompile = sal_True; } } } @@ -1502,7 +1502,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; @@ -1510,14 +1510,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 = sal_False; pCode->Reset(); for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() ) { @@ -1526,11 +1526,11 @@ void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString ) case ocBad: // DB-Bereich evtl. zugefuegt case ocColRowName: // #36762# 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 @@ -1555,20 +1555,20 @@ void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString ) } else if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() ) { - Compile( aResult.GetHybridFormula(), FALSE, eTempGrammar ); + Compile( aResult.GetHybridFormula(), sal_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 = sal_False; pCode->Reset(); for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() ) { @@ -1576,11 +1576,11 @@ void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString ) { case ocBad: // RangeName evtl. zugefuegt case ocColRowName: // #36762# falls Namensgleichheit - bRecompile = TRUE; + bRecompile = sal_True; break; default: if ( p->GetType() == svIndex ) - bRecompile = TRUE; // RangeName + bRecompile = sal_True; // RangeName } } if ( bRecompile ) @@ -1602,7 +1602,7 @@ void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString ) } else if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() ) { - Compile( aResult.GetHybridFormula(), FALSE, eTempGrammar ); + Compile( aResult.GetHybridFormula(), sal_False, eTempGrammar ); aResult.SetToken( NULL); SetDirty(); } @@ -1615,7 +1615,7 @@ void ScFormulaCell::CompileColRowNameFormula() { if ( p->GetOpCode() == ocColRowName ) { - bCompile = TRUE; + bCompile = sal_True; CompileTokenArray(); SetDirty(); break; diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index e9fd26ced939..092e93752124 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -58,7 +58,7 @@ // STATIC DATA ----------------------------------------------------------- using namespace formula; -inline BOOL IsAmbiguousScriptNonZero( BYTE nScript ) +inline sal_Bool IsAmbiguousScriptNonZero( sal_uInt8 nScript ) { //! move to a header file return ( nScript != SCRIPTTYPE_LATIN && @@ -97,13 +97,13 @@ void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc) } -SCsROW ScColumn::GetNextUnprotected( SCROW nRow, BOOL bUp ) const +SCsROW ScColumn::GetNextUnprotected( SCROW nRow, sal_Bool bUp ) const { return pAttrArray->GetNextUnprotected(nRow, bUp); } -USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) const +sal_uInt16 ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const { // nix:0, mitte:1, unten:2, links:4, oben:8, rechts:16, offen:32 if ( !pItems ) @@ -126,8 +126,8 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c else { ScAddress aOrg( ScAddress::INITIALIZE_INVALID ); - BOOL bOpen = FALSE; - USHORT nEdges = 0; + sal_Bool bOpen = sal_False; + sal_uInt16 nEdges = 0; SCSIZE nIndex; Search( nRow1, nIndex ); while ( nIndex < nCount && pItems[nIndex].nRow <= nRow2 ) @@ -140,7 +140,7 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c if ( nEdges ) { if ( nEdges & 8 ) - bOpen = TRUE; // obere Kante oeffnet, weitersehen + bOpen = sal_True; // obere Kante oeffnet, weitersehen else if ( !bOpen ) return nEdges | 32; // es gibt was, was nicht geoeffnet wurde else if ( nEdges & 1 ) @@ -151,7 +151,7 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c || ((nMask & 4) && (nEdges & 16) && !(nEdges & 4)) ) return nEdges; // nur linke/rechte Kante if ( nEdges & 2 ) - bOpen = FALSE; // untere Kante schliesst + bOpen = sal_False; // untere Kante schliesst } } nIndex++; @@ -163,11 +163,11 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c } -BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const +sal_Bool ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const { if ( rMark.IsMultiMarked() ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScAddress aOrg( ScAddress::INITIALIZE_INVALID ); ScAddress aCurOrg( ScAddress::INITIALIZE_INVALID ); @@ -175,8 +175,8 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const ScMarkArrayIter aMarkIter( rMark.GetArray()+nCol ); while ( !bFound && aMarkIter.Next( nTop, nBottom ) ) { - BOOL bOpen = FALSE; - USHORT nEdges; + sal_Bool bOpen = sal_False; + sal_uInt16 nEdges; SCSIZE nIndex; Search( nTop, nIndex ); while ( !bFound && nIndex < nCount && pItems[nIndex].nRow <= nBottom ) @@ -189,16 +189,16 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const if ( nEdges ) { if ( nEdges & 8 ) - bOpen = TRUE; // obere Kante oeffnet, weitersehen + bOpen = sal_True; // obere 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 else if ( nEdges & 1 ) - bFound = TRUE; // mittendrin, alles selektiert? + bFound = sal_True; // mittendrin, alles selektiert? // (4 und nicht 16) oder (16 und nicht 4) if ( (((nEdges & 4) | 16) ^ ((nEdges & 16) | 4)) ) - bFound = TRUE; // nur linke/rechte Kante, alles selektiert? + bFound = sal_True; // nur linke/rechte Kante, alles selektiert? if ( nEdges & 2 ) - bOpen = FALSE; // untere Kante schliesst + bOpen = sal_False; // untere Kante schliesst if ( bFound ) { // alles selektiert? @@ -218,41 +218,41 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const aOrg.Col() + nC - 1, aOrg.Row() + nR - 1, aOrg.Tab() ) ); if ( rMark.IsAllMarked( aRange ) ) - bFound = FALSE; + bFound = sal_False; } else - bFound = FALSE; // war schon + bFound = sal_False; // war schon } } } nIndex++; } if ( bOpen ) - return TRUE; + return sal_True; } return bFound; } else - return FALSE; + return sal_False; } -//UNUSED2009-05 BOOL ScColumn::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, -//UNUSED2009-05 BOOL bLeft, BOOL bRight ) const +//UNUSED2009-05 sal_Bool ScColumn::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes, +//UNUSED2009-05 sal_Bool bLeft, sal_Bool bRight ) const //UNUSED2009-05 { //UNUSED2009-05 return pAttrArray->HasLines( nRow1, nRow2, rSizes, bLeft, bRight ); //UNUSED2009-05 } -bool ScColumn::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const +bool ScColumn::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const { return pAttrArray->HasAttrib( nRow1, nRow2, nMask ); } -BOOL ScColumn::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const +sal_Bool ScColumn::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCROW nTop; SCROW nBottom; @@ -263,7 +263,7 @@ BOOL ScColumn::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const while (aMarkIter.Next( nTop, nBottom ) && !bFound) { if (pAttrArray->HasAttrib( nTop, nBottom, nMask )) - bFound = TRUE; + bFound = sal_True; } } @@ -271,15 +271,15 @@ BOOL ScColumn::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const } -BOOL ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, +sal_Bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL& rPaintCol, SCROW& rPaintRow, - BOOL bRefresh, BOOL bAttrs ) + sal_Bool bRefresh, sal_Bool bAttrs ) { return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh, bAttrs ); } -void ScColumn::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, BOOL bDeep ) const +void ScColumn::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, sal_Bool bDeep ) const { SCROW nTop; SCROW nBottom; @@ -297,7 +297,7 @@ void ScColumn::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkD } -void ScColumn::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, BOOL bDeep ) const +void ScColumn::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, sal_Bool bDeep ) const { pAttrArray->MergePatternArea( nRow1, nRow2, rState, bDeep ); } @@ -305,14 +305,14 @@ void ScColumn::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW void ScColumn::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 { pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight ); } void ScColumn::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner, - SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ) + SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ) { pAttrArray->ApplyBlockFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight ); } @@ -324,7 +324,7 @@ const ScPatternAttr* ScColumn::GetPattern( SCROW nRow ) const } -const SfxPoolItem* ScColumn::GetAttr( SCROW nRow, USHORT nWhich ) const +const SfxPoolItem* ScColumn::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const { return &pAttrArray->GetPattern( nRow )->GetItemSet().Get(nWhich); } @@ -355,7 +355,7 @@ const ScPatternAttr* ScColumn::GetMostUsedPattern( SCROW nStartRow, SCROW nEndRo } -ULONG ScColumn::GetNumberFormat( SCROW nRow ) const +sal_uLong ScColumn::GetNumberFormat( SCROW nRow ) const { return pAttrArray->GetPattern( nRow )->GetNumberFormat( pDocument->GetFormatTable() ); } @@ -365,7 +365,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData { SCROW nTop = 0; SCROW nBottom = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( rMark.IsMultiMarked() ) { @@ -373,7 +373,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData while (aMarkIter.Next( nTop, nBottom )) { pAttrArray->ApplyCacheArea( nTop, nBottom, pCache ); - bFound = TRUE; + bFound = sal_True; } } @@ -386,7 +386,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData } -void ScColumn::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark ) +void ScColumn::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ) { SCROW nTop; SCROW nBottom; @@ -400,7 +400,7 @@ void ScColumn::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark ) } -void ScColumn::ClearSelectionItems( const USHORT* pWhich,const ScMarkData& rMark ) +void ScColumn::ClearSelectionItems( const sal_uInt16* pWhich,const ScMarkData& rMark ) { SCROW nTop; SCROW nBottom; @@ -414,7 +414,7 @@ void ScColumn::ClearSelectionItems( const USHORT* pWhich,const ScMarkData& rMark } -void ScColumn::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark ) +void ScColumn::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark ) { SCROW nTop; SCROW nBottom; @@ -435,9 +435,9 @@ void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr ) const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow ); - // TRUE = alten Eintrag behalten + // sal_True = alten Eintrag behalten - ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, TRUE ); + ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, sal_True ); ScDocumentPool::CheckRef( *pPattern ); ScDocumentPool::CheckRef( *pNewPattern ); @@ -466,7 +466,7 @@ void ScColumn::ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, SCROW nRow1, nRow2; const ScPatternAttr* pPattern = pAttrArray->GetPatternRange( nRow1, nRow2, nRow ); - ULONG nFormat = pPattern->GetNumberFormat( pFormatter ); + sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter ); short nOldType = pFormatter->GetType( nFormat ); if ( nOldType == nNewType || pFormatter->IsCompatible( nOldType, nNewType ) ) nRow = nRow2; @@ -488,7 +488,7 @@ void ScColumn::ApplyStyle( SCROW nRow, const ScStyleSheet& rStyle ) if (pNewPattern) { pNewPattern->SetStyleSheet((ScStyleSheet*)&rStyle); - pAttrArray->SetPattern(nRow, pNewPattern, TRUE); + pAttrArray->SetPattern(nRow, pNewPattern, sal_True); delete pNewPattern; } } @@ -515,7 +515,7 @@ void ScColumn::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& void ScColumn::ApplySelectionLineStyle( const ScMarkData& rMark, - const SvxBorderLine* pLine, BOOL bColorOnly ) + const SvxBorderLine* pLine, sal_Bool bColorOnly ) { if ( bColorOnly && !pLine ) return; @@ -538,16 +538,16 @@ const ScStyleSheet* ScColumn::GetStyle( SCROW nRow ) const } -const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const +const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const { - rFound = FALSE; + rFound = sal_False; if (!rMark.IsMultiMarked()) { DBG_ERROR("ScColumn::GetSelectionStyle ohne Selektion"); return NULL; } - BOOL bEqual = TRUE; + sal_Bool bEqual = sal_True; const ScStyleSheet* pStyle = NULL; const ScStyleSheet* pNewStyle; @@ -564,9 +564,9 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, BOOL& while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != NULL) { pNewStyle = pPattern->GetStyleSheet(); - rFound = TRUE; + rFound = sal_True; if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) - bEqual = FALSE; // unterschiedliche + bEqual = sal_False; // unterschiedliche pStyle = pNewStyle; } } @@ -575,11 +575,11 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, BOOL& } -const ScStyleSheet* ScColumn::GetAreaStyle( BOOL& rFound, SCROW nRow1, SCROW nRow2 ) const +const ScStyleSheet* ScColumn::GetAreaStyle( sal_Bool& rFound, SCROW nRow1, SCROW nRow2 ) const { - rFound = FALSE; + rFound = sal_False; - BOOL bEqual = TRUE; + sal_Bool bEqual = sal_True; const ScStyleSheet* pStyle = NULL; const ScStyleSheet* pNewStyle; @@ -591,9 +591,9 @@ const ScStyleSheet* ScColumn::GetAreaStyle( BOOL& rFound, SCROW nRow1, SCROW nRo while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != NULL) { pNewStyle = pPattern->GetStyleSheet(); - rFound = TRUE; + rFound = sal_True; if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) - bEqual = FALSE; // unterschiedliche + bEqual = sal_False; // unterschiedliche pStyle = pNewStyle; } @@ -605,38 +605,38 @@ void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolR pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset ); } -BOOL ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const +sal_Bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const { return pAttrArray->IsStyleSheetUsed( rStyle, bGatherAllStyles ); } -BOOL ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags ) +sal_Bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ) { return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags ); } -BOOL ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags ) +sal_Bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ) { return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags ); } -void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich ) +void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich ) { pAttrArray->ClearItems( nStartRow, nEndRow, pWhich ); } -void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, BOOL bPutToPool ) +void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, sal_Bool bPutToPool ) { pAttrArray->SetPattern( nRow, &rPatAttr, bPutToPool ); } void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow, - const ScPatternAttr& rPatAttr, BOOL bPutToPool ) + const ScPatternAttr& rPatAttr, sal_Bool bPutToPool ) { pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, bPutToPool ); } @@ -667,9 +667,9 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr ) const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow ); - // TRUE = alten Eintrag behalten + // sal_True = alten Eintrag behalten - ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, TRUE ); + ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, sal_True ); ScDocumentPool::CheckRef( *pPattern ); ScDocumentPool::CheckRef( *pNewPattern ); @@ -683,12 +683,12 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr ) #endif -BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const +sal_Bool ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const { if ( !pItems || !nCount ) { nIndex = 0; - return FALSE; + return sal_False; } SCROW nMinRow = pItems[0].nRow; if ( nRow <= nMinRow ) @@ -702,12 +702,12 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const if ( nRow == nMaxRow ) { nIndex = nCount - 1; - return TRUE; + return sal_True; } else { nIndex = nCount; - return FALSE; + return sal_False; } } @@ -715,9 +715,9 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const long nLo = nOldLo = 0; long nHi = nOldHi = Min(static_cast(nCount)-1, static_cast(nRow) ); long i = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; // quite continuous distribution? => interpolating search - BOOL bInterpol = (static_cast(nMaxRow - nMinRow) < nCount * 2); + sal_Bool bInterpol = (static_cast(nMaxRow - nMinRow) < nCount * 2); SCROW nR; while ( !bFound && nLo <= nHi ) @@ -732,7 +732,7 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const if ( i < 0 || static_cast(i) >= nCount ) { // oops ... i = (nLo+nHi) / 2; - bInterpol = FALSE; + bInterpol = sal_False; } } nR = pItems[i].nRow; @@ -742,7 +742,7 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const if ( bInterpol ) { if ( nLo <= nOldLo ) - bInterpol = FALSE; + bInterpol = sal_False; else nOldLo = nLo; } @@ -755,13 +755,13 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const if ( bInterpol ) { if ( nHi >= nOldHi ) - bInterpol = FALSE; + bInterpol = sal_False; else nOldHi = nHi; } } else - bFound = TRUE; + bFound = sal_True; } } if (bFound) @@ -931,16 +931,16 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2) 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; iTextEqual(*(ppToken2[i])) || ppToken1[i]->Is3DRef() || ppToken2[i]->Is3DRef() ) { - bEqual = FALSE; + bEqual = sal_False; break; } } @@ -1063,11 +1063,11 @@ void ScColumn::SwapCell( SCROW nRow, ScColumn& rCol) } -BOOL ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const +sal_Bool ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const { if (!IsEmpty()) { - BOOL bTest = TRUE; + sal_Bool bTest = sal_True; if (pItems) for (SCSIZE i=0; (i nEndRow) @@ -1083,11 +1083,11 @@ BOOL ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const return bTest; } else - return TRUE; + return sal_True; } -BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const +sal_Bool ScColumn::TestInsertRow( SCSIZE nSize ) const { // AttrArray only looks for merged cells @@ -1101,7 +1101,7 @@ BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const //! rausgeschobene Attribute bei Undo beruecksichtigen if ( nSize > static_cast(MAXROW) ) - return FALSE; + return sal_False; SCSIZE nVis = nCount; while ( nVis && pItems[nVis-1].pCell->IsBlank() ) @@ -1110,7 +1110,7 @@ BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const if ( nVis ) return ( pItems[nVis-1].nRow <= MAXROW-nSize ); else - return TRUE; + return sal_True; #endif } @@ -1129,16 +1129,16 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize ) if ( i >= nCount ) return ; - BOOL bOldAutoCalc = pDocument->GetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden SCSIZE nNewCount = nCount; - BOOL bCountChanged = FALSE; + sal_Bool bCountChanged = sal_False; ScAddress aAdr( nCol, 0, nTab ); 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 ) { @@ -1163,7 +1163,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize ) if ( nNewRow > MAXROW && !bCountChanged ) { nNewCount = i; - bCountChanged = TRUE; + bCountChanged = sal_True; } } } @@ -1180,7 +1180,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize ) if ( nNewRow > MAXROW && !bCountChanged ) { nNewCount = i; - bCountChanged = TRUE; + bCountChanged = sal_True; aRange.aEnd.SetRow( MAXROW ); } } @@ -1222,7 +1222,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize ) } -void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions) +void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions) { pAttrArray->CopyArea( nRow1, nRow2, 0, *rColumn.pAttrArray, bKeepScenarioFlags ? (SC_MF_ALL & ~SC_MF_SCENARIO) : SC_MF_ALL ); @@ -1266,8 +1266,8 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKee } -void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked, - ScColumn& rColumn, const ScMarkData* pMarkData, BOOL bAsLink ) +void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, sal_Bool bMarked, + ScColumn& rColumn, const ScMarkData* pMarkData, sal_Bool bAsLink ) { if (bMarked) { @@ -1280,7 +1280,7 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarke { if ( nEnd >= nRow1 ) CopyToColumn( Max(nRow1,nStart), Min(nRow2,nEnd), - nFlags, FALSE, rColumn, pMarkData, bAsLink ); + nFlags, sal_False, rColumn, pMarkData, bAsLink ); } } else @@ -1302,7 +1302,7 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarke const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow ); ScPatternAttr* pNewPattern = new ScPatternAttr( *pPattern ); pNewPattern->SetStyleSheet( (ScStyleSheet*)pStyle ); - rColumn.pAttrArray->SetPattern( nRow, pNewPattern, TRUE ); + rColumn.pAttrArray->SetPattern( nRow, pNewPattern, sal_True ); delete pNewPattern; } } @@ -1344,16 +1344,16 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarke } -void ScColumn::UndoToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked, +void ScColumn::UndoToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, sal_Bool bMarked, ScColumn& rColumn, const ScMarkData* pMarkData ) { if (nRow1 > 0) - CopyToColumn( 0, nRow1-1, IDF_FORMULA, FALSE, rColumn ); + CopyToColumn( 0, nRow1-1, IDF_FORMULA, sal_False, rColumn ); CopyToColumn( nRow1, nRow2, nFlags, bMarked, rColumn, pMarkData ); //! bMarked ???? if (nRow2 < MAXROW) - CopyToColumn( nRow2+1, MAXROW, IDF_FORMULA, FALSE, rColumn ); + CopyToColumn( nRow2+1, MAXROW, IDF_FORMULA, sal_False, rColumn ); } @@ -1377,7 +1377,7 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const } // Dummy: - // CopyToColumn( 0,MAXROW, IDF_FORMULA, FALSE, rDestCol, NULL, FALSE ); + // CopyToColumn( 0,MAXROW, IDF_FORMULA, sal_False, rDestCol, NULL, sal_False ); } @@ -1394,7 +1394,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol ) { DeleteArea( nStart, nEnd, IDF_CONTENTS ); ((ScColumn&)rSrcCol). - CopyToColumn( nStart, nEnd, IDF_CONTENTS, FALSE, *this ); + CopyToColumn( nStart, nEnd, IDF_CONTENTS, sal_False, *this ); // UpdateUsed nicht noetig, schon in TestCopyScenario passiert @@ -1425,7 +1425,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const { rDestCol.DeleteArea( nStart, nEnd, IDF_CONTENTS ); ((ScColumn*)this)-> - CopyToColumn( nStart, nEnd, IDF_CONTENTS, FALSE, rDestCol ); + CopyToColumn( nStart, nEnd, IDF_CONTENTS, sal_False, rDestCol ); // UpdateUsed nicht noetig, schon in TestCopyScenario passiert @@ -1443,9 +1443,9 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const } -BOOL ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const +sal_Bool ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW ); SCROW nStart = 0, nEnd = 0; const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd ); @@ -1453,7 +1453,7 @@ BOOL ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const { if ( ((ScMergeFlagAttr&)pPattern->GetItem( ATTR_MERGE_FLAG )).IsScenario() ) if ( rDestCol.pAttrArray->HasAttrib( nStart, nEnd, HASATTR_PROTECTED ) ) - bOk = FALSE; + bOk = sal_False; pPattern = aAttrIter.Next( nStart, nEnd ); } @@ -1474,7 +1474,7 @@ void ScColumn::MarkScenarioIn( ScMarkData& rDestMark ) const { aRange.aStart.SetRow( nStart ); aRange.aEnd.SetRow( nEnd ); - rDestMark.SetMultiMarkArea( aRange, TRUE ); + rDestMark.SetMultiMarkArea( aRange, sal_True ); } pPattern = aAttrIter.Next( nStart, nEnd ); @@ -1751,7 +1751,7 @@ void ScColumn::UpdateInsertTabAbs(SCTAB nTable) } -void ScColumn::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScColumn* pRefUndo ) +void ScColumn::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScColumn* pRefUndo ) { if (nTab > nTable) pAttrArray->SetTab(--nTab); @@ -1767,7 +1767,7 @@ void ScColumn::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScColumn* pRefUndo ) back the formula cell while keeping the original note. */ ScBaseCell* pSave = pRefUndo ? pOld->CloneWithoutNote( *pDocument ) : 0; - BOOL bChanged = pOld->UpdateDeleteTab(nTable, bIsMove); + sal_Bool bChanged = pOld->UpdateDeleteTab(nTable, bIsMove); if ( nRow != pItems[i].nRow ) Search( nRow, i ); // Listener geloescht/eingefuegt? @@ -1801,7 +1801,7 @@ void ScColumn::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo ) } -void ScColumn::UpdateCompile( BOOL bForceIfNameInUse ) +void ScColumn::UpdateCompile( sal_Bool bForceIfNameInUse ) { if (pItems) for (SCSIZE i = 0; i < nCount; i++) @@ -1832,9 +1832,9 @@ void ScColumn::SetTabNo(SCTAB nNewTab) } -BOOL ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, USHORT nIndex) const +sal_Bool ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, sal_uInt16 nIndex) const { - BOOL bInUse = FALSE; + sal_Bool bInUse = sal_False; if (pItems) for (SCSIZE i = 0; !bInUse && (i < nCount); i++) if ((pItems[i].nRow >= nRow1) && @@ -1844,7 +1844,7 @@ BOOL ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, USHORT nIndex) const return bInUse; } -void ScColumn::FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set& rIndexes) const +void ScColumn::FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set& rIndexes) const { if (pItems) for (SCSIZE i = 0; i < nCount; i++) @@ -1886,8 +1886,8 @@ void ScColumn::SetDirtyVar() void ScColumn::SetDirty() { // wird nur dokumentweit verwendet, kein FormulaTrack - BOOL bOldAutoCalc = pDocument->GetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for (SCSIZE i=0; iGetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden SCROW nRow2 = rRange.aEnd.Row(); ScAddress aPos( nCol, 0, nTab ); ScHint aHint( SC_HINT_DATACHANGED, aPos, NULL ); @@ -1935,8 +1935,8 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange ) { if ( !pItems || !nCount ) return ; - BOOL bOldAutoCalc = pDocument->GetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // no multiple recalculation + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // no multiple recalculation SCROW nRow2 = rRange.aEnd.Row(); ScAddress aPos( nCol, 0, nTab ); ScHint aHint( SC_HINT_TABLEOPDIRTY, aPos, NULL ); @@ -1962,8 +1962,8 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange ) void ScColumn::SetDirtyAfterLoad() { - BOOL bOldAutoCalc = pDocument->GetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for (SCSIZE i=0; iGetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for (SCSIZE i=0; inError=0 + // bCompile=sal_True und pCode->nError=0 ((ScFormulaCell*)pCell)->GetCode()->SetCodeError( 0 ); - ((ScFormulaCell*)pCell)->SetCompile( TRUE ); + ((ScFormulaCell*)pCell)->SetCompile( sal_True ); ((ScFormulaCell*)pCell)->CompileTokenArray(); if ( nRow != pItems[i].nRow ) Search( nRow, i ); // Listener geloescht/eingefuegt? @@ -2101,14 +2101,14 @@ void ScColumn::ResetChanged( SCROW nStartRow, SCROW nEndRow ) } -BOOL ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const +sal_Bool ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const { // used in GetOptimalHeight - ambiguous script type counts as edit cell SCROW nRow = 0; SCSIZE nIndex; Search(nStartRow,nIndex); - while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE ) + while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : sal_False ) { ScBaseCell* pCell = pItems[nIndex].pCell; CellType eCellType = pCell->GetCellType(); @@ -2117,17 +2117,17 @@ BOOL ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const ((eCellType == CELLTYPE_FORMULA) && ((ScFormulaCell*)pCell)->IsMultilineResult()) ) { rFirst = nRow; - return TRUE; + return sal_True; } ++nIndex; } - return FALSE; + return sal_False; } SCsROW ScColumn::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle, - BOOL bUp, BOOL bInSelection, const ScMarkData& rMark ) + sal_Bool bUp, sal_Bool bInSelection, const ScMarkData& rMark ) { if (bInSelection) { @@ -2142,8 +2142,8 @@ SCsROW ScColumn::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle, } -BOOL ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, - BOOL bUp, BOOL bInSelection, const ScMarkData& rMark ) +sal_Bool ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, + sal_Bool bUp, sal_Bool bInSelection, const ScMarkData& rMark ) { if (bInSelection) { @@ -2151,7 +2151,7 @@ BOOL ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleShe return pAttrArray->SearchStyleRange( rRow, rEndRow, pSearchStyle, bUp, (ScMarkArray*) rMark.GetArray()+nCol ); //! const else - return FALSE; + return sal_False; } else return pAttrArray->SearchStyleRange( rRow, rEndRow, pSearchStyle, bUp, NULL ); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 2adf6d926f0f..0cffd3bef163 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -77,7 +77,7 @@ // ----------------------------------------------------------------------- -inline BOOL IsAmbiguousScript( BYTE nScript ) +inline sal_Bool IsAmbiguousScript( sal_uInt8 nScript ) { //! move to a header file return ( nScript != SCRIPTTYPE_LATIN && @@ -114,9 +114,9 @@ inline BOOL IsAmbiguousScript( BYTE nScript ) //UNUSED2008-05 // (because CELLTYPE_SYMBOLS wasn't written in the file) //UNUSED2008-05 //UNUSED2008-05 ScFontToSubsFontConverter_AutoPtr xFontConverter; -//UNUSED2008-05 const ULONG nFontConverterFlags = FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS; +//UNUSED2008-05 const sal_uLong nFontConverterFlags = FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS; //UNUSED2008-05 -//UNUSED2008-05 BOOL bListInitialized = FALSE; +//UNUSED2008-05 sal_Bool bListInitialized = sal_False; //UNUSED2008-05 ScSymbolStringCellEntry* pCurrentEntry = NULL; //UNUSED2008-05 //UNUSED2008-05 ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW ); @@ -138,7 +138,7 @@ inline BOOL IsAmbiguousScript( BYTE nScript ) //UNUSED2008-05 if (!bListInitialized) //UNUSED2008-05 { //UNUSED2008-05 pCurrentEntry = (ScSymbolStringCellEntry*)rList.First(); -//UNUSED2008-05 bListInitialized = TRUE; +//UNUSED2008-05 bListInitialized = sal_True; //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 while ( pCurrentEntry && pCurrentEntry->nRow < nRow ) @@ -187,7 +187,7 @@ inline BOOL IsAmbiguousScript( BYTE nScript ) long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bWidth, const ScNeededSizeOptions& rOptions ) + sal_Bool bWidth, const ScNeededSizeOptions& rOptions ) { long nValue=0; SCSIZE nIndex; @@ -230,7 +230,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, const SfxPoolItem* pCondItem; SvxCellHorJustify eHorJust; if (pCondSet && - pCondSet->GetItemState(ATTR_HOR_JUSTIFY, TRUE, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_HOR_JUSTIFY, sal_True, &pCondItem) == SFX_ITEM_SET) eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem*)pCondItem)->GetValue(); else eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&) @@ -239,7 +239,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, if ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) bBreak = true; else if ( pCondSet && - pCondSet->GetItemState(ATTR_LINEBREAK, TRUE, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_LINEBREAK, sal_True, &pCondItem) == SFX_ITEM_SET) bBreak = ((const SfxBoolItem*)pCondItem)->GetValue(); else bBreak = ((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue(); @@ -251,7 +251,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, // get other attributes from pattern and conditional formatting SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet ); - BOOL bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED && + sal_Bool bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED && ((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN, pCondSet )).GetValue() ); if ( bAsianVertical ) bBreak = false; @@ -264,14 +264,14 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, if ( eOrient == SVX_ORIENTATION_STANDARD ) { if (pCondSet && - pCondSet->GetItemState(ATTR_ROTATE_VALUE, TRUE, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_ROTATE_VALUE, sal_True, &pCondItem) == SFX_ITEM_SET) nRotate = ((const SfxInt32Item*)pCondItem)->GetValue(); else nRotate = ((const SfxInt32Item&)pPattern->GetItem(ATTR_ROTATE_VALUE)).GetValue(); if ( nRotate ) { if (pCondSet && - pCondSet->GetItemState(ATTR_ROTATE_MODE, TRUE, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_ROTATE_MODE, sal_True, &pCondItem) == SFX_ITEM_SET) eRotMode = (SvxRotateMode)((const SvxRotateModeItem*)pCondItem)->GetValue(); else eRotMode = (SvxRotateMode)((const SvxRotateModeItem&) @@ -287,26 +287,26 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, // ignore orientation/rotation if "repeat" is active eOrient = SVX_ORIENTATION_STANDARD; nRotate = 0; - bAsianVertical = FALSE; + bAsianVertical = sal_False; } const SvxMarginItem* pMargin; if (pCondSet && - pCondSet->GetItemState(ATTR_MARGIN, TRUE, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_MARGIN, sal_True, &pCondItem) == SFX_ITEM_SET) pMargin = (const SvxMarginItem*) pCondItem; else pMargin = (const SvxMarginItem*) &pPattern->GetItem(ATTR_MARGIN); - USHORT nIndent = 0; + sal_uInt16 nIndent = 0; if ( eHorJust == SVX_HOR_JUSTIFY_LEFT ) { if (pCondSet && - pCondSet->GetItemState(ATTR_INDENT, TRUE, &pCondItem) == SFX_ITEM_SET) + pCondSet->GetItemState(ATTR_INDENT, sal_True, &pCondItem) == SFX_ITEM_SET) nIndent = ((const SfxUInt16Item*)pCondItem)->GetValue(); else nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue(); } - BYTE nScript = pDocument->GetScriptType( nCol, nRow, nTab, pCell ); + sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pCell ); if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType(); // also call SetFont for edit cells, because bGetFont may be set only once @@ -320,10 +320,10 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, pDev->SetFont(aFont); } - BOOL bAddMargin = TRUE; + sal_Bool bAddMargin = sal_True; CellType eCellType = pCell->GetCellType(); - BOOL bEditEngine = ( eCellType == CELLTYPE_EDIT || + sal_Bool bEditEngine = ( eCellType == CELLTYPE_EDIT || eOrient == SVX_ORIENTATION_STACKED || IsAmbiguousScript( nScript ) || ((eCellType == CELLTYPE_FORMULA) && ((ScFormulaCell*)pCell)->IsMultilineResult()) ); @@ -333,10 +333,10 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, String aValStr; Color* pColor; SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); - ULONG nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); + sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); ScCellFormat::GetString( pCell, nFormat, aValStr, &pColor, *pFormatter, - TRUE, rOptions.bFormula, ftCheck ); + sal_True, rOptions.bFormula, ftCheck ); if (aValStr.Len()) { // SetFont ist nach oben verschoben @@ -362,7 +362,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, else if ( rOptions.bTotalSize ) { nWidth = (long) ( pDocument->GetColWidth( nCol,nTab ) * nPPT ); - bAddMargin = FALSE; + bAddMargin = sal_False; // nur nach rechts: //! unterscheiden nach Ausrichtung oben/unten (nur Text/ganze Hoehe) if ( pPattern->GetRotateDir( pCondSet ) == SC_ROTDIR_RIGHT ) @@ -411,7 +411,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, * nPPT ); nDocPixel = (nDocPixel * 9) / 10; // zur Sicherheit if ( aSize.Width() > nDocPixel ) - bEditEngine = TRUE; + bEditEngine = sal_True; } } } @@ -426,7 +426,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, // am Dokument speichern ? ScFieldEditEngine* pEngine = pDocument->CreateFieldEditEngine(); - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); MapMode aOld = pDev->GetMapMode(); pDev->SetMapMode( aHMMMode ); pEngine->SetRefDevice( pDev ); @@ -451,7 +451,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, else if (bBreak) { double fWidthFactor = nPPTX; - BOOL bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER ); + sal_Bool bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER ); if ( bTextWysiwyg ) { // #95593# if text is formatted for printer, don't use PixelToLogic, @@ -494,22 +494,22 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, { Color* pColor; SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); - ULONG nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); + sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet ); String aString; ScCellFormat::GetString( pCell, nFormat, aString, &pColor, *pFormatter, - TRUE, rOptions.bFormula, ftCheck ); + sal_True, rOptions.bFormula, ftCheck ); if (aString.Len()) pEngine->SetTextNewDefaults(aString, pSet); else pEngine->SetDefaults(pSet); } - BOOL bEngineVertical = pEngine->IsVertical(); + sal_Bool bEngineVertical = pEngine->IsVertical(); pEngine->SetVertical( bAsianVertical ); - pEngine->SetUpdateMode( TRUE ); + pEngine->SetUpdateMode( sal_True ); - BOOL bEdWidth = bWidth; + sal_Bool bEdWidth = bWidth; if ( eOrient != SVX_ORIENTATION_STANDARD && eOrient != SVX_ORIENTATION_STACKED ) bEdWidth = !bEdWidth; if ( nRotate ) @@ -527,7 +527,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, else if ( rOptions.bTotalSize ) { nWidth = (long) ( pDocument->GetColWidth( nCol,nTab ) * nPPT ); - bAddMargin = FALSE; + bAddMargin = sal_False; if ( pPattern->GetRotateDir( pCondSet ) == SC_ROTDIR_RIGHT ) nWidth += (long)( pDocument->GetRowHeight( nRow,nTab ) * nPPT * nCosAbs / nSinAbs ); @@ -603,7 +603,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, // 20 * nZoom/100 // bedingte Formatierung hier nicht interessant - INT16 nFlags = ((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue(); + sal_Int16 nFlags = ((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue(); if (nFlags & SC_MF_AUTO) nValue += (rZoomX.GetNumerator()*20)/rZoomX.GetDenominator(); } @@ -612,7 +612,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, } long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev, - BOOL bWidth ) + sal_Bool bWidth ) { long nValue=0; if ( nIndex < nCount ) @@ -623,9 +623,9 @@ long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev, String aValStr; Color* pColor; SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); - ULONG nFormat = pPattern->GetNumberFormat( pFormatter ); + sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter ); ScCellFormat::GetString( pCell, nFormat, aValStr, &pColor, - *pFormatter, TRUE, FALSE, ftCheck ); + *pFormatter, sal_True, sal_False, ftCheck ); if ( aValStr.Len() ) { if ( bWidth ) @@ -637,20 +637,20 @@ long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev, return nValue; } -USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY, +sal_uInt16 ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bFormula, USHORT nOldWidth, + sal_Bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, - BOOL bSimpleTextImport ) + sal_Bool bSimpleTextImport ) { if (nCount == 0) return nOldWidth; - USHORT nWidth = (USHORT) (nOldWidth * nPPTX); - BOOL bFound = FALSE; + sal_uInt16 nWidth = (sal_uInt16) (nOldWidth * nPPTX); + sal_Bool bFound = sal_False; SCSIZE nIndex; - ScMarkedDataIter aDataIter(this, pMarkData, TRUE); + ScMarkedDataIter aDataIter(this, pMarkData, sal_True); if ( bSimpleTextImport ) { // alles eins bis auf NumberFormate const ScPatternAttr* pPattern = GetPattern( 0 ); @@ -664,14 +664,14 @@ USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nP while (aDataIter.Next( nIndex )) { - USHORT nThis = (USHORT) (GetSimpleTextNeededSize( nIndex, pDev, - TRUE ) + nMargin); + sal_uInt16 nThis = (sal_uInt16) (GetSimpleTextNeededSize( nIndex, pDev, + sal_True ) + nMargin); if (nThis) { if (nThis>nWidth || !bFound) { nWidth = nThis; - bFound = TRUE; + bFound = sal_True; } } } @@ -681,27 +681,27 @@ USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nP ScNeededSizeOptions aOptions; aOptions.bFormula = bFormula; const ScPatternAttr* pOldPattern = NULL; - BYTE nOldScript = 0; + sal_uInt8 nOldScript = 0; while (aDataIter.Next( nIndex )) { SCROW nRow = pItems[nIndex].nRow; - BYTE nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell ); + sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell ); if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType(); const ScPatternAttr* pPattern = GetPattern( nRow ); aOptions.pPattern = pPattern; aOptions.bGetFont = (pPattern != pOldPattern || nScript != nOldScript); - USHORT nThis = (USHORT) GetNeededSize( nRow, pDev, nPPTX, nPPTY, - rZoomX, rZoomY, TRUE, aOptions ); + sal_uInt16 nThis = (sal_uInt16) GetNeededSize( nRow, pDev, nPPTX, nPPTY, + rZoomX, rZoomY, sal_True, aOptions ); pOldPattern = pPattern; if (nThis) { if (nThis>nWidth || !bFound) { nWidth = nThis; - bFound = TRUE; + bFound = sal_True; } } } @@ -710,16 +710,16 @@ USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nP if (bFound) { nWidth += 2; - USHORT nTwips = (USHORT) (nWidth / nPPTX); + sal_uInt16 nTwips = (sal_uInt16) (nWidth / nPPTX); return nTwips; } else return nOldWidth; } -USHORT lcl_GetAttribHeight( const ScPatternAttr& rPattern, USHORT nFontHeightId ) +sal_uInt16 lcl_GetAttribHeight( const ScPatternAttr& rPattern, sal_uInt16 nFontHeightId ) { - USHORT nHeight = (USHORT) ((const SvxFontHeightItem&) rPattern.GetItem(nFontHeightId)).GetHeight(); + sal_uInt16 nHeight = (sal_uInt16) ((const SvxFontHeightItem&) rPattern.GetItem(nFontHeightId)).GetHeight(); const SvxMarginItem* pMargin = (const SvxMarginItem*) &rPattern.GetItem(ATTR_MARGIN); nHeight += nHeight / 5; // gibt bei 10pt 240 @@ -734,7 +734,7 @@ USHORT lcl_GetAttribHeight( const ScPatternAttr& rPattern, USHORT nFontHeightId if ( nHeight + 240 > ScGlobal::nDefFontHeight ) { - nHeight = sal::static_int_cast( nHeight + ScGlobal::nDefFontHeight ); + nHeight = sal::static_int_cast( nHeight + ScGlobal::nDefFontHeight ); nHeight -= 240; } @@ -753,11 +753,11 @@ USHORT lcl_GetAttribHeight( const ScPatternAttr& rPattern, USHORT nFontHeightId // nMinHeight, nMinStart zur Optimierung: ab nRow >= nMinStart ist mindestens nMinHeight // (wird nur bei bStdAllowed ausgewertet) -void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight, +void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16* pHeight, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - BOOL bShrink, USHORT nMinHeight, SCROW nMinStart ) + sal_Bool bShrink, sal_uInt16 nMinHeight, SCROW nMinStart ) { ScAttrIterator aIter( pAttrArray, nStartRow, nEndRow ); @@ -782,11 +782,11 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight else { SCROW nRow = 0; - BOOL bStdAllowed = (pPattern->GetCellOrientation() == SVX_ORIENTATION_STANDARD); - BOOL bStdOnly = FALSE; + sal_Bool bStdAllowed = (pPattern->GetCellOrientation() == SVX_ORIENTATION_STANDARD); + sal_Bool bStdOnly = sal_False; if (bStdAllowed) { - 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); @@ -795,12 +795,12 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight // bedingte Formatierung: Zellen durchgehen if ( bStdOnly && ((const SfxUInt32Item&)pPattern-> GetItem(ATTR_CONDITIONAL)).GetValue() ) - bStdOnly = FALSE; + bStdOnly = sal_False; // gedrehter Text: Zellen durchgehen if ( bStdOnly && ((const SfxInt32Item&)pPattern-> GetItem(ATTR_ROTATE_VALUE)).GetValue() ) - bStdOnly = FALSE; + bStdOnly = sal_False; } if (bStdOnly) @@ -808,11 +808,11 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight { if (nEditPos == nStart) { - bStdOnly = FALSE; + bStdOnly = sal_False; if (nEnd > nEditPos) nNextEnd = nEnd; nEnd = nEditPos; // einzeln ausrechnen - bStdAllowed = FALSE; // wird auf jeden Fall per Zelle berechnet + bStdAllowed = sal_False; // wird auf jeden Fall per Zelle berechnet } else { @@ -823,11 +823,11 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight if (bStdAllowed) { - USHORT nLatHeight = 0; - USHORT nCjkHeight = 0; - USHORT nCtlHeight = 0; - USHORT nDefHeight; - BYTE nDefScript = ScGlobal::GetDefaultScriptType(); + sal_uInt16 nLatHeight = 0; + sal_uInt16 nCjkHeight = 0; + sal_uInt16 nCtlHeight = 0; + sal_uInt16 nDefHeight; + sal_uInt8 nDefScript = ScGlobal::GetDefaultScriptType(); if ( nDefScript == SCRIPTTYPE_ASIAN ) nDefHeight = nCjkHeight = lcl_GetAttribHeight( *pPattern, ATTR_CJK_FONT_HEIGHT ); else if ( nDefScript == SCRIPTTYPE_COMPLEX ) @@ -854,7 +854,7 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight Search(nStart,nIndex); while ( nIndex < nCount && (nRow=pItems[nIndex].nRow) <= nEnd ) { - BYTE nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell ); + sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell ); if ( nScript != nDefScript ) { if ( nScript == SCRIPTTYPE_ASIAN ) @@ -890,16 +890,16 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight SCSIZE nIndex; Search(nStart,nIndex); - while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEnd) : FALSE ) + while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEnd) : sal_False ) { // Zellhoehe nur berechnen, wenn sie spaeter auch gebraucht wird (#37928#) if ( bShrink || !(pDocument->GetRowFlags(nRow, nTab) & CR_MANUALSIZE) ) { aOptions.pPattern = pPattern; - USHORT nHeight = (USHORT) + sal_uInt16 nHeight = (sal_uInt16) ( GetNeededSize( nRow, pDev, nPPTX, nPPTY, - rZoomX, rZoomY, FALSE, aOptions ) / nPPTY ); + rZoomX, rZoomY, sal_False, aOptions ) / nPPTY ); if (nHeight > pHeight[nRow-nStartRow]) pHeight[nRow-nStartRow] = nHeight; } @@ -919,9 +919,9 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight } } -BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& rData) const +sal_Bool ScColumn::GetNextSpellingCell(SCROW& nRow, sal_Bool bInSel, const ScMarkData& rData) const { - BOOL bStop = FALSE; + sal_Bool bStop = sal_False; CellType eCellType; SCSIZE nIndex; if (!bInSel && Search(nRow, nIndex)) @@ -930,17 +930,17 @@ BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& r if ( (eCellType == CELLTYPE_STRING || eCellType == CELLTYPE_EDIT) && !(HasAttrib( nRow, nRow, HASATTR_PROTECTED) && pDocument->IsTabProtected(nTab)) ) - return TRUE; + return sal_True; } while (!bStop) { if (bInSel) { - nRow = rData.GetNextMarked(nCol, nRow, FALSE); + nRow = rData.GetNextMarked(nCol, nRow, sal_False); if (!ValidRow(nRow)) { nRow = MAXROW+1; - bStop = TRUE; + bStop = sal_True; } else { @@ -948,7 +948,7 @@ BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& r if ( (eCellType == CELLTYPE_STRING || eCellType == CELLTYPE_EDIT) && !(HasAttrib( nRow, nRow, HASATTR_PROTECTED) && pDocument->IsTabProtected(nTab)) ) - return TRUE; + return sal_True; else nRow++; } @@ -959,17 +959,17 @@ BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& r if ( (eCellType == CELLTYPE_STRING || eCellType == CELLTYPE_EDIT) && !(HasAttrib( nRow, nRow, HASATTR_PROTECTED) && pDocument->IsTabProtected(nTab)) ) - return TRUE; + return sal_True; else nRow++; } else { nRow = MAXROW+1; - bStop = TRUE; + bStop = sal_True; } } - return FALSE; + return sal_False; } // ========================================================================================= @@ -1047,8 +1047,8 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow ) pEngine->SetKernAsianPunctuation( pDocument->GetAsianKerning() ); } pEngine->SetText( *pData ); - USHORT nParCount = pEngine->GetParagraphCount(); - for (USHORT nPar=0; nParGetParagraphCount(); + for (sal_uInt16 nPar=0; nParQuickRemoveCharAttribs( nPar ); const SfxItemSet& rOld = pEngine->GetParaAttribs( nPar ); @@ -1059,16 +1059,16 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow ) } } // URL-Felder in Text wandeln (andere gibt's nicht, darum pType=0) - pEngine->RemoveFields( TRUE ); + pEngine->RemoveFields( sal_True ); - BOOL bSpellErrors = pEngine->HasOnlineSpellErrors(); - BOOL bNeedObject = bSpellErrors || nParCount>1; // Errors/Absaetze behalten + sal_Bool bSpellErrors = pEngine->HasOnlineSpellErrors(); + sal_Bool bNeedObject = bSpellErrors || nParCount>1; // Errors/Absaetze behalten // ScEditAttrTester nicht mehr noetig, Felder sind raus if ( bNeedObject ) // bleibt Edit-Zelle { - 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 ); EditTextObject* pNewData = pEngine->CreateTextObject(); @@ -1091,14 +1091,14 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow ) // ========================================================================================= -BOOL ScColumn::TestTabRefAbs(SCTAB nTable) +sal_Bool ScColumn::TestTabRefAbs(SCTAB nTable) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (pItems) for (SCSIZE i = 0; i < nCount; i++) if ( pItems[i].pCell->GetCellType() == CELLTYPE_FORMULA ) if (((ScFormulaCell*)pItems[i].pCell)->TestTabRefAbs(nTable)) - bRet = TRUE; + bRet = sal_True; return bRet; } @@ -1116,7 +1116,7 @@ ScColumnIterator::~ScColumnIterator() { } -BOOL ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell ) +sal_Bool ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell ) { if ( nPos < pColumn->nCount ) { @@ -1125,13 +1125,13 @@ BOOL ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell ) { rpCell = pColumn->pItems[nPos].pCell; ++nPos; - return TRUE; + return sal_True; } } rRow = 0; rpCell = NULL; - return FALSE; + return sal_False; } SCSIZE ScColumnIterator::GetIndex() const // Index zur letzen abgefragten Zelle @@ -1142,10 +1142,10 @@ SCSIZE ScColumnIterator::GetIndex() const // Index zur letzen abgefrag // ----------------------------------------------------------------------------------------- ScMarkedDataIter::ScMarkedDataIter( const ScColumn* pCol, const ScMarkData* pMarkData, - BOOL bAllIfNone ) : + sal_Bool bAllIfNone ) : pColumn( pCol ), pMarkIter( NULL ), - bNext( TRUE ), + bNext( sal_True ), bAll( bAllIfNone ) { if (pMarkData && pMarkData->IsMultiMarked()) @@ -1157,9 +1157,9 @@ ScMarkedDataIter::~ScMarkedDataIter() delete pMarkIter; } -BOOL ScMarkedDataIter::Next( SCSIZE& rIndex ) +sal_Bool ScMarkedDataIter::Next( SCSIZE& rIndex ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; do { if (bNext) @@ -1172,28 +1172,28 @@ BOOL ScMarkedDataIter::Next( SCSIZE& rIndex ) nBottom = MAXROW; } else - return FALSE; + return sal_False; } pColumn->Search( nTop, nPos ); - bNext = FALSE; - bAll = FALSE; // nur beim ersten Versuch + bNext = sal_False; + bAll = sal_False; // nur beim ersten Versuch } if ( nPos >= pColumn->nCount ) - return FALSE; + return sal_False; if ( pColumn->pItems[nPos].nRow <= nBottom ) - bFound = TRUE; + bFound = sal_True; else - bNext = TRUE; + bNext = sal_True; } while (!bFound); rIndex = nPos++; - return TRUE; + return sal_True; } -//UNUSED2009-05 USHORT ScColumn::GetErrorData( SCROW nRow ) const +//UNUSED2009-05 sal_uInt16 ScColumn::GetErrorData( SCROW nRow ) const //UNUSED2009-05 { //UNUSED2009-05 SCSIZE nIndex; //UNUSED2009-05 if (Search(nRow, nIndex)) @@ -1213,24 +1213,24 @@ BOOL ScMarkedDataIter::Next( SCSIZE& rIndex ) //------------ -BOOL ScColumn::IsEmptyData() const +sal_Bool ScColumn::IsEmptyData() const { return (nCount == 0); } -BOOL ScColumn::IsEmptyVisData(BOOL bNotes) const +sal_Bool ScColumn::IsEmptyVisData(sal_Bool bNotes) const { if (!pItems || nCount == 0) - return TRUE; + return sal_True; else { - BOOL bVisData = FALSE; + sal_Bool bVisData = sal_False; SCSIZE i; for (i=0; iGetCellType() != CELLTYPE_NOTE || (bNotes && pCell->HasNote()) ) - bVisData = TRUE; + bVisData = sal_True; } return !bVisData; } @@ -1255,20 +1255,20 @@ SCSIZE ScColumn::VisibleCount( SCROW nStartRow, SCROW nEndRow ) const return nVisCount; } -SCROW ScColumn::GetLastVisDataPos(BOOL bNotes) const +SCROW ScColumn::GetLastVisDataPos(sal_Bool bNotes) const { SCROW nRet = 0; if (pItems) { SCSIZE i; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (i=nCount; i>0 && !bFound; ) { --i; ScBaseCell* pCell = pItems[i].pCell; if ( pCell->GetCellType() != CELLTYPE_NOTE || (bNotes && pCell->HasNote()) ) { - bFound = TRUE; + bFound = sal_True; nRet = pItems[i].nRow; } } @@ -1276,19 +1276,19 @@ SCROW ScColumn::GetLastVisDataPos(BOOL bNotes) const return nRet; } -SCROW ScColumn::GetFirstVisDataPos(BOOL bNotes) const +SCROW ScColumn::GetFirstVisDataPos(sal_Bool bNotes) const { SCROW nRet = 0; if (pItems) { SCSIZE i; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (i=0; iGetCellType() != CELLTYPE_NOTE || (bNotes && pCell->HasNote()) ) { - bFound = TRUE; + bFound = sal_True; nRet = pItems[i].nRow; } } @@ -1296,49 +1296,49 @@ SCROW ScColumn::GetFirstVisDataPos(BOOL bNotes) const return nRet; } -BOOL ScColumn::HasVisibleDataAt(SCROW nRow) const +sal_Bool ScColumn::HasVisibleDataAt(SCROW nRow) const { SCSIZE nIndex; if (Search(nRow, nIndex)) if (!pItems[nIndex].pCell->IsBlank()) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL ScColumn::IsEmptyAttr() const +sal_Bool ScColumn::IsEmptyAttr() const { if (pAttrArray) return pAttrArray->IsEmpty(); else - return TRUE; + return sal_True; } -BOOL ScColumn::IsEmpty() const +sal_Bool ScColumn::IsEmpty() const { return (IsEmptyData() && IsEmptyAttr()); } -BOOL ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes) const +sal_Bool ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes) const { if ( nCount == 0 || !pItems ) - return TRUE; + return sal_True; SCSIZE nIndex; Search( nStartRow, nIndex ); while ( nIndex < nCount && pItems[nIndex].nRow <= nEndRow ) { if ( !pItems[nIndex].pCell->IsBlank( bIgnoreNotes ) ) // found a cell - return FALSE; // not empty + return sal_False; // not empty ++nIndex; } - return TRUE; // no cell found + return sal_True; // no cell found } SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const { SCSIZE nLines = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCSIZE i; if (pItems && (nCount > 0)) { @@ -1394,9 +1394,9 @@ SCROW ScColumn::GetLastDataPos() const return 0; } -BOOL ScColumn::GetPrevDataPos(SCROW& rRow) const +sal_Bool ScColumn::GetPrevDataPos(SCROW& rRow) const { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCSIZE i = nCount; while (!bFound && (i > 0)) { @@ -1408,13 +1408,13 @@ BOOL ScColumn::GetPrevDataPos(SCROW& rRow) const return bFound; } -BOOL ScColumn::GetNextDataPos(SCROW& rRow) const // greater than rRow +sal_Bool ScColumn::GetNextDataPos(SCROW& rRow) const // greater than rRow { SCSIZE nIndex; if (Search( rRow, nIndex )) ++nIndex; // next cell - BOOL bMore = ( nIndex < nCount ); + sal_Bool bMore = ( nIndex < nCount ); if ( bMore ) rRow = pItems[nIndex].nRow; return bMore; @@ -1423,12 +1423,12 @@ BOOL ScColumn::GetNextDataPos(SCROW& rRow) const // greater than rRow void ScColumn::FindDataAreaPos(SCROW& rRow, long nMovY) const { if (!nMovY) return; - BOOL bForward = (nMovY>0); + sal_Bool bForward = (nMovY>0); SCSIZE nIndex; - BOOL bThere = Search(rRow, nIndex); + sal_Bool bThere = Search(rRow, nIndex); if (bThere && pItems[nIndex].pCell->IsBlank()) - bThere = FALSE; + bThere = sal_False; if (bThere) { @@ -1468,7 +1468,7 @@ void ScColumn::FindDataAreaPos(SCROW& rRow, long nMovY) const } if (nLast==rRow) { - bThere = FALSE; + bThere = sal_False; nIndex = bForward ? nOldIndex+1 : nOldIndex; } else @@ -1498,7 +1498,7 @@ void ScColumn::FindDataAreaPos(SCROW& rRow, long nMovY) const } } -BOOL ScColumn::HasDataAt(SCROW nRow) const +sal_Bool ScColumn::HasDataAt(SCROW nRow) const { /* SCSIZE nIndex; return Search( nRow, nIndex ); @@ -1509,13 +1509,13 @@ BOOL ScColumn::HasDataAt(SCROW nRow) const SCSIZE nIndex; if (Search(nRow, nIndex)) if (!pItems[nIndex].pCell->IsBlank()) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL ScColumn::IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const +sal_Bool ScColumn::IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const { if (pAttrArray && rCol.pAttrArray) return pAttrArray->IsAllEqual( *rCol.pAttrArray, nStartRow, nEndRow ); @@ -1523,7 +1523,7 @@ BOOL ScColumn::IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEnd return !pAttrArray && !rCol.pAttrArray; } -BOOL ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const +sal_Bool ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const { if (pAttrArray && rCol.pAttrArray) return pAttrArray->IsVisibleEqual( *rCol.pAttrArray, nStartRow, nEndRow ); @@ -1531,43 +1531,43 @@ BOOL ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW return !pAttrArray && !rCol.pAttrArray; } -BOOL ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const +sal_Bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const { if (pAttrArray) return pAttrArray->GetFirstVisibleAttr( rFirstRow ); else - return FALSE; + return sal_False; } -BOOL ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const +sal_Bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const { if (pAttrArray) { // row of last cell is needed - SCROW nLastData = GetLastVisDataPos( TRUE ); // always including notes, 0 if none + SCROW nLastData = GetLastVisDataPos( sal_True ); // always including notes, 0 if none return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData ); } else - return FALSE; + return sal_False; } -BOOL ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const +sal_Bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const { if (pAttrArray) return pAttrArray->HasVisibleAttrIn( nStartRow, nEndRow ); else - return FALSE; + return sal_False; } -void ScColumn::FindUsed( SCROW nStartRow, SCROW nEndRow, BOOL* pUsed ) const +void ScColumn::FindUsed( SCROW nStartRow, SCROW nEndRow, sal_Bool* pUsed ) const { SCROW nRow = 0; SCSIZE nIndex; Search( nStartRow, nIndex ); - while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE ) + while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : sal_False ) { - pUsed[nRow-nStartRow] = TRUE; + pUsed[nRow-nStartRow] = sal_True; ++nIndex; } } @@ -1668,7 +1668,7 @@ void ScColumn::CompileDBFormula() } } -void ScColumn::CompileDBFormula( BOOL bCreateFormulaString ) +void ScColumn::CompileDBFormula( sal_Bool bCreateFormulaString ) { if (pItems) for (SCSIZE i = 0; i < nCount; i++) @@ -1679,7 +1679,7 @@ void ScColumn::CompileDBFormula( BOOL bCreateFormulaString ) } } -void ScColumn::CompileNameFormula( BOOL bCreateFormulaString ) +void ScColumn::CompileNameFormula( sal_Bool bCreateFormulaString ) { if (pItems) for (SCSIZE i = 0; i < nCount; i++) @@ -1704,13 +1704,13 @@ void ScColumn::CompileColRowNameFormula() void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell ) { double nValue = 0.0; - BOOL bVal = FALSE; - BOOL bCell = TRUE; + sal_Bool bVal = sal_False; + sal_Bool bCell = sal_True; switch (pCell->GetCellType()) { case CELLTYPE_VALUE: nValue = ((ScValueCell*)pCell)->GetValue(); - bVal = TRUE; + bVal = sal_True; break; case CELLTYPE_FORMULA: { @@ -1720,19 +1720,19 @@ void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell ) if ( pFC->GetErrCode() ) { if ( rData.eFunc != SUBTOTAL_FUNC_CNT ) // fuer Anzahl einfach weglassen - rData.bError = TRUE; + rData.bError = sal_True; } else if (pFC->IsValue()) { nValue = pFC->GetValue(); - bVal = TRUE; + bVal = sal_True; } // sonst Text } } break; case CELLTYPE_NOTE: - bCell = FALSE; + bCell = sal_False; break; // bei Strings nichts default: @@ -1751,7 +1751,7 @@ void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell ) { ++rData.nCount; if (!SubTotal::SafePlus( rData.nVal, nValue )) - rData.bError = TRUE; + rData.bError = sal_True; } break; case SUBTOTAL_FUNC_CNT: // nur Werte @@ -1784,10 +1784,10 @@ void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell ) void ScColumn::UpdateSelectionFunction( const ScMarkData& rMark, ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows, - BOOL bDoExclude, SCROW nExStartRow, SCROW nExEndRow ) + sal_Bool bDoExclude, SCROW nExStartRow, SCROW nExEndRow ) { SCSIZE nIndex; - ScMarkedDataIter aDataIter(this, &rMark, FALSE); + ScMarkedDataIter aDataIter(this, &rMark, sal_False); while (aDataIter.Next( nIndex )) { SCROW nRow = pItems[nIndex].nRow; @@ -1815,9 +1815,9 @@ void ScColumn::UpdateAreaFunction( ScFunctionData& rData, } } -ULONG ScColumn::GetWeightedCount() const +sal_uLong ScColumn::GetWeightedCount() const { - ULONG nTotal = 0; + sal_uLong nTotal = 0; // Notizen werden nicht gezaehlt @@ -1846,9 +1846,9 @@ ULONG ScColumn::GetWeightedCount() const return nTotal; } -ULONG ScColumn::GetCodeCount() const +sal_uLong ScColumn::GetCodeCount() const { - ULONG nCodeCount = 0; + sal_uLong nCodeCount = 0; for (SCSIZE i=0; i0) { if (pItems[nCount-1].nRow < nRow) { Append(nRow, pNewCell ); - bIsAppended = TRUE; + bIsAppended = sal_True; } } if ( !bIsAppended ) @@ -156,16 +156,16 @@ void ScColumn::Insert( SCROW nRow, ScBaseCell* pNewCell ) } -void ScColumn::Insert( SCROW nRow, ULONG nNumberFormat, ScBaseCell* pCell ) +void ScColumn::Insert( SCROW nRow, sal_uLong 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) ); } @@ -274,10 +274,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( sal_False ); // Mehrfachberechnungen vermeiden - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; SCROW nEndRow = nStartRow + nSize - 1; SCSIZE nStartIndex = 0; SCSIZE nEndIndex = 0; @@ -288,7 +288,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize ) if (!bFound) { nStartIndex = i; - bFound = TRUE; + bFound = sal_True; } nEndIndex = i; @@ -319,7 +319,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 ) { @@ -362,7 +362,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 @@ -431,13 +431,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); @@ -547,18 +547,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) { @@ -566,7 +566,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag) DeleteRange( 0, nCount-1, nContFlag ); else { - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; SCSIZE nStartIndex = 0; SCSIZE nEndIndex = 0; for (SCSIZE i = 0; i < nCount; i++) @@ -575,7 +575,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag) if (!bFound) { nStartIndex = i; - bFound = TRUE; + bFound = sal_True; } nEndIndex = i; } @@ -597,29 +597,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 = sal_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)) @@ -647,9 +647,9 @@ 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(sal_True); - //! 3D(FALSE) und TabRel(TRUE), wenn die endgueltige Position auf der selben Tabelle ist? + //! 3D(sal_False) und TabRel(sal_True), wenn die endgueltige Position auf der selben Tabelle ist? //! (bei TransposeClip ist die Zielposition noch nicht bekannt) aRef.CalcRelFromAbs( rDestPos ); @@ -665,7 +665,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, sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty, ScColumn& rColumn) { if ((nInsFlag & IDF_ATTRIB) != 0) @@ -723,7 +723,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(sal_True); for (SCROW nDestRow = nRow1; nDestRow <= nRow2; nDestRow++) { @@ -755,12 +755,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 = sal_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, @@ -814,7 +814,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; @@ -823,7 +823,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; @@ -863,7 +863,7 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD // #48491# 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 @@ -925,8 +925,8 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD } -void ScColumn::MixMarked( const ScMarkData& rMark, USHORT nFunction, - BOOL bSkipEmpty, ScColumn& rSrcCol ) +void ScColumn::MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction, + sal_Bool bSkipEmpty, ScColumn& rSrcCol ) { SCROW nRow1, nRow2; @@ -941,9 +941,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 = sal_False; switch (nFunction) { case PASTE_ADD: @@ -984,7 +984,7 @@ void lcl_AddCode( ScTokenArray& rArr, ScFormulaCell* pCell ) void ScColumn::MixData( SCROW nRow1, SCROW nRow2, - USHORT nFunction, BOOL bSkipEmpty, + sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScColumn& rSrcCol ) { SCSIZE nSrcCount = rSrcCol.nCount; @@ -1010,7 +1010,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2, ScBaseCell* pSrc = NULL; ScBaseCell* pDest = NULL; ScBaseCell* pNew = NULL; - BOOL bDelete = FALSE; + sal_Bool bDelete = sal_False; if ( nSrcIndex < nSrcCount && nNextSrc == nRow ) pSrc = rSrcCol.pItems[nSrcIndex].pCell; @@ -1023,8 +1023,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 { @@ -1048,12 +1048,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... @@ -1066,7 +1066,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 ); @@ -1088,7 +1088,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2, if (pSrc) pNew = pSrc->CloneWithoutNote( *pDocument ); else if (pDest) - bDelete = TRUE; + bDelete = sal_True; } else { @@ -1246,16 +1246,16 @@ void ScColumn::StartListeningInArea( SCROW nRow1, SCROW nRow2 ) } -// TRUE = Zahlformat gesetzt -BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString, +// sal_True = Zahlformat gesetzt +sal_Bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString, formula::FormulaGrammar::AddressConvention eConv, SvNumberFormatter* pLangFormatter, bool bDetectNumberFormat ) { - BOOL bNumFmtSet = FALSE; + sal_Bool bNumFmtSet = sal_False; if (VALIDROW(nRow)) { ScBaseCell* pNewCell = NULL; - BOOL bIsLoading = FALSE; + sal_Bool bIsLoading = sal_False; if (rString.Len() > 0) { double nVal; @@ -1298,7 +1298,7 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString, pNewCell = new ScStringCell( rString.Copy(1) ); else { - BOOL bIsText = FALSE; + sal_Bool bIsText = sal_False; if ( bIsLoading ) { if ( pItems && nCount ) @@ -1317,7 +1317,7 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString, case CELLTYPE_STRING : ((ScStringCell*)pCell)->GetString( aStr ); if ( rString == aStr ) - bIsText = TRUE; + bIsText = sal_True; break; case CELLTYPE_NOTE : // durch =Formel referenziert break; @@ -1364,7 +1364,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 = sal_False; const SvNumberformat* pOldFormat = pFormatter->GetEntry( nOldIndex ); if ( pOldFormat ) { @@ -1375,20 +1375,20 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString, if ( nOldIndex == pFormatter->GetStandardFormat( nOldType, pOldFormat->GetLanguage() ) ) { - bOverwrite = TRUE; // default of these types can be overwritten + bOverwrite = sal_True; // default of these types can be overwritten } } } if ( !bOverwrite && pFormatter->GetType( nIndex ) == NUMBERFORMAT_LOGICAL ) { - bOverwrite = TRUE; // overwrite anything if boolean was detected + bOverwrite = sal_True; // overwrite anything if boolean was detected } if ( bOverwrite ) { ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT, - (UINT32) nIndex) ); - bNumFmtSet = TRUE; + (sal_uInt32) nIndex) ); + bNumFmtSet = sal_True; } } } @@ -1495,11 +1495,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) : sal_False ) { ScBaseCell* pCell = pItems[nIndex].pCell; TypedStrData* pData; - ULONG nFormat = GetNumberFormat( nRow ); + sal_uLong nFormat = GetNumberFormat( nRow ); ScCellFormat::GetInputString( pCell, nFormat, aString, *pFormatter ); @@ -1567,13 +1567,13 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec #define DATENT_SEARCH 2000 -BOOL ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, BOOL bLimit) +sal_Bool ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, sal_Bool bLimit) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_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, @@ -1603,7 +1603,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 = sal_True; if ( bLimit ) if (++nCells >= DATENT_SEARCH) @@ -1628,7 +1628,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 = sal_True; if ( bLimit ) if (++nCells >= DATENT_SEARCH) @@ -1687,7 +1687,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)) { @@ -1718,7 +1718,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 @@ -1737,7 +1737,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 @@ -1776,7 +1776,7 @@ double ScColumn::GetValue( SCROW nRow ) const } -void ScColumn::GetFormula( SCROW nRow, String& rFormula, BOOL ) const +void ScColumn::GetFormula( SCROW nRow, String& rFormula, sal_Bool ) const { SCSIZE nIndex; if (Search(nRow, nIndex)) @@ -1801,7 +1801,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)) @@ -1814,26 +1814,26 @@ USHORT ScColumn::GetErrCode( SCROW nRow ) const } -BOOL ScColumn::HasStringData( SCROW nRow ) const +sal_Bool ScColumn::HasStringData( SCROW nRow ) const { SCSIZE nIndex; if (Search(nRow, nIndex)) return (pItems[nIndex].pCell)->HasStringData(); - return FALSE; + return sal_False; } -BOOL ScColumn::HasValueData( SCROW nRow ) const +sal_Bool ScColumn::HasValueData( SCROW nRow ) const { SCSIZE nIndex; if (Search(nRow, nIndex)) return (pItems[nIndex].pCell)->HasValueData(); - return FALSE; + return sal_False; } -BOOL ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const +sal_Bool ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const { - // TRUE, wenn String- oder Editzellen im Bereich + // sal_True, wenn String- oder Editzellen im Bereich if ( pItems ) { @@ -1843,11 +1843,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 sal_False; } @@ -1907,7 +1907,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 ); @@ -1961,7 +1961,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(); diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx index 95da04fef0e0..fda3ca585621 100644 --- a/sc/source/core/data/compressedarray.cxx +++ b/sc/source/core/data/compressedarray.cxx @@ -888,19 +888,19 @@ void ScCoupledCompressedArrayIterator::Resync( A nPos ) // === Force instantiation of specializations ================================ -template class ScCompressedArray< SCROW, USHORT>; // heights, base class -template class ScSummableCompressedArray< SCROW, USHORT>; // heights -template class ScCompressedArray< SCROW, BYTE>; // flags, base class -template class ScBitMaskCompressedArray< SCROW, BYTE>; // flags +template class ScCompressedArray< SCROW, sal_uInt16>; // heights, base class +template class ScSummableCompressedArray< SCROW, sal_uInt16>; // heights +template class ScCompressedArray< SCROW, sal_uInt8>; // flags, base class +template class ScBitMaskCompressedArray< SCROW, sal_uInt8>; // flags template unsigned long ScBitMaskCompressedArray< SCROW, - BYTE>::SumCoupledArrayForCondition( SCROW, SCROW, const BYTE&, const BYTE&, - const ScSummableCompressedArray< SCROW, USHORT>&) const; + sal_uInt8>::SumCoupledArrayForCondition( SCROW, SCROW, const sal_uInt8&, const sal_uInt8&, + const ScSummableCompressedArray< SCROW, sal_uInt16>&) const; template unsigned long ScBitMaskCompressedArray< SCROW, - BYTE>::SumScaledCoupledArrayForCondition( SCROW, SCROW, const BYTE&, - const BYTE&, const ScSummableCompressedArray< SCROW, USHORT>&, + sal_uInt8>::SumScaledCoupledArrayForCondition( SCROW, SCROW, const sal_uInt8&, + const sal_uInt8&, const ScSummableCompressedArray< SCROW, sal_uInt16>&, double) const; -template void ScCompressedArrayIterator< SCROW, USHORT>::Follow( - const ScCompressedArrayIterator< SCROW, BYTE>&); -template class ScCoupledCompressedArrayIterator< SCROW, BYTE, USHORT>; +template void ScCompressedArrayIterator< SCROW, sal_uInt16>::Follow( + const ScCompressedArrayIterator< SCROW, sal_uInt8>&); +template class ScCoupledCompressedArrayIterator< SCROW, sal_uInt8, sal_uInt16>; // === EOF =================================================================== diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index b08838198477..e832d48f1e72 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -56,7 +56,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) { @@ -70,7 +70,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion { ScSingleRefData& rRef2 = static_cast(t)->GetDoubleRef().Ref2; if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() ) - return TRUE; + return sal_True; } // fall through @@ -78,7 +78,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion { ScSingleRefData& rRef1 = static_cast(t)->GetSingleRef(); if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() ) - return TRUE; + return sal_True; } break; @@ -87,7 +87,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion if( t->GetOpCode() == ocName ) // DB areas always absolute if( ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex( t->GetIndex() ) ) if( (nRecursion < 42) && lcl_HasRelRef( pDoc, pRangeData->GetCode(), nRecursion + 1 ) ) - return TRUE; + return sal_True; } break; @@ -100,7 +100,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: { @@ -117,7 +117,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion } } } - return FALSE; + return sal_False; } ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) : @@ -142,7 +142,7 @@ ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) : pDoc(r.pDoc), bRelRef1(r.bRelRef1), bRelRef2(r.bRelRef2), - bFirstRun(TRUE) + bFirstRun(sal_True) { // 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(sal_True) { // echte Kopie der Formeln (fuer Ref-Undo) @@ -201,19 +201,19 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper, aStrNmsp2(rExprNmsp2), eTempGrammar1(eGrammar1), eTempGrammar2(eGrammar2), - bIsStr1(FALSE), - bIsStr2(FALSE), + bIsStr1(sal_False), + bIsStr2(sal_False), pFormula1(NULL), pFormula2(NULL), aSrcPos(rPos), pFCell1(NULL), pFCell2(NULL), pDoc(pDocument), - bRelRef1(FALSE), - bRelRef2(FALSE), - bFirstRun(TRUE) + bRelRef1(sal_False), + bRelRef2(sal_False), + bFirstRun(sal_True) { - Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, FALSE ); + Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, sal_False ); // Formelzellen werden erst bei IsValid angelegt } @@ -227,17 +227,17 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper, nVal2(0.0), eTempGrammar1(FormulaGrammar::GRAM_DEFAULT), eTempGrammar2(FormulaGrammar::GRAM_DEFAULT), - bIsStr1(FALSE), - bIsStr2(FALSE), + bIsStr1(sal_False), + bIsStr2(sal_False), pFormula1(NULL), pFormula2(NULL), aSrcPos(rPos), pFCell1(NULL), pFCell2(NULL), pDoc(pDocument), - bRelRef1(FALSE), - bRelRef2(FALSE), - bFirstRun(TRUE) + bRelRef1(sal_False), + bRelRef2(sal_False), + bFirstRun(sal_True) { if ( pArr1 ) { @@ -255,7 +255,7 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper, } else if ( pToken->GetType() == svString ) { - bIsStr1 = TRUE; + bIsStr1 = sal_True; aStrVal1 = pToken->GetString(); DELETEZ(pFormula1); // nicht als Formel merken } @@ -279,7 +279,7 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper, } else if ( pToken->GetType() == svString ) { - bIsStr2 = TRUE; + bIsStr2 = sal_True; aStrVal2 = pToken->GetString(); DELETEZ(pFormula2); // nicht als Formel merken } @@ -302,7 +302,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() ) { @@ -335,7 +335,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 } @@ -372,7 +372,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 } @@ -402,7 +402,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) @@ -440,7 +440,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 ) @@ -471,10 +471,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(); @@ -486,7 +486,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 ) { @@ -495,7 +495,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(rCode.GetNextReference()); @@ -505,11 +505,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 = sal_False; + sal_Bool bChanged2 = sal_False; if (pFormula1) { @@ -520,7 +520,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(), sal_False, sal_True, bChanged1 ); else aComp.UpdateNameReference( eUpdateRefMode, rRange, nDx, nDy, nDz, bChanged1 ); } @@ -537,7 +537,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(), sal_False, sal_True, bChanged2 ); else aComp.UpdateNameReference( eUpdateRefMode, rRange, nDx, nDy, nDz, bChanged2 ); } @@ -553,39 +553,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 sal_False; FormulaToken** ppToken1 = pArr1->GetArray(); FormulaToken** ppToken2 = pArr2->GetArray(); - for (USHORT i=0; i gleich @@ -593,7 +593,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) @@ -601,13 +601,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 = sal_False; // wenn keine Formeln, Werte vergleichen if ( !pFormula1 && ( nVal1 != r.nVal1 || aStrVal1 != r.aStrVal1 || bIsStr1 != r.bIsStr1 ) ) - bEq = FALSE; + bEq = sal_False; if ( !pFormula2 && ( nVal2 != r.nVal2 || aStrVal2 != r.aStrVal2 || bIsStr2 != r.bIsStr2 ) ) - bEq = FALSE; + bEq = sal_False; } return bEq; @@ -623,7 +623,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos ) // Formeln auswerten - BOOL bDirty = FALSE; //! 1 und 2 getrennt ??? + sal_Bool bDirty = sal_False; //! 1 und 2 getrennt ??? ScFormulaCell* pTemp1 = NULL; ScFormulaCell* pEff1 = pFCell1; @@ -638,16 +638,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 = sal_False; nVal1 = pEff1->GetValue(); aStrVal1.Erase(); } else { - bIsStr1 = TRUE; + bIsStr1 = sal_True; pEff1->GetString( aStrVal1 ); nVal1 = 0.0; } @@ -667,16 +667,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 = sal_False; nVal2 = pEff2->GetValue(); aStrVal2.Erase(); } else { - bIsStr2 = TRUE; + bIsStr2 = sal_True; pEff2->GetString( aStrVal2 ); nVal2 = 0.0; } @@ -693,23 +693,23 @@ void ScConditionEntry::Interpret( const ScAddress& rPos ) DataChanged( NULL ); // alles } - bFirstRun = FALSE; + bFirstRun = sal_False; } -BOOL ScConditionEntry::IsValid( double nArg ) const +sal_Bool ScConditionEntry::IsValid( double nArg ) 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 sal_False; double nComp1 = nVal1; // Kopie, damit vertauscht werden kann double nComp2 = nVal2; @@ -723,11 +723,11 @@ BOOL ScConditionEntry::IsValid( double nArg ) const // Alle Grenzfaelle muessen per ::rtl::math::approxEqual getestet werden! - BOOL bValid = FALSE; + sal_Bool bValid = sal_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; @@ -764,20 +764,20 @@ BOOL ScConditionEntry::IsValid( double nArg ) const return bValid; } -BOOL ScConditionEntry::IsValidStr( const String& rArg ) const +sal_Bool ScConditionEntry::IsValidStr( const String& rArg ) const { // Interpret muss schon gerufen sein if ( eOp == SC_COND_DIRECT ) // Formel ist unabhaengig vom Inhalt return !::rtl::math::approxEqual( nVal1, 0.0 ); - // Wenn Bedingung Zahl enthaelt, immer FALSE, ausser bei "ungleich" + // Wenn Bedingung Zahl enthaelt, immer sal_False, ausser bei "ungleich" if ( !bIsStr1 ) return ( eOp == SC_COND_NOTEQUAL ); if ( eOp == SC_COND_BETWEEN || eOp == SC_COND_NOTBETWEEN ) if ( !bIsStr2 ) - return FALSE; + return sal_False; String aUpVal1( aStrVal1 ); //! als Member? (dann auch in Interpret setzen) String aUpVal2( aStrVal2 ); @@ -790,7 +790,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg ) const String aTemp( aUpVal1 ); aUpVal1 = aUpVal2; aUpVal2 = aTemp; } - BOOL bValid; + sal_Bool bValid; switch ( eOp ) { case SC_COND_EQUAL: @@ -831,7 +831,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg ) const // SC_COND_DIRECT schon oben abgefragt default: DBG_ERROR("unbekannte Operation bei ScConditionEntry"); - bValid = FALSE; + bValid = sal_False; break; } } @@ -839,13 +839,13 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg ) const 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 = TRUE; + sal_Bool bVal = sal_True; if ( pCell ) { @@ -867,7 +867,7 @@ BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c break; case CELLTYPE_STRING: case CELLTYPE_EDIT: - bVal = FALSE; + bVal = sal_False; if ( eType == CELLTYPE_STRING ) ((ScStringCell*)pCell)->GetString(aArgStr); else @@ -882,7 +882,7 @@ BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c if (!pCell) if (bIsStr1) - bVal = FALSE; // leere Zellen je nach Bedingung + bVal = sal_False; // leere Zellen je nach Bedingung if (bVal) return IsValid( nArg ); @@ -890,8 +890,8 @@ BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c return IsValidStr( aArgStr ); } -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; @@ -941,7 +941,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; @@ -982,7 +982,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) @@ -997,7 +997,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; @@ -1072,7 +1072,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) @@ -1123,7 +1123,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) @@ -1210,7 +1210,7 @@ ScConditionalFormat::ScConditionalFormat(const ScConditionalFormat& r) : if (nEntryCount) { ppEntries = new ScCondFormatEntry*[nEntryCount]; - for (USHORT i=0; iSetParent(this); @@ -1231,7 +1231,7 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const if (nEntryCount) { pNew->ppEntries = new ScCondFormatEntry*[nEntryCount]; - for (USHORT i=0; ippEntries[i] = new ScCondFormatEntry( pNewDoc, *ppEntries[i] ); pNew->ppEntries[i]->SetParent(pNew); @@ -1242,24 +1242,24 @@ 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 sal_False; //! auf gleiche Eintraege in anderer Reihenfolge testen ??? - for (USHORT i=0; iSetParent(this); @@ -1270,14 +1270,14 @@ void ScConditionalFormat::AddEntry( const ScCondFormatEntry& rNew ) ScConditionalFormat::~ScConditionalFormat() { - for (USHORT i=0; iIsCellValid( 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?"); @@ -1304,7 +1304,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) { @@ -1321,7 +1321,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; @@ -1347,38 +1347,38 @@ 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 sal_False; // ausserhalb } void ScConditionalFormat::DoRepaint( const ScRange* pModified ) { - USHORT i; + sal_uInt16 i; SfxObjectShell* pSh = pDoc->GetDocumentShell(); if (pSh) { // Rahmen/Schatten enthalten? // (alle Bedingungen testen) - BOOL bExtend = FALSE; - BOOL bRotate = FALSE; - BOOL bAttrTested = FALSE; + sal_Bool bExtend = sal_False; + sal_Bool bRotate = sal_False; + sal_Bool bAttrTested = sal_False; if (!pAreas) // RangeList ggf. holen { pAreas = new ScRangeList; pDoc->FindConditionalFormat( nKey, *pAreas ); } - USHORT nCount = (USHORT) pAreas->Count(); + sal_uInt16 nCount = (sal_uInt16) pAreas->Count(); for (i=0; iGetObject(i); - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; if ( pModified ) { if ( !lcl_CutRange( aRange, *pModified ) ) - bDo = FALSE; + bDo = sal_False; } if (bDo) { @@ -1387,7 +1387,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified ) // #116562# 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; nEntryGetStyle(); if (aStyle.Len()) @@ -1397,20 +1397,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 @@ -1446,20 +1446,20 @@ void ScConditionalFormat::InvalidateArea() void ScConditionalFormat::CompileAll() { - for (USHORT i=0; iCompileAll(); } void ScConditionalFormat::CompileXML() { - for (USHORT i=0; iCompileXML(); } void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - for (USHORT i=0; iUpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz); delete pAreas; // aus dem AttrArray kommt beim Einfuegen/Loeschen kein Aufruf @@ -1468,14 +1468,14 @@ void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode, void ScConditionalFormat::RenameCellStyle(const String& rOld, const String& rNew) { - for (USHORT i=0; iGetStyle() == rOld ) ppEntries[i]->UpdateStyleName( rNew ); } void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) { - for (USHORT i=0; iUpdateMoveTab( nOldPos, nNewPos ); delete pAreas; // aus dem AttrArray kommt beim Einfuegen/Loeschen kein Aufruf @@ -1484,14 +1484,14 @@ void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) void ScConditionalFormat::SourceChanged( const ScAddress& rAddr ) { - for (USHORT i=0; iSourceChanged( rAddr ); } bool ScConditionalFormat::MarkUsedExternalReferences() const { bool bAllMarked = false; - for (USHORT i=0; !bAllMarked && iMarkUsedExternalReferences(); return bAllMarked; } @@ -1503,9 +1503,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; iClone() ); //! sortierte Eintraege aus rList schneller einfuegen ??? @@ -1516,23 +1516,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; iClone(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; iEqualEntries(*r[i]) ) // Eintraege unterschiedlich ? - bEqual = FALSE; + bEqual = sal_False; return bEqual; } @@ -1541,8 +1541,8 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey ) { //! binaer suchen - USHORT nCount = Count(); - for (USHORT i=0; iGetKey() == nKey) return (*this)[i]; @@ -1552,52 +1552,52 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey ) void ScConditionalFormatList::CompileAll() { - USHORT nCount = Count(); - for (USHORT i=0; iCompileAll(); } void ScConditionalFormatList::CompileXML() { - USHORT nCount = Count(); - for (USHORT i=0; iCompileXML(); } void ScConditionalFormatList::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - USHORT nCount = Count(); - for (USHORT i=0; iUpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz ); } void ScConditionalFormatList::RenameCellStyle( const String& rOld, const String& rNew ) { - ULONG nCount=Count(); - for (USHORT i=0; iRenameCellStyle(rOld,rNew); } void ScConditionalFormatList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) { - USHORT nCount = Count(); - for (USHORT i=0; iUpdateMoveTab( nOldPos, nNewPos ); } void ScConditionalFormatList::SourceChanged( const ScAddress& rAddr ) { - USHORT nCount = Count(); - for (USHORT i=0; iSourceChanged( rAddr ); } bool ScConditionalFormatList::MarkUsedExternalReferences() const { bool bAllMarked = false; - USHORT nCount = Count(); - for (USHORT i=0; !bAllMarked && iMarkUsedExternalReferences(); return bAllMarked; } diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx index 39675704fb70..68ddcc0bd9af 100644 --- a/sc/source/core/data/dbdocutl.cxx +++ b/sc/source/core/data/dbdocutl.cxx @@ -51,14 +51,14 @@ using namespace ::com::sun::star; // static void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const uno::Reference& xRow, long nRowPos, - long nType, BOOL bCurrency, BOOL* pSimpleFlag ) + long nType, sal_Bool bCurrency, sal_Bool* pSimpleFlag ) { String aString; double nVal = 0.0; - BOOL bValue = FALSE; - BOOL bEmptyFlag = FALSE; - BOOL bError = FALSE; - ULONG nFormatIndex = 0; + sal_Bool bValue = sal_False; + sal_Bool bEmptyFlag = sal_False; + sal_Bool bError = sal_False; + sal_uLong nFormatIndex = 0; //! wasNull calls only if null value was found? @@ -73,7 +73,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: @@ -88,7 +88,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: @@ -108,7 +108,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; @@ -122,7 +122,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; @@ -138,24 +138,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 ) @@ -186,7 +186,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB { pCell = ScBaseCell::CreateTextCell( aString, pDoc ); if ( pSimpleFlag && pCell->GetCellType() == CELLTYPE_EDIT ) - *pSimpleFlag = FALSE; + *pSimpleFlag = sal_False; } else pCell = NULL; diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index aa5b011da93b..0e30a2750dbb 100755 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -57,7 +57,7 @@ namespace { void lcl_toUpper(OUString& rStr) { - rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast(rStr.getLength())); + rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast(rStr.getLength())); } } @@ -86,7 +86,7 @@ ScDocumentIterator::~ScDocumentIterator() { } -BOOL ScDocumentIterator::GetThisCol() +sal_Bool ScDocumentIterator::GetThisCol() { ScTable* pTab; while ( (pTab = pDoc->pTab[nTab]) == NULL ) @@ -95,14 +95,14 @@ BOOL ScDocumentIterator::GetThisCol() { nCol = MAXCOL; nRow = MAXROW; - return FALSE; + return sal_False; } ++nTab; } ScColumn* pCol = &pTab->aCol[nCol]; ScAttrArray* pAtt = pCol->pAttrArray; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; do { SCROW nColRow; @@ -126,13 +126,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; } @@ -146,15 +146,15 @@ BOOL ScDocumentIterator::GetThisCol() return bFound; } -BOOL ScDocumentIterator::GetThis() +sal_Bool ScDocumentIterator::GetThis() { - BOOL bEnd = FALSE; - BOOL bSuccess = FALSE; + sal_Bool bEnd = sal_False; + sal_Bool bSuccess = sal_False; while ( !bSuccess && !bEnd ) { if ( nRow > MAXROW ) - bSuccess = FALSE; + bSuccess = sal_False; else bSuccess = GetThisCol(); @@ -166,7 +166,7 @@ BOOL ScDocumentIterator::GetThis() nCol = 0; ++nTab; if (nTab > nEndTab) - bEnd = TRUE; + bEnd = sal_True; } nRow = 0; nColPos = 0; @@ -177,7 +177,7 @@ BOOL ScDocumentIterator::GetThis() return !bEnd; } -BOOL ScDocumentIterator::GetFirst() +sal_Bool ScDocumentIterator::GetFirst() { nCol = 0; nTab = nStartTab; @@ -189,7 +189,7 @@ BOOL ScDocumentIterator::GetFirst() return GetThis(); } -BOOL ScDocumentIterator::GetNext() +sal_Bool ScDocumentIterator::GetNext() { ++nRow; @@ -218,7 +218,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 ) { @@ -236,7 +236,7 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr, //UNUSED2008-05 ScValueIterator::ScValueIterator( ScDocument* pDocument, //UNUSED2008-05 SCCOL nSCol, SCROW nSRow, SCTAB nSTab, //UNUSED2008-05 SCCOL nECol, SCROW nERow, SCTAB nETab, -//UNUSED2008-05 BOOL bSTotal, BOOL bTextZero ) : +//UNUSED2008-05 sal_Bool bSTotal, sal_Bool bTextZero ) : //UNUSED2008-05 pDoc( pDocument ), //UNUSED2008-05 nNumFmtIndex(0), //UNUSED2008-05 nStartCol( nSCol), @@ -246,9 +246,9 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr, //UNUSED2008-05 nEndRow( nERow), //UNUSED2008-05 nEndTab( nETab ), //UNUSED2008-05 nNumFmtType( NUMBERFORMAT_UNDEFINED ), -//UNUSED2008-05 bNumValid( FALSE ), +//UNUSED2008-05 bNumValid( sal_False ), //UNUSED2008-05 bSubTotal(bSTotal), -//UNUSED2008-05 bNextValid( FALSE ), +//UNUSED2008-05 bNextValid( sal_False ), //UNUSED2008-05 bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ), //UNUSED2008-05 bTextAsZero( bTextZero ) //UNUSED2008-05 { @@ -275,7 +275,7 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr, //UNUSED2008-05 } 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() ), @@ -285,9 +285,9 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange, nEndRow( rRange.aEnd.Row() ), nEndTab( rRange.aEnd.Tab() ), nNumFmtType( NUMBERFORMAT_UNDEFINED ), - bNumValid( FALSE ), + bNumValid( sal_False ), bSubTotal(bSTotal), - bNextValid( FALSE ), + bNextValid( sal_False ), bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ), bTextAsZero( bTextZero ) { @@ -313,7 +313,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 (;;) @@ -332,7 +332,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 sal_False; // Ende und Aus } } pCol = &(pDoc->pTab[nTab])->aCol[nCol]; @@ -354,7 +354,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr) { case CELLTYPE_VALUE: { - bNumValid = FALSE; + bNumValid = sal_False; rValue = ((ScValueCell*)pCell)->GetValue(); rErr = 0; --nRow; @@ -375,7 +375,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, @@ -384,7 +384,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr) } } - return TRUE; // gefunden + return sal_True; // gefunden } // break; case CELLTYPE_FORMULA: @@ -396,15 +396,15 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr) { rValue = ((ScFormulaCell*)pCell)->GetValue(); nRow--; - bNumValid = FALSE; - return TRUE; // gefunden + bNumValid = sal_False; + return sal_True; // gefunden } else if ( bTextAsZero ) { rValue = 0.0; nRow--; - bNumValid = FALSE; - return TRUE; + bNumValid = sal_False; + return sal_True; } } } @@ -418,9 +418,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; @@ -436,7 +436,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) { @@ -463,13 +463,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; @@ -487,7 +487,7 @@ BOOL ScValueIterator::GetFirst(double& rValue, USHORT& rErr) } /* ist inline: -BOOL ScValueIterator::GetNext(double& rValue, USHORT& rErr) +sal_Bool ScValueIterator::GetNext(double& rValue, sal_uInt16& rErr) { ++nRow; return GetThis(rValue, rErr); @@ -613,7 +613,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: @@ -626,7 +626,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++; @@ -955,7 +955,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), @@ -997,7 +997,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() ), @@ -1107,14 +1107,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( sal_False ), + bIgnoreMismatchOnLeadingStrings( sal_False ) { nCol = aParam.nCol1; nRow = aParam.nRow1; @@ -1184,7 +1184,7 @@ ScBaseCell* ScQueryCellIterator::GetThis() ++nRow; else { - BOOL bTestEqualCondition; + sal_Bool bTestEqualCondition; if ( (pDoc->pTab[nTab])->ValidQuery( nRow, aParam, NULL, (nCol == static_cast(nFirstQueryField) ? pCell : NULL), (nTestEqualCondition ? &bTestEqualCondition : NULL) ) ) @@ -1276,14 +1276,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 == @@ -1335,8 +1335,8 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, break; // for } SCSIZE nColRowSave; - bIgnoreMismatchOnLeadingStrings = FALSE; - SetTestEqualCondition( FALSE ); + bIgnoreMismatchOnLeadingStrings = sal_False; + SetTestEqualCondition( sal_False ); do { nFoundCol = GetCol(); @@ -1347,7 +1347,7 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, nCol = nFoundCol; nRow = nFoundRow; nColRow = nColRowSave; - return TRUE; + return sal_True; } if ( (bSearchForEqualAfterMismatch || aParam.bRegExp) && StoppedOnMismatch() ) @@ -1375,8 +1375,8 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, else break; // for } - SetStopOnMismatch( FALSE ); - SetTestEqualCondition( FALSE ); + SetStopOnMismatch( sal_False ); + SetTestEqualCondition( sal_False ); if (GetNext()) { // Last of a consecutive area, avoid searching the entire parameter @@ -1388,7 +1388,7 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, nFoundCol = GetCol(); nFoundRow = GetRow(); nColRowSave = nColRow; - SetStopOnMismatch( TRUE ); + SetStopOnMismatch( sal_True ); } while (GetNext()); nCol = nFoundCol; nRow = nFoundRow; @@ -1426,7 +1426,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); @@ -1456,7 +1456,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); } @@ -1497,7 +1497,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 contentquery:1 // Cell value comparison similar to ScTable::ValidQuery() @@ -1558,7 +1558,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); @@ -1676,7 +1676,7 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB nEndRow( nRow2 ), nCol( nCol1 ), nRow( nRow1 ), - bMore( TRUE ) + bMore( sal_True ) { SCCOL i; SCSIZE nIndex; @@ -1740,7 +1740,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; @@ -1749,14 +1749,14 @@ BOOL ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow ) void ScHorizontalCellIterator::Advance() { - BOOL bFound = FALSE; + sal_Bool bFound = sal_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) @@ -1772,12 +1772,12 @@ void ScHorizontalCellIterator::Advance() if (nMinRow <= nEndRow) { nRow = nMinRow; - bFound = TRUE; + bFound = sal_True; } } if ( !bFound ) - bMore = FALSE; + bMore = sal_False; } //------------------------------------------------------------------------------- @@ -1797,14 +1797,14 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB nRow = nStartRow; nCol = nStartCol; - bRowEmpty = FALSE; + bRowEmpty = sal_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; @@ -1823,7 +1823,7 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB nSkipTo = nThisEnd; // nSkipTo kann gleich hier gesetzt werden } else - bEmpty = FALSE; // Attribute gefunden + bEmpty = sal_False; // Attribute gefunden pIndices[nPos] = nIndex; pNextEnd[nPos] = nThisEnd; @@ -1872,7 +1872,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++) @@ -1890,7 +1890,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo if ( IsDefaultItem( pPattern ) ) pPattern = NULL; else - bEmpty = FALSE; // Attribute gefunden + bEmpty = sal_False; // Attribute gefunden pNextEnd[nPos] = nThisEnd; ppPatterns[nPos] = pPattern; @@ -1905,7 +1905,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo } } else if ( ppPatterns[nPos] ) - bEmpty = FALSE; // Bereich noch nicht zuende + bEmpty = sal_False; // Bereich noch nicht zuende } if (bEmpty) @@ -1926,7 +1926,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 ); } @@ -1946,7 +1946,7 @@ ScUsedAreaIterator::~ScUsedAreaIterator() { } -BOOL ScUsedAreaIterator::GetNext() +sal_Bool ScUsedAreaIterator::GetNext() { // Iteratoren weiterzaehlen @@ -1964,8 +1964,8 @@ BOOL ScUsedAreaIterator::GetNext() // naechsten Abschnitt heraussuchen - BOOL bFound = TRUE; - BOOL bUseCell = FALSE; + sal_Bool bFound = sal_True; + sal_Bool bUseCell = sal_False; if ( pCell && pPattern ) { @@ -1982,7 +1982,7 @@ BOOL ScUsedAreaIterator::GetNext() } else { - bUseCell = TRUE; + bUseCell = sal_True; if ( nAttrRow == nCellRow && nAttrCol1 == nCellCol ) // Attribute auf der Zelle ? pFoundPattern = pPattern; else @@ -1992,7 +1992,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 { @@ -2003,7 +2003,7 @@ BOOL ScUsedAreaIterator::GetNext() nFoundEndCol = nAttrCol2; } else // gar nichts - bFound = FALSE; + bFound = sal_False; if ( bUseCell ) // Position von Zelle { diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 2bb5922242cb..7cf5e6de6ce7 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -81,17 +81,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 @@ -190,7 +190,7 @@ static SfxItemInfo __READONLY_DATA 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, @@ -222,9 +222,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(sal_False); ppPoolDefaults = new SfxPoolItem*[ATTR_ENDINDEX-ATTR_STARTINDEX+1]; @@ -262,7 +262,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts ) ppPoolDefaults[ ATTR_HOR_JUSTIFY - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY); 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_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, FALSE ); + ppPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, sal_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 ); @@ -305,16 +305,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, sal_False ); + ppPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, sal_False ); + ppPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, sal_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 ); @@ -328,8 +328,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, sal_False ); + ppPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, sal_True ); ppPoolDefaults[ ATTR_PAGE_SCALETO - ATTR_STARTINDEX ] = new ScPageScaleToItem( 1, 1 ); // ppPoolDefaults[ ATTR_ITEM_DOUBLE - ATTR_STARTINDEX ] = new ScDoubleItem( ATTR_ITEM_DOUBLE, 0 ); @@ -379,7 +379,7 @@ __EXPORT 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]; @@ -403,12 +403,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... @@ -417,11 +417,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... @@ -430,11 +430,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... @@ -443,11 +443,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... @@ -456,11 +456,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 @@ -469,11 +469,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 @@ -482,11 +482,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 @@ -495,11 +495,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 @@ -508,11 +508,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 @@ -523,11 +523,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 @@ -536,11 +536,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 @@ -583,7 +583,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. @@ -592,7 +592,7 @@ void ScDocumentPool::DeleteVersionMaps() // wird (Assertions). // -const SfxPoolItem& __EXPORT ScDocumentPool::Put( const SfxPoolItem& rItem, USHORT nWhich ) +const SfxPoolItem& __EXPORT ScDocumentPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich ) { if ( rItem.Which() != ATTR_PATTERN ) // nur Pattern ist special return SfxItemPool::Put( rItem, nWhich ); @@ -611,13 +611,13 @@ void __EXPORT 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 ) { DBG_ERROR("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 } @@ -627,14 +627,14 @@ void __EXPORT ScDocumentPool::Remove( const SfxPoolItem& rItem ) void ScDocumentPool::CheckRef( const SfxPoolItem& rItem ) // static { - 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 ); } } @@ -675,7 +675,7 @@ void ScDocumentPool::CellStyleCreated( const String& rName ) SfxItemPool* __EXPORT ScDocumentPool::Clone() const { - return new SfxItemPool (*this, TRUE); + return new SfxItemPool (*this, sal_True); } SfxItemPresentation lcl_HFPresentation @@ -691,9 +691,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,sal_False,&pItem) ) { - if( FALSE == ((const SfxBoolItem*)pItem)->GetValue() ) + if( sal_False == ((const SfxBoolItem*)pItem)->GetValue() ) return SFX_ITEM_PRESENTATION_NONE; } @@ -704,7 +704,7 @@ SfxItemPresentation lcl_HFPresentation while( pItem ) { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); aText.Erase(); @@ -718,14 +718,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 ) @@ -788,7 +788,7 @@ SfxItemPresentation __EXPORT 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(": ")); @@ -901,7 +901,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation( case ATTR_PAGE_SCALETOPAGES: { - USHORT nPagNo = ((const SfxUInt16Item&)rItem).GetValue(); + sal_uInt16 nPagNo = ((const SfxUInt16Item&)rItem).GetValue(); if( nPagNo ) { @@ -934,7 +934,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation( case ATTR_PAGE_FIRSTPAGENO: { - USHORT nPagNo = ((const SfxUInt16Item&)rItem).GetValue(); + sal_uInt16 nPagNo = ((const SfxUInt16Item&)rItem).GetValue(); if( nPagNo ) { @@ -962,7 +962,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation( case ATTR_PAGE_SCALE: { - USHORT nPercent = ((const SfxUInt16Item&)rItem).GetValue(); + sal_uInt16 nPercent = ((const SfxUInt16Item&)rItem).GetValue(); if( nPercent ) { @@ -1045,7 +1045,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation( return ePresentation; } -SfxMapUnit __EXPORT ScDocumentPool::GetMetric( USHORT nWhich ) const +SfxMapUnit __EXPORT 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 d2c99c75a95e..22155543ee81 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -180,40 +180,40 @@ ScDocument::ScDocument( ScDocumentMode eMode, nVisibleTab( 0 ), eLinkMode(LM_UNKNOWN), bAutoCalc( eMode == SCDOCMODE_DOCUMENT ), - bAutoCalcShellDisabled( FALSE ), - bForcedFormulaPending( FALSE ), - bCalculatingFormulaTree( FALSE ), + bAutoCalcShellDisabled( sal_False ), + bForcedFormulaPending( sal_False ), + bCalculatingFormulaTree( sal_False ), bIsClip( eMode == SCDOCMODE_CLIP ), bIsUndo( eMode == SCDOCMODE_UNDO ), - bIsVisible( FALSE ), - bIsEmbedded( FALSE ), -// bNoSetDirty( TRUE ), - bNoSetDirty( FALSE ), - bInsertingFromOtherDoc( FALSE ), + bIsVisible( sal_False ), + bIsEmbedded( sal_False ), +// bNoSetDirty( sal_True ), + bNoSetDirty( sal_False ), + bInsertingFromOtherDoc( sal_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( sal_False ), + bCalcingAfterLoad( sal_False ), + bNoListening( sal_False ), + bIdleDisabled( sal_False ), + bInLinkUpdate( sal_False ), + bChartListenerCollectionNeedsUpdate( sal_False ), + bHasForcedFormulas( sal_False ), + bInDtorClear( sal_False ), + bExpandRefs( sal_False ), + bDetectiveDirty( sal_False ), nMacroCallMode( SC_MACROCALL_ALLOWED ), - bHasMacroFunc( FALSE ), + bHasMacroFunc( sal_False ), nVisSpellState( 0 ), nAsianCompression(SC_ASIANCOMPRESSION_INVALID), nAsianKerning(SC_ASIANKERNING_INVALID), - bSetDrawDefaults( FALSE ), - bPastingDrawFromOtherDoc( FALSE ), + bSetDrawDefaults( sal_False ), + bPastingDrawFromOtherDoc( sal_False ), nInDdeLinkUpdate( 0 ), - bInUnoBroadcast( FALSE ), - bInUnoListenerCall( FALSE ), + bInUnoBroadcast( sal_False ), + bInUnoListenerCall( sal_False ), eGrammar( formula::FormulaGrammar::GRAM_NATIVE ), - bStyleSheetUsageInvalid( TRUE ), + bStyleSheetUsageInvalid( sal_True ), mbUndoEnabled( true ), mbAdjustHeightEnabled( true ), mbExecuteLinkEnabled( true ), @@ -248,8 +248,8 @@ ScDocument::ScDocument( ScDocumentMode eMode, for (SCTAB i=1; i<=MAXTAB; i++) pTab[i] = NULL; - pRangeName = new ScRangeName( 4, 4, FALSE, this ); - pDBCollection = new ScDBCollection( 4, 4, FALSE, this ); + pRangeName = new ScRangeName( 4, 4, sal_False, this ); + pDBCollection = new ScDBCollection( 4, 4, sal_False, this ); pSelectionAttr = NULL; pChartCollection = new ScChartCollection; apTemporaryChartLock = std::auto_ptr< ScTemporaryChartLock >( new ScTemporaryChartLock(this) ); @@ -291,7 +291,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 @@ -347,7 +347,7 @@ IMPL_LINK( ScDocument, TrackTimeHdl, Timer*, EMPTYARG ) if (!pShell->IsModified()) { - pShell->SetModified( TRUE ); + pShell->SetModified( sal_True ); SfxBindings* pBindings = GetViewBindings(); if (pBindings) { @@ -370,7 +370,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 ) @@ -385,7 +385,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() ) @@ -415,7 +415,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) { @@ -528,8 +528,8 @@ ScFieldEditEngine& ScDocument::GetEditEngine() if ( !pEditEngine ) { pEditEngine = new ScFieldEditEngine( GetEnginePool(), GetEditPool() ); - pEditEngine->SetUpdateMode( FALSE ); - pEditEngine->EnableUndo( FALSE ); + pEditEngine->SetUpdateMode( sal_False ); + pEditEngine->EnableUndo( sal_False ); pEditEngine->SetRefMapMode( MAP_100TH_MM ); pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters ); } @@ -541,8 +541,8 @@ ScNoteEditEngine& ScDocument::GetNoteEngine() if ( !pNoteEngine ) { pNoteEngine = new ScNoteEditEngine( GetEnginePool(), GetEditPool() ); - pNoteEngine->SetUpdateMode( FALSE ); - pNoteEngine->EnableUndo( FALSE ); + pNoteEngine->SetUpdateMode( sal_False ); + pNoteEngine->EnableUndo( sal_False ); pNoteEngine->SetRefMapMode( MAP_100TH_MM ); pNoteEngine->SetForbiddenCharsTable( xForbiddenCharacters ); const SfxItemSet& rItemSet = GetDefPattern()->GetItemSet(); @@ -604,19 +604,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")), @@ -629,12 +629,12 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, } //UNUSED2009-05 void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, -//UNUSED2009-05 ULONG nFormatIndex, BOOL bForceTab ) +//UNUSED2009-05 sal_uLong nFormatIndex, sal_Bool bForceTab ) //UNUSED2009-05 { //UNUSED2009-05 SCTAB nTab = rPos.Tab(); //UNUSED2009-05 if ( bForceTab && !pTab[nTab] ) //UNUSED2009-05 { -//UNUSED2009-05 BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags +//UNUSED2009-05 sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags //UNUSED2009-05 //UNUSED2009-05 pTab[nTab] = new ScTable(this, nTab, //UNUSED2009-05 String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")), @@ -645,20 +645,20 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, //UNUSED2009-05 pTab[nTab]->PutCell( rPos, nFormatIndex, pCell ); //UNUSED2009-05 } -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; @@ -666,66 +666,66 @@ BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, rEndCol = 0; rEndRow = 0; - return FALSE; + return sal_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, sal_False )) { if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col(); - bAny = TRUE; + bAny = sal_True; } } return bAny; } rEndCol = 0; - return FALSE; + return sal_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, sal_False, sal_True )) { if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row(); - bAny = TRUE; + bAny = sal_True; } } return bAny; } rEndRow = 0; - return FALSE; + return sal_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() 1) { - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden - SetNoListening( TRUE ); + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden + SetNoListening( sal_True ); ScProgress* pProgress = new ScProgress( GetDocumentShell(), ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), GetCodeCount() ); if (nNewPos == SC_TAB_APPEND) @@ -794,7 +794,7 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos ) for (i = 0; i <= MAXTAB; i++) if (pTab[i]) pTab[i]->UpdateCompile(); - SetNoListening( FALSE ); + SetNoListening( sal_False ); for (i = 0; i <= MAXTAB; i++) if (pTab[i]) pTab[i]->StartAllListeners(); @@ -806,14 +806,14 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos ) if (pDrawLayer) DrawMovePage( static_cast(nOldPos), static_cast(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; @@ -821,20 +821,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( sal_False ); // Mehrfachberechnungen vermeiden if (bValid) { if (nNewPos == nMaxTableNumber) @@ -846,7 +846,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 ); @@ -873,11 +873,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( sal_False ); for (i = 0; i <= MAXTAB; i++) if (pTab[i] && i != nOldPos && i != nNewPos) pTab[i]->StartAllListeners(); @@ -891,12 +891,12 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM pChartListenerCollection->UpdateScheduledSeriesRanges(); } else - bValid = FALSE; + bValid = sal_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()); @@ -913,8 +913,8 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM pTab[nOldPos]->UpdateInsertTab(nNewPos); pTab[nOldPos]->UpdateCompile(); - pTab[nNewPos]->UpdateCompile( TRUE ); // #67996# maybe already compiled in Clone, but used names need recompilation - SetNoListening( FALSE ); + pTab[nNewPos]->UpdateCompile( sal_True ); // #67996# maybe already compiled in Clone, but used names need recompilation + SetNoListening( sal_False ); pTab[nOldPos]->StartAllListeners(); pTab[nNewPos]->StartAllListeners(); SetDirty(); @@ -933,14 +933,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; @@ -955,19 +955,19 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, pTab[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL ); } else - bValid = FALSE; + bValid = sal_False; } if (bValid) { - BOOL bOldAutoCalcSrc = FALSE; - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden - SetNoListening( TRUE ); + sal_Bool bOldAutoCalcSrc = sal_False; + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_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 } { @@ -978,33 +978,33 @@ 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] ); + sal_False, pTab[nDestPos] ); } } pTab[nDestPos]->SetTabNo(nDestPos); if ( !bResultsOnly ) { - BOOL bNamesLost = FALSE; - USHORT nSrcRangeNames = pSrcDoc->pRangeName->GetCount(); + sal_Bool bNamesLost = sal_False; + sal_uInt16 nSrcRangeNames = pSrcDoc->pRangeName->GetCount(); // array containing range names which might need update of indices ScRangeData** pSrcRangeNames = nSrcRangeNames ? new ScRangeData* [nSrcRangeNames] : NULL; // the index mapping thereof ScRangeData::IndexMap aSrcRangeMap; - BOOL bRangeNameReplace = FALSE; + sal_Bool bRangeNameReplace = sal_False; // find named ranges that are used in the source sheet - std::set aUsedNames; + std::set aUsedNames; pSrcDoc->pTab[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames ); - for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!! + for (sal_uInt16 i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!! { ScRangeData* pSrcData = (*pSrcDoc->pRangeName)[i]; - USHORT nOldIndex = pSrcData->GetIndex(); + sal_uInt16 nOldIndex = pSrcData->GetIndex(); bool bInUse = ( aUsedNames.find(nOldIndex) != aUsedNames.end() ); if (bInUse) { - USHORT nExisting = 0; + sal_uInt16 nExisting = 0; if ( pRangeName->SearchName( pSrcData->GetName(), nExisting ) ) { // the name exists already in the destination document @@ -1012,13 +1012,13 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, // (when refreshing links, the existing name is used and the warning not shown) ScRangeData* pExistingData = (*pRangeName)[nExisting]; - USHORT nExistingIndex = pExistingData->GetIndex(); + sal_uInt16 nExistingIndex = pExistingData->GetIndex(); pSrcRangeNames[i] = NULL; // 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 { @@ -1035,7 +1035,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, { pData->TransferTabRef( nSrcPos, nDestPos ); pSrcRangeNames[i] = pData; - USHORT nNewIndex = pData->GetIndex(); + sal_uInt16 nNewIndex = pData->GetIndex(); aSrcRangeMap.insert( ScRangeData::IndexMap::value_type(nOldIndex, nNewIndex)); if ( !bRangeNameReplace ) @@ -1053,7 +1053,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, { // first update all inserted named formulas if they contain other // range names and used indices changed - for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch + for (sal_uInt16 i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch { if ( pSrcRangeNames[i] ) pSrcRangeNames[i]->ReplaceRangeNamesInUse( aSrcRangeMap ); @@ -1069,7 +1069,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) @@ -1085,7 +1085,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, pTab[nDestPos]->CompileAll(); } - SetNoListening( FALSE ); + SetNoListening( sal_False ); if ( !bResultsOnly ) pTab[nDestPos]->StartAllListeners(); SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos)); @@ -1103,7 +1103,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, } if (!bValid) nRetVal = 0; - BOOL bVbaEnabled = IsInVBAMode(); + sal_Bool bVbaEnabled = IsInVBAMode(); if ( bVbaEnabled ) { @@ -1145,16 +1145,16 @@ 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]) pTab[nTab]->SetError( nCol, nRow, nError ); } -void ScDocument::EraseNonUsedSharedNames(USHORT nLevel) +void ScDocument::EraseNonUsedSharedNames(sal_uInt16 nLevel) { - for (USHORT i = 0; i < pRangeName->GetCount(); i++) + for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++) { ScRangeData* pRangeData = (*pRangeName)[i]; if (pRangeData && pRangeData->HasType(RT_SHARED)) @@ -1162,11 +1162,11 @@ void ScDocument::EraseNonUsedSharedNames(USHORT nLevel) String aName; pRangeData->GetName(aName); aName.Erase(0, 6); // !!! vgl. Table4, FillFormula !! - USHORT nInd = (USHORT) aName.ToInt32(); + sal_uInt16 nInd = (sal_uInt16) aName.ToInt32(); if (nInd <= nLevel) { - USHORT nIndex = pRangeData->GetIndex(); - BOOL bInUse = FALSE; + sal_uInt16 nIndex = pRangeData->GetIndex(); + sal_Bool bInUse = sal_False; for (SCTAB j = 0; !bInUse && (j <= MAXTAB); j++) { if (pTab[j]) @@ -1210,16 +1210,16 @@ ScFieldEditEngine* ScDocument::CreateFieldEditEngine() if (!pCacheFieldEditEngine) { pNewEditEngine = new ScFieldEditEngine( GetEnginePool(), - GetEditPool(), FALSE ); + GetEditPool(), sal_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 f3b3f1ab32c6..6a8ffd7c9c19 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -105,7 +105,7 @@ void ScDocument::SetRangeName( ScRangeName* pNewRangeName ) } //UNUSED2008-05 ScRangeData* ScDocument::GetRangeAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, -//UNUSED2008-05 BOOL bStartOnly) const +//UNUSED2008-05 sal_Bool bStartOnly) const //UNUSED2008-05 { //UNUSED2008-05 if ( pRangeName ) //UNUSED2008-05 return pRangeName->GetRangeAtCursor( ScAddress( nCol, nRow, nTab ), bStartOnly ); @@ -130,7 +130,7 @@ ScDBCollection* ScDocument::GetDBCollection() const return pDBCollection; } -void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemoveAutoFilter ) +void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, sal_Bool bRemoveAutoFilter ) { if ( bRemoveAutoFilter ) { @@ -139,8 +139,8 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove if ( pDBCollection ) { - USHORT nOldCount = pDBCollection->GetCount(); - for (USHORT nOld=0; nOldGetCount(); + for (sal_uInt16 nOld=0; nOldHasAutoFilter() ) @@ -148,8 +148,8 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove ScRange aOldRange; pOldData->GetArea( aOldRange ); - BOOL bFound = FALSE; - USHORT nNewIndex = 0; + sal_Bool bFound = sal_False; + sal_uInt16 nNewIndex = 0; if ( pNewDBCollection && pNewDBCollection->SearchName( pOldData->GetName(), nNewIndex ) ) { @@ -159,7 +159,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove ScRange aNewRange; pNewData->GetArea( aNewRange ); if ( aOldRange.aStart == aNewRange.aStart ) - bFound = TRUE; + bFound = sal_True; } } @@ -182,7 +182,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); @@ -210,9 +210,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; iGetOutRange().In( aPos ) ) return (*pDPCollection)[i]; @@ -226,7 +226,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]; @@ -247,7 +247,7 @@ void ScDocument::StopTemporaryChartLock() void ScDocument::SetChartListenerCollection( ScChartListenerCollection* pNewChartListenerCollection, - BOOL bSetChartRangeLists ) + sal_Bool bSetChartRangeLists ) { ScChartListenerCollection* pOld = pChartListenerCollection; pChartListenerCollection = pNewChartListenerCollection; @@ -260,23 +260,23 @@ 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(); //if (ValidTab(nTab) && pTab[nTab]) // return pTab[nTab]->IsScenario(); - //return FALSE; + //return sal_False; } 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()) { @@ -307,7 +307,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()) { @@ -317,19 +317,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 @@ -347,7 +347,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(); @@ -382,22 +382,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(); @@ -406,18 +406,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 sal_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 sal_False; } rTab = 0; String aFilterName; // wird vom Loader gefuellt @@ -425,42 +425,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 sal_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 sal_False; } rTab = GetTableCount() - 1; // nicht neu einfuegen, nur Ergebnisse - TransferTab( pSrcDoc, nSrcTab, rTab, FALSE, TRUE ); + TransferTab( pSrcDoc, nSrcTab, rTab, sal_False, sal_True ); } else - return FALSE; + return sal_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( sal_False ); SfxBindings* pBindings = GetViewBindings(); if (pBindings) pBindings->Invalidate( SID_LINKS ); } - return TRUE; + return sal_True; } ScExternalRefManager* ScDocument::GetExternalRefManager() const @@ -552,28 +552,28 @@ bool ScDocument::HasAnyCalcNotification() const return false; } -BOOL ScDocument::HasCalcNotification( SCTAB nTab ) const +sal_Bool ScDocument::HasCalcNotification( SCTAB nTab ) const { if (VALIDTAB(nTab) && pTab[nTab]) return pTab[nTab]->GetCalcNotification(); - return FALSE; + return sal_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(sal_False); } -ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, BOOL bCreate ) +ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate ) { ScOutlineTable* pVal = NULL; @@ -592,14 +592,14 @@ 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); //if (VALIDTAB(nTab)) // if (pTab[nTab]) // return pTab[nTab]->SetOutlineTable(pNewOutline); - //return FALSE; + //return sal_False; } void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, @@ -609,13 +609,13 @@ 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 ); //if (VALIDTAB(nTab) && pTab[nTab] ) // return pTab[nTab]->TestRemoveSubTotals( rParam ); - //return FALSE; + //return sal_False; } void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam ) @@ -624,28 +624,28 @@ 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 ); //if (VALIDTAB(nTab)) // if (pTab[nTab]) // return pTab[nTab]->DoSubTotals( rParam ); - //return FALSE; + //return sal_False; } -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 sal_False; // none found } // kopiert aus diesem Dokument die Zellen von Positionen, an denen in pPosDoc @@ -659,7 +659,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]) { @@ -667,7 +667,7 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario // und aktuelle Werte in bisher aktive Szenarios zurueckschreiben ScRangeList aRanges = *pTab[nSrcTab]->GetScenarioRanges(); - const ULONG nRangeCount = aRanges.Count(); + const sal_uLong nRangeCount = aRanges.Count(); // nDestTab ist die Zieltabelle for ( SCTAB nTab = nDestTab+1; @@ -676,27 +676,27 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario { if ( pTab[nTab]->IsActiveScenario() ) // auch wenn's dasselbe Szenario ist { - BOOL bTouched = FALSE; - for ( ULONG nR=0; nRHasScenarioRange( *pRange ) ) - bTouched = TRUE; + bTouched = sal_True; } if (bTouched) { - pTab[nTab]->SetActiveScenario(FALSE); + pTab[nTab]->SetActiveScenario(sal_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( sal_False ); // Mehrfachberechnungen vermeiden pTab[nSrcTab]->CopyScenarioTo( pTab[nDestTab] ); SetDirty(); SetAutoCalc( bOldAutoCalc ); @@ -705,7 +705,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(); @@ -716,13 +716,13 @@ 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 ); //if (ValidTab(nTab) && pTab[nTab]) // return pTab[nTab]->HasScenarioRange( rRange ); - //return FALSE; + //return sal_False; } const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const @@ -733,28 +733,28 @@ 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( ); //if (ValidTab(nTab) && pTab[nTab]) // return pTab[nTab]->IsActiveScenario(); - //return FALSE; + //return sal_False; } -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] ); DBG_ERROR("falsche Tabelle bei TestCopyScenario"); - return FALSE; + return sal_False; } void ScDocument::AddUnoObject( SfxListener& rObject ) @@ -813,9 +813,9 @@ void ScDocument::BroadcastUno( const SfxHint &rHint ) { if (pUnoBroadcaster) { - bInUnoBroadcast = TRUE; + bInUnoBroadcast = sal_True; pUnoBroadcaster->Broadcast( rHint ); - bInUnoBroadcast = FALSE; + bInUnoBroadcast = sal_False; // During Broadcast notification, Uno objects can add to pUnoListenerCalls. // The listener calls must be processed after completing the broadcast, @@ -830,9 +830,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 = sal_False; } } } @@ -877,7 +877,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 ); @@ -885,7 +885,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; @@ -1000,7 +1000,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 ); @@ -1023,7 +1023,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 ); @@ -1051,8 +1051,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() ) { @@ -1134,7 +1134,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) @@ -1143,13 +1143,13 @@ BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem, rMark.MarkToMulti(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_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 ) { @@ -1220,36 +1220,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 ); DBG_ERROR("missing tab"); - return FALSE; + return sal_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 ); DBG_ERROR("missing tab"); - return FALSE; + return sal_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); @@ -1259,13 +1259,13 @@ SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeep } -BOOL ScDocument::ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, BOOL* pSpecial ) +sal_Bool ScDocument::ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool* pSpecial ) { if ( ValidTab(nTab) && pTab[nTab] ) return pTab[nTab]->ValidQuery( nRow, rQueryParam, pSpecial ); DBG_ERROR("missing tab"); - return FALSE; + return sal_False; } @@ -1277,19 +1277,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); DBG_ERROR("missing tab"); - return FALSE; + return sal_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 ) { @@ -1297,7 +1297,7 @@ BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab ) { SCCOL nCol; SCROW nRow; - INT16 nFlag; + sal_Int16 nFlag; ScQueryParam aParam; pDBData->GetQueryParam( aParam ); @@ -1310,17 +1310,17 @@ BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab ) GetValue(); if ( (nFlag & SC_MF_AUTO) == 0 ) - bHasAutoFilter = FALSE; + bHasAutoFilter = sal_False; } } else - bHasAutoFilter = FALSE; + bHasAutoFilter = sal_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 ); @@ -1328,10 +1328,10 @@ BOOL ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, // if (pTab[nTab]) // return pTab[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow ); - //return FALSE; + //return sal_False; } -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 ); @@ -1339,19 +1339,19 @@ BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, // if (pTab[nTab]) // return pTab[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow ); - //return FALSE; + //return sal_False; } // // 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, sal_False); //!?? if (pDBData) { SCTAB nAreaTab; @@ -1391,47 +1391,47 @@ BOOL ScDocument::GetFilterEntries( pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates ); } - return TRUE; + return sal_True; } } - return FALSE; + return sal_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 sal_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; } } @@ -1439,7 +1439,7 @@ BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, //if (ValidTab(nTab) && pTab[nTab]) // return pTab[nTab]->GetDataEntries( nCol, nRow, rStrings, bLimit ); - //return FALSE; + //return sal_False; } // @@ -1451,9 +1451,9 @@ 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 ) { - USHORT i; + sal_uInt16 i; // // Bereichsnamen @@ -1461,7 +1461,7 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings ) if ( pRangeName ) { - USHORT nRangeCount = pRangeName->GetCount(); + sal_uInt16 nRangeCount = pRangeName->GetCount(); for ( i=0; iGetCount(); + sal_uInt16 nDBCount = pDBCollection->GetCount(); for ( i=0; iGetRowHeight( nRow, NULL, &nHeightEndRow); + sal_uInt16 nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow); if (nHeightEndRow > nEndRow) nHeightEndRow = nEndRow; if (!nHeight) @@ -1638,13 +1638,13 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) 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 = sal_False; while (!bEnd) { nAdd = (long) pTable->GetColWidth(nX1); @@ -1654,13 +1654,13 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) ++nX1; } else - bEnd = TRUE; + bEnd = sal_True; } nTwips = (long) (aPosRect.Right() / HMM_PER_TWIPS); SCCOL nX2 = nX1; - bEnd = FALSE; + bEnd = sal_False; while (!bEnd) { nAdd = (long) pTable->GetColWidth(nX2); @@ -1670,7 +1670,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) ++nX2; } else - bEnd = TRUE; + bEnd = sal_True; } @@ -1694,7 +1694,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) void ScDocument::SetEmbedded( const Rectangle& rRect ) // aus VisArea (1/100 mm) { - bIsEmbedded = TRUE; + bIsEmbedded = sal_True; aEmbedRange = GetRange( nVisibleTab, rRect ); } @@ -1765,7 +1765,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 @@ -1796,24 +1796,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(); DBG_ERROR("Falsche Tabellennummer"); - return FALSE; + return sal_False; } ScTableProtection* ScDocument::GetTabProtection( SCTAB nTab ) const @@ -1891,7 +1891,7 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy void ScDocument::SetDrawDefaults() { - bSetDrawDefaults = TRUE; + bSetDrawDefaults = sal_True; UpdateDrawDefaults(); } @@ -1974,7 +1974,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 ) @@ -2033,7 +2033,7 @@ ScDPTableDataCache* ScDocument::GetDPObjectCache( long nID ) ScDPTableDataCache* ScDocument::GetUsedDPObjectCache ( ScRange rRange ) { ScDPTableDataCache* pCache = NULL; - USHORT nCount = GetDPCollection()->GetCount(); + sal_uInt16 nCount = GetDPCollection()->GetCount(); for ( short i=nCount-1; i>=0 ; i--) { if ( const ScSheetSourceDesc* pUsedSheetDesc = (*pDPCollection)[i]->GetSheetDesc() ) @@ -2102,8 +2102,8 @@ void ScDocument::RemoveUnusedDPObjectCaches() for ( std::list::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); iter++ ) { long nID = (*iter)->GetId(); - USHORT nCount = GetDPCollection()->GetCount(); - USHORT i ; + sal_uInt16 nCount = GetDPCollection()->GetCount(); + sal_uInt16 i ; for ( i=0; iGetCacheId() ) @@ -2124,8 +2124,8 @@ void ScDocument::GetUsedDPObjectCache( std::list& usedlist for ( std::list::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); iter++ ) { long nID = (*iter)->GetId(); - USHORT nCount = GetDPCollection()->GetCount(); - USHORT i=0; + sal_uInt16 nCount = GetDPCollection()->GetCount(); + sal_uInt16 i=0; for ( i=0; iGetCacheId() ) break; diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index e8b58b0f71d3..c9e19a63f81d 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -61,11 +61,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 = sal_False; nX = 0.0; if (ValidColRow(nFCol, nFRow) && ValidColRow(nVCol, nVRow) && VALIDTAB(nFTab) && VALIDTAB(nVTab) && pTab[nFTab] && pTab[nVTab]) @@ -110,10 +110,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; } } @@ -134,11 +134,11 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL j; SCROW k; i = 0; - BOOL bStop = FALSE; + sal_Bool bStop = sal_False; while (i <= MAXTAB && !bStop) // erste markierte Tabelle finden { if (pTab[i] && rMark.GetTableSelect(i)) - bStop = TRUE; + bStop = sal_True; else i++; } @@ -173,9 +173,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; @@ -221,11 +221,11 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera SCCOL j; SCROW k; i = 0; - BOOL bStop = FALSE; + sal_Bool bStop = sal_False; while (i <= MAXTAB && !bStop) // erste markierte Tabelle finden { if (pTab[i] && rMark.GetTableSelect(i)) - bStop = TRUE; + bStop = sal_True; else i++; } @@ -245,12 +245,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, sal_False, sal_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, sal_False, sal_True, sal_True ); aForString += aRef.GetRefString(this, nTab1); nCol1++; nCol2 = Min( nCol2, (SCCOL)(rParam.aRefFormulaEnd.Col() - @@ -258,12 +258,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(), sal_False, sal_True, sal_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, sal_False, sal_True ); aForString += aRef.GetRefString(this, nTab1); nRow1++; nRow2 = Min( nRow2, (SCROW)(rParam.aRefFormulaEnd.Row() - @@ -275,12 +275,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, sal_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, sal_False, sal_True ); aForString += aRef.GetRefString(this, nTab1); nCol1++; nRow1++; } @@ -337,33 +337,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 sal_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 sal_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 sal_False; } void ScDocument::CompileDBFormula() @@ -374,7 +374,7 @@ void ScDocument::CompileDBFormula() } } -void ScDocument::CompileDBFormula( BOOL bCreateFormulaString ) +void ScDocument::CompileDBFormula( sal_Bool bCreateFormulaString ) { for (SCTAB i=0; i<=MAXTAB; i++) { @@ -382,7 +382,7 @@ void ScDocument::CompileDBFormula( BOOL bCreateFormulaString ) } } -void ScDocument::CompileNameFormula( BOOL bCreateFormulaString ) +void ScDocument::CompileNameFormula( sal_Bool bCreateFormulaString ) { if ( pCondFormList ) pCondFormList->CompileAll(); // nach ScNameDlg noetig @@ -441,7 +441,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 ) { @@ -477,14 +477,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: { @@ -498,7 +498,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 @@ -544,7 +544,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 @@ -552,12 +552,12 @@ ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew ) if (!pCondFormList) pCondFormList = new ScConditionalFormatList; - ULONG nMax = 0; - USHORT nCount = pCondFormList->Count(); - for (USHORT i=0; iCount(); + for (sal_uInt16 i=0; iGetKey(); + sal_uLong nKey = pForm->GetKey(); if ( pForm->EqualEntries( rNew ) ) return nKey; if ( nKey > nMax ) @@ -566,14 +566,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 @@ -581,12 +581,12 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew ) if (!pValidationList) pValidationList = new ScValidationDataList; - ULONG nMax = 0; - USHORT nCount = pValidationList->Count(); - for (USHORT i=0; iCount(); + for (sal_uInt16 i=0; iGetKey(); + sal_uLong nKey = pData->GetKey(); if ( pData->EqualEntries( rNew ) ) return nKey; if ( nKey > nMax ) @@ -595,7 +595,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 ); @@ -603,16 +603,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 ); @@ -625,7 +625,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; } } @@ -658,7 +658,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) @@ -672,7 +672,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 ); @@ -680,19 +680,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 { @@ -715,7 +715,7 @@ void ScDocument::SetCondFormList(ScConditionalFormatList* pNew) //------------------------------------------------------------------------ -BOOL ScDocument::HasDetectiveOperations() const +sal_Bool ScDocument::HasDetectiveOperations() const { return pDetOpList && pDetOpList->Count(); } @@ -753,12 +753,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; @@ -786,20 +786,20 @@ USHORT ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab, } if (nUsed > 0) - return static_cast((nDif*64)/nUsed); // max.256 (SC_DOCCOMP_MAXDIFF) + return static_cast((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; @@ -827,17 +827,17 @@ USHORT ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab, } if (nUsed > 0) - return static_cast((nDif*64)/nUsed); // max.256 + return static_cast((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.) @@ -852,19 +852,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 = sal_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 = sal_False; + sal_uInt16 nBest = SC_DOCCOMP_MAXDIFF; SCCOLROW nMax = Min( nOtherEndRow, static_cast(( nTempOther + nMaxCont + nUnknown )) ); for (SCCOLROW i=nTempOther; i<=nMax && nBest>0; i++) // bei 0 abbrechen { @@ -876,12 +876,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 = sal_False; else if ( i == nTempOther && bUseTotal ) - bTotal = TRUE; // nur ganz oben + bTotal = sal_True; // nur ganz oben } if ( bFound ) { @@ -896,14 +896,14 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW } if (pProgress) - pProgress->SetStateOnPercent(nProAdd+static_cast(nThisRow)); + pProgress->SetStateOnPercent(nProAdd+static_cast(nThisRow)); } // Bloecke ohne Uebereinstimmung ausfuellen SCROW nFillStart = 0; SCROW nFillPos = 0; - BOOL bInFill = FALSE; + sal_Bool bInFill = sal_False; for (nThisRow = 0; nThisRow <= nThisEndRow+1; nThisRow++) { SCROW nThisOther = ( nThisRow <= nThisEndRow ) ? pOtherRows[nThisRow] : (nOtherEndRow+1); @@ -920,13 +920,13 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW pOtherRows[nFillPos+i] = nFillStart+i; } - bInFill = FALSE; + bInFill = sal_False; } nFillStart = nThisOther + 1; nFillPos = nThisRow + 1; } else - bInFill = TRUE; + bInFill = sal_True; } } @@ -962,7 +962,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 = sal_False; for (nThisTab = 0; nThisTab <= nThisCount; nThisTab++) { SCTAB nThisOther = ( nThisTab < nThisCount ) ? pOtherTabs[nThisTab] : nOtherCount; @@ -980,13 +980,13 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc ) pOtherTabs[nFillPos+i] = nFillStart+i; } - bInFill = FALSE; + bInFill = sal_False; } nFillStart = nThisOther + 1; nFillPos = nThisTab + 1; } else - bInFill = TRUE; + bInFill = sal_True; } // @@ -1008,7 +1008,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; @@ -1034,23 +1034,23 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc ) //! Spalten vergleichen zweimal mit unterschiedlichem nMinGood ??? // 1 - FindOrder( pTempRows, nThisEndRow, nOtherEndRow, FALSE, + FindOrder( pTempRows, nThisEndRow, nOtherEndRow, sal_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, sal_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 d86d174ab414..0add2a0430dc 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -134,11 +134,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++) { @@ -208,7 +208,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]) { @@ -228,7 +228,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(); @@ -237,12 +237,12 @@ BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName ) if (pName) pName->Erase(); - return FALSE; // nix gefunden + return sal_False; // nix gefunden } 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 ); @@ -313,7 +313,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 @@ -362,8 +362,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; @@ -400,8 +400,8 @@ void ScDocument::UpdateChartArea( const String& rChartName, aNewRanges = new ScRangeList; aNewRanges->Parse( aRangesStr, this ); - ULONG nAddCount = rNewList->Count(); - for ( ULONG nAdd=0; nAddCount(); + for ( sal_uLong nAdd=0; nAddAppend( *rNewList->GetObject(nAdd) ); } else @@ -511,15 +511,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 = sal_False; + sal_Bool bDataChanged = sal_False; for ( ScRangePtr pR = aRLR->First(); pR; pR = aRLR->Next() ) { SCCOL theCol1 = pR->aStart.Col(); @@ -536,7 +536,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 )); @@ -550,7 +550,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, || (pR->aEnd.Tab() - pR->aStart.Tab() != theTab2 - theTab1))) ) { - bDataChanged = TRUE; + bDataChanged = sal_True; } } else @@ -634,12 +634,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 sal_False; } uno::Reference< embed::XEmbeddedObject > @@ -678,19 +678,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 sal_False; StrData aData( rStr ); - USHORT nDummy; + sal_uInt16 nDummy; return pColl->Search( &aData, nDummy ); } void ScDocument::UpdateChartListenerCollection() { - bChartListenerCollectionNeedsUpdate = FALSE; + bChartListenerCollectionNeedsUpdate = sal_False; if (!pDrawLayer) return; else @@ -716,11 +716,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 8706c49320d1..6b0c8d3bee41 100644 --- a/sc/source/core/data/documen6.cxx +++ b/sc/source/core/data/documen6.cxx @@ -69,7 +69,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()) { @@ -84,7 +84,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 ); } @@ -92,13 +92,13 @@ BOOL ScDocument::HasStringWeakCharacters( const String& rString ) } } - return FALSE; // none found + return sal_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 xBreakIter = GetBreakIterator(); @@ -132,12 +132,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 @@ -145,14 +145,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 @@ -165,7 +165,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 @@ -177,7 +177,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 d77dc1041d9c..b1084ddeecfd 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -63,8 +63,8 @@ extern const ScFormulaCell* pLastFormulaTreeTop; // cellform.cxx Err527 WorkA // STATIC DATA ----------------------------------------------------------- #ifdef erDEBUG -ULONG erCountBCAInserts = 0; -ULONG erCountBCAFinds = 0; +sal_uLong erCountBCAInserts = 0; +sal_uLong erCountBCAFinds = 0; #endif // ----------------------------------------------------------------------- @@ -87,7 +87,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 ) { @@ -105,7 +105,7 @@ void ScDocument::Broadcast( const ScHint& rHint ) if ( !nHardRecalcState ) { ScBulkBroadcast aBulkBroadcast( pBASM); // scoped bulk broadcast - BOOL bIsBroadcasted = FALSE; + sal_Bool bIsBroadcasted = sal_False; ScBaseCell* pCell = rHint.GetCell(); if ( pCell ) { @@ -113,7 +113,7 @@ void ScDocument::Broadcast( const ScHint& rHint ) if ( pBC ) { pBC->Broadcast( rHint ); - bIsBroadcasted = TRUE; + bIsBroadcasted = sal_True; } } if ( pBASM->AreaBroadcast( rHint ) || bIsBroadcasted ) @@ -128,7 +128,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(sal_False); } } @@ -252,7 +252,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 @@ -269,27 +269,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( sal_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 @@ -317,9 +317,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; @@ -377,7 +377,7 @@ void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress ) } bAutoCalc = bOldAutoCalc; DisableIdle( bOldIdleDisabled ); - bCalculatingFormulaTree = FALSE; + bCalculatingFormulaTree = sal_False; } @@ -435,7 +435,7 @@ void ScDocument::RemoveFromFormulaTrack( ScFormulaCell* pCell ) } -BOOL ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const +sal_Bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const { return pCell->GetPreviousTrack() || pFormulaTrack == pCell; } @@ -447,7 +447,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 ) @@ -474,24 +474,24 @@ void ScDocument::TrackFormulas( ULONG nHintId ) pTrack = pTrack->GetNextTrack(); } while ( pTrack ); pTrack = pFormulaTrack; - BOOL bHaveForced = FALSE; + sal_Bool bHaveForced = sal_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" ); @@ -509,7 +509,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 ) @@ -517,16 +517,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 e3c9d251fab7..914b82e4b94e 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -123,7 +123,7 @@ void ScDocument::ImplDeleteOptions() //------------------------------------------------------------------------ -SfxPrinter* ScDocument::GetPrinter(BOOL bCreateIfNotExist) +SfxPrinter* ScDocument::GetPrinter(sal_Bool bCreateIfNotExist) { if ( !pPrinter && bCreateIfNotExist ) { @@ -136,7 +136,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() ) @@ -172,7 +172,7 @@ void ScDocument::SetPrinter( SfxPrinter* pNewPrinter ) pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); delete pOld; } - InvalidateTextWidth(NULL, NULL, FALSE); // in both cases + InvalidateTextWidth(NULL, NULL, sal_False); // in both cases } //------------------------------------------------------------------------ @@ -187,7 +187,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() ) @@ -239,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() ); @@ -251,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 ); } } @@ -259,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( sal_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; @@ -288,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, sal_False, &pItem ); if ( eState == SFX_ITEM_SET ) rSet.Put( *pItem ); else if ( eState == SFX_ITEM_DONTCARE ) @@ -336,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, sal_False ); } //------------------------------------------------------------------------ -BOOL ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab ) +sal_Bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab ) { - BOOL bInUse = FALSE; + sal_Bool bInUse = sal_False; const SCTAB nCount = GetTableCount(); SCTAB i; @@ -358,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 = sal_False; const SCTAB nCount = GetTableCount(); for ( SCTAB i=0; iGetPageStyle() == 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 = sal_False; const SCTAB nCount = GetTableCount(); for ( SCTAB i=0; iGetPageStyle() == rOld ) { - bWasInUse = TRUE; + bWasInUse = sal_True; pTab[i]->SetPageStyle( rNew ); } @@ -390,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; @@ -409,15 +409,15 @@ BYTE ScDocument::GetEditTextDirection(SCTAB nTab) const // else (invalid for EditEngine): keep "default" } - return sal::static_int_cast(eRet); + return sal::static_int_cast(eRet); } //------------------------------------------------------------------------ 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(); @@ -441,17 +441,17 @@ 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(sal_False) == NULL ) + return sal_False; + bIdleDisabled = sal_True; -// ULONG nMs = 0; -// USHORT nIter = 0; +// sal_uLong nMs = 0; +// sal_uInt16 nIter = 0; - const ULONG nStart = Time::GetSystemTicks(); + const sal_uLong nStart = Time::GetSystemTicks(); double nPPTX = 0.0; double nPPTY = 0.0; OutputDevice* pDev = NULL; @@ -464,9 +464,9 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers SCTAB nTab = aCurTextWidthCalcPos.Tab(); SCROW nRow = aCurTextWidthCalcPos.Row(); SCsCOL nCol = aCurTextWidthCalcPos.Col(); - USHORT nRestart = 0; - USHORT nZoom = 0; - BOOL bNeedMore= FALSE; + sal_uInt16 nRestart = 0; + sal_uInt16 nZoom = 0; + sal_Bool bNeedMore= sal_False; if ( !ValidRow(nRow) ) nRow = 0, nCol--; @@ -482,7 +482,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]; @@ -492,10 +492,10 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers DBG_ASSERT( pStyle, "Missing StyleSheet :-/" ); - BOOL bProgress = FALSE; + sal_Bool bProgress = sal_False; if ( pStyle && 0 == GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALETOPAGES) ) { - USHORT nCount = 0; + sal_uInt16 nCount = 0; nZoom = GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALE); Fraction aZoomFract( nZoom, 100 ); @@ -521,28 +521,28 @@ 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, sal_False ); + bProgress = sal_True; } // DBG_ERROR( String("t,c,r = ") + String(nTab) + String(',') + String(nCol) + String(',') + String(nRow) ); // DBG_ERROR( String("nOldWidth = ") + String(pCell->GetTextWidth()) ); - 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 // DBG_ERROR( String("nNewWidth = ") + String(nNewWidth) ); pCell->SetTextWidth( nNewWidth ); - bNeedMore = TRUE; + bNeedMore = sal_True; } } else { - BOOL bNewTab = FALSE; + sal_Bool bNewTab = sal_False; nRow = 0; nCol--; @@ -551,14 +551,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 ) @@ -630,7 +630,7 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers // DBG_ERROR( String(nMs) + String(" ms (") + String(nIter) + String(')') ); pStylePool->SetSearchMask( eOldFam, nOldMask ); - bIdleDisabled = FALSE; + bIdleDisabled = sal_False; return bNeedMore; } @@ -640,18 +640,18 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers class ScSpellStatus { public: - BOOL bModified; + sal_Bool bModified; - ScSpellStatus() : bModified(FALSE) {}; + ScSpellStatus() : bModified(sal_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; } @@ -667,16 +667,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 = sal_False; // Aenderungen? SCCOL nCol = rSpellRange.aStart.Col(); // iterator always starts on the left edge SCROW nRow = rSpellPos.Row(); @@ -688,7 +688,7 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe if ( !pTab[nTab] ) { // may happen for visible range - return FALSE; + return sal_False; } } ScHorizontalCellIterator aIter( this, nTab, @@ -728,9 +728,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, sal_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 @@ -745,11 +745,11 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe else pEngine->SetText( *((ScEditCell*)pCell)->GetData() ); - aStatus.bModified = FALSE; + aStatus.bModified = sal_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 ); @@ -776,11 +776,11 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe // #47751# Seitenvorschau ist davon nicht betroffen // (sollte jedenfalls nicht) ScPaintHint aHint( ScRange( nCol, nRow, nTab ), PAINT_GRID ); - aHint.SetPrintFlag( FALSE ); + aHint.SetPrintFlag( sal_False ); pShell->Broadcast( aHint ); } - bChanged = TRUE; + bChanged = sal_True; } if ( ++nTestCount >= nMaxTest ) // checked enough text? @@ -822,24 +822,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 sal_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 // #41504# 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) { @@ -868,13 +868,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() ); @@ -904,15 +904,15 @@ void ScDocument::RemoveAutoSpellObj() //------------------------------------------------------------------------ -BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuchen +sal_Bool ScDocument::IdleCheckLinks() // sal_True = demnaechst wieder versuchen { - BOOL bAnyLeft = FALSE; + sal_Bool bAnyLeft = sal_False; if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; iISA(ScDdeLink)) @@ -922,7 +922,7 @@ BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuche { pDdeLink->TryUpdate(); if (pDdeLink->NeedsUpdate()) // war nix? - bAnyLeft = TRUE; + bAnyLeft = sal_True; } } } @@ -934,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; - for (USHORT i=0; iInsertDDELink( pLink, @@ -985,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; iISA(ScDdeLink)) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -void ScDocument::SetInLinkUpdate(BOOL bSet) +void ScDocument::SetInLinkUpdate(sal_Bool bSet) { // called from TableLink and AreaLink @@ -1007,7 +1007,7 @@ void ScDocument::SetInLinkUpdate(BOOL bSet) bInLinkUpdate = bSet; } -BOOL ScDocument::IsInLinkUpdate() const +sal_Bool ScDocument::IsInLinkUpdate() const { return bInLinkUpdate || IsInDdeLinkUpdate(); } @@ -1018,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(pBase); @@ -1040,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) { @@ -1056,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; // #49226# falls das Updaten laenger dauert, erstmal alle Werte // zuruecksetzen, damit nichts altes (falsches) stehen bleibt - BOOL bAny = FALSE; + sal_Bool bAny = sal_False; for (i=0; iISA(ScDdeLink)) { ((ScDdeLink*)pBase)->ResetValue(); - bAny = TRUE; + bAny = sal_True; } } if (bAny) @@ -1092,18 +1092,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 = sal_False; if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; iISA(ScDdeLink)) @@ -1114,7 +1114,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 } } } @@ -1127,8 +1127,8 @@ void ScDocument::DisconnectDdeLinks() if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; iISA(ScDdeLink)) @@ -1150,8 +1150,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; iISA(ScDdeLink)) @@ -1165,14 +1165,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; iISA(ScDdeLink)) ++nDdeCount; } @@ -1189,15 +1189,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 ) ) @@ -1217,14 +1217,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 ) ) @@ -1242,12 +1242,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 ) ) { @@ -1259,7 +1259,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 ) ) { @@ -1269,13 +1269,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, ScMatrix* pResults ) +bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, ScMatrix* 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 @@ -1301,7 +1301,7 @@ bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const return false; } -bool ScDocument::SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrix* pResults ) +bool ScDocument::SetDdeLinkResultMatrix( sal_uInt16 nDdePos, ScMatrix* pResults ) { if( ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) ) { @@ -1313,18 +1313,18 @@ bool ScDocument::SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrix* 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; iISA(ScAreaLink)) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ScDocument::UpdateAreaLinks() @@ -1332,8 +1332,8 @@ void ScDocument::UpdateAreaLinks() if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; iISA(ScAreaLink)) @@ -1347,7 +1347,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]; @@ -1368,8 +1368,8 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, bool bAnyUpdate = false; const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; iISA(ScAreaLink)) @@ -1403,7 +1403,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; @@ -1411,7 +1411,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, if ( pFirst->ISA(ScAreaLink) ) { ScAddress aFirstPos = static_cast(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) && @@ -1444,12 +1444,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; } //------------------------------------------------------------------------ @@ -1480,23 +1480,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; nParGetStringScriptType( 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(); @@ -1534,7 +1534,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 @@ -1546,7 +1546,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 ); @@ -1563,8 +1563,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(); @@ -1585,7 +1585,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 ); @@ -1601,7 +1601,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 37b3c830bb30..534c2333bd9b 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -170,8 +170,8 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) pTab[nTab]->SetDrawPageSize(false,false); // #54782# set the right size immediately #if 0 - 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( nTab, Size( nx, ny ) ); #endif } @@ -183,7 +183,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) UpdateDrawDefaults(); UpdateDrawLanguages(); if (bImportingXML) - pDrawLayer->EnableAdjust(FALSE); + pDrawLayer->EnableAdjust(sal_False); pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); pDrawLayer->SetCharCompressType( GetAsianCompression() ); @@ -209,7 +209,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 ) ); } } @@ -238,11 +238,11 @@ sal_Bool ScDocument::IsChart( const SdrObject* pObject ) return sal_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() { @@ -254,20 +254,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, sal_False ); } void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, @@ -290,12 +290,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 sal_False; SCTAB nStartTab = 0; SCTAB nEndTab = MAXTAB; @@ -322,7 +322,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(); } @@ -330,7 +330,7 @@ BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p } } - return FALSE; + return sal_False; } @@ -365,7 +365,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin ) //UNUSED2008-05 if (!pDrawLayer) //UNUSED2008-05 return; //UNUSED2008-05 -//UNUSED2008-05 BOOL bAnyIntObj = FALSE; +//UNUSED2008-05 sal_Bool bAnyIntObj = sal_False; //UNUSED2008-05 SCTAB nTab; //UNUSED2008-05 ScPostIt aNote(this); //UNUSED2008-05 for (nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++) @@ -380,7 +380,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin ) //UNUSED2008-05 { //UNUSED2008-05 if ( pObject->GetLayer() == SC_LAYER_INTERN ) //UNUSED2008-05 { -//UNUSED2008-05 bAnyIntObj = TRUE; // for all internal objects, including detective +//UNUSED2008-05 bAnyIntObj = sal_True; // for all internal objects, including detective //UNUSED2008-05 //UNUSED2008-05 if ( pObject->ISA( SdrCaptionObj ) ) //UNUSED2008-05 { @@ -390,7 +390,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin ) //UNUSED2008-05 if ( GetNote( pData->aStt.Col(), pData->aStt.Row(), nTab, aNote)) //UNUSED2008-05 if ( !aNote.IsShown() ) //UNUSED2008-05 { -//UNUSED2008-05 aNote.SetShown(TRUE); +//UNUSED2008-05 aNote.SetShown(sal_True); //UNUSED2008-05 SetNote( pData->aStt.Col(), pData->aStt.Row(), nTab, aNote); //UNUSED2008-05 } //UNUSED2008-05 } @@ -412,7 +412,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin ) //UNUSED2008-05 } //UNUSED2008-05 } -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? @@ -420,47 +420,47 @@ BOOL ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) // zu werden) if (!pDrawLayer) - return FALSE; + return sal_False; SdrPage* pPage = pDrawLayer->GetPage(static_cast(nTab)); DBG_ASSERT(pPage,"Page ?"); if (!pPage) - return FALSE; + return sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_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 sal_False; SdrPage* pPage = pDrawLayer->GetPage(static_cast(nTab)); DBG_ASSERT(pPage,"Page ?"); if (!pPage) - return FALSE; + return sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_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(); } @@ -512,12 +512,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 sal_False; ScDocument* pThis = (ScDocument*)this; //! GetMMRect / HasAnyDraw etc. const !!! @@ -549,7 +549,7 @@ BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, } if ( pThis->HasAnyDraw( nTab, aMMRect )) - return FALSE; + return sal_False; if ( nStartCol > 0 && !bLeftIsEmpty ) { @@ -560,16 +560,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 + sal_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 sal_False; } - return TRUE; + return sal_True; } void ScDocument::Clear( sal_Bool bFromDestructor ) @@ -591,9 +591,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 = sal_False; if (pDrawLayer) { @@ -609,7 +609,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(); @@ -652,12 +652,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 = sal_False; if (pDrawLayer) { @@ -671,7 +671,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(); } @@ -689,7 +689,7 @@ 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 ) @@ -747,15 +747,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( sal_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; } @@ -774,12 +774,12 @@ void ScDocument::SetForbiddenCharacters( const vos::ORefSetForbiddenCharsTable( 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; @@ -787,7 +787,7 @@ BYTE ScDocument::GetAsianCompression() const return nAsianCompression; } -void ScDocument::SetAsianCompression(BYTE nNew) +void ScDocument::SetAsianCompression(sal_uInt8 nNew) { nAsianCompression = nNew; if ( pEditEngine ) @@ -796,25 +796,25 @@ 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 sal_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 ); } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 3711b1b68603..5ecc72693cf5 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -136,56 +136,56 @@ 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 sal_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 sal_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 sal_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 sal_False; } -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); @@ -196,15 +196,15 @@ 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 sal_False; } -BOOL ScDocument::ValidTabName( const String& rName ) const +sal_Bool ScDocument::ValidTabName( const String& rName ) const { xub_StrLen nLen = rName.Len(); if (!nLen) @@ -244,9 +244,9 @@ BOOL ScDocument::ValidTabName( const String& rName ) const } -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]) { @@ -265,11 +265,11 @@ void ScDocument::CreateValidTabName(String& rName) const // neu erzeugen const String aStrTable( ScResId(SCSTR_TABLE) ); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; // vorneweg testen, ob der Prefix als gueltig erkannt wird // wenn nicht, nur doppelte vermeiden - BOOL bPrefix = ValidTabName( aStrTable ); + sal_Bool bPrefix = ValidTabName( aStrTable ); DBG_ASSERT(bPrefix, "ungueltiger Tabellenname"); SCTAB nDummy; @@ -311,11 +311,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 ) // sonst rName == "'Doc'!Tab", vorher pruefen bValid = (bValid && ValidNewTabName(rName)); if (bValid) @@ -326,7 +326,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName, pTab[nTabCount]->SetCodeName( rName ); ++nMaxTableNumber; if ( bExternalDocument ) - pTab[nTabCount]->SetVisible( FALSE ); + pTab[nTabCount]->SetVisible( sal_False ); } else { @@ -382,19 +382,19 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName, pChartListenerCollection->UpdateScheduledSeriesRanges(); SetDirty(); - bValid = TRUE; + bValid = sal_True; } else - bValid = FALSE; + bValid = sal_False; } } return bValid; } -BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) +sal_Bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) { - BOOL bValid = FALSE; + sal_Bool bValid = sal_False; if (VALIDTAB(nTab)) { if (pTab[nTab]) @@ -402,8 +402,8 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) SCTAB nTabCount = GetTableCount(); if (nTabCount > 1) { - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab ); DelBroadcastAreasInRange( aRange ); @@ -443,7 +443,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,sal_False, pRefUndoDoc ? pRefUndoDoc->pTab[i] : 0); delete pTab[nTab]; for (i=nTab + 1; i < nTabCount; i++) @@ -470,7 +470,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) pChartListenerCollection->UpdateScheduledSeriesRanges(); SetAutoCalc( bOldAutoCalc ); - bValid = TRUE; + bValid = sal_True; } } } @@ -478,16 +478,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 = sal_False; SCTAB i; if VALIDTAB(nTab) if (pTab[nTab]) { if ( bExternalDocument ) - bValid = TRUE; // zusammengesetzter Name + bValid = sal_True; // zusammengesetzter Name else bValid = ValidTabName(rName); for (i=0; (i<=MAXTAB) && bValid; i++) @@ -509,14 +509,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( sal_False ); } } return bValid; } -void ScDocument::SetVisible( SCTAB nTab, BOOL bVisible ) +void ScDocument::SetVisible( SCTAB nTab, sal_Bool bVisible ) { if (VALIDTAB(nTab)) if (pTab[nTab]) @@ -524,26 +524,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 sal_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 sal_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 ); @@ -556,30 +556,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 sal_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 ); @@ -617,16 +617,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 sal_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. @@ -644,7 +644,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]) @@ -652,11 +652,11 @@ BOOL ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const rEndCol = 0; rEndRow = 0; - return FALSE; + return sal_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]) @@ -664,7 +664,7 @@ BOOL ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) cons rEndCol = 0; rEndRow = 0; - return FALSE; + return sal_False; } bool ScDocument::ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow) const @@ -709,7 +709,7 @@ bool ScDocument::ShrinkToUsedDataArea( SCTAB nTab, SCCOL& rStartCol, // zusammenhaengender Bereich 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 ); @@ -730,8 +730,8 @@ void ScDocument::LimitChartIfAll( ScRangeListRef& rRangeList ) ScRangeListRef aNew = new ScRangeList; if (rRangeList.Is()) { - ULONG nCount = rRangeList->Count(); - for (ULONG i=0; iCount(); + for (sal_uLong i=0; iGetObject( i )); if ( ( aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL ) || @@ -797,7 +797,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(); @@ -810,7 +810,7 @@ BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const PutInOrder( nStartTab, nEndTab ); SCSIZE nSize = static_cast(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 ); @@ -819,7 +819,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 ) @@ -834,10 +834,10 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, nEndTab = MAXTAB; } - BOOL bTest = TRUE; - BOOL bRet = FALSE; - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bTest = sal_True; + sal_Bool bRet = sal_False; + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for ( i = nStartTab; i <= nEndTab && bTest; i++) if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i))) bTest &= pTab[i]->TestInsertRow( nStartCol, nEndCol, nSize ); @@ -863,7 +863,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, { UpdateReference( URM_INSDEL, nStartCol, nStartRow, nTabRangeStart, nEndCol, MAXROW, nTabRangeEnd, - 0, static_cast(nSize), 0, pRefUndoDoc, FALSE ); // without drawing objects + 0, static_cast(nSize), 0, pRefUndoDoc, sal_False ); // without drawing objects } while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) ); @@ -896,7 +896,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, if (pTab[i]) pTab[i]->SetRelNameDirty(); } - bRet = TRUE; + bRet = sal_True; } SetAutoCalc( bOldAutoCalc ); if ( bRet ) @@ -905,7 +905,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(), @@ -917,7 +917,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; @@ -930,8 +930,8 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab, nEndTab = MAXTAB; } - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden // handle chunks of consecutive selected sheets together SCTAB nTabRangeStart = nStartTab; @@ -962,13 +962,13 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab, { UpdateReference( URM_INSDEL, nStartCol, nStartRow+nSize, nTabRangeStart, nEndCol, MAXROW, nTabRangeEnd, - 0, -(static_cast(nSize)), 0, pRefUndoDoc, TRUE, false ); + 0, -(static_cast(nSize)), 0, pRefUndoDoc, sal_True, false ); } while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) ); } if (pUndoOutline) - *pUndoOutline = FALSE; + *pUndoOutline = sal_False; for ( i = nStartTab; i <= nEndTab; i++) if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i))) @@ -991,7 +991,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(), @@ -1000,7 +1000,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(); @@ -1013,7 +1013,7 @@ BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const PutInOrder( nStartTab, nEndTab ); SCSIZE nSize = static_cast(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 ); @@ -1022,7 +1022,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 ) @@ -1037,10 +1037,10 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, nEndTab = MAXTAB; } - BOOL bTest = TRUE; - BOOL bRet = FALSE; - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bTest = sal_True; + sal_Bool bRet = sal_False; + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for ( i = nStartTab; i <= nEndTab && bTest; i++) if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i))) bTest &= pTab[i]->TestInsertCol( nStartRow, nEndRow, nSize ); @@ -1063,7 +1063,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, { UpdateReference( URM_INSDEL, nStartCol, nStartRow, nTabRangeStart, MAXCOL, nEndRow, nTabRangeEnd, - static_cast(nSize), 0, 0, pRefUndoDoc, TRUE, false ); + static_cast(nSize), 0, 0, pRefUndoDoc, sal_True, false ); } while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) ); @@ -1088,7 +1088,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, if (pTab[i]) pTab[i]->SetRelNameDirty(); } - bRet = TRUE; + bRet = sal_True; } SetAutoCalc( bOldAutoCalc ); if ( bRet ) @@ -1097,7 +1097,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(), @@ -1108,7 +1108,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; @@ -1120,8 +1120,8 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA nEndTab = MAXTAB; } - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden // handle chunks of consecutive selected sheets together SCTAB nTabRangeStart = nStartTab; @@ -1152,13 +1152,13 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA { UpdateReference( URM_INSDEL, sal::static_int_cast(nStartCol+nSize), nStartRow, nTabRangeStart, MAXCOL, nEndRow, nTabRangeEnd, - -static_cast(nSize), 0, 0, pRefUndoDoc, TRUE, false ); + -static_cast(nSize), 0, 0, pRefUndoDoc, sal_True, false ); } while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) ); } if (pUndoOutline) - *pUndoOutline = FALSE; + *pUndoOutline = sal_False; for ( i = nStartTab; i <= nEndTab; i++) if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i))) @@ -1181,7 +1181,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(), @@ -1195,12 +1195,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 ) { DBG_ASSERT( rOld.aStart == rNew.aStart, "FitBlock: Anfang unterschiedlich" ); - rInsCol = rDelCol = rInsRow = rDelRow = FALSE; + rInsCol = rDelCol = rInsRow = rDelRow = sal_False; SCCOL nStartX = rOld.aStart.Col(); SCROW nStartY = rOld.aStart.Row(); @@ -1211,7 +1211,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; @@ -1220,12 +1220,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 @@ -1233,19 +1233,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 = sal_False; SCTAB nTab = rRange.aStart.Tab(); SCCOL nStartX = rRange.aStart.Col(); @@ -1266,44 +1266,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 = sal_False; if ( bInsRow && !CanInsertRow( aRowRange ) ) // Zellen am Rand ? - bOk = FALSE; + bOk = sal_False; if ( bInsCol || bDelCol ) { aColRange.aEnd.SetCol(MAXCOL); if ( HasPartOfMerged(aColRange) ) - bOk = FALSE; + bOk = sal_False; } if ( bInsRow || bDelRow ) { aRowRange.aEnd.SetRow(MAXROW); if ( HasPartOfMerged(aRowRange) ) - bOk = FALSE; + bOk = sal_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 ); @@ -1333,12 +1333,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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for (SCTAB i = 0; i <= MAXTAB; i++) if (pTab[i]) if ( rMark.GetTableSelect(i) || bIsUndo ) @@ -1349,21 +1349,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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden 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(), @@ -1373,7 +1373,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) { @@ -1397,7 +1397,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) { @@ -1418,7 +1418,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) { @@ -1437,7 +1437,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; @@ -1448,22 +1448,22 @@ void ScDocument::SetCutMode( BOOL bVal ) } -BOOL ScDocument::IsCutMode() +sal_Bool ScDocument::IsCutMode() { if (bIsClip) return GetClipParam().mbCutMode; else { DBG_ERROR("IsCutMode ohne bIsClip"); - return FALSE; + return sal_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 ); @@ -1472,14 +1472,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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc(); + pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden 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 ); + sal_False, bColRowFlags ); } pDestDoc->SetAutoCalc( bOldAutoCalc ); } @@ -1488,7 +1488,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 ); @@ -1496,10 +1496,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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc(); + pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden 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, sal_False, pDestDoc, pMarks ); for (SCTAB i = nTab1; i <= nTab2; i++) { @@ -1509,35 +1509,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, sal_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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc(); + pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden 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, sal_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; @@ -1545,10 +1545,10 @@ void ScDocument::UndoToDocument(const ScRange& rRange, SCTAB nTab1 = aNewRange.aStart.Tab(); SCTAB nTab2 = aNewRange.aEnd.Tab(); - BOOL bOldAutoCalc = pDestDoc->GetAutoCalc(); - pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc(); + pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden 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, sal_False, pDestDoc, pMarks ); for (SCTAB i = nTab1; i <= nTab2; i++) { @@ -1559,7 +1559,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, sal_False, pDestDoc, pMarks ); pDestDoc->SetAutoCalc( bOldAutoCalc ); } @@ -1629,14 +1629,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], sal_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 ) { DBG_ASSERT( bIsClip && pTransClip && pTransClip->bIsClip, "TransposeClip mit falschem Dokument" ); @@ -1649,9 +1649,9 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL // Bereiche uebernehmen pTransClip->pRangeName->FreeAll(); - for (USHORT i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!! + for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!! { - USHORT nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex(); + sal_uInt16 nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex(); ScRangeData* pData = new ScRangeData(*((*pRangeName)[i])); if (!pTransClip->pRangeName->Insert(pData)) delete pData; @@ -1705,7 +1705,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs) { - std::set aUsedNames; // indexes of named ranges that are used in the copied cells + std::set 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) ) @@ -1714,9 +1714,9 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip rClipRange.aEnd.Col(), rClipRange.aEnd.Row(), aUsedNames); pClipDoc->pRangeName->FreeAll(); - for (USHORT i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!! + for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!! { - USHORT nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex(); + sal_uInt16 nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex(); bool bInUse = ( aUsedNames.find(nIndex) != aUsedNames.end() ); if (bInUse) { @@ -1771,12 +1771,12 @@ void ScDocument::CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameDat The adjustment of the indices in the formulas is done later. */ ScRangeData* pClipRangeData = (*pClipDoc->pRangeName)[i]; - USHORT k; + sal_uInt16 k; if ( pRangeName->SearchName( pClipRangeData->GetName(), k ) ) { aClipRangeNames.mpRangeNames[i] = NULL; // range name not inserted - USHORT nOldIndex = pClipRangeData->GetIndex(); - USHORT nNewIndex = ((*pRangeName)[k])->GetIndex(); + sal_uInt16 nOldIndex = pClipRangeData->GetIndex(); + sal_uInt16 nNewIndex = ((*pRangeName)[k])->GetIndex(); aClipRangeNames.insert(nOldIndex, nNewIndex); if ( !aClipRangeNames.mbReplace ) aClipRangeNames.mbReplace = ( nOldIndex != nNewIndex ); @@ -1790,8 +1790,8 @@ void ScDocument::CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameDat if ( pRangeName->Insert( pData ) ) { aClipRangeNames.mpRangeNames[i] = pData; - USHORT nOldIndex = pClipRangeData->GetIndex(); - USHORT nNewIndex = pData->GetIndex(); + sal_uInt16 nOldIndex = pClipRangeData->GetIndex(); + sal_uInt16 nNewIndex = pData->GetIndex(); aClipRangeNames.insert(nOldIndex, nNewIndex); if ( !aClipRangeNames.mbReplace ) aClipRangeNames.mbReplace = ( nOldIndex != nNewIndex ); @@ -1827,7 +1827,7 @@ void ScDocument::UpdateRangeNamesInFormulas( rRangeNames.mpRangeNames[i]->ReplaceRangeNamesInUse(rRangeNames.maRangeMap); } // then update the formulas, they might need just the updated range names - for (ULONG nRange = 0; nRange < rDestRanges.Count(); ++nRange) + for (sal_uLong nRange = 0; nRange < rDestRanges.Count(); ++nRange) { const ScRange* pRange = rDestRanges.GetObject( nRange); SCCOL nCol1 = pRange->aStart.Col(); @@ -1879,7 +1879,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.isValid() && @@ -1889,7 +1889,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) { @@ -1903,7 +1903,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) { @@ -1979,8 +1979,8 @@ 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 ); @@ -1989,7 +1989,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1, else UpdateReference( URM_COPY, nCol1, nRow1, i, nCol2, nRow2, i+nFollow, - nDx, nDy, nDz, pCBFCP->pRefUndoDoc, FALSE ); + nDx, nDy, nDz, pCBFCP->pRefUndoDoc, sal_False ); nClipTab = (nClipTab+nFollow+1) % (MAXTAB+1); i = sal::static_int_cast( i + nFollow ); @@ -2050,9 +2050,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) @@ -2064,8 +2064,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( sal_False ); // avoid multiple recalculations NumFmtMergeHandler aNumFmtMergeHdl(this, pClipDoc); @@ -2110,7 +2110,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 ) @@ -2149,19 +2149,19 @@ 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(); // WaE: commented because unused: SCCOL nClipEndCol = pClipDoc->aClipRange.aEnd.Col(); SCROW nClipEndRow = aClipRange.aEnd.Row(); - for (ULONG nRange = 0; nRange < pDestRanges->Count(); ++nRange) + for (sal_uLong nRange = 0; nRange < pDestRanges->Count(); ++nRange) { const ScRange* pRange = pDestRanges->GetObject( nRange); SCCOL nCol1 = pRange->aStart.Col(); @@ -2227,7 +2227,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar if (pTab[k] && rMark.GetTableSelect(k)) pTab[k]->DecRecalcLevel(); - bInsertingFromOtherDoc = FALSE; + bInsertingFromOtherDoc = sal_False; UpdateRangeNamesInFormulas(aClipRangeNames, *pDestRanges, rMark, nXw, nYw); @@ -2243,7 +2243,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar } static SCROW lcl_getLastNonFilteredRow( - const ScBitMaskCompressedArray& rFlags, SCROW nBegRow, SCROW nEndRow, + const ScBitMaskCompressedArray& rFlags, SCROW nBegRow, SCROW nEndRow, SCROW nRowCount) { SCROW nFilteredRow = rFlags.GetFirstForCondition( @@ -2268,8 +2268,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( sal_False ); // avoid multiple recalculations NumFmtMergeHandler aNumFmtMergeHdl(this, pClipDoc); @@ -2304,11 +2304,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& rFlags = GetRowFlagsArray(aCBFCP.nTabStart); + const ScBitMaskCompressedArray& rFlags = GetRowFlagsArray(aCBFCP.nTabStart); for (ScRange* p = rClipParam.maRanges.First(); p; p = rClipParam.maRanges.Next()) { @@ -2362,7 +2362,7 @@ void ScDocument::CopyMultiRangeFromClip( if (pTab[i] && rMark.GetTableSelect(i)) pTab[i]->DecRecalcLevel(); - bInsertingFromOtherDoc = FALSE; + bInsertingFromOtherDoc = sal_False; ScRangeList aRanges; aRanges.Append(aDestRange); @@ -2382,7 +2382,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) { @@ -2398,7 +2398,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) { @@ -2468,7 +2468,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; @@ -2489,7 +2489,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(); @@ -2503,10 +2503,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! @@ -2519,10 +2519,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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden SCTAB nCount = GetTableCount(); for (SCTAB i=0; iAddUndoTab( i, i ); pTab[i]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow, - IDF_CONTENTS, FALSE, pMixDoc->pTab[i] ); + IDF_CONTENTS, sal_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, sal_False, pTab[i], NULL, bAsLink ); if (bDoMix) pTab[i]->MixData( nStartCol,nStartRow, nEndCol,nEndRow, @@ -2561,20 +2561,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 ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden ScRange aArea; rMark.GetMultiMarkArea( aArea ); @@ -2597,12 +2597,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] ); @@ -2619,13 +2619,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")), @@ -2639,12 +2639,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")), @@ -2657,13 +2657,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, SvNumberFormatter* pFormatter, bool bDetectNumberFormat ) { if ( ValidTab(nTab) && pTab[nTab] ) return pTab[nTab]->SetString( nCol, nRow, nTab, rString, pFormatter, bDetectNumberFormat ); else - return FALSE; + return sal_False; } @@ -2733,7 +2733,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(); @@ -2755,7 +2755,7 @@ void ScDocument::GetNumberFormatInfo( short& nType, ULONG& nIndex, void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormula, - BOOL bAsciiExport ) const + sal_Bool bAsciiExport ) const { if ( VALIDTAB(nTab) && pTab[nTab] ) pTab[nTab]->GetFormula( nCol, nRow, rFormula, bAsciiExport ); @@ -2807,27 +2807,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 sal_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 sal_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(); @@ -2838,20 +2838,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 sal_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 ) ); } @@ -2913,8 +2913,8 @@ void ScDocument::InitializeAllNoteCaptions( bool bForced ) void ScDocument::SetDirty() { - BOOL bOldAutoCalc = GetAutoCalc(); - bAutoCalc = FALSE; // keine Mehrfachberechnung + sal_Bool bOldAutoCalc = GetAutoCalc(); + bAutoCalc = sal_False; // keine Mehrfachberechnung { // scope for bulk broadcast ScBulkBroadcast aBulkBroadcast( GetBASM()); for (SCTAB i=0; i<=MAXTAB; i++) @@ -2933,8 +2933,8 @@ void ScDocument::SetDirty() void ScDocument::SetDirty( const ScRange& rRange ) { - BOOL bOldAutoCalc = GetAutoCalc(); - bAutoCalc = FALSE; // keine Mehrfachberechnung + sal_Bool bOldAutoCalc = GetAutoCalc(); + bAutoCalc = sal_False; // keine Mehrfachberechnung { // scope for bulk broadcast ScBulkBroadcast aBulkBroadcast( GetBASM()); SCTAB nTab2 = rRange.aEnd.Tab(); @@ -2947,8 +2947,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 = sal_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 ); @@ -2958,8 +2958,8 @@ void ScDocument::SetTableOpDirty( const ScRange& rRange ) void ScDocument::InterpretDirtyCells( const ScRangeList& rRanges ) { - ULONG nRangeCount = rRanges.Count(); - for (ULONG nPos=0; nPosSetDirtyVar(); @@ -3022,8 +3022,8 @@ void ScDocument::CompileAll() void ScDocument::CompileXML() { - BOOL bOldAutoCalc = GetAutoCalc(); - SetAutoCalc( FALSE ); + sal_Bool bOldAutoCalc = GetAutoCalc(); + SetAutoCalc( sal_False ); ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString( STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount() ); @@ -3053,14 +3053,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 = sal_False; - SetDetectiveDirty(FALSE); // noch keine wirklichen Aenderungen + SetDetectiveDirty(sal_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, @@ -3077,7 +3077,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] ) @@ -3100,41 +3100,41 @@ 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::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 ); @@ -3143,7 +3143,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 ); @@ -3152,7 +3152,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 ); @@ -3161,7 +3161,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 ); @@ -3170,7 +3170,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 ); @@ -3179,7 +3179,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 ); @@ -3188,7 +3188,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 @@ -3204,17 +3204,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) @@ -3236,7 +3236,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 ); @@ -3245,7 +3245,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 ); @@ -3254,11 +3254,11 @@ 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, - BOOL bSimpleTextImport ) + sal_Bool bFormula, const ScMarkData* pMarkData, + sal_Bool bSimpleTextImport ) { if ( ValidTab(nTab) && pTab[nTab] ) return pTab[nTab]->GetOptimalColWidth( nCol, pDev, nPPTX, nPPTY, @@ -3272,7 +3272,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 @@ -3282,18 +3282,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 ); DBG_ERROR("Falsche Tabellennummer"); - return FALSE; + return sal_False; } @@ -3302,19 +3302,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]->SetOptimalHeight( 0, MAXROW, 0, - pDev, nPPTX, nPPTY, rZoomX, rZoomY, FALSE, &aProgress, nProgressStart ); + pDev, nPPTX, nPPTY, rZoomX, rZoomY, sal_False, &aProgress, nProgressStart ); nProgressStart += pTab[nTab]->GetWeightedCount(); } } @@ -3324,49 +3324,49 @@ 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::SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags ) +void ScDocument::SetColFlags( SCCOL nCol, SCTAB nTab, sal_uInt8 nNewFlags ) { if ( ValidTab(nTab) && pTab[nTab] ) pTab[nTab]->SetColFlags( nCol, nNewFlags ); } -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 ); @@ -3374,7 +3374,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 ); @@ -3382,17 +3382,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 @@ -3403,7 +3403,7 @@ const ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArray( if (!pFlags) { DBG_ERROR("no row flags at sheet"); - static ScBitMaskCompressedArray< SCROW, BYTE> aDummy( MAXROW, 0); + static ScBitMaskCompressedArray< SCROW, sal_uInt8> aDummy( MAXROW, 0); pFlags = &aDummy; } return *pFlags; @@ -3690,8 +3690,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)) || @@ -3706,7 +3706,7 @@ SCCOL ScDocument::GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCareManualSize) const { - const ScBitMaskCompressedArray< SCROW, BYTE> * pRowFlagsArray; + const ScBitMaskCompressedArray< SCROW, sal_uInt8> * pRowFlagsArray; if ( ValidTab(nTab) && pTab[nTab] && ((pRowFlagsArray = pTab[nTab]->GetRowFlagsArray()) != NULL) && pTab[nTab]->mpRowHeights && pTab[nTab]->mpHiddenRows ) { @@ -3714,12 +3714,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) { @@ -3741,9 +3741,9 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa return 0; } -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(sal_False); nDefault = 0; ScDocAttrIterator aDocAttrItr(this, nTab, nCol, 0, nCol, nLastRow); SCCOL nColumn; @@ -3786,16 +3786,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(sal_False); return bRet; } @@ -3816,7 +3816,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] ) { @@ -3941,7 +3941,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; @@ -3964,8 +3964,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; @@ -3978,7 +3978,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con if (bFound) { if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) - bEqual = FALSE; // unterschiedliche + bEqual = sal_False; // unterschiedliche pStyle = pNewStyle; } } @@ -3995,7 +3995,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con if (bFound) { if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) - bEqual = FALSE; // unterschiedliche + bEqual = sal_False; // unterschiedliche pStyle = pNewStyle; } } @@ -4005,7 +4005,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 ) @@ -4023,7 +4023,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 ) { @@ -4040,7 +4040,7 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt } } - BOOL bIsUsed = FALSE; + sal_Bool bIsUsed = sal_False; for ( SCTAB i=0; i<=MAXTAB; i++ ) { @@ -4049,14 +4049,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 = sal_False; return bIsUsed; } @@ -4065,32 +4065,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 ); DBG_ERROR("ApplyFlags: falsche Tabelle"); - return FALSE; + return sal_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 ); DBG_ERROR("RemoveFlags: falsche Tabelle"); - return FALSE; + return sal_False; } void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr, - BOOL bPutToPool ) + sal_Bool bPutToPool ) { if (VALIDTAB(nTab)) if (pTab[nTab]) @@ -4099,7 +4099,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]) @@ -4107,7 +4107,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; @@ -4136,7 +4136,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 ); @@ -4156,9 +4156,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(sal_False); ScLineFlags aFlags; @@ -4187,7 +4187,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 ) { @@ -4196,7 +4196,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1, ScDocumentPool* pPool = xPoolHelper->GetDocPool(); - BOOL bAnyItem = FALSE; + sal_Bool bAnyItem = sal_False; sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE ); for (sal_uInt32 nItem=0; nItem(pItem)->GetValue(); + sal_Int32 nAngle = static_cast(pItem)->GetValue(); if ( nAngle != 0 && nAngle != 9000 && nAngle != 27000 ) { - bAnyItem = TRUE; + bAnyItem = sal_True; break; } } @@ -4224,14 +4224,14 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1, ScDocumentPool* pPool = xPoolHelper->GetDocPool(); - BOOL bHasRtl = FALSE; + sal_Bool bHasRtl = sal_False; sal_uInt32 nDirCount = pPool->GetItemCount2( ATTR_WRITINGDIR ); for (sal_uInt32 nItem=0; nItemGetItem2( ATTR_WRITINGDIR, nItem ); if ( pItem && ((const SvxFrameDirectionItem*)pItem)->GetValue() == FRMDIR_HORI_RIGHT_TOP ) { - bHasRtl = TRUE; + bHasRtl = sal_True; break; } } @@ -4254,7 +4254,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) ) @@ -4268,7 +4268,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(), @@ -4339,7 +4339,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)) @@ -4347,7 +4347,7 @@ BOOL ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, return pTab[nTab]->IsBlockEmpty( nStartCol, nStartRow, nEndCol, nEndRow, bIgnoreNotes ); DBG_ERROR("Falsche Tabellennummer"); - return FALSE; + return sal_False; } @@ -4373,16 +4373,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 = sal_False; + return sal_False; } if (VALIDTAB(nTab)) @@ -4392,27 +4392,27 @@ BOOL ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, DBG_ERROR("Falsche Tabellennummer"); if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = FALSE; - return FALSE; + *pOnlyNotBecauseOfMatrix = sal_False; + return sal_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 = sal_False; + return sal_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) ) @@ -4423,7 +4423,7 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark, aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), pOnlyNotBecauseOfMatrix ) ) { - bOk = FALSE; + bOk = sal_False; if ( pOnlyNotBecauseOfMatrix ) bMatrix = *pOnlyNotBecauseOfMatrix; } @@ -4432,7 +4432,7 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark, { if ( !pTab[i]->IsSelectionEditable( rMark, pOnlyNotBecauseOfMatrix ) ) { - bOk = FALSE; + bOk = sal_False; if ( pOnlyNotBecauseOfMatrix ) bMatrix = *pOnlyNotBecauseOfMatrix; } @@ -4447,26 +4447,26 @@ 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 = sal_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 = sal_False; ScBaseCell* pCell = GetCell( rCellPos ); if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA) { @@ -4498,7 +4498,7 @@ BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMat rMatrix.aStart = aOrigin; rMatrix.aEnd = aEnd; - bRet = TRUE; + bRet = sal_True; } } } @@ -4507,10 +4507,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 = sal_False; if ( ValidColRow(rStartCol,rStartRow) && ValidColRow(nEndCol,nEndRow) && ValidTab(nTab) ) { if (pTab[nTab]) @@ -4562,13 +4562,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 = sal_False; SCCOL nOldEndCol = rEndCol; SCROW nOldEndRow = rEndRow; @@ -4578,7 +4578,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 ) @@ -4589,11 +4589,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 = sal_False; if ( ValidColRow(nStartCol,nStartRow) && ValidColRow(rEndCol,rEndRow) && ValidTab(nTab) ) { if (pTab[nTab]) @@ -4611,9 +4611,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 = sal_False; SCTAB nStartTab = rRange.aStart.Tab(); SCTAB nEndTab = rRange.aEnd.Tab(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -4628,7 +4628,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; } @@ -4640,12 +4640,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 = sal_False; ScRange aExt = rRange; if (ExtendMerge(aExt)) { @@ -4670,9 +4670,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 = sal_False; SCTAB nStartTab = rRange.aStart.Tab(); SCTAB nEndTab = rRange.aEnd.Tab(); SCCOL nStartCol = rRange.aStart.Col(); @@ -4688,12 +4688,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; } } @@ -4703,11 +4703,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; @@ -4717,7 +4717,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 @@ -4732,7 +4732,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, { if (ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow, nDBTab, SC_MF_AUTO )) - bChange = TRUE; + bChange = sal_True; } } } @@ -4740,7 +4740,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, } -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 ); @@ -4749,12 +4749,12 @@ BOOL ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const else { DBG_ERROR("Overlapped: Attr==0"); - return FALSE; + return sal_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 ); @@ -4763,7 +4763,7 @@ BOOL ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const else { DBG_ERROR("Overlapped: Attr==0"); - return FALSE; + return sal_False; } } @@ -4773,13 +4773,13 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark, const SvxBoxInfoItem* pLineInner ) { ScRangeList aRangeList; - rMark.FillRangeListWithMarks( &aRangeList, FALSE ); - ULONG nRangeCount = aRangeList.Count(); + rMark.FillRangeListWithMarks( &aRangeList, sal_False ); + sal_uLong nRangeCount = aRangeList.Count(); for (SCTAB i=0; i<=MAXTAB; i++) { if (pTab[i] && rMark.GetTableSelect(i)) { - for (ULONG j=0; jApplyBlockFrame( pLineOuter, pLineInner, @@ -4808,11 +4808,11 @@ void ScDocument::ApplyFrameAreaTab( const ScRange& rRange, void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark ) { const SfxItemSet* pSet = &rAttr.GetItemSet(); - BOOL bSet = FALSE; - USHORT i; + sal_Bool bSet = sal_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) { @@ -4836,7 +4836,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)) @@ -4844,7 +4844,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)) @@ -4852,7 +4852,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)) @@ -4860,7 +4860,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 ); @@ -4916,12 +4916,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(sal_False); aCopyMark.MarkToMulti(); if (ValidTab(nTab) && pTab[nTab]) @@ -4969,9 +4969,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] ) @@ -4988,9 +4988,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] ) @@ -5000,9 +5000,9 @@ ULONG ScDocument::GetCodeCount() const } -ULONG ScDocument::GetWeightedCount() const +sal_uLong ScDocument::GetWeightedCount() const { - ULONG nCellCount = 0L; + sal_uLong nCellCount = 0L; for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ ) if ( pTab[nTab] ) @@ -5075,13 +5075,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(); DBG_ERROR("falsche Tab"); - return FALSE; + return sal_False; } @@ -5093,9 +5093,9 @@ void ScDocument::GetDocStat( ScDocStat& rDocStat ) } -BOOL ScDocument::HasPrintRange() +sal_Bool ScDocument::HasPrintRange() { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; for ( SCTAB i=0; !bResult && iIsPrintEntireSheet(); } -USHORT ScDocument::GetPrintRangeCount( SCTAB nTab ) +sal_uInt16 ScDocument::GetPrintRangeCount( SCTAB nTab ) { if (ValidTab(nTab) && pTab[nTab]) return pTab[nTab]->GetPrintRangeCount(); @@ -5120,7 +5120,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); @@ -5209,7 +5209,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) @@ -5224,14 +5224,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 sal_False; // sonst nicht } SfxUndoManager* ScDocument::GetUndoManager() diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index d97900e6b904..0876e814167c 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -66,7 +66,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; @@ -183,7 +183,7 @@ sal_Int32 ScDPCacheTable::getColSize() const return GetCache()->GetColumnCount(); } -void ScDPCacheTable::fillTable( const ScQueryParam& rQuery, BOOL* pSpecial, +void ScDPCacheTable::fillTable( const ScQueryParam& rQuery, sal_Bool* pSpecial, bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) { if ( mpCache == NULL ) diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 21669eb7a435..9e418bf3c300 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -116,7 +116,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 ); @@ -257,7 +257,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/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx old mode 100755 new mode 100644 index 6b84d37d8d0f..61161f333cd3 --- a/sc/source/core/data/dpglobal.cxx +++ b/sc/source/core/data/dpglobal.cxx @@ -47,23 +47,23 @@ namespace ScDPGlobal return rcResult; } - String GetFuncString( const String &rString, const USHORT nIndex ) + String GetFuncString( const String &rString, const sal_uInt16 nIndex ) { if ( nIndex <= 1 ) return rString; - ULONG uch = rString.Len() ? rString.GetChar( rString.Len()-1 ) : (L'9'+1); + sal_uLong uch = rString.Len() ? rString.GetChar( rString.Len()-1 ) : (L'9'+1); bool bEndWithDigital = ( L'0'<=uch && uch<=L'9'); char szTemp[__MAX_NUM_LEN+1]; int nLen = sprintf( szTemp, bEndWithDigital ? DATA_RENAME_SEPARATOR"%hu" : "%hu", nIndex ); String strRet = rString; - strRet.Append( String::CreateFromAscii( szTemp, static_cast(nLen) )); + strRet.Append( String::CreateFromAscii( szTemp, static_cast(nLen) )); return strRet; } - bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, USHORT nEndTab, BOOL bExcludeClip /*= FALSE*/ ) + bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, sal_uInt16 nEndTab, sal_Bool bExcludeClip /*= sal_False*/ ) { if ( ScDPCollection* pDPCollection = pDestDoc->GetDPCollection() ) { - USHORT nCount = pDPCollection->GetCount(); + sal_uInt16 nCount = pDPCollection->GetCount(); SCsCOL nOffsetX = nStartCol - nClipStartCol; SCsROW nOffsetY = nStartRow - nClipStartRow; @@ -71,12 +71,12 @@ namespace ScDPGlobal { ScRange aRange = iter->GetOutRange(); - for( USHORT nCurrTab = nStartTab; nCurrTab<=nEndTab; nCurrTab++ ) + for( sal_uInt16 nCurrTab = nStartTab; nCurrTab<=nEndTab; nCurrTab++ ) { SCsTAB nOffsetZ = nCurrTab - aRange.aStart.Tab(); aRange.Move( nOffsetX, nOffsetY, nOffsetZ ); - for ( USHORT i = 0; iGetOutRange())) { diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index edb3b787b9b2..4d91544e42c8 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -72,7 +72,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; @@ -81,10 +81,10 @@ const sal_Int32 SC_DP_DATE_LAST = 10000; // ============================================================================ namespace { - BOOL lcl_Search( SCCOL nSourceDim, ScDPTableDataCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex) + sal_Bool lcl_Search( SCCOL nSourceDim, ScDPTableDataCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex) { rIndex = vIdx.size(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCROW nLo = 0; SCROW nHi = vIdx.size() - 1; SCROW nIndex; @@ -104,7 +104,7 @@ namespace nHi = nIndex - 1; if (nCompare == 0) { - bFound = TRUE; + bFound = sal_True; nLo = nIndex; } } @@ -145,7 +145,7 @@ namespace template void lcl_InsertValue ( SCCOL nSourceDim, ScDPTableDataCache* pCache , std::vector< SCROW >& vIdx, const String& rString, const double& fValue ) { - lcl_InsertValue( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, TRUE ) ); + lcl_InsertValue( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, sal_True ) ); } template @@ -156,7 +156,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 ); @@ -447,7 +447,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 ); } @@ -539,7 +539,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() ) @@ -569,7 +569,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: @@ -1145,13 +1145,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( nSourceCount + aGroups.size() ) ); // data layout dimension? } -BOOL ScDPGroupTableData::IsDateDimension(long nDim) +sal_Bool ScDPGroupTableData::IsDateDimension(long nDim) { if ( nDim >= nSourceCount ) { @@ -1164,7 +1164,7 @@ BOOL ScDPGroupTableData::IsDateDimension(long nDim) return pSourceData->IsDateDimension( nDim ); } -ULONG ScDPGroupTableData::GetNumberFormat(long nDim) +sal_uLong ScDPGroupTableData::GetNumberFormat(long nDim) { if ( nDim >= nSourceCount ) { @@ -1188,7 +1188,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 ); } @@ -1392,7 +1392,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 @@ -1418,16 +1418,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 sal_False; } long ScDPGroupTableData::GetGroupBase(long nGroupDim) const @@ -1442,7 +1442,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. @@ -1459,10 +1459,10 @@ BOOL ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const return ( rDim.GetDateHelper() != NULL ); } - return FALSE; + return sal_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++ ) @@ -1486,7 +1486,7 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI if ( !pBaseDateHelper ) { DBG_ERROR( "mix of date and non-date groups" ); - return TRUE; + return sal_True; } sal_Int32 nGroupPart = pGroupDateHelper->GetDatePart(); @@ -1506,10 +1506,10 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI } DBG_ERROR("IsInGroup: no group dimension found"); - return TRUE; + return sal_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; @@ -1532,7 +1532,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long if ( !pFirstDateHelper || !pSecondDateHelper ) { DBG_ERROR( "mix of date and non-date groups" ); - return TRUE; + return sal_True; } sal_Int32 nFirstPart = pFirstDateHelper->GetDatePart(); @@ -1544,7 +1544,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 ) @@ -1559,13 +1559,13 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long } else { - // no groups -> TRUE if equal + // no groups -> sal_True if equal return rFirstData.IsCaseInsEqual( rSecondData ); } } DBG_ERROR("HasCommonElement: no group dimension found"); - return TRUE; + return sal_True; } long ScDPGroupTableData::GetSourceDim( long nDim ) diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 29ba9f15dc92..149c712fbdcf 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -130,7 +130,7 @@ using ::rtl::OUString; // ----------------------------------------------------------------------- -USHORT lcl_GetDataGetOrientation( const uno::Reference& xSource ) +sal_uInt16 lcl_GetDataGetOrientation( const uno::Reference& xSource ) { long nRet = sheet::DataPilotFieldOrientation_HIDDEN; if ( xSource.is() ) @@ -138,7 +138,7 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference xDimsName = xSource->getDimensions(); uno::Reference xIntDims = new ScNameToIndexAccess( xDimsName ); long nIntCount = xIntDims->getCount(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (long nIntDim=0; nIntDim xIntDim = @@ -156,7 +156,7 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference( nRet ); + return static_cast< sal_uInt16 >( nRet ); } // ----------------------------------------------------------------------- @@ -169,13 +169,13 @@ ScDPObject::ScDPObject( ScDocument* pD ) : pServDesc( NULL ), mpTableData(static_cast(NULL)), pOutput( NULL ), - bSettingsChanged( FALSE ), - bAlive( FALSE ), + bSettingsChanged( sal_False ), + bAlive( sal_False ), mnAutoFormatIndex( 65535 ), - bAllowMove( FALSE ), + bAllowMove( sal_False ), nHeaderRows( 0 ), mbHeaderLayout(false), - bRefresh( FALSE ), // Wang Xu Ming - DataPilot migration + bRefresh( sal_False ), // Wang Xu Ming - DataPilot migration mnCacheId( -1) // Wang Xu Ming - DataPilot migration { } @@ -192,10 +192,10 @@ ScDPObject::ScDPObject(const ScDPObject& r) : pServDesc( NULL ), mpTableData(static_cast(NULL)), pOutput( NULL ), - bSettingsChanged( FALSE ), - bAlive( FALSE ), + bSettingsChanged( sal_False ), + bAlive( sal_False ), mnAutoFormatIndex( r.mnAutoFormatIndex ), - bAllowMove( FALSE ), + bAllowMove( sal_False ), nHeaderRows( r.nHeaderRows ), mbHeaderLayout( r.mbHeaderLayout ), bRefresh( r.bRefresh ), // Wang Xu Ming - DataPilot migration @@ -228,12 +228,12 @@ ScDataObject* ScDPObject::Clone() const return new ScDPObject(*this); } -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; } @@ -301,7 +301,7 @@ void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc) pSheetDesc->aQueryParam.nRow1 = pSheetDesc->aSourceRange.aStart.Row(); pSheetDesc->aQueryParam.nCol2 = pSheetDesc->aSourceRange.aEnd.Col(); pSheetDesc->aQueryParam.nRow2 = pSheetDesc->aSourceRange.aEnd.Row();; - pSheetDesc->aQueryParam.bHasHeader = TRUE; + pSheetDesc->aQueryParam.bHasHeader = sal_True; InvalidateSource(); // new source must be created } @@ -354,7 +354,7 @@ void ScDPObject::WriteTempDataTo( ScDPObject& rDest ) const rDest.nHeaderRows = nHeaderRows; } -BOOL ScDPObject::IsSheetData() const +sal_Bool ScDPObject::IsSheetData() const { return ( pSheetDesc != NULL ); } @@ -396,7 +396,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 ); @@ -421,7 +421,7 @@ void ScDPObject::CreateOutput() //! modify aOutRange? - bAllowMove = FALSE; // use only once + bAllowMove = sal_False; // use only once } } } @@ -500,7 +500,7 @@ void ScDPObject::CreateObjects() if ( pSaveData && bRefresh ) { pSaveData->Refresh( xSource ); - bRefresh = FALSE; + bRefresh = sal_False; } } if (pSaveData ) @@ -526,12 +526,12 @@ void ScDPObject::CreateObjects() if (pSaveData) pSaveData->WriteToSource( xSource ); } - bSettingsChanged = FALSE; + bSettingsChanged = sal_False; } void ScDPObject::InvalidateData() { - bSettingsChanged = TRUE; + bSettingsChanged = sal_True; } void ScDPObject::InvalidateSource() @@ -552,7 +552,7 @@ void ScDPObject::InvalidateSource() mpTableData.reset(); } -ScRange ScDPObject::GetNewOutputRange( BOOL& rOverflow ) +ScRange ScDPObject::GetNewOutputRange( sal_Bool& rOverflow ) { CreateOutput(); // create xSource and pOutput if not already done @@ -599,7 +599,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(); } @@ -624,7 +624,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; nPosaSourceRange != r.pSheetDesc->aSourceRange ) - return FALSE; + return sal_False; } else if ( pSheetDesc || r.pSheetDesc ) { DBG_ERROR("RefsEqual: SheetDesc set at only one object"); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } void ScDPObject::WriteRefsTo( ScDPObject& r ) const @@ -846,9 +846,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 = sal_False; String aRet; if ( xSource.is() ) @@ -864,7 +864,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags uno::Reference xDimProp( xIntDim, uno::UNO_QUERY ); if ( xDimName.is() && xDimProp.is() ) { - BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ); //! error checking -- is "IsDataLayoutDimension" property required?? @@ -877,7 +877,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags { } if ( bData ) - rIsDataLayout = TRUE; + rIsDataLayout = sal_True; else aRet = String( aName ); @@ -891,9 +891,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 = sal_False; if ( xSource.is() ) { uno::Reference xDimsName = xSource->getDimensions(); @@ -912,7 +912,7 @@ BOOL ScDPObject::IsDuplicated( long nDim ) rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) ); uno::Reference xIntOrig; if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() ) - bDuplicated = TRUE; + bDuplicated = sal_True; } catch(uno::Exception&) { @@ -1051,8 +1051,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 @@ -1060,22 +1060,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 @@ -1311,7 +1311,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 ) { @@ -1337,7 +1337,7 @@ BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget, uno::Reference xDim( xIntDim, uno::UNO_QUERY ); uno::Reference xDimProp( xDim, uno::UNO_QUERY ); uno::Reference xDimSupp( xDim, uno::UNO_QUERY ); - BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ); sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty( xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION), @@ -1547,7 +1547,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb String aDimName = xDim->getName(); uno::Reference xDimProp( xDim, uno::UNO_QUERY ); - BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ); if (bDataLayout) { @@ -1593,8 +1593,8 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb if ( xMbrSupp.is() ) xMembers = xMbrSupp->getMembers(); - BOOL bFound = FALSE; - BOOL bShowDetails = TRUE; + sal_Bool bFound = sal_False; + sal_Bool bShowDetails = sal_True; if ( xMembers.is() ) { @@ -1608,7 +1608,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp, rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS) ); //! don't set bFound if property is unknown? - bFound = TRUE; + bFound = sal_True; } } } @@ -1647,7 +1647,7 @@ long lcl_FindName( const rtl::OUString& rString, const uno::Reference& xDimProp ) // PIVOT_FUNC mask +sal_uInt16 lcl_FirstSubTotal( const uno::Reference& xDimProp ) // PIVOT_FUNC mask { uno::Reference xDimSupp( xDimProp, uno::UNO_QUERY ); if ( xDimProp.is() && xDimSupp.is() ) @@ -1681,7 +1681,7 @@ USHORT lcl_FirstSubTotal( const uno::Reference& xDimProp ) uno::Sequence 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& 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; @@ -1713,10 +1713,10 @@ USHORT lcl_CountBits( USHORT nBits ) SCSIZE lcl_FillOldFields( PivotField* pFields, const uno::Reference& xSource, - USHORT nOrient, SCCOL nColAdd, BOOL bAddData ) + sal_uInt16 nOrient, SCCOL nColAdd, sal_Bool bAddData ) { SCSIZE nOutCount = 0; - BOOL bDataFound = FALSE; + sal_Bool bDataFound = sal_False; SCSIZE nCount = (nOrient == sheet::DataPilotFieldOrientation_PAGE) ? PIVOT_MAXPAGEFIELD : PIVOT_MAXFIELD; @@ -1738,7 +1738,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields, sheet::DataPilotFieldOrientation_HIDDEN ); if ( xDimProp.is() && nDimOrient == nOrient ) { - USHORT nMask = 0; + sal_uInt16 nMask = 0; if ( nOrient == sheet::DataPilotFieldOrientation_DATA ) { sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty( @@ -1754,7 +1754,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields, else nMask = lcl_FirstSubTotal( xDimProp ); // from first hierarchy - BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ); uno::Any aOrigAny; try @@ -1775,7 +1775,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields, nDupSource = lcl_FindName( xNameOrig->getName(), xDimsName ); } - BOOL bDupUsed = FALSE; + sal_Bool bDupUsed = sal_False; if ( nDupSource >= 0 ) { // add function bit to previous entry @@ -1794,7 +1794,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields, { pFields[nOld].nFuncMask |= nMask; pFields[nOld].nFuncCount = lcl_CountBits( pFields[nOld].nFuncMask ); - bDupUsed = TRUE; + bDupUsed = sal_True; } } } @@ -1804,7 +1804,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields, if ( bDataLayout ) { pFields[nOutCount].nCol = PIVOT_DATA_FIELD; - bDataFound = TRUE; + bDataFound = sal_True; } else if ( nDupSource >= 0 ) // if source was not found (different orientation) pFields[nOutCount].nCol = static_cast(nDupSource)+nColAdd; //! seek from name @@ -1856,7 +1856,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields, return nOutCount; } -BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const +sal_Bool ScDPObject::FillOldParam(ScPivotParam& rParam, sal_Bool bForFile) const { ((ScDPObject*)this)->CreateObjects(); // xSource is needed for field numbers @@ -1874,15 +1874,15 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const nColAdd = pSheetDesc->aSourceRange.aStart.Col(); } - BOOL bAddData = ( lcl_GetDataGetOrientation( xSource ) == sheet::DataPilotFieldOrientation_HIDDEN ); + sal_Bool bAddData = ( lcl_GetDataGetOrientation( xSource ) == sheet::DataPilotFieldOrientation_HIDDEN ); rParam.nPageCount = lcl_FillOldFields( rParam.aPageArr, - xSource, sheet::DataPilotFieldOrientation_PAGE, nColAdd, FALSE ); + xSource, sheet::DataPilotFieldOrientation_PAGE, nColAdd, sal_False ); rParam.nColCount = lcl_FillOldFields( rParam.aColArr, xSource, sheet::DataPilotFieldOrientation_COLUMN, nColAdd, bAddData ); rParam.nRowCount = lcl_FillOldFields( rParam.aRowArr, - xSource, sheet::DataPilotFieldOrientation_ROW, nColAdd, FALSE ); + xSource, sheet::DataPilotFieldOrientation_ROW, nColAdd, sal_False ); rParam.nDataCount = lcl_FillOldFields( rParam.aDataArr, - xSource, sheet::DataPilotFieldOrientation_DATA, nColAdd, FALSE ); + xSource, sheet::DataPilotFieldOrientation_DATA, nColAdd, sal_False ); uno::Reference xProp( xSource, uno::UNO_QUERY ); if (xProp.is()) @@ -1890,9 +1890,9 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const try { rParam.bMakeTotalCol = ScUnoHelpFunctions::GetBoolProperty( xProp, - rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), TRUE ); + rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), sal_True ); rParam.bMakeTotalRow = ScUnoHelpFunctions::GetBoolProperty( xProp, - rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), TRUE ); + rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), sal_True ); // following properties may be missing for external sources rParam.bIgnoreEmptyRows = ScUnoHelpFunctions::GetBoolProperty( xProp, @@ -1905,7 +1905,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 ) @@ -1952,7 +1952,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(); @@ -1964,7 +1964,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam) if ( nDimCount > MAX_LABELS ) nDimCount = MAX_LABELS; if (!nDimCount) - return FALSE; + return sal_False; for (long nDim=0; nDim < nDimCount; nDim++) { @@ -1976,8 +1976,8 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam) if ( xDimName.is() && xDimProp.is() ) { - BOOL bDuplicated = FALSE; - BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + sal_Bool bDuplicated = sal_False; + sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ); //! error checking -- is "IsDataLayoutDimension" property required?? @@ -1989,7 +1989,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam) rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) ); uno::Reference xIntOrig; if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() ) - bDuplicated = TRUE; + bDuplicated = sal_True; } catch(uno::Exception&) { @@ -2015,12 +2015,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 = sal_False; uno::Reference xDimsName( GetSource()->getDimensions() ); uno::Reference xIntDims(new ScNameToIndexAccess( xDimsName )); if( xIntDims.is() ) @@ -2035,14 +2035,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 = sal_False; uno::Reference< container::XNameAccess > xHiersNA; if( GetHierarchiesNA( nDim, xHiersNA ) ) { rHiers = xHiersNA->getElementNames(); - bRet = TRUE; + bRet = sal_True; } return bRet; } @@ -2058,14 +2058,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 = sal_False; uno::Reference xDimsName( GetSource()->getDimensions() ); uno::Reference xIntDims(new ScNameToIndexAccess( xDimsName )); uno::Reference xDim(xIntDims->getByIndex( nDim ), uno::UNO_QUERY); @@ -2088,7 +2088,7 @@ BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference< if ( xMembSupp.is() ) { xMembers.set(xMembSupp->getMembers()); - bRet = TRUE; + bRet = sal_True; } } } @@ -2131,10 +2131,10 @@ String lcl_GetDimName( const uno::Reference& xSource // static void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData, - PivotField* pFields, SCSIZE nCount, USHORT nOrient, + PivotField* pFields, SCSIZE nCount, sal_uInt16 nOrient, ScDocument* pDoc, SCROW nRow, SCTAB nTab, const uno::Reference& xSource, - BOOL bOldDefaults, + sal_Bool bOldDefaults, PivotField* pRefColFields, SCSIZE nRefColCount, PivotField* pRefRowFields, SCSIZE nRefRowCount, PivotField* pRefPageFields, SCSIZE nRefPageCount ) @@ -2148,7 +2148,7 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData, for (SCSIZE i=0; i also look for duplicate data column for (SCSIZE nPrevData=0; nPrevDataGetName()); pCurrDim->SetOrientation( nOrient ); - pCurrDim->SetFunction( sal::static_int_cast(eFunc) ); + pCurrDim->SetFunction( sal::static_int_cast(eFunc) ); if( rFieldRef.ReferenceType == sheet::DataPilotFieldReferenceType::NONE ) pCurrDim->SetReferenceValue( 0 ); else pCurrDim->SetReferenceValue( &rFieldRef ); - bFirst = FALSE; + bFirst = sal_False; } nMask *= 2; } @@ -2218,13 +2218,13 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData, { 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(ScDataPilotConversion::FirstFunc( nMask )); + nFuncArray[nFuncCount++] = sal::static_int_cast(ScDataPilotConversion::FirstFunc( nMask )); nMask *= 2; } pDim->SetSubTotals( nFuncCount, nFuncArray ); @@ -2232,14 +2232,14 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData, // ShowEmpty was implicit in old tables, // must be set for data layout dimension (not accessible in dialog) if ( bOldDefaults || nCol == PIVOT_DATA_FIELD ) - pDim->SetShowEmpty( TRUE ); + pDim->SetShowEmpty( sal_True ); } } } } // static -bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags ) +bool ScDPObject::IsOrientationAllowed( sal_uInt16 nOrient, sal_Int32 nDimFlags ) { bool bAllowed = true; switch (nOrient) @@ -2267,9 +2267,9 @@ bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags ) // ----------------------------------------------------------------------- // static -BOOL ScDPObject::HasRegisteredSources() +sal_Bool ScDPObject::HasRegisteredSources() { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; uno::Reference xManager = comphelper::getProcessServiceFactory(); uno::Reference xEnAc( xManager, uno::UNO_QUERY ); @@ -2278,7 +2278,7 @@ BOOL ScDPObject::HasRegisteredSources() uno::Reference xEnum = xEnAc->createContentEnumeration( rtl::OUString::createFromAscii( SCDPSOURCE_SERVICE ) ); if ( xEnum.is() && xEnum->hasMoreElements() ) - bFound = TRUE; + bFound = sal_True; } return bFound; @@ -2425,7 +2425,7 @@ ScDataObject* ScDPCollection::Clone() const void ScDPCollection::DeleteOnTab( SCTAB nTab ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; while ( nPos < nCount ) { // look for output positions on the deleted sheet @@ -2439,20 +2439,20 @@ void ScDPCollection::DeleteOnTab( SCTAB nTab ) void ScDPCollection::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - for (USHORT i=0; iUpdateReference( eUpdateRefMode, r, nDx, nDy, nDz ); } -BOOL ScDPCollection::RefsEqual( const ScDPCollection& r ) const +sal_Bool ScDPCollection::RefsEqual( const ScDPCollection& r ) const { if ( nCount != r.nCount ) - return FALSE; + return sal_False; - for (USHORT i=0; iRefsEqual( *((const ScDPObject*)r.At(i)) ) ) - return FALSE; + return sal_False; - return TRUE; // all equal + return sal_True; // all equal } void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const @@ -2460,7 +2460,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const if ( nCount == r.nCount ) { //! assert equal names? - for (USHORT i=0; iWriteRefsTo( *((ScDPObject*)r.At(i)) ); } else @@ -2470,12 +2470,12 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const // Matching objects are found by their names. DBG_ASSERT( nCount >= r.nCount, "WriteRefsTo: missing entries in document" ); - for (USHORT nSourcePos=0; nSourcePos(At(nSourcePos)); String aName = pSourceObj->GetName(); bool bFound = false; - for (USHORT nDestPos=0; nDestPos(r.At(nDestPos)); if ( pDestObj->GetName() == aName ) @@ -2489,7 +2489,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const // none found, re-insert deleted object (see ScUndoDataPilot::Undo) ScDPObject* pDestObj = new ScDPObject( *pSourceObj ); - pDestObj->SetAlive(TRUE); + pDestObj->SetAlive(sal_True); if ( !r.InsertNewTable(pDestObj) ) { DBG_ERROR("cannot insert DPObject"); @@ -2503,25 +2503,25 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const ScDPObject* ScDPCollection::GetByName(const String& rName) const { - for (USHORT i=0; i(pItems[i])->GetName() == rName) return static_cast(pItems[i]); 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? - for (USHORT nAdd=0; nAdd<=nCount; nAdd++) // nCount+1 tries + for (sal_uInt16 nAdd=0; nAdd<=nCount; nAdd++) // nCount+1 tries { String aNewName = aBase; aNewName += String::CreateFromInt32( nMin + nAdd ); - BOOL bFound = FALSE; - for (USHORT i=0; iGetName() == aNewName) - bFound = TRUE; + bFound = sal_True; if (!bFound) return aNewName; // found unused Name } @@ -2539,7 +2539,7 @@ long ScDPObject::GetCacheId() const else return mnCacheId; } -ULONG ScDPObject::RefreshCache() +sal_uLong ScDPObject::RefreshCache() { if ( pServDesc ) { @@ -2548,7 +2548,7 @@ ULONG ScDPObject::RefreshCache() } CreateObjects(); - ULONG nErrId = 0; + sal_uLong nErrId = 0; if ( pSheetDesc) nErrId = pSheetDesc->CheckValidate( pDoc ); if ( nErrId == 0 ) @@ -2573,10 +2573,10 @@ ULONG ScDPObject::RefreshCache() nNewId = pCache->GetId(); - bRefresh = TRUE; + bRefresh = sal_True; ScDPCollection* pDPCollection = pDoc->GetDPCollection(); - USHORT nCount = pDPCollection->GetCount(); - for (USHORT i=0; iGetCount(); + for (sal_uInt16 i=0; iGetCacheId() == nOldId ) { diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index bdd6fd555b89..6cdfe2a467e7 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -115,7 +115,7 @@ struct ScDPOutLevelData mbHasHiddenMember = false; } - BOOL operator<(const ScDPOutLevelData& r) const + sal_Bool operator<(const ScDPOutLevelData& r) const { return nDimPos nCol2 || nRow1 > nRow2 ) { @@ -160,7 +160,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); @@ -170,16 +170,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,sal_False); + aBoxInfo.SetValid(VALID_VERT,sal_False); + aBoxInfo.SetValid(VALID_DISTANCE,sal_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& xLevRes, const uno::Reference& xDims ) { @@ -198,9 +198,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 = sal_False; long nDimCount = xDims->getCount(); for (long nDim=0; nDim use its numberformat everywhere @@ -251,7 +251,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& xDims ) +sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference& xDims ) { long nDimCount = xDims->getCount(); for (long nDim=0; nDim& rSeq ) +sal_Bool lcl_MemberEmpty( const uno::Sequence& rSeq ) { // used to skip levels that have no members @@ -314,9 +314,9 @@ BOOL lcl_MemberEmpty( const uno::Sequence& rSeq ) const sheet::MemberResult* pArray = rSeq.getConstArray(); for (long i=0; i empty + return sal_True; // no member data -> empty } uno::Sequence lcl_GetSelectedPageAsResult( const uno::Reference& xDimProp ) @@ -356,20 +356,20 @@ uno::Sequence lcl_GetSelectedPageAsResult( const uno::Refer } ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference& xSrc, - const ScAddress& rPos, BOOL bFilter ) : + const ScAddress& rPos, sal_Bool bFilter ) : pDoc( pD ), xSource( xSrc ), aStartPos( rPos ), bDoFilter( bFilter ), - bResultsError( FALSE ), + bResultsError( sal_False ), mbHasDataLayout(false), pColNumFmt( NULL ), pRowNumFmt( NULL ), nColFmtCount( 0 ), nRowFmtCount( 0 ), nSingleNumFmt( 0 ), - bSizesValid( FALSE ), - bSizeOverflow( FALSE ), + bSizesValid( sal_False ), + bSizeOverflow( sal_False ), mbHeaderLayout( false ) { nTabStartCol = nMemberStartCol = nDataStartCol = nTabEndCol = 0; @@ -404,7 +404,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference= nDataStartCol ) @@ -618,7 +618,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; @@ -664,7 +664,7 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab, { // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - //lcl_SetFrame( pDoc,nTab, nMemberStartCol+(USHORT)nLevel,nRow, nTabEndCol,nRow, SC_DP_FRAME_INNER_BOLD ); + //lcl_SetFrame( pDoc,nTab, nMemberStartCol+(sal_uInt16)nLevel,nRow, nTabEndCol,nRow, SC_DP_FRAME_INNER_BOLD ); outputimp.OutputBlockFrame( nMemberStartCol+(SCCOL)nLevel,nRow, nDataStartCol-1,nRow ); // End Comments lcl_SetStyleById( pDoc,nTab, nMemberStartCol+(SCCOL)nLevel,nRow, nDataStartCol-1,nRow, @@ -728,7 +728,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(); @@ -748,7 +748,7 @@ void ScDPOutput::CalcSizes() nTabEndRow = nDataStartRow + (SCROW)nRowCount - 1; else nTabEndRow = nDataStartRow; // single row will remain empty - bSizesValid = TRUE; + bSizesValid = sal_True; } } @@ -890,7 +890,7 @@ void ScDPOutput::Output() for (long nCol=0; nCol vbSetBorder; - vbSetBorder.resize( nTabEndRow - nDataStartRow + 1, FALSE ); + std::vector vbSetBorder; + vbSetBorder.resize( nTabEndRow - nDataStartRow + 1, sal_False ); for (nField=0; nField xSrcProp( xSource, uno::UNO_QUERY ); - BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp, + sal_Bool bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp, rtl::OUString::createFromAscii(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::createFromAscii(DP_PROP_ROWGRAND) ); if ( bRowGrand ) rGrandTotalRows = 1; // default if data layout not in rows @@ -1375,13 +1375,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 && @@ -1459,10 +1459,10 @@ uno::Sequence 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& rDataNames, const std::vector& rGivenNames, @@ -1485,7 +1485,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; } } @@ -1597,7 +1597,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] = sal_False; } } @@ -1631,7 +1631,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] = sal_False; } // if no condition is given, keep the columns/rows included } @@ -1639,7 +1639,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" ); @@ -1652,13 +1652,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] = sal_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; @@ -1711,9 +1711,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(); @@ -1728,7 +1728,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 sal_False; // incomplete table without data fields -> no result if ( eDataOrient == sheet::DataPilotFieldOrientation_HIDDEN ) { @@ -1736,15 +1736,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 sal_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(), sal_False ); long nField; long nCol; @@ -1769,12 +1769,12 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget, for (nField=0; nField& rDataRow = aData[nRowPos]; if ( nColPos >= rDataRow.getLength() ) - return FALSE; + return sal_False; const sheet::DataResult& rResult = rDataRow[nColPos]; if ( rResult.Flags & sheet::DataResultFlags::ERROR ) - return FALSE; //! different error? + return sal_False; //! different error? - rTarget.mbValIsStr = FALSE; + rTarget.mbValIsStr = sal_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 sal_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(); @@ -1872,9 +1872,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 @@ -1882,7 +1882,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 sal_False; // wrong sheet // calculate output positions and sizes @@ -1897,25 +1897,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 = sal_False; // is this within the same orientation? + sal_Bool bBeforeDrag = sal_False; + sal_Bool bAfterDrag = sal_False; for (long nPos=0; nPos nPos ) - bAfterDrag = TRUE; + bAfterDrag = sal_True; } } @@ -1940,13 +1940,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 && @@ -1958,18 +1958,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 = sal_False; // is this within the same orientation? + sal_Bool bBeforeDrag = sal_False; + sal_Bool bAfterDrag = sal_False; for (long nPos=0; nPos nPos ) - bAfterDrag = TRUE; + bAfterDrag = sal_True; } } @@ -1994,7 +1994,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 @@ -2007,25 +2007,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 = sal_False; // is this within the same orientation? + sal_Bool bBeforeDrag = sal_False; + sal_Bool bAfterDrag = sal_False; for (long nPos=0; nPos nPos ) - bAfterDrag = TRUE; + bAfterDrag = sal_True; } } @@ -2050,10 +2050,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 sal_False; } diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index bad05968bf72..100db65df4b7 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -118,32 +118,32 @@ ScDPSaveMember::~ScDPSaveMember() { } -BOOL ScDPSaveMember::operator== ( const ScDPSaveMember& r ) const +sal_Bool ScDPSaveMember::operator== ( const ScDPSaveMember& r ) const { if ( aName != r.aName || nVisibleMode != r.nVisibleMode || nShowDetailsMode != r.nShowDetailsMode ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } -BOOL ScDPSaveMember::HasIsVisible() const +sal_Bool ScDPSaveMember::HasIsVisible() const { return nVisibleMode != SC_DPSAVEMODE_DONTKNOW; } -void ScDPSaveMember::SetIsVisible(BOOL bSet) +void ScDPSaveMember::SetIsVisible(sal_Bool bSet) { nVisibleMode = bSet; } -BOOL ScDPSaveMember::HasShowDetails() const +sal_Bool ScDPSaveMember::HasShowDetails() const { return nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW; } -void ScDPSaveMember::SetShowDetails(BOOL bSet) +void ScDPSaveMember::SetShowDetails(sal_Bool bSet) { nShowDetailsMode = bSet; } @@ -181,11 +181,11 @@ void ScDPSaveMember::WriteToSource( const uno::Reference& xMemb if ( nVisibleMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xMembProp, - rtl::OUString::createFromAscii(DP_PROP_ISVISIBLE), (BOOL)nVisibleMode ); + rtl::OUString::createFromAscii(DP_PROP_ISVISIBLE), (sal_Bool)nVisibleMode ); if ( nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xMembProp, - rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS), (BOOL)nShowDetailsMode ); + rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS), (sal_Bool)nShowDetailsMode ); if (mpLayoutName.get()) ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_LAYOUTNAME, *mpLayoutName); @@ -197,18 +197,18 @@ void ScDPSaveMember::WriteToSource( const uno::Reference& xMemb // ----------------------------------------------------------------------- -ScDPSaveDimension::ScDPSaveDimension(const String& rName, BOOL bDataLayout) : +ScDPSaveDimension::ScDPSaveDimension(const String& rName, sal_Bool bDataLayout) : aName( rName ), pSelectedPage( NULL ), mpLayoutName(NULL), mpSubtotalName(NULL), bIsDataLayout( bDataLayout ), - bDupFlag( FALSE ), + bDupFlag( sal_False ), nOrientation( sheet::DataPilotFieldOrientation_HIDDEN ), nFunction( sheet::GeneralFunction_AUTO ), nUsedHierarchy( -1 ), nShowEmptyMode( SC_DPSAVEMODE_DONTKNOW ), - bSubTotalDefault( TRUE ), + bSubTotalDefault( sal_True ), nSubTotalCount( 0 ), pSubTotalFuncs( NULL ), pReferenceValue( NULL ), @@ -234,7 +234,7 @@ ScDPSaveDimension::ScDPSaveDimension(const ScDPSaveDimension& r) : { if ( nSubTotalCount && r.pSubTotalFuncs ) { - pSubTotalFuncs = new USHORT[nSubTotalCount]; + pSubTotalFuncs = new sal_uInt16[nSubTotalCount]; for (long nSub=0; nSubHasCurrentPage() && r.HasCurrentPage() ) { if ( this->GetCurrentPage() != r.GetCurrentPage() ) { - return FALSE; + return sal_False; } } else if ( this->HasCurrentPage() || r.HasCurrentPage() ) { - return FALSE; + return sal_False; } if( pReferenceValue && r.pReferenceValue ) { if ( !(*pReferenceValue == *r.pReferenceValue) ) { - return FALSE; + return sal_False; } } else if ( pReferenceValue || r.pReferenceValue ) { - return FALSE; + return sal_False; } if( this->pSortInfo && r.pSortInfo ) { if ( !(*this->pSortInfo == *r.pSortInfo) ) { - return FALSE; + return sal_False; } } else if ( this->pSortInfo || r.pSortInfo ) { - return FALSE; + return sal_False; } if( this->pAutoShowInfo && r.pAutoShowInfo ) { if ( !(*this->pAutoShowInfo == *r.pAutoShowInfo) ) { - return FALSE; + return sal_False; } } else if ( this->pAutoShowInfo || r.pAutoShowInfo ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } void ScDPSaveDimension::AddMember(ScDPSaveMember* pMember) @@ -388,26 +388,26 @@ void ScDPSaveDimension::SetName( const String& rNew ) aName = rNew; } -void ScDPSaveDimension::SetOrientation(USHORT nNew) +void ScDPSaveDimension::SetOrientation(sal_uInt16 nNew) { nOrientation = nNew; } -void ScDPSaveDimension::SetSubTotals(long nCount, const USHORT* pFuncs) +void ScDPSaveDimension::SetSubTotals(long nCount, const sal_uInt16* pFuncs) { if (pSubTotalFuncs) delete [] pSubTotalFuncs; nSubTotalCount = nCount; if ( nCount && pFuncs ) { - pSubTotalFuncs = new USHORT[nCount]; + pSubTotalFuncs = new sal_uInt16[nCount]; for (long i=0; i& xD if ( nUsedHierarchy >= 0 ) { - aAny <<= (INT32)nUsedHierarchy; + aAny <<= (sal_Int32)nUsedHierarchy; xDimProp->setPropertyValue( rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY), aAny ); } @@ -664,7 +664,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference& xD } if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW ) lcl_SetBoolProperty( xLevProp, - rtl::OUString::createFromAscii(DP_PROP_SHOWEMPTY), (BOOL)nShowEmptyMode ); + rtl::OUString::createFromAscii(DP_PROP_SHOWEMPTY), (sal_Bool)nShowEmptyMode ); if ( pSortInfo ) ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_SORTING, *pSortInfo); @@ -751,8 +751,8 @@ ScDPSaveData::ScDPSaveData() : nRowGrandMode( SC_DPSAVEMODE_DONTKNOW ), nIgnoreEmptyMode( SC_DPSAVEMODE_DONTKNOW ), nRepeatEmptyMode( SC_DPSAVEMODE_DONTKNOW ), - bFilterButton( TRUE ), - bDrillDown( TRUE ), + bFilterButton( sal_True ), + bDrillDown( sal_True ), // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance mnCacheId( -1), @@ -805,7 +805,7 @@ ScDPSaveData& ScDPSaveData::operator= ( const ScDPSaveData& r ) return *this; } -BOOL ScDPSaveData::operator== ( const ScDPSaveData& r ) const +sal_Bool ScDPSaveData::operator== ( const ScDPSaveData& r ) const { if ( nColumnGrandMode != r.nColumnGrandMode || nRowGrandMode != r.nRowGrandMode || @@ -815,20 +815,20 @@ BOOL ScDPSaveData::operator== ( const ScDPSaveData& r ) const mnCacheId != r.mnCacheId ||/// Wang Xu Ming -- 2009-6-18 DataPilot Migration bDrillDown != r.bDrillDown || mbDimensionMembersBuilt != r.mbDimensionMembersBuilt) - return FALSE; + return sal_False; if ( pDimensionData || r.pDimensionData ) if ( !pDimensionData || !r.pDimensionData || !( *pDimensionData == *r.pDimensionData ) ) - return FALSE; + return sal_False; - ULONG nCount = aDimList.Count(); + sal_uLong nCount = aDimList.Count(); if ( nCount != r.aDimList.Count() ) - return FALSE; + return sal_False; - for (ULONG i=0; iGetName() == rName && !pDim->IsDataLayout() ) return pDim; } - ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, FALSE ); + ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, sal_False ); aDimList.Insert( pNew, LIST_APPEND ); return pNew; } @@ -898,7 +898,7 @@ ScDPSaveDimension* ScDPSaveData::GetNewDimensionByName(const String& rName) if ( pDim->GetName() == rName && !pDim->IsDataLayout() ) return DuplicateDimension(rName); } - ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, FALSE ); + ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, sal_False ); aDimList.Insert( pNew, LIST_APPEND ); return pNew; } @@ -909,7 +909,7 @@ ScDPSaveDimension* ScDPSaveData::GetDataLayoutDimension() if (pDim) return pDim; - ScDPSaveDimension* pNew = new ScDPSaveDimension( String(), TRUE ); + ScDPSaveDimension* pNew = new ScDPSaveDimension( String(), sal_True ); aDimList.Insert( pNew, LIST_APPEND ); return pNew; } @@ -933,7 +933,7 @@ ScDPSaveDimension* ScDPSaveData::DuplicateDimension(const String& rName) ScDPSaveDimension* pOld = GetDimensionByName( rName ); ScDPSaveDimension* pNew = new ScDPSaveDimension( *pOld ); - pNew->SetDupFlag( TRUE ); + pNew->SetDupFlag( sal_True ); aDimList.Insert( pNew, LIST_APPEND ); return pNew; } @@ -956,12 +956,12 @@ void ScDPSaveData::RemoveDimensionByName(const String& rName) ScDPSaveDimension& ScDPSaveData::DuplicateDimension( const ScDPSaveDimension& rDim ) { ScDPSaveDimension* pNew = new ScDPSaveDimension( rDim ); - pNew->SetDupFlag( TRUE ); + pNew->SetDupFlag( sal_True ); aDimList.Insert( pNew, LIST_APPEND ); return *pNew; } -ScDPSaveDimension* ScDPSaveData::GetInnermostDimension(USHORT nOrientation) +ScDPSaveDimension* ScDPSaveData::GetInnermostDimension(sal_uInt16 nOrientation) { // return the innermost dimension for the given orientation, // excluding data layout dimension @@ -1008,12 +1008,12 @@ void ScDPSaveData::SetPosition( ScDPSaveDimension* pDim, long nNew ) { // position (nNew) is counted within dimensions of the same orientation - USHORT nOrient = pDim->GetOrientation(); + sal_uInt16 nOrient = pDim->GetOrientation(); aDimList.Remove( pDim ); - ULONG nCount = aDimList.Count(); // after remove + sal_uLong nCount = aDimList.Count(); // after remove - ULONG nInsPos = 0; + sal_uLong nInsPos = 0; while ( nNew > 0 && nInsPos < nCount ) { if ( ((ScDPSaveDimension*)aDimList.GetObject(nInsPos))->GetOrientation() == nOrient ) @@ -1024,32 +1024,32 @@ void ScDPSaveData::SetPosition( ScDPSaveDimension* pDim, long nNew ) aDimList.Insert( pDim, nInsPos ); } -void ScDPSaveData::SetColumnGrand(BOOL bSet) +void ScDPSaveData::SetColumnGrand(sal_Bool bSet) { nColumnGrandMode = bSet; } -void ScDPSaveData::SetRowGrand(BOOL bSet) +void ScDPSaveData::SetRowGrand(sal_Bool bSet) { nRowGrandMode = bSet; } -void ScDPSaveData::SetIgnoreEmptyRows(BOOL bSet) +void ScDPSaveData::SetIgnoreEmptyRows(sal_Bool bSet) { nIgnoreEmptyMode = bSet; } -void ScDPSaveData::SetRepeatIfEmpty(BOOL bSet) +void ScDPSaveData::SetRepeatIfEmpty(sal_Bool bSet) { nRepeatEmptyMode = bSet; } -void ScDPSaveData::SetFilterButton(BOOL bSet) +void ScDPSaveData::SetFilterButton(sal_Bool bSet) { bFilterButton = bSet; } -void ScDPSaveData::SetDrillDown(BOOL bSet) +void ScDPSaveData::SetDrillDown(sal_Bool bSet) { bDrillDown = bSet; } @@ -1092,10 +1092,10 @@ void ScDPSaveData::WriteToSource( const uno::ReferenceGetName()); - BOOL bData = pDim->IsDataLayout(); + sal_Bool bData = pDim->IsDataLayout(); //! getByName for ScDPSource, including DataLayoutDimension !!!!!!!! uno::Reference xDimsName = xSource->getDimensions(); uno::Reference xIntDims = new ScNameToIndexAccess( xDimsName ); long nIntCount = xIntDims->getCount(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (long nIntDim=0; nIntDim xIntDim = ScUnoHelpFunctions::AnyToInterface( xIntDims->getByIndex(nIntDim) ); @@ -1150,7 +1150,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference xDimName( xIntDim, uno::UNO_QUERY ); if ( xDimName.is() && xDimName->getName() == aName ) - bFound = TRUE; + bFound = sal_True; } if ( bFound ) @@ -1187,10 +1187,10 @@ void ScDPSaveData::WriteToSource( const uno::ReferenceGetOrientation() != sheet::DataPilotFieldOrientation_HIDDEN && !pDim->IsDataLayout() ) - return FALSE; + return sal_False; } - return TRUE; // no entries that are not hidden + return sal_True; // no entries that are not hidden } ScDPDimensionSaveData* ScDPSaveData::GetDimensionData() @@ -1301,13 +1301,13 @@ void ScDPSaveData::Refresh( const uno::Reference& xS uno::Reference xDimsName = xSource->getDimensions(); uno::Reference xIntDims = new ScNameToIndexAccess( xDimsName ); long nIntCount = xIntDims->getCount(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (long nIntDim=0; nIntDim xIntDim = ScUnoHelpFunctions::AnyToInterface( xIntDims->getByIndex(nIntDim) ); uno::Reference xDimName( xIntDim, uno::UNO_QUERY ); if ( xDimName.is() && xDimName->getName() == aName ) - bFound = TRUE; + bFound = sal_True; } if ( !bFound ) { diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx index b966d9d458ea..f0e060e8cc7d 100644 --- a/sc/source/core/data/dpsdbtab.cxx +++ b/sc/source/core/data/dpsdbtab.cxx @@ -82,7 +82,7 @@ using ::com::sun::star::uno::UNO_QUERY; { ScDPTableDataCache* pCache = NULL; ScDPCollection* pDPCollection= pDoc->GetDPCollection(); - USHORT nCount = pDPCollection->GetCount(); + sal_uInt16 nCount = pDPCollection->GetCount(); for ( short i=nCount-1; i>=0 ; i--) { @@ -250,18 +250,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 sal_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 old mode 100755 new mode 100644 index a1fa9d2d60a6..33ce84cc94c2 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -65,12 +65,12 @@ ScSheetDPData::ScSheetDPData( ScDocument* pD, const ScSheetSourceDesc& rDesc , l ScDPTableData(pD, rDesc.GetCacheId( pD, nCacheId) ), // DataPilot Migration - Cache&&Performance aQuery ( rDesc.aQueryParam ), pSpecial(NULL), - bIgnoreEmptyRows( FALSE ), - bRepeatIfEmpty(FALSE), + bIgnoreEmptyRows( sal_False ), + bRepeatIfEmpty(sal_False), aCacheTable( pD, rDesc.GetCacheId( pD, nCacheId)) { SCSIZE nEntryCount( aQuery.GetEntryCount()); - pSpecial = new BOOL[nEntryCount]; + pSpecial = new sal_Bool[nEntryCount]; for (SCSIZE j = 0; j < nEntryCount; ++j ) { ScQueryEntry& rEntry = aQuery.GetEntry(j); @@ -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 sal_False; } else if (nDim >= nColCount) { DBG_ERROR("IsDateDimension: invalid dimension"); - return FALSE; + return sal_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; @@ -245,7 +245,7 @@ ScDPTableDataCache* ScSheetSourceDesc::CreateCache( ScDocument* pDoc , long nID if ( pCache && ( nID < 0 || nID == pCache->GetId() ) ) return pCache; - ULONG nErrId = CheckValidate( pDoc ); + sal_uLong nErrId = CheckValidate( pDoc ); if ( !nErrId ) { pCache = new ScDPTableDataCache( pDoc ); @@ -286,12 +286,12 @@ long ScSheetSourceDesc:: GetCacheId( ScDocument* pDoc, long nID ) const return pCache->GetId(); } -ULONG ScSheetSourceDesc::CheckValidate( ScDocument* pDoc ) const +sal_uLong ScSheetSourceDesc::CheckValidate( ScDocument* pDoc ) const { ScRange aSrcRange( aSourceRange); if ( !pDoc ) return STR_ERR_DATAPILOTSOURCE; - for(USHORT i= aSrcRange.aStart.Col();i <= aSrcRange.aEnd.Col();i++) + for(sal_uInt16 i= aSrcRange.aStart.Col();i <= aSrcRange.aEnd.Col();i++) { if ( pDoc->IsBlockEmpty( aSrcRange.aStart.Tab(), i, aSrcRange.aStart.Row(),i, aSrcRange.aStart.Row())) diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx old mode 100755 new mode 100644 index cb68732a237f..f6b85117d63b --- 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 sal_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 sal_False; // always false } -BOOL ScDPTableData::IsInGroup( const ScDPItemData&, long, +sal_Bool ScDPTableData::IsInGroup( const ScDPItemData&, long, const ScDPItemData&, long ) const { DBG_ERROR("IsInGroup shouldn't be called for non-group data"); - return FALSE; + return sal_False; } -BOOL ScDPTableData::HasCommonElement( const ScDPItemData&, long, +sal_Bool ScDPTableData::HasCommonElement( const ScDPItemData&, long, const ScDPItemData&, long ) const { DBG_ERROR("HasCommonElement shouldn't be called for non-group data"); - return FALSE; + return sal_False; } void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTable& rCacheTable, const CalcInfo& rInfo, CalcRowData& rData) @@ -191,13 +191,13 @@ void ScDPTableData::ProcessRowData(CalcInfo& rInfo, CalcRowData& rData, bool bAu // DataPilot Migration if (!bAutoShow) { - LateInitParams aColParams( rInfo.aColDims, rInfo.aColLevels, FALSE ); - LateInitParams aRowParams ( rInfo.aRowDims, rInfo.aRowLevels, TRUE ); + LateInitParams aColParams( rInfo.aColDims, rInfo.aColLevels, sal_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( sal_False); + aRowParams.SetInitChild( sal_True ); + aRowParams.SetInitAllChildren( sal_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 8d2a5ec070f5..f2cc8d2c1e5c 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -59,15 +59,15 @@ using ::com::sun::star::uno::UNO_QUERY_THROW; // ----------------------------------------------------------------------- namespace { - BOOL lcl_isDate( ULONG nNumType ) + sal_Bool lcl_isDate( sal_uLong nNumType ) { return ( (nNumType & NUMBERFORMAT_DATE) != 0 )? 1:0 ; } - BOOL lcl_Search( const std::vector& list, const ::std::vector& rOrder, const ScDPItemData& item, SCROW& rIndex) + sal_Bool lcl_Search( const std::vector& list, const ::std::vector& rOrder, const ScDPItemData& item, SCROW& rIndex) { rIndex = list.size(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCROW nLo = 0; SCROW nHi = list.size() - 1; SCROW nIndex; @@ -83,7 +83,7 @@ namespace nHi = nIndex - 1; if (nCompare == 0) { - bFound = TRUE; + bFound = sal_True; nLo = nIndex; } } @@ -107,7 +107,7 @@ namespace { nNumType = NUMBERFORMAT_LOGICAL; fValue = xRow->getBoolean(nCol) ? 1 : 0; - return new ScDPItemData( rStr, fValue,TRUE,nNumType); + return new ScDPItemData( rStr, fValue,sal_True,nNumType); } //break; @@ -123,7 +123,7 @@ namespace { //! do the conversion here? fValue = xRow->getDouble(nCol); - return new ScDPItemData( rStr, fValue,TRUE); + return new ScDPItemData( rStr, fValue,sal_True); } //break; @@ -133,7 +133,7 @@ namespace util::Date aDate = xRow->getDate(nCol); fValue = Date(aDate.Day, aDate.Month, aDate.Year) - rNullDate; - return new ScDPItemData( rStr, fValue, TRUE, nNumType ); + return new ScDPItemData( rStr, fValue, sal_True, nNumType ); } //break; @@ -144,7 +144,7 @@ namespace util::Time aTime = xRow->getTime(nCol); fValue = ( aTime.Hours * 3600 + aTime.Minutes * 60 + aTime.Seconds + aTime.HundredthSeconds / 100.0 ) / D_TIMEFACTOR; - return new ScDPItemData( rStr,fValue, TRUE, nNumType ); + return new ScDPItemData( rStr,fValue, sal_True, nNumType ); } //break; @@ -156,7 +156,7 @@ namespace fValue = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - rNullDate ) + ( aStamp.Hours * 3600 + aStamp.Minutes * 60 + aStamp.Seconds + aStamp.HundredthSeconds / 100.0 ) / D_TIMEFACTOR; - return new ScDPItemData( rStr,fValue, TRUE, nNumType ); + return new ScDPItemData( rStr,fValue, sal_True, nNumType ); } //break; case sdbc::DataType::CHAR: @@ -183,13 +183,13 @@ namespace } // Wang Xu Ming -- 12/23/2008 //Refactor cache data -ScDPItemData::ScDPItemData( const String& rS, double fV/* = 0.0*/, BOOL bHV/* = FALSE*/, const ULONG nNumFormatP /*= 0*/ , BOOL bData/* = TRUE*/) : +ScDPItemData::ScDPItemData( const String& rS, double fV/* = 0.0*/, sal_Bool bHV/* = sal_False*/, const sal_uLong nNumFormatP /*= 0*/ , sal_Bool bData/* = sal_True*/) : nNumFormat( nNumFormatP ), aString(rS), fValue(fV), -mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!FALSE) | (MK_DATE*!!lcl_isDate( nNumFormat ) ) ) +mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!sal_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; @@ -203,13 +203,13 @@ ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nD if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() ) { SetString ( aDocStr ); //[SODC_19347] add liyi - //bErr = TRUE; //[SODC_19347] del liyi + //bErr = sal_True; //[SODC_19347] del liyi mbFlag |= MK_ERR; } 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; @@ -223,7 +223,7 @@ ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nD } // End Comments -BOOL ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const +sal_Bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const { //TODO: indified Date? //! pass Transliteration? //! inline? @@ -242,27 +242,27 @@ size_t ScDPItemData::Hash() const return rtl_ustr_hashCode_WithLength( aString.GetBuffer(), aString.Len() ); } -BOOL ScDPItemData::operator==( const ScDPItemData& r ) const +sal_Bool ScDPItemData::operator==( const ScDPItemData& r ) const { if ( IsValue() ) { if( (HasDatePart() != r.HasDatePart()) || (HasDatePart() && mnDatePart != r.mnDatePart) ) - return FALSE; + return sal_False; // Wang Xu Ming -- 1/9/2009 // Add Data Cache Support. // Identify date if ( IsDate() != r.IsDate() ) - return FALSE; + return sal_False; else if ( r.IsValue() ) return rtl::math::approxEqual( fValue, r.fValue ); else - return FALSE; + return sal_False; // End Comments } else if ( r.IsValue() ) - return FALSE; + return sal_False; else // need exact equality until we have a safe case insensitive string hash return aString == r.aString; @@ -334,17 +334,17 @@ sal_uInt8 ScDPItemData::GetType() const } -BOOL ScDPItemData::IsHasData() const +sal_Bool ScDPItemData::IsHasData() const { return !!(mbFlag&MK_DATA); } -BOOL ScDPItemData::IsHasErr() const +sal_Bool ScDPItemData::IsHasErr() const { return !!(mbFlag&MK_ERR); } -BOOL ScDPItemData::IsValue() const +sal_Bool ScDPItemData::IsValue() const { return !!(mbFlag&MK_VAL); } @@ -359,25 +359,25 @@ double ScDPItemData::GetValue() const { return fValue; } -ULONG ScDPItemData::GetNumFormat() const +sal_uLong ScDPItemData::GetNumFormat() const { return nNumFormat; } -BOOL ScDPItemData::HasStringData() const +sal_Bool ScDPItemData::HasStringData() const { return IsHasData()&&!IsHasErr()&&!IsValue(); } -BOOL ScDPItemData::IsDate() const +sal_Bool ScDPItemData::IsDate() const { return !!(mbFlag&MK_DATE); } -BOOL ScDPItemData::HasDatePart() const +sal_Bool ScDPItemData::HasDatePart() const { return !!(mbFlag&MK_DATEPART); } -void ScDPItemData::SetDate( BOOL b ) +void ScDPItemData::SetDate( sal_Bool b ) { b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE ); } @@ -386,17 +386,17 @@ void ScDPItemData::SetDate( BOOL b ) //class ScDPTableDataCache //To cache the pivot table data source -BOOL ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const +sal_Bool ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const { if ( GetColumnCount() == r.GetColumnCount() ) { for ( SCCOL i = 0 ; i < GetColumnCount(); i++ ) { //check dim names if ( GetDimensionName( i ) != r.GetDimensionName( i ) ) - return FALSE; + return sal_False; //check rows count if ( GetRowCount() != r.GetRowCount() ) - return FALSE; + return sal_False; //check dim member values size_t nMembersCount = GetDimMemberValues( i ).size(); if ( GetDimMemberValues( i ).size() == r. GetDimMemberValues( i ).size() ) @@ -406,22 +406,22 @@ BOOL ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const if ( *( GetDimMemberValues( i )[j] ) == *( r.GetDimMemberValues( i )[j] ) ) continue; else - return FALSE; + return sal_False; } } else - return FALSE; + return sal_False; //check source table index for ( SCROW k=0 ; k < GetRowCount(); k ++ ) { - if ( GetItemDataId( i, k, FALSE ) == r.GetItemDataId( i,k,FALSE) ) + if ( GetItemDataId( i, k, sal_False ) == r.GetItemDataId( i,k,sal_False) ) continue; else - return FALSE; + return sal_False; } } } - return TRUE; + return sal_True; } ScDPTableDataCache::ScDPTableDataCache( ScDocument* pDoc ) : @@ -441,10 +441,10 @@ ScDPTableDataCache::~ScDPTableDataCache() { // Wang Xu Ming -- 2/17/2009 // Performance issue - USHORT nCol; + sal_uInt16 nCol; for ( nCol=0; nCol < GetColumnCount() ; nCol++ ) { - for ( ULONG row = 0 ; row < mpTableDataValues[nCol].size(); row++ ) + for ( sal_uLong row = 0 ; row < mpTableDataValues[nCol].size(); row++ ) delete mpTableDataValues[nCol][row]; } for ( nCol =0; nCol < mrLabelNames.size(); nCol++ ) @@ -464,7 +464,7 @@ ScDPTableDataCache::~ScDPTableDataCache() } // ----------------------------------------------------------------------- -void ScDPTableDataCache::AddRow( ScDPItemData* pRow, USHORT nCount ) +void ScDPTableDataCache::AddRow( ScDPItemData* pRow, sal_uInt16 nCount ) { DBG_ASSERT( pRow , " empty pointer" ); if ( !mrLabelNames.size() ) @@ -475,12 +475,12 @@ void ScDPTableDataCache::AddRow( ScDPItemData* pRow, USHORT nCount ) mpGlobalOrder = new std::vector[ mnColumnCount ]; mpIndexOrder = new std::vector[ mnColumnCount ]; - for ( USHORT i = 0; i < nCount ; i ++ ) + for ( sal_uInt16 i = 0; i < nCount ; i ++ ) AddLabel( new ScDPItemData( pRow[i] ) ); } else { - for ( USHORT i = 0; i < nCount && i < mnColumnCount; i ++ ) + for ( sal_uInt16 i = 0; i < nCount && i < mnColumnCount; i ++ ) AddData( i, new ScDPItemData( pRow[i] ) ); } } @@ -529,18 +529,18 @@ bool ScDPTableDataCache::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(); //init long nOldColumCount = mnColumnCount; mnColumnCount = nEndCol - nStartCol + 1; if ( IsValid() ) { - for ( USHORT nCol=0; nCol < nOldColumCount ; nCol++ ) + for ( sal_uInt16 nCol=0; nCol < nOldColumCount ; nCol++ ) { - for ( ULONG row = 0 ; row < mpTableDataValues[nCol].size(); row++ ) + for ( sal_uLong row = 0 ; row < mpTableDataValues[nCol].size(); row++ ) delete mpTableDataValues[nCol][row]; delete mrLabelNames[nCol]; } @@ -558,7 +558,7 @@ bool ScDPTableDataCache::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 ) ); @@ -566,7 +566,7 @@ bool ScDPTableDataCache::InitFromDoc( ScDocument* pDoc, const ScRange& rRange ) AddData( nCol - nStartCol, new ScDPItemData( pDoc, nRow, nCol, nDocTab ) ); } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -586,9 +586,9 @@ bool ScDPTableDataCache::InitFromDataBase (const Reference& xRowS mnColumnCount = xMeta->getColumnCount(); if ( IsValid() ) { - for ( USHORT nCol=0; nCol < nOldColumCount ; nCol++ ) + for ( sal_uInt16 nCol=0; nCol < nOldColumCount ; nCol++ ) { - for ( ULONG row = 0 ; row < mpTableDataValues[nCol].size(); row++ ) + for ( sal_uLong row = 0 ; row < mpTableDataValues[nCol].size(); row++ ) delete mpTableDataValues[nCol][row]; delete mrLabelNames[nCol]; } @@ -638,7 +638,7 @@ bool ScDPTableDataCache::InitFromDataBase (const Reference& xRowS } } // ----------------------------------------------------------------------- -ULONG ScDPTableDataCache::GetDimNumType( SCCOL nDim) const +sal_uLong ScDPTableDataCache::GetDimNumType( SCCOL nDim) const { DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( nDim < mnColumnCount && nDim >=0, " dimention out of bound " ); @@ -649,20 +649,20 @@ ULONG ScDPTableDataCache::GetDimNumType( SCCOL nDim) const } // ----------------------------------------------------------------------- -bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOOL *pSpecial) +bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, sal_Bool *pSpecial) { //Copied and modified from ScTable::ValidQuery if (!rParam.GetEntry(0).bDoQuery) - return TRUE; - BOOL bMatchWholeCell = mpDoc->GetDocOptions().IsMatchWholeCell(); + return sal_True; + sal_Bool bMatchWholeCell = mpDoc->GetDocOptions().IsMatchWholeCell(); //--------------------------------------------------------------- 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; @@ -682,11 +682,11 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO if ( nQueryCol > rParam.nCol2 ) nQueryCol = rParam.nCol2; SCCOL nSourceField = nQueryCol - rParam.nCol1; - SCROW nId = GetItemDataId( nSourceField, nRow, FALSE ); + SCROW nId = GetItemDataId( nSourceField, nRow, sal_False ); const ScDPItemData* pCellData = GetItemDataById( nSourceField, nId ); - BOOL bOk = FALSE; - BOOL bTestEqual = FALSE; + sal_Bool bOk = sal_False; + sal_Bool bTestEqual = sal_False; if ( pSpecial && pSpecial[i] ) { @@ -720,7 +720,7 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO bOk = !::rtl::math::approxEqual( nCellVal, rEntry.nVal ); break; default: - bOk= FALSE; + bOk= sal_False; break; } } @@ -731,19 +731,19 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO { // by String String aCellStr = pCellData->GetString(); - BOOL bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL) + sal_Bool bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL) || (rEntry.eOp == SC_NOT_EQUAL))); - BOOL bTestRegExp = FALSE; + sal_Bool bTestRegExp = sal_False; if ( bRealRegExp || bTestRegExp ) { xub_StrLen nStart = 0; xub_StrLen nEnd = aCellStr.Len(); - BOOL bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens ) + sal_Bool bMatch = (sal_Bool) rEntry.GetSearchTextPtr( rParam.bCaseSens ) ->SearchFrwrd( aCellStr, &nStart, &nEnd ); // from 614 on, nEnd is behind the found text if ( bMatch && bMatchWholeCell && (nStart != 0 || nEnd != aCellStr.Len()) ) - bMatch = FALSE; // RegExp must match entire cell string + bMatch = sal_False; // RegExp must match entire cell string if ( bRealRegExp ) bOk = ((rEntry.eOp == SC_NOT_EQUAL) ? !bMatch : bMatch); else @@ -768,7 +768,7 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO { for(i=0;(iIsHasData(); + return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, sal_False ) )->IsHasData(); } -BOOL ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData) +sal_Bool ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData) { DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( nDim < mnColumnCount && nDim >=0 , "dimension out of bound" ); SCROW nIndex = 0; - BOOL bInserted = FALSE; + sal_Bool bInserted = sal_False; pitemData->SetDate( lcl_isDate( GetNumType( pitemData->nNumFormat ) ) ); @@ -895,7 +895,7 @@ BOOL ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData) mpGlobalOrder[nDim].insert( mpGlobalOrder[nDim].begin()+nIndex, mpTableDataValues[nDim].size()-1 ); DBG_ASSERT( (size_t) mpGlobalOrder[nDim][nIndex] == mpTableDataValues[nDim].size()-1 ,"ScDPTableDataCache::AddData "); mpSourceData[nDim].push_back( mpTableDataValues[nDim].size()-1 ); - bInserted = TRUE; + bInserted = sal_True; } else mpSourceData[nDim].push_back( mpGlobalOrder[nDim][nIndex] ); @@ -903,22 +903,22 @@ BOOL ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData) size_t nCurRow = mpSourceData[nDim].size() -1 ; while ( mbEmptyRow.size() <= nCurRow ) - mbEmptyRow.push_back( TRUE ); + mbEmptyRow.push_back( sal_True ); if ( pitemData->IsHasData() ) - mbEmptyRow[ nCurRow ] = FALSE; + mbEmptyRow[ nCurRow ] = sal_False; if ( !bInserted ) delete pitemData; - return TRUE; + return sal_True; } -String ScDPTableDataCache::GetDimensionName( USHORT nColumn ) const +String ScDPTableDataCache::GetDimensionName( sal_uInt16 nColumn ) const { DBG_ASSERT( /* nColumn>=0 && */ nColumn < mrLabelNames.size()-1 , "ScDPTableDataCache::GetDimensionName"); - DBG_ASSERT( mrLabelNames.size() == static_cast (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName"); + DBG_ASSERT( mrLabelNames.size() == static_cast (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName"); if ( static_cast(nColumn+1) < mrLabelNames.size() ) { return mrLabelNames[nColumn+1]->aString; @@ -937,7 +937,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData) //reset name if needed String strNewName = pData->aString; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; long nIndex = 1; do { @@ -948,7 +948,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData) strNewName = pData->aString; strNewName += String::CreateFromInt32( nIndex ); nIndex ++ ; - bFound = TRUE; + bFound = sal_True; } } bFound = !bFound; @@ -959,7 +959,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData) mrLabelNames.push_back( pData ); } -SCROW ScDPTableDataCache::GetItemDataId(USHORT nDim, SCROW nRow, BOOL bRepeatIfEmpty) const +SCROW ScDPTableDataCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, sal_Bool bRepeatIfEmpty) const { // DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( /* nDim >= 0 && */ nDim < mnColumnCount, "ScDPTableDataCache::GetItemDataId " ); @@ -1007,16 +1007,16 @@ SCROW ScDPTableDataCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const return mpGlobalOrder[nDim][nOrder]; } -ULONG ScDPTableDataCache::GetNumType(ULONG nFormat) const +sal_uLong ScDPTableDataCache::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 ScDPTableDataCache::GetNumberFormat( long nDim ) const +sal_uLong ScDPTableDataCache::GetNumberFormat( long nDim ) const { if ( nDim >= mnColumnCount ) return 0; @@ -1026,7 +1026,7 @@ ULONG ScDPTableDataCache::GetNumberFormat( long nDim ) const return mpTableDataValues[nDim][0]->nNumFormat; } -BOOL ScDPTableDataCache::IsDateDimension( long nDim ) const +sal_Bool ScDPTableDataCache::IsDateDimension( long nDim ) const { if ( nDim >= mnColumnCount ) return false; diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx old mode 100755 new mode 100644 index c79f7c1b17a6..e7cb9dd2b679 --- 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 & list, SCROW nOrder, SCROW& rIndex) + sal_Bool lcl_SearchMember( const std::vector & list, SCROW nOrder, SCROW& rIndex) { rIndex = list.size(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_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 sal_False; // equal else - return FALSE; // errors are always sorted at the end + return sal_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 sal_False; } else if ( bError2 ) - return FALSE; + return sal_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); @@ -240,17 +240,17 @@ BOOL ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) con const ScDPDataMember* pDataMember2 = pMember2->GetDataRoot(); // End Comments // 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); // Wang Xu Ming -- 2009-6-17 - 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; // End Comments @@ -510,7 +510,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub // check the error conditions for the selected function - BOOL bError = FALSE; + sal_Bool bError = sal_False; switch (eFunc) { case SUBTOTAL_FUNC_SUM: @@ -585,7 +585,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. @@ -608,7 +608,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 ); } @@ -620,14 +620,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" ); @@ -648,7 +648,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" ); @@ -693,7 +693,7 @@ void ScDPAggData::Reset() // ----------------------------------------------------------------------- ScDPRowTotals::ScDPRowTotals() : - bIsInColRoot( FALSE ) + bIsInColRoot( sal_False ) { } @@ -772,9 +772,9 @@ ScDPResultData::ScDPResultData( ScDPSource* pSrc ) : //! Ref pMeasRefs( NULL ), pMeasRefOrient( NULL ), pMeasNames( NULL ), - bLateInit( FALSE ), - bDataAtCol( FALSE ), - bDataAtRow( FALSE ) + bLateInit( sal_False ), + bDataAtCol( sal_False ), + bDataAtRow( sal_False ) { lcl_ResizePointVector( mpDimMembers , SC_DAPI_MAXFIELDS ); @@ -791,7 +791,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; @@ -803,7 +803,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; iGetDataDimName( nMeasure ); } -BOOL ScDPResultData::IsBaseForGroup( long nDim ) const +sal_Bool ScDPResultData::IsBaseForGroup( long nDim ) const { return pSource->GetData()->IsBaseForGroup( nDim ); } @@ -929,38 +929,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 sal_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 sal_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 sal_False; } const ScDPSource* ScDPResultData::GetSource() const @@ -1002,31 +1002,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( sal_False ), bForceSubTotal( bForceSub ), - bHasHiddenDetails( FALSE ), - bInitialized( FALSE ), - bAutoHidden( FALSE ), + bHasHiddenDetails( sal_False ), + bInitialized( sal_False ), + bAutoHidden( sal_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( sal_False ), bForceSubTotal( bForceSub ), - bHasHiddenDetails( FALSE ), - bInitialized( FALSE ), - bAutoHidden( FALSE ), + bHasHiddenDetails( sal_False ), + bInitialized( sal_False ), + bAutoHidden( sal_False ), nMemberStep( 1 ) { } @@ -1054,13 +1054,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 sal_False; } bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const @@ -1084,13 +1084,13 @@ bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const void ScDPResultMember::InitFrom( const vector& ppDim, const vector& 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; @@ -1107,7 +1107,7 @@ void ScDPResultMember::InitFrom( const vector& ppDim, const vect { if ( !pChildDimension ) pChildDimension = new ScDPResultDimension( pResultData ); - pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState , FALSE ); + pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState , sal_False ); return; } else @@ -1117,14 +1117,14 @@ void ScDPResultMember::InitFrom( const vector& ppDim, const vect } } // End Comments - bHasHiddenDetails = TRUE; // only if there is a next dimension + bHasHiddenDetails = sal_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 ); } } @@ -1136,7 +1136,7 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vectorIsLateInit() ) return; - bInitialized = TRUE; + bInitialized = sal_True; if ( rParams.IsEnd( nPos ) /*nPos >= ppDim.size()*/) // No next dimension. Bail out. @@ -1158,8 +1158,8 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vectorLateInitFrom( rParams, pItemData, nPos, rInitState ); rParams.SetInitChild( bWasInitChild ); return; @@ -1171,7 +1171,7 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vectorIsOutlineLayout() && /*pParentLevel*/GetParentLevel()->IsSubtotalsAtTop() ) { @@ -1200,7 +1200,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; @@ -1243,7 +1243,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) @@ -1251,22 +1251,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 sal_False; if ( bAutoHidden ) - return FALSE; + return sal_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 @@ -1371,7 +1371,7 @@ static String lcl_parseSubtotalName(const String& rSubStr, const String& rCaptio } void ScDPResultMember::FillMemberResults( uno::Sequence* pSequences, - long& rPos, long nMeasure, BOOL bRoot, + long& rPos, long nMeasure, sal_Bool bRoot, const String* pMemberName, const String* pMemberCaption ) { @@ -1382,7 +1382,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence* pS sheet::MemberResult* pArray = pSequences->getArray(); DBG_ASSERT( rPos+nSize <= pSequences->getLength(), "bumm" ); - BOOL bIsNumeric = FALSE; + sal_Bool bIsNumeric = sal_False; String aName; if ( pMemberName ) // if pMemberName != NULL, use instead of real member name aName = *pMemberName; @@ -1398,7 +1398,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence* pS { // Numeric group dimensions use numeric entries for proper sorting, // but the group titles must be output as text. - bIsNumeric = FALSE; + bIsNumeric = sal_False; } String aCaption = aName; @@ -1439,15 +1439,15 @@ void ScDPResultMember::FillMemberResults( uno::Sequence* pS if ( pParentLevel && pParentLevel->IsAddEmpty() ) ++nExtraSpace; - BOOL bTitleLine = FALSE; + sal_Bool bTitleLine = sal_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 @@ -1489,7 +1489,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence* pS bool bTotalResult = false; String aSubStr = aCaption; aSubStr += ' '; - aSubStr += pResultData->GetMeasureString(nMemberMeasure, FALSE, eForce, bTotalResult); + aSubStr += pResultData->GetMeasureString(nMemberMeasure, sal_False, eForce, bTotalResult); if (bTotalResult) { @@ -1560,13 +1560,13 @@ void ScDPResultMember::FillDataResults( const ScDPResultMember* pRefMember, if ( pParentLevel && pParentLevel->IsAddEmpty() ) ++nExtraSpace; - BOOL bTitleLine = FALSE; + sal_Bool bTitleLine = sal_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 @@ -1650,7 +1650,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 @@ -1697,7 +1697,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 @@ -1712,7 +1712,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 @@ -1725,7 +1725,7 @@ void ScDPResultMember::DoAutoShow( ScDPResultMember* pRefMember ) } } -void ScDPResultMember::ResetResults( BOOL /*bRoot*/ ) +void ScDPResultMember::ResetResults( sal_Bool /*bRoot*/ ) { if (pDataRoot) pDataRoot->ResetResults(); @@ -1734,7 +1734,7 @@ void ScDPResultMember::ResetResults( BOOL /*bRoot*/ ) pChildDimension->ResetResults(); // if (!bRoot) - // bHasElements = FALSE; + // bHasElements = sal_False; } void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, long nMeasure, @@ -1745,7 +1745,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 ) @@ -1838,28 +1838,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 sal_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 sal_False; } -BOOL ScDPDataMember::HasHiddenDetails() const +sal_Bool ScDPDataMember::HasHiddenDetails() const { if (pResultMember) return pResultMember->HasHiddenDetails(); else - return FALSE; + return sal_False; } void ScDPDataMember::InitFrom( const ScDPResultDimension* pDim ) @@ -1949,26 +1949,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 sal_False; // #74542# HasData can be different between measures! const ScDPAggData* pAgg = GetConstAggData( nMeasure, rSubState ); if (!pAgg) - return FALSE; //! error? + return sal_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(); } @@ -2024,7 +2024,7 @@ const ScDPAggData* ScDPDataMember::GetConstAggData( long nMeasure, const ScDPSub void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember, uno::Sequence& rSequence, - long& rCol, long nMeasure, BOOL bIsSubTotalRow, + long& rCol, long nMeasure, sal_Bool bIsSubTotalRow, const ScDPSubTotalState& rSubState ) const { DBG_ASSERT( pRefMember == pResultMember || !pResultMember, "bla" ); @@ -2042,15 +2042,15 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember, if ( pRefParentLevel && pRefParentLevel->IsAddEmpty() ) ++nExtraSpace; - BOOL bTitleLine = FALSE; + sal_Bool bTitleLine = sal_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 ) { @@ -2059,7 +2059,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 @@ -2142,7 +2142,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" ); @@ -2153,7 +2153,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(); @@ -2250,7 +2250,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 ) { @@ -2261,11 +2261,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(); //if ( nUserSubCount || !bHasChild ) @@ -2307,8 +2307,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; @@ -2321,9 +2321,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; @@ -2367,7 +2367,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, pSelectDim = NULL; } - BOOL bNoDetailsInRef = FALSE; + sal_Bool bNoDetailsInRef = sal_False; if ( pSelectDim && bRunningTotal ) { // Running totals: @@ -2382,7 +2382,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 } } } @@ -2401,17 +2401,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 @@ -2449,7 +2449,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, fTotal += pAggData->GetResult(); pSelectData->SetAuxiliary( fTotal ); pAggData->SetResult( fTotal ); - pAggData->SetEmpty(FALSE); // always display + pAggData->SetEmpty(sal_False); // always display } } else @@ -2458,7 +2458,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 { @@ -2495,7 +2495,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 ) { @@ -2509,7 +2509,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, double fOtherResult = pOtherAggData->GetAuxiliary(); double fThisResult = pAggData->GetResult(); - BOOL bError = FALSE; + sal_Bool bError = sal_False; switch ( eRefType ) { case sheet::DataPilotFieldReferenceType::ITEM_DIFFERENCE: @@ -2517,13 +2517,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; @@ -2537,20 +2537,20 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, else { pAggData->SetResult(fThisResult); - pAggData->SetEmpty(FALSE); // always display + pAggData->SetEmpty(sal_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 || @@ -2654,8 +2654,8 @@ private: const ScDPResultData* pResultData; const ScDPInitState& rInitState; long nDimSource; - BOOL bIncludeAll; - BOOL bIsBase; + sal_Bool bIncludeAll; + sal_Bool bIsBase; long nGroupBase; // Wang Xu Ming -- 2009-8-6 // DataPilot Migration - Cache&&Performance @@ -2665,8 +2665,8 @@ 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 ) : @@ -2684,9 +2684,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; @@ -2738,13 +2738,13 @@ BOOL ScDPGroupCompare::TestIncluded( const ScDPMember& rMember ) ScDPResultDimension::ScDPResultDimension( const ScDPResultData* pData ) : pResultData( pData ), - bInitialized( FALSE ), - bIsDataLayout( FALSE ), - bSortByData( FALSE ), - bSortAscending( FALSE ), + bInitialized( sal_False ), + bIsDataLayout( sal_False ), + bSortByData( sal_False ), + bSortAscending( sal_False ), nSortMeasure( 0 ), - bAutoShow( FALSE ), - bAutoTopItems( FALSE ), + bAutoShow( sal_False ), + bAutoTopItems( sal_False ), nAutoMeasure( 0 ), nAutoCount( 0 ) { @@ -2781,7 +2781,7 @@ ScDPResultMember *ScDPResultDimension::FindMember( SCROW iData ) const } void ScDPResultDimension::InitFrom( const vector& ppDim, const vector& 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()) { @@ -2805,7 +2805,7 @@ void ScDPResultDimension::InitFrom( const vector& 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; @@ -2815,7 +2815,7 @@ void ScDPResultDimension::InitFrom( const vector& 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(); } @@ -2844,7 +2844,7 @@ void ScDPResultDimension::InitFrom( const vector& ppDim, const v rInitState.RemoveMember(); } } - bInitialized = TRUE; + bInitialized = sal_True; } void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector& ppDim, const vector& ppLev*/, @@ -2866,7 +2866,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vectorGetDimension(); //! check GetSourceDim? - BOOL bShowEmpty = pThisLevel->getShowEmpty(); + sal_Bool bShowEmpty = pThisLevel->getShowEmpty(); if ( !bInitialized ) { // init some values @@ -2877,7 +2877,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vectorGetAutoShow(); if ( rAutoInfo.IsEnabled ) { - bAutoShow = TRUE; + bAutoShow = sal_True; bAutoTopItems = ( rAutoInfo.ShowItemsMode == sheet::DataPilotFieldShowItemsMode::FROM_TOP ); nAutoMeasure = pThisLevel->GetAutoMeasure(); nAutoCount = rAutoInfo.ItemCount; @@ -2886,7 +2886,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vectorGetSortInfo(); if ( rSortInfo.Mode == sheet::DataPilotFieldSortMode::DATA ) { - bSortByData = TRUE; + bSortByData = sal_True; bSortAscending = rSortInfo.IsAscending; nSortMeasure = pThisLevel->GetSortMeasure(); } @@ -2903,7 +2903,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vectorIsHasHideDetailsMembers() ) DBG_TRACE ( "HasHideDetailsMembers" ); #endif - pMembers->SetHasHideDetailsMembers( FALSE ); + pMembers->SetHasHideDetailsMembers( sal_False ); } bool bNewAllMembers =(!rParams.IsRow()) || nPos == 0 || bLateInitAllMembers ; @@ -2929,7 +2929,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vectorIsNamedItem( rThisData ) ) - bAllChildren = FALSE; + bAllChildren = sal_False; else - bAllChildren = TRUE; + bAllChildren = sal_True; } rParams.SetInitAllChildren( bAllChildren ); rInitState.AddMember( nDimSource, pResultMember->GetDataId() ); @@ -3049,11 +3049,11 @@ void ScDPResultDimension::FillMemberResults( uno::Sequence* { 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, sal_False, SUBTOTAL_FUNC_NONE, bTotalResult ); + maMemberArray[0]->FillMemberResults( pSequences, nPos, nSorted, sal_False, &aMbrName, &aMbrCapt ); } else if ( pMember->IsVisible() ) - pMember->FillMemberResults( pSequences, nPos, nMeasure, FALSE, NULL, NULL ); + pMember->FillMemberResults( pSequences, nPos, nMeasure, sal_False, NULL, NULL ); // nPos is modified } } @@ -3170,10 +3170,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 = sal_False; if ( nIncluded < nCount ) { const ScDPResultMember* pMember2 = maMemberArray[aAutoOrder[nIncluded]]; @@ -3182,7 +3182,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; } } } @@ -3204,7 +3204,7 @@ void ScDPResultDimension::ResetResults() { // sort order doesn't matter ScDPResultMember* pMember = maMemberArray[bIsDataLayout ? 0 : i]; - pMember->ResetResults( FALSE ); + pMember->ResetResults( sal_False ); } } @@ -3254,7 +3254,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 @@ -3282,7 +3282,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)]; @@ -3389,7 +3389,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 @@ -3415,7 +3415,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 ) ); @@ -3519,7 +3519,7 @@ void ScDPResultDimension::FillVisibilityData(ScDPResultVisibilityData& rData) co ScDPDataDimension::ScDPDataDimension( const ScDPResultData* pData ) : pResultData( pData ), pResultDimension( NULL ), - bIsDataLayout( FALSE ) + bIsDataLayout( sal_False ) { } @@ -3565,7 +3565,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const long nCount = aMembers.Count(); for (long i=0; iIsNamedItem(aDataMembers[0]) ) ) @@ -3586,7 +3586,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim, uno::Sequence& 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" ); @@ -3613,7 +3613,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 } @@ -3621,7 +3621,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" ); @@ -3642,7 +3642,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 ); } } @@ -3677,7 +3677,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 ); } } @@ -3699,7 +3699,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 ); } } @@ -3720,23 +3720,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 = sal_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; } } } @@ -3759,7 +3759,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(); } } @@ -3774,7 +3774,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 { @@ -3805,7 +3805,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 ); @@ -3825,7 +3825,7 @@ void ScDPDataDimension::DumpState( const ScDPResultDimension* pRefDim, ScDocumen for (long i=0; iGetMember(i); - const ScDPDataMember* pDataMember = aMembers[(USHORT)i]; + const ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i]; pDataMember->DumpState( pRefMember, pDoc, rPos ); } @@ -3839,7 +3839,7 @@ long ScDPDataDimension::GetMemberCount() const ScDPDataMember* ScDPDataDimension::GetMember(long n) const { - return aMembers[(USHORT)n]; + return aMembers[(sal_uInt16)n]; } // ---------------------------------------------------------------------------- @@ -3939,7 +3939,7 @@ SCROW ScDPResultMember::GetDataId( ) const ScDPResultMember* ScDPResultDimension::AddMember(const ScDPParentDimData &aData ) { - ScDPResultMember* pMember = new ScDPResultMember( pResultData, aData, FALSE ); + ScDPResultMember* pMember = new ScDPResultMember( pResultData, aData, sal_False ); SCROW nDataIndex = pMember->GetDataId(); maMemberArray.push_back( pMember ); @@ -3974,7 +3974,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, sal_False ); maMemberArray.insert( maMemberArray.begin()+nInsert, pNew ); SCROW nDataIndex = pMemberData->mpMemberDesc->GetItemDataId(); @@ -4008,7 +4008,7 @@ void ScDPResultDimension:: InitWithMembers( LateInitParams& rParams, if ( bInitialized ) pResultMember = FindMember( nDataID ); else - bInitialized = TRUE; + bInitialized = sal_True; if ( pResultMember == NULL ) { //only insert found item @@ -4039,12 +4039,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( sal_False ) { } ResultMembers::~ResultMembers() @@ -4053,7 +4053,7 @@ ResultMembers::~ResultMembers() delete iter->second; } // ----------------------------------------------------------------------- -LateInitParams::LateInitParams( const vector& ppDim, const vector& ppLev, BOOL bRow, BOOL bInitChild, BOOL bAllChildren ): +LateInitParams::LateInitParams( const vector& ppDim, const vector& ppLev, sal_Bool bRow, sal_Bool bInitChild, sal_Bool bAllChildren ): mppDim( ppDim ), mppLev( ppLev ), mbRow( bRow ), @@ -4066,7 +4066,7 @@ LateInitParams::~LateInitParams() { } -BOOL LateInitParams::IsEnd( size_t nPos ) const +sal_Bool LateInitParams::IsEnd( size_t nPos ) const { return nPos >= mppDim.size(); } @@ -4074,7 +4074,7 @@ BOOL LateInitParams::IsEnd( size_t nPos ) const // End Comments // Wang Xu Ming -- 2009-8-4 // DataPilot Migration - old defects merge -void ScDPResultDimension::CheckShowEmpty( BOOL bShow ) +void ScDPResultDimension::CheckShowEmpty( sal_Bool bShow ) { long nCount = maMemberArray.size(); @@ -4087,7 +4087,7 @@ void ScDPResultDimension::CheckShowEmpty( BOOL bShow ) } -void ScDPResultMember::CheckShowEmpty( BOOL bShow ) +void ScDPResultMember::CheckShowEmpty( sal_Bool bShow ) { if ( bHasElements ) { @@ -4103,7 +4103,7 @@ void ScDPResultMember::CheckShowEmpty( BOOL bShow ) SetHasElements(); ScDPResultDimension* pChildDim = GetChildDimension(); if (pChildDim ) - pChildDim->CheckShowEmpty( TRUE ); + pChildDim->CheckShowEmpty( sal_True ); } } }// End Comments diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index b4ca5dbc7330..81c85a6acb54 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -108,14 +108,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 sal_False; } -void lcl_SetBoolInAny( uno::Any& rAny, BOOL bValue ) +void lcl_SetBoolInAny( uno::Any& rAny, sal_Bool bValue ) { rAny.setValue( &bValue, getBooleanCppuType() ); } @@ -129,17 +129,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( sal_False ), + bRepeatIfEmpty( sal_False ), nDupCount( 0 ), pResData( NULL ), pColResRoot( NULL ), pRowResRoot( NULL ), pColResults( NULL ), pRowResults( NULL ), - bResultOverflow( FALSE ), + bResultOverflow( sal_False ), mpGrandTotalName(NULL) { pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty ); @@ -170,7 +170,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; iIsDataLayoutDimension(nColumn) ) - rAllowed = FALSE; + rAllowed = sal_False; else { // no subtotals if no other dim but data layout follows @@ -244,18 +244,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 = sal_False; } - return TRUE; // found + return sal_True; // found } - return FALSE; + return sal_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 ) ) @@ -275,7 +275,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? @@ -311,22 +311,22 @@ 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); } -UINT32 ScDPSource::GetNumberFormat(long nDim) +sal_uInt32 ScDPSource::GetNumberFormat(long nDim) { return pData->GetNumberFormat( nDim ); } @@ -506,7 +506,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 @@ -514,43 +514,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 ); @@ -589,7 +589,7 @@ void ScDPSource::disposeData() nColDimCount = nRowDimCount = nDataDimCount = nPageDimCount = 0; pData->DisposeData(); // cached entries etc. - bResultOverflow = FALSE; + bResultOverflow = sal_False; } long lcl_CountMinMembers(const vector& ppDim, const vector& ppLevel, long nLevels ) @@ -599,7 +599,7 @@ long lcl_CountMinMembers(const vector& ppDim, const vector 0 ) { @@ -611,7 +611,7 @@ long lcl_CountMinMembers(const vector& ppDim, const vectorgetIsDataLayoutDimension() ) { // data layout dim doesn't interfere with "show all" flags @@ -621,11 +621,11 @@ long lcl_CountMinMembers(const vector& ppDim, const vectorgetShowEmpty() ) { // this level is counted, following ones are not - bWasShowAll = FALSE; + bWasShowAll = sal_False; } } if ( bDo ) @@ -692,7 +692,7 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool pLevel->SetEnableLayout( bIsRow ); if ( pLevel->GetAutoShow().IsEnabled ) - rHasAutoShow = TRUE; + rHasAutoShow = sal_True; if (bIsRow) { @@ -794,7 +794,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 ) ) { @@ -809,7 +809,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]; @@ -821,7 +821,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. @@ -859,7 +859,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 = sal_False; } } @@ -920,7 +920,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( sal_False ); } pRowResRoot->InitFrom( aInfo.aRowDims, aInfo.aRowLevels, 0, aInitState ); @@ -951,7 +951,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 { @@ -982,8 +982,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. @@ -1021,7 +1021,7 @@ void ScDPSource::CreateRes_Impl() //UNUSED2009-05 pRowResRoot->DumpState( pColResRoot, pDoc, aDocPos ); //UNUSED2009-05 } -void ScDPSource::FillLevelList( USHORT nOrientation, List& rList ) +void ScDPSource::FillLevelList( sal_uInt16 nOrientation, List& rList ) { rList.Clear(); @@ -1102,7 +1102,7 @@ void ScDPSource::FillMemberResults() // pColResDim->FillMemberResults( pColResults, 0, pResData->GetColStartMeasure() ); long nPos = 0; pColResRoot->FillMemberResults( pColResults, nPos, pResData->GetColStartMeasure(), - TRUE, NULL, NULL ); + sal_True, NULL, NULL ); } FillLevelList( sheet::DataPilotFieldOrientation_ROW, aRowLevelList ); @@ -1118,7 +1118,7 @@ void ScDPSource::FillMemberResults() // pRowResDim->FillMemberResults( pRowResults, 0, pResData->GetRowStartMeasure() ); long nPos = 0; pRowResRoot->FillMemberResults( pRowResults, nPos, pResData->GetRowStartMeasure(), - TRUE, NULL, NULL ); + sal_True, NULL, NULL ); } } } @@ -1319,8 +1319,8 @@ sal_Bool SAL_CALL ScDPDimensions::hasByName( const rtl::OUString& aName ) throw( long nCount = getCount(); for (long i=0; igetName() == aName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } uno::Type SAL_CALL ScDPDimensions::getElementType() throw(uno::RuntimeException) @@ -1375,7 +1375,7 @@ ScDPDimension::ScDPDimension( ScDPSource* pSrc, long nD ) : mpLayoutName(NULL), mpSubtotalName(NULL), nSourceDim( -1 ), - bHasSelectedPage( FALSE ), + bHasSelectedPage( sal_False ), pSelectedData( NULL ), mbHasHiddenMember(false) { @@ -1432,12 +1432,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 ); } @@ -1452,17 +1452,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; } @@ -1498,7 +1498,7 @@ uno::Reference SAL_CALL ScDPDimension::createClone() throw(uno return CreateCloneObject(); } -BOOL ScDPDimension::isDuplicated() const +sal_Bool ScDPDimension::isDuplicated() const { return (nSourceDim >= 0); } @@ -1539,21 +1539,21 @@ const ScDPItemData& ScDPDimension::GetSelectedData() } if ( !pSelectedData ) - pSelectedData = new ScDPItemData( aSelectedPage, 0.0, FALSE ); // default - name only + pSelectedData = new ScDPItemData( aSelectedPage, 0.0, sal_False ); // default - name only } return *pSelectedData; } -//UNUSED2009-05 BOOL ScDPDimension::IsValidPage( const ScDPItemData& rData ) +//UNUSED2009-05 sal_Bool ScDPDimension::IsValidPage( const ScDPItemData& rData ) //UNUSED2009-05 { //UNUSED2009-05 if ( bHasSelectedPage ) //UNUSED2009-05 return rData.IsCaseInsEqual( GetSelectedData() ); //UNUSED2009-05 -//UNUSED2009-05 return TRUE; // no selection -> all data +//UNUSED2009-05 return sal_True; // no selection -> all data //UNUSED2009-05 } -BOOL ScDPDimension::IsVisible( const ScDPItemData& rData ) +sal_Bool ScDPDimension::IsVisible( const ScDPItemData& rData ) { if( ScDPMembers* pMembers = this->GetHierarchiesObject()->getByIndex(0)-> GetLevelsObject()->getByIndex(0)->GetMembersObject() ) @@ -1561,10 +1561,10 @@ BOOL ScDPDimension::IsVisible( const ScDPItemData& rData ) for( long i = pMembers->getCount()-1; i>=0; i-- ) if( ScDPMember *pDPMbr = pMembers->getByIndex( i ) ) if( rData.IsCaseInsEqual( pDPMbr->GetItemData() ) && !pDPMbr->getIsVisible() ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } // XPropertySet @@ -1603,13 +1603,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 ); } @@ -1617,19 +1617,19 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam { sheet::DataPilotFieldOrientation eEnum; if (aValue >>= eEnum) - setOrientation( sal::static_int_cast(eEnum) ); + setOrientation( sal::static_int_cast(eEnum) ); } else if ( aNameStr.EqualsAscii( SC_UNO_FUNCTION ) ) { sheet::GeneralFunction eEnum; if (aValue >>= eEnum) - setFunction( sal::static_int_cast(eEnum) ); + setFunction( sal::static_int_cast(eEnum) ); } else if ( aNameStr.EqualsAscii( SC_UNO_REFVALUE ) ) aValue >>= aReferenceValue; else if ( aNameStr.EqualsAscii( SC_UNO_FILTER ) ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; uno::Sequence aSeq; if (aValue >>= aSeq) { @@ -1637,8 +1637,8 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam if ( nLength == 0 ) { aSelectedPage.Erase(); - bHasSelectedPage = FALSE; - bDone = TRUE; + bHasSelectedPage = sal_False; + bDone = sal_True; } else if ( nLength == 1 ) { @@ -1646,8 +1646,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; } } } @@ -1839,8 +1839,8 @@ sal_Bool SAL_CALL ScDPHierarchies::hasByName( const rtl::OUString& aName ) throw long nCount = getCount(); for (long i=0; igetName() == aName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } uno::Type SAL_CALL ScDPHierarchies::getElementType() throw(uno::RuntimeException) @@ -2023,8 +2023,8 @@ sal_Bool SAL_CALL ScDPLevels::hasByName( const rtl::OUString& aName ) throw(uno: long nCount = getCount(); for (long i=0; igetName() == aName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } uno::Type SAL_CALL ScDPLevels::getElementType() throw(uno::RuntimeException) @@ -2071,19 +2071,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 @@ -2105,11 +2105,11 @@ ScDPLevel::ScDPLevel( ScDPSource* pSrc, long nD, long nH, long nL ) : nHier( nH ), nLev( nL ), pMembers( NULL ), - bShowEmpty( FALSE ), + bShowEmpty( sal_False ), aSortInfo( EMPTY_STRING, sal_True, sheet::DataPilotFieldSortMode::NAME ), // default: sort by name nSortMeasure( 0 ), nAutoMeasure( 0 ), - bEnableLayout( FALSE ) + bEnableLayout( sal_False ) { //! hold pSource // aSubTotals is empty @@ -2157,7 +2157,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 ); } @@ -2183,7 +2183,7 @@ void ScDPLevel::EvaluateSortOrder() } } -void ScDPLevel::SetEnableLayout( BOOL bSet ) +void ScDPLevel::SetEnableLayout( sal_Bool bSet ) { bEnableLayout = bSet; } @@ -2291,12 +2291,12 @@ void ScDPLevel::setSubTotals(const uno::Sequence& 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; } @@ -2645,7 +2645,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 @@ -2668,7 +2668,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 ), @@ -2676,8 +2676,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 } @@ -2687,7 +2687,7 @@ ScDPMember::~ScDPMember() //! release pSource } -BOOL ScDPMember::IsNamedItem( const ScDPItemData& r ) const +sal_Bool ScDPMember::IsNamedItem( const ScDPItemData& r ) const { long nSrcDim = pSource->GetSourceDim( nDim ); if ( nHier != SC_DAPI_HIERARCHY_FLAT && pSource->IsDateDimension( nSrcDim ) && r.IsValue() ) @@ -2703,7 +2703,7 @@ BOOL ScDPMember::IsNamedItem( const ScDPItemData& r ) const return r.IsCaseInsEqual( GetItemData() ); } -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 ) ) @@ -2774,23 +2774,23 @@ void SAL_CALL ScDPMember::setName( const ::rtl::OUString& /* rNewName */ ) throw DBG_ERROR("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/drawpage.cxx b/sc/source/core/data/drawpage.cxx index 715b99f362a1..d4de55f4942f 100644 --- a/sc/source/core/data/drawpage.cxx +++ b/sc/source/core/data/drawpage.cxx @@ -43,7 +43,7 @@ // ----------------------------------------------------------------------- -ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, BOOL bMasterPage) : +ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, sal_Bool bMasterPage) : FmFormPage(rNewModel, pBasic, bMasterPage) { SetSize( Size( LONG_MAX, LONG_MAX ) ); diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 4df709768279..f991bed0c0e0 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -101,12 +101,12 @@ TYPEINIT1(ScTabSizeChangedHint, SfxHint); static ScDrawObjFactory* pFac = NULL; static E3dObjFactory* pF3d = NULL; -static USHORT nInst = 0; +static sal_uInt16 nInst = 0; SfxObjectShell* ScDrawLayer::pGlobalDrawPersist = NULL; //REMOVE SvPersist* ScDrawLayer::pGlobalDrawPersist = NULL; -BOOL bDrawIsInUndo = FALSE; //! Member +sal_Bool bDrawIsInUndo = sal_False; //! Member // ----------------------------------------------------------------------- @@ -211,13 +211,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( sal_False ), + bAdjustEnabled( sal_True ), + bHyphenatorSet( sal_False ) { pGlobalDrawPersist = NULL; // nur einmal benutzen @@ -234,8 +234,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(); @@ -254,7 +254,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( sal_False, EE_PARA_ASIANCJKSPACING ) ); } rPool.FreezeIdRanges(); // the pool is also used directly @@ -318,7 +318,7 @@ void ScDrawLayer::UseHyphenator() GetDrawOutliner().SetHyphenator( xHyphenator ); GetHitTestOutliner().SetHyphenator( xHyphenator ); - bHyphenatorSet = TRUE; + bHyphenatorSet = sal_True; } } @@ -326,18 +326,18 @@ SdrPage* __EXPORT ScDrawLayer::AllocPage(FASTBOOL bMasterPage) { // don't create basic until it is needed StarBASIC* pBasic = NULL; - ScDrawPage* pPage = new ScDrawPage( *this, pBasic, sal::static_int_cast(bMasterPage) ); + ScDrawPage* pPage = new ScDrawPage( *this, pBasic, sal::static_int_cast(bMasterPage) ); return pPage; } -BOOL ScDrawLayer::HasObjects() const +sal_Bool ScDrawLayer::HasObjects() const { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; - USHORT nCount = GetPageCount(); - for (USHORT i=0; iGetObjCount()) - bFound = TRUE; + bFound = sal_True; return bFound; } @@ -371,17 +371,17 @@ Window* __EXPORT ScDrawLayer::GetCurDocViewWin() return NULL; } -BOOL ScDrawLayer::ScAddPage( SCTAB nTab ) +sal_Bool ScDrawLayer::ScAddPage( SCTAB nTab ) { if (bDrawIsInUndo) - return FALSE; // not inserted + return sal_False; // not inserted - ScDrawPage* pPage = (ScDrawPage*)AllocPage( FALSE ); + ScDrawPage* pPage = (ScDrawPage*)AllocPage( sal_False ); InsertPage(pPage, static_cast(nTab)); if (bRecording) AddCalcUndo(new SdrUndoNewPage(*pPage)); - return TRUE; // inserted + return sal_True; // inserted } void ScDrawLayer::ScRemovePage( SCTAB nTab ) @@ -407,20 +407,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(sal_False) : GetPage(nNewPos); // kopieren @@ -449,7 +449,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; @@ -463,10 +463,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 ); @@ -474,18 +474,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 = sal_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) { @@ -498,7 +498,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) @@ -513,10 +513,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(nPageNo) ); + sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast(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(nPageNo) ); @@ -702,18 +702,18 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, const ScDrawObjData& rData, bool b } } -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 sal_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 = sal_False; long nEndX = 0; long nEndY = 0; long nStartX = LONG_MAX; @@ -762,11 +762,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 = sal_False; if ( !bSetVer && ( aObjRect.Bottom() < nStartY || aObjRect.Top() > nEndY ) ) - bFit = FALSE; + bFit = sal_False; if ( bFit ) { if (bSetHor) @@ -779,7 +779,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(); @@ -860,7 +860,7 @@ void ScDrawLayer::BeginCalcUndo() //! DBG_ASSERT( !bRecording, "BeginCalcUndo ohne GetCalcUndo" ); DELETEZ(pUndoGroup); - bRecording = TRUE; + bRecording = sal_True; } SdrUndoGroup* ScDrawLayer::GetCalcUndo() @@ -869,7 +869,7 @@ SdrUndoGroup* ScDrawLayer::GetCalcUndo() SdrUndoGroup* pRet = pUndoGroup; pUndoGroup = NULL; - bRecording = FALSE; + bRecording = sal_False; return pRet; } @@ -885,16 +885,16 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, if (!pPage) return; - BOOL bNegativePage = pDoc && pDoc->IsNegativePage( nTab ); + sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab ); // fuer Shrinking! Rectangle aNew( rArea ); - BOOL bShrink = FALSE; + sal_Bool bShrink = sal_False; if ( rMove.X() < 0 || rMove.Y() < 0 ) // verkleinern { if ( rTopLeft != rArea.TopLeft() ) // sind gleich beim Verschieben von Zellen { - bShrink = TRUE; + bShrink = sal_True; aNew.Left() = rTopLeft.X(); aNew.Top() = rTopLeft.Y(); } @@ -916,14 +916,14 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, } else if ( pObject->IsPolyObj() && pObject->GetPointCount()==2 ) { - for (USHORT i=0; i<2; i++) + for (sal_uInt16 i=0; i<2; i++) { - BOOL bMoved = FALSE; + sal_Bool bMoved = sal_False; Point aPoint = pObject->GetPoint(i); lcl_ReverseTwipsToMM( aPoint ); if (rArea.IsInside(aPoint)) { - aPoint += rMove; bMoved = TRUE; + aPoint += rMove; bMoved = sal_True; } else if (bShrink && aNew.IsInside(aPoint)) { @@ -932,13 +932,13 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, { aPoint.X() = rArea.Left() + rMove.X() - SHRINK_DIST_TWIPS; if ( aPoint.X() < 0 ) aPoint.X() = 0; - bMoved = TRUE; + bMoved = sal_True; } if ( rMove.Y() && aPoint.Y() >= rArea.Top() + rMove.Y() ) { aPoint.Y() = rArea.Top() + rMove.Y() - SHRINK_DIST_TWIPS; if ( aPoint.Y() < 0 ) aPoint.Y() = 0; - bMoved = TRUE; + bMoved = sal_True; } } if( bMoved ) @@ -957,11 +957,11 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, lcl_ReverseTwipsToMM( aObjRect ); Point aTopLeft = bNegativePage ? aObjRect.TopRight() : aObjRect.TopLeft(); // logical left Size aMoveSize; - BOOL bDoMove = FALSE; + sal_Bool bDoMove = sal_False; if (rArea.IsInside(aTopLeft)) { aMoveSize = Size(rMove.X(),rMove.Y()); - bDoMove = TRUE; + bDoMove = sal_True; } else if (bShrink && aNew.IsInside(aTopLeft)) { @@ -969,12 +969,12 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, if ( rMove.X() && aTopLeft.X() >= rArea.Left() + rMove.X() ) { aMoveSize.Width() = rArea.Left() + rMove.X() - SHRINK_DIST - aTopLeft.X(); - bDoMove = TRUE; + bDoMove = sal_True; } if ( rMove.Y() && aTopLeft.Y() >= rArea.Top() + rMove.Y() ) { aMoveSize.Height() = rArea.Top() + rMove.Y() - SHRINK_DIST - aTopLeft.Y(); - bDoMove = TRUE; + bDoMove = sal_True; } } if ( bDoMove ) @@ -1019,7 +1019,7 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, } 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 ) @@ -1028,7 +1028,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 ); @@ -1094,7 +1094,7 @@ void ScDrawLayer::WidthChanged( SCTAB nTab, SCCOL nCol, long nDifTwips ) //! aTopLeft ist falsch, wenn mehrere Spalten auf einmal ausgeblendet werden - BOOL bNegativePage = pDoc->IsNegativePage( nTab ); + sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); if ( bNegativePage ) { MirrorRectRTL( aRect ); @@ -1127,7 +1127,7 @@ void ScDrawLayer::HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips ) //! aTopLeft ist falsch, wenn mehrere Zeilen auf einmal ausgeblendet werden - BOOL bNegativePage = pDoc->IsNegativePage( nTab ); + sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); if ( bNegativePage ) { MirrorRectRTL( aRect ); @@ -1137,11 +1137,11 @@ void ScDrawLayer::HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips ) MoveAreaTwips( nTab, aRect, Point( 0,nDifTwips ), aTopLeft ); } -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 sal_False; Rectangle aTestRect; @@ -1161,16 +1161,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(nTab)); DBG_ASSERT(pPage,"Page nicht gefunden"); if (!pPage) - return FALSE; + return sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; Rectangle aObjRect; SdrObjListIter aIter( *pPage ); @@ -1179,7 +1179,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 = sal_True; pObject = aIter.Next(); } @@ -1198,7 +1198,7 @@ void ScDrawLayer::DeleteObjects( SCTAB nTab ) pPage->RecalcObjOrdNums(); long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); if (nObjCount) { SdrObject** ppObj = new SdrObject*[nObjCount]; @@ -1240,7 +1240,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, pPage->RecalcObjOrdNums(); long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); if (nObjCount) { Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); @@ -1296,7 +1296,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) { pPage->RecalcObjOrdNums(); long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); if (nObjCount) { // Rechteck um die ganze Selektion @@ -1402,7 +1402,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 @@ -1410,30 +1410,30 @@ BOOL lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const for( ;aIt!=rRangesVector.end(); ++aIt ) { const ScRangeList& rRanges = *aIt; - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i& 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 = sal_False; ::std::vector< ScRangeList >::iterator aIt = rRangesVector.begin(); for( ;aIt!=rRangesVector.end(); ++aIt ) { ScRangeList& rRanges = *aIt; - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i& 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; } } } @@ -1466,7 +1466,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 ); @@ -1489,13 +1489,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 = sal_False; if( pOldObject && !bSameDoc && !bDestClip ) { if( pDoc && pClipDoc ) @@ -1507,7 +1507,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 } } } @@ -1526,18 +1526,18 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const Fraction aHorFract(1,1); Fraction aVerFract(1,1); - BOOL bResize = FALSE; + sal_Bool bResize = sal_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) @@ -1591,7 +1591,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const pDoc->GetChartRanges( aChartName, aRangesVector, pDoc ); if( !aRangesVector.empty() ) { - BOOL bInSourceRange = FALSE; + sal_Bool bInSourceRange = sal_False; ScRange aClipRange; if ( pClipDoc ) { @@ -1600,7 +1600,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 @@ -1655,11 +1655,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; @@ -1757,7 +1757,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 || @@ -1765,7 +1765,7 @@ inline sal_Bool IsNamedObject( SdrObject* pObj, const String& rName ) static_cast(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; nTabGetUserDataCount() : 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 @@ -1911,8 +1911,8 @@ ScDrawObjData* ScDrawLayer::GetNoteCaptionData( SdrObject* pObj, SCTAB nTab ) ScIMapInfo* ScDrawLayer::GetIMapInfo( SdrObject* pObj ) // static { - USHORT nCount = pObj->GetUserDataCount(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = pObj->GetUserDataCount(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObj->GetUserData( i ); if( pData && pData->GetInventor() == SC_DRAWLAYER @@ -1938,7 +1938,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj, Size aGraphSize; ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap(); Graphic aGraphic; - BOOL bObjSupported = FALSE; + sal_Bool bObjSupported = sal_False; if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt { @@ -1967,13 +1967,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 = ((SdrOle2Obj*)pObj)->GetOrigObjSize(); - bObjSupported = TRUE; + bObjSupported = sal_True; } // hat alles geklappt, dann HitTest ausfuehren @@ -1988,10 +1988,10 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj, return pIMapObj; } -ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, BOOL bCreate ) // static +ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, sal_Bool bCreate ) // static { - USHORT nCount = pObj->GetUserDataCount(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = pObj->GetUserDataCount(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObj->GetUserData( i ); if( pData && pData->GetInventor() == SC_DRAWLAYER @@ -2016,7 +2016,7 @@ void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist) // s void __EXPORT 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 12b4bb27950d..6cc56405448e 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -54,7 +54,7 @@ // ----------------------------------------------------------------------- -const USHORT ROWINFO_MAX = 1024; +const sal_uInt16 ROWINFO_MAX = 1024; enum FillInfoLinePos @@ -94,8 +94,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; @@ -109,7 +109,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); @@ -133,7 +133,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); @@ -160,11 +160,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(); @@ -185,16 +185,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 = sal_False; + sal_Bool bAnyShadow = sal_False; + sal_Bool bAnyCondition = sal_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 = sal_False; + sal_Bool bSkipMarks = sal_False; SCCOL nBlockStartX = 0, nBlockEndX = 0; SCROW nBlockEndY = 0, nBlockStartY = 0; if (pMarkData && pMarkData->IsMarked()) @@ -209,9 +209,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; } } @@ -219,7 +219,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++) { @@ -241,17 +241,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 = sal_False; + pThisRowInfo->bPushButton = sal_False; pThisRowInfo->nRotMaxCol = SC_ROTMAX_NONE; ++nArrY; @@ -271,12 +271,12 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX // rotierter Text... // Attribut im Dokument ueberhaupt verwendet? - BOOL bAnyItem = FALSE; + sal_Bool bAnyItem = sal_False; sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE ); for (sal_uInt32 nItem=0; nItemGetItem2( ATTR_ROTATE_VALUE, nItem )) { - bAnyItem = TRUE; + bAnyItem = sal_True; break; } @@ -313,28 +313,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 = sal_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 = sal_False; + pInfo->bHOverlapped = sal_False; + pInfo->bVOverlapped = sal_False; + pInfo->bAutoFilter = sal_False; + pInfo->bPushButton = sal_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 = sal_False; // view-intern + pInfo->bHideGrid = sal_False; // view-intern + pInfo->bEditEngine = sal_False; // view-intern pInfo->pBackground = NULL; //! weglassen? pInfo->pPatternAttr = NULL; @@ -357,7 +357,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; @@ -378,7 +378,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; @@ -407,8 +407,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 = sal_False; // Zeile nicht leer + pInfo->bEmptyCellText = sal_False; // Zelle nicht leer } ++nArrY; } @@ -449,24 +449,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&) @@ -475,9 +475,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX bHideFormula = rProtAttr.GetHideFormula(); } else - bHidden = bHideFormula = FALSE; + bHidden = bHideFormula = sal_False; - ULONG nConditional = ((const SfxUInt32Item&)pPattern-> + sal_uLong nConditional = ((const SfxUInt32Item&)pPattern-> GetItem(ATTR_CONDITIONAL)).GetValue(); const ScConditionalFormat* pCondForm = NULL; if ( nConditional && pCondFormList ) @@ -491,11 +491,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 = sal_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; @@ -513,7 +513,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 = sal_False; //bIsEmbedded && nTab >= aEmbedRange.aStart.Tab() && nTab <= aEmbedRange.aEnd.Tab() && nX >= aEmbedRange.aStart.Col() && @@ -524,18 +524,18 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX if (bScenario) { pInfo->pBackground = ScGlobal::GetButtonBrushItem(); - pThisRowInfo->bEmptyBack = FALSE; + pThisRowInfo->bEmptyBack = sal_False; } else if (bEmbed) { pInfo->pBackground = ScGlobal::GetEmbeddedBrushItem(); - pThisRowInfo->bEmptyBack = FALSE; + pThisRowInfo->bEmptyBack = sal_False; } if (bHidden || ( bFormulaMode && bHideFormula && pInfo->pCell && pInfo->pCell->GetCellType() == CELLTYPE_FORMULA )) - pInfo->bEmptyCellText = TRUE; + pInfo->bEmptyCellText = sal_True; if ( pCondForm ) { @@ -549,7 +549,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 } @@ -575,7 +575,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 @@ -593,7 +593,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 && @@ -602,7 +602,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; @@ -649,26 +649,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 = sal_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; } } } @@ -709,23 +709,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 = sal_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 = sal_False; if (bPaintMarks) bCellMarked = ( nStartX >= (SCsCOL) nBlockStartX && nStartX <= (SCsCOL) nBlockEndX @@ -749,13 +749,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX { for (nArrY=0; nArrYpShadowAttr; @@ -772,13 +772,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 ) @@ -886,7 +886,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX } } - rTabInfo.mnArrCount = sal::static_int_cast(nArrCount); + rTabInfo.mnArrCount = sal::static_int_cast(nArrCount); rTabInfo.mbPageMode = bPageMode; // ======================================================================== @@ -904,12 +904,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; @@ -952,16 +952,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; @@ -969,7 +969,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(nLastCellInfoY + 1) < nArrCount) && (pRowInfo[ nLastCellInfoY + 1 ].nRowNo <= nLastRealDocRow) ) ++nLastCellInfoY; @@ -1064,13 +1064,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 10aacc678d74..0db09d4d50d9 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -135,19 +135,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 @@ -160,11 +160,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 = sal_False; const SfxItemState eNewState = rNewAttrs.GetItemState( nWhich ); const SfxItemState eOldState = rOldAttrs.GetItemState( nWhich ); @@ -190,14 +190,14 @@ BOOL ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs, ? rNewAttrs.Get( nWhich ) : rNewAttrs.GetPool()->GetDefaultItem( nWhich ); - bInvalidate = sal::static_int_cast(rNewItem != rOldItem); + bInvalidate = sal::static_int_cast(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 ) @@ -205,8 +205,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 ) @@ -231,7 +231,7 @@ SvNumberFormatter* ScGlobal::GetEnglishFormatter() //------------------------------------------------------------------------ -BOOL ScGlobal::CheckWidthInvalidate( BOOL& bNumFormatChanged, +sal_Bool ScGlobal::CheckWidthInvalidate( sal_Bool& bNumFormatChanged, const SfxItemSet& rNewAttrs, const SfxItemSet& rOldAttrs ) { @@ -347,7 +347,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 ] ) @@ -390,7 +390,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) @@ -416,7 +416,7 @@ String ScGlobal::GetErrorString(USHORT nErrNumber) return sResStr; } -String ScGlobal::GetLongErrorString(USHORT nErrNumber) +String ScGlobal::GetLongErrorString(sal_uInt16 nErrNumber) { switch (nErrNumber) { @@ -546,7 +546,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 ); @@ -571,7 +571,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. @@ -621,12 +621,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 ); } @@ -642,7 +642,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; @@ -889,33 +889,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; nParGetText(nPar) != pObj2->GetText(nPar) ) - return FALSE; + return sal_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 sal_False; } void ScGlobal::OpenURL( const String& rURL, const String& rTarget ) @@ -943,8 +943,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, sal_False ); + SfxBoolItem aBrowsing( SID_BROWSE, sal_True ); // kein SID_SILENT mehr wegen Bug #42525# (war angeblich sowieso falsch) @@ -960,19 +960,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() @@ -982,7 +982,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 ) { @@ -1074,16 +1074,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, sal_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, sal_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(); @@ -1113,7 +1113,7 @@ public: ScFuncRes( ResId&, ScFuncDesc*, bool & rbSuppressed ); private: - USHORT GetNum(); + sal_uInt16 GetNum(); }; //-------------------------------------------------------------------- @@ -1125,20 +1125,20 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed ) pDesc->nCategory = GetNum(); pDesc->sHelpId = ReadByteStringRes(); //! Hack, see scfuncs.src pDesc->nArgCount = GetNum(); - USHORT nArgs = pDesc->nArgCount; + sal_uInt16 nArgs = pDesc->nArgCount; if (nArgs >= VAR_ARGS) nArgs -= VAR_ARGS - 1; if (nArgs) { pDesc->pDefArgFlags = new ScFuncDesc::ParameterFlags[nArgs]; - for (USHORT i = 0; i < nArgs; i++) + for (sal_uInt16 i = 0; i < nArgs; i++) { pDesc->pDefArgFlags[i].bOptional = (bool)GetNum(); } } // Need to read the value from the resource even if nArgs==0 to advance the // resource position pointer, so this can't be in the if(nArgs) block above. - USHORT nSuppressed = GetNum(); + sal_uInt16 nSuppressed = GetNum(); if (nSuppressed) { if (nSuppressed > nArgs) @@ -1147,9 +1147,9 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed ) aRes.GetId(), (int)nSuppressed, (int)nArgs); nSuppressed = nArgs; // sanitize } - for (USHORT i=0; i < nSuppressed; ++i) + for (sal_uInt16 i=0; i < nSuppressed; ++i) { - USHORT nParam = GetNum(); + sal_uInt16 nParam = GetNum(); if (nParam < nArgs) { if (pDesc->nArgCount >= VAR_ARGS && nParam == nArgs-1) @@ -1178,7 +1178,7 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed ) { pDesc->ppDefArgNames = new String*[nArgs]; pDesc->ppDefArgDescs = new String*[nArgs]; - for (USHORT i = 0; i < nArgs; i++) + for (sal_uInt16 i = 0; i < nArgs; i++) { pDesc->ppDefArgNames[i] = new String(ScResId(2*(i+1) )); pDesc->ppDefArgDescs[i] = new String(ScResId(2*(i+1)+1)); @@ -1190,7 +1190,7 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed ) //------------------------------------------------------------------------ -USHORT ScFuncRes::GetNum() +sal_uInt16 ScFuncRes::GetNum() { return ReadShortRes(); } @@ -1205,7 +1205,7 @@ private: public: ScResourcePublisher( const ScResId& rId ) : Resource( rId ) {} ~ScResourcePublisher() { FreeResource(); } - BOOL IsAvailableRes( const ResId& rId ) const + sal_Bool IsAvailableRes( const ResId& rId ) const { return Resource::IsAvailableRes( rId ); } }; @@ -1217,17 +1217,17 @@ ScFunctionList::ScFunctionList() : ScFuncDesc* pDesc = NULL; xub_StrLen nStrLen = 0; FuncCollection* pFuncColl; - USHORT i,j; - USHORT nDescBlock[] = + sal_uInt16 i,j; + sal_uInt16 nDescBlock[] = { RID_SC_FUNCTION_DESCRIPTIONS1, RID_SC_FUNCTION_DESCRIPTIONS2 }; - const USHORT nBlocks = sizeof(nDescBlock) / sizeof(USHORT); + const sal_uInt16 nBlocks = sizeof(nDescBlock) / sizeof(sal_uInt16); aFunctionList.Clear(); - for ( USHORT k = 0; k < nBlocks; k++ ) + for ( sal_uInt16 k = 0; k < nBlocks; k++ ) { ::std::auto_ptr pBlock( new ScResourcePublisher( ScResId( nDescBlock[k] ) ) ); // Browse for all possible OpCodes. This is not the fastest method, but @@ -1262,7 +1262,7 @@ ScFunctionList::ScFunctionList() : } } - USHORT nNextId = SC_OPCODE_LAST_OPCODE_ID + 1; // FuncID for AddIn functions + sal_uInt16 nNextId = SC_OPCODE_LAST_OPCODE_ID + 1; // FuncID for AddIn functions // Auswertung AddIn-Liste String aDefArgNameValue(RTL_CONSTASCII_STRINGPARAM("value")); @@ -1283,7 +1283,7 @@ ScFunctionList::ScFunctionList() : { pDesc = new ScFuncDesc; FuncData *pAddInFuncData = (FuncData*)pFuncColl->At(i); - USHORT nArgs = pAddInFuncData->GetParamCount() - 1; + sal_uInt16 nArgs = pAddInFuncData->GetParamCount() - 1; pAddInFuncData->GetParamDesc( aArgName, aArgDesc, 0 ); pDesc->nFIndex = nNextId++; // ??? OpCode vergeben pDesc->nCategory = ID_FUNCTION_GRP_ADDINS; @@ -1428,11 +1428,11 @@ ScFuncDesc::~ScFuncDesc() void ScFuncDesc::Clear() { - USHORT nArgs = nArgCount; + sal_uInt16 nArgs = nArgCount; if (nArgs >= VAR_ARGS) nArgs -= VAR_ARGS-1; if (nArgs) { - for (USHORT i=0; i 0 && aIter != aEnd ) { - BOOL bLastArg = ( aIter->getLength() == 0 ); + sal_Bool bLastArg = ( aIter->getLength() == 0 ); while( aIter != aEnd && !bLastArg ) { @@ -1589,16 +1589,16 @@ String ScFuncDesc::GetSignature() const //------------------------------------------------------------------------ -USHORT ScFuncDesc::GetSuppressedArgCount() const +sal_uInt16 ScFuncDesc::GetSuppressedArgCount() const { if (!bHasSuppressedArgs || !pDefArgFlags) return nArgCount; - USHORT nArgs = nArgCount; + sal_uInt16 nArgs = nArgCount; if (nArgs >= VAR_ARGS) nArgs -= VAR_ARGS - 1; - USHORT nCount = nArgs; - for (USHORT i=0; i < nArgs; ++i) + sal_uInt16 nCount = nArgs; + for (sal_uInt16 i=0; i < nArgs; ++i) { if (pDefArgFlags[i].bSuppress) --nCount; @@ -1638,7 +1638,7 @@ xub_StrLen ScFuncDesc::getSuppressedArgumentCount() const } // ----------------------------------------------------------------------------- // -void ScFuncDesc::fillVisibleArgumentMapping(::std::vector& _rArguments) const +void ScFuncDesc::fillVisibleArgumentMapping(::std::vector& _rArguments) const { if (!bHasSuppressedArgs || !pDefArgFlags) { @@ -1647,10 +1647,10 @@ void ScFuncDesc::fillVisibleArgumentMapping(::std::vector& _rArguments) } _rArguments.reserve( nArgCount); - USHORT nArgs = nArgCount; + sal_uInt16 nArgs = nArgCount; if (nArgs >= VAR_ARGS) nArgs -= VAR_ARGS - 1; - for (USHORT i=0; i < nArgs; ++i) + for (sal_uInt16 i=0; i < nArgs; ++i) { if (!pDefArgFlags[i].bSuppress) _rArguments.push_back(i); @@ -1665,7 +1665,7 @@ void ScFuncDesc::initArgumentInfo() const if ( bIncomplete && pFuncName ) { ScUnoAddInCollection& rAddIns = *ScGlobal::GetAddInCollection(); - String aIntName = rAddIns.FindFunction( *pFuncName, TRUE ); // pFuncName is upper-case + String aIntName = rAddIns.FindFunction( *pFuncName, sal_True ); // pFuncName is upper-case if ( aIntName.Len() ) { @@ -1678,7 +1678,7 @@ void ScFuncDesc::initArgumentInfo() const if ( bIncomplete ) { DBG_ERRORFILE( "couldn't initialize add-in function" ); - const_cast(this)->bIncomplete = FALSE; // even if there was an error, don't try again + const_cast(this)->bIncomplete = sal_False; // even if there was an error, don't try again } } } @@ -1723,19 +1723,19 @@ ScFunctionMgr::ScFunctionMgr() pCurCatList ( NULL ) { DBG_ASSERT( pFuncList, "Funktionsliste nicht gefunden." ); - ULONG nCount = pFuncList->GetCount(); + sal_uLong nCount = pFuncList->GetCount(); const ScFuncDesc* pDesc; List* pRootList; - ULONG n; + sal_uLong n; - for ( USHORT i=0; iGetFunction(n); for (nTmpCnt = 0; nTmpCnt < n; nTmpCnt++) { @@ -1761,7 +1761,7 @@ ScFunctionMgr::ScFunctionMgr() ScFunctionMgr::~ScFunctionMgr() { - for (USHORT i = 0; i < MAX_FUNCCAT; i++) + for (sal_uInt16 i = 0; i < MAX_FUNCCAT; i++) delete aCatLists[i]; // delete pFuncList; // Macht spaeter die App } @@ -1780,7 +1780,7 @@ const ScFuncDesc* ScFunctionMgr::Get( const String& rFName ) const //------------------------------------------------------------------------ -const ScFuncDesc* ScFunctionMgr::Get( USHORT nFIndex ) const +const ScFuncDesc* ScFunctionMgr::Get( sal_uInt16 nFIndex ) const { const ScFuncDesc* pDesc; for (pDesc = First(0); pDesc; pDesc = Next()) @@ -1791,7 +1791,7 @@ const ScFuncDesc* ScFunctionMgr::Get( USHORT nFIndex ) const //------------------------------------------------------------------------ -const ScFuncDesc* ScFunctionMgr::First( USHORT nCategory ) const +const ScFuncDesc* ScFunctionMgr::First( sal_uInt16 nCategory ) const { DBG_ASSERT( nCategory < MAX_FUNCCAT, "Unbekannte Kategorie" ); @@ -1840,12 +1840,12 @@ void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula:: #define LRU_MAX 10 const ScAppOptions& rAppOpt = SC_MOD()->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(); if ( pLRUListIds ) { - for ( USHORT i=0; i= SC_FUNCGROUP_COUNT ) ::std::auto_ptr pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) ); - return String(ScResId((USHORT)_nCategoryNumber)); + return String(ScResId((sal_uInt16)_nCategoryNumber)); } sal_Unicode ScFunctionMgr::getSingleToken(const formula::IFunctionManager::EToken _eToken) const { diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 3234340ae9dd..f79d403683f6 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -72,9 +72,9 @@ ScImportParam::ScImportParam() : nRow1(0), nCol2(0), nRow2(0), - bImport(FALSE), - bNative(FALSE), - bSql(TRUE), + bImport(sal_False), + bNative(sal_False), + bSql(sal_True), nType(ScDbTable) { } @@ -101,9 +101,9 @@ ScImportParam::~ScImportParam() //UNUSED2009-05 { //UNUSED2009-05 nCol1 = nCol2 = 0; //UNUSED2009-05 nRow1 = nRow2 = 0; -//UNUSED2009-05 bImport = FALSE; -//UNUSED2009-05 bNative = FALSE; -//UNUSED2009-05 bSql = TRUE; +//UNUSED2009-05 bImport = sal_False; +//UNUSED2009-05 bNative = sal_False; +//UNUSED2009-05 bSql = sal_True; //UNUSED2009-05 nType = ScDbTable; //UNUSED2009-05 aDBName.Erase(); //UNUSED2009-05 aStatement.Erase(); @@ -125,7 +125,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 && @@ -146,8 +146,8 @@ BOOL ScImportParam::operator==( const ScImportParam& rOther ) const // struct ScQueryParam: ScQueryEntry::ScQueryEntry() : - bDoQuery(FALSE), - bQueryByString(FALSE), + bDoQuery(sal_False), + bQueryByString(sal_False), bQueryByDate(false), nField(0), eOp(SC_EQUAL), @@ -206,8 +206,8 @@ ScQueryEntry& ScQueryEntry::operator=( const ScQueryEntry& r ) void ScQueryEntry::Clear() { - bDoQuery = FALSE; - bQueryByString = FALSE; + bDoQuery = sal_False; + bQueryByString = sal_False; bQueryByDate = false; eOp = SC_EQUAL; eConnect = SC_AND; @@ -223,7 +223,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 @@ -236,12 +236,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, sal_False, sal_False ); pSearchText = new utl::TextSearch( *pSearchParam, *ScGlobal::pCharClass ); } return pSearchText; @@ -252,7 +252,7 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( BOOL bCaseSens ) ScSubTotalParam::ScSubTotalParam() { - for ( USHORT i=0; i 0) && pSubTotals[i] && pFunctions[i] ) @@ -339,7 +339,7 @@ ScSubTotalParam& ScSubTotalParam::operator=( const ScSubTotalParam& r ) nUserIndex = r.nUserIndex; bIncludePattern = r.bIncludePattern; - for (USHORT i=0; i MAXSUBTOTAL!" ); @@ -443,7 +443,7 @@ void ScSubTotalParam::SetSubTotals( USHORT nGroup, pFunctions[nGroup] = new ScSubTotalFunc [nCount]; nSubTotals[nGroup] = static_cast(nCount); - for ( USHORT i=0; i 0) ) - for ( USHORT i=0; i 0 ) { ppDataAreas = new ScArea*[nCount]; - for ( USHORT i=0; i(nCount) - 1; long nStartRow = 0; long nEndRow = 0; long i = 0; - BOOL bFound = (nCount == 1); + sal_Bool bFound = (nCount == 1); if (pData) { while ( !bFound && nLo <= nHi ) @@ -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 = sal_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 sal_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(sal_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 = sal_False; + sal_Bool bSplit = sal_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 @@ -253,10 +253,10 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked ) //UNUSED2009-05 void ScMarkArray::DeleteArea(SCROW nStartRow, SCROW nEndRow) //UNUSED2009-05 { -//UNUSED2009-05 SetMarkArea(nStartRow, nEndRow, FALSE); +//UNUSED2009-05 SetMarkArea(nStartRow, nEndRow, sal_False); //UNUSED2009-05 } -BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const +sal_Bool ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const { SCSIZE nStartIndex; SCSIZE nEndIndex; @@ -265,21 +265,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 sal_False; } -BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const +sal_Bool ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( nCount == 1 ) { if ( pData[0].bMarked ) { rStartRow = 0; rEndRow = MAXROW; - bRet = TRUE; + bRet = sal_True; } } else if ( nCount == 2 ) @@ -294,7 +294,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 ) { @@ -302,7 +302,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; @@ -323,10 +323,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(this)->Reset(FALSE); // create pData for further processing + const_cast(this)->Reset(sal_False); // create pData for further processing SCsROW nRet = nRow; if (VALIDROW(nRow)) @@ -349,10 +349,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(this)->Reset(FALSE); // create pData for further processing + const_cast(this)->Reset(sal_False); // create pData for further processing SCROW nRet; SCSIZE nIndex; @@ -385,15 +385,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 sal_False; while (!pArray->pData[nPos].bMarked) { ++nPos; if ( nPos >= pArray->nCount ) - return FALSE; + return sal_False; } rBottom = pArray->pData[nPos].nRow; if (nPos==0) @@ -401,7 +401,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 4401ac19d199..66d205d305db 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -46,7 +46,7 @@ ScMarkData::ScMarkData() : pMultiSel( NULL ) { for (SCTAB i=0; i<=MAXTAB; i++) - bTabMarked[i] = FALSE; + bTabMarked[i] = sal_False; ResetMark(); } @@ -110,8 +110,8 @@ void ScMarkData::ResetMark() delete[] pMultiSel; pMultiSel = NULL; - bMarked = bMultiMarked = FALSE; - bMarking = bMarkIsNeg = FALSE; + bMarked = bMultiMarked = sal_False; + bMarking = bMarkIsNeg = sal_False; } void ScMarkData::SetMarkArea( const ScRange& rRange ) @@ -124,8 +124,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; } } @@ -139,7 +139,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) { @@ -148,8 +148,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 = sal_False; + SetMultiMarkArea( aMarkRange, sal_True ); } } @@ -178,7 +178,7 @@ void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark ) else { aMultiRange = rRange; // neu - bMultiMarked = TRUE; + bMultiMarked = sal_True; } } @@ -221,7 +221,7 @@ void ScMarkData::MarkToMulti() if ( bMarked && !bMarking ) { SetMultiMarkArea( aMarkRange, !bMarkIsNeg ); - bMarked = FALSE; + bMarked = sal_False; // check if all multi mark ranges have been removed if ( bMarkIsNeg && !HasAnyMultiMarks() ) @@ -243,7 +243,7 @@ void ScMarkData::MarkToSimple() ScRange aNew = aMultiRange; - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; SCCOL nStartCol = aNew.aStart.Col(); SCCOL nEndCol = aNew.aEnd.Col(); @@ -256,12 +256,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 = sal_False; } if (bOk) @@ -273,18 +273,18 @@ void ScMarkData::MarkToSimple() ResetMark(); aMarkRange = aNew; - bMarked = TRUE; - bMarkIsNeg = FALSE; + bMarked = sal_True; + bMarkIsNeg = sal_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) { @@ -294,10 +294,10 @@ BOOL ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, BOOL bNoSimple ) const return pMultiSel[nCol].GetMark( nRow ); } - return FALSE; + return sal_False; } -BOOL ScMarkData::IsColumnMarked( SCCOL nCol ) const +sal_Bool ScMarkData::IsColumnMarked( SCCOL nCol ) const { // bMarkIsNeg inzwischen auch fuer Spaltenkoepfe //! GetMarkColumnRanges fuer komplett markierte Spalten @@ -305,15 +305,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 sal_False; } -BOOL ScMarkData::IsRowMarked( SCROW nRow ) const +sal_Bool ScMarkData::IsRowMarked( SCROW nRow ) const { // bMarkIsNeg inzwischen auch fuer Zeilenkoepfe //! GetMarkRowRanges fuer komplett markierte Zeilen @@ -321,48 +321,48 @@ 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 sal_False; + return sal_True; } - return FALSE; + return sal_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] = sal_False; // Tabellen sind nicht in ResetMark ResetMark(); } - ULONG nCount = rList.Count(); + sal_uLong nCount = rList.Count(); if ( nCount == 1 && !bMarked && !bMultiMarked ) { ScRange aRange = *rList.GetObject(0); SetMarkArea( aRange ); - SelectTable( aRange.aStart.Tab(), TRUE ); + SelectTable( aRange.aStart.Tab(), sal_True ); } else { - for (ULONG i=0; inTab; i--) bTabMarked[i] = bTabMarked[i-1]; - bTabMarked[nTab] = FALSE; + bTabMarked[nTab] = sal_False; } void ScMarkData::DeleteTab( SCTAB nTab ) { for (SCTAB i=nTab; iGetStart() ); } -USHORT ScOutlineCollection::FindStart( SCCOLROW nMinStart ) +sal_uInt16 ScOutlineCollection::FindStart( SCCOLROW nMinStart ) { //! binaer suchen ? - USHORT nPos = 0; - USHORT nLocalCount = GetCount(); - while ( (nPosGetStart() < nMinStart) : FALSE ) + sal_uInt16 nPos = 0; + sal_uInt16 nLocalCount = GetCount(); + while ( (nPosGetStart() < nMinStart) : sal_False ) ++nPos; return nPos; @@ -146,10 +146,10 @@ ScOutlineArray::ScOutlineArray() : ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) : nDepth( rArray.nDepth ) { - for (USHORT nLevel=0; nLevel nDepth) nMaxLevel = nDepth; - for (USHORT nLevel=0; nLevelGetCount(); - for (USHORT i=0; iGetCount(); + for (sal_uInt16 i=0; iAt(i); if ( pEntry->GetStart() <= nSearchPos && pEntry->GetEnd() >= nSearchPos ) @@ -181,28 +181,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 = sal_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 = sal_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 = sal_False; if ( nStartLevel == nEndLevel && nStartIndex == nEndIndex && nStartLevel < SC_OL_MAXDEPTH ) - bFound = TRUE; + bFound = sal_True; if (!bFound) { @@ -217,25 +217,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 sal_False; - USHORT nLevel = nStartLevel; + sal_uInt16 nLevel = nStartLevel; // untere verschieben - BOOL bNeedSize = FALSE; + sal_Bool bNeedSize = sal_False; for ( short nMoveLevel = nDepth-1; nMoveLevel >= (short) nLevel; nMoveLevel-- ) { - USHORT nCount = aCollections[nMoveLevel].GetCount(); - BOOL bMoved = FALSE; - for ( USHORT i=0; iGetStart(); @@ -243,40 +243,40 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh { if (nMoveLevel >= SC_OL_MAXDEPTH - 1) { - rSizeChanged = FALSE; // kein Platz - return FALSE; + rSizeChanged = sal_False; // kein Platz + return sal_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 = sal_False; } } if (bNeedSize) { ++nDepth; - rSizeChanged = TRUE; + rSizeChanged = sal_True; } if (nDepth <= nLevel) { nDepth = nLevel+1; - rSizeChanged = TRUE; + rSizeChanged = sal_True; } /* nicht zusammenfassen! // zusammenfassen - USHORT nCount = aCollections[nLevel].GetCount(); - USHORT nIndex; - bFound = FALSE; + sal_uInt16 nCount = aCollections[nLevel].GetCount(); + sal_uInt16 nIndex; + bFound = sal_False; for ( nIndex=0; nIndexGetEnd() + 1 == nStartCol ) @@ -284,18 +284,18 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh nStartCol = ((ScOutlineEntry*) aCollections[nLevel].At(nIndex))->GetStart(); aCollections[nLevel].AtFree(nIndex); nCount = aCollections[nLevel].GetCount(); // Daten geaendert - bFound = TRUE; + bFound = sal_True; } } - bFound = FALSE; + bFound = sal_False; for ( nIndex=0; nIndexGetStart() == nEndCol + 1 ) { nEndCol = ((ScOutlineEntry*) aCollections[nLevel].At(nIndex))->GetEnd(); aCollections[nLevel].AtFree(nIndex); - bFound = TRUE; + bFound = sal_True; } } */ @@ -303,19 +303,19 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh 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 = sal_False; rFindLevel = 0; - for (USHORT nLevel=0; nLevelGetCount(); - for (USHORT i=0; iGetCount(); + for (sal_uInt16 i=0; iAt(i); SCCOLROW nStart = pEntry->GetStart(); @@ -325,7 +325,7 @@ BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, ( nBlockEnd >=nStart && nBlockEnd <=nEnd ) ) { rFindLevel = nLevel; // wirklicher Level - bFound = TRUE; + bFound = sal_True; } } } @@ -333,16 +333,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; iGetCount(); + sal_Bool bFound = sal_False; + for ( sal_uInt16 i=0; iAt(i); SCCOLROW nStart = pEntry->GetStart(); SCCOLROW nEnd = pEntry->GetEnd(); @@ -352,12 +352,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) { @@ -365,14 +365,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; iGetCount(); + sal_Bool bFound = sal_False; + for ( sal_uInt16 i=0; iAt(i); SCCOLROW nStart = pEntry->GetStart(); SCCOLROW nEnd = pEntry->GetEnd(); @@ -382,43 +382,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 = sal_False; + sal_Bool bCont; do { - bCont = FALSE; + bCont = sal_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; iGetCount(); + sal_Bool bFound = sal_False; + sal_Bool bAny = sal_False; + for ( sal_uInt16 i=0; iAt(i); SCCOLROW nStart = pEntry->GetStart(); SCCOLROW nEnd = pEntry->GetEnd(); @@ -430,34 +430,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())) @@ -466,34 +466,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 sal_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 sal_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 ) @@ -501,9 +501,9 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue, SCCOLROW nStart = pEntry->GetStart(); SCCOLROW nEnd = pEntry->GetEnd(); - for (USHORT nSubLevel=nLevel+1; nSubLevelIsHidden()) - SetVisibleBelow( nSubLevel, i, bValue, TRUE ); + SetVisibleBelow( nSubLevel, i, bValue, sal_True ); } ++i; @@ -528,7 +528,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(); @@ -538,12 +538,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); @@ -561,16 +561,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(nEnd+nSize) <= nMaxVal ); } - return TRUE; + return sal_True; } void ScOutlineArray::InsertSpace( SCCOLROW nStartPos, SCSIZE nSize ) @@ -596,11 +596,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 = sal_False; // Original fuer Undo benoetigt? + sal_Bool bChanged = sal_False; // fuer Test auf Level ScSubOutlineIterator aIter( this ); ScOutlineEntry* pEntry; @@ -618,11 +618,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(nEntryEnd-nEndPos) ); @@ -673,7 +673,7 @@ bool ScOutlineArray::ManualAction( SCCOLROW nStartPos, SCCOLROW nEndPos, bool bS void ScOutlineArray::RemoveAll() { - for (USHORT nLevel=0; nLevelaCollections[nLevel].At(nEntry); @@ -748,7 +748,7 @@ ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray, ScOutlineEntry* ScSubOutlineIterator::GetNext() { ScOutlineEntry* pEntry; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; do { if (nSubLevel >= nDepth) @@ -763,7 +763,7 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext() else { if ( pEntry->GetStart() >= nStart && pEntry->GetEnd() <= nEnd ) - bFound = TRUE; + bFound = sal_True; ++nSubEntry; } } @@ -771,12 +771,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 318f5c19501b..ddd21c01b313 100644 --- a/sc/source/core/data/pagepar.cxx +++ b/sc/source/core/data/pagepar.cxx @@ -57,11 +57,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 = sal_False; + bTopDown=bScaleNone=bCharts=bObjects = sal_True; nScaleAll = 100; nScalePageNum = nScaleWidth = nScaleHeight = 0; nFirstPageNo = 1; @@ -69,7 +69,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 ); } @@ -92,7 +92,7 @@ ScPageAreaParam::~ScPageAreaParam() void ScPageAreaParam::Reset() { - bPrintArea = bRepeatRow = bRepeatCol = FALSE; + bPrintArea = bRepeatRow = bRepeatCol = sal_False; memset( &aPrintArea, 0, sizeof(ScRange) ); memset( &aRepeatRow, 0, sizeof(ScRange) ); @@ -101,9 +101,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 b66aea63dd05..eadcac860496 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -126,7 +126,7 @@ __EXPORT ScPatternAttr::~ScPatternAttr() SfxPoolItem* __EXPORT 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; @@ -136,7 +136,7 @@ SfxPoolItem* __EXPORT 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 ) : sal_False ) : ( pStr2 ? sal_False : sal_True ) ); } inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 ) @@ -162,10 +162,10 @@ int __EXPORT ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const StrCmp( GetStyleName(), static_cast(rCmp).GetStyleName() ) ); } -SfxPoolItem* __EXPORT ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersion */ ) const +SfxPoolItem* __EXPORT ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */ ) const { String* pStr; - BOOL bHasStyle; + sal_Bool bHasStyle; short eFamDummy; rStream >> bHasStyle; @@ -190,9 +190,9 @@ SfxPoolItem* __EXPORT ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersi return pPattern; } -SvStream& __EXPORT ScPatternAttr::Store(SvStream& rStream, USHORT /* nItemVersion */) const +SvStream& __EXPORT ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */) const { - rStream << (BOOL)TRUE; + rStream << (sal_Bool)sal_True; if ( pStyle ) rStream.WriteByteString( pStyle->GetName(), rStream.GetStreamCharSet() ); @@ -219,7 +219,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 ) @@ -237,27 +237,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; @@ -287,59 +287,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(); } @@ -432,7 +432,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(); } @@ -497,13 +497,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 ); @@ -522,16 +522,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? @@ -540,100 +540,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(); } @@ -740,7 +740,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( sal_False, EE_PARA_ASIANCJKSPACING ) ); } void ScPatternAttr::FillEditItemSet( SfxItemSet* pEditSet, const SfxItemSet* pCondSet ) const @@ -754,80 +754,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(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(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(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() ) @@ -896,12 +896,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, sal_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 @@ -918,19 +918,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], sal_False ) == SFX_ITEM_SET ) + return sal_True; + return sal_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]); } @@ -968,9 +968,9 @@ SfxStyleSheetBase* lcl_CopyStyleToPool const SfxPoolItem* pSrcItem; if ( pFormatExchangeList && - rSrcSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pSrcItem ) == SFX_ITEM_SET ) + rSrcSet.GetItemState( ATTR_VALUE_FORMAT, sal_False, &pSrcItem ) == SFX_ITEM_SET ) { - ULONG nOldFormat = static_cast(pSrcItem)->GetValue(); + sal_uLong nOldFormat = static_cast(pSrcItem)->GetValue(); sal_uInt32* pNewFormat = static_cast(pFormatExchangeList->Get( nOldFormat )); if (pNewFormat) rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, *pNewFormat ) ); @@ -1016,10 +1016,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, sal_False, &pSrcItem ); if (eItemState==SFX_ITEM_ON) { SfxPoolItem* pNewItem = NULL; @@ -1028,11 +1028,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 ) { @@ -1044,8 +1044,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; iCount(); + for (sal_uInt16 i=0; iGetEntry(i)->GetStyle(); SfxStyleSheetBase* pSrcStl = @@ -1060,11 +1060,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 ); @@ -1075,10 +1075,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(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 ) @@ -1097,53 +1097,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 sal_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(); @@ -1170,9 +1170,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()); @@ -1229,20 +1229,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 sal_False; } -//UNUSED2008-05 FontToSubsFontConverter ScPatternAttr::GetSubsFontConverter( ULONG nFlags ) const +//UNUSED2008-05 FontToSubsFontConverter ScPatternAttr::GetSubsFontConverter( sal_uLong nFlags ) const //UNUSED2008-05 { //UNUSED2008-05 const SfxPoolItem* pItem; -//UNUSED2008-05 if( GetItemSet().GetItemState( ATTR_FONT, TRUE, &pItem ) == SFX_ITEM_SET ) +//UNUSED2008-05 if( GetItemSet().GetItemState( ATTR_FONT, sal_True, &pItem ) == SFX_ITEM_SET ) //UNUSED2008-05 return CreateFontToSubsFontConverter( //UNUSED2008-05 ((const SvxFontItem*) pItem)->GetFamilyName(), nFlags ); //UNUSED2008-05 else @@ -1250,9 +1250,9 @@ BOOL ScPatternAttr::IsSymbolFont() const //UNUSED2008-05 } -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(); @@ -1265,17 +1265,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( @@ -1283,15 +1283,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 ); } @@ -1303,7 +1303,7 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const long nAttrRotate = 0; if ( GetCellOrientation() == SVX_ORIENTATION_STANDARD ) { - BOOL bRepeat = ( static_cast(GetItem(ATTR_HOR_JUSTIFY, pCondSet)). + sal_Bool bRepeat = ( static_cast(GetItem(ATTR_HOR_JUSTIFY, pCondSet)). GetValue() == SVX_HOR_JUSTIFY_REPEAT ); // ignore orientation/rotation if "repeat" is active if ( !bRepeat ) @@ -1312,9 +1312,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 ddac72f0230b..dc1ac56438f7 100644 --- a/sc/source/core/data/pivot2.cxx +++ b/sc/source/core/data/pivot2.cxx @@ -98,13 +98,13 @@ OUString ScDPLabelData::getDisplayName() const // ============================================================================ -ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask ) : +ScDPFuncData::ScDPFuncData( short nCol, sal_uInt16 nFuncMask ) : mnCol( nCol ), mnFuncMask( nFuncMask ) { } -ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask, const DataPilotFieldReference& rFieldRef ) : +ScDPFuncData::ScDPFuncData( short 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 010cc502798b..aa7e5adeb834 100644 --- a/sc/source/core/data/poolhelp.cxx +++ b/sc/source/core/data/poolhelp.cxx @@ -101,10 +101,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 a4bc9a473768..18f535bd3174 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( sal_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( sal_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( sal_False ) ); + aItemSet.Put( SdrTextAutoGrowHeightItem( sal_True ) ); // #78943# 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( sal_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' ) ); @@ -833,10 +833,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 6a667806e097..2cd711ac4497 100644 --- a/sc/source/core/data/scdpoutputimpl.cxx +++ b/sc/source/core/data/scdpoutputimpl.cxx @@ -52,7 +52,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 ); @@ -88,7 +88,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, @@ -113,32 +113,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 sal_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 sal_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; @@ -171,16 +171,16 @@ void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEnd SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER ); - aBoxInfo.SetValid(VALID_VERT,FALSE ); + aBoxInfo.SetValid(VALID_VERT,sal_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,sal_False ); - aBoxInfo.SetValid(VALID_DISTANCE,FALSE); + aBoxInfo.SetValid(VALID_DISTANCE,sal_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 old mode 100755 new mode 100644 index 9148fe91ba02..a1b0a6c3a55b --- a/sc/source/core/data/scdpoutputimpl.hxx +++ b/sc/source/core/data/scdpoutputimpl.hxx @@ -41,7 +41,7 @@ class OutputImpl { ScDocument* mpDoc; - USHORT mnTab; + sal_uInt16 mnTab; ::std::vector< bool > mbNeedLineCols; ::std::vector< SCCOL > mnCols; @@ -59,7 +59,7 @@ class OutputImpl SCROW mnTabEndRow; public: - OutputImpl( ScDocument* pDoc, USHORT nTab, + OutputImpl( ScDocument* pDoc, sal_uInt16 nTab, SCCOL nTabStartCol, SCROW nTabStartRow, SCCOL nMemberStartCol, @@ -68,11 +68,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 = sal_False ); }; diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx index 9e8d355e74fa..d6c3308a47e0 100644 --- a/sc/source/core/data/sortparam.cxx +++ b/sc/source/core/data/sortparam.cxx @@ -54,7 +54,7 @@ ScSortParam::ScSortParam( const ScSortParam& r ) : nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow), aCollatorLocale( r.aCollatorLocale ), aCollatorAlgorithm( r.aCollatorAlgorithm ) { - for (USHORT i=0; i( nRow1 + nDifY ); nCol2 = sal::static_int_cast( nCol2 + nDifX ); nRow2 = sal::static_int_cast( nRow2 + nDifY ); - for (USHORT i=0; iGetItemSet(); 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, sal_False, &pItem ) == SFX_ITEM_SET ) { const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet(); SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() ); @@ -202,9 +202,9 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool, // #b5017505# 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, sal_False, &pItem ) == SFX_ITEM_SET ) { - ULONG nOldFormat = static_cast(pItem)->GetValue(); + sal_uLong nOldFormat = static_cast(pItem)->GetValue(); sal_uInt32* pNewFormat = static_cast(pDoc->GetFormatExchangeList()->Get( nOldFormat )); if (pNewFormat) rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, *pNewFormat ) ); @@ -236,7 +236,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 ) { @@ -260,12 +260,12 @@ void ScStyleSheetPool::CreateStandardStyles() String aStr; xub_StrLen nStrLen; String aHelpFile;//XXX JN welcher Text??? - //ULONG nNumFmt = 0L; + //sal_uLong nNumFmt = 0L; 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( sal_False ); EditTextObject* pEmptyTxtObj = pEdEngine->CreateTextObject(); EditTextObject* pTxtObj = NULL; ScPageHFItem* pHeaderItem = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ); @@ -442,13 +442,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( sal_False ); + aBoxInfoItem.SetDist ( sal_True ); pHFSetItem = new SvxSetItem( ((SvxSetItem&)pSet->Get( ATTR_PAGE_HEADERSET ) ) ); pHFSet = &(pHFSetItem->GetItemSet()); @@ -521,12 +521,12 @@ void ScStyleSheetPool::CreateStandardStyles() //UNUSED2008-05 if (!pStyle->IsUserDefined()) //UNUSED2008-05 { //UNUSED2008-05 String aOldName = pStyle->GetName(); -//UNUSED2008-05 ULONG nHelpId = pStyle->GetHelpId( aHelpFile ); +//UNUSED2008-05 sal_uLong nHelpId = pStyle->GetHelpId( aHelpFile ); //UNUSED2008-05 SfxStyleFamily eFam = pStyle->GetFamily(); //UNUSED2008-05 -//UNUSED2008-05 BOOL bHelpKnown = TRUE; +//UNUSED2008-05 sal_Bool bHelpKnown = sal_True; //UNUSED2008-05 String aNewName; -//UNUSED2008-05 USHORT nNameId = 0; +//UNUSED2008-05 sal_uInt16 nNameId = 0; //UNUSED2008-05 switch( nHelpId ) //UNUSED2008-05 { //UNUSED2008-05 case HID_SC_SHEET_CELL_STD: @@ -538,7 +538,7 @@ void ScStyleSheetPool::CreateStandardStyles() //UNUSED2008-05 case HID_SC_SHEET_PAGE_REP: nNameId = STR_STYLENAME_REPORT; break; //UNUSED2008-05 default: //UNUSED2008-05 // 0 oder falsche (alte) HelpId -//UNUSED2008-05 bHelpKnown = FALSE; +//UNUSED2008-05 bHelpKnown = sal_False; //UNUSED2008-05 } //UNUSED2008-05 if (bHelpKnown) //UNUSED2008-05 { @@ -571,7 +571,7 @@ void ScStyleSheetPool::CreateStandardStyles() //UNUSED2008-05 // saved again with a new version in a different language //UNUSED2008-05 // (so SrcVersion doesn't help) //UNUSED2008-05 -//UNUSED2008-05 USHORT nNewId = 0; +//UNUSED2008-05 sal_uInt16 nNewId = 0; //UNUSED2008-05 if ( eFam == SFX_STYLE_FAMILY_PARA ) //UNUSED2008-05 { //UNUSED2008-05 if ( aOldName == SCSTR( STR_STYLENAME_STANDARD ) ) diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index a3319eafd3fd..c2787b33eb34 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -67,7 +67,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 ) @@ -90,21 +90,21 @@ __EXPORT ScStyleSheet::~ScStyleSheet() //------------------------------------------------------------------------ -BOOL __EXPORT ScStyleSheet::HasFollowSupport() const +sal_Bool __EXPORT ScStyleSheet::HasFollowSupport() const { - return FALSE; + return sal_False; } //------------------------------------------------------------------------ -BOOL __EXPORT ScStyleSheet::HasParentSupport () const +sal_Bool __EXPORT ScStyleSheet::HasParentSupport () const { - BOOL bHasParentSupport = FALSE; + sal_Bool bHasParentSupport = sal_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 = sal_False; break; default: { // added to avoid warnings @@ -116,9 +116,9 @@ BOOL __EXPORT ScStyleSheet::HasParentSupport () const //------------------------------------------------------------------------ -BOOL __EXPORT ScStyleSheet::SetParent( const String& rParentName ) +sal_Bool __EXPORT ScStyleSheet::SetParent( const String& rParentName ) { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; String aEffName = rParentName; SfxStyleSheetBase* pStyle = rPool.Find( aEffName, nFamily ); if (!pStyle) @@ -200,12 +200,12 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet() ATTR_ULSPACE ); SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER ); - aBoxInfoItem.SetTable( FALSE ); - aBoxInfoItem.SetDist( TRUE ); - aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE ); + aBoxInfoItem.SetTable( sal_False ); + aBoxInfoItem.SetDist( sal_True ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True ); // aPageItem.SetLandscape( ORIENTATION_LANDSCAPE == pPrinter->GetOrientation() ); - aPageItem.SetLandscape( FALSE ); + aPageItem.SetLandscape( sal_False ); rHFSet.Put( aBoxInfoItem ); rHFSet.Put( aHFSizeItem ); @@ -244,7 +244,7 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet() 0 ); break; } - bMySet = TRUE; + bMySet = sal_True; } // if ( !pSet ) if ( nHelpId == HID_SC_SHEET_CELL_ERG1 ) { @@ -253,7 +253,7 @@ SfxItemSet& __EXPORT 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 ) ); } // if ( pDoc && pDoc->IsLoadingDone() ) } @@ -264,21 +264,21 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet() //------------------------------------------------------------------------ -BOOL __EXPORT ScStyleSheet::IsUsed() const +sal_Bool __EXPORT 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 +333,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 sal_False; else return SfxStyleSheet::SetName( rNew ); } diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index e534bb9dfb78..144f67839696 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -57,15 +57,15 @@ // ----------------------------------------------------------------------- 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( sal_False ), + bLayoutRTL( sal_False ), + bLoadingRTL( sal_False ), nLinkMode( 0 ), aPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ), - bPageSizeValid( FALSE ), + bPageSizeValid( sal_False ), nRepeatStartX( SCCOL_REPEAT_NONE ), nRepeatStartY( SCROW_REPEAT_NONE ), pTabProtection( NULL ), @@ -79,18 +79,18 @@ 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( sal_False ), + bVisible( sal_True ), + bStreamValid( sal_False ), + bPendingRowHeights( sal_False ), + bCalcNotification( sal_False ), nTab( nNewTab ), nRecalcLvl( 0 ), pDocument( pDoc ), pSearchParam( NULL ), pSearchText ( NULL ), pSortCollator( NULL ), - bPrintEntireSheet( FALSE ), + bPrintEntireSheet( sal_False ), pRepeatColRange( NULL ), pRepeatRowRange( NULL ), nLockCount( 0 ), @@ -98,14 +98,14 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName, aScenarioColor( COL_LIGHTGRAY ), aTabBgColor( COL_AUTO ), nScenarioFlags( 0 ), - bActiveScenario( FALSE ), + bActiveScenario( sal_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++) { @@ -117,7 +117,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() ) @@ -130,11 +130,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(nTab), Size( nx, ny ), false ); } } @@ -189,31 +189,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(sal_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; } @@ -234,14 +234,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 @@ -251,14 +251,14 @@ void ScTable::SetLink( BYTE nMode, nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_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, - BOOL bSimpleTextImport ) + sal_Bool bFormula, const ScMarkData* pMarkData, + sal_Bool bSimpleTextImport ) { return aCol[nCol].GetOptimalColWidth( pDev, nPPTX, nPPTY, rZoomX, rZoomY, bFormula, STD_COL_WIDTH - STD_EXTRA_WIDTH, pMarkData, bSimpleTextImport ); @@ -268,30 +268,30 @@ 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 = sal_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 sal_False; } - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; SCSIZE nCount = static_cast(nEndRow-nStartRow+1); ScProgress* pProgress = NULL; @@ -301,8 +301,8 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra, pProgress = new ScProgress( pDocument->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), GetWeightedCount() ); - USHORT* pHeight = new USHORT[nCount]; // Twips ! - memset( pHeight, 0, sizeof(USHORT) * nCount ); + sal_uInt16* pHeight = new sal_uInt16[nCount]; // Twips ! + memset( pHeight, 0, sizeof(sal_uInt16) * nCount ); // zuerst einmal ueber den ganzen Bereich // (mit der letzten Spalte in der Hoffnung, dass die am ehesten noch auf @@ -313,13 +313,13 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra, // daraus Standardhoehe suchen, die im unteren Bereich gilt - USHORT nMinHeight = pHeight[nCount-1]; + sal_uInt16 nMinHeight = pHeight[nCount-1]; SCSIZE nPos = nCount-1; while ( nPos && pHeight[nPos-1] >= nMinHeight ) --nPos; SCROW nMinStart = nStartRow + nPos; - ULONG nWeightedCount = 0; + sal_uLong nWeightedCount = 0; for (SCCOL nCol=0; nColGetValue( 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 @@ -398,17 +398,17 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra, return bChanged; } -BOOL ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const +sal_Bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const { - BOOL bFound = FALSE; + sal_Bool bFound = sal_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; } @@ -418,14 +418,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; @@ -434,13 +434,13 @@ BOOL ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const /* vorher: - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCCOL nMaxX = 0; SCROW nMaxY = 0; for (SCCOL i=0; i<=MAXCOL; i++) if (!aCol[i].IsEmpty()) { - bFound = TRUE; + bFound = sal_True; nMaxX = i; SCCOL nColY = aCol[i].GetLastEntryPos(); if (nColY > nMaxY) @@ -454,9 +454,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 = sal_False; SCCOL nMaxX = 0; SCROW nMaxY = 0; SCCOL i; @@ -464,7 +464,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); @@ -479,7 +479,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; @@ -525,10 +525,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 = sal_False; SCCOL nMaxX = 0; SCCOL i; @@ -536,7 +536,7 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow, { if (aCol[i].HasVisibleAttrIn( nStartRow, nEndRow )) { - bFound = TRUE; + bFound = sal_True; nMaxX = i; } } @@ -552,7 +552,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; } @@ -562,10 +562,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 = sal_False; SCROW nMaxY = 0; SCCOL i; @@ -574,7 +574,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; } @@ -583,7 +583,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; @@ -593,9 +593,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 = sal_False; SCCOL nMinX = MAXCOL; SCROW nMinY = MAXROW; SCCOL i; @@ -607,7 +607,7 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const { if (!bFound) nMinX = i; - bFound = TRUE; + bFound = sal_True; if (nFirstRow < nMinY) nMinY = nFirstRow; } @@ -623,14 +623,14 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const } } - BOOL bDatFound = FALSE; + sal_Bool bDatFound = sal_False; for (i=0; i<=MAXCOL; i++) // Daten testen - if (!aCol[i].IsEmptyVisData(TRUE)) + if (!aCol[i].IsEmptyVisData(sal_True)) { if (!bDatFound && i 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 = sal_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; } } } @@ -698,15 +698,15 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S if (rEndRow < MAXROW) { nTest = rEndRow+1; - bFound = FALSE; + bFound = sal_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; } } } @@ -722,19 +722,19 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S --rEndCol; if ( !bTop && rStartRow < MAXROW && rStartRow < rEndRow ) { - bFound = FALSE; + bFound = sal_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 = sal_False; for (i=rStartCol; i<=rEndCol && !bFound; i++) if (aCol[i].HasDataAt(rEndRow)) - bFound = TRUE; + bFound = sal_True; if (!bFound) --rEndRow; } @@ -845,12 +845,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 = sal_False; for (SCCOL i=nStartCol; i<=nEndCol && !bFound; i++) if (aCol[i].HasDataAt(nRow)) - bFound = TRUE; + bFound = sal_True; return !bFound; } @@ -874,20 +874,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( nNewCol + nMovX ); - bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : FALSE; + bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : sal_False; } while (bFnd); nNewCol = sal::static_int_cast( nNewCol - nMovX ); if (nNewCol == (SCsCOL)rCol) - bThere = FALSE; + bThere = sal_False; } if (!bThere) @@ -895,7 +895,7 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY do { nNewCol = sal::static_int_cast( 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); } @@ -909,22 +909,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 sal_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 sal_False; if (bUnprotected && ((const ScProtectionAttr*) GetAttr(nCol,nRow,ATTR_PROTECTION))->GetProtection()) - return FALSE; + return sal_False; if (bMarked || bUnprotected) //! auch sonst ??? { @@ -933,22 +933,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 sal_False; if (ColHidden(nCol)) - return FALSE; + return sal_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 = sal_False; - USHORT nWrap = 0; + sal_uInt16 nWrap = 0; SCsCOL nCol = rCol; SCsROW nRow = rRow; @@ -960,7 +960,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)) ) @@ -1033,9 +1033,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, sal_False ); if ( bUnprotected ) - nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, FALSE ); + nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, sal_False ); pNextRows[nCol] = nNextRow; SCsROW nMinRow = MAXROW+1; @@ -1066,9 +1066,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; @@ -1107,12 +1107,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 sal_False; ++rRow; // naechste Zelle ist gesucht @@ -1121,10 +1121,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, sal_False ); if ( nStart <= MAXROW ) { - SCROW nEnd = rArray.GetMarkEnd( nStart, FALSE ); + SCROW nEnd = rArray.GetMarkEnd( nStart, sal_False ); ScColumnIterator aColIter( &aCol[rCol], nStart, nEnd ); SCROW nCellRow; ScBaseCell* pCell = NULL; @@ -1133,7 +1133,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 @@ -1145,7 +1145,7 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa ++rCol; // naechste Spalte testen } - return FALSE; // alle Spalten durch + return sal_False; // alle Spalten durch } void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, @@ -1173,7 +1173,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 ) { SCCOL i; SCCOL iMax; @@ -1202,7 +1202,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW SCROW nSRow = 0; SCCOL nECol = 0; SCROW nERow = 0; - BOOL bRecalcPages = FALSE; + sal_Bool bRecalcPages = sal_False; for ( ScRangeVec::iterator aIt = aPrintRanges.begin(), aEnd = aPrintRanges.end(); aIt != aEnd; ++aIt ) { @@ -1218,7 +1218,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; } } @@ -1236,7 +1236,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; } @@ -1256,7 +1256,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; } @@ -1295,7 +1295,7 @@ void ScTable::UpdateInsertTab(SCTAB nTable) for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } //UNUSED2008-05 void ScTable::UpdateInsertTabOnlyCells(SCTAB nTable) @@ -1303,7 +1303,7 @@ void ScTable::UpdateInsertTab(SCTAB nTable) //UNUSED2008-05 for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTabOnlyCells(nTable); //UNUSED2008-05 } -void ScTable::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScTable* pRefUndo ) +void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo ) { if (nTab > nTable) nTab--; @@ -1314,7 +1314,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(sal_False); } void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo, @@ -1328,10 +1328,10 @@ void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo, } if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } -void ScTable::UpdateCompile( BOOL bForceIfNameInUse ) +void ScTable::UpdateCompile( sal_Bool bForceIfNameInUse ) { for (SCCOL i=0; i <= MAXCOL; i++) { @@ -1345,17 +1345,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 = sal_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& rIndexes) const + std::set& rIndexes) const { for (SCCOL i = nCol1; i <= nCol2 && ValidCol(i); i++) aCol[i].FindRangeNamesInUse(nRow1, nRow2, rIndexes); @@ -1469,14 +1469,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 = sal_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); @@ -1542,7 +1542,7 @@ void ScTable::SetRepeatColRange( const ScRange* pNew ) SET_PRINTRANGE( pRepeatColRange, pNew ); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } void ScTable::SetRepeatRowRange( const ScRange* pNew ) @@ -1550,26 +1550,26 @@ void ScTable::SetRepeatRowRange( const ScRange* pNew ) SET_PRINTRANGE( pRepeatRowRange, pNew ); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } void ScTable::ClearPrintRanges() { aPrintRanges.clear(); - bPrintEntireSheet = FALSE; + bPrintEntireSheet = sal_False; if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } void ScTable::AddPrintRange( const ScRange& rNew ) { - bPrintEntireSheet = FALSE; + bPrintEntireSheet = sal_False; if( aPrintRanges.size() < 0xFFFF ) aPrintRanges.push_back( rNew ); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } //UNUSED2009-05 void ScTable::SetPrintRange( const ScRange& rNew ) @@ -1583,11 +1583,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 9bb22b68d2ad..426c42979233 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -65,12 +65,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) { @@ -107,22 +107,22 @@ void ScTable::SetSheetEvents( const ScSheetEvents* pNew ) else pSheetEvents = NULL; - SetCalcNotification( FALSE ); // discard notifications before the events were set + SetCalcNotification( sal_False ); // discard notifications before the events were set if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_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); @@ -143,7 +143,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, @@ -182,7 +182,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(); @@ -197,7 +197,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); @@ -226,15 +226,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(MAXCOL) ) - bTest = FALSE; + bTest = sal_False; for (SCCOL i=MAXCOL; (i+static_cast(nSize)>MAXCOL) && bTest; i--) bTest = aCol[i].TestInsertCol(nStartRow, nEndRow); @@ -294,14 +294,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; iDeleteCol( nStartCol, nSize )) if (pUndoOutline) - *pUndoOutline = TRUE; + *pUndoOutline = sal_True; SCCOL nRmSize = nStartCol + static_cast(nSize); mpHiddenCols->removeSegment(nStartCol, nRmSize); @@ -373,7 +373,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; @@ -394,7 +394,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( sal_False ) ); ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern ); } @@ -403,7 +403,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()); @@ -419,7 +419,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( sal_False ) ); SfxItemPoolCache aCache( pPool, &aSet ); ApplySelectionCache( &aCache, rMark ); } @@ -428,7 +428,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)) { @@ -477,8 +477,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; @@ -506,7 +506,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(~CR_MANUALSIZE)); + pRowFlags->AndValue( j, sal::static_int_cast(~CR_MANUALSIZE)); } } @@ -517,7 +517,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( sal_False ) ); ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern ); } } @@ -527,7 +527,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] ); @@ -535,8 +535,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] ); @@ -544,9 +544,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; @@ -569,7 +569,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 ); @@ -622,13 +622,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, sal_False ) == SFX_ITEM_DEFAULT && + rSet.GetItemState( ATTR_MERGE_FLAG, sal_False ) == SFX_ITEM_DEFAULT && + rSet.GetItemState( ATTR_BORDER, sal_False ) == SFX_ITEM_DEFAULT ) { // no borders or merge items involved - use pattern as-is for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++) - pTransClip->SetPattern( static_cast(nRow-nRow1), static_cast(nCol-nCol1), *pPattern, TRUE ); + pTransClip->SetPattern( static_cast(nRow-nRow1), static_cast(nCol-nCol1), *pPattern, sal_True ); } else { @@ -662,7 +662,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 @@ -671,7 +671,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++) pTransClip->SetPattern( static_cast(nRow-nRow1), - static_cast(nCol-nCol1), aNewPattern, TRUE); + static_cast(nCol-nCol1), aNewPattern, sal_True); } } } @@ -718,9 +718,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)) { @@ -736,8 +736,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) { @@ -828,13 +828,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(); @@ -845,7 +845,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, sal_False, pDestTab->aCol[i]); } if (bWidth||bHeight) @@ -875,7 +875,7 @@ void ScTable::CopyUpdated( const ScTable* pPosTab, ScTable* pDestTab ) const void ScTable::InvalidateTableArea() { - bTableAreaValid = FALSE; + bTableAreaValid = sal_False; } void ScTable::InvalidatePageBreaks() @@ -899,7 +899,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" ); @@ -910,7 +910,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" ); @@ -927,16 +927,16 @@ BOOL ScTable::HasScenarioRange( const ScRange& rRange ) const if (pList) { - ULONG nCount = pList->Count(); - for ( ULONG j = 0; j < nCount; j++ ) + sal_uLong nCount = pList->Count(); + for ( sal_uLong j = 0; j < nCount; j++ ) { ScRange* pR = pList->GetObject( j ); if ( pR->Intersects( aTabRange ) ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } void ScTable::InvalidateScenarioRanges() @@ -954,19 +954,19 @@ const ScRangeList* ScTable::GetScenarioRanges() const ((ScTable*)this)->pScenarioRanges = new ScRangeList; ScMarkData aMark; MarkScenarioIn( aMark, 0 ); // immer - aMark.FillRangeListWithMarks( pScenarioRanges, FALSE ); + aMark.FillRangeListWithMarks( pScenarioRanges, sal_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; @@ -984,7 +984,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)) { @@ -1005,7 +1005,7 @@ void ScTable::PutCell( const ScAddress& rPos, ScBaseCell* pCell ) } -//UNUSED2009-05 void ScTable::PutCell( const ScAddress& rPos, ULONG nFormatIndex, ScBaseCell* pCell ) +//UNUSED2009-05 void ScTable::PutCell( const ScAddress& rPos, sal_uLong nFormatIndex, ScBaseCell* pCell ) //UNUSED2009-05 { //UNUSED2009-05 if (pCell) //UNUSED2009-05 aCol[rPos.Col()].Insert( rPos.Row(), nFormatIndex, pCell ); @@ -1014,14 +1014,14 @@ void ScTable::PutCell( const ScAddress& rPos, ScBaseCell* pCell ) //UNUSED2009-05 } -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, SvNumberFormatter* pFormatter, bool bDetectNumberFormat ) { if (ValidColRow(nCol,nRow)) return aCol[nCol].SetString( nRow, nTabP, rString, pDocument->GetAddressConvention(), pFormatter, bDetectNumberFormat ); else - return FALSE; + return sal_False; } @@ -1059,7 +1059,7 @@ double ScTable::GetValue( SCCOL nCol, SCROW nRow ) void ScTable::GetFormula( SCCOL nCol, SCROW nRow, String& rFormula, - BOOL bAsciiExport ) + sal_Bool bAsciiExport ) { if (ValidColRow(nCol,nRow)) aCol[nCol].GetFormula( nRow, rFormula, bAsciiExport ); @@ -1156,46 +1156,46 @@ 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 sal_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 sal_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 sal_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 sal_False; } -//UNUSED2008-05 USHORT ScTable::GetErrCode( SCCOL nCol, SCROW nRow ) const +//UNUSED2008-05 sal_uInt16 ScTable::GetErrCode( SCCOL nCol, SCROW nRow ) const //UNUSED2008-05 { //UNUSED2008-05 if (ValidColRow( nCol, nRow )) //UNUSED2008-05 return aCol[nCol].GetErrCode( nRow ); @@ -1212,8 +1212,8 @@ void ScTable::SetDirtyVar() void ScTable::SetDirty() { - BOOL bOldAutoCalc = pDocument->GetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].SetDirty(); pDocument->SetAutoCalc( bOldAutoCalc ); @@ -1222,8 +1222,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( sal_False ); // Mehrfachberechnungen vermeiden SCCOL nCol2 = rRange.aEnd.Col(); for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++) aCol[i].SetDirty( rRange ); @@ -1233,8 +1233,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( sal_False ); // no multiple recalculation SCCOL nCol2 = rRange.aEnd.Col(); for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++) aCol[i].SetTableOpDirty( rRange ); @@ -1244,8 +1244,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( sal_False ); // Mehrfachberechnungen vermeiden for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].SetDirtyAfterLoad(); pDocument->SetAutoCalc( bOldAutoCalc ); @@ -1254,8 +1254,8 @@ void ScTable::SetDirtyAfterLoad() void ScTable::SetRelNameDirty() { - BOOL bOldAutoCalc = pDocument->GetAutoCalc(); - pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDocument->GetAutoCalc(); + pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].SetRelNameDirty(); pDocument->SetAutoCalc( bOldAutoCalc ); @@ -1312,7 +1312,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 ); @@ -1321,7 +1321,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 } -//UNUSED2009-05 BOOL ScTable::HasLines( const ScRange& rRange, Rectangle& rSizes ) const +//UNUSED2009-05 sal_Bool ScTable::HasLines( const ScRange& rRange, Rectangle& rSizes ) const //UNUSED2009-05 { //UNUSED2009-05 SCCOL nCol1 = rRange.aStart.Col(); //UNUSED2009-05 SCROW nRow1 = rRange.aStart.Row(); @@ -1369,34 +1369,34 @@ bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH //UNUSED2009-05 PutInOrder( nCol1, nCol2 ); //UNUSED2009-05 PutInOrder( nRow1, nRow2 ); //UNUSED2009-05 -//UNUSED2009-05 BOOL bFound = FALSE; +//UNUSED2009-05 sal_Bool bFound = sal_False; //UNUSED2009-05 for (SCCOL i=nCol1; i<=nCol2; i++) //UNUSED2009-05 if (aCol[i].HasLines( nRow1, nRow2, rSizes, (i==nCol1), (i==nCol2) )) -//UNUSED2009-05 bFound = TRUE; +//UNUSED2009-05 bFound = sal_True; //UNUSED2009-05 //UNUSED2009-05 return bFound; //UNUSED2009-05 } -BOOL ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const +sal_Bool ScTable::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const { - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; for (SCCOL i=0; i<=MAXCOL && !bFound; i++) bFound |= aCol[i].HasAttribSelection( rMark, nMask ); return bFound; } -BOOL ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow, +sal_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))) { DBG_ERRORFILE("ScTable::ExtendMerge: invalid column number"); - return FALSE; + return sal_False; } - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; SCCOL nOldEndX = rEndCol; SCROW nOldEndY = rEndRow; for (SCCOL i=nStartCol; i<=nOldEndX; i++) @@ -1405,14 +1405,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 sal_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; @@ -1424,10 +1424,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 @@ -1455,7 +1455,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? @@ -1469,7 +1469,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO nWidth += GetColWidth( nTouchedCol ); } if ( nTouchedCol > nX2 ) - bHitOne = FALSE; + bHitOne = sal_False; } if (bHitOne) @@ -1512,13 +1512,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) @@ -1526,8 +1526,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; nEntryCount(); + for (sal_uInt16 nEntry=0; nEntryGetEntry(nEntry)->GetStyle(); if (aStyleName.Len()) @@ -1557,62 +1557,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 = sal_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 = sal_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 = sal_False; for ( SCCOL i=nCol1; i<=nCol2; i++) { nEdges = aCol[i].GetBlockMatrixEdges( nR, nR, n ); @@ -1621,61 +1621,61 @@ 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 = sal_False; // rechte Kante schliesst } } if ( bOpen ) - return TRUE; // es geht noch weiter + return sal_True; // es geht noch weiter } } - return FALSE; + return sal_False; } -BOOL ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const +sal_Bool ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const { - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; for (SCCOL i=0; i<=MAXCOL && !bFound; i++) bFound |= aCol[i].HasSelectionMatrixFragment(rMark); return bFound; } -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 = sal_False; + return sal_False; } - BOOL bIsEditable = TRUE; + sal_Bool bIsEditable = sal_True; if ( nLockCount ) - bIsEditable = FALSE; + bIsEditable = sal_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 )) != sal_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; @@ -1699,7 +1699,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); } @@ -1709,46 +1709,46 @@ BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, { if ( HasBlockMatrixFragment( nCol1, nRow1, nCol2, nRow2 ) ) { - bIsEditable = FALSE; + bIsEditable = sal_False; if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = TRUE; + *pOnlyNotBecauseOfMatrix = sal_True; } else if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = FALSE; + *pOnlyNotBecauseOfMatrix = sal_False; } else if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = FALSE; + *pOnlyNotBecauseOfMatrix = sal_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 = sal_False; else if ( IsProtected() && !pDocument->IsScenario(nTab) ) { - if((bIsEditable = !HasAttribSelection( rMark, HASATTR_PROTECTED )) != FALSE) + if((bIsEditable = !HasAttribSelection( rMark, HASATTR_PROTECTED )) != sal_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 ); - ULONG nRangeCount = aRanges.Count(); + rMark.FillRangeListWithMarks( &aRanges, sal_False ); + sal_uLong nRangeCount = aRanges.Count(); SCTAB nScenTab = nTab+1; while(pDocument->IsScenario(nScenTab) && bIsEditable) { if(pDocument->IsActiveScenario(nScenTab)) { - for (ULONG i=0; iHasScenarioRange(nScenTab, aRange)) { - USHORT nFlags; + sal_uInt16 nFlags; pDocument->GetScenarioFlags(nScenTab,nFlags); bIsEditable = !((nFlags & SC_SCENARIO_PROTECT) && (nFlags & SC_SCENARIO_TWOWAY)); } @@ -1771,14 +1771,14 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark, if(pDocument->IsTabProtected(nActualTab)) { ScRangeList aRanges; - rMark.FillRangeListWithMarks( &aRanges, FALSE ); - ULONG nRangeCount = aRanges.Count(); - for (ULONG i=0; iHasScenarioRange(nTab, aRange)) { - USHORT nFlags; + sal_uInt16 nFlags; pDocument->GetScenarioFlags(nTab,nFlags); bIsEditable = !(nFlags & SC_SCENARIO_PROTECT); } @@ -1789,15 +1789,15 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark, { if ( HasSelectionMatrixFragment( rMark ) ) { - bIsEditable = FALSE; + bIsEditable = sal_False; if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = TRUE; + *pOnlyNotBecauseOfMatrix = sal_True; } else if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = FALSE; + *pOnlyNotBecauseOfMatrix = sal_False; } else if ( pOnlyNotBecauseOfMatrix ) - *pOnlyNotBecauseOfMatrix = FALSE; + *pOnlyNotBecauseOfMatrix = sal_False; return bIsEditable; } @@ -1820,7 +1820,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 ); @@ -1828,7 +1828,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 ); @@ -1921,7 +1921,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; @@ -1940,12 +1940,12 @@ 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 = sal_False; - BOOL bEqual = TRUE; - BOOL bColFound; + sal_Bool bEqual = sal_True; + sal_Bool bColFound; const ScStyleSheet* pStyle = NULL; const ScStyleSheet* pNewStyle; @@ -1956,9 +1956,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 = sal_False; // unterschiedliche pStyle = pNewStyle; } } @@ -1967,13 +1967,13 @@ 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 = sal_False; - BOOL bEqual = TRUE; - BOOL bColFound; + sal_Bool bEqual = sal_True; + sal_Bool bColFound; const ScStyleSheet* pStyle = NULL; const ScStyleSheet* pNewStyle; @@ -1983,9 +1983,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 = sal_False; // unterschiedliche pStyle = pNewStyle; } } @@ -1994,17 +1994,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 = sal_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; } } @@ -2012,7 +2012,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 ) @@ -2031,17 +2031,17 @@ 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, sal_False); nRow = nEndRow + 1; } } -BOOL ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - INT16 nFlags ) +sal_Bool ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, + sal_Int16 nFlags ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow)) for (SCCOL i = nStartCol; i <= nEndCol; i++) bChanged |= aCol[i].ApplyFlags(nStartRow, nEndRow, nFlags); @@ -2049,10 +2049,10 @@ BOOL ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW } -BOOL ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - INT16 nFlags ) +sal_Bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, + sal_Int16 nFlags ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow)) for (SCCOL i = nStartCol; i <= nEndCol; i++) bChanged |= aCol[i].RemoveFlags(nStartRow, nEndRow, nFlags); @@ -2060,7 +2060,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 ); @@ -2081,14 +2081,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 ); @@ -2097,7 +2097,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) { @@ -2127,7 +2127,7 @@ void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth ) } -void ScTable::SetRowHeight( SCROW nRow, USHORT nNewHeight ) +void ScTable::SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight ) { if (VALIDROW(nRow) && mpRowHeights) { @@ -2191,10 +2191,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 = sal_False; if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights) { IncRecalcLevel(); @@ -2205,18 +2205,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 = sal_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 = sal_False; // no difference in this range } if (bSingle) { @@ -2246,9 +2246,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 @@ -2282,7 +2282,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; @@ -2293,14 +2293,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(~CR_MANUALSIZE)); + pRowFlags->AndValue( nStartRow, nEndRow, sal::static_int_cast(~CR_MANUALSIZE)); } else { @@ -2309,7 +2309,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"); @@ -2321,22 +2321,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) @@ -2346,8 +2346,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 ) { @@ -2356,8 +2356,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 ) { @@ -2383,7 +2383,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"); @@ -2421,18 +2421,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) { @@ -2448,17 +2448,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) { @@ -2468,25 +2468,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(nThisHeight * fScale); + nHeight += static_cast(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; } @@ -2637,7 +2637,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow) if (nEndRow > nRow2) nEndRow = nRow2; - BOOL bChanged = ( bWasVis != bShow ); + sal_Bool bChanged = ( bWasVis != bShow ); if ( bChanged ) { ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer(); @@ -2686,7 +2686,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow) if (nEndRow > nRow2) nEndRow = nRow2; - BOOL bChanged = ( bWasVis != bShow ); + sal_Bool bChanged = ( bWasVis != bShow ); if ( bChanged ) { ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer(); @@ -2719,7 +2719,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; @@ -2730,7 +2730,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); @@ -2741,7 +2741,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); @@ -2752,7 +2752,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]; @@ -2761,7 +2761,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); @@ -2775,7 +2775,7 @@ SCROW ScTable::GetLastFlaggedRow() const SCROW nLastFound = 0; if (pRowFlags) { - SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast(CR_ALL) ); + SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast(CR_ALL) ); if (ValidRow(nRow)) nLastFound = nRow; } @@ -2833,24 +2833,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 sal_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 sal_False; } @@ -2924,13 +2924,13 @@ short DiffSign( T a, T b ) void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) { - BOOL bSizeChanged = FALSE; - BOOL bMissed = FALSE; + sal_Bool bSizeChanged = sal_False; + sal_Bool bMissed = sal_False; SCCOL nCol; SCROW nRow; SCROW i; - BOOL bFound; + sal_Bool bFound; ScOutlineArray* pArray; ScBaseCell* pCell; ScRange aRef; @@ -2943,9 +2943,9 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC // Zeilen SCROW nCount = nEndRow-nStartRow+1; - BOOL* pUsed = new BOOL[nCount]; + sal_Bool* pUsed = new sal_Bool[nCount]; for (i=0; iInsert( aRef.aStart.Row(), aRef.aEnd.Row(), bSizeChanged )) { // ApplyPatternArea( nStartCol, nRow, nEndCol, nRow, aBoldPattern ); - bFound = TRUE; + bFound = sal_True; } else - bMissed = TRUE; + bMissed = sal_True; } } } @@ -2987,7 +2987,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC { if (!aCol[nCol].IsEmptyData()) { - bFound = FALSE; + bFound = sal_False; ScColumnIterator aIter( &aCol[nCol], nStartRow, nEndRow ); while ( aIter.Next( nRow, pCell ) && !bFound ) { @@ -3001,10 +3001,10 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC if (pArray->Insert( aRef.aStart.Col(), aRef.aEnd.Col(), bSizeChanged )) { // ApplyPatternArea( nCol, nStartRow, nCol, nEndRow, aBoldPattern ); - bFound = TRUE; + bFound = sal_True; } else - bMissed = TRUE; + bMissed = sal_True; } } } @@ -3021,7 +3021,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++) { @@ -3048,12 +3048,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; @@ -3063,7 +3063,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; @@ -3077,12 +3077,12 @@ BOOL ScTable::RefVisible(ScFormulaCell* pCell) nEndRow = ::std::numeric_limits::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 sal_False; // completely invisible } } - return TRUE; // irgendwie anders + return sal_True; // irgendwie anders } @@ -3119,13 +3119,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(sal_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) @@ -3146,7 +3146,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; @@ -3173,9 +3173,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 bd6a2c92c442..458630d2ebde 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -64,7 +64,7 @@ // STATIC DATA ----------------------------------------------------------- -const USHORT nMaxSorts = 3; // maximale Anzahl Sortierkriterien in aSortParam +const sal_uInt16 nMaxSorts = 3; // maximale Anzahl Sortierkriterien in aSortParam struct ScSortInfo { @@ -72,7 +72,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 ----------------------------------------------------- @@ -84,14 +84,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++ ) @@ -101,7 +101,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++ ) @@ -109,13 +109,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(nInd1 - nStart); SCSIZE n2 = static_cast(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]; @@ -123,7 +123,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; } @@ -131,13 +131,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(aSortParam.nField[nSort]); ScColumn* pCol = &aCol[nCol]; @@ -152,7 +152,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(nInd1); @@ -168,7 +168,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 ) } -BOOL ScTable::IsSortCollatorGlobal() const +sal_Bool ScTable::IsSortCollatorGlobal() const { return pSortCollator == ScGlobal::GetCollator() || pSortCollator == ScGlobal::GetCaseCollator(); @@ -206,7 +206,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(); @@ -237,7 +237,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 ) { @@ -261,12 +261,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 = sal_False; + sal_Bool bStr2 = ( eType2 != CELLTYPE_VALUE ); if ( eType2 == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell2)->IsValue() ) - bStr2 = FALSE; + bStr2 = sal_False; if ( bStr1 && bStr2 ) // nur Strings untereinander als String vergleichen! { @@ -280,7 +280,7 @@ short ScTable::CompareCell( USHORT nSort, ((ScStringCell*)pCell2)->GetString(aStr2); else GetString(nCell2Col, nCell2Row, aStr2); - BOOL bUserDef = aSortParam.bUserDef; + sal_Bool bUserDef = aSortParam.bUserDef; if (bUserDef) { ScUserListData* pData = @@ -294,7 +294,7 @@ short ScTable::CompareCell( USHORT nSort, nRes = sal::static_int_cast( pData->ICompare(aStr1, aStr2) ); } else - bUserDef = FALSE; + bUserDef = sal_False; } if (!bUserDef) @@ -344,7 +344,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 ); @@ -423,8 +423,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); } } } @@ -441,8 +441,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); } } } @@ -463,7 +463,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 @@ -488,14 +488,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 0) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } void ScTable::DecoladeRow( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2 ) @@ -509,7 +509,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 ); @@ -564,7 +564,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 @@ -575,7 +575,7 @@ BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam ) SCROW nRow; ScBaseCell* pCell; - BOOL bWillDelete = FALSE; + sal_Bool bWillDelete = sal_False; for ( nCol=nStartCol; nCol<=nEndCol && !bWillDelete; nCol++ ) { ScColumnIterator aIter( &aCol[nCol],nStartRow,nEndRow ); @@ -587,7 +587,7 @@ BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam ) for (SCCOL nTestCol=0; nTestCol<=MAXCOL; nTestCol++) if (nTestColnEndCol) if (aCol[nTestCol].HasDataAt(nRow)) - bWillDelete = TRUE; + bWillDelete = sal_True; } } } @@ -632,14 +632,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, sal_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 ); } } @@ -647,7 +647,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; @@ -657,13 +657,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#) @@ -671,16 +671,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 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; iGetStyleSheetPool()->Find( ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA ); - BOOL bSpaceLeft = TRUE; // Erfolg beim Einfuegen? + sal_Bool bSpaceLeft = sal_True; // Erfolg beim Einfuegen? // #90279# For performance reasons collect formula entries so their // references don't have to be tested for updates each time a new row is @@ -712,9 +712,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 @@ -733,16 +733,16 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam ) *pCompString[i] = aSubString; } // aSubString bleibt auf dem letzten stehen - BOOL bBlockVis = FALSE; // Gruppe eingeblendet? + sal_Bool bBlockVis = sal_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 = sal_False; if (!bTotal) { String aString; @@ -765,7 +765,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam ) { if ( iEntry->nDestRow == nRow ) { - bChanged = FALSE; + bChanged = sal_False; break; } } @@ -781,7 +781,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam ) bSpaceLeft = pDocument->InsertRow( 0, nTab, MAXCOL, nTab, aRowEntry.nDestRow, 1 ); DBShowRow( aRowEntry.nDestRow, bBlockVis ); - bBlockVis = FALSE; + bBlockVis = sal_False; if ( rParam.bPagebreak && nRow < MAXROW && aRowEntry.nSubStartRow != nStartRow && nLevel == 0) SetRowBreak(aRowEntry.nSubStartRow, false, true); @@ -812,7 +812,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] ) { @@ -915,25 +915,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 ? @@ -946,8 +946,8 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam, if ( !pCell || i > 0 ) pCell = GetCell( static_cast(rEntry.nField), nRow ); - BOOL bOk = FALSE; - BOOL bTestEqual = FALSE; + sal_Bool bOk = sal_False; + sal_Bool bTestEqual = sal_False; if ( pSpecial && pSpecial[i] ) { @@ -1049,24 +1049,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 = sal_False; if ( pCell ) { if (pCell->GetCellType() != CELLTYPE_NOTE) { - ULONG nFormat = GetNumberFormat( static_cast(rEntry.nField), nRow ); + sal_uLong nFormat = GetNumberFormat( static_cast(rEntry.nField), nRow ); ScCellFormat::GetInputString( pCell, nFormat, aCellStr, *(pDocument->GetFormatTable()) ); } } else GetInputString( static_cast(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 ) @@ -1075,22 +1075,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 = sal_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 = sal_False; // RegExp must match entire cell string if ( bRealRegExp ) switch (rEntry.eOp) { @@ -1134,7 +1134,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 = sal_False; if ( rEntry.eOp == SC_NOT_EQUAL ) bOk = !bOk; } @@ -1221,14 +1221,14 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam, (pCell ? pCell->HasValueData() : HasValueData( static_cast(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(rEntry.nField), nRow))) { - bOk = TRUE; + bOk = sal_True; } } @@ -1261,7 +1261,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 ) @@ -1274,7 +1274,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam, void ScTable::TopTenQuery( ScQueryParam& rParam ) { - BOOL bSortCollatorInitialized = FALSE; + sal_Bool bSortCollatorInitialized = sal_False; SCSIZE nEntryCount = rParam.GetEntryCount(); SCROW nRow1 = (rParam.bHasHeader ? rParam.nRow1 + 1 : rParam.nRow1); SCSIZE nCount = static_cast(rParam.nRow2 - nRow1 + 1); @@ -1292,7 +1292,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 ); @@ -1312,7 +1312,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam ) { if ( rEntry.bQueryByString ) { // dat wird nix - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = 10; // 10 bzw. 10% } SCSIZE nVal = (rEntry.nVal >= 1 ? static_cast(rEntry.nVal) : 1); @@ -1378,7 +1378,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam ) else { rEntry.eOp = SC_GREATER_EQUAL; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = 0; } delete pArray; @@ -1394,14 +1394,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] = sal_False; ScQueryEntry& rEntry = rParam.GetEntry(i); if ( rEntry.bDoQuery ) { @@ -1433,7 +1433,7 @@ static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPa // #58736# 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 ) @@ -1462,14 +1462,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 = sal_False; + sal_Bool bOldResult = sal_True; SCROW nOldStart = 0; SCROW nOldEnd = 0; @@ -1478,7 +1478,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) @@ -1491,8 +1491,8 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub) for (SCROW j=aParam.nRow1 + nHeader; j<=aParam.nRow2; 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++) @@ -1503,13 +1503,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; @@ -1522,20 +1522,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 = sal_False; } } } else - bResult = FALSE; + bResult = sal_False; if (aParam.bInplace) { @@ -1548,7 +1548,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub) nOldStart = nOldEnd = j; bOldResult = bResult; } - bStarted = TRUE; + bStarted = sal_True; } else { @@ -1570,9 +1570,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; @@ -1585,7 +1585,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow { String aQueryStr; GetUpperCellString(nCol, nRow1, aQueryStr); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCCOL i = rQueryParam.nCol1; while (!bFound && (i <= nDBCol2)) { @@ -1599,12 +1599,12 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow if (bFound) pFields[nCol - nCol1] = i; else - bValid = FALSE; + bValid = sal_False; nCol++; } if (bValid) { - ULONG nVisible = 0; + sal_uLong nVisible = 0; for ( nCol=nCol1; nCol<=nCol2; nCol++ ) nVisible += aCol[nCol].VisibleCount( nRow1+1, nRow2 ); @@ -1637,7 +1637,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow rQueryParam.GetEntry(nIndex).eConnect = SC_AND; } else - bValid = FALSE; + bValid = sal_False; } nCol++; } @@ -1650,7 +1650,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 ... @@ -1661,10 +1661,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 sal_False; - BOOL bValid; - BOOL bFound; + sal_Bool bValid; + sal_Bool bFound; String aCellStr; SCSIZE nIndex = 0; SCROW nRow = nRow1; @@ -1680,7 +1680,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 { ScQueryEntry& rEntry = rQueryParam.GetEntry(nIndex); - bValid = FALSE; + bValid = sal_False; // Erste Spalte UND/ODER if (nIndex > 0) { @@ -1688,18 +1688,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 = sal_False; GetUpperCellString(nCol1 + 1, nRow, aCellStr); for (SCCOL i=rQueryParam.nCol1; (i <= nDBCol2) && (!bFound); i++) { @@ -1712,16 +1712,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 = sal_False; } } // Dritte Spalte Operator =<>... if (bValid) { - bFound = FALSE; + bFound = sal_False; GetUpperCellString(nCol1 + 2, nRow, aCellStr); if (aCellStr.GetChar(0) == '<') { @@ -1747,7 +1747,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++; @@ -1756,7 +1756,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); @@ -1767,7 +1767,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); @@ -1777,7 +1777,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 { @@ -1788,26 +1788,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 sal_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 sal_False; } - return TRUE; + return sal_True; } void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates) @@ -1832,7 +1832,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 ) @@ -1849,7 +1849,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 ); } @@ -1859,9 +1859,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(); @@ -1869,9 +1869,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 @@ -1880,9 +1880,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 @@ -1915,7 +1915,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: @@ -1935,7 +1935,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 434144d06e00..5c7c872f6c64 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -85,11 +85,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() ) { @@ -144,7 +144,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... @@ -165,8 +165,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) @@ -189,8 +189,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" ); @@ -225,8 +225,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) @@ -259,8 +259,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); - BOOL bVal = TRUE; - for (USHORT i=1; iGetCellType() == CELLTYPE_VALUE) @@ -270,7 +270,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if ( eType == FILL_DAY ) { if ( aDate2-aDate1 != nCmpInc ) - bVal = FALSE; + bVal = sal_False; } else { @@ -278,14 +278,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 = sal_False; } aDate1 = aDate2; nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); } else - bVal = FALSE; // #50965# kein Datum passt auch nicht + bVal = sal_False; // #50965# kein Datum passt auch nicht } if (bVal) { @@ -316,8 +316,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, rInc = nVal2 - nVal1; nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); - BOOL bVal = TRUE; - for (USHORT i=1; iGetCellType() == CELLTYPE_VALUE) @@ -325,11 +325,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 = sal_False; nVal1 = nVal2; } else - bVal = FALSE; + bVal = sal_False; nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); } @@ -348,7 +348,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, rListData->GetSubIndex(aStr, rListIndex); nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); - for (USHORT i=1; iGetSubIndex(aStr, rListIndex)) @@ -374,8 +374,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, rInc = (double)nVal2 - (double)nVal1; nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); - BOOL bVal = TRUE; - for (USHORT i=1; iGetCellType() : CELLTYPE_NONE; @@ -390,14 +390,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 = sal_False; nVal1 = nVal2; } else - bVal = FALSE; + bVal = sal_False; } else - bVal = FALSE; + bVal = sal_False; nCol = sal::static_int_cast( nCol + nAddX ); nRow = sal::static_int_cast( nRow + nAddY ); } @@ -415,10 +415,10 @@ 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 ) { -/* USHORT nTokArrLen = pSrcCell->GetTokenArrayLen(); +/* sal_uInt16 nTokArrLen = pSrcCell->GetTokenArrayLen(); if ( nTokArrLen > 15 ) // mehr als =A1 oder =67 { ScRangeName* pRangeName = pDocument->GetRangeName(); @@ -437,9 +437,9 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor if (!pRangeName->Insert( pAktRange )) delete pAktRange; else - bSharedNameInserted = TRUE; + bSharedNameInserted = sal_True; } - USHORT nIndex; + sal_uInt16 nIndex; pRangeName->SearchName(aName, nIndex); if (!pRangeName) { @@ -456,7 +456,7 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor } else */ { - pDocument->SetNoListening( TRUE ); // noch falsche Referenzen + pDocument->SetNoListening( sal_True ); // noch falsche Referenzen ScAddress aAddr( nDestCol, nDestRow, nTab ); ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell, *pDocument, aAddr ); aCol[nDestCol].Insert(nDestRow, pDestCell); @@ -497,13 +497,13 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor DBG_ERRORFILE( "FillFormula: kein MatrixOrigin" ); } } - pDocument->SetNoListening( FALSE ); + pDocument->SetNoListening( sal_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; @@ -512,19 +512,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) { @@ -564,32 +564,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(nIMin), nCol2, static_cast(nIMax), IDF_AUTOFILL); else DeleteArea(static_cast(nIMin), nRow1, static_cast(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 { @@ -601,12 +601,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, pSrcPattern = aCol[nCol].GetPattern(static_cast(nAtSrc)); else // rInner&:=nCol, rOuter&:=nRow pSrcPattern = aCol[nAtSrc].GetPattern(static_cast(nRow)); - bGetPattern = FALSE; + bGetPattern = sal_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, sal_False) == SFX_ITEM_SET + || rSet.GetItemState(ATTR_MERGE_FLAG, sal_False) == SFX_ITEM_SET ) { pNewPattern = new ScPatternAttr( *pSrcPattern ); SfxItemSet& rNewSet = pNewPattern->GetItemSet(); @@ -654,18 +654,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; @@ -679,9 +679,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(nCol),nRow1, static_cast(nCol),nRow2, eFillCmd,eDateCmd, @@ -696,12 +696,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(nSource) ); else // rInner&:=nCol, rOuter&:=nRow pSrcCell = aCol[nSource].GetCell( static_cast(nRow) ); - bGetCell = FALSE; + bGetCell = sal_False; if ( pSrcCell ) { eCellType = pSrcCell->GetCellType(); @@ -859,7 +859,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) ) { @@ -869,17 +869,17 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nDelta -= 1.0; } nFormulaCounter = nActFormCnt; - bFirst = FALSE; + bFirst = sal_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, @@ -902,12 +902,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (bVertical) FillSeries( static_cast(nCol), nRow1, static_cast(nCol), nRow2, nFillCount, eFillDir, - eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, FALSE, + eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, sal_False, rProgress ); else FillSeries( nCol1, static_cast(nRow), nCol2, static_cast(nRow), nFillCount, eFillDir, - eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, FALSE, + eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, sal_False, rProgress ); nProgress = rProgress.GetState(); } @@ -924,12 +924,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 = sal_False; else if ( nEndX == nCol2 ) // nach oben/unten { nEndX = nCol2 = nCol1; // nur erste Spalte ansehen @@ -951,29 +951,29 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n eFillDir = FILL_TO_LEFT; } else // Richtung nicht eindeutig - bOk = FALSE; + bOk = sal_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(nSub) ) nIndex += nListCount; - ULONG nPos = ( nListIndex + nIndex - nSub ) % nListCount; - aValue = pListData->GetSubStr(sal::static_int_cast(nPos)); + sal_uLong nPos = ( nListIndex + nIndex - nSub ) % nListCount; + aValue = pListData->GetSubStr(sal::static_int_cast(nPos)); } } else if ( eFillCmd == FILL_SIMPLE ) // Auffuellen mit Muster @@ -981,7 +981,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 ) @@ -1011,7 +1011,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 ) { @@ -1033,7 +1033,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 ); } @@ -1048,7 +1048,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; @@ -1092,8 +1092,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; @@ -1121,7 +1121,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 ); } @@ -1136,7 +1136,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) { @@ -1145,8 +1145,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(); @@ -1208,8 +1208,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 ) ); } @@ -1224,7 +1224,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: @@ -1237,26 +1237,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) { @@ -1299,25 +1299,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(nIMin), nCol2, static_cast(nIMax), nDel); else DeleteArea(static_cast(nIMin), nRow1, static_cast(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(nRow)); @@ -1329,10 +1329,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScPatternAttr* pSrcPattern = aCol[nCol].GetPattern(static_cast(nRow)); if (bVertical) aCol[nCol].SetPatternArea( static_cast(nIMin), - static_cast(nIMax), *pSrcPattern, TRUE ); + static_cast(nIMax), *pSrcPattern, sal_True ); else for (SCCOL nAtCol = static_cast(nIMin); nAtCol <= sal::static_int_cast(nIMax); nAtCol++) - aCol[nAtCol].SetPattern(static_cast(nRow), *pSrcPattern, TRUE); + aCol[nAtCol].SetPattern(static_cast(nRow), *pSrcPattern, sal_True); } if (pSrcCell) @@ -1345,10 +1345,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, { for (rInner = nIMin; rInner <= nIMax; rInner++) { - ULONG nInd = nActFormCnt; + sal_uLong nInd = nActFormCnt; FillFormula(nInd, bFirst, (ScFormulaCell*)pSrcCell, static_cast(nCol), nRow, (rInner == nIEnd) ); - bFirst = FALSE; + bFirst = sal_False; rProgress.SetStateOnPercent( ++nProgress ); } } @@ -1373,10 +1373,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 = sal_False; + sal_Bool bOverflow = sal_False; - USHORT nDayOfMonth = 0; + sal_uInt16 nDayOfMonth = 0; rInner = nIStart; while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes { @@ -1392,16 +1392,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; @@ -1416,7 +1416,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 @@ -1424,7 +1424,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (nVal < nMaxValue) { nVal = nMaxValue; - bOverflow = TRUE; + bOverflow = sal_True; } } } @@ -1458,17 +1458,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 = sal_False; + sal_Bool bOverflow = sal_False; - BOOL bIsOrdinalSuffix = aValue.Equals( ScGlobal::GetOrdinalSuffix( + sal_Bool bIsOrdinalSuffix = aValue.Equals( ScGlobal::GetOrdinalSuffix( (sal_Int32)nStartVal)); rInner = nIStart; @@ -1486,12 +1486,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: { @@ -1504,7 +1504,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 @@ -1512,7 +1512,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (nVal < nMaxValue) { nVal = nMaxValue; - bOverflow = TRUE; + bOverflow = sal_True; } } } @@ -1557,10 +1557,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 @@ -1569,13 +1569,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 = sal_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( @@ -1584,7 +1584,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) @@ -1600,7 +1600,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)) { @@ -1619,7 +1619,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 @@ -1741,9 +1741,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 ); } @@ -1754,7 +1754,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); @@ -1886,7 +1886,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 ); @@ -1898,7 +1898,7 @@ void ScTable::UpdateInsertTabAbs(SCTAB nTable) aCol[i].UpdateInsertTabAbs(nTable); } -//UNUSED2008-05 USHORT ScTable::GetErrorData( SCCOL nCol, SCROW nRow ) const +//UNUSED2008-05 sal_uInt16 ScTable::GetErrorData( SCCOL nCol, SCROW nRow ) const //UNUSED2008-05 { //UNUSED2008-05 if (ValidColRow(nCol,nRow)) //UNUSED2008-05 return aCol[nCol].GetErrorData( nRow ); @@ -1906,7 +1906,7 @@ void ScTable::UpdateInsertTabAbs(SCTAB nTable) //UNUSED2008-05 return 0; //UNUSED2008-05 } -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 @@ -1924,17 +1924,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 = sal_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++; @@ -1942,10 +1942,10 @@ BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel, } } else - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } void ScTable::RemoveAutoSpellObj() @@ -1954,12 +1954,12 @@ void ScTable::RemoveAutoSpellObj() aCol[i].RemoveAutoSpellObj(); } -BOOL ScTable::TestTabRefAbs(SCTAB nTable) +sal_Bool ScTable::TestTabRefAbs(SCTAB nTable) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; for (SCCOL i=0; i <= MAXCOL; i++) if (aCol[i].TestTabRefAbs(nTable)) - bRet = TRUE; + bRet = sal_True; return bRet; } @@ -1968,12 +1968,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 7c13756aab38..0548e3ce0abd 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -106,7 +106,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) } else { - USHORT nAreaCount = GetPrintRangeCount(); + sal_uInt16 nAreaCount = GetPrintRangeCount(); if ( nAreaCount > 1 ) { // bei mehreren Bereichen nichts anzeigen: @@ -136,13 +136,13 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) bool bSkipColBreaks = false; bool bSkipRowBreaks = false; - if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE, &pItem ) == SFX_ITEM_SET ) + if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, sal_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, sal_False, &pItem) == SFX_ITEM_SET ) { // #i54993# when fitting to width or height, ignore only manual breaks in that direction const ScPageScaleToItem* pScaleToItem = static_cast(pItem); @@ -170,24 +170,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 = sal_False; long nSizeX = 0; for (nX=nStartCol; nX<=nEndCol; nX++) { - BOOL bStartOfPage = FALSE; + sal_Bool bStartOfPage = sal_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 ) { @@ -196,7 +196,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; @@ -206,15 +206,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 = sal_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 = sal_False; bool bThisRowHidden = false; aIterHidden.getValue(nY, bThisRowHidden); long nThisY = 0; @@ -238,12 +238,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 ) { @@ -256,7 +256,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) nPageSizeY -= nHeights; if (nY <= nRepeatEndY) RemoveRowPageBreaks(nY, nRepeatEndY); - bRowFound = TRUE; + bRowFound = sal_True; } if (bThisRowHidden) @@ -318,10 +318,10 @@ void ScTable::RemoveManualBreaks() InvalidatePageBreaks(); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } -BOOL ScTable::HasManualBreaks() const +sal_Bool ScTable::HasManualBreaks() const { return !maRowManualBreaks.empty() || !maColManualBreaks.empty(); } @@ -331,7 +331,7 @@ void ScTable::SetRowManualBreaks( const ::std::set& rBreaks ) maRowManualBreaks = rBreaks; InvalidatePageBreaks(); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } void ScTable::SetColManualBreaks( const ::std::set& rBreaks ) @@ -339,7 +339,7 @@ void ScTable::SetColManualBreaks( const ::std::set& rBreaks ) maColManualBreaks = rBreaks; InvalidatePageBreaks(); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } void ScTable::GetAllRowBreaks(set& rBreaks, bool bPage, bool bManual) const @@ -935,13 +935,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(~nFlagMask)); + pRowFlags->AndValue(0, MAXROW, static_int_cast(~nFlagMask)); for (SCCOL i = 0; i <= MAXCOL; ++i) - pColFlags[i] &= static_int_cast(~nFlagMask); + pColFlags[i] &= static_int_cast(~nFlagMask); { // row hidden flags. @@ -954,7 +954,7 @@ void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, ScFlatBoolRowSegments& r break; if (aData.mbValue) - pRowFlags->OrValue(nRow, aData.mnRow2, static_int_cast(nFlagMask)); + pRowFlags->OrValue(nRow, aData.mnRow2, static_int_cast(nFlagMask)); nRow = aData.mnRow2 + 1; } @@ -988,15 +988,15 @@ void ScTable::SyncColRowFlags() using ::sal::static_int_cast; // Manual breaks. - pRowFlags->AndValue(0, MAXROW, static_int_cast(~CR_MANUALBREAK)); + pRowFlags->AndValue(0, MAXROW, static_int_cast(~CR_MANUALBREAK)); for (SCCOL i = 0; i <= MAXCOL; ++i) - pColFlags[i] &= static_int_cast(~CR_MANUALBREAK); + pColFlags[i] &= static_int_cast(~CR_MANUALBREAK); if (!maRowManualBreaks.empty()) { for (set::const_iterator itr = maRowManualBreaks.begin(), itrEnd = maRowManualBreaks.end(); itr != itrEnd; ++itr) - pRowFlags->OrValue(*itr, static_int_cast(CR_MANUALBREAK)); + pRowFlags->OrValue(*itr, static_int_cast(CR_MANUALBREAK)); } if (!maColManualBreaks.empty()) @@ -1018,14 +1018,14 @@ void ScTable::SetPageSize( const Size& rSize ) if (aPageSizeTwips != rSize) InvalidatePageBreaks(); - bPageSizeValid = TRUE; + bPageSizeValid = sal_True; aPageSizeTwips = rSize; } else - bPageSizeValid = FALSE; + bPageSizeValid = sal_False; } -BOOL ScTable::IsProtected() const +sal_Bool ScTable::IsProtected() const { return pTabProtection.get() && pTabProtection->isProtected(); } @@ -1038,7 +1038,7 @@ void ScTable::SetProtection(const ScTableProtection* pProtect) pTabProtection.reset(NULL); if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } ScTableProtection* ScTable::GetProtection() @@ -1094,20 +1094,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, sal_False, sal_False); } if ( pNewStyle ) // auch ohne den alten (fuer UpdateStdNames) aPageStyle = aStrNew; if (IsStreamValid()) - SetStreamValid(FALSE); + SetStreamValid(sal_False); } } } @@ -1115,11 +1115,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, sal_False, sal_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 500ac1bb3614..41f73d3d5cf0 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -49,9 +49,9 @@ //-------------------------------------------------------------------------- -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 ); @@ -61,12 +61,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 = sal_False; + sal_Bool bDoSearch = sal_True; + sal_Bool bDoBack = rSearchItem.GetBackward(); String aString; ScBaseCell* pCell; @@ -74,7 +74,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 = sal_False; CellType eCellType = pCell->GetCellType(); switch (rSearchItem.GetCellType()) { @@ -117,13 +117,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; } @@ -137,7 +137,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) ) && @@ -156,13 +156,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 = sal_False; String sReplStr = rSearchItem.GetReplaceString(); if (rSearchItem.GetRegExp()) @@ -194,17 +194,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 = sal_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; } @@ -246,11 +246,11 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo return bFound; } -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 = sal_False; + sal_Bool bAll = (rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL) ||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL); SCCOL nCol = rCol; SCROW nRow = rRow; @@ -271,14 +271,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); } @@ -306,7 +306,7 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, } if (!bFound) { - BOOL bIsEmpty; + sal_Bool bIsEmpty; nRow = nLastRow; do { @@ -314,7 +314,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); } @@ -375,10 +375,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; @@ -398,10 +398,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 = sal_False; SCCOL nCol = rCol; SCROW nRow = rRow; if (rSearchItem.GetBackward()) @@ -427,14 +427,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; @@ -456,7 +456,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*) @@ -465,11 +465,11 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& SCsCOL nCol = rCol; SCsROW nRow = rRow; - BOOL bFound = FALSE; + sal_Bool bFound = sal_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 @@ -486,7 +486,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& else { nRow = nNextRow; - bFound = TRUE; + bFound = sal_True; } } while (!bFound && ValidCol(nCol)); @@ -510,7 +510,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& { nCol = i; nRow = nNextRows[i]; - bFound = TRUE; + bFound = sal_True; } } else // vorwaerts @@ -521,7 +521,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& { nCol = i; nRow = nNextRows[i]; - bFound = TRUE; + bFound = sal_True; } } } @@ -536,12 +536,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) @@ -561,19 +561,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) @@ -599,10 +599,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*) @@ -613,7 +613,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 @@ -625,12 +625,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 = sal_False; if ( ValidColRow(rCol, rRow) || ((nCommand == SVX_SEARCHCMD_FIND || nCommand == SVX_SEARCHCMD_REPLACE) && (((rCol == MAXCOLCOUNT || rCol == -1) && VALIDROW(rRow)) || @@ -639,13 +639,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, sal_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 2239b1d0f773..e2714e714345 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -81,7 +81,7 @@ ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOpe eErrorStyle( SC_VALERR_STOP ), mnListType( ValidListType::UNSORTED ) { - bShowInput = bShowError = FALSE; + bShowInput = bShowError = sal_False; } ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper, @@ -93,7 +93,7 @@ ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOpe eErrorStyle( SC_VALERR_STOP ), mnListType( ValidListType::UNSORTED ) { - bShowInput = bShowError = FALSE; + bShowInput = bShowError = sal_False; } ScValidationData::ScValidationData( const ScValidationData& r ) : @@ -132,14 +132,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) @@ -157,17 +157,17 @@ BOOL ScValidationData::EqualEntries( const ScValidationData& r ) const void ScValidationData::ResetInput() { - bShowInput = FALSE; + bShowInput = sal_False; } void ScValidationData::ResetError() { - bShowError = FALSE; + bShowError = sal_False; } void ScValidationData::SetInput( const String& rTitle, const String& rMsg ) { - bShowInput = TRUE; + bShowInput = sal_True; aInputTitle = rTitle; aInputMessage = rMsg; } @@ -175,13 +175,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; @@ -190,15 +190,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 sal_False; - BOOL bScriptReturnedFalse = FALSE; // Standard: kein Abbruch + sal_Bool bScriptReturnedFalse = sal_False; // Standard: kein Abbruch // Set up parameters ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aParams(2); @@ -206,7 +206,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 = sal_False; if ( pCell ) // wenn Zelle gesetzt, aus Interpret gerufen { bIsValue = pCell->IsValue(); @@ -227,9 +227,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() ); @@ -245,17 +245,17 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput, pDocument->UnlockTable( rPos.Tab() ); if ( !bWasInLinkUpdate ) - pDocument->SetInLinkUpdate( FALSE ); + pDocument->SetInLinkUpdate( sal_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 = sal_False; if ( eRet == ERRCODE_NONE && aRet.getValueType() == getCppuBooleanType() && sal_True == ( aRet >>= bTmp ) && - bTmp == FALSE ) + bTmp == sal_False ) { - bScriptReturnedFalse = TRUE; + bScriptReturnedFalse = sal_True; } if ( eRet == ERRCODE_BASIC_METHOD_NOT_FOUND && !pCell ) @@ -271,9 +271,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 ) ) @@ -284,10 +284,10 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput, ScDocument* pDocument = GetDocument(); SfxObjectShell* pDocSh = pDocument->GetDocumentShell(); if ( !pDocSh || !pDocument->CheckMacroWarn() ) - return FALSE; + return sal_False; - BOOL bDone = FALSE; - BOOL bRet = FALSE; // Standard: kein Abbruch + sal_Bool bDone = sal_False; + sal_Bool bRet = sal_False; // Standard: kein Abbruch SfxApplication* pSfxApp = SFX_APP(); pSfxApp->EnterBasicCall(); // Dok-Basic anlegen etc. @@ -340,7 +340,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 = sal_False; if ( pCell ) // wenn Zelle gesetzt, aus Interpret gerufen { bIsValue = pCell->IsValue(); @@ -361,9 +361,9 @@ 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() ); @@ -373,12 +373,12 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput, pDocument->UnlockTable( rPos.Tab() ); if ( !bWasInLinkUpdate ) - pDocument->SetInLinkUpdate( FALSE ); + pDocument->SetInLinkUpdate( sal_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() == sal_False ) + bRet = sal_True; + bDone = sal_True; } pSfxApp->LeaveBasicCall(); @@ -400,9 +400,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 ) @@ -439,20 +439,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 sal_False; // Formeln sind sonst immer ungueltig if ( !rTest.Len() ) return IsIgnoreBlank(); // leer: wie eingestellt @@ -464,27 +464,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()) { @@ -493,11 +493,11 @@ BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) c break; case CELLTYPE_STRING: ((ScStringCell*)pCell)->GetString( aString ); - bIsVal = FALSE; + bIsVal = sal_False; break; case CELLTYPE_EDIT: ((ScEditCell*)pCell)->GetString( aString ); - bIsVal = FALSE; + bIsVal = sal_False; break; case CELLTYPE_FORMULA: { @@ -513,7 +513,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 @@ -606,7 +606,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 ) @@ -661,7 +661,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? @@ -693,7 +693,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings, SCSIZE nCol, nRow, nCols, nRows, n = 0; pValues->GetDimensions( nCols, nRows ); - BOOL bRef = FALSE; + sal_Bool bRef = sal_False; ScRange aRange; ScTokenArray* pArr = (ScTokenArray*) &rTokArr; @@ -706,7 +706,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) @@ -714,7 +714,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings, ScRangeData* pName = pDocument->GetRangeName()->FindIndex( t->GetIndex() ); if (pName && pName->IsReference(aRange)) { - bRef = TRUE; + bRef = sal_True; } } else if (t->GetType() != svIndex) @@ -722,7 +722,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings, t->CalcAbsIfRel(rPos); if (pArr->IsValidReference(aRange)) { - bRef = TRUE; + bRef = sal_True; } } } @@ -757,7 +757,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings, } else { - USHORT nErr = pMatVal->GetError(); + sal_uInt16 nErr = pMatVal->GetError(); if( 0 != nErr ) { @@ -820,7 +820,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() ) { @@ -872,7 +872,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() ) { @@ -916,9 +916,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; iClone() ); //! sortierte Eintraege aus rList schneller einfuegen ??? @@ -929,9 +929,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; iClone(pNewDoc) ); //! sortierte Eintraege aus rList schneller einfuegen ??? @@ -941,8 +941,8 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey ) { //! binaer suchen - USHORT nCount = Count(); - for (USHORT i=0; iGetKey() == nKey) return (*this)[i]; @@ -952,44 +952,44 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey ) void ScValidationDataList::CompileXML() { - USHORT nCount = Count(); - for (USHORT i=0; iCompileXML(); } void ScValidationDataList::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - USHORT nCount = Count(); - for (USHORT i=0; iUpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz); } void ScValidationDataList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) { - USHORT nCount = Count(); - for (USHORT i=0; iUpdateMoveTab( nOldPos, nNewPos ); } bool ScValidationDataList::MarkUsedExternalReferences() const { bool bAllMarked = false; - USHORT nCount = Count(); - for (USHORT i=0; !bAllMarked && iMarkUsedExternalReferences(); return bAllMarked; } -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; iEqualEntries(*r[i]) ) // Eintraege unterschiedlich ? - bEqual = FALSE; + bEqual = sal_False; return bEqual; } diff --git a/sc/source/core/inc/addinlis.hxx b/sc/source/core/inc/addinlis.hxx index 6c0f98386920..11831701cef1 100644 --- a/sc/source/core/inc/addinlis.hxx +++ b/sc/source/core/inc/addinlis.hxx @@ -71,7 +71,7 @@ public: com::sun::star::sheet::XVolatileResult> xVR ); static void RemoveDocument( ScDocument* pDocument ); - BOOL HasDocument( ScDocument* pDoc ) const { return pDocs->Seek_Entry( pDoc ); } + sal_Bool HasDocument( ScDocument* pDoc ) const { return pDocs->Seek_Entry( pDoc ); } void AddDocument( ScDocument* pDoc ) { pDocs->Insert( pDoc ); } const com::sun::star::uno::Any& GetResult() const { return aResult; } diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx index 4d0997fce63d..46b147eab142 100644 --- a/sc/source/core/inc/adiasync.hxx +++ b/sc/source/core/inc/adiasync.hxx @@ -59,32 +59,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 13384b033628..a912a8c6e550 100644 --- a/sc/source/core/inc/bcaslot.hxx +++ b/sc/source/core/inc/bcaslot.hxx @@ -47,13 +47,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( sal_False ) {} inline SvtBroadcaster& GetBroadcaster() { return aBroadcaster; } inline const SvtBroadcaster& GetBroadcaster() const { return aBroadcaster; } inline void UpdateRange( const ScRange& rNewRange ) @@ -62,12 +62,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; @@ -139,7 +139,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; @@ -165,7 +165,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, @@ -181,9 +181,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, @@ -245,7 +245,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, @@ -259,9 +259,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/ddelink.hxx b/sc/source/core/inc/ddelink.hxx index 4f0652753e65..c2f7d9b4497b 100644 --- a/sc/source/core/inc/ddelink.hxx +++ b/sc/source/core/inc/ddelink.hxx @@ -41,16 +41,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 @@ -59,7 +59,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(); @@ -84,14 +84,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 edecaadb39f0..926c44c06317 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -53,14 +53,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] = sal_False; + bEmpty[1] = sal_False; } }; @@ -125,9 +125,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 @@ -136,7 +136,7 @@ public: ScMatrixRef GetNewMat(SCSIZE nC, SCSIZE nR); private: static ScTokenStack* pGlobalStack; - static BOOL bGlobalStackInUse; + static sal_Bool bGlobalStackInUse; formula::FormulaTokenIterator aCode; ScAddress aPos; @@ -153,26 +153,26 @@ 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 //---------------------------------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(); @@ -183,8 +183,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* ); @@ -192,26 +192,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() : sal_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() : sal_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 @@ -266,7 +266,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(); @@ -279,7 +279,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 = sal_False ); /** If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of ScComplexRefData. Else if StackVar svRefList return values of the ScComplexRefData where @@ -289,26 +289,26 @@ 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 = sal_False ); void DoubleRefToVars( const ScToken* p, SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - BOOL bDontCheckForTableOp = FALSE ); + sal_Bool bDontCheckForTableOp = sal_False ); ScDBRangeBase* PopDoubleRef(); void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - BOOL bDontCheckForTableOp = FALSE ); -BOOL PopDoubleRefOrSingleRef( ScAddress& rAdr ); + sal_Bool bDontCheckForTableOp = sal_False ); +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 PushByte(BYTE nVal); +//void PushByte(sal_uInt8 nVal); void PushDouble(double nVal); void PushInt( int nVal ); void PushStringBuffer( const sal_Unicode* pString ); @@ -317,20 +317,20 @@ void PushSingleRef(SCCOL nCol, SCROW nRow, SCTAB nTab); void PushDoubleRef(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2); void PushMatrix(ScMatrix* 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 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(); // pop matrix and obtain one element, upper left or according to jump matrix ScMatValType GetDoubleOrStringFromMatrix( double& rDouble, String& rString ); @@ -344,15 +344,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; @@ -449,20 +449,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 = sal_False ); +void ScMax( sal_Bool bTextAsZero = sal_False ); +double IterateParameters( ScIterFunc, sal_Bool bTextAsZero = sal_False ); void ScSumSQ(); void ScSum(); void ScProduct(); -void ScAverage( BOOL bTextAsZero = FALSE ); +void ScAverage( sal_Bool bTextAsZero = sal_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 = sal_False ); +void ScVar( sal_Bool bTextAsZero = sal_False ); +void ScVarP( sal_Bool bTextAsZero = sal_False ); +void ScStDev( sal_Bool bTextAsZero = sal_False ); +void ScStDevP( sal_Bool bTextAsZero = sal_False ); void ScColumns(); void ScRows(); void ScTables(); @@ -478,13 +478,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(); @@ -522,8 +522,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(); @@ -537,13 +537,13 @@ void ScTTT(); /** Obtain the date serial number for a given date. @param bStrict - If FALSE, nYear < 100 takes the two-digit year setting into account, + If sal_False, nYear < 100 takes the two-digit year setting into account, and rollover of invalid calendar dates takes place, e.g. 1999-02-31 => 1999-03-03. - If TRUE, the date passed must be a valid Gregorian calendar date. No + If sal_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(); @@ -653,28 +653,28 @@ void ScSumX2DY2(); void ScSumXMY2(); void ScGrowth(); // multiple Regression: Varianzen der Koeffizienten -BOOL RGetVariances( ScMatrix* pV, ScMatrix* pX, SCSIZE nC, SCSIZE nR, - BOOL bSwapColRow, BOOL bZeroConstant ); -void Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,BOOL bConstant,SCSIZE N,SCSIZE M,BYTE nCase); -ScMatrixRef Calculate2(const BOOL bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,BYTE nCase); +sal_Bool RGetVariances( ScMatrix* pV, ScMatrix* pX, SCSIZE nC, SCSIZE nR, + sal_Bool bSwapColRow, sal_Bool bZeroConstant ); +void Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,sal_Bool bConstant,SCSIZE N,SCSIZE M,sal_uInt8 nCase); +ScMatrixRef Calculate2(const sal_Bool bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,sal_uInt8 nCase); bool Calculate3(const SCSIZE M ,ScMatrixRef& pQ); -bool Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,BOOL bConstant,SCSIZE N,SCSIZE M); +bool Calculate4(sal_Bool _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,sal_Bool bConstant,SCSIZE N,SCSIZE M); bool CalculateSkew(double& fSum,double& fCount,double& vSum,std::vector& 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 CalculateTrendGrowth(BOOL _bGrowth); -void CalulateRGPRKP(BOOL _bRKP); -void CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2); +void CalculateAddSub(sal_Bool _bSub); +void CalculateTrendGrowth(sal_Bool _bGrowth); +void CalulateRGPRKP(sal_Bool _bRKP); +void CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2); void CalculateMatrixValue(const ScMatrix* pMat,SCSIZE nC,SCSIZE nR); -bool CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY); +bool CheckMatrix(sal_Bool _bLOG,sal_Bool _bTrendGrowth,sal_uInt8& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY); void ScRGP(); void ScRKP(); @@ -685,7 +685,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 @@ -744,8 +744,8 @@ void ScSkew(); void ScMedian(); double GetMedian( ::std::vector & rArray ); double GetPercentile( ::std::vector & rArray, double fPercentile ); -void GetNumberSequenceArray( BYTE nParamCount, ::std::vector& rArray ); -void GetSortArray(BYTE nParamCount, ::std::vector& rSortArray, ::std::vector* pIndexOrder = NULL); +void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector& rArray ); +void GetSortArray(sal_uInt8 nParamCount, ::std::vector& rSortArray, ::std::vector* pIndexOrder = NULL); void QuickSort(::std::vector& rSortArray, ::std::vector* pIndexOrder = NULL); void ScModalValue(); void ScAveDev(); @@ -796,17 +796,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; } }; @@ -836,48 +836,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 sal_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 sal_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 sal_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 sal_False; } - return TRUE; + return sal_True; } @@ -885,7 +885,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 8089d6653730..667a8918a2f6 100644 --- a/sc/source/core/inc/jumpmatrix.hxx +++ b/sc/source/core/inc/jumpmatrix.hxx @@ -122,7 +122,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, @@ -144,15 +144,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 1 // Generate documentation to stdout if environment variable @@ -151,14 +151,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 17da3bf5e635..e32bfd47561c 100644 --- a/sc/source/core/inc/refupdat.hxx +++ b/sc/source/core/inc/refupdat.hxx @@ -63,7 +63,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! @@ -76,7 +76,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 aadd3e101d02..5c4f4dc33550 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, const rtl::OString& sHelp, + sal_uInt16 nCat, const rtl::OString& sHelp, const uno::Reference& rFunc, const uno::Any& rO, long nAC, const ScAddInArgDesc* pAD, @@ -99,7 +99,7 @@ ScUnoAddInFuncData::ScUnoAddInFuncData( const String& rNam, const String& rLoc, nCallerPos( nCP ), nCategory( nCat ), sHelpId( sHelp ), - bCompInitialized( FALSE ) + bCompInitialized( sal_False ) { if ( nArgCount ) { @@ -152,7 +152,7 @@ const uno::Sequence& 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& 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 sal_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( sal_False ) { } @@ -285,7 +285,7 @@ void ScUnoAddInCollection::Clear() ppFuncData = NULL; nFuncCount = 0; - bInitialized = FALSE; + bInitialized = sal_False; } uno::Reference getContext(uno::Reference 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; iGetExcelName( eDestLang, rRetExcelName); - return FALSE; + return sal_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 sal_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& xClass ) +sal_Bool lcl_ValidReturnType( const uno::Reference& xClass ) { // this must match with ScUnoAddInCall::SetResult - if ( !xClass.is() ) return FALSE; + if ( !xClass.is() ) return sal_False; switch (xClass->getTypeClass()) { @@ -730,7 +730,7 @@ BOOL lcl_ValidReturnType( const uno::Reference& 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: { @@ -750,13 +750,13 @@ BOOL lcl_ValidReturnType( const uno::Reference& xClass ) rtl::OUString sName = xClass->getName(); return ( - IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) ) || + IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) ) || IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) ) || IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) ) || IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) ) ); } } - return FALSE; + return sal_False; } ScAddInArgumentType lcl_GetArgType( const uno::Reference& xClass ) @@ -778,7 +778,7 @@ ScAddInArgumentType lcl_GetArgType( const uno::Reference& //! XIdlClass needs getType() method! rtl::OUString sName = xClass->getName(); - if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) )) + if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) )) return SC_ADDINARG_INTEGER_ARRAY; if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence >*)0) )) @@ -873,7 +873,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference& // leave out internal functions uno::Reference xClass = xFunc->getDeclaringClass(); - BOOL bSkip = TRUE; + sal_Bool bSkip = sal_True; if ( xClass.is() ) { //! XIdlClass needs getType() method! @@ -895,7 +895,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference& uno::Reference xReturn = xFunc->getReturnType(); if ( !lcl_ValidReturnType( xReturn ) ) - bSkip = TRUE; + bSkip = sal_True; } if (!bSkip) { @@ -906,7 +906,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference& aFuncName += '.'; aFuncName += String( aFuncU ); - BOOL bValid = TRUE; + sal_Bool bValid = sal_True; long nVisibleCount = 0; long nCallerPos = SC_CALLERPOS_NONE; @@ -918,12 +918,12 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference& for (nParamPos=0; nParamPos xParClass = pParArr[nParamPos].aType; ScAddInArgumentType eArgType = lcl_GetArgType( xParClass ); if ( eArgType == SC_ADDINARG_NONE ) - bValid = FALSE; + bValid = sal_False; else if ( eArgType == SC_ADDINARG_CALLER ) nCallerPos = nParamPos; else @@ -931,7 +931,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference& } if (bValid) { - USHORT nCategory = lcl_GetCategory( + sal_uInt16 nCategory = lcl_GetCategory( String( xAddIn->getProgrammaticCategoryName( aFuncU ) ) ); @@ -996,7 +996,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference& aArgName = rtl::OUString::createFromAscii( "###" ); } - BOOL bOptional = + sal_Bool bOptional = ( eArgType == SC_ADDINARG_VALUE_OR_ARRAY || eArgType == SC_ADDINARG_VARARGS ); @@ -1050,8 +1050,8 @@ void lcl_UpdateFunctionList( ScFunctionList& rFunctionList, const ScUnoAddInFunc { String aCompare = rFuncData.GetUpperLocal(); // as used in FillFunctionDescFromData - ULONG nCount = rFunctionList.GetCount(); - for (ULONG nPos=0; nPospFuncName && *pDesc->pFuncName == aCompare ) @@ -1132,7 +1132,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference xParClass = pParArr[nParamPos].aType; ScAddInArgumentType eArgType = lcl_GetArgType( xParClass ); if ( eArgType == SC_ADDINARG_NONE ) - bValid = FALSE; + bValid = sal_False; else if ( eArgType == SC_ADDINARG_CALLER ) nCallerPos = nParamPos; else @@ -1180,7 +1180,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference= nFuncCount || !ppFuncData[nFunc]) - return FALSE; + return sal_False; const ScUnoAddInFuncData& rFuncData = *ppFuncData[nFunc]; @@ -1321,15 +1321,15 @@ BOOL ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc ) } // static -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 sal_False; if ( bIncomplete ) nArgCount = 0; // if incomplete, fill without argument info (no wrong order) @@ -1347,10 +1347,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 = sal_False; const ScAddInArgDesc* pArgs = rFuncData.GetArguments(); rDesc.ppDefArgNames = new String*[nArgCount]; @@ -1373,7 +1373,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 ) @@ -1382,7 +1382,7 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r rDesc.bIncomplete = bIncomplete; - return TRUE; + return sal_True; } @@ -1390,9 +1390,9 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const String& rName, long nParamCount ) : - bValidCount( FALSE ), + bValidCount( sal_False ), nErrCode( errNoCode ), // before function was called - bHasString( TRUE ), + bHasString( sal_True ), fValue( 0.0 ), xMatrix( NULL ) { @@ -1409,15 +1409,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; iGetCallerPos() != SC_CALLERPOS_NONE; } @@ -1628,7 +1628,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes ) { uno::TypeClass eMyClass; ScApiTypeConversion::ConvertAnyToDouble( fValue, eMyClass, rNewRes); - bHasString = FALSE; + bHasString = sal_False; } break; @@ -1637,7 +1637,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes ) rtl::OUString aUStr; rNewRes >>= aUStr; aString = String( aUStr ); - bHasString = TRUE; + bHasString = sal_True; } break; @@ -1655,19 +1655,19 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes ) break; default: - if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence > *)0 ) ) ) + if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence > *)0 ) ) ) { - const uno::Sequence< uno::Sequence >* pRowSeq = NULL; + const uno::Sequence< uno::Sequence >* pRowSeq = NULL; //! use pointer from any! - uno::Sequence< uno::Sequence > aSequence; + uno::Sequence< uno::Sequence > aSequence; if ( rNewRes >>= aSequence ) pRowSeq = &aSequence; if ( pRowSeq ) { long nRowCount = pRowSeq->getLength(); - const uno::Sequence* pRowArr = pRowSeq->getConstArray(); + const uno::Sequence* pRowArr = pRowSeq->getConstArray(); long nMaxColCount = 0; long nCol, nRow; for (nRow=0; nRowPutDouble( pColArr[nCol], static_cast(nCol), diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx index ad6b60073ccb..c43702c4ae1e 100644 --- a/sc/source/core/tool/addinlis.cxx +++ b/sc/source/core/tool/addinlis.cxx @@ -87,8 +87,8 @@ ScAddInListener* ScAddInListener::Get( uno::Reference xV { sheet::XVolatileResult* pComp = xVR.get(); - ULONG nCount = aAllListeners.Count(); - for (ULONG nPos=0; nPosxVolRes.get() ) @@ -101,14 +101,14 @@ ScAddInListener* ScAddInListener::Get( uno::Reference xV // static void ScAddInListener::RemoveDocument( ScDocument* pDocumentP ) { - ULONG nPos = aAllListeners.Count(); + sal_uLong nPos = aAllListeners.Count(); while (nPos) { // loop backwards because elements are removed --nPos; ScAddInListener* pLst = (ScAddInListener*)aAllListeners.GetObject(nPos); ScAddInDocs* p = pLst->pDocs; - USHORT nFoundPos; + sal_uInt16 nFoundPos; if ( p->Seek_Entry( pDocumentP, &nFoundPos ) ) { p->Remove( nFoundPos ); @@ -158,8 +158,8 @@ void SAL_CALL ScAddInListener::modified( const ::com::sun::star::sheet::ResultEv Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) ); const ScDocument** ppDoc = (const ScDocument**) pDocs->GetData(); - USHORT nCount = pDocs->Count(); - for ( USHORT j=0; jCount(); + for ( sal_uInt16 j=0; jTrackFormulas(); diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index ccbecd52d9f2..26a194b731ef 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -162,7 +162,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, @@ -271,7 +271,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start, } else { - bool only_digits = TRUE; + bool only_digits = sal_True; /* * Valid: Normal!a1 @@ -299,7 +299,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start, p = start; break; } - only_digits = FALSE; + only_digits = sal_False; p++; } else if( CharClass::isAsciiDigit( uc )) @@ -341,12 +341,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(); @@ -536,7 +536,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; @@ -581,7 +581,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; @@ -624,7 +624,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, @@ -634,9 +634,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; #if 0 { @@ -767,7 +767,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; @@ -790,7 +790,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; @@ -808,7 +808,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, @@ -818,7 +818,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; #if 0 { @@ -947,11 +947,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; @@ -980,7 +980,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, '.') ) { @@ -1137,7 +1137,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)) @@ -1166,7 +1166,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; } @@ -1175,7 +1175,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, @@ -1196,7 +1196,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; @@ -1204,7 +1204,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; } @@ -1221,7 +1221,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, @@ -1244,7 +1244,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, @@ -1262,7 +1262,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 ) @@ -1316,10 +1316,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) { @@ -1332,7 +1332,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()) ) { @@ -1378,7 +1378,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 ) @@ -1404,11 +1404,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 ) @@ -1422,11 +1422,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; @@ -1481,11 +1481,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(); @@ -1716,7 +1716,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 ); @@ -1752,7 +1752,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 ) @@ -1779,7 +1779,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(); @@ -1793,7 +1793,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 ); @@ -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 = sal_False; else if( dx > MAXCOL ) - dx = MAXCOL, bValid =FALSE; + dx = MAXCOL, bValid =sal_False; if( dy < 0 ) - dy = 0, bValid = FALSE; + dy = 0, bValid = sal_False; else if( dy > MAXROW ) - dy = MAXROW, bValid =FALSE; + dy = MAXROW, bValid =sal_False; if( dz < 0 ) - dz = 0, bValid = FALSE; + dz = 0, bValid = sal_False; else if( dz >= nMaxTab ) - dz = nMaxTab-1, bValid =FALSE; + dz = nMaxTab-1, bValid =sal_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 4f19a043a34d..37f760b615ac 100644 --- a/sc/source/core/tool/adiasync.cxx +++ b/sc/source/core/tool/adiasync.cxx @@ -55,7 +55,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 ); } } @@ -69,11 +69,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( sal_False ) { pDocs = new ScAddInDocs( 1, 1 ); pDocs->Insert( pDoc ); @@ -99,9 +99,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 ) ) @@ -112,7 +112,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 ) @@ -140,12 +140,12 @@ void ScAddInAsync::CallBack( ULONG nHandleP, void* pData ) DBG_ERROR( "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; jpDocs->Count(); + for ( sal_uInt16 j=0; jTrackFormulas(); @@ -158,7 +158,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 = @@ -166,7 +166,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 857efd972886..4ff3b20f14b2 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -53,7 +53,7 @@ using namespace com::sun::star::uno; // STATIC DATA ----------------------------------------------------------- -#define SC_VERSION ((USHORT)304) +#define SC_VERSION ((sal_uInt16)304) //======================================================================== // ScAppOptions - Applikations-Optionen @@ -89,13 +89,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; @@ -140,7 +140,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; @@ -148,9 +148,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(nCount) ); + rOpt.SetLRUFuncList( pUShorts, sal::static_int_cast(nCount) ); delete[] pUShorts; } @@ -184,7 +184,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 aSeq( nCount ); @@ -208,7 +208,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) @@ -236,7 +236,7 @@ void lcl_GetSortList( Any& rDest ) Sequence aSeq( nCount ); OUString* pArray = aSeq.getArray(); for (long i=0; i(i)]->GetString(); + pArray[i] = (*pUserList)[sal::static_int_cast(i)]->GetString(); rDest <<= aSeq; } else @@ -419,10 +419,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 5a7f117e75d9..85447b6a8730 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -61,43 +61,43 @@ const sal_Char *linker_dummy = ""; static const sal_Char __FAR_DATA 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: #21549# 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: #5991# 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 @@ -106,34 +106,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); }; @@ -163,7 +163,7 @@ ScAfVersions::ScAfVersions() : { } -void ScAfVersions::Load( SvStream& rStream, USHORT nVer ) +void ScAfVersions::Load( SvStream& rStream, sal_uInt16 nVer ) { rStream >> nFontVersion; rStream >> nFontHeightVersion; @@ -220,7 +220,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 } // --------------------------------------------------------------------------- @@ -312,7 +312,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 ); @@ -396,7 +396,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 ); @@ -429,7 +429,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 ); @@ -491,10 +491,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; } @@ -510,32 +510,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 ) @@ -573,7 +573,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() ) @@ -610,21 +610,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 ); @@ -681,7 +681,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 ); @@ -756,7 +756,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 ); @@ -791,10 +791,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 || @@ -806,7 +806,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 ) { @@ -816,7 +816,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; @@ -825,25 +825,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 = sal_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; @@ -852,19 +852,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 = sal_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: #21549# store strings as UTF-8 rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 ); @@ -880,7 +880,7 @@ BOOL ScAutoFormatData::Save(SvStream& rStream) if( 0 != aIniVal.ToInt32() ) { // check Name for ResId - for( USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN; + for( sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN; RID_SVXSTR_TBLAFMT_END > nId; ++nId ) { String s( SVX_RES( nId ) ); @@ -902,8 +902,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; @@ -912,9 +912,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 (sal_False) { // create default autoformat ScAutoFormatData* pData = new ScAutoFormatData; @@ -960,7 +960,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 ); @@ -999,7 +999,7 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup): ScAutoFormat::ScAutoFormat(const ScAutoFormat& rAutoFormat) : ScSortedCollection (rAutoFormat), - bSaveLater (FALSE) + bSaveLater (sal_False) {} ScAutoFormat::~ScAutoFormat() @@ -1011,7 +1011,7 @@ ScAutoFormat::~ScAutoFormat() Save(); } -void ScAutoFormat::SetSaveLater( BOOL bSet ) +void ScAutoFormat::SetSaveLater( sal_Bool bSet ) { bSaveLater = bSet; } @@ -1030,9 +1030,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; @@ -1040,14 +1040,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(); @@ -1058,13 +1058,13 @@ 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( 4 <= nCnt ) // rStream >> nFileVers; - 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 ); @@ -1079,10 +1079,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); @@ -1116,10 +1116,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 ); @@ -1127,18 +1127,18 @@ BOOL ScAutoFormat::Load() } } else - bRet = FALSE; + bRet = sal_False; } #endif } } - bSaveLater = FALSE; + bSaveLater = sal_False; return bRet; } -BOOL ScAutoFormat::Save() +sal_Bool ScAutoFormat::Save() { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; INetURLObject aURL; SvtPathOptions aPathOpt; @@ -1146,7 +1146,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) @@ -1155,35 +1155,35 @@ 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(rStream.GetVersion()) ); -// << (BYTE)4 // Anzahl von Zeichen des Headers incl. diesem -// << (BYTE)::GetStoreCharSet(::GetSystemCharSet()) + << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem + << (sal_uInt8)::GetSOStoreTextEncoding( + gsl_getSystemTextEncoding(), sal::static_int_cast(rStream.GetVersion()) ); +// << (sal_uInt8)4 // Anzahl von Zeichen des Headers incl. diesem +// << (sal_uInt8)::GetStoreCharSet(::GetSystemCharSet()) // << (UNIT16)SOFFICE_FILEFORMAT_NOW; 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 = sal_False; return bRet; } -USHORT ScAutoFormat::FindIndexPerName( const String& rName ) const +sal_uInt16 ScAutoFormat::FindIndexPerName( const String& rName ) const { String aName; - for( USHORT i=0; iGetName( aName ); diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index e8e2b28f3f8e..f13420c8733f 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -61,17 +61,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 ); @@ -110,7 +110,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; } @@ -119,8 +119,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), @@ -130,7 +130,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]; } @@ -145,7 +145,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]; } @@ -159,7 +159,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 ); @@ -186,13 +186,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 = sal_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; }; @@ -208,12 +208,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 @@ -223,19 +223,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 sal_False; rtl::OUString aNP; aNP = rModuleName; - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; osl::Module* pLib = new osl::Module( aNP ); if (pLib->is()) { @@ -249,7 +249,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 ); } @@ -261,20 +261,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; // #62113# alles initialisieren, falls das AddIn sich schlecht verhaelt cFuncName[0] = 0; cInternalName[0] = 0; nParamCount = 0; - for ( USHORT j=0; jInsert(pFuncData); } - bRet = TRUE; + bRet = sal_True; } else delete pLib; @@ -311,8 +311,8 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName) void ExitExternalFunc() { - USHORT nCount = aModuleCollection.GetCount(); - for (USHORT i=0; iFreeInstance(); @@ -321,9 +321,9 @@ void ExitExternalFunc() //------------------------------------------------------------------------ -BOOL FuncData::Call(void** ppParam) +sal_Bool FuncData::Call(void** ppParam) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; osl::Module* pLib = pModuleData->GetInstance(); FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName); if (fProc != NULL) @@ -332,81 +332,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; } @@ -416,15 +416,15 @@ BOOL FuncData::Call(void** ppParam) //------------------------------------------------------------------------ -BOOL FuncData::Unadvice( double nHandle ) +sal_Bool FuncData::Unadvice( double nHandle ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_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; } @@ -439,9 +439,9 @@ const String& FuncData::GetModuleName() const //------------------------------------------------------------------------ -BOOL FuncData::GetParamDesc( String& aName, String& aDesc, USHORT nParam ) +sal_Bool FuncData::GetParamDesc( String& aName, String& aDesc, sal_uInt16 nParam ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( nParam <= nParamCount ) { osl::Module* pLib = pModuleData->GetInstance(); @@ -451,11 +451,11 @@ BOOL FuncData::GetParamDesc( String& aName, String& aDesc, USHORT nParam ) sal_Char pcName[256]; sal_Char pcDesc[256]; *pcName = *pcDesc = 0; - USHORT nFuncNo = nNumber; // nicht per Reference versauen lassen.. + sal_uInt16 nFuncNo = nNumber; // nicht per Reference versauen lassen.. ((::GetParamDesc)fProc)( nFuncNo, nParam, pcName, pcDesc ); aName = String( pcName, osl_getThreadTextEncoding() ); aDesc = String( pcDesc, osl_getThreadTextEncoding() ); - bRet = TRUE; + bRet = sal_True; } } if ( !bRet ) diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx index 45d2c4a890bb..e7108d43824f 100644 --- a/sc/source/core/tool/cellform.cxx +++ b/sc/source/core/tool/cellform.cxx @@ -46,10 +46,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; @@ -120,7 +120,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString, } else { - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); // erst nach dem Interpretieren (GetErrCode) das Zahlformat holen: if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 ) @@ -155,7 +155,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) @@ -199,7 +199,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 573763141b18..ec48a27fed80 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -84,7 +84,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, SCTAB nTab, aName( rChartName ), pDocument( pDoc ), aPositioner(pDoc, nTab, nStartColP, nStartRowP, nEndColP, nEndRowP), - bValid( TRUE ) + bValid( sal_True ) { } @@ -93,7 +93,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, const ScRangeListRef& rRangeList, aName( rChartName ), pDocument( pDoc ), aPositioner(pDoc, rRangeList), - bValid( TRUE ) + bValid( sal_True ) { } @@ -115,7 +115,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; @@ -128,7 +128,7 @@ BOOL ScChartArray::operator==(const ScChartArray& rCmp) const ScMemChart* ScChartArray::CreateMemChart() { ScRangeListRef aRangeListRef(GetRangeList()); - ULONG nCount = aRangeListRef->Count(); + sal_uLong nCount = aRangeListRef->Count(); if ( nCount > 1 ) return CreateMemChartMulti(); else if ( nCount == 1 ) @@ -225,16 +225,16 @@ ScMemChart* ScChartArray::CreateMemChartSingle() nRowCount = 0; } - BOOL bValidData = TRUE; + sal_Bool bValidData = sal_True; if ( !nColCount ) { - bValidData = FALSE; + bValidData = sal_False; nColCount = 1; aCols.push_back(nStrCol); } if ( !nRowCount ) { - bValidData = FALSE; + bValidData = sal_False; nRowCount = 1; aRows.push_back(nStrRow); } @@ -251,7 +251,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() // pMemChart->SetNumberFormatter( pFormatter ); if ( bValidData ) { - BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown(); + sal_Bool bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown(); ScBaseCell* pCell; for (nCol=0; nColSetColText( static_cast(nCol), aString); -// ULONG nNumberAttr = (nTotalRows ? pDocument->GetNumberFormat( +// sal_uLong nNumberAttr = (nTotalRows ? pDocument->GetNumberFormat( // ScAddress( pCols[nCol], nRow1, nTab1)) : 0); // pMemChart->SetNumFormatIdCol( static_cast(nCol), nNumberAttr ); } @@ -339,7 +339,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() } pMemChart->SetRowText( static_cast(nRow), aString); -// ULONG nNumberAttr = (nTotalCols ? pDocument->GetNumberFormat( +// sal_uLong nNumberAttr = (nTotalCols ? pDocument->GetNumberFormat( // ScAddress( nCol1, pRows[nRow], nTab1)) : 0); // pMemChart->SetNumFormatIdRow( static_cast(nRow), nNumberAttr ); } @@ -358,7 +358,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() // Zahlen-Typ // -// ULONG nNumberAttr = (nTotalCols && nTotalRows ? +// sal_uLong nNumberAttr = (nTotalCols && nTotalRows ? // pDocument->GetNumberFormat( ScAddress( nCol1, nRow1, nTab1)) : // 0); // if (pFormatter) @@ -389,15 +389,15 @@ ScMemChart* ScChartArray::CreateMemChartMulti() nRowCount = 0; } - BOOL bValidData = TRUE; + sal_Bool bValidData = sal_True; if ( !nColCount ) { - bValidData = FALSE; + bValidData = sal_False; nColCount = 1; } if ( !nRowCount ) { - bValidData = FALSE; + bValidData = sal_False; nRowCount = 1; } @@ -410,8 +410,8 @@ ScMemChart* ScChartArray::CreateMemChartMulti() if (pMemChart) { // pMemChart->SetNumberFormatter( pDocument->GetFormatTable() ); - 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++ ) @@ -431,7 +431,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 ); } } @@ -464,7 +464,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 ); } } @@ -509,7 +509,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti() } pMemChart->SetColText( static_cast(nCol), aString); -// ULONG nNumberAttr = 0; +// sal_uLong nNumberAttr = 0; // pPos = GetPositionMap()->GetPosition( nCol, 0 ); // if ( pPos ) // nNumberAttr = pDocument->GetNumberFormat( *pPos ); @@ -542,7 +542,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti() } pMemChart->SetRowText( static_cast(nRow), aString); -// ULONG nNumberAttr = 0; +// sal_uLong nNumberAttr = 0; // pPos = GetPositionMap()->GetPosition( 0, nRow ); // if ( pPos ) // nNumberAttr = pDocument->GetNumberFormat( *pPos ); @@ -566,14 +566,14 @@ ScMemChart* ScChartArray::CreateMemChartMulti() // SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); // if (pFormatter) // { -// ULONG nIndex = 0; -// ULONG nCount = GetPositionMap()->GetCount(); +// sal_uLong nIndex = 0; +// sal_uLong nCount = GetPositionMap()->GetCount(); // const ScAddress* pPos; // do // { // pPos = GetPositionMap()->GetPosition( nIndex ); // } while ( !pPos && ++nIndex < nCount ); -// ULONG nFormat = ( pPos ? pDocument->GetNumberFormat( *pPos ) : 0 ); +// sal_uLong nFormat = ( pPos ? pDocument->GetNumberFormat( *pPos ) : 0 ); // pMemChart->SetDataType( pFormatter->GetType( nFormat ) ); // } @@ -601,15 +601,15 @@ 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 sal_False; - for (USHORT i=0; iGetDrawLayer(); if (!pModel) return 0; - USHORT nFound = 0; + sal_uInt16 nFound = 0; - USHORT nPageCount = pModel->GetPageCount(); - for (USHORT nPageNo=0; nPageNoGetPageCount(); + for (sal_uInt16 nPageNo=0; nPageNoGetPage(nPageNo); DBG_ASSERT(pPage,"Page ?"); @@ -72,12 +72,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 = sal_False; + sal_Bool bRowHeaders = sal_False; pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders ); bHit = aRanges.In( rPos ); } @@ -93,31 +93,31 @@ 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? - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - ULONG nCount = rRanges.Count(); - for (ULONG i=0; iaStart.Tab() == nSourceTab && pRange->aEnd.Tab() == nSourceTab ) { pRange->aStart.SetTab( nDestTab ); pRange->aEnd.SetTab( nDestTab ); - bChanged = TRUE; + bChanged = sal_True; } if ( pRange->aStart.Tab() >= nTabCount ) { pRange->aStart.SetTab( nTabCount > 0 ? ( nTabCount - 1 ) : 0 ); - bChanged = TRUE; + bChanged = sal_True; } if ( pRange->aEnd.Tab() >= nTabCount ) { pRange->aEnd.SetTab( nTabCount > 0 ? ( nTabCount - 1 ) : 0 ); - bChanged = TRUE; + bChanged = sal_True; } } @@ -129,15 +129,15 @@ BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, S // === ScChartHelper ====================================== //static -USHORT ScChartHelper::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc ) +sal_uInt16 ScChartHelper::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc ) { - return lcl_DoUpdateCharts( rPos, pDoc, FALSE ); + return lcl_DoUpdateCharts( rPos, pDoc, sal_False ); } //static -USHORT ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc ) +sal_uInt16 ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc ) { - return lcl_DoUpdateCharts( ScAddress(), pDoc, TRUE ); + return lcl_DoUpdateCharts( ScAddress(), pDoc, sal_True ); } //static diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index b729ce0b30b5..411d5d6c72e8 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -131,9 +131,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, mpTokens(new vector), pUnoData( NULL ), pDoc( pDocP ), - bUsed( FALSE ), - bDirty( FALSE ), - bSeriesRangesScheduled( FALSE ) + bUsed( sal_False ), + bDirty( sal_False ), + bSeriesRangesScheduled( sal_False ) { SetRangeList( rRange ); } @@ -146,9 +146,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, mpTokens(new vector), pUnoData( NULL ), pDoc( pDocP ), - bUsed( FALSE ), - bDirty( FALSE ), - bSeriesRangesScheduled( FALSE ) + bUsed( sal_False ), + bDirty( sal_False ), + bSeriesRangesScheduled( sal_False ) { ScRefTokenHelper::getTokensFromRangeList(*mpTokens, *rRangeList); } @@ -160,9 +160,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, vector mpTokens(pTokens), pUnoData( NULL ), pDoc( pDocP ), - bUsed( FALSE ), - bDirty( FALSE ), - bSeriesRangesScheduled( FALSE ) + bUsed( sal_False ), + bDirty( sal_False ), + bSeriesRangesScheduled( sal_False ) { } @@ -173,7 +173,7 @@ ScChartListener::ScChartListener( const ScChartListener& r ) : mpTokens(new vector(*r.mpTokens)), pUnoData( NULL ), pDoc( r.pDoc ), - bUsed( FALSE ), + bUsed( sal_False ), bDirty( r.bDirty ), bSeriesRangesScheduled( r.bSeriesRangesScheduled ) { @@ -260,7 +260,7 @@ void ScChartListener::Update() } if ( pUnoData ) { - bDirty = FALSE; + bDirty = sal_False; //! irgendwann mal erkennen, was sich innerhalb des Charts geaendert hat chart::ChartDataChangeEvent aEvent( pUnoData->GetSource(), chart::ChartDataChangeType_ALL, @@ -269,7 +269,7 @@ void ScChartListener::Update() } else if ( pDoc->GetAutoCalc() ) { - bDirty = FALSE; + bDirty = sal_False; pDoc->UpdateChart( GetString()); } } @@ -381,13 +381,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 ); } @@ -395,7 +395,7 @@ void ScChartListener::UpdateScheduledSeriesRanges() { if ( bSeriesRangesScheduled ) { - bSeriesRangesScheduled = FALSE; + bSeriesRangesScheduled = sal_False; UpdateSeriesRanges(); } } @@ -435,7 +435,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()); @@ -471,7 +471,7 @@ ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& r } ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) : - ScStrCollection( 4, 4, FALSE ), + ScStrCollection( 4, 4, sal_False ), pDoc( pDocP ) { aTimer.SetTimeoutHdl( LINK( this, ScChartListenerCollection, TimerHdl ) ); @@ -502,18 +502,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 ]; @@ -527,13 +527,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 @@ -541,7 +541,7 @@ void ScChartListenerCollection::FreeUnused() if ( !pCL->IsUno() ) { if ( pCL->IsUsed() ) - pCL->SetUsed( FALSE ); + pCL->SetUsed( sal_False ); else Free( pCL ); } @@ -552,7 +552,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() && @@ -584,7 +584,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() ) @@ -597,24 +597,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 = sal_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 ) @@ -624,16 +624,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 ) @@ -643,15 +643,15 @@ void ScChartListenerCollection::SetDiffDirty( void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange ) { - BOOL bDirty = FALSE; - for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ ) + sal_Bool bDirty = sal_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 ) @@ -669,7 +669,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(); @@ -680,7 +680,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 ); @@ -688,19 +688,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 sal_False; + for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ ) { if ( *((ScChartListener*) pItems[ nIndex ]) != *((ScChartListener*) r.pItems[ nIndex ]) ) - return FALSE; + return sal_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 58ee1b06f7f7..72a480626267 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -44,9 +44,9 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, SCTAB nTab, eGlue( SC_CHARTGLUE_NA ), nStartCol(0), nStartRow(0), - bColHeaders( FALSE ), - bRowHeaders( FALSE ), - bDummyUpperLeft( FALSE ) + bColHeaders( sal_False ), + bRowHeaders( sal_False ), + bDummyUpperLeft( sal_False ) { SetRangeList( ScRange( nStartColP, nStartRowP, nTab, nEndColP, nEndRowP, nTab ) ); CheckColRowHeaders(); @@ -59,9 +59,9 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, const ScRangeListRef& rR eGlue( SC_CHARTGLUE_NA ), nStartCol(0), nStartRow(0), - bColHeaders( FALSE ), - bRowHeaders( FALSE ), - bDummyUpperLeft( FALSE ) + bColHeaders( sal_False ), + bRowHeaders( sal_False ), + bDummyUpperLeft( sal_False ) { if ( aRangeListRef.Is() ) CheckColRowHeaders(); @@ -85,7 +85,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 @@ -103,7 +103,7 @@ void ScChartPositioner::GlueState() { if ( eGlue != SC_CHARTGLUE_NA ) return; - bDummyUpperLeft = FALSE; + bDummyUpperLeft = sal_False; ScRangePtr pR; if ( aRangeListRef->Count() <= 1 ) { @@ -124,7 +124,7 @@ void ScChartPositioner::GlueState() } return; } -// ULONG nOldPos = aRangeListRef->GetCurPos(); +// sal_uLong nOldPos = aRangeListRef->GetCurPos(); pR = aRangeListRef->First(); nStartCol = pR->aStart.Col(); @@ -161,7 +161,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 @@ -171,13 +171,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; - BYTE* p; - BYTE* pA = new BYTE[ nCR ]; - memset( pA, 0, nCR * sizeof(BYTE) ); + 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; @@ -189,17 +189,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 = sal_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 ) @@ -207,21 +207,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 = sal_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 = sal_False; for ( nRow = 0; bGlue && nRow < nR; nRow++ ) { // Zeilen probieren durchzugehen und als frei markieren p = pA + nRow; @@ -230,28 +230,28 @@ void ScChartPositioner::GlueState() if ( *p == nOccu ) { if ( nCol > 0 && nRow > 0 ) - bGlue = FALSE; // nRow==0 kann DummyUpperLeft sein + bGlue = sal_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 = sal_False; } if ( bGlue ) { @@ -262,7 +262,7 @@ void ScChartPositioner::GlueState() else eGlue = SC_CHARTGLUE_COLS; if ( *pA != nOccu ) - bDummyUpperLeft = TRUE; + bDummyUpperLeft = sal_True; } else { @@ -278,37 +278,37 @@ 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->Count() == 1 ) { aRangeListRef->First()->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); if ( nCol1 > nCol2 || nRow1 > nRow2 ) - bColStrings = bRowStrings = FALSE; + bColStrings = bRowStrings = sal_False; else { for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++) { if (pDocument->HasValueData( iCol, nRow1, nTab1 )) - bColStrings = FALSE; + bColStrings = sal_False; } for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++) { if (pDocument->HasValueData( nCol1, iRow, nTab1 )) - bRowStrings = FALSE; + bRowStrings = sal_False; } } } else { - BOOL bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS); + sal_Bool bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS); for ( ScRangePtr pR = aRangeListRef->First(); pR && (bColStrings || bRowStrings); pR = aRangeListRef->Next() ) { 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 @@ -316,7 +316,7 @@ void ScChartPositioner::CheckColRowHeaders() for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++) { if (pDocument->HasValueData( nCol1, iRow, nTab1 )) - bRowStrings = FALSE; + bRowStrings = sal_False; } } if ( bColStrings && bTopRow ) @@ -325,7 +325,7 @@ void ScChartPositioner::CheckColRowHeaders() for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++) { if (pDocument->HasValueData( iCol, nRow1, nTab1 )) - bColStrings = FALSE; + bColStrings = sal_False; } } } @@ -368,7 +368,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; @@ -382,8 +382,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(nTab) << 16) | (bNoGlue ? 0 : - static_cast(nCol1)); + sal_uLong nInsCol = (static_cast(nTab) << 16) | (bNoGlue ? 0 : + static_cast(nCol1)); for ( nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol ) { if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS ) @@ -407,7 +407,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 ) ) @@ -470,11 +470,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 @@ -499,7 +499,7 @@ 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 ) { @@ -535,7 +535,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 ) @@ -569,7 +569,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]; } @@ -595,8 +595,8 @@ ScChartPositionMap::~ScChartPositionMap() //UNUSED2009-05 ScRangeListRef xRangeList = new ScRangeList; //UNUSED2009-05 if ( nChartCol < nColCount ) //UNUSED2009-05 { -//UNUSED2009-05 ULONG nStop = GetIndex( nChartCol, nRowCount ); -//UNUSED2009-05 for ( ULONG nIndex = GetIndex( nChartCol, 0 ); nIndex < nStop; nIndex++ ) +//UNUSED2009-05 sal_uLong nStop = GetIndex( nChartCol, nRowCount ); +//UNUSED2009-05 for ( sal_uLong nIndex = GetIndex( nChartCol, 0 ); nIndex < nStop; nIndex++ ) //UNUSED2009-05 { //UNUSED2009-05 if ( ppData[ nIndex ] ) //UNUSED2009-05 xRangeList->Join( *ppData[ nIndex ] ); @@ -611,8 +611,8 @@ ScChartPositionMap::~ScChartPositionMap() //UNUSED2009-05 ScRangeListRef xRangeList = new ScRangeList; //UNUSED2009-05 if ( nChartRow < nRowCount ) //UNUSED2009-05 { -//UNUSED2009-05 ULONG nStop = GetIndex( nColCount, nChartRow ); -//UNUSED2009-05 for ( ULONG nIndex = GetIndex( 0, nChartRow ); nIndex < nStop; +//UNUSED2009-05 sal_uLong nStop = GetIndex( nColCount, nChartRow ); +//UNUSED2009-05 for ( sal_uLong nIndex = GetIndex( 0, nChartRow ); nIndex < nStop; //UNUSED2009-05 nIndex += nRowCount ) //UNUSED2009-05 { //UNUSED2009-05 if ( ppData[ nIndex ] ) diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index ba3f3e47bfb7..3cabca7b7647 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -61,10 +61,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 @@ -115,7 +115,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) : @@ -137,7 +137,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 ), @@ -161,45 +161,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 sal_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 sal_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 sal_False; + return sal_True; } -BOOL ScChangeAction::IsClickable() const +sal_Bool ScChangeAction::IsClickable() const { //! sequence order of execution is significant if ( !IsVirgin() ) - return FALSE; + return sal_False; if ( IsDeletedIn() ) - return FALSE; + return sal_False; if ( GetType() == SC_CAT_CONTENT ) { ScChangeActionContentCellType eCCT = ScChangeActionContent::GetContentCellType( ((ScChangeActionContent*)this)->GetNewCell() ); if ( eCCT == SC_CACCT_MATREF ) - return FALSE; + return sal_False; if ( eCCT == SC_CACCT_MATORG ) { // no Accept-Select if one of the references is in a deleted col/row const ScChangeActionLinkEntry* pL = @@ -208,101 +208,101 @@ BOOL ScChangeAction::IsClickable() const { ScChangeAction* p = (ScChangeAction*) pL->GetAction(); if ( p && p->IsDeletedIn() ) - return FALSE; + return sal_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 sal_False; if ( GetType() == SC_CAT_CONTENT ) { if ( ((ScChangeActionContent*)this)->IsOldMatrixReference() ) - return FALSE; + return sal_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 sal_False; if ( IsDeletedIn() ) - return FALSE; + return sal_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 sal_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 sal_False; } -BOOL ScChangeAction::IsMasterDelete() const +sal_Bool ScChangeAction::IsMasterDelete() const { if ( !IsDeleteType() ) - return FALSE; + return sal_False; ScChangeActionDel* pDel = (ScChangeActionDel*) this; return pDel->IsMultiDelete() && (pDel->IsTopDelete() || pDel->IsRejectable()); } @@ -324,9 +324,9 @@ void ScChangeAction::RemoveAllAnyLinks() } -BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) +sal_Bool ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) { - BOOL bRemoved = FALSE; + sal_Bool bRemoved = sal_False; ScChangeActionLinkEntry* pL = GetDeletedIn(); while ( pL ) { @@ -334,7 +334,7 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) if ( pL->GetAction() == p ) { delete pL; - bRemoved = TRUE; + bRemoved = sal_True; } pL = pNextLink; } @@ -342,16 +342,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 sal_False; } @@ -363,7 +363,7 @@ void ScChangeAction::RemoveAllDeletedIn() } -BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const +sal_Bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const { ScChangeAction* p; ScChangeActionLinkEntry* pL = GetDeletedIn(); @@ -389,11 +389,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 sal_False; } @@ -433,14 +433,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 ) { @@ -483,7 +483,7 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */, else if (pReject->HasDependent()) { ScChangeActionTable aTable; - pCT->GetDependents( pReject, aTable, FALSE, TRUE ); + pCT->GetDependents( pReject, aTable, sal_False, sal_True ); for ( const ScChangeAction* p = aTable.First(); p; p = aTable.Next() ) { @@ -511,10 +511,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 @@ -560,7 +560,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 ); } @@ -603,7 +603,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(); @@ -622,7 +622,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack, } -void ScChangeAction::SetDeletedInThis( ULONG nActionNumber, +void ScChangeAction::SetDeletedInThis( sal_uLong nActionNumber, const ScChangeTrack* pTrack ) { if ( nActionNumber ) @@ -635,7 +635,7 @@ void ScChangeAction::SetDeletedInThis( ULONG nActionNumber, } -void ScChangeAction::AddDependent( ULONG nActionNumber, +void ScChangeAction::AddDependent( sal_uLong nActionNumber, const ScChangeTrack* pTrack ) { if ( nActionNumber ) @@ -687,14 +687,14 @@ String ScChangeAction::ToString( ScDocument* pDoc ) const } String aReference; - GetRefString( aReference, pDoc, TRUE ); + GetRefString( aReference, pDoc, sal_True ); String aAuthor = GetUser(); DateTime aDT = GetDateTime(); String aDate = ScGlobal::pLocaleData->getDate( aDT ); aDate += ' '; - aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE ); + aDate += ScGlobal::pLocaleData->getTime( aDT, sal_False, sal_False ); String aDescription; GetDescription( aDescription, pDoc ); @@ -823,7 +823,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) : @@ -837,11 +837,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 : @@ -864,15 +864,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 sal_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 sal_False; switch ( GetType() ) { @@ -892,7 +892,7 @@ BOOL ScChangeActionIns::Reject( ScDocument* pDoc ) } SetState( SC_CAS_REJECTED ); RemoveAllLinks(); - return TRUE; + return sal_True; } @@ -936,7 +936,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 : @@ -976,40 +976,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 sal_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 sal_False; } -BOOL ScChangeActionDel::IsTabDeleteCol() const +sal_Bool ScChangeActionDel::IsTabDeleteCol() const { if ( GetType() != SC_CAT_DELETE_COLS ) - return FALSE; + return sal_False; const ScChangeAction* p = this; while ( p && p->GetType() == SC_CAT_DELETE_COLS && !((const ScChangeActionDel*)p)->IsTopDelete() ) @@ -1020,7 +1020,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() ) @@ -1066,11 +1066,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 : @@ -1105,12 +1105,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 sal_False; - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( IsTopDelete() ) { // den kompletten Bereich in einem Rutsch restaurieren @@ -1120,30 +1120,30 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) if ( GetType() == SC_CAT_DELETE_TABS ) { // wird Tab angehaengt? if ( aTmpRange.aStart.Tab() > pDoc->GetMaxTableNumber() ) - bOk = FALSE; + bOk = sal_False; } else - bOk = FALSE; + bOk = sal_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 ) ) != sal_False ) bOk = pDoc->InsertCol( aRange ); } break; case SC_CAT_DELETE_ROWS : - if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != FALSE ) + if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != sal_False ) bOk = pDoc->InsertRow( aRange ); break; case SC_CAT_DELETE_TABS : @@ -1151,7 +1151,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 ) ) != sal_False ) bOk = pDoc->InsertTab( aRange.aStart.Tab(), aName ); } break; @@ -1160,13 +1160,13 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) // added to avoid warnings } } - pTrack->SetInDelete( FALSE ); - pTrack->SetInDeleteUndo( FALSE ); + pTrack->SetInDelete( sal_False ); + pTrack->SetInDeleteUndo( sal_False ); } if ( !bOk ) { - pTrack->SetInDeleteTop( FALSE ); - return FALSE; + pTrack->SetInDeleteTop( sal_False ); + return sal_False; } // InDeleteTop fuer UpdateReference-Undo behalten } @@ -1174,9 +1174,9 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) // setzt rejected und ruft UpdateReference-Undo und DeleteCellEntries RejectRestoreContents( pTrack, GetDx(), GetDy() ); - pTrack->SetInDeleteTop( FALSE ); + pTrack->SetInDeleteTop( sal_False ); RemoveAllLinks(); - return TRUE; + return sal_True; } @@ -1264,7 +1264,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 : @@ -1299,14 +1299,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; @@ -1317,11 +1317,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 ) ); @@ -1343,7 +1343,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() ); @@ -1354,15 +1354,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 sal_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 ) @@ -1370,7 +1370,7 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc ) aFrmRange.aStart.Col(), aFrmRange.aStart.Row(), aFrmRange.aEnd.Col(), aFrmRange.aEnd.Row() ); if ( !bOk ) - return FALSE; + return sal_False; pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // zu movende Contents @@ -1412,17 +1412,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 ) @@ -1443,7 +1443,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 ) : @@ -1508,7 +1508,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 ); @@ -1532,8 +1532,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; @@ -1565,7 +1565,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; @@ -1597,7 +1597,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 ); @@ -1632,9 +1632,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(); @@ -1666,25 +1666,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 sal_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 sal_False; ScChangeActionContent* pContent = this; // accept previous contents @@ -1739,7 +1739,7 @@ BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack, else SetState( SC_CAS_ACCEPTED ); - return TRUE; + return sal_True; } @@ -1761,7 +1761,7 @@ void ScChangeActionContent::GetStringOfCell( String& rStr, // static 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 ) ) { @@ -1829,7 +1829,7 @@ ScChangeActionContentCellType ScChangeActionContent::GetContentCellType( const S // static -BOOL ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell ) +sal_Bool ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell ) { return pCell && pCell->GetCellType() == CELLTYPE_VALUE; } @@ -1840,14 +1840,14 @@ 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 ); } // static 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(); @@ -1866,7 +1866,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, } break; case CELLTYPE_FORMULA : - ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE ); + ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True ); break; default: { @@ -1881,7 +1881,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, // static void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell, - ULONG nFormat, const ScDocument* pDoc ) + sal_uLong nFormat, const ScDocument* pDoc ) { rStr.Erase(); if ( pCell ) @@ -1896,7 +1896,7 @@ void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell, } break; case CELLTYPE_FORMULA : - ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE ); + ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True ); break; default: { @@ -2035,19 +2035,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 ) { @@ -2056,19 +2056,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 ); } } } @@ -2076,7 +2076,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 ); @@ -2090,8 +2090,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() ) @@ -2195,7 +2195,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) @@ -2269,13 +2269,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 = sal_False; + bInDelete = sal_False; + bInDeleteTop = sal_False; + bInDeleteUndo = sal_False; + bInPasteCut = sal_False; + bUseFixDateTime = sal_False; + bTime100thSeconds = sal_True; const SvtUserOptions& rUserOpt = SC_MOD()->GetUserOptions(); aUser = rUserOpt.GetFirstName(); @@ -2342,7 +2342,7 @@ void __EXPORT ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster if ( !pDoc->IsInDtorClear() ) { const SvtUserOptions& rUserOptions = SC_MOD()->GetUserOptions(); - USHORT nOldCount = aUserCollection.GetCount(); + sal_uInt16 nOldCount = aUserCollection.GetCount(); String aStr( rUserOptions.GetFirstName() ); aStr += ' '; @@ -2377,7 +2377,7 @@ void ScChangeTrack::SetUser( const String& rUser ) void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType, - ULONG nStartAction ) + sal_uLong nStartAction ) { if ( aModifiedLink.IsSet() ) { @@ -2390,7 +2390,7 @@ void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType, } -void ScChangeTrack::EndBlockModify( ULONG nEndAction ) +void ScChangeTrack::EndBlockModify( sal_uLong nEndAction ) { if ( aModifiedLink.IsSet() ) { @@ -2408,12 +2408,12 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction ) } if ( !pBlockModifyMsg ) { - BOOL bNew = FALSE; + sal_Bool bNew = sal_False; ScChangeTrackMsgInfo* pMsg; while ( ( pMsg = aMsgStackFinal.Pop() ) != NULL ) { aMsgQueue.Put( pMsg ); - bNew = TRUE; + bNew = sal_True; } if ( bNew ) aModifiedLink.Call( this ); @@ -2423,7 +2423,7 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction ) void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType, - ULONG nStartAction, ULONG nEndAction ) + sal_uLong nStartAction, sal_uLong nEndAction ) { if ( aModifiedLink.IsSet() ) { @@ -2510,7 +2510,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; @@ -2524,7 +2524,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, sal_False ); if ( !pLast ) pFirst = pLast = pAppend; else @@ -2539,7 +2539,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, sal_False ); MasterLinks( pAppend ); if ( aModifiedLink.IsSet() ) @@ -2550,7 +2550,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 ); } } @@ -2568,7 +2568,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 ); @@ -2577,7 +2577,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 ); @@ -2603,7 +2603,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 ); } @@ -2619,7 +2619,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 ); } @@ -2633,7 +2633,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 ); } @@ -2642,7 +2642,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, { DBG_ERROR( "ScChangeTrack::AppendDeleteRange: Block not supported!" ); } - SetInDeleteTop( FALSE ); + SetInDeleteTop( sal_False ); } } EndBlockModify( GetActionMax() ); @@ -2651,7 +2651,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 ) @@ -2726,7 +2726,7 @@ void ScChangeTrack::AppendMove( const ScRange& rFromRange, // static -BOOL ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell, +sal_Bool ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell, const ScBaseCell* pNewCell ) { SCCOL nC1, nC2; @@ -2761,7 +2761,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos, 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; @@ -2835,7 +2835,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 ) @@ -2851,11 +2851,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 = sal_False; + SetInPasteCut( sal_True ); // Paste und Cut abstimmen, Paste kann groesserer Range sein ScRange aRange( rRange ); ScBigRange& r = pLastCutMove->GetBigRange(); @@ -2864,21 +2864,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 @@ -2892,11 +2892,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange, Append( pLastCutMove ); pLastCutMove = NULL; ResetLastCut(); - SetInPasteCut( FALSE ); + SetInPasteCut( sal_False ); } else { - bDoContents = TRUE; + bDoContents = sal_True; nStartAction = GetActionMax() + 1; StartBlockModify( SC_CTM_APPEND, nStartAction ); } @@ -2928,7 +2928,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() ) @@ -2956,7 +2956,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 ); @@ -3016,7 +3016,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; @@ -3057,7 +3057,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 ); } } @@ -3117,10 +3117,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)) ) @@ -3214,7 +3214,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; @@ -3243,7 +3243,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 ); } } @@ -3263,7 +3263,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 ) @@ -3281,7 +3281,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 && @@ -3293,13 +3293,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( sal_False ); Remove( pAct ); if ( IsInPasteCut() ) aPasteCutTable.Insert( pAct->GetActionNumber(), pAct ); @@ -3308,14 +3308,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 ) @@ -3356,22 +3356,22 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) // static -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 sal_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 ) { @@ -3385,13 +3385,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( sal_False ); pAct->DeleteCellEntries(); // sonst GPF bei Track Clear() } pAct = ( pAct == pFirstMerge ? NULL : pAct->GetPrev() ); @@ -3401,7 +3401,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 ) ) @@ -3411,45 +3411,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, sal_False ); + SetInDeleteTop( sal_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( sal_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 @@ -3458,8 +3458,8 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo ) bUndo ); UpdateReference( &pFirst, pAct, bUndo ); - SetInDelete( FALSE ); - SetInDeleteUndo( FALSE ); + SetInDelete( sal_False ); + SetInDeleteUndo( sal_False ); pDoc->SetExpandRefs( bOldExpandRefs ); pDoc->SetNoListening( bOldNoListening ); @@ -3468,18 +3468,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 = sal_False; switch ( eActType ) { case SC_CAT_INSERT_COLS : @@ -3498,19 +3498,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; @@ -3552,7 +3552,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 @@ -3562,7 +3562,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 = sal_False; } else if ( p->GetType() == SC_CAT_CONTENT && p->IsDeletedInDelType( eInsType ) ) @@ -3570,7 +3570,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 = sal_False; else { const ScChangeActionLinkEntry* pLink = p->GetDeletedIn(); @@ -3579,7 +3579,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, const ScChangeAction* pDel = pLink->GetAction(); if ( pDel && pDel->GetType() == eInsType && pDel->GetBigRange().In( aDelRange ) ) - bUpdate = FALSE; + bUpdate = sal_False; pLink = pLink->GetNext(); } } @@ -3600,7 +3600,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, if ( bGeneratedDelContents ) pActDel->AddContent( (ScChangeActionContent*) p ); } - bUpdate = FALSE; + bUpdate = sal_False; } else { @@ -3765,7 +3765,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 @@ -3790,18 +3790,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, // geloescht wird in DeleteCellEntries } } - bUpdate = FALSE; + bUpdate = sal_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 = sal_False; } if ( p->GetType() == eActType && pActDel->IsDeletedIn( p ) ) { pActDel->RemoveDeletedIn( p ); // "druntergerutscht" - bUpdate = TRUE; + bUpdate = sal_True; } } if ( bUpdate ) @@ -3817,7 +3817,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 ) @@ -3867,7 +3867,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 ) @@ -4026,13 +4026,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; @@ -4048,7 +4048,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 ); @@ -4095,7 +4095,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 ) @@ -4144,7 +4144,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 ); @@ -4188,7 +4188,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 ); @@ -4214,10 +4214,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 sal_False; ScChangeActionContent* pContent = (ScChangeActionContent*) pAct; if ( bOldest ) @@ -4230,7 +4230,7 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest ) } if ( !pContent->IsClickable() ) - return FALSE; + return sal_False; ScBigRange aBigRange( pContent->GetBigRange() ); const ScBaseCell* pCell = (bOldest ? pContent->GetOldCell() : @@ -4245,16 +4245,16 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest ) } if ( !aBigRange.IsValid( pDoc ) ) - return FALSE; + return sal_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 sal_False; if ( pContent->HasDependent() ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; Stack aRejectActions; const ScChangeActionLinkEntry* pL = pContent->GetFirstDependentEntry(); while ( pL ) @@ -4302,28 +4302,28 @@ void ScChangeTrack::AcceptAll() } -BOOL ScChangeTrack::Accept( ScChangeAction* pAct ) +sal_Bool ScChangeTrack::Accept( ScChangeAction* pAct ) { if ( !pAct->IsClickable() ) - return FALSE; + return sal_False; if ( pAct->IsDeleteType() || pAct->GetType() == SC_CAT_CONTENT ) { ScChangeActionTable aActionTable; - GetDependents( pAct, aActionTable, FALSE, TRUE ); + GetDependents( pAct, aActionTable, sal_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() ) @@ -4333,7 +4333,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. @@ -4341,29 +4341,29 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared ) pAct->RemoveAllDeletedIn(); if ( !pAct->IsRejectable() ) - return FALSE; + return sal_False; ScChangeActionTable* pTable = NULL; if ( pAct->HasDependent() ) { pTable = new ScChangeActionTable; - GetDependents( pAct, *pTable, FALSE, TRUE ); + GetDependents( pAct, *pTable, sal_False, sal_True ); } - BOOL bRejected = Reject( pAct, pTable, FALSE ); + sal_Bool bRejected = Reject( pAct, pTable, sal_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 sal_False; - BOOL bOk = TRUE; - BOOL bRejected = FALSE; + sal_Bool bOk = sal_True; + sal_Bool bRejected = sal_False; if ( pAct->IsInsertType() ) { if ( pAct->HasDependent() && !bRecursion ) @@ -4377,10 +4377,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 )) != sal_False ) { // pRefDoc NULL := geloeschte Zellen nicht speichern AppendDeleteRange( pAct->GetBigRange().MakeRange(), NULL, (short) 0, @@ -4391,11 +4391,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 ) @@ -4405,14 +4405,14 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } } else - bTabDel = bTabDelOk = FALSE; + bTabDel = bTabDelOk = sal_False; ScChangeActionDel* pDel = (ScChangeActionDel*) pAct; if ( bOk ) { aDelRange = pDel->GetOverAllRange(); bOk = aDelRange.IsValid( pDoc ); } - BOOL bOneOk = FALSE; + sal_Bool bOneOk = sal_False; if ( bOk ) { ScChangeActionType eActType = pAct->GetType(); @@ -4433,7 +4433,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } } ScChangeAction* p = pAct; - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; do { pDel = (ScChangeActionDel*) p; @@ -4460,10 +4460,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } } else - bOneOk = TRUE; + bOneOk = sal_True; } if ( pDel->IsBaseDelete() ) - bLoop = FALSE; + bLoop = sal_False; else p = p->GetPrev(); } while ( bOk && bLoop && p && p->GetType() == eActType && @@ -4487,10 +4487,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 )) != sal_False ) { ScChangeActionMove* pReject = new ScChangeActionMove( pAct->GetBigRange().MakeRange(), @@ -4512,7 +4512,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 )) != sal_False && !bRecursion ) { pReject->SetNewValue( pDoc->GetCell( aRange.aStart ), pDoc ); pReject->SetRejectAction( pAct->GetActionNumber() ); @@ -4531,7 +4531,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 ) @@ -4733,7 +4733,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 ) { @@ -4767,7 +4767,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 ac587db2bd12..a1fad7dcfeb1 100644 --- a/sc/source/core/tool/chgviset.cxx +++ b/sc/source/core/tool/chgviset.cxx @@ -90,16 +90,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(pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos)); + nTheFlag=sal::static_int_cast(pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos)); } return nTheFlag; } @@ -116,7 +116,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,sal_False,sal_False,sal_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 c7aa72343fbb..ec91244aaa34 100644 --- a/sc/source/core/tool/collect.cxx +++ b/sc/source/core/tool/collect.cxx @@ -48,17 +48,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 ), @@ -93,8 +93,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)) { @@ -123,7 +123,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) { @@ -131,8 +131,8 @@ BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject) { ScDataObject** pNewItems = new ScDataObject*[nLimit + nDelta]; if (!pNewItems) - return FALSE; - nLimit = sal::static_int_cast( nLimit + nDelta ); + return sal_False; + nLimit = sal::static_int_cast( nLimit + nDelta ); memmove(pNewItems, pItems, nCount * sizeof(ScDataObject*)); delete[] pItems; pItems = pNewItems; @@ -141,21 +141,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 sal_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]; @@ -165,10 +165,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; } @@ -185,7 +185,7 @@ ScCollection& ScCollection::operator=( const ScCollection& r ) nLimit = r.nLimit; nDelta = r.nDelta; pItems = new ScDataObject*[nLimit]; - for ( USHORT i=0; iClone(); return *this; @@ -202,7 +202,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) { @@ -210,9 +210,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 @@ -221,10 +221,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 = sal_False; short nLo = 0; short nHi = nCount - 1; short nIndex; @@ -240,7 +240,7 @@ BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) con nHi = nIndex - 1; if (nCompare == 0) { - bFound = TRUE; + bFound = sal_True; nLo = nIndex; } } @@ -251,16 +251,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 sal_False; } else return AtInsert(nIndex, pScDataObject); @@ -268,15 +268,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 sal_False; } else return AtInsert(nIndex, pScDataObject); @@ -284,21 +284,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; iHasValueData( nCol, nRow, nTab ) ) //UNUSED2008-05 { @@ -358,10 +358,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 = sal_False; } TypedScStrCollection::~TypedScStrCollection() @@ -371,12 +371,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; } @@ -423,13 +423,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 = sal_False; String aOldResult; if ( rPos != SCPOS_INVALID && rPos < nCount ) @@ -441,11 +441,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]; @@ -461,7 +461,7 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, { rResult = pData->aStrValue; rPos = i; - bFound = TRUE; + bFound = sal_True; break; } } @@ -470,11 +470,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; inStrType) @@ -489,7 +489,7 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, { rResult = pData->aStrValue; rPos = i; - bFound = TRUE; + bFound = sal_True; break; } } @@ -502,20 +502,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; inStrType && ScGlobal::GetpTransliteration()->isEqual( pData->aStrValue, rString ) ) { rString = pData->aStrValue; // String anpassen - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 828c9ae64c7d..348c0bf8f435 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -244,16 +244,16 @@ void dbg_call_generateMappingDiff() FormulaLanguage::ODFF); ScCompiler::OpCodeMapPtr xENUS = ScCompiler::GetOpCodeMap( FormulaLanguage::ENGLISH); - USHORT nPODF = xPODF->getSymbolCount(); - USHORT nODFF = xODFF->getSymbolCount(); - USHORT nENUS = xENUS->getSymbolCount(); + sal_uInt16 nPODF = xPODF->getSymbolCount(); + sal_uInt16 nODFF = xODFF->getSymbolCount(); + sal_uInt16 nENUS = xENUS->getSymbolCount(); printf( "%s\n", "This is a semicolon separated file, you may import it as such to Calc."); printf( "%s\n", "Spreadsheet functions name differences between PODF (ODF < 1.2) and ODFF (ODF >= 1.2), plus English UI names."); printf( "\nInternal OpCodes; PODF: %d; ODFF: %d; ENUS: %d\n", (int)nPODF, (int)nODFF, (int)nENUS); - USHORT nMax = ::std::max( ::std::max( nPODF, nODFF), nENUS); + sal_uInt16 nMax = ::std::max( ::std::max( nPODF, nODFF), nENUS); #define out(rStr) (ByteString( rStr, RTL_TEXTENCODING_UTF8).GetBuffer()) - for (USHORT i=0; i < nMax; ++i) + for (sal_uInt16 i=0; i < nMax; ++i) { const String& rPODF = xPODF->getSymbol(static_cast(i)); const String& rODFF = xODFF->getSymbol(static_cast(i)); @@ -308,14 +308,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, sal_False )); if (aIntName.Len()) { return true; @@ -413,9 +413,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 } @@ -441,7 +441,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; @@ -613,7 +613,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) @@ -968,7 +968,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); } @@ -1155,7 +1155,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); } @@ -1412,7 +1412,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 ); @@ -1614,7 +1614,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 ); @@ -1896,7 +1896,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); @@ -1982,7 +1982,7 @@ xub_StrLen ScCompiler::NextSymbol(bool bInArray) while ((c != 0) && (eState != ssStop) ) { pSrc++; - ULONG nMask = GetCharTableFlags( c ); + sal_uLong nMask = GetCharTableFlags( c ); // The parameter separator and the array column and row separators end // things unconditionally if not in string or reference. if (c == cSep || (bInArray && (c == cArrayColSep || c == cArrayRowSep))) @@ -2417,7 +2417,7 @@ Label_MaskStateMachine: nSrcPos = sal::static_int_cast( nSrcPos + nSpaces ); String aSymbol; mnRangeOpPosInSymbol = -1; - USHORT nErr = 0; + sal_uInt16 nErr = 0; do { bi18n = false; @@ -2486,10 +2486,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; @@ -2532,7 +2532,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 } } @@ -2556,13 +2556,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 sal_False; } } if (!aIntName.Len()) { // Old (deprecated) addins first for legacy. - USHORT nIndex; + sal_uInt16 nIndex; bFound = ScGlobal::GetFuncCollection()->SearchFunc( cSymbol, nIndex); if (bFound) { @@ -2571,7 +2571,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()); @@ -2581,7 +2581,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; @@ -2601,10 +2601,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 = sal_False; + sal_uInt16 i; for( i = ocInternalBegin; i <= ocInternalEnd && !bFound; i++ ) bFound = rName.EqualsAscii( pInternal[ i-ocInternalBegin ] ); @@ -2618,16 +2618,16 @@ 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() ? pDoc->GetFormatTable()->GetStandardIndex( LANGUAGE_ENGLISH_US ) : 0 ); -// ULONG nIndex = 0; -//// ULONG nIndex = pDoc->GetFormatTable()->GetStandardIndex(ScGlobal::eLnge); +// sal_uLong nIndex = 0; +//// sal_uLong nIndex = pDoc->GetFormatTable()->GetStandardIndex(ScGlobal::eLnge); 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 @@ -2635,7 +2635,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 sal_False; if (nType == NUMBERFORMAT_LOGICAL) { @@ -2643,12 +2643,12 @@ BOOL ScCompiler::IsValue( const String& rSym ) while( *p == ' ' ) p++; if (*p == '(') - return FALSE; // Boolean function instead. + return sal_False; // Boolean function instead. } if( aFormula.GetChar(nSrcPos) == '.' ) // numerical sheet name? - return FALSE; + return sal_False; if( nType == NUMBERFORMAT_TEXT ) // HACK: number too big! @@ -2656,23 +2656,23 @@ BOOL ScCompiler::IsValue( const String& rSym ) ScRawToken aToken; aToken.SetDouble( fVal ); pRawToken = aToken.Clone(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } -BOOL ScCompiler::IsString() +sal_Bool ScCompiler::IsString() { register const sal_Unicode* p = cSymbol; while ( *p ) p++; xub_StrLen nLen = sal::static_int_cast( 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 sal_False; } if ( bQuote ) { @@ -2680,13 +2680,13 @@ BOOL ScCompiler::IsString() ScRawToken aToken; aToken.SetString( cSymbol+1 ); pRawToken = aToken.Clone(); - return TRUE; + return sal_True; } - return FALSE; + return sal_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!"); @@ -2738,12 +2738,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; @@ -2753,13 +2753,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) @@ -2780,12 +2780,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 ) ) @@ -2826,14 +2826,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 sal_False; // Who was that imbecile introducing '.' as the sheet name separator!?! if ( CharClass::isAsciiNumeric( ch1 ) ) { @@ -2848,12 +2848,12 @@ BOOL ScCompiler::IsReference( const String& rName ) { if (ScGlobal::FindUnquoted( rName, ':') != STRING_NOTFOUND) break; // may be 3:3, continue as usual - return FALSE; + return sal_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 sal_False; if ( cDecSep == '.' && (ch2 == 'E' || ch2 == 'e') // E + - digit && (GetCharTableFlags( pTabSep[2] ) & SC_COMPILER_C_VALUE_EXP) ) { // #91053# @@ -2870,7 +2870,7 @@ BOOL ScCompiler::IsReference( const String& rName ) String aTabName( rName.Copy( 0, nPos ) ); SCTAB nTab; if ( !pDoc->GetTable( aTabName, nTab ) ) - return FALSE; + return sal_False; // If sheet "1" exists and the expression is 1.E+2 continue as // usual, the ScRange/ScAddress parser will take care of it. } @@ -2918,7 +2918,7 @@ 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; @@ -2943,7 +2943,7 @@ BOOL ScCompiler::IsMacro( const String& rName ) if( !pMeth ) { pSfxApp->LeaveBasicCall(); - return FALSE; + return sal_False; } // It really should be a BASIC function! if( pMeth->GetType() == SbxVOID @@ -2951,21 +2951,21 @@ BOOL ScCompiler::IsMacro( const String& rName ) || !pMeth->ISA(SbMethod) ) { pSfxApp->LeaveBasicCall(); - return FALSE; + return sal_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 - USHORT n; + sal_uInt16 n; ScRangeName* pRangeName = pDoc->GetRangeName(); if (pRangeName->SearchNameUpper( rUpperName, n ) ) { @@ -2973,10 +2973,10 @@ BOOL ScCompiler::IsNamedRange( const String& rUpperName ) ScRawToken aToken; aToken.SetName( pData->GetIndex() ); pRawToken = aToken.Clone(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } bool ScCompiler::IsExternalNamedRange( const String& rSymbol ) @@ -3016,9 +3016,9 @@ bool ScCompiler::IsExternalNamedRange( const String& rSymbol ) #endif } -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 ) ) { @@ -3027,16 +3027,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 sal_False; } -BOOL ScCompiler::IsColRowName( const String& rName ) +sal_Bool ScCompiler::IsColRowName( const String& rName ) { - BOOL bInList = FALSE; - BOOL bFound = FALSE; + sal_Bool bInList = sal_False; + sal_Bool bFound = sal_False; ScSingleRefData aRef; String aName( rName ); DeQuote( aName ); @@ -3066,10 +3066,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( (eType == CELLTYPE_FORMULA ? + sal_Bool bOk = sal::static_int_cast( (eType == CELLTYPE_FORMULA ? ((ScFormulaCell*)pCell)->GetCode()->GetCodeLen() > 0 && ((ScFormulaCell*)pCell)->aPos != aPos // noIter - : TRUE ) ); + : sal_True ) ); if ( bOk && pCell->HasStringData() ) { String aStr; @@ -3101,11 +3101,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; } } } @@ -3117,7 +3117,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 = sal_False; ScAddress aOne( 0, 0, aPos.Tab() ); ScAddress aTwo( MAXCOL, MAXROW, aPos.Tab() ); @@ -3157,7 +3157,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; @@ -3167,7 +3167,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 = sal_False; aOne.Set( nCol, nRow, aAddress.Tab() ); nMax = Max( nMyCol + nC, nMyRow + nR ); nDistance = nD; @@ -3180,7 +3180,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; } } } @@ -3195,10 +3195,10 @@ BOOL ScCompiler::IsColRowName( const String& rName ) break; // aIter } CellType eType = pCell->GetCellType(); - BOOL bOk = sal::static_int_cast( (eType == CELLTYPE_FORMULA ? + sal_Bool bOk = sal::static_int_cast( (eType == CELLTYPE_FORMULA ? ((ScFormulaCell*)pCell)->GetCode()->GetCodeLen() > 0 && ((ScFormulaCell*)pCell)->aPos != aPos // noIter - : TRUE ) ); + : sal_True ) ); if ( bOk && pCell->HasStringData() ) { String aStr; @@ -3236,7 +3236,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; @@ -3246,7 +3246,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 = sal_False; aOne.Set( nCol, nRow, aIter.GetTab() ); nMax = Max( nMyCol + nC, nMyRow + nR ); nDistance = nD; @@ -3259,7 +3259,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; } } } @@ -3301,9 +3301,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 ); } } @@ -3313,13 +3313,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 sal_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() && @@ -3329,10 +3329,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 sal_False; } //--------------------------------------------------------------------------- @@ -3360,17 +3360,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 ) & SC_COMPILER_C_CHAR_VALUE) && (GetCharTableFlags( c2 ) & SC_COMPILER_C_CHAR_VALUE) ) @@ -3383,7 +3383,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 => * @@ -3392,7 +3392,7 @@ void ScCompiler::AutoCorrectParsedSymbol() while ( (nIndex = aCorrectedSymbol.SearchAndReplace( cX, c, nIndex )) != STRING_NOTFOUND ) nIndex++; - bCorrected = TRUE; + bCorrected = sal_True; } } else @@ -3407,16 +3407,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 A4 etc. String aTab[2], aRef[2]; @@ -3483,9 +3483,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 = sal_False; + sal_Bool bOk = sal_True; + sal_uInt16 nMask = SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW; for ( int j=0; j 255 ? 255 : nSpaces ); + aToken.sbyte.cByte = (sal_uInt8) ( nSpaces > 255 ? 255 : nSpaces ); if( !static_cast(pArr)->AddRawToken( aToken ) ) { SetError(errCodeOverflow); @@ -3593,7 +3593,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray ) if ( (cSymbol[0] == '#' || cSymbol[0] == '$') && cSymbol[1] == 0 && !bAutoCorrect ) { // #101100# special case to speed up broken [$]#REF documents - /* FIXME: ISERROR(#REF!) would be valid and TRUE and the formula to + /* FIXME: ISERROR(#REF!) would be valid and sal_True and the formula to * be processed as usual. That would need some special treatment, * also in NextSymbol() because of possible combinations of * #REF!.#REF!#REF! parts. In case of reading ODF that is all @@ -3720,7 +3720,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 ) { @@ -3750,13 +3750,13 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula ) aFormula.EraseLeadingChars(); aFormula.EraseTrailingChars(); nSrcPos = 0; - bCorrected = FALSE; + bCorrected = sal_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++; @@ -3811,7 +3811,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula ) SetError( errPairExpected ); if ( bAutoCorrect ) { - bCorrected = TRUE; + bCorrected = sal_True; aCorrectedSymbol.Erase(); } } @@ -3853,7 +3853,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula ) SetError( errPairExpected ); if ( bAutoCorrect ) { - bCorrected = TRUE; + bCorrected = sal_True; aCorrectedSymbol.Erase(); } } @@ -3973,12 +3973,12 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula, const String& r } -BOOL ScCompiler::HandleRange() +sal_Bool ScCompiler::HandleRange() { ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex( pToken->GetIndex() ); if (pRangeData) { - USHORT nErr = pRangeData->GetErrCode(); + sal_uInt16 nErr = pRangeData->GetErrCode(); if( nErr ) SetError( errNoName ); else if ( !bCompileForFAP ) @@ -3994,18 +3994,18 @@ BOOL ScCompiler::HandleRange() FormulaToken* p2 = pArr->PeekNextNoSpaces(); OpCode eOp1 = (p1 ? p1->GetOpCode() : static_cast( ocSep ) ); OpCode eOp2 = (p2 ? p2->GetOpCode() : static_cast( 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(); @@ -4016,7 +4016,7 @@ BOOL ScCompiler::HandleRange() { pNew = new ScTokenArray(); pNew->AddOpCode( ocOpen ); - PushTokenArray( pNew, TRUE ); + PushTokenArray( pNew, sal_True ); pNew->Reset(); } return GetToken(); @@ -4024,10 +4024,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()) @@ -4068,9 +4068,9 @@ BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken) } default: DBG_ERROR("Wrong type for external reference!"); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } @@ -4092,7 +4092,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() ) @@ -4103,24 +4103,24 @@ BOOL ScCompiler::HasModifiedRange() ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex(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 sal_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 ) @@ -4144,12 +4144,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 ); } } } @@ -4189,9 +4189,9 @@ void ScCompiler::MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddr ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, const ScAddress& rOldPos, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - BOOL& rChanged, BOOL& rRefSizeChanged ) + sal_Bool& rChanged, sal_Bool& rRefSizeChanged ) { - rChanged = rRefSizeChanged = FALSE; + rChanged = rRefSizeChanged = sal_False; if ( eUpdateRefMode == URM_COPY ) { // Normally nothing has to be done here since RelRefs are used, also // SharedFormulas don't need any special handling, except if they @@ -4213,7 +4213,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, SingleDoubleRefModifier( rRef ).Ref() ) != UR_NOTHING ) - rChanged = TRUE; + rChanged = sal_True; } } // Check for SharedFormulas. @@ -4238,14 +4238,14 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, for( t = static_cast(pArr->GetNextReferenceRPN()); t && !pRangeData; t = static_cast(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 @@ -4253,7 +4253,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, if (!bValid) { pRangeData = pName; - rChanged = TRUE; + rChanged = sal_True; } } } @@ -4282,7 +4282,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, { pRangeData = pName; // maybe need a replacement of shared with own code #if ! SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE - rChanged = TRUE; + rChanged = sal_True; #endif } } @@ -4307,7 +4307,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, SingleDoubleRefModifier( t->GetSingleRef()).Ref()) != UR_NOTHING) - rChanged = TRUE; + rChanged = sal_True; } break; default: @@ -4320,23 +4320,23 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, aPos, r, nDx, nDy, nDz, t->GetDoubleRef()) != UR_NOTHING) { - rChanged = TRUE; + rChanged = sal_True; if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols || rRef.Ref2.nRow - rRef.Ref1.nRow != nRows || rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs) - rRefSizeChanged = TRUE; + rRefSizeChanged = sal_True; } } } } } #if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE - BOOL bEasyShared, bPosInRange; + sal_Bool bEasyShared, bPosInRange; if ( !pRangeData ) - bEasyShared = bPosInRange = FALSE; + bEasyShared = bPosInRange = sal_False; else { - bEasyShared = TRUE; + bEasyShared = sal_True; bPosInRange = r.In( eUpdateRefMode == URM_MOVE ? aPos : rOldPos ); } #endif @@ -4346,7 +4346,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, if ( t->GetRef() != 1 ) { #if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE - bEasyShared = FALSE; + bEasyShared = sal_False; #endif } else @@ -4358,7 +4358,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, if ( rRef.IsRelName() ) { ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, aMod.Ref() ); - rChanged = TRUE; + rChanged = sal_True; } else { @@ -4367,7 +4367,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, r, nDx, nDy, nDz, aMod.Ref() ) != UR_NOTHING ) - rChanged = TRUE; + rChanged = sal_True; } #if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE if ( bEasyShared ) @@ -4375,7 +4375,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 = sal_False; } #endif } @@ -4388,7 +4388,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, if ( rRef.Ref1.IsRelName() || rRef.Ref2.IsRelName() ) { ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, rRef ); - rChanged = TRUE; + rChanged = sal_True; } else { @@ -4397,14 +4397,14 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, != UR_NOTHING ) { - rChanged = TRUE; + rChanged = sal_True; if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols || rRef.Ref2.nRow - rRef.Ref1.nRow != nRows || rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs) { - rRefSizeChanged = TRUE; + rRefSizeChanged = sal_True; #if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE - bEasyShared = FALSE; + bEasyShared = sal_False; #endif } } @@ -4416,7 +4416,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 = sal_False; } #endif } @@ -4428,7 +4428,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode, if ( bEasyShared ) pRangeData = 0; else - rChanged = TRUE; + rChanged = sal_True; } #endif #undef SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE @@ -4436,13 +4436,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 = sal_False; // set if relative reference + rChanged = sal_False; pArr->Reset(); ScToken* t; while ( (t = static_cast(pArr->GetNextReference())) != NULL ) @@ -4476,7 +4476,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; @@ -4552,12 +4552,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 = sal_False; ScToken* t; pArr->Reset(); if (bIsName) @@ -4591,7 +4591,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()) ) @@ -4608,7 +4608,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 @@ -4660,15 +4660,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 = sal_False; + sal_Bool bIsRel = sal_False; ScToken* t; pArr->Reset(); if (bIsName) @@ -4685,7 +4685,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!!! { @@ -4699,7 +4699,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 ) { @@ -4714,7 +4714,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 @@ -4722,14 +4722,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()) ) @@ -4742,7 +4742,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 ) { @@ -4751,14 +4751,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 @@ -4785,7 +4785,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 ) { @@ -4800,7 +4800,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 @@ -4808,9 +4808,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; } @@ -4826,7 +4826,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 ) { @@ -4835,9 +4835,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; } @@ -4850,7 +4850,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; @@ -4878,7 +4878,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab, else nOldPosTab = nPosTab - nDir; // moved by one - BOOL bIsRel = FALSE; + sal_Bool bIsRel = sal_False; ScToken* t; pArr->Reset(); if (bIsName) @@ -4912,7 +4912,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; @@ -4929,7 +4929,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; @@ -5093,7 +5093,7 @@ void ScCompiler::CreateStringFromMatrix( rtl::OUStringBuffer& rBuffer, AppendBoolean( rBuffer, pVal->GetBoolean() ); else { - USHORT nErr = pVal->GetError(); + sal_uInt16 nErr = pVal->GetError(); if( nErr ) rBuffer.append( ScGlobal::GetErrorString( nErr ) ); else @@ -5128,16 +5128,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(_pTokenP)->GetDoubleRef(), FALSE ); + pConv->MakeRefStr( rBuffer, *this, static_cast(_pTokenP)->GetDoubleRef(), sal_False ); } // ----------------------------------------------------------------------------- void ScCompiler::CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,FormulaToken* _pTokenP) @@ -5179,19 +5179,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 sal_False; xub_StrLen nPos = 0; while ( (nPos = rStr.Search( '\'', nPos)) != STRING_NOTFOUND ) @@ -5201,7 +5201,7 @@ BOOL ScCompiler::EnQuote( String& rStr ) } rStr.Insert( '\'', 0 ); rStr += '\''; - return TRUE; + return sal_True; } sal_Unicode ScCompiler::GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const @@ -5239,24 +5239,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((FormulaToken*)pToken)->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 = sal_False; + sal_Bool bValidName = sal_False; ScRangePairList* pRL = (bColName ? pDoc->GetColNameRanges() : pDoc->GetRowNameRanges()); ScRange aRange; @@ -5264,7 +5264,7 @@ BOOL ScCompiler::HandleSingleRef() { if ( pR->GetRange(0).In( aLook ) ) { - bInList = bValidName = TRUE; + bInList = bValidName = sal_True; aRange = pR->GetRange(1); if ( bColName ) { @@ -5281,12 +5281,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; @@ -5362,10 +5362,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(); @@ -5378,7 +5378,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 @@ -5398,7 +5398,7 @@ BOOL ScCompiler::HandleSingleRef() } } else - bFound = TRUE; + bFound = sal_True; } if ( !bFound ) SetError(errNoRef); @@ -5410,9 +5410,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 ); } @@ -5422,13 +5422,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 ) @@ -5438,17 +5438,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 ) @@ -5466,11 +5466,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; } String GetScCompilerNativeSymbol( OpCode eOp ) diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx index addd92082cfd..565a469de9f4 100644 --- a/sc/source/core/tool/consoli.cxx +++ b/sc/source/core/tool/consoli.cxx @@ -50,7 +50,7 @@ // STATIC DATA ----------------------------------------------------------- /* Strings bei Gelegenheit ganz raus... -static USHORT nFuncRes[] = { // Reihenfolge wie bei enum ScSubTotalFunc +static sal_uInt16 nFuncRes[] = { // Reihenfolge wie bei enum ScSubTotalFunc 0, // none STR_PIVOTFUNC_AVG, STR_PIVOTFUNC_COUNT, @@ -122,10 +122,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(sal_False), + bColByName(sal_False), + bRowByName(sal_False), + bSubTitles(sal_False), nColCount(0), nRowCount(0), ppUsed(NULL), @@ -139,7 +139,7 @@ ScConsData::ScConsData() : nTitleCount(0), ppTitles(NULL), ppTitlePos(NULL), - bCornerUsed(FALSE) + bCornerUsed(sal_False) { } @@ -151,7 +151,7 @@ ScConsData::~ScConsData() #define DELETEARR(ppArray,nCount) \ { \ - ULONG i; \ + sal_uLong i; \ if (ppArray) \ for(i=0; i(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; @@ -302,10 +302,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab, pSrcDoc->GetString( nCol, nRow1, nTab, aTitle ); if (aTitle.Len()) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (SCSIZE i=0; iGetString( nCol1, nRow, nTab, aTitle ); if (aTitle.Len()) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (SCSIZE i=0; i(i); - bFound = TRUE; + bFound = sal_True; } DBG_ASSERT(bFound, "Spalte nicht gefunden"); } @@ -596,12 +596,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, SCROW nPos = SC_CONS_NOTFOUND; if (aTitle.Len()) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for (SCSIZE i=0; i(i); - bFound = TRUE; + bFound = sal_True; } DBG_ASSERT(bFound, "Zeile nicht gefunden"); } @@ -613,7 +613,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; @@ -634,7 +634,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 ); } @@ -649,7 +649,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 ); @@ -745,12 +745,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; nArrYGetOutlineTable( 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 = sal_False; pOutArr->Insert( nOutStart, nOutEnd, bSize ); for (SCROW nOutRow=nOutStart; nOutRow<=nOutEnd; nOutRow++) - pDestDoc->ShowRow( nOutRow, nTab, FALSE ); - pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, FALSE ); + pDestDoc->ShowRow( nOutRow, nTab, sal_False ); + pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, sal_False ); // Zwischentitel @@ -832,10 +832,10 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, for (SCSIZE nPos=0; nPos nMaxRow || //UNUSED2008-05 nEndRow > nMaxRow || @@ -401,7 +401,7 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 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); @@ -414,7 +414,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] = sal_False; } } for (i=0; i nCol2) { nQueryField[i] = 0; - bDoQuery[i] = FALSE; + bDoQuery[i] = sal_False; } } for (i=0; i nCol2) { nSubField[i] = 0; - bDoSubTotal[i] = FALSE; + bDoSubTotal[i] = sal_False; } } @@ -455,7 +455,7 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const rSortParam.bIncludePattern = bIncludePattern; rSortParam.bUserDef = bSortUserDef; rSortParam.nUserIndex = nSortUserIndex; - for (USHORT i=0; i= nStartRow && nRow <= nEndRow ); } - return FALSE; + return sal_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)); } @@ -708,19 +708,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]; @@ -740,7 +740,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]; @@ -753,7 +753,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 ); @@ -761,7 +761,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 @@ -782,7 +782,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - for (USHORT i=0; iGetArea( 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) @@ -811,7 +811,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 } } @@ -826,7 +826,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) { // wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst - for (USHORT i=0; iSetArea( nTab, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(),aRange.aEnd .Row() ); @@ -860,9 +860,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) @@ -872,12 +872,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 977161760eb0..ae4cd2b92d72 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -50,19 +50,19 @@ TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster); #define DDE_TXT_ENCODING gsl_getSystemTextEncoding() -BOOL ScDdeLink::bIsInUpdate = FALSE; +sal_Bool ScDdeLink::bIsInUpdate = sal_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( sal_False ), pResult( NULL ) { } @@ -81,7 +81,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) : aTopic ( rOther.aTopic ), aItem ( rOther.aItem ), nMode ( rOther.nMode ), - bNeedUpdate( FALSE ), + bNeedUpdate( sal_False ), pResult ( NULL ) { if (rOther.pResult) @@ -91,7 +91,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( sal_False ), pResult( NULL ) { rHdr.StartEntry(); @@ -101,7 +101,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( rStream ); @@ -123,7 +123,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 (bHasValue) pResult->Store( rStream ); @@ -180,7 +180,7 @@ void __EXPORT 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 @@ -242,8 +242,8 @@ void ScDdeLink::ResetValue() void __EXPORT 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 @@ -263,16 +263,16 @@ void __EXPORT 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 = sal_True; //Application::Reschedule(); //! OS/2-Simulation pDoc->IncInDdeLinkUpdate(); Update(); pDoc->DecInDdeLinkUpdate(); - bIsInUpdate = FALSE; - bNeedUpdate = FALSE; + bIsInUpdate = sal_False; + bNeedUpdate = sal_False; } } diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx index a1add9ca6939..cf6de00ec008 100644 --- a/sc/source/core/tool/detdata.cxx +++ b/sc/source/core/tool/detdata.cxx @@ -46,17 +46,17 @@ SV_IMPL_PTRARR( ScDetOpArr_Impl, ScDetOpDataPtr ); ScDetOpList::ScDetOpList(const ScDetOpList& rList) : ScDetOpArr_Impl(), - bHasAddError( FALSE ) + bHasAddError( sal_False ) { - USHORT nCount = rList.Count(); + sal_uInt16 nCount = rList.Count(); - for (USHORT i=0; iGetPos(); SCCOL nCol1 = aPos.Col(); @@ -95,21 +95,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 everything greater 0 is a thick line @@ -183,28 +183,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( sal_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( sal_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( sal_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 ) ); } @@ -221,16 +221,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( sal_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( sal_False ) ); aCaptionSet.Put( SdrShadowXDistItem( 100 ) ); aCaptionSet.Put( SdrShadowYDistItem( 100 ) ); @@ -240,8 +240,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( sal_False ) ); + aCaptionSet.Put( SdrTextAutoGrowHeightItem( sal_True ) ); // #78943# do use the default cell style, so the user has a chance to // modify the font for the annotations @@ -258,9 +258,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, sal_False, &pPoolItem) == SFX_ITEM_SET) { switch(nWhich) { @@ -290,20 +290,20 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet ) void ScDetectiveFunc::Modified() { if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_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(); @@ -384,7 +384,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()) @@ -402,16 +402,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) { DBG_ERROR("bStartAlien && bEndAlien"); - return TRUE; + return sal_True; } Rectangle aStartRect; @@ -425,7 +425,7 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart, SdrPage* pPage = pModel->GetPage(static_cast(nTab)); DBG_ASSERT(pPage,"Page ?"); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SdrObjListIter aIter( *pPage, IM_FLAT ); SdrObject* pObject = aIter.Next(); while (pObject && !bFound) @@ -435,18 +435,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(); } @@ -454,38 +454,38 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart, return bFound; } -BOOL ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static +sal_Bool ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static { 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 sal_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(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 @@ -500,7 +500,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); } @@ -510,7 +510,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 ); @@ -542,7 +542,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 @@ -551,17 +551,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(nTab)); - BOOL bArea = ( nStartCol != nEndCol || nStartRow != nEndRow ); + sal_Bool bArea = ( nStartCol != nEndCol || nStartRow != nEndRow ); if (bArea) { Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow ); @@ -574,12 +574,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 ); @@ -609,12 +609,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; } //------------------------------------------------------------------------ @@ -626,16 +626,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 sal_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(), @@ -643,14 +643,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 sal_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(), @@ -678,14 +678,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 ); @@ -696,7 +696,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt ) pPage->RecalcObjOrdNums(); long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); if (nObjCount) { SdrObject** ppObj = new SdrObject*[nObjCount]; @@ -732,7 +732,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 @@ -771,7 +771,7 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR pPage->RecalcObjOrdNums(); long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); if (nObjCount) { SdrObject** ppObj = new SdrObject*[nObjCount]; @@ -807,10 +807,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(); @@ -838,8 +838,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 ); @@ -854,9 +854,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; @@ -872,8 +872,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 @@ -902,15 +902,15 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData } } - pFCell->SetRunning(FALSE); + pFCell->SetRunning(sal_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(); @@ -918,7 +918,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; } @@ -930,7 +930,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" ); @@ -947,21 +947,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 ? { @@ -974,7 +974,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 @@ -986,15 +986,15 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US } } - pFCell->SetRunning(FALSE); + pFCell->SetRunning(sal_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 ); @@ -1009,19 +1009,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 = sal_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; @@ -1036,7 +1036,7 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat } } - pFCell->SetRunning(FALSE); + pFCell->SetRunning(sal_False); // Blaetter ? if (!bHasError) @@ -1048,12 +1048,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, nTab, MAXCOL,MAXROW, nTab ); ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // alle Tabellen ScBaseCell* pCell = aCellIter.GetFirst(); @@ -1062,11 +1062,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; @@ -1078,8 +1078,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 @@ -1102,7 +1102,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 ); @@ -1138,13 +1138,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(); @@ -1153,11 +1153,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; @@ -1176,13 +1176,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(), sal_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) @@ -1205,16 +1205,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 sal_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 ); @@ -1225,16 +1225,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 sal_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 ); @@ -1245,56 +1245,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 sal_False; ScRange aRange( nCol, nRow, nTab ); ScAddress aErrPos; if ( !HasError( aRange,aErrPos ) ) - return FALSE; + return sal_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 sal_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 sal_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 sal_False; SdrPage* pPage = pModel->GetPage(static_cast(nTab)); DBG_ASSERT(pPage,"Page ?"); @@ -1302,7 +1302,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]; @@ -1313,11 +1313,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 @@ -1351,14 +1351,14 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat ) return ( nDelCount != 0 ); } -BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow) +sal_Bool ScDetectiveFunc::MarkInvalid(sal_Bool& rOverflow) { - rOverflow = FALSE; + rOverflow = sal_False; ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) - return FALSE; + return sal_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; @@ -1372,7 +1372,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 ); @@ -1380,7 +1380,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 ); @@ -1415,7 +1415,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow) } if ( nInsCount >= SC_DET_MAXCIRCLE ) - rOverflow = TRUE; + rOverflow = sal_True; return ( bDeleted || nInsCount != 0 ); } @@ -1484,12 +1484,12 @@ void ScDetectiveFunc::UpdateAllArrowColors() { if ( pObject->GetLayer() == SC_LAYER_INTERN ) { - BOOL bArrow = FALSE; - BOOL bError = FALSE; + sal_Bool bArrow = sal_False; + sal_Bool bError = sal_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 ) { @@ -1497,9 +1497,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 ) { @@ -1509,15 +1509,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 ) { @@ -1525,7 +1525,7 @@ void ScDetectiveFunc::UpdateAllArrowColors() if ( pObject->ISA( SdrRectObj ) && !pObject->ISA( SdrCaptionObj ) ) { - bArrow = TRUE; + bArrow = sal_True; } } @@ -1545,17 +1545,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 sal_False; SdrPage* pPage = pModel->GetPage(static_cast(nTab)); DBG_ASSERT(pPage,"Page ?"); - if (!pPage) return FALSE; + if (!pPage) return sal_False; // test if the object is a direct page member if( pObject && pObject->GetPage() && (pObject->GetPage() == pObject->GetObjList()) ) @@ -1573,18 +1573,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 sal_False; } ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject, SCTAB nObjTab, - ScAddress& rPosition, ScRange& rSource, BOOL& rRedLine ) + ScAddress& rPosition, ScRange& rSource, sal_Bool& rRedLine ) { - rRedLine = FALSE; + rRedLine = sal_False; ScDetectiveObjType eType = SC_DETOBJ_NONE; if ( pObject && pObject->GetLayer() == SC_LAYER_INTERN ) @@ -1617,7 +1617,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) ) { @@ -1637,7 +1637,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; @@ -1701,11 +1701,11 @@ void ScDetectiveFunc::InitializeColors() nErrorColor = rColorCfg.GetColorValue(svtools::CALCDETECTIVEERROR).nColor; nCommentColor = rColorCfg.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor; - bColorsInitialized = TRUE; + bColorsInitialized = sal_True; } // static -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 95ce357b3217..1591779909e2 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -49,7 +49,7 @@ using namespace com::sun::star::uno; //------------------------------------------------------------------------ -#define SC_VERSION ((USHORT)251) +#define SC_VERSION ((sal_uInt16)251) TYPEINIT1(ScTpCalcItem, SfxPoolItem); @@ -63,7 +63,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 @@ -111,8 +111,8 @@ ScDocOptions::~ScDocOptions() void ScDocOptions::ResetDocOptions() { - bIsIgnoreCase = FALSE; - bIsIter = FALSE; + bIsIgnoreCase = sal_False; + bIsIter = sal_False; nIterCount = 100; fIterEps = 1.0E-3; nPrecStandardFormat = SvNumberFormatter::UNLIMITED_PRECISION; @@ -121,24 +121,24 @@ void ScDocOptions::ResetDocOptions() nYear = 1899; nYear2000 = SvNumberFormatter::GetYear2000Default(); nTabDistance = lcl_GetDefaultTabDist(); - bCalcAsShown = FALSE; - bMatchWholeCell = TRUE; - bDoAutoSpell = FALSE; - bLookUpColRowNames = TRUE; - bFormulaRegexEnabled= TRUE; + bCalcAsShown = sal_False; + bMatchWholeCell = sal_True; + bDoAutoSpell = sal_False; + bLookUpColRowNames = sal_True; + bFormulaRegexEnabled= sal_True; } //======================================================================== // ScTpCalcItem - Daten fuer die CalcOptions-TabPage //======================================================================== -//UNUSED2008-05 ScTpCalcItem::ScTpCalcItem( USHORT nWhichP ) : SfxPoolItem( nWhichP ) +//UNUSED2008-05 ScTpCalcItem::ScTpCalcItem( sal_uInt16 nWhichP ) : SfxPoolItem( nWhichP ) //UNUSED2008-05 { //UNUSED2008-05 } //------------------------------------------------------------------------ -ScTpCalcItem::ScTpCalcItem( USHORT nWhichP, const ScDocOptions& rOpt ) +ScTpCalcItem::ScTpCalcItem( sal_uInt16 nWhichP, const ScDocOptions& rOpt ) : SfxPoolItem ( nWhichP ), theOptions ( rOpt ) { @@ -263,7 +263,7 @@ ScDocCfg::ScDocCfg() : Sequence aValues; const Any* pValues = NULL; - USHORT nDateDay, nDateMonth, nDateYear; + sal_uInt16 nDateDay, nDateMonth, nDateYear; GetDate( nDateDay, nDateMonth, nDateYear ); aNames = GetCalcPropertyNames(); @@ -284,22 +284,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 @@ -342,7 +342,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; } } @@ -357,7 +357,7 @@ IMPL_LINK( ScDocCfg, CalcCommitHdl, void *, EMPTYARG ) Sequence 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 740413ea8533..7af5a17125ee 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -68,8 +68,8 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, if (pQueryRef->getColSize() < 4) return false; - BOOL bValid; - BOOL bFound; + sal_Bool bValid; + sal_Bool bFound; OUString aCellStr; SCSIZE nIndex = 0; SCROW nRow = 0; @@ -81,7 +81,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, { ScQueryEntry& rEntry = pParam->GetEntry(nIndex); - bValid = FALSE; + bValid = sal_False; if (nIndex > 0) { @@ -91,19 +91,19 @@ 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; } } if ((nIndex < 1) || bValid) { // field name in the 2nd column. - bFound = FALSE; + bFound = sal_False; aCellStr = pQueryRef->getString(1, nRow); SCCOL nField = pDBRef->findFieldColumn(aCellStr); // TODO: must be case insensitive comparison. if (ValidCol(nField)) @@ -118,7 +118,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, if (bValid) { // equality, non-equality operator in the 3rd column. - bFound = FALSE; + bFound = sal_False; aCellStr = pQueryRef->getString(2, nRow); lcl_toUpper(aCellStr); const sal_Unicode* p = aCellStr.getStr(); @@ -147,7 +147,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++; @@ -177,7 +177,7 @@ bool lcl_createExcelQuery( if (bValid) { -// ULONG nVisible = 0; +// sal_uLong nVisible = 0; // for ( nCol=nCol1; nCol<=nCol2; nCol++ ) // nVisible += aCol[nCol].VisibleCount( nRow1+1, nRow2 ); @@ -214,7 +214,7 @@ bool lcl_createExcelQuery( pParam->GetEntry(nIndex).eConnect = SC_AND; } else - bValid = FALSE; + bValid = sal_False; } nCol++; } @@ -380,7 +380,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); @@ -392,7 +392,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); @@ -419,9 +419,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 = sal_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 483f0cea6b57..13ea3a9437b3 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -84,8 +84,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 0) aRet += c; @@ -106,17 +106,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); @@ -135,7 +135,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(); @@ -151,7 +151,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 || @@ -163,7 +163,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, sal_False ); if (!nTextHeight) { // leere Zelle Font aFont; @@ -202,12 +202,12 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : pEngine( pEng ), pEditAttrs( NULL ), - bNeedsObject( FALSE ), - bNeedsCellAttr( FALSE ) + bNeedsObject( sal_False ), + bNeedsCellAttr( sal_False ) { if ( pEngine->GetParagraphCount() > 1 ) { - bNeedsObject = TRUE; //! Zellatribute finden ? + bNeedsObject = sal_True; //! Zellatribute finden ? } else { @@ -216,11 +216,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, sal_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 || @@ -232,27 +232,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, sal_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, sal_False ); if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET ) - bNeedsObject = TRUE; + bNeedsObject = sal_True; } } @@ -265,12 +265,12 @@ ScEditAttrTester::~ScEditAttrTester() //------------------------------------------------------------------------ ScEnginePoolHelper::ScEnginePoolHelper( SfxItemPool* pEnginePoolP, - BOOL bDeleteEnginePoolP ) + sal_Bool bDeleteEnginePoolP ) : pEnginePool( pEnginePoolP ), pDefaults( NULL ), bDeleteEnginePool( bDeleteEnginePoolP ), - bDeleteDefaults( FALSE ) + bDeleteDefaults( sal_False ) { } @@ -280,7 +280,7 @@ ScEnginePoolHelper::ScEnginePoolHelper( const ScEnginePoolHelper& rOrg ) pEnginePool( rOrg.bDeleteEnginePool ? rOrg.pEnginePool->Clone() : rOrg.pEnginePool ), pDefaults( NULL ), bDeleteEnginePool( rOrg.bDeleteEnginePool ), - bDeleteDefaults( FALSE ) + bDeleteDefaults( sal_False ) { } @@ -297,7 +297,7 @@ ScEnginePoolHelper::~ScEnginePoolHelper() //------------------------------------------------------------------------ ScEditEngineDefaulter::ScEditEngineDefaulter( SfxItemPool* pEnginePoolP, - BOOL bDeleteEnginePoolP ) + sal_Bool bDeleteEnginePoolP ) : ScEnginePoolHelper( pEnginePoolP, bDeleteEnginePoolP ), EditEngine( pEnginePoolP ) @@ -323,41 +323,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( sal_False ); + sal_Bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) - SetUpdateMode( FALSE ); - USHORT nPara = GetParagraphCount(); - for ( USHORT j=0; jPut( rItem ); - SetDefaults( *pDefaults, FALSE ); + SetDefaults( *pDefaults, sal_False ); } const SfxItemSet& ScEditEngineDefaulter::GetDefaults() @@ -377,90 +377,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( sal_False ); EditEngine::SetText( rTextObject ); if ( pDefaults ) - SetDefaults( *pDefaults, FALSE ); + SetDefaults( *pDefaults, sal_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( sal_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( sal_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( sal_False ); EditEngine::SetText( rText ); if ( pDefaults ) - SetDefaults( *pDefaults, FALSE ); + SetDefaults( *pDefaults, sal_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( sal_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( sal_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; jGet(nWhich) ) @@ -499,11 +499,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 ScFilterOptions::GetPropertyNames() ScFilterOptions::ScFilterOptions() : ConfigItem( OUString::createFromAscii( CFGPATH_FILTER ) ), - bWK3Flag( FALSE ), + bWK3Flag( sal_False ), fExcelColScale( 0 ), fExcelRowScale( 0 ) { diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx index b2a8266705c7..18bf2e6cccbe 100644 --- a/sc/source/core/tool/hints.cxx +++ b/sc/source/core/tool/hints.cxx @@ -46,10 +46,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 ) { } @@ -79,7 +79,7 @@ ScUpdateRefHint::~ScUpdateRefHint() // ScPointerChangedHint - Pointer ist ungueltig geworden // ----------------------------------------------------------------------- -//UNUSED2008-05 ScPointerChangedHint::ScPointerChangedHint( USHORT nF ) : +//UNUSED2008-05 ScPointerChangedHint::ScPointerChangedHint( sal_uInt16 nF ) : //UNUSED2008-05 nFlags( nF ) //UNUSED2008-05 { //UNUSED2008-05 } @@ -109,7 +109,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; @@ -129,7 +129,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 ed5a74582348..70aa722c0c90 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -52,7 +52,7 @@ using namespace com::sun::star::uno; //------------------------------------------------------------------ // Version, ab der das Item kompatibel ist -#define SC_VERSION ((USHORT)351) +#define SC_VERSION ((sal_uInt16)351) //======================================================================== @@ -82,15 +82,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 = sal_False; + bExtendFormat = sal_False; + bRangeFinder = sal_True; + bExpandRefs = sal_False; + bMarkHeader = sal_True; + bUseTabCol = sal_False; + bTextWysiwyg = sal_False; + bReplCellsWarn = sal_True; } //------------------------------------------------------------------------ @@ -174,7 +174,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 fcc7a24e7a42..23c13331db26 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -80,7 +80,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 = sal_False; using namespace formula; using ::std::auto_ptr; @@ -270,7 +270,7 @@ void ScInterpreter::ScChoseJump() fVal = ::rtl::math::approxFloor( fVal); if ( (fVal < 1) || (fVal >= nJumpCount)) { - bIsValue = FALSE; + bIsValue = sal_False; fVal = CreateDoubleError( errIllegalArgument); } @@ -458,11 +458,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(aRange.aEnd.Col()) && + sal_uLong nCol = (sal_uLong)aAdr.Col() + nC; + sal_uLong nRow = (sal_uLong)aAdr.Row() + nR; + if ((nCol > static_cast(aRange.aEnd.Col()) && aRange.aEnd.Col() != aRange.aStart.Col()) - || (nRow > static_cast(aRange.aEnd.Row()) && + || (nRow > static_cast(aRange.aEnd.Row()) && aRange.aEnd.Row() != aRange.aStart.Row())) { fVal = CreateDoubleError( NOTAVAILABLE ); @@ -584,7 +584,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 @@ -783,16 +783,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 ] = sal_False; break; case svDoubleRef : case svSingleRef : @@ -802,16 +802,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 ] = sal_False; } else { aComp.nVal[ i ] = GetCellValue( aAdr, pCell ); - aComp.bVal[ i ] = TRUE; + aComp.bVal[ i ] = sal_True; } } break; @@ -840,32 +840,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 ] = sal_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 ] = sal_False; } else { aComp.nVal[ i ] = GetCellValue( aAdr, pCell ); - aComp.bVal[ i ] = TRUE; + aComp.bVal[ i ] = sal_True; } } break; @@ -909,15 +909,15 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions ) { if ( pMat[i]->IsString(j,k) ) { - aComp.bVal[i] = FALSE; + aComp.bVal[i] = sal_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] = sal_False; } } pResMat->PutDouble( CompareFunc( aComp, pOptions ), j,k ); @@ -940,13 +940,13 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions ) { if ( pMat[i]->IsValue(j) ) { - aComp.bVal[i] = TRUE; + aComp.bVal[i] = sal_True; aComp.nVal[i] = pMat[i]->GetDouble(j); - aComp.bEmpty[i] = FALSE; + aComp.bEmpty[i] = sal_False; } else { - aComp.bVal[i] = FALSE; + aComp.bVal[i] = sal_False; *aComp.pVal[i] = pMat[i]->GetString(j); aComp.bEmpty[i] = pMat[i]->IsEmpty(j); } @@ -1126,8 +1126,8 @@ void ScInterpreter::ScAnd() short nParamCount = GetByte(); if ( MustHaveParamCountMin( nParamCount, 1 ) ) { - BOOL bHaveValue = FALSE; - short nRes = TRUE; + sal_Bool bHaveValue = sal_False; + short nRes = sal_True; size_t nRefInList = 0; while( nParamCount-- > 0) { @@ -1136,7 +1136,7 @@ void ScInterpreter::ScAnd() switch ( GetStackType() ) { case svDouble : - bHaveValue = TRUE; + bHaveValue = sal_True; nRes &= ( PopDouble() != 0.0 ); break; case svString : @@ -1152,7 +1152,7 @@ void ScInterpreter::ScAnd() ScBaseCell* pCell = GetCell( aAdr ); if ( HasCellValueData( pCell ) ) { - bHaveValue = TRUE; + bHaveValue = sal_True; nRes &= ( GetCellValue( aAdr, pCell ) != 0.0 ); } // else: Xcl setzt hier keinen Fehler @@ -1167,11 +1167,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 ); @@ -1187,13 +1187,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 = sal_False; } else nRes &= (fVal != 0.0); @@ -1224,8 +1224,8 @@ void ScInterpreter::ScOr() short nParamCount = GetByte(); if ( MustHaveParamCountMin( nParamCount, 1 ) ) { - BOOL bHaveValue = FALSE; - short nRes = FALSE; + sal_Bool bHaveValue = sal_False; + short nRes = sal_False; size_t nRefInList = 0; while( nParamCount-- > 0) { @@ -1234,7 +1234,7 @@ void ScInterpreter::ScOr() switch ( GetStackType() ) { case svDouble : - bHaveValue = TRUE; + bHaveValue = sal_True; nRes |= ( PopDouble() != 0.0 ); break; case svString : @@ -1250,7 +1250,7 @@ void ScInterpreter::ScOr() ScBaseCell* pCell = GetCell( aAdr ); if ( HasCellValueData( pCell ) ) { - bHaveValue = TRUE; + bHaveValue = sal_True; nRes |= ( GetCellValue( aAdr, pCell ) != 0.0 ); } // else: Xcl setzt hier keinen Fehler @@ -1265,11 +1265,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 ); @@ -1282,17 +1282,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 = sal_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 ); @@ -1641,7 +1641,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; @@ -1745,7 +1745,7 @@ void ScInterpreter::ScIsLogical() { if (HasCellValueData(pCell)) { - ULONG nFormat = GetCellNumberFormat( aAdr, pCell ); + sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell ); nRes = ( pFormatter->GetType(nFormat) == NUMBERFORMAT_LOGICAL); } @@ -1794,7 +1794,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; @@ -1849,13 +1849,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); } @@ -1863,11 +1863,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 = sal_False; if( nParamCount == 2 ) bError = !PopDoubleRefOrSingleRef( aCellPos ); String aInfoType( GetString() ); @@ -1895,7 +1895,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 ); } @@ -2000,10 +2000,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 ) ) @@ -2014,7 +2014,7 @@ void ScInterpreter::ScCell() case NUMBERFORMAT_PERCENT: aFuncResult = 'P'; break; default: { - bAppendPrec = FALSE; + bAppendPrec = sal_False; switch( pFormatter->GetIndexTableOffset( nFormat ) ) { case NF_DATE_SYSTEM_SHORT: @@ -2240,7 +2240,7 @@ void ScInterpreter::ScIsNV() else { ScBaseCell* pCell = GetCell( aAdr ); - USHORT nErr = GetCellErrCode( pCell ); + sal_uInt16 nErr = GetCellErrCode( pCell ); nRes = (nErr == NOTAVAILABLE); } } @@ -2289,7 +2289,7 @@ void ScInterpreter::ScIsErr() else { ScBaseCell* pCell = GetCell( aAdr ); - USHORT nErr = GetCellErrCode( pCell ); + sal_uInt16 nErr = GetCellErrCode( pCell ); nRes = (nErr && nErr != NOTAVAILABLE); } } @@ -2301,7 +2301,7 @@ void ScInterpreter::ScIsErr() nRes = ((nGlobalError && nGlobalError != NOTAVAILABLE) || !pMat); else if ( !pJumpMatrix ) { - USHORT nErr = pMat->GetErrorIfNotString( 0 ); + sal_uInt16 nErr = pMat->GetErrorIfNotString( 0 ); nRes = (nErr && nErr != NOTAVAILABLE); } else @@ -2311,7 +2311,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); } } @@ -2394,7 +2394,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 @@ -2479,11 +2479,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; @@ -2586,14 +2586,14 @@ void ScInterpreter::ScT() PushInt(0); return ; } - BOOL bValue = FALSE; + sal_Bool bValue = sal_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(); @@ -2704,7 +2704,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; } @@ -2762,7 +2762,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 ); } @@ -2777,7 +2777,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 ); } @@ -2846,7 +2846,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(); @@ -2888,7 +2888,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)) @@ -2967,7 +2967,7 @@ void ScInterpreter::ScMin( BOOL bTextAsZero ) PushDouble(nMin); } -void ScInterpreter::ScMax( BOOL bTextAsZero ) +void ScInterpreter::ScMax( sal_Bool bTextAsZero ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" ); short nParamCount = GetByte(); @@ -3009,7 +3009,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)) @@ -3088,15 +3088,15 @@ void ScInterpreter::ScMax( BOOL bTextAsZero ) PushDouble(nMax); } -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(); double fRes = ( eFunc == ifPRODUCT ) ? 1.0 : 0.0; double fVal = 0.0; double fMem = 0.0; - BOOL bNull = TRUE; - ULONG nCount = 0; + sal_Bool bNull = sal_True; + sal_uLong nCount = 0; ScAddress aAdr; ScRange aRange; size_t nRefInList = 0; @@ -3156,7 +3156,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero ) case ifSUM: if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -3200,7 +3200,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero ) case ifSUM: if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -3230,7 +3230,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero ) case svDoubleRef : case svRefList : { - USHORT nErr = 0; + sal_uInt16 nErr = 0; PopDoubleRef( aRange, nParamCount, nRefInList); if ( nGlobalError && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT ) ) { @@ -3272,7 +3272,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero ) SetError(nErr); if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -3323,7 +3323,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero ) nFuncFmtType = NUMBERFORMAT_NUMBER; pMat->GetDimensions(nC, nR); if( eFunc == ifCOUNT2 ) - nCount += (ULONG) nC * nR; + nCount += (sal_uLong) nC * nR; else { for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++) @@ -3340,7 +3340,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero ) case ifSUM: if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -3392,7 +3392,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; @@ -3421,7 +3421,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 ) ); @@ -3443,7 +3443,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(); @@ -3490,7 +3490,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)) @@ -3559,7 +3559,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; @@ -3573,7 +3573,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; @@ -3584,7 +3584,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; @@ -3597,7 +3597,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; @@ -3630,8 +3630,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; @@ -3648,8 +3648,8 @@ void ScInterpreter::ScColumns() break; case svDoubleRef: PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); - nVal += static_cast(nTab2 - nTab1 + 1) * - static_cast(nCol2 - nCol1 + 1); + nVal += static_cast(nTab2 - nTab1 + 1) * + static_cast(nCol2 - nCol1 + 1); break; case svMatrix: { @@ -3674,8 +3674,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; @@ -3692,8 +3692,8 @@ void ScInterpreter::ScRows() break; case svDoubleRef: PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); - nVal += static_cast(nTab2 - nTab1 + 1) * - static_cast(nRow2 - nRow1 + 1); + nVal += static_cast(nTab2 - nTab1 + 1) * + static_cast(nRow2 - nRow1 + 1); break; case svMatrix: { @@ -3717,8 +3717,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 @@ -3740,7 +3740,7 @@ void ScInterpreter::ScTables() break; case svDoubleRef: PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); - nVal += static_cast(nTab2 - nTab1 + 1); + nVal += static_cast(nTab2 - nTab1 + 1); break; case svMatrix: PopError(); @@ -3759,7 +3759,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; @@ -3835,7 +3835,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; @@ -3910,7 +3910,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; @@ -4061,7 +4061,7 @@ void ScInterpreter::ScMatch() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMatch" ); ScMatrixRef pMatSrc = NULL; - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 2, 3 ) ) { double fTyp; @@ -4107,10 +4107,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) @@ -4120,14 +4120,14 @@ void ScInterpreter::ScMatch() case svDouble: { fVal = GetDouble(); - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = fVal; } break; case svString: { sStr = GetString(); - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; *rEntry.pStr = sStr; } break; @@ -4144,13 +4144,13 @@ void ScInterpreter::ScMatch() if (HasCellValueData(pCell)) { fVal = GetCellValue( aAdr, pCell ); - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = fVal; } else { GetCellString(sStr, pCell); - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; *rEntry.pStr = sStr; } } @@ -4280,12 +4280,12 @@ void ScInterpreter::ScMatch() else { // search column in row SCCOL nC; - rParam.bByRow = FALSE; + rParam.bByRow = sal_False; rParam.nRow2 = nRow1; rEntry.nField = nCol1; - ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE); + ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False); // Advance Entry.nField in Iterator if column changed - aCellIter.SetAdvanceQueryParamEntryField( TRUE ); + aCellIter.SetAdvanceQueryParamEntryField( sal_True ); if (fTyp == 0.0) { // EQUAL if ( aCellIter.GetFirst() ) @@ -4320,7 +4320,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()) { @@ -4344,9 +4344,9 @@ void ScInterpreter::ScCountEmptyCells() { PopDoubleRef( aRange, nParam, nRefInList); nMaxCount += - static_cast(aRange.aEnd.Row() - aRange.aStart.Row() + 1) * - static_cast(aRange.aEnd.Col() - aRange.aStart.Col() + 1) * - static_cast(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1); + static_cast(aRange.aEnd.Row() - aRange.aStart.Row() + 1) * + static_cast(aRange.aEnd.Col() - aRange.aStart.Col() + 1) * + static_cast(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1); ScBaseCell* pCell; ScCellIterator aDocIter( pDok, aRange, glSubTotal); if ( (pCell = aDocIter.GetFirst()) != NULL ) @@ -4375,7 +4375,7 @@ void ScInterpreter::ScCountIf() { String rString; double fVal = 0.0; - BOOL bIsString = TRUE; + sal_Bool bIsString = sal_True; switch ( GetStackType() ) { case svDoubleRef : @@ -4392,13 +4392,13 @@ void ScInterpreter::ScCountIf() { case CELLTYPE_VALUE : fVal = GetCellValue( aAdr, pCell ); - bIsString = FALSE; + bIsString = sal_False; break; case CELLTYPE_FORMULA : if( ((ScFormulaCell*)pCell)->IsValue() ) { fVal = GetCellValue( aAdr, pCell ); - bIsString = FALSE; + bIsString = sal_False; } else GetCellString(rString, pCell); @@ -4409,7 +4409,7 @@ void ScInterpreter::ScCountIf() break; default: fVal = 0.0; - bIsString = FALSE; + bIsString = sal_False; } } break; @@ -4426,7 +4426,7 @@ void ScInterpreter::ScCountIf() default: { fVal = GetDouble(); - bIsString = FALSE; + bIsString = sal_False; } } double fSum = 0.0; @@ -4496,10 +4496,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 = sal_False; rEntry.nVal = fVal; rEntry.eOp = SC_EQUAL; } @@ -4537,9 +4537,9 @@ void ScInterpreter::ScCountIf() } else { - ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE); + ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False); // Entry.nField im Iterator bei Spaltenwechsel weiterschalten - aCellIter.SetAdvanceQueryParamEntryField( TRUE ); + aCellIter.SetAdvanceQueryParamEntryField( sal_True ); if ( aCellIter.GetFirst() ) { do @@ -4563,7 +4563,7 @@ void ScInterpreter::ScCountIf() void ScInterpreter::ScSumIf() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumIf" ); - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 2, 3 ) ) { SCCOL nCol3 = 0; @@ -4606,7 +4606,7 @@ void ScInterpreter::ScSumIf() } String rString; double fVal = 0.0; - BOOL bIsString = TRUE; + sal_Bool bIsString = sal_True; switch ( GetStackType() ) { case svDoubleRef : @@ -4623,13 +4623,13 @@ void ScInterpreter::ScSumIf() { case CELLTYPE_VALUE : fVal = GetCellValue( aAdr, pCell ); - bIsString = FALSE; + bIsString = sal_False; break; case CELLTYPE_FORMULA : if( ((ScFormulaCell*)pCell)->IsValue() ) { fVal = GetCellValue( aAdr, pCell ); - bIsString = FALSE; + bIsString = sal_False; } else GetCellString(rString, pCell); @@ -4640,7 +4640,7 @@ void ScInterpreter::ScSumIf() break; default: fVal = 0.0; - bIsString = FALSE; + bIsString = sal_False; } } break; @@ -4657,13 +4657,13 @@ void ScInterpreter::ScSumIf() default: { fVal = GetDouble(); - bIsString = FALSE; + bIsString = sal_False; } } double fSum = 0.0; double fMem = 0.0; - BOOL bNull = TRUE; + sal_Bool bNull = sal_True; short nParam = 1; size_t nRefInList = 0; while (nParam-- > 0) @@ -4779,10 +4779,10 @@ void ScInterpreter::ScSumIf() rParam.nRow2 = nRow2; ScQueryEntry& rEntry = rParam.GetEntry(0); - rEntry.bDoQuery = TRUE; + rEntry.bDoQuery = sal_True; if (!bIsString) { - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = fVal; rEntry.eOp = SC_EQUAL; } @@ -4830,7 +4830,7 @@ void ScInterpreter::ScSumIf() fVal = pSumExtraMatrix->GetDouble( nC, nR); if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -4856,7 +4856,7 @@ void ScInterpreter::ScSumIf() fVal = GetCellValue( aAdr, pCell ); if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -4869,9 +4869,9 @@ void ScInterpreter::ScSumIf() } else { - ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE); + ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False); // Increment Entry.nField in iterator when switching to next column. - aCellIter.SetAdvanceQueryParamEntryField( TRUE ); + aCellIter.SetAdvanceQueryParamEntryField( sal_True ); if ( aCellIter.GetFirst() ) { if (pSumExtraMatrix) @@ -4885,7 +4885,7 @@ void ScInterpreter::ScSumIf() fVal = pSumExtraMatrix->GetDouble( nC, nR); if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -4905,7 +4905,7 @@ void ScInterpreter::ScSumIf() fVal = GetCellValue( aAdr, pCell ); if ( bNull && fVal != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = fVal; } else @@ -4930,7 +4930,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 ; @@ -5345,13 +5345,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, sal_False); SCCOL nC; SCROW nR; // Advance Entry.nField in iterator upon switching columns if @@ -5476,19 +5476,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; @@ -5546,7 +5546,7 @@ void ScInterpreter::CalculateLookup(BOOL HLookup) { rParam.nCol2 = nCol2; rParam.nRow2 = nRow1; // nur in der ersten Zeile suchen - rParam.bByRow = FALSE; + rParam.bByRow = sal_False; } // if ( HLookup ) else { @@ -5554,10 +5554,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) ) @@ -5659,16 +5659,16 @@ void ScInterpreter::CalculateLookup(BOOL HLookup) else { rEntry.nField = nCol1; - BOOL bFound = FALSE; + sal_Bool bFound = sal_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, sal_False); // advance Entry.nField in Iterator upon switching columns - aCellIter.SetAdvanceQueryParamEntryField( TRUE ); + aCellIter.SetAdvanceQueryParamEntryField( sal_True ); if ( bSorted ) { SCROW nRow1_temp; @@ -5676,7 +5676,7 @@ void ScInterpreter::CalculateLookup(BOOL HLookup) } else if ( aCellIter.GetFirst() ) { - bFound = TRUE; + bFound = sal_True; nCol = aCellIter.GetCol(); } nRow = nZIndex; @@ -5709,14 +5709,14 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry) { case svDouble: { - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = GetDouble(); } break; case svString: { const String sStr = GetString(); - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; *rEntry.pStr = sStr; } break; @@ -5732,21 +5732,21 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry) ScBaseCell* pCell = GetCell( aAdr ); if (HasCellValueData(pCell)) { - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = GetCellValue( aAdr, pCell ); } else { if ( GetCellType( pCell ) == CELLTYPE_NOTE ) { - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; rEntry.nVal = 0.0; } else { String sStr; GetCellString(sStr, pCell); - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; *rEntry.pStr = sStr; } } @@ -5769,13 +5769,13 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry) void ScInterpreter::ScVLookup() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVLookup" ); - CalculateLookup(FALSE); + CalculateLookup(sal_False); } 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. @@ -5787,7 +5787,7 @@ void ScInterpreter::ScSubTotal() else { cPar = nParamCount - 1; - glSubTotal = TRUE; + glSubTotal = sal_True; switch( nFunc ) { case SUBTOTAL_FUNC_AVE : ScAverage(); break; @@ -5803,7 +5803,7 @@ void ScInterpreter::ScSubTotal() case SUBTOTAL_FUNC_VARP : ScVarP(); break; default : PushIllegalArgument(); break; } - glSubTotal = FALSE; + glSubTotal = sal_False; } // Get rid of the 1st (fished) parameter. double nVal = GetDouble(); @@ -5812,14 +5812,14 @@ void ScInterpreter::ScSubTotal() } } -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 = sal_False; if ( rMissingField ) { - bAllowMissingField = TRUE; - rMissingField = FALSE; + bAllowMissingField = sal_True; + rMissingField = sal_False; } if ( GetByte() == 3 ) { @@ -5828,20 +5828,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 = sal_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 = sal_False; aStr = GetString(); break; case svSingleRef : @@ -5853,7 +5853,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField ) nVal = GetCellValue( aAdr, pCell ); else { - bByVal = FALSE; + bByVal = sal_False; GetCellString(aStr, pCell); } } @@ -5861,7 +5861,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 @@ -5873,7 +5873,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField ) case svMissing : PopError(); if ( bAllowMissingField ) - rMissingField = TRUE; + rMissingField = sal_True; else SetError( errIllegalParameter ); break; @@ -5891,7 +5891,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 ); } @@ -5952,9 +5952,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 = sal_False; auto_ptr pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { @@ -5978,7 +5978,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc ) case ifSUM: if ( bNull && aValue.mfValue != 0.0 ) { - bNull = FALSE; + bNull = sal_False; fMem = aValue.mfValue; } else @@ -6018,11 +6018,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 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 @@ -6072,11 +6072,11 @@ 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 pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { - ULONG nCount = 0; + sal_uLong nCount = 0; pQueryParam->mbSkipString = false; ScDBQueryDataIterator aValIter( pDok, pQueryParam.release()); ScDBQueryDataIterator::Value aValue; @@ -6133,7 +6133,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount ) rValCount = 0.0; double fSum = 0.0; - BOOL bMissingField = FALSE; + sal_Bool bMissingField = sal_False; auto_ptr pQueryParam( GetDBParams(bMissingField) ); if (pQueryParam.get()) { @@ -6248,7 +6248,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. @@ -6311,7 +6311,7 @@ void ScInterpreter::ScIndirect() if (!pNames) break; - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (!pNames->SearchName( sRefStr, nPos)) break; @@ -6359,7 +6359,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; @@ -6370,10 +6370,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 : @@ -6432,7 +6432,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; @@ -6508,7 +6508,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; @@ -6547,7 +6547,7 @@ void ScInterpreter::ScIndex() { if (nArea != 1) SetError(errIllegalArgument); - USHORT nOldSp = sp; + sal_uInt16 nOldSp = sp; ScMatrixRef pMat = GetMatrix(); if (pMat) { @@ -6645,7 +6645,7 @@ void ScInterpreter::ScIndex() SCCOL nCol2 = 0; SCROW nRow2 = 0; SCTAB nTab2 = 0; - BOOL bRowArray = FALSE; + sal_Bool bRowArray = sal_False; if (GetStackType() == svRefList) { FormulaTokenRef xRef = PopToken(); @@ -6658,13 +6658,13 @@ void ScInterpreter::ScIndex() DoubleRefToRange( (*(static_cast(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) || @@ -6715,7 +6715,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) @@ -6729,7 +6729,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; @@ -6767,7 +6767,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; @@ -6796,18 +6796,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 + sal_False, // nicht rot + (sal_uInt16) fDec,// Nachkommastellen 1); // 1 Vorkommanull if (!pFormatter->GetPreviewString(sFormatString, fVal, @@ -6858,16 +6858,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 )); @@ -6893,15 +6893,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 + sal_False, // nicht rot + (sal_uInt16) fDec,// Nachkommastellen 1); // 1 Vorkommanull if (!pFormatter->GetPreviewString(sFormatString, fVal, @@ -6918,7 +6918,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; @@ -6957,7 +6957,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; @@ -6984,7 +6984,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; @@ -7013,7 +7013,7 @@ void ScInterpreter::ScSearch() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSearch" ); double fAnz; - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( MustHaveParamCount( nParamCount, 2, 3 ) ) { if (nParamCount == 3) @@ -7038,7 +7038,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, sal_False, sal_False, sal_False); utl::TextSearch sT( sPar, *ScGlobal::pCharClass ); int nBool = sT.SearchFrwrd(sStr, &nPos, &nEndPos); if (!nBool) @@ -7091,7 +7091,7 @@ void ScInterpreter::ScText() PushTempToken( xTok); // Temporarily override the ConvertStringToValue() // error for GetCellValue() / GetCellValueOrZero() - USHORT nSErr = mnStringNoValueError; + sal_uInt16 nSErr = mnStringNoValueError; mnStringNoValueError = errNotNumericString; fVal = GetDouble(); mnStringNoValueError = nSErr; @@ -7144,7 +7144,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; @@ -7168,7 +7168,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) @@ -7232,7 +7232,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) { @@ -7246,8 +7246,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() ) { @@ -7325,13 +7325,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 sal_False; if ( !rStr.Len() || (rStr.Len() == 1 && rStr.GetChar(0) != '.') ) - return FALSE; // einzelnes Metazeichen kann keine RegExp sein + return sal_False; // einzelnes Metazeichen kann keine RegExp sein static const sal_Unicode cre[] = { '.','*','+','?','[',']','^','$','\\','<','>','(',')','|', 0 }; const sal_Unicode* p1 = rStr.GetBuffer(); sal_Unicode c1; @@ -7341,17 +7341,17 @@ BOOL ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc ) while ( *p2 ) { if ( c1 == *p2++ ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_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, sal_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 404eaf763a51..c13cb5c924c4 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -66,14 +66,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 @@ -201,7 +201,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; @@ -245,8 +245,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 :) @@ -264,8 +264,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( O % 31 + 1 ); - nMonth = sal::static_int_cast( int(O / 31) ); + nDay = sal::static_int_cast( O % 31 + 1 ); + nMonth = sal::static_int_cast( int(O / 31) ); PushDouble( GetDateSerial( nYear, nMonth, nDay, true ) ); } } @@ -276,9 +276,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 @@ -340,14 +340,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 = sal_False; double nDate2 = GetDouble(); double nDate1 = GetDouble(); double fSign; @@ -371,7 +371,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) @@ -393,7 +393,7 @@ void ScInterpreter::ScGetDiffDate360() if (!bFlag ) { if (aDate1.GetDay() == 30) - aDate2 -= (ULONG) 1; + aDate2 -= (sal_uLong) 1; } else aDate2.SetDay(30); @@ -457,7 +457,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; @@ -465,7 +465,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 @@ -496,10 +496,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() : sal_False ); double fDec = GetDouble(); double fVal = GetDouble(); if ( fDec == 0.0 ) @@ -519,10 +519,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() : sal_False ); double fDec = GetDouble(); double fVal = GetDouble(); if ( fDec == 0.0 ) @@ -582,7 +582,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; @@ -657,7 +657,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); @@ -687,14 +687,14 @@ 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) @@ -711,8 +711,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: @@ -720,7 +720,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)) @@ -771,10 +771,10 @@ void ScInterpreter::ScMIRR() { 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 @@ -842,7 +842,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) @@ -902,7 +902,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; @@ -926,7 +926,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; @@ -955,8 +955,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; @@ -974,14 +974,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 = sal_False; double fGda; - ULONG i; + sal_uLong i; fLia=0; for ( i = 1; i <= nLoopEnd; i++) { @@ -993,7 +993,7 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer, if (fLia > fGda) { fTerm = fLia; - bNowLia = TRUE; + bNowLia = sal_True; } else { @@ -1024,15 +1024,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 = sal_False; if (nParamCount >= 6) fFaktor = GetDouble(); else @@ -1049,13 +1049,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); @@ -1147,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) @@ -1196,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) @@ -1213,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) @@ -1244,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; @@ -1335,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) @@ -1390,7 +1390,7 @@ void ScInterpreter::ScZinsZ() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZinsZ" ); double nZins, nZr, nRmz, 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) @@ -1412,7 +1412,7 @@ void ScInterpreter::ScKapz() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScKapz" ); double nZins, nZr, nZzr, nBw, nZw = 0, nFlag = 0, nRmz, nZinsz; nFuncFmtType = NUMBERFORMAT_CURRENCY; - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( !MustHaveParamCount( nParamCount, 4, 6 ) ) return; if (nParamCount == 6) @@ -1450,8 +1450,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 ; fRmz = ScGetRmz(fZins, fZzr, fBw, 0.0, fF); fZinsZ = 0.0; if (nAnfang == 1) @@ -1460,7 +1460,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; @@ -1493,8 +1493,8 @@ void ScInterpreter::ScKumKapZ() { fRmz = ScGetRmz(fZins, fZzr, fBw, 0.0, fF); 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) @@ -1503,7 +1503,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; @@ -1594,7 +1594,7 @@ void ScInterpreter::ScBackSolver() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBackSolver" ); if ( MustHaveParamCount( GetByte(), 3 ) ) { - BOOL bDoneIteration = FALSE; + sal_Bool bDoneIteration = sal_False; ScAddress aValueAdr, aFormulaAdr; double fTargetVal = GetDouble(); PopSingleRef( aFormulaAdr ); @@ -1604,7 +1604,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) @@ -1624,7 +1624,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; @@ -1636,22 +1636,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 = sal_False; // Nach der Regula Falsi Methode while ( !bDoneIteration && ( nIter++ < nMaxIter ) ) { @@ -1669,18 +1669,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( fHorMaxAngle / fHorStepAngle ); - BOOL bDoneHorMove = FALSE; + sal_Bool bDoneHorMove = sal_False; while ( !bDoneHorMove && !bHorMoveError && nHorIter++ < nHorMaxIter ) { double fHorAngle = fHorStepAngle * static_cast( nHorIter ); double fHorTangent = ::rtl::math::tan( fHorAngle * F_PI / 180 ); - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; while( nIdx++ < 2 && !bDoneHorMove ) { double fHorX; @@ -1700,12 +1700,12 @@ void ScInterpreter::ScBackSolver() if ( fF != fFPrev ) { fX = fHorX; - bDoneHorMove = TRUE; + bDoneHorMove = sal_True; } } } if ( !bDoneHorMove ) - bHorMoveError = TRUE; + bHorMoveError = sal_True; } if ( bError ) @@ -1722,7 +1722,7 @@ void ScInterpreter::ScBackSolver() { // converged to root fBestX = fX; - bDoneIteration = TRUE; + bDoneIteration = sal_True; } else { @@ -2054,7 +2054,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 @@ -2092,10 +2092,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; iGetLinks().Count(); + for (sal_uInt16 i=0; iGetLinks()[i]; if (pBase->ISA(ScDdeLink)) @@ -2118,12 +2118,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(); @@ -2149,8 +2149,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 @@ -2159,7 +2159,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) { @@ -2215,7 +2215,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 __FAR_DATA pDigits[] = { @@ -2258,10 +2258,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 ]; @@ -2271,7 +2271,7 @@ void ScInterpreter::ScBase() } else { - BOOL bDirt = FALSE; + sal_Bool bDirt = sal_False; while ( fVal && p > pBuf ) { //! mit fmod Rundungsfehler ab 2**48 @@ -2301,7 +2301,7 @@ void ScInterpreter::ScBase() size_t nDig; if ( fVal < fMult ) { // da ist was gekippt - bDirt = TRUE; + bDirt = sal_True; nDig = 0; } else @@ -2309,7 +2309,7 @@ void ScInterpreter::ScBase() double fDig = ::rtl::math::approxFloor( ::rtl::math::approxSub( fVal, fMult ) ); if ( bDirt ) { - bDirt = FALSE; + bDirt = sal_False; --fDig; } if ( fDig <= 0.0 ) @@ -2422,7 +2422,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; @@ -2432,22 +2432,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)(sizeof(pValues) / sizeof(pValues[0]) - 1); + static const sal_uInt16 pValues[] = { 1000, 500, 100, 50, 10, 5, 1 }; + static const sal_uInt16 nMaxIndex = (sal_uInt16)(sizeof(pValues) / sizeof(pValues[0]) - 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++; @@ -2458,8 +2458,8 @@ void ScInterpreter::ScRoman() } aRoman += pChars[ nIndex ]; aRoman += pChars[ nIndex2 ]; - nVal = sal::static_int_cast( nVal + pValues[ nIndex ] ); - nVal = sal::static_int_cast( nVal - pValues[ nIndex2 ] ); + nVal = sal::static_int_cast( nVal + pValues[ nIndex ] ); + nVal = sal::static_int_cast( nVal - pValues[ nIndex2 ] ); } else { @@ -2478,21 +2478,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 = sal_False; break; + case 'C': rnValue = 100; rbIsDec = sal_True; break; + case 'L': rnValue = 50; rbIsDec = sal_False; break; + case 'X': rnValue = 10; rbIsDec = sal_True; break; + case 'V': rnValue = 5; rbIsDec = sal_False; break; + case 'I': rnValue = 1; rbIsDec = sal_True; break; + default: return sal_False; } - return TRUE; + return sal_True; } @@ -2506,18 +2506,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 = sal_False; + sal_Bool bIsDec2 = sal_False; bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex ), nDigit1, bIsDec1 ); if( bValid && (nCharIndex + 1 < nCharCount) ) bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex + 1 ), nDigit2, bIsDec2 ); @@ -2525,24 +2525,24 @@ void ScInterpreter::ScArabic() { if( nDigit1 >= nDigit2 ) { - nValue = sal::static_int_cast( nValue + nDigit1 ); + nValue = sal::static_int_cast( nValue + nDigit1 ); nValidRest %= (nDigit1 * (bIsDec1 ? 5 : 2)); bValid = (nValidRest >= nDigit1); if( bValid ) - nValidRest = sal::static_int_cast( nValidRest - nDigit1 ); + nValidRest = sal::static_int_cast( nValidRest - nDigit1 ); nCharIndex++; } else if( nDigit1 * 2 != nDigit2 ) { - USHORT nDiff = nDigit2 - nDigit1; - nValue = sal::static_int_cast( nValue + nDiff ); + sal_uInt16 nDiff = nDigit2 - nDigit1; + nValue = sal::static_int_cast( nValue + nDiff ); bValid = (nValidRest >= nDiff); if( bValid ) nValidRest = nDigit1 - 1; nCharIndex += 2; } else - bValid = FALSE; + bValid = sal_False; } } if( bValid ) @@ -2556,7 +2556,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; @@ -2585,7 +2585,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)) @@ -2638,7 +2638,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 { @@ -2672,14 +2672,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 sal_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; @@ -2692,7 +2692,7 @@ void ScInterpreter::ScEuroConvert() return; } } - BOOL bFullPrecision = FALSE; + sal_Bool bFullPrecision = sal_False; if ( nParamCount >= 4 ) bFullPrecision = GetBool(); String aToUnit( GetString() ); @@ -2863,7 +2863,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(); @@ -2932,7 +2932,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 ) ) { @@ -2959,14 +2959,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 bcea57703d78..dfcce4c06c3f 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -211,7 +211,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]; @@ -250,7 +250,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; @@ -683,7 +683,7 @@ double ScInterpreter::GetTDist(double T, double fDF) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetTDist" ); return 0.5 * GetBetaDist(fDF/(fDF+T*T), fDF/2.0, 0.5); /* - USHORT DF = (USHORT) fDF; + sal_uInt16 DF = (sal_uInt16) fDF; double A = T / sqrt(DF); double B = 1.0 + A*A; double R; @@ -693,7 +693,7 @@ double ScInterpreter::GetTDist(double T, double fDF) { double S0 = A/(2.0 * sqrt(B)); double C0 = S0; - for (USHORT i = 2; i <= DF-2; i+=2) + for (sal_uInt16 i = 2; i <= DF-2; i+=2) { C0 *= (1.0 - 1.0/(double)i)/B; S0 += C0; @@ -704,7 +704,7 @@ double ScInterpreter::GetTDist(double T, double fDF) { double S1 = A / (B * F_PI); double C1 = S1; - for (USHORT i = 3; i <= DF-2; i+=2) + for (sal_uInt16 i = 3; i <= DF-2; i+=2) { C1 *= (1.0 - 1.0/(double)i)/B; S1 += C1; @@ -779,7 +779,7 @@ double ScInterpreter::GetChiSqDistPDF(double fX, double fDF) void ScInterpreter::ScChiSqDist() { - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( !MustHaveParamCount( nParamCount, 2, 3 ) ) return; double fX; @@ -1069,7 +1069,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; @@ -1205,7 +1205,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); } @@ -1229,7 +1229,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) @@ -1250,16 +1250,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); } @@ -1294,16 +1294,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++) @@ -1316,25 +1316,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; @@ -1383,16 +1383,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); } @@ -1413,8 +1413,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; @@ -1428,8 +1428,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; @@ -1462,8 +1462,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++) { @@ -1475,8 +1475,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++) { @@ -1513,7 +1513,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; @@ -1534,7 +1534,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 @@ -1675,7 +1675,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 @@ -1977,7 +1977,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; @@ -2097,7 +2097,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; @@ -2289,7 +2289,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; @@ -2340,7 +2340,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)) @@ -2405,7 +2405,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) @@ -2538,11 +2538,11 @@ void ScInterpreter::ScTTest() } else if (fTyp == 2.0) { - CalculateTest(FALSE,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF); + CalculateTest(sal_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 @@ -2795,7 +2795,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); @@ -2916,7 +2916,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); @@ -3050,7 +3050,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)) { @@ -3172,7 +3172,7 @@ double ScInterpreter::GetMedian( vector & 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 aArray; @@ -3246,7 +3246,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 aSortArray; @@ -3289,7 +3289,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 ) ) @@ -3323,19 +3323,19 @@ void ScInterpreter::CalculateSmallLarge(BOOL bSmall) void ScInterpreter::ScLarge() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLarge" ); - CalculateSmallLarge(FALSE); + CalculateSmallLarge(sal_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; #if 0 @@ -3425,7 +3425,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; @@ -3437,7 +3437,7 @@ void ScInterpreter::ScTrimMean() } } -void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector& rArray ) +void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector& rArray ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetSortArray" ); ScAddress aAdr; @@ -3471,7 +3471,7 @@ void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector& 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)) @@ -3519,7 +3519,7 @@ void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector& rA PopError(); } -void ScInterpreter::GetSortArray( BYTE nParamCount, vector& rSortArray, vector* pIndexOrder ) +void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector& rSortArray, vector* pIndexOrder ) { GetNumberSequenceArray( nParamCount, rSortArray); @@ -3614,16 +3614,16 @@ void ScInterpreter::QuickSort( vector& rSortArray, vector* 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 = sal_False; double fCount = 1.0; - BOOL bValid = FALSE; + sal_Bool bValid = sal_False; switch (GetStackType()) { case formula::svDouble : @@ -3631,7 +3631,7 @@ void ScInterpreter::ScRank() double x = GetDouble(); double fVal = GetDouble(); if (x == fVal) - bValid = TRUE; + bValid = sal_True; break; } case svSingleRef : @@ -3644,7 +3644,7 @@ void ScInterpreter::ScRank() { double x = GetCellValue( aAdr, pCell ); if (x == fVal) - bValid = TRUE; + bValid = sal_True; } break; } @@ -3656,9 +3656,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 @@ -3670,7 +3670,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++; @@ -3678,7 +3678,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++; @@ -3701,7 +3701,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++; @@ -3714,7 +3714,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++; @@ -3734,10 +3734,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; @@ -3767,7 +3767,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); @@ -3844,7 +3844,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); @@ -3898,7 +3898,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; @@ -3930,7 +3930,7 @@ void ScInterpreter::ScProbability() { double fSum = 0.0; double fRes = 0.0; - BOOL bStop = FALSE; + sal_Bool bStop = sal_False; double fP, fW; SCSIZE nCount1 = nC1 * nR1; for ( SCSIZE i = 0; i < nCount1 && !bStop; i++ ) @@ -3940,7 +3940,7 @@ void ScInterpreter::ScProbability() fP = pMatP->GetDouble(i); fW = pMatW->GetDouble(i); if (fP < 0.0 || fP > 1.0) - bStop = TRUE; + bStop = sal_True; else { fSum += fP; @@ -3969,15 +3969,15 @@ void ScInterpreter::ScCorrel() void ScInterpreter::ScCovar() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCovar" ); - CalculatePearsonCovar(FALSE,FALSE); + CalculatePearsonCovar(sal_False,sal_False); } void ScInterpreter::ScPearson() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPearson" ); - CalculatePearsonCovar(TRUE,FALSE); + CalculatePearsonCovar(sal_True,sal_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 ) ) @@ -4088,9 +4088,9 @@ void ScInterpreter::ScRSQ() void ScInterpreter::ScSTEXY() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSTEXY" ); - CalculatePearsonCovar(TRUE,TRUE); + CalculatePearsonCovar(sal_True,sal_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 ) ) @@ -4165,13 +4165,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(sal_False); } void ScInterpreter::ScForecast() diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 47cde7186067..41aa2a24eaf6 100755 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -136,31 +136,31 @@ 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 sal_False; // not considered to be a range in TableOp sense // we can't replace a single cell in a range ScInterpreterTableOpParams* pTOp = pDok->aTableOpList.First(); while (pTOp) { if ( rRange.In( pTOp->aOld1 ) ) - return TRUE; + return sal_True; if ( rRange.In( pTOp->aOld2 ) ) - return TRUE; + return sal_True; pTOp = pDok->aTableOpList.Next(); } - return FALSE; + return sal_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 ) @@ -190,7 +190,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; @@ -382,9 +382,9 @@ double ScInterpreter::ConvertStringToValue( const String& rStr ) ::rtl::math::pow10Exp( nUnit[fraction], static_cast( -ceil( log10( static_cast( nUnit[fraction])))))); fValue = (bDate ? GetDateSerial( - sal::static_int_cast(nUnit[year]), - sal::static_int_cast(nUnit[month]), - sal::static_int_cast(nUnit[day]), + sal::static_int_cast(nUnit[year]), + sal::static_int_cast(nUnit[month]), + sal::static_int_cast(nUnit[day]), true) : 0.0); fValue += ((nUnit[hour] * 3600) + (nUnit[minute] * 60) + nUnit[second] + fFraction) / 86400.0; } @@ -404,7 +404,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 ) @@ -425,7 +425,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()) @@ -492,7 +492,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()) @@ -510,7 +510,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); @@ -522,7 +522,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); @@ -539,29 +539,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(nCol1); - *p++ = static_cast(nRow1); - *p++ = static_cast(nTab1); - *p++ = static_cast(nCol2); - *p++ = static_cast(nRow2); - *p++ = static_cast(nTab2); - USHORT* pCount = p; + return sal_False; + + sal_uInt16 nCount = 0; + sal_uInt16* p = (sal_uInt16*) pCellArr; + *p++ = static_cast(nCol1); + *p++ = static_cast(nRow1); + *p++ = static_cast(nTab1); + *p++ = static_cast(nCol2); + *p++ = static_cast(nRow2); + *p++ = static_cast(nTab2); + sal_uInt16* pCount = p; *p++ = 0; - USHORT nPos = 14; + sal_uInt16 nPos = 14; SCTAB nTab = nTab1; ScAddress aAdr; while (nTab <= nTab2) @@ -578,9 +578,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 : @@ -593,23 +593,23 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, nVal = ((ScFormulaCell*)pCell)->GetValue(); } else - bOk = FALSE; + bOk = sal_False; break; default : - bOk = FALSE; + bOk = sal_False; break; } if (bOk) { - if ((nPos + (4 * sizeof(USHORT)) + sizeof(double)) > MAXARRSIZE) - return FALSE; - *p++ = static_cast(nCol); - *p++ = static_cast(nRow); - *p++ = static_cast(nTab); + if ((nPos + (4 * sizeof(sal_uInt16)) + sizeof(double)) > MAXARRSIZE) + return sal_False; + *p++ = static_cast(nCol); + *p++ = static_cast(nRow); + *p++ = static_cast(nTab); *p++ = nErr; memcpy( p, &nVal, sizeof(double)); nPos += 8 + sizeof(double); - p = (USHORT*) ( pCellArr + nPos ); + p = (sal_uInt16*) ( pCellArr + nPos ); nCount++; } } @@ -620,34 +620,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(nCol1); - *p++ = static_cast(nRow1); - *p++ = static_cast(nTab1); - *p++ = static_cast(nCol2); - *p++ = static_cast(nRow2); - *p++ = static_cast(nTab2); - USHORT* pCount = p; + return sal_False; + + sal_uInt16 nCount = 0; + sal_uInt16* p = (sal_uInt16*) pCellArr; + *p++ = static_cast(nCol1); + *p++ = static_cast(nRow1); + *p++ = static_cast(nTab1); + *p++ = static_cast(nCol2); + *p++ = static_cast(nRow2); + *p++ = static_cast(nTab2); + sal_uInt16* pCount = p; *p++ = 0; - USHORT nPos = 14; + sal_uInt16 nPos = 14; SCTAB nTab = nTab1; while (nTab <= nTab2) { @@ -662,8 +662,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 : @@ -679,10 +679,10 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, ((ScFormulaCell*)pCell)->GetString(aStr); } else - bOk = FALSE; + bOk = sal_False; break; default : - bOk = FALSE; + bOk = sal_False; break; } if (bOk) @@ -690,26 +690,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 sal_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(nCol); - *p++ = static_cast(nRow); - *p++ = static_cast(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 sal_False; + *p++ = static_cast(nCol); + *p++ = static_cast(nRow); + *p++ = static_cast(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++; } } @@ -720,34 +720,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(nCol1); - *p++ = static_cast(nRow1); - *p++ = static_cast(nTab1); - *p++ = static_cast(nCol2); - *p++ = static_cast(nRow2); - *p++ = static_cast(nTab2); - USHORT* pCount = p; + return sal_False; + + sal_uInt16 nCount = 0; + sal_uInt16* p = (sal_uInt16*) pCellArr; + *p++ = static_cast(nCol1); + *p++ = static_cast(nRow1); + *p++ = static_cast(nTab1); + *p++ = static_cast(nCol2); + *p++ = static_cast(nRow2); + *p++ = static_cast(nTab2); + sal_uInt16* pCount = p; *p++ = 0; - USHORT nPos = 14; + sal_uInt16 nPos = 14; SCTAB nTab = nTab1; ScAddress aAdr; while (nTab <= nTab2) @@ -764,11 +764,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 : @@ -790,23 +790,23 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, ((ScFormulaCell*)pCell)->GetString(aStr); break; default : - bOk = FALSE; + bOk = sal_False; break; } if (bOk) { - if ((nPos + (5 * sizeof(USHORT))) > MAXARRSIZE) - return FALSE; - *p++ = static_cast(nCol); - *p++ = static_cast(nRow); - *p++ = static_cast(nTab); + if ((nPos + (5 * sizeof(sal_uInt16))) > MAXARRSIZE) + return sal_False; + *p++ = static_cast(nCol); + *p++ = static_cast(nRow); + *p++ = static_cast(nTab); *p++ = nErr; *p++ = nType; nPos += 10; if (nType == 0) { if ((nPos + sizeof(double)) > MAXARRSIZE) - return FALSE; + return sal_False; memcpy( p, &nVal, sizeof(double)); nPos += sizeof(double); } @@ -815,23 +815,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 sal_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 sal_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++; @@ -841,7 +841,7 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, nTab++; } *pCount = nCount; - return TRUE; + return sal_True; } @@ -957,7 +957,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); @@ -969,7 +969,7 @@ void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString, PushTempToken( new ScEmptyCellToken( bInherited, bDisplayEmptyAsString)); return; } - USHORT nErr; + sal_uInt16 nErr; if ((nErr = pCell->GetErrorCode()) != 0) { PushError( nErr); @@ -1219,7 +1219,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(); @@ -1272,7 +1272,7 @@ ScDBRangeBase* ScInterpreter::PopDoubleRef() 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 ) @@ -1298,7 +1298,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; @@ -1363,7 +1363,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 ) @@ -1387,7 +1387,7 @@ void ScInterpreter::PopDoubleRef( ScRange& rRange, BOOL bDontCheckForTableOp ) } -BOOL ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr ) +sal_Bool ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRefOrSingleRef" ); switch ( GetStackType() ) @@ -1395,21 +1395,21 @@ BOOL ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr ) case svDoubleRef : { ScRange aRange; - PopDoubleRef( aRange, TRUE ); + PopDoubleRef( aRange, sal_True ); return DoubleRefToPosSingleRef( aRange, rAdr ); } //break; case svSingleRef : { PopSingleRef( rAdr ); - return TRUE; + return sal_True; } //break; default: PopError(); SetError( errNoRef ); } - return FALSE; + return sal_False; } @@ -1439,10 +1439,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 ) @@ -1547,7 +1547,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(); @@ -1681,7 +1681,7 @@ void ScInterpreter::PushMatrix(ScMatrix* 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 @@ -1723,7 +1723,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; @@ -1766,7 +1766,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; @@ -1782,17 +1782,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 = sal_False; if ( pJumpMatrix ) { @@ -1827,13 +1827,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; } @@ -1843,13 +1843,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; } @@ -1861,7 +1861,7 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r else if ( nTab <= nMyTab && nMyTab <= rRange.aEnd.Tab() ) nTab = nMyTab; else - bOk = FALSE; + bOk = sal_False; if ( bOk ) rAdr.Set( nCol, nRow, nTab ); } @@ -1975,7 +1975,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); @@ -2102,7 +2102,7 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( double& rDouble, void ScInterpreter::ScDBGet() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBGet" ); - BOOL bMissingField = FALSE; + sal_Bool bMissingField = sal_False; auto_ptr pQueryParam( GetDBParams(bMissingField) ); if (!pQueryParam.get()) { @@ -2139,8 +2139,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)) @@ -2152,7 +2152,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++) @@ -2197,7 +2197,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 @@ -2213,7 +2213,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 @@ -2229,7 +2229,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 @@ -2282,7 +2282,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 ); @@ -2334,9 +2334,9 @@ void ScInterpreter::ScExternal() PushIllegalParameter(); } } - else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) ).Len() ) + else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, sal_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 ); @@ -2362,7 +2362,7 @@ void ScInterpreter::ScExternal() --nPar; // 0 .. (nParamCount-1) ScAddInArgumentType eType = aCall.GetArgType( nPar ); - BYTE nStackType = sal::static_int_cast( GetStackType() ); + sal_uInt8 nStackType = sal::static_int_cast( GetStackType() ); uno::Any aParam; switch (eType) @@ -2373,7 +2373,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); } @@ -2399,9 +2399,9 @@ void ScInterpreter::ScExternal() ::rtl::math::approxCeil( fVal ); if ( fInt >= LONG_MIN && fInt <= LONG_MAX ) { - INT32 nIntVal = (long)fInt; - uno::Sequence aInner( &nIntVal, 1 ); - uno::Sequence< uno::Sequence > aOuter( &aInner, 1 ); + sal_Int32 nIntVal = (long)fInt; + uno::Sequence aInner( &nIntVal, 1 ); + uno::Sequence< uno::Sequence > aOuter( &aInner, 1 ); aParam <<= aOuter; } else @@ -2695,7 +2695,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(); @@ -2744,11 +2744,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( GetStackType() ); + SbxVariable* pPar = refPar->Get( (sal_uInt16) i ); + sal_uInt8 nStackType = sal::static_int_cast( GetStackType() ); switch( nStackType ) { case svDouble: @@ -2776,7 +2776,7 @@ void ScInterpreter::ScMacro() if( nTab1 != nTab2 ) { SetError( errIllegalParameter ); - bOk = FALSE; + bOk = sal_False; } else { @@ -2787,7 +2787,7 @@ void ScInterpreter::ScMacro() for( SCROW nRow = nRow1; bOk && nRow <= nRow2; nRow++ ) { aAdr.SetRow( nRow ); - INT32 nIdx[ 2 ]; + sal_Int32 nIdx[ 2 ]; nIdx[ 0 ] = nRow-nRow1+1; for( SCCOL nCol = nCol1; bOk && nCol <= nCol2; nCol++ ) { @@ -2809,15 +2809,15 @@ void ScInterpreter::ScMacro() { pMat->GetDimensions(nC, nR); SbxDimArrayRef refArray = new SbxDimArray; - refArray->AddDim32( 1, static_cast(nR) ); - refArray->AddDim32( 1, static_cast(nC) ); + refArray->AddDim32( 1, static_cast(nR) ); + refArray->AddDim32( 1, static_cast(nC) ); for( SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++ ) { - INT32 nIdx[ 2 ]; - nIdx[ 0 ] = static_cast(nMatRow+1); + sal_Int32 nIdx[ 2 ]; + nIdx[ 0 ] = static_cast(nMatRow+1); for( SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++ ) { - nIdx[ 1 ] = static_cast(nMatCol+1); + nIdx[ 1 ] = static_cast(nMatCol+1); SbxVariable* p = refArray->Get32( nIdx ); if (pMat->IsString(nMatCol, nMatRow)) p->PutString( pMat->GetString(nMatCol, nMatRow) ); @@ -2833,7 +2833,7 @@ void ScInterpreter::ScMacro() break; default: SetError( errIllegalParameter ); - bOk = FALSE; + bOk = sal_False; } } if( bOk ) @@ -2859,7 +2859,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; @@ -2888,13 +2888,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(j); + nIdx[ nRowIdx ] = nRs + static_cast(j); for ( SCSIZE i=0; i < nC; i++ ) { - nIdx[ nColIdx ] = nCs + static_cast(i); + nIdx[ nColIdx ] = nCs + static_cast(i); pV = pDimArray->Get32( nIdx ); eType = pV->GetType(); if ( eType >= SbxINTEGER && eType <= SbxDOUBLE ) @@ -2919,14 +2919,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() ) { @@ -2965,7 +2965,7 @@ BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos ) } } else - SetError( nErr ), bOk = FALSE; + SetError( nErr ), bOk = sal_False; break; default : pVar->PutDouble( 0.0 ); @@ -2980,7 +2980,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(); @@ -2996,15 +2996,15 @@ void ScInterpreter::ScTableOp() PopSingleRef( pTableOp->aOld1 ); PopSingleRef( pTableOp->aFormulaPos ); - pTableOp->bValid = TRUE; + pTableOp->bValid = sal_True; pDok->aTableOpList.Insert( 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(); @@ -3021,7 +3021,7 @@ void ScInterpreter::ScTableOp() if ( nParamCount == 5 ) pDok->SetTableOpDirty( pTableOp->aOld2 ); } - pTableOp->bCollectNotifications = FALSE; + pTableOp->bCollectNotifications = sal_False; ScBaseCell* pFCell = pDok->GetCell( pTableOp->aFormulaPos ); if ( pFCell && pFCell->GetCellType() == CELLTYPE_FORMULA ) @@ -3077,7 +3077,7 @@ void ScInterpreter::ScErrCell() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScErrCell" ); double fErrNum = GetDouble(); - PushError((USHORT) fErrNum); + PushError((sal_uInt16) fErrNum); } */ @@ -3126,7 +3126,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; @@ -3266,7 +3266,7 @@ void ScInterpreter::ScExternalRef() 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 @@ -3293,11 +3293,11 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc, RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTTT" ); // pStack = new ScToken*[ MAXSTACK ]; - 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; @@ -3314,7 +3314,7 @@ ScInterpreter::~ScInterpreter() // delete pStack; if ( pStackObj == pGlobalStack ) - bGlobalStackInUse = FALSE; + bGlobalStackInUse = sal_False; else delete pStackObj; if (pTokenMatrixMap) @@ -3334,10 +3334,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; @@ -3346,7 +3346,7 @@ StackVar ScInterpreter::Interpret() nFuncFmtIndex = nCurFmtIndex = nRetFmtIndex = 0; xResult = NULL; pJumpMatrix = NULL; - glSubTotal = FALSE; + glSubTotal = sal_False; ScTokenMatrixMap::const_iterator aTokenMatrixMapIter; // Once upon a time we used to have FP exceptions on, and there was a @@ -3538,28 +3538,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( sal_False ); break; + case ocMinA : ScMin( sal_True ); break; + case ocMax : ScMax( sal_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( sal_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( sal_False ); break; + case ocVarA : ScVar( sal_True ); break; + case ocVarP : ScVarP( sal_False ); break; + case ocVarPA : ScVarP( sal_True ); break; + case ocStDev : ScStDev( sal_False ); break; + case ocStDevA : ScStDev( sal_True ); break; + case ocStDevP : ScStDevP( sal_False ); break; + case ocStDevPA : ScStDevP( sal_True ); break; case ocBW : ScBW(); break; case ocDIA : ScDIA(); break; case ocGDA : ScGDA(); break; @@ -3766,7 +3766,7 @@ StackVar ScInterpreter::Interpret() do { bGotResult = false; - BYTE nLevel = 0; + sal_uInt8 nLevel = 0; if ( GetStackType( ++nLevel ) == svJumpMatrix ) ; // nothing else if ( GetStackType( ++nLevel ) == svJumpMatrix ) @@ -3896,7 +3896,7 @@ StackVar ScInterpreter::Interpret() if (ScMatrix::IsNonValueType( nMatValType)) { if ( xMat->IsEmptyPath( 0, 0)) - { // result of empty FALSE jump path + { // result of empty sal_False jump path FormulaTokenRef xRes = new FormulaDoubleToken( 0.0); PushTempToken( new ScMatrixCellResultToken( xMat, xRes)); nRetTypeExpr = NUMBERFORMAT_LOGICAL; @@ -3911,7 +3911,7 @@ StackVar ScInterpreter::Interpret() } else { - USHORT nErr = GetDoubleErrorValue( pMatVal->fVal); + sal_uInt16 nErr = GetDoubleErrorValue( pMatVal->fVal); FormulaTokenRef xRes; if (nErr) xRes = new FormulaErrorToken( nErr); diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 73794cf15b2d..cf22b23e69ef 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -152,7 +152,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); @@ -241,7 +241,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); @@ -547,7 +547,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 @@ -846,7 +846,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 { @@ -893,7 +893,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 { @@ -1118,7 +1118,7 @@ ScMatrixRef ScInterpreter::MatConcat(ScMatrix* pMat1, ScMatrix* pMat2) { 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) @@ -1167,9 +1167,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(sal_False); } -void ScInterpreter::CalculateAddSub(BOOL _bSub) +void ScInterpreter::CalculateAddSub(sal_Bool _bSub) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateAddSub" ); ScMatrixRef pMat1 = NULL; @@ -1178,7 +1178,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(); @@ -1244,18 +1244,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 = sal_False; // Matrix - double } SCSIZE nC, nR; pMat->GetDimensions(nC, nR); @@ -1329,18 +1329,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 = sal_False; // Matrix - double } SCSIZE nC, nR; pMat->GetDimensions(nC, nR); @@ -1357,7 +1357,7 @@ void ScInterpreter::ScAmpersand() { for ( SCSIZE i = 0; i < nCount; i++ ) { - USHORT nErr = pMat->GetErrorIfNotString( i); + sal_uInt16 nErr = pMat->GetErrorIfNotString( i); if (nErr) pResMat->PutError( nErr, i); else @@ -1372,7 +1372,7 @@ void ScInterpreter::ScAmpersand() { for ( SCSIZE i = 0; i < nCount; i++ ) { - USHORT nErr = pMat->GetErrorIfNotString( i); + sal_uInt16 nErr = pMat->GetErrorIfNotString( i); if (nErr) pResMat->PutError( nErr, i); else @@ -1399,7 +1399,7 @@ void ScInterpreter::ScAmpersand() void ScInterpreter::ScSub() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSub" ); - CalculateAddSub(TRUE); + CalculateAddSub(sal_True); } void ScInterpreter::ScMul() @@ -1409,7 +1409,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 @@ -1488,7 +1488,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(); @@ -1523,18 +1523,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 = sal_False; // Matrix - double } SCSIZE nC, nR; pMat->GetDimensions(nC, nR); @@ -1605,18 +1605,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 = sal_False; // Matrix - double } SCSIZE nC, nR; pMat->GetDimensions(nC, nR); @@ -1650,7 +1650,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; @@ -1668,7 +1668,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) @@ -1704,9 +1704,9 @@ void ScInterpreter::ScSumProduct() void ScInterpreter::ScSumX2MY2() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2MY2" ); - CalculateSumX2MY2SumX2DY2(FALSE); + CalculateSumX2MY2SumX2DY2(sal_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 ) ) @@ -1750,7 +1750,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() @@ -1852,15 +1852,15 @@ void ScInterpreter::ScFrequency() PushMatrix(pResMat); } -BOOL ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX, - SCSIZE nC, SCSIZE nR, BOOL bSwapColRow, BOOL bZeroConstant ) +sal_Bool ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX, + SCSIZE nC, SCSIZE nR, sal_Bool bSwapColRow, sal_Bool bZeroConstant ) { // multiple Regression: Varianzen der Koeffizienten - // bSwapColRow==TRUE : Koeffizienten in Zeilen statt Spalten angeordnet + // bSwapColRow==sal_True : Koeffizienten in Zeilen statt Spalten angeordnet SCSIZE i, j, k; double sum; ScMatrixRef pC = GetNewMat(nC, nC); if ( !pC ) - return FALSE; + return sal_False; // X transformiert mit X multipziert, X'X Matrix if ( !bZeroConstant ) { // in der X-Designmatrix existiert ein gedachtes X0j==1 @@ -1931,17 +1931,17 @@ BOOL ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX, } } // X'X Inverse - BOOL bOk = TRUE; - USHORT nErr = nGlobalError; + sal_Bool bOk = sal_True; + sal_uInt16 nErr = nGlobalError; PushMatrix(pC); - BYTE nTmp = cPar; + sal_uInt8 nTmp = cPar; cPar = 1; ScMatInv(); cPar = nTmp; if ( nGlobalError ) { nGlobalError = nErr; - bOk = FALSE; + bOk = sal_False; } else { @@ -1957,7 +1957,7 @@ BOOL ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX, return bOk; } // ----------------------------------------------------------------------------- -void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,BOOL bConstant,SCSIZE N,SCSIZE M,BYTE nCase) +void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,sal_Bool bConstant,SCSIZE N,SCSIZE M,sal_uInt8 nCase) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::RGetVariances" ); // pE[0] := Sigma i=1...n (Yi) @@ -2000,7 +2000,7 @@ void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pResMat->PutDouble(sqrt(fSE2), 1, 2); // sen...se1 (Standardfehler der Koeffizienten mn...m1) // seb (Standardfehler der Konstanten b) - if ( RGetVariances( pV, pMatX, M+1, N, nCase != 2, FALSE ) ) + if ( RGetVariances( pV, pMatX, M+1, N, nCase != 2, sal_False ) ) { for (i = 0; i < M+1; i++) pResMat->PutDouble( sqrt(fSE2 * pV->GetDouble(i)), M-i, 1 ); @@ -2031,7 +2031,7 @@ void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& { double fSE2 = fSQR/(N-M); pResMat->PutDouble(sqrt(fSE2), 1, 2); - if ( RGetVariances( pV, pMatX, M, N, nCase != 2, TRUE ) ) + if ( RGetVariances( pV, pMatX, M, N, nCase != 2, sal_True ) ) { for (i = 0; i < M; i++) pResMat->PutDouble( sqrt(fSE2 * pV->GetDouble(i)), M-i-1, 1 ); @@ -2054,9 +2054,9 @@ void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& void ScInterpreter::ScRGP() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRGP" ); - CalulateRGPRKP(FALSE); + CalulateRGPRKP(sal_False); } -bool ScInterpreter::CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY) +bool ScInterpreter::CheckMatrix(sal_Bool _bLOG,sal_Bool _bTrendGrowth,sal_uInt8& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY) { nCX = 0; nCY = 0; @@ -2154,21 +2154,21 @@ bool ScInterpreter::CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE } return true; } -void ScInterpreter::CalulateRGPRKP(BOOL _bRKP) +void ScInterpreter::CalulateRGPRKP(sal_Bool _bRKP) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CheckMatrix" ); - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( !MustHaveParamCount( nParamCount, 1, 4 ) ) return; - BOOL bConstant, bStats; + sal_Bool bConstant, bStats; if (nParamCount == 4) bStats = GetBool(); else - bStats = FALSE; + bStats = sal_False; if (nParamCount >= 3) bConstant = GetBool(); else - bConstant = TRUE; + bConstant = sal_True; ScMatrixRef pMatX; ScMatrixRef pMatY; if (nParamCount >= 2) @@ -2181,11 +2181,11 @@ void ScInterpreter::CalulateRGPRKP(BOOL _bRKP) PushIllegalParameter(); return; } // if (!pMatY) - BYTE nCase; // 1 = normal, 2,3 = mehrfach + sal_uInt8 nCase; // 1 = normal, 2,3 = mehrfach SCSIZE nCX, nCY; SCSIZE nRX, nRY; SCSIZE M = 0, N = 0; - if ( !CheckMatrix(_bRKP,FALSE,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) ) + if ( !CheckMatrix(_bRKP,sal_False,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) ) return; ScMatrixRef pResMat; @@ -2356,10 +2356,10 @@ void ScInterpreter::CalulateRGPRKP(BOOL _bRKP) void ScInterpreter::ScRKP() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRKP" ); - CalulateRGPRKP(TRUE); + CalulateRGPRKP(sal_True); } // ----------------------------------------------------------------------------- -bool ScInterpreter::Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,BOOL bConstant,SCSIZE N,SCSIZE M) +bool ScInterpreter::Calculate4(sal_Bool _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,sal_Bool bConstant,SCSIZE N,SCSIZE M) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Calculate4" ); pQ->PutDouble((double)N, 0, 0); @@ -2412,7 +2412,7 @@ bool ScInterpreter::Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,B return true; } -ScMatrixRef ScInterpreter::Calculate2(const BOOL bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,BYTE nCase) +ScMatrixRef ScInterpreter::Calculate2(const sal_Bool bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,sal_uInt8 nCase) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Calculate2" ); SCSIZE i, j, k; @@ -2553,19 +2553,19 @@ bool ScInterpreter::Calculate3(const SCSIZE M ,ScMatrixRef& pQ) void ScInterpreter::ScTrend() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTrend" ); - CalculateTrendGrowth(FALSE); + CalculateTrendGrowth(sal_False); } -void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth) +void ScInterpreter::CalculateTrendGrowth(sal_Bool _bGrowth) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateTrendGrowth" ); - BYTE nParamCount = GetByte(); + sal_uInt8 nParamCount = GetByte(); if ( !MustHaveParamCount( nParamCount, 1, 4 ) ) return; - BOOL bConstant; + sal_Bool bConstant; if (nParamCount == 4) bConstant = GetBool(); else - bConstant = TRUE; + bConstant = sal_True; ScMatrixRef pMatX; ScMatrixRef pMatY; ScMatrixRef pMatNewX; @@ -2584,11 +2584,11 @@ void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth) return; } // if (!pMatY) - BYTE nCase; // 1 = normal, 2,3 = mehrfach + sal_uInt8 nCase; // 1 = normal, 2,3 = mehrfach SCSIZE nCX, nCY; SCSIZE nRX, nRY; SCSIZE M = 0, N = 0; - if ( !CheckMatrix(_bGrowth,TRUE,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) ) + if ( !CheckMatrix(_bGrowth,sal_True,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) ) return; @@ -2719,7 +2719,7 @@ void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth) void ScInterpreter::ScGrowth() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGrowth" ); - CalculateTrendGrowth(TRUE); + CalculateTrendGrowth(sal_True); } void ScInterpreter::ScMatRef() @@ -2748,7 +2748,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); } @@ -2772,7 +2772,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 0991071774ed..56a4aed1ab3a 100644 --- a/sc/source/core/tool/navicfg.cxx +++ b/sc/source/core/tool/navicfg.cxx @@ -50,7 +50,7 @@ ScNavipiCfg::ScNavipiCfg() : //------------------------------------------------------------------------ -void ScNavipiCfg::SetListMode(USHORT nNew) +void ScNavipiCfg::SetListMode(sal_uInt16 nNew) { if ( nListMode != nNew ) { @@ -59,7 +59,7 @@ void ScNavipiCfg::SetListMode(USHORT nNew) } } -void ScNavipiCfg::SetDragMode(USHORT nNew) +void ScNavipiCfg::SetDragMode(sal_uInt16 nNew) { if ( nDragMode != nNew ) { @@ -68,7 +68,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 dc63c7819eff..9fdd42637762 100644 --- a/sc/source/core/tool/optutil.cxx +++ b/sc/source/core/tool/optutil.cxx @@ -39,7 +39,7 @@ //------------------------------------------------------------------ // static -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 a863bc0a68c2..77a92ff0cef2 100644 --- a/sc/source/core/tool/parclass.cxx +++ b/sc/source/core/tool/parclass.cxx @@ -239,7 +239,7 @@ void ScParameterClassification::Init() if ( pRun->aData.nParam[j] ) { eLast = pRun->aData.nParam[j]; - pRun->nMinParams = sal::static_int_cast( j+1 ); + pRun->nMinParams = sal::static_int_cast( j+1 ); } else pRun->aData.nParam[j] = eLast; @@ -252,7 +252,7 @@ void ScParameterClassification::Init() if ( !pRun->aData.nParam[j] ) { if ( j == 0 || pRun->aData.nParam[j-1] != Bounds ) - pRun->nMinParams = sal::static_int_cast( j ); + pRun->nMinParams = sal::static_int_cast( j ); pRun->aData.nParam[j] = Bounds; } } @@ -285,7 +285,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 ) @@ -319,11 +319,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) ) @@ -347,7 +347,7 @@ ScParameterClassification::GetExternalParameterType( const formula::FormulaToken } } else if ( (aUnoName = ScGlobal::GetAddInCollection()->FindFunction( - aFuncName, FALSE)).Len() ) + aFuncName, sal_False)).Len() ) { // the relevant parts of ScUnoAddInCall without having to create one const ScUnoAddInFuncData* pFuncData = @@ -405,7 +405,7 @@ void ScParameterClassification::MergeArgumentsFromFunctionResource() continue; // not an internal opcode or already done RunData* pRun = &pData[ pDesc->nFIndex ]; - USHORT nArgs = pDesc->GetSuppressedArgCount(); + sal_uInt16 nArgs = pDesc->GetSuppressedArgCount(); if ( nArgs >= VAR_ARGS ) { nArgs -= VAR_ARGS - 1; @@ -419,7 +419,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; @@ -464,7 +464,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 ) @@ -515,7 +515,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 c701c558310b..5d96ba3e0dad 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -63,8 +63,8 @@ ScPrintOptions::~ScPrintOptions() void ScPrintOptions::SetDefaults() { - bSkipEmpty = TRUE; - bAllSheets = FALSE; + bSkipEmpty = sal_True; + bAllSheets = sal_False; } const ScPrintOptions& ScPrintOptions::operator=( const ScPrintOptions& rCpy ) @@ -87,11 +87,11 @@ int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const // ----------------------------------------------------------------------- -//UNUSED2008-05 ScTpPrintItem::ScTpPrintItem( USHORT nWhichP ) : SfxPoolItem( nWhichP ) +//UNUSED2008-05 ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP ) : SfxPoolItem( nWhichP ) //UNUSED2008-05 { //UNUSED2008-05 } -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 b432f585e854..091148d7bb1d 100644 --- a/sc/source/core/tool/prnsave.cxx +++ b/sc/source/core/tool/prnsave.cxx @@ -49,7 +49,7 @@ ScPrintSaverTab::ScPrintSaverTab() : mpRepeatCol(NULL), mpRepeatRow(NULL), - mbEntireSheet(FALSE) + mbEntireSheet(sal_False) { } @@ -59,7 +59,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; @@ -73,12 +73,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 ) && @@ -117,14 +117,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; iGetItemSet(); 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 sal_False; } bool lcl_HasControllersLocked( SfxObjectShell& rObjSh ) @@ -88,7 +88,7 @@ bool lcl_HasControllersLocked( SfxObjectShell& rObjSh ) } 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 ) ) @@ -128,7 +128,7 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText, pGlobalProgress = pProgress; nGlobalRange = nRange; nGlobalPercent = 0; - bGlobalNoUserBreak = TRUE; + bGlobalNoUserBreak = sal_True; } } @@ -147,13 +147,13 @@ ScProgress::~ScProgress() pGlobalProgress = NULL; nGlobalRange = 0; nGlobalPercent = 0; - bGlobalNoUserBreak = TRUE; + bGlobalNoUserBreak = sal_True; } } // static -void ScProgress::CreateInterpretProgress( ScDocument* pDoc, BOOL bWait ) +void ScProgress::CreateInterpretProgress( ScDocument* pDoc, sal_Bool bWait ) { if ( bAllowInterpretProgress ) { @@ -163,14 +163,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, sal_False, bWait ); pInterpretDoc = pDoc; } } diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 5b3b92f78ee4..3e755ed10d1e 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -42,7 +42,7 @@ using ::std::vector; ScQueryParamBase::ScQueryParamBase() { Resize( MAXQUERY ); - for (USHORT i=0; iFormat( aStr, nFlags, pDoc, eConv ); @@ -124,7 +124,7 @@ void ScRangeList::Format( String& rStr, USHORT nFlags, ScDocument* pDoc, } -void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) +void ScRangeList::Join( const ScRange& r, sal_Bool bIsInList ) { if ( !Count() ) { @@ -138,31 +138,31 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) SCROW nRow2 = r.aEnd.Row(); SCTAB nTab2 = r.aEnd.Tab(); ScRangePtr pOver = (ScRangePtr) &r; // fies aber wahr wenn bInList - ULONG nOldPos = 0; + sal_uLong nOldPos = 0; if ( bIsInList ) { // merken um ggbf. zu loeschen bzw. wiederherzustellen nOldPos = GetPos( pOver ); } - BOOL bJoinedInput = FALSE; + sal_Bool bJoinedInput = sal_False; for ( ScRangePtr p = First(); p && pOver; p = Next() ) { if ( p == pOver ) continue; // derselbe, weiter mit dem naechsten - BOOL bJoined = FALSE; + sal_Bool bJoined = sal_False; if ( p->In( r ) ) { // Range r in Range p enthalten oder identisch if ( bIsInList ) - bJoined = TRUE; // weg mit Range r + bJoined = sal_True; // weg mit Range r else { // das war's dann - bJoinedInput = TRUE; // nicht anhaengen + bJoinedInput = sal_True; // nicht anhaengen break; // for } } else if ( r.In( *p ) ) { // Range p in Range r enthalten, r zum neuen Range machen *p = r; - bJoined = TRUE; + bJoined = sal_True; } if ( !bJoined && p->aStart.Tab() == nTab1 && p->aEnd.Tab() == nTab2 ) { // 2D @@ -171,12 +171,12 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) if ( p->aStart.Row() == nRow2+1 ) { // oben p->aStart.SetRow( nRow1 ); - bJoined = TRUE; + bJoined = sal_True; } else if ( p->aEnd.Row() == nRow1-1 ) { // unten p->aEnd.SetRow( nRow2 ); - bJoined = TRUE; + bJoined = sal_True; } } else if ( p->aStart.Row() == nRow1 && p->aEnd.Row() == nRow2 ) @@ -184,12 +184,12 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) if ( p->aStart.Col() == nCol2+1 ) { // links p->aStart.SetCol( nCol1 ); - bJoined = TRUE; + bJoined = sal_True; } else if ( p->aEnd.Col() == nCol1-1 ) { // rechts p->aEnd.SetCol( nCol2 ); - bJoined = TRUE; + bJoined = sal_True; } } } @@ -203,8 +203,8 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) if ( nOldPos ) nOldPos--; // Seek richtig aufsetzen } - bJoinedInput = TRUE; - Join( *p, TRUE ); // rekursiv! + bJoinedInput = sal_True; + Join( *p, sal_True ); // rekursiv! } } if ( bIsInList ) @@ -214,31 +214,31 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) } -BOOL ScRangeList::operator==( const ScRangeList& r ) const +sal_Bool ScRangeList::operator==( const ScRangeList& r ) const { if ( this == &r ) - return TRUE; // identische Referenz + return sal_True; // identische Referenz if ( Count() != r.Count() ) - return FALSE; - ULONG nCnt = Count(); - for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ ) + return sal_False; + sal_uLong nCnt = Count(); + for ( sal_uLong nIdx = 0; nIdx < nCnt; nIdx++ ) { if ( *GetObject( nIdx ) != *r.GetObject( nIdx ) ) - return FALSE; // auch andere Reihenfolge ist ungleich + return sal_False; // auch andere Reihenfolge ist ungleich } - return TRUE; + return sal_True; } -BOOL ScRangeList::operator!=( const ScRangeList& r ) const +sal_Bool ScRangeList::operator!=( const ScRangeList& r ) const { return !operator==( r ); } -BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode, +sal_Bool ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode, ScDocument* pDoc, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if ( Count() ) { SCCOL nCol1; @@ -263,7 +263,7 @@ BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode, theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 ) != UR_NOTHING ) { - bChanged = TRUE; + bChanged = sal_True; pR->aStart.Set( theCol1, theRow1, theTab1 ); pR->aEnd.Set( theCol2, theRow2, theTab2 ); } @@ -275,8 +275,8 @@ BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode, ScRange* ScRangeList::Find( const ScAddress& rAdr ) const { - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) { ScRange* pR = GetObject( j ); if ( pR->In( rAdr ) ) @@ -290,8 +290,8 @@ ScRangeList::ScRangeList( const ScRangeList& rList ) : ScRangeListBase(), SvRefBase() { - ULONG nListCount = rList.Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = rList.Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) Append( *rList.GetObject( j ) ); } @@ -300,46 +300,46 @@ ScRangeList& ScRangeList::operator=(const ScRangeList& rList) { RemoveAll(); - ULONG nListCount = rList.Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = rList.Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) Append( *rList.GetObject( j ) ); return *this; } -BOOL ScRangeList::Intersects( const ScRange& rRange ) const +sal_Bool ScRangeList::Intersects( const ScRange& rRange ) const { - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) if ( GetObject(j)->Intersects( rRange ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL ScRangeList::In( const ScRange& rRange ) const +sal_Bool ScRangeList::In( const ScRange& rRange ) const { - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) if ( GetObject(j)->In( rRange ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -ULONG ScRangeList::GetCellCount() const +sal_uLong ScRangeList::GetCellCount() const { - ULONG nCellCount = 0; - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nCellCount = 0; + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) { ScRange* pR = GetObject( j ); - nCellCount += ULONG(pR->aEnd.Col() - pR->aStart.Col() + 1) - * ULONG(pR->aEnd.Row() - pR->aStart.Row() + 1) - * ULONG(pR->aEnd.Tab() - pR->aStart.Tab() + 1); + nCellCount += sal_uLong(pR->aEnd.Col() - pR->aStart.Col() + 1) + * sal_uLong(pR->aEnd.Row() - pR->aStart.Row() + 1) + * sal_uLong(pR->aEnd.Tab() - pR->aStart.Tab() + 1); } return nCellCount; } @@ -354,7 +354,7 @@ ScRangePairList::~ScRangePairList() } -void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) +void ScRangePairList::Join( const ScRangePair& r, sal_Bool bIsInList ) { if ( !Count() ) { @@ -370,17 +370,17 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) SCROW nRow2 = r1.aEnd.Row(); SCTAB nTab2 = r1.aEnd.Tab(); ScRangePair* pOver = (ScRangePair*) &r; // fies aber wahr wenn bInList - ULONG nOldPos = 0; + sal_uLong nOldPos = 0; if ( bIsInList ) { // merken um ggbf. zu loeschen bzw. wiederherzustellen nOldPos = GetPos( pOver ); } - BOOL bJoinedInput = FALSE; + sal_Bool bJoinedInput = sal_False; for ( ScRangePair* p = First(); p && pOver; p = Next() ) { if ( p == pOver ) continue; // derselbe, weiter mit dem naechsten - BOOL bJoined = FALSE; + sal_Bool bJoined = sal_False; ScRange& rp1 = p->GetRange(0); ScRange& rp2 = p->GetRange(1); if ( rp2 == r2 ) @@ -388,17 +388,17 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) if ( rp1.In( r1 ) ) { // RangePair r in RangePair p enthalten oder identisch if ( bIsInList ) - bJoined = TRUE; // weg mit RangePair r + bJoined = sal_True; // weg mit RangePair r else { // das war's dann - bJoinedInput = TRUE; // nicht anhaengen + bJoinedInput = sal_True; // nicht anhaengen break; // for } } else if ( r1.In( rp1 ) ) { // RangePair p in RangePair r enthalten, r zum neuen RangePair machen *p = r; - bJoined = TRUE; + bJoined = sal_True; } } if ( !bJoined && rp1.aStart.Tab() == nTab1 && rp1.aEnd.Tab() == nTab2 @@ -414,14 +414,14 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) { // oben rp1.aStart.SetRow( nRow1 ); rp2.aStart.SetRow( r2.aStart.Row() ); - bJoined = TRUE; + bJoined = sal_True; } else if ( rp1.aEnd.Row() == nRow1-1 && rp2.aEnd.Row() == r2.aStart.Row()-1 ) { // unten rp1.aEnd.SetRow( nRow2 ); rp2.aEnd.SetRow( r2.aEnd.Row() ); - bJoined = TRUE; + bJoined = sal_True; } } else if ( rp1.aStart.Row() == nRow1 && rp1.aEnd.Row() == nRow2 @@ -433,14 +433,14 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) { // links rp1.aStart.SetCol( nCol1 ); rp2.aStart.SetCol( r2.aStart.Col() ); - bJoined = TRUE; + bJoined = sal_True; } else if ( rp1.aEnd.Col() == nCol1-1 && rp2.aEnd.Col() == r2.aEnd.Col()-1 ) { // rechts rp1.aEnd.SetCol( nCol2 ); rp2.aEnd.SetCol( r2.aEnd.Col() ); - bJoined = TRUE; + bJoined = sal_True; } } } @@ -454,8 +454,8 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) if ( nOldPos ) nOldPos--; // Seek richtig aufsetzen } - bJoinedInput = TRUE; - Join( *p, TRUE ); // rekursiv! + bJoinedInput = sal_True; + Join( *p, sal_True ); // rekursiv! } } if ( bIsInList ) @@ -465,27 +465,27 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) } -BOOL ScRangePairList::operator==( const ScRangePairList& r ) const +sal_Bool ScRangePairList::operator==( const ScRangePairList& r ) const { if ( this == &r ) - return TRUE; // identische Referenz + return sal_True; // identische Referenz if ( Count() != r.Count() ) - return FALSE; - ULONG nCnt = Count(); - for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ ) + return sal_False; + sal_uLong nCnt = Count(); + for ( sal_uLong nIdx = 0; nIdx < nCnt; nIdx++ ) { if ( *GetObject( nIdx ) != *r.GetObject( nIdx ) ) - return FALSE; // auch andere Reihenfolge ist ungleich + return sal_False; // auch andere Reihenfolge ist ungleich } - return TRUE; + return sal_True; } -BOOL ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, +sal_Bool ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, ScDocument* pDoc, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if ( Count() ) { SCCOL nCol1; @@ -497,7 +497,7 @@ BOOL ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, rWhere.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); for ( ScRangePair* pR = First(); pR; pR = Next() ) { - for ( USHORT j=0; j<2; j++ ) + for ( sal_uInt16 j=0; j<2; j++ ) { ScRange& rRange = pR->GetRange(j); SCCOL theCol1; @@ -513,7 +513,7 @@ BOOL ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 ) != UR_NOTHING ) { - bChanged = TRUE; + bChanged = sal_True; rRange.aStart.Set( theCol1, theRow1, theTab1 ); rRange.aEnd.Set( theCol2, theRow2, theTab2 ); } @@ -528,8 +528,8 @@ void ScRangePairList::DeleteOnTab( SCTAB nTab ) { // Delete entries that have the labels (first range) on nTab - ULONG nListCount = Count(); - ULONG nPos = 0; + sal_uLong nListCount = Count(); + sal_uLong nPos = 0; while ( nPos < nListCount ) { ScRangePair* pR = GetObject( nPos ); @@ -548,8 +548,8 @@ void ScRangePairList::DeleteOnTab( SCTAB nTab ) ScRangePair* ScRangePairList::Find( const ScAddress& rAdr ) const { - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) { ScRangePair* pR = GetObject( j ); if ( pR->GetRange(0).In( rAdr ) ) @@ -561,8 +561,8 @@ ScRangePair* ScRangePairList::Find( const ScAddress& rAdr ) const ScRangePair* ScRangePairList::Find( const ScRange& rRange ) const { - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) { ScRangePair* pR = GetObject( j ); if ( pR->GetRange(0) == rRange ) @@ -575,8 +575,8 @@ ScRangePair* ScRangePairList::Find( const ScRange& rRange ) const ScRangePairList* ScRangePairList::Clone() const { ScRangePairList* pNew = new ScRangePairList; - ULONG nListCount = Count(); - for ( ULONG j = 0; j < nListCount; j++ ) + sal_uLong nListCount = Count(); + for ( sal_uLong j = 0; j < nListCount; j++ ) { pNew->Append( *GetObject( j ) ); } @@ -670,15 +670,15 @@ ScRangePairList_QsortNameCompare( const void* p1, const void* p2 ) } -ScRangePair** ScRangePairList::CreateNameSortedArray( ULONG& nListCount, +ScRangePair** ScRangePairList::CreateNameSortedArray( sal_uLong& nListCount, ScDocument* pDoc ) const { nListCount = Count(); 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 = GetObject( j ); diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index e81f1f3bd94d..cfd1b1135bec 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -55,8 +55,8 @@ using namespace formula; // 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( sal_False ), mnMaxRow(-1), mnMaxCol(-1) {} ScRangeData::ScRangeData( ScDocument* pDok, @@ -72,7 +72,7 @@ ScRangeData::ScRangeData( ScDocument* pDok, eType ( nType ), pDoc ( pDok ), nIndex ( 0 ), - bModified ( FALSE ), + bModified ( sal_False ), mnMaxRow (-1), mnMaxCol (-1) { @@ -120,7 +120,7 @@ ScRangeData::ScRangeData( ScDocument* pDok, eType ( nType ), pDoc ( pDok ), nIndex ( 0 ), - bModified ( FALSE ), + bModified ( sal_False ), mnMaxRow (-1), mnMaxCol (-1) { @@ -157,13 +157,13 @@ ScRangeData::ScRangeData( ScDocument* pDok, eType ( RT_NAME ), pDoc ( pDok ), nIndex ( 0 ), - bModified ( FALSE ), + bModified ( sal_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()); @@ -259,15 +259,15 @@ void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_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) @@ -285,7 +285,7 @@ void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode, void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; ScToken* t; pCode->Reset(); @@ -303,7 +303,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; } } } @@ -313,7 +313,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 = sal_False; ScToken* t; pCode->Reset(); @@ -331,7 +331,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; } } } @@ -339,29 +339,29 @@ 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 sal_False; - USHORT nLen = pCode->GetLen(); - if ( nLen != rData.pCode->GetLen() ) return FALSE; + sal_uInt16 nLen = pCode->GetLen(); + if ( nLen != rData.pCode->GetLen() ) return sal_False; FormulaToken** ppThis = pCode->GetArray(); FormulaToken** ppOther = rData.pCode->GetArray(); - for ( USHORT i=0; iIsReference( rRange ); - return FALSE; + return sal_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 ) { @@ -401,37 +401,37 @@ BOOL ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const return pTemp->IsReference( rRange ); } - return FALSE; + return sal_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 sal_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, sal_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: @@ -494,18 +494,18 @@ void ScRangeData::MakeValidName( String& rName ) // static } } -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 sal_False; while ( nPos < nLen ) { if ( !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_NAME ) ) - return FALSE; + return sal_False; } ScAddress aAddr; ScRange aRange; @@ -515,9 +515,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 sal_False; } - return TRUE; + return sal_True; } void ScRangeData::SetMaxRow(SCROW nRow) @@ -541,15 +541,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, @@ -690,7 +690,7 @@ ScRangeName::ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument) pDoc ( pDocument ), nSharedMaxIndex (rScRangeName.nSharedMaxIndex) { - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ((ScRangeData*)At(i))->SetDocument(pDocument); ((ScRangeData*)At(i))->SetIndex(((ScRangeData*)rScRangeName.At(i))->GetIndex()); @@ -699,63 +699,63 @@ ScRangeName::ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument) short ScRangeName::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const { - USHORT i1 = ((ScRangeData*)pKey1)->GetIndex(); - USHORT i2 = ((ScRangeData*)pKey2)->GetIndex(); + sal_uInt16 i1 = ((ScRangeData*)pKey1)->GetIndex(); + sal_uInt16 i2 = ((ScRangeData*)pKey2)->GetIndex(); return (short) i1 - (short) i2; } -BOOL ScRangeName::SearchNameUpper( const String& rUpperName, USHORT& rIndex ) const +sal_Bool ScRangeName::SearchNameUpper( const String& rUpperName, sal_uInt16& rIndex ) const { // SearchNameUpper must be called with an upper-case search string - USHORT i = 0; + sal_uInt16 i = 0; while (i < nCount) { if ( ((*this)[i])->GetUpperName() == rUpperName ) { rIndex = i; - return TRUE; + return sal_True; } i++; } - return FALSE; + return sal_False; } -BOOL ScRangeName::SearchName( const String& rName, USHORT& rIndex ) const +sal_Bool ScRangeName::SearchName( const String& rName, sal_uInt16& rIndex ) const { if ( nCount > 0 ) return SearchNameUpper( ScGlobal::pCharClass->upper( rName ), rIndex ); else - return FALSE; + return sal_False; } void ScRangeName::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - for (USHORT i=0; iUpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz); } void ScRangeName::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest ) { - for (USHORT i=0; iUpdateTranspose( rSource, rDest ); } void ScRangeName::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ) { - for (USHORT i=0; iUpdateGrow( rArea, nGrowX, nGrowY ); } -BOOL ScRangeName::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const +sal_Bool ScRangeName::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const { return *(ScRangeData*)pKey1 == *(ScRangeData*)pKey2; } -BOOL ScRangeName::Insert(ScDataObject* pScDataObject) +sal_Bool ScRangeName::Insert(ScDataObject* pScDataObject) { if (!((ScRangeData*)pScDataObject)->GetIndex()) // schon gesetzt? { @@ -767,12 +767,12 @@ BOOL ScRangeName::Insert(ScDataObject* pScDataObject) // Suche nach einem freien Index -USHORT ScRangeName::GetEntryIndex() +sal_uInt16 ScRangeName::GetEntryIndex() { - USHORT nLast = 0; - for ( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nLast = 0; + for ( sal_uInt16 i = 0; i < nCount; i++ ) { - USHORT nIdx = ((ScRangeData*)pItems[i])->GetIndex(); + sal_uInt16 nIdx = ((ScRangeData*)pItems[i])->GetIndex(); if( nIdx > nLast ) { nLast = nIdx; @@ -781,21 +781,21 @@ USHORT ScRangeName::GetEntryIndex() return nLast + 1; } -ScRangeData* ScRangeName::FindIndex( USHORT nIndex ) +ScRangeData* ScRangeName::FindIndex( sal_uInt16 nIndex ) { ScRangeData aDataObj( nIndex ); - USHORT n; + sal_uInt16 n; if( Search( &aDataObj, n ) ) return (*this)[ n ]; else return NULL; } -//UNUSED2009-05 ScRangeData* ScRangeName::GetRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const +//UNUSED2009-05 ScRangeData* ScRangeName::GetRangeAtCursor( const ScAddress& rPos, sal_Bool bStartOnly ) const //UNUSED2009-05 { //UNUSED2009-05 if ( pItems ) //UNUSED2009-05 { -//UNUSED2009-05 for ( USHORT i = 0; i < nCount; i++ ) +//UNUSED2009-05 for ( sal_uInt16 i = 0; i < nCount; i++ ) //UNUSED2009-05 if ( ((ScRangeData*)pItems[i])->IsRangeAtCursor( rPos, bStartOnly ) ) //UNUSED2009-05 return (ScRangeData*)pItems[i]; //UNUSED2009-05 } @@ -806,16 +806,16 @@ ScRangeData* ScRangeName::GetRangeAtBlock( const ScRange& rBlock ) const { if ( pItems ) { - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) if ( ((ScRangeData*)pItems[i])->IsRangeAtBlock( rBlock ) ) return (ScRangeData*)pItems[i]; } return NULL; } -void ScRangeName::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable) +void ScRangeName::UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable) { - for (USHORT i=0; iUpdateTabRef(nOldTable, nFlag, nNewTable); } diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx index 5584fb1c37e2..ac1934302b6e 100644 --- a/sc/source/core/tool/rangeseq.cxx +++ b/sc/source/core/tool/rangeseq.cxx @@ -56,7 +56,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(); @@ -64,12 +64,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 > aRowSeq( nRowCount ); - uno::Sequence* pRowAry = aRowSeq.getArray(); + uno::Sequence< uno::Sequence > aRowSeq( nRowCount ); + uno::Sequence* pRowAry = aRowSeq.getArray(); for (long nRow = 0; nRow < nRowCount; nRow++) { - uno::Sequence aColSeq( nColCount ); - INT32* pColAry = aColSeq.getArray(); + uno::Sequence 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 ) ) ); @@ -78,25 +78,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 sal_False; SCSIZE nColCount; SCSIZE nRowCount; pMatrix->GetDimensions( nColCount, nRowCount ); - uno::Sequence< uno::Sequence > aRowSeq( static_cast(nRowCount) ); - uno::Sequence* pRowAry = aRowSeq.getArray(); + uno::Sequence< uno::Sequence > aRowSeq( static_cast(nRowCount) ); + uno::Sequence* pRowAry = aRowSeq.getArray(); for (SCSIZE nRow = 0; nRow < nRowCount; nRow++) { - uno::Sequence aColSeq( static_cast(nColCount) ); - INT32* pColAry = aColSeq.getArray(); + uno::Sequence aColSeq( static_cast(nColCount) ); + sal_Int32* pColAry = aColSeq.getArray(); for (SCSIZE nCol = 0; nCol < nColCount; nCol++) if ( pMatrix->IsString( nCol, nRow ) ) pColAry[nCol] = 0; @@ -107,12 +107,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(); @@ -134,14 +134,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 sal_False; SCSIZE nColCount; SCSIZE nRowCount; @@ -163,12 +163,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(); @@ -193,15 +193,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 sal_False; SCSIZE nColCount; SCSIZE nRowCount; @@ -234,7 +234,7 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix } rAny <<= aRowSeq; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -253,8 +253,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(); @@ -263,7 +263,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 = sal_False; uno::Sequence< uno::Sequence > aRowSeq( nRowCount ); uno::Sequence* pRowAry = aRowSeq.getArray(); @@ -283,7 +283,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 ); @@ -301,10 +301,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 sal_False; SCSIZE nColCount; SCSIZE nRowCount; @@ -339,7 +339,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix, } rAny <<= aRowSeq; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -458,7 +458,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 aSeq; @@ -467,9 +467,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 sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 9f6526a54cf6..c6fc8c79ccf6 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -52,7 +52,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, @@ -63,9 +63,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 = sal_False; + sal_uInt16 nPointPos = rAreaStr.Search('.'); + sal_uInt16 nColonPos = rAreaStr.Search(':'); String aStrArea( rAreaStr ); ScRefAddress startPos; ScRefAddress endPos; @@ -96,7 +96,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 @@ -108,16 +108,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 sal_False; // BROKEN BROKEN BROKEN // but it is only used in the consolidate dialog. Ignore for now. @@ -125,7 +125,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. * @@ -134,7 +134,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, * wieder geloescht werden muss! */ - BOOL bStrOk = FALSE; + sal_Bool bStrOk = sal_False; String aTempAreaStr(rAreaStr); String aStartPosStr; String aEndPosStr; @@ -145,7 +145,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('.') ) @@ -160,23 +160,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( sal_False ); + aStartPos.SetRelRow( sal_False ); + aStartPos.SetRelTab( sal_False ); + aEndPos.SetRelCol( sal_False ); + aEndPos.SetRelRow( sal_False ); + aEndPos.SetRelTab( sal_False ); - bStrOk = TRUE; + bStrOk = sal_True; if ( pppAreas && pAreaCount ) // Array zurueckgegeben? { SCTAB nStartTab = aStartPos.Tab(); SCTAB nEndTab = aEndPos.Tab(); - USHORT nTabCount = static_cast(nEndTab-nStartTab+1); + sal_uInt16 nTabCount = static_cast(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() ); @@ -199,7 +199,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, @@ -207,7 +207,7 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr, ScRefAddress* pEndPos, ScAddress::Details const & rDetails ) const { - BOOL bIsAbsArea = FALSE; + sal_Bool bIsAbsArea = sal_False; ScRefAddress startPos; ScRefAddress endPos; @@ -215,12 +215,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( sal_False ); + startPos.SetRelRow( sal_False ); + startPos.SetRelTab( sal_False ); + endPos .SetRelCol( sal_False ); + endPos .SetRelRow( sal_False ); + endPos .SetRelTab( sal_False ); if ( pCompleteStr ) { @@ -241,20 +241,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 = sal_False; ScRefAddress thePos; bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); - thePos.SetRelCol( FALSE ); - thePos.SetRelRow( FALSE ); - thePos.SetRelTab( FALSE ); + thePos.SetRelCol( sal_False ); + thePos.SetRelRow( sal_False ); + thePos.SetRelTab( sal_False ); if ( bIsAbsPos ) { @@ -269,7 +269,7 @@ BOOL ScRangeUtil::IsAbsPos( const String& rPosStr, //------------------------------------------------------------------------ -BOOL ScRangeUtil::MakeRangeFromName ( +sal_Bool ScRangeUtil::MakeRangeFromName ( const String& rName, ScDocument* pDoc, SCTAB nCurTab, @@ -277,7 +277,7 @@ BOOL ScRangeUtil::MakeRangeFromName ( RutlNameScope eScope, ScAddress::Details const & rDetails ) const { - BOOL bResult=FALSE; + sal_Bool bResult=sal_False; ScRangeUtil aRangeUtil; SCTAB nTab = 0; SCCOL nColStart = 0; @@ -288,7 +288,7 @@ BOOL ScRangeUtil::MakeRangeFromName ( if( eScope==RUTL_NAMES ) { ScRangeName& rRangeNames = *(pDoc->GetRangeName()); - USHORT nAt = 0; + sal_uInt16 nAt = 0; if ( rRangeNames.SearchName( rName, nAt ) ) { @@ -307,7 +307,7 @@ BOOL ScRangeUtil::MakeRangeFromName ( nRowStart = aStartPos.Row(); nColEnd = aEndPos.Col(); nRowEnd = aEndPos.Row(); - bResult = TRUE; + bResult = sal_True; } else { @@ -319,7 +319,7 @@ BOOL ScRangeUtil::MakeRangeFromName ( nTab = aStartPos.Tab(); nColStart = nColEnd = aStartPos.Col(); nRowStart = nRowEnd = aStartPos.Row(); - bResult = TRUE; + bResult = sal_True; } } } @@ -327,7 +327,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 ) ) { @@ -335,7 +335,7 @@ BOOL ScRangeUtil::MakeRangeFromName ( pData->GetArea( nTab, nColStart, nRowStart, nColEnd, nRowEnd ); - bResult = TRUE; + bResult = sal_True; } } else @@ -910,7 +910,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. continue; @@ -938,7 +938,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) continue; @@ -990,7 +990,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) @@ -1007,10 +1007,10 @@ ScAreaNameIterator::ScAreaNameIterator( ScDocument* pDoc ) : pRangeName = pDoc->GetRangeName(); pDBCollection = pDoc->GetDBCollection(); nPos = 0; - bFirstPass = TRUE; + bFirstPass = sal_True; } -BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange ) +sal_Bool ScAreaNameIterator::Next( String& rName, ScRange& rRange ) { for (;;) { @@ -1022,12 +1022,12 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange ) if ( pData && pData->IsValidReference(rRange) ) { rName = pData->GetName(); - return TRUE; // gefunden + return sal_True; // gefunden } } else { - bFirstPass = FALSE; + bFirstPass = sal_False; nPos = 0; } } @@ -1040,11 +1040,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 sal_False; // gibt nichts mehr } } } diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx index 6da946463697..0adc477b7992 100644 --- a/sc/source/core/tool/rechead.cxx +++ b/sc/source/core/tool/rechead.cxx @@ -46,12 +46,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) { @@ -67,7 +67,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 ); } @@ -92,7 +92,7 @@ ScMultipleReadHeader::~ScMultipleReadHeader() void ScMultipleReadHeader::EndEntry() { - ULONG nPos = rStream.Tell(); + sal_uLong nPos = rStream.Tell(); DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" ); if ( nPos != nEntryEnd ) { @@ -106,7 +106,7 @@ void ScMultipleReadHeader::EndEntry() void ScMultipleReadHeader::StartEntry() { - ULONG nPos = rStream.Tell(); + sal_uLong nPos = rStream.Tell(); sal_uInt32 nEntrySize; (*pMemStream) >> nEntrySize; @@ -114,9 +114,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; @@ -139,16 +139,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(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); @@ -157,13 +157,13 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader() void ScMultipleWriteHeader::EndEntry() { - ULONG nPos = rStream.Tell(); + sal_uLong nPos = rStream.Tell(); aMemStream << static_cast(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 47774d348044..389b00859a26 100644 --- a/sc/source/core/tool/refdata.cxx +++ b/sc/source/core/tool/refdata.cxx @@ -66,19 +66,19 @@ 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; } } @@ -87,62 +87,62 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos ) //UNUSED2008-05 switch ( rBools.bRelCol ) //UNUSED2008-05 { //UNUSED2008-05 case SR_DELETED : -//UNUSED2008-05 Flags.bColRel = TRUE; // der war verlorengegangen -//UNUSED2008-05 Flags.bColDeleted = TRUE; +//UNUSED2008-05 Flags.bColRel = sal_True; // der war verlorengegangen +//UNUSED2008-05 Flags.bColDeleted = sal_True; //UNUSED2008-05 break; //UNUSED2008-05 case SR_ABSOLUTE : -//UNUSED2008-05 Flags.bColRel = FALSE; -//UNUSED2008-05 Flags.bColDeleted = FALSE; +//UNUSED2008-05 Flags.bColRel = sal_False; +//UNUSED2008-05 Flags.bColDeleted = sal_False; //UNUSED2008-05 break; //UNUSED2008-05 case SR_RELABS : //UNUSED2008-05 case SR_RELATIVE : //UNUSED2008-05 default: -//UNUSED2008-05 Flags.bColRel = TRUE; -//UNUSED2008-05 Flags.bColDeleted = FALSE; +//UNUSED2008-05 Flags.bColRel = sal_True; +//UNUSED2008-05 Flags.bColDeleted = sal_False; //UNUSED2008-05 } //UNUSED2008-05 switch ( rBools.bRelRow ) //UNUSED2008-05 { //UNUSED2008-05 case SR_DELETED : -//UNUSED2008-05 Flags.bRowRel = TRUE; // der war verlorengegangen -//UNUSED2008-05 Flags.bRowDeleted = TRUE; +//UNUSED2008-05 Flags.bRowRel = sal_True; // der war verlorengegangen +//UNUSED2008-05 Flags.bRowDeleted = sal_True; //UNUSED2008-05 break; //UNUSED2008-05 case SR_ABSOLUTE : -//UNUSED2008-05 Flags.bRowRel = FALSE; -//UNUSED2008-05 Flags.bRowDeleted = FALSE; +//UNUSED2008-05 Flags.bRowRel = sal_False; +//UNUSED2008-05 Flags.bRowDeleted = sal_False; //UNUSED2008-05 break; //UNUSED2008-05 case SR_RELABS : //UNUSED2008-05 case SR_RELATIVE : //UNUSED2008-05 default: -//UNUSED2008-05 Flags.bRowRel = TRUE; -//UNUSED2008-05 Flags.bRowDeleted = FALSE; +//UNUSED2008-05 Flags.bRowRel = sal_True; +//UNUSED2008-05 Flags.bRowDeleted = sal_False; //UNUSED2008-05 } //UNUSED2008-05 switch ( rBools.bRelTab ) //UNUSED2008-05 { //UNUSED2008-05 case SR_DELETED : -//UNUSED2008-05 Flags.bTabRel = TRUE; // der war verlorengegangen -//UNUSED2008-05 Flags.bTabDeleted = TRUE; +//UNUSED2008-05 Flags.bTabRel = sal_True; // der war verlorengegangen +//UNUSED2008-05 Flags.bTabDeleted = sal_True; //UNUSED2008-05 break; //UNUSED2008-05 case SR_ABSOLUTE : -//UNUSED2008-05 Flags.bTabRel = FALSE; -//UNUSED2008-05 Flags.bTabDeleted = FALSE; +//UNUSED2008-05 Flags.bTabRel = sal_False; +//UNUSED2008-05 Flags.bTabDeleted = sal_False; //UNUSED2008-05 break; //UNUSED2008-05 case SR_RELABS : //UNUSED2008-05 case SR_RELATIVE : //UNUSED2008-05 default: -//UNUSED2008-05 Flags.bTabRel = TRUE; -//UNUSED2008-05 Flags.bTabDeleted = FALSE; +//UNUSED2008-05 Flags.bTabRel = sal_True; +//UNUSED2008-05 Flags.bTabDeleted = sal_False; //UNUSED2008-05 } -//UNUSED2008-05 Flags.bFlag3D = (rBools.bOldFlag3D & SRF_3D ? TRUE : FALSE); -//UNUSED2008-05 Flags.bRelName = (rBools.bOldFlag3D & SRF_RELNAME ? TRUE : FALSE); +//UNUSED2008-05 Flags.bFlag3D = (rBools.bOldFlag3D & SRF_3D ? sal_True : sal_False); +//UNUSED2008-05 Flags.bRelName = (rBools.bOldFlag3D & SRF_RELNAME ? sal_True : sal_False); //UNUSED2008-05 if ( !Flags.bFlag3D ) -//UNUSED2008-05 Flags.bTabRel = TRUE; // ist bei einigen aelteren Dokumenten nicht gesetzt +//UNUSED2008-05 Flags.bTabRel = sal_True; // ist bei einigen aelteren Dokumenten nicht gesetzt //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 //UNUSED2008-05 /* //UNUSED2008-05 bis Release 3.1 sah Store so aus //UNUSED2008-05 -//UNUSED2008-05 BYTE n = ( ( r.bOldFlag3D & 0x03 ) << 6 ) // RelName, 3D +//UNUSED2008-05 sal_uInt8 n = ( ( r.bOldFlag3D & 0x03 ) << 6 ) // RelName, 3D //UNUSED2008-05 | ( ( r.bRelTab & 0x03 ) << 4 ) // Relative, RelAbs //UNUSED2008-05 | ( ( r.bRelRow & 0x03 ) << 2 ) //UNUSED2008-05 | ( r.bRelCol & 0x03 ); @@ -160,9 +160,9 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos ) //UNUSED2008-05 Aber immer noch nCol > MAXCOL und gut sollte sein.. //UNUSED2008-05 */ //UNUSED2008-05 -//UNUSED2008-05 BYTE ScSingleRefData::CreateStoreByteFromFlags() const +//UNUSED2008-05 sal_uInt8 ScSingleRefData::CreateStoreByteFromFlags() const //UNUSED2008-05 { -//UNUSED2008-05 return (BYTE)( +//UNUSED2008-05 return (sal_uInt8)( //UNUSED2008-05 ( (Flags.bRelName & 0x01) << 7 ) //UNUSED2008-05 | ( (Flags.bFlag3D & 0x01) << 6 ) //UNUSED2008-05 | ( (Flags.bTabDeleted & 0x01) << 5 ) @@ -175,7 +175,7 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos ) //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 -//UNUSED2008-05 void ScSingleRefData::CreateFlagsFromLoadByte( BYTE n ) +//UNUSED2008-05 void ScSingleRefData::CreateFlagsFromLoadByte( sal_uInt8 n ) //UNUSED2008-05 { //UNUSED2008-05 Flags.bColRel = (n & 0x01 ); //UNUSED2008-05 Flags.bColDeleted = ( (n >> 1) & 0x01 ); @@ -188,7 +188,7 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos ) //UNUSED2008-05 } -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) && @@ -206,8 +206,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) @@ -288,8 +288,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 : sal_False ); + rRef2.Flags.bRelName = ( nRelState2 ? sal_True : sal_False ); } diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx index cdb5962b2b9c..831fcf5c0623 100644 --- a/sc/source/core/tool/reffind.cxx +++ b/sc/source/core/tool/reffind.cxx @@ -48,20 +48,20 @@ const sal_Unicode __FAR_DATA ScRefFinder::pDelimiters[] = { // ======================================================================= -inline BOOL IsText( sal_Unicode c ) +inline sal_Bool IsText( sal_Unicode c ) { return !ScGlobal::UnicodeStrChr( ScRefFinder::pDelimiters, c ); } -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 ); } @@ -78,9 +78,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)) @@ -124,7 +124,7 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos ) while ( nEStart <= nEndPos && !IsText(pSource[nEStart]) ) ++nEStart; - BOOL bQuote = FALSE; + sal_Bool bQuote = sal_False; xub_StrLen nEEnd = nEStart; while ( nEEnd <= nEndPos && IsText(bQuote,pSource[nEEnd]) ) ++nEEnd; @@ -134,10 +134,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 5520aac6d6eb..220bdee8d260 100644 --- a/sc/source/core/tool/refreshtimer.cxx +++ b/sc/source/core/tool/refreshtimer.cxx @@ -39,7 +39,7 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const { if ( ppControl && *ppControl ) { - (*ppControl)->SetAllowRefresh( FALSE ); + (*ppControl)->SetAllowRefresh( sal_False ); // wait for any running refresh in another thread to finnish ::vos::OGuard aGuard( (*ppControl)->GetMutex() ); } @@ -54,9 +54,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 f4976a914c39..64580b094cf2 100644 --- a/sc/source/core/tool/reftokenhelper.cxx +++ b/sc/source/core/tool/reftokenhelper.cxx @@ -71,7 +71,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 ad11190be75d..5dd077ed042f 100644 --- a/sc/source/core/tool/refupdat.cxx +++ b/sc/source/core/tool/refupdat.cxx @@ -41,9 +41,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 = sal_False; if ( rRef >= nStart ) rRef = sal::static_int_cast( rRef + nDelta ); else if ( nDelta < 0 && rRef >= nStart + nDelta ) @@ -51,20 +51,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 = sal_False; if ( rRef >= nStart ) rRef = sal::static_int_cast( rRef + nDelta ); else if ( nDelta < 0 && rRef >= nStart + nDelta ) @@ -72,23 +72,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( rRef + nDelta ); - return TRUE; + return sal_True; } if ( nDelta > 0 ) // nach hinten schieben @@ -99,7 +99,7 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta ) rRef = sal::static_int_cast( rRef + nDelta ); // in the moved range else rRef -= nEnd - nStart + 1; // nachruecken - return TRUE; + return sal_True; } } else // nach vorne schieben @@ -110,27 +110,27 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta ) rRef = sal::static_int_cast( rRef + nDelta ); // in the moved range else rRef += nEnd - nStart + 1; // nachruecken - return TRUE; + return sal_True; } } - return FALSE; + return sal_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 = sal_False; rRef = sal::static_int_cast( 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; } @@ -146,14 +146,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 = sal_False; S n; if (bDo1 && bDo2) { @@ -162,14 +162,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 ) @@ -195,15 +195,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 sal_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 @@ -217,7 +217,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 @@ -229,19 +229,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 sal_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 = sal_False; if ( rRef >= nStart ) { if ( nDelta > 0 ) @@ -254,9 +254,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; } @@ -278,15 +278,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 ) @@ -305,7 +305,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 ) @@ -326,7 +326,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo { SCsTAB nMaxTab = pDoc->GetTableCount() - 1; nMaxTab = sal::static_int_cast(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(nMaxTab) ); bCut2 = lcl_MoveEnd( theTab2, nTab1, nDz, static_cast(nMaxTab) ); if ( theTab2 < theTab1 ) @@ -406,18 +406,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) { @@ -512,11 +512,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() : sal_False ); SCCOL oldCol1 = rRef.Ref1.nCol; SCROW oldRow1 = rRef.Ref1.nRow; @@ -525,12 +525,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 @@ -540,11 +540,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, @@ -555,17 +555,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( sal_False ); if ( bRef2ColDel && nCol1 <= rRef.Ref2.nCol && rRef.Ref2.nCol <= nCol1 + nDx ) - rRef.Ref2.SetColDeleted( FALSE ); + rRef.Ref2.SetColDeleted( sal_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 ) @@ -582,11 +582,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, @@ -597,17 +597,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( sal_False ); if ( bRef2RowDel && nRow1 <= rRef.Ref2.nRow && rRef.Ref2.nRow <= nRow1 + nDy ) - rRef.Ref2.SetRowDeleted( FALSE ); + rRef.Ref2.SetRowDeleted( sal_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 ) @@ -624,12 +624,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, @@ -640,17 +640,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( sal_False ); if ( bRef2TabDel && nTab1 <= rRef.Ref2.nTab && rRef.Ref2.nTab <= nTab1 + nDz ) - rRef.Ref2.SetTabDeleted( FALSE ); + rRef.Ref2.SetTabDeleted( sal_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 ) @@ -684,12 +684,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, sal_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 ); @@ -698,7 +698,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, sal_False, sal_False ); // nur relative // sollte nicht mehr verwendet werden muessen else if (eWhat != ScRefUpdate::ABSOLUTE) rRef.CalcRelFromAbs( rPos ); @@ -709,7 +709,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; @@ -720,10 +720,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 = sal_False; if( bAbsolute || rRef.Ref1.IsColRel() ) { if( bWrap ) @@ -742,13 +742,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 = sal_False; if( bAbsolute || rRef.Ref1.IsRowRel() ) { if( bWrap ) @@ -767,13 +767,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 = sal_False; SCsTAB nMaxTab = (SCsTAB) pDoc->GetTableCount() - 1; if( bAbsolute || rRef.Ref1.IsTabRel() ) { @@ -795,8 +795,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 ); } } @@ -912,11 +912,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 2ecc20f53405..fea4ea06ba50 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -100,15 +100,15 @@ ScMatrix* ScMatrix::CloneAndExtend( SCSIZE nNewCols, SCSIZE nNewRows ) const return pScMat; } -void ScMatrix::SetErrorAtInterpreter( USHORT nError ) const +void ScMatrix::SetErrorAtInterpreter( sal_uInt16 nError ) const { if ( pErrorInterpreter ) pErrorInterpreter->SetError( nError); } // -// File format: USHORT columns, USHORT rows, (columns*rows) entries: -// BYTE type ( CELLTYPE_NONE, CELLTYPE_VALUE, CELLTYPE_STRING ); nothing, double or String +// File format: sal_uInt16 columns, sal_uInt16 rows, (columns*rows) entries: +// sal_uInt8 type ( CELLTYPE_NONE, CELLTYPE_VALUE, CELLTYPE_STRING ); nothing, double or String // ScMatrix::ScMatrix(SvStream& /* rStream */) @@ -117,8 +117,8 @@ ScMatrix::ScMatrix(SvStream& /* rStream */) { #if SC_ROWLIMIT_STREAM_ACCESS #error address types changed! - USHORT nC; - USHORT nR; + sal_uInt16 nC; + sal_uInt16 nR; rStream >> nC; rStream >> nR; @@ -133,7 +133,7 @@ ScMatrix::ScMatrix(SvStream& /* rStream */) SCSIZE nReadCount = (SCSIZE) nC * nR; for (SCSIZE i=0; i> nType; if ( nType == CELLTYPE_VALUE ) { @@ -173,34 +173,34 @@ void ScMatrix::Store(SvStream& /* rStream */) const #if SC_ROWLIMIT_STREAM_ACCESS #error address types changed! SCSIZE nCount = nColCount * nRowCount; - // Don't store matrix with more than USHORT max elements, old versions - // might get confused in loops for(USHORT i=0; i ((USHORT)(~0)) ) + // Don't store matrix with more than sal_uInt16 max elements, old versions + // might get confused in loops for(sal_uInt16 i=0; i ((sal_uInt16)(~0)) ) { DBG_ASSERT( pMat, "ScMatrix::Store: pMat == NULL" ); // We can't store a 0 dimension because old versions rely on some // matrix being present, e.g. DDE link results, and old versions didn't // create a matrix if dimension was 0. Store an error result. - rStream << (USHORT) 1; - rStream << (USHORT) 1; - rStream << (BYTE) CELLTYPE_VALUE; + rStream << (sal_uInt16) 1; + rStream << (sal_uInt16) 1; + rStream << (sal_uInt8) CELLTYPE_VALUE; double fVal; ::rtl::math::setNan( &fVal ); rStream << fVal; return; } - rStream << (USHORT) nColCount; + rStream << (sal_uInt16) nColCount; #if SC_ROWLIMIT_MORE_THAN_32K #error row32k #endif - rStream << (USHORT) nRowCount; + rStream << (sal_uInt16) nRowCount; String aMatStr; rtl_TextEncoding eCharSet = rStream.GetStreamCharSet(); for (SCSIZE i=0; i 0.0) fVal1 = DBL_MAX; else @@ -53,28 +53,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 = sal_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 = sal_False; fVal1 = DBL_MAX; } return bOk; diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 81862c49fd21..a270969e100c 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -119,19 +119,19 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ImpTokenIterator, 32, 16 ) // 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)) @@ -230,7 +230,7 @@ void ScRawToken::SetDouble(double rVal) nRefCnt = 0; } -void ScRawToken::SetName( USHORT n ) +void ScRawToken::SetName( sal_uInt16 n ) { eOp = ocName; eType = svIndex; @@ -323,13 +323,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( reinterpret_cast(&aToken.sbyte) - reinterpret_cast(&aToken) ); + return static_cast( reinterpret_cast(&aToken.sbyte) - reinterpret_cast(&aToken) ); } ScRawToken* ScRawToken::Clone() const @@ -344,8 +344,8 @@ 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; if (eOp == ocExternalRef) { @@ -367,24 +367,24 @@ ScRawToken* ScRawToken::Clone() const case svSep: break; case svByte: n += sizeof(ScRawToken::sbyte); break; case svDouble: n += sizeof(double); break; - case svString: n = sal::static_int_cast( n + GetStrLenBytes( cStr ) + GetStrLenBytes( 1 ) ); break; + case svString: n = sal::static_int_cast( 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( n + GetStrLenBytes( cStr+1 ) + GetStrLenBytes( 2 ) ); break; + case svExternal: n = sal::static_int_cast( n + GetStrLenBytes( cStr+1 ) + GetStrLenBytes( 2 ) ); break; default: { 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 = sal_False; return p; } @@ -473,7 +473,7 @@ void ScRawToken::Delete() delete (ScDoubleRawToken*) this; // FixedMemPool ScDoubleRawToken break; default: - delete [] (BYTE*) this; + delete [] (sal_uInt8*) this; } } } @@ -501,14 +501,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 sal_False; const ScToken& rToken = static_cast(_rToken); ScComplexRefData aTemp1; @@ -549,24 +549,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 sal_False; } // static @@ -791,7 +791,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(r).GetSingleRef(); } @@ -807,7 +807,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(r).GetDoubleRef(); } @@ -825,7 +825,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(r).GetRefList(); } @@ -833,7 +833,7 @@ BOOL ScRefListToken::operator==( const FormulaToken& r ) const const ScMatrix* ScMatrixToken::GetMatrix() const { return pMatrix; } ScMatrix* ScMatrixToken::GetMatrix() { return pMatrix; } -BOOL ScMatrixToken::operator==( const FormulaToken& r ) const +sal_Bool ScMatrixToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && pMatrix == static_cast(r).GetMatrix(); } @@ -860,7 +860,7 @@ ScExternalSingleRefToken::~ScExternalSingleRefToken() { } -USHORT ScExternalSingleRefToken::GetIndex() const +sal_uInt16 ScExternalSingleRefToken::GetIndex() const { return mnFileId; } @@ -890,7 +890,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; @@ -926,7 +926,7 @@ ScExternalDoubleRefToken::~ScExternalDoubleRefToken() { } -USHORT ScExternalDoubleRefToken::GetIndex() const +sal_uInt16 ScExternalDoubleRefToken::GetIndex() const { return mnFileId; } @@ -976,7 +976,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; @@ -1008,7 +1008,7 @@ ScExternalNameToken::ScExternalNameToken( const ScExternalNameToken& r ) : ScExternalNameToken::~ScExternalNameToken() {} -USHORT ScExternalNameToken::GetIndex() const +sal_uInt16 ScExternalNameToken::GetIndex() const { return mnFileId; } @@ -1018,7 +1018,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; @@ -1044,7 +1044,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(r).GetJumpMatrix(); } @@ -1059,7 +1059,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() && @@ -1076,7 +1076,7 @@ ScMatrix* ScMatrixCellResultToken::GetMatrix() { return const_cast(xMatrix.operator->()); } -BOOL ScMatrixCellResultToken::operator==( const FormulaToken& r ) const +sal_Bool ScMatrixCellResultToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && xUpperLeft == static_cast(r).xUpperLeft && @@ -1084,7 +1084,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(&r); return p && ScMatrixCellResultToken::operator==( r ) && @@ -1136,7 +1136,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() && @@ -1270,9 +1270,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 = sal_False; if ( pCode && nLen == 1 ) { const FormulaToken* pToken = pCode[0]; @@ -1298,14 +1298,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, sal_False ); } -BOOL ScTokenArray::IsValidReference( ScRange& rRange ) const +sal_Bool ScTokenArray::IsValidReference( ScRange& rRange ) const { - return ImplGetReference( rRange, TRUE ); + return ImplGetReference( rRange, sal_True ); } //////////////////////////////////////////////////////////////////////////// @@ -1345,7 +1345,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(); @@ -1355,14 +1355,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 ) { @@ -1569,7 +1569,7 @@ FormulaToken* ScTokenArray::MergeArray( ) pCode[i] = NULL; t->DecRef(); } - nLen = USHORT( nStart ); + nLen = sal_uInt16( nStart ); return AddMatrix( pArray ); } @@ -1578,7 +1578,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) && @@ -1647,7 +1647,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; @@ -1658,40 +1658,40 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, if ( rPos.Row() < MAXROW ) nRow = (nExtend = rPos.Row()) + 1; else - return FALSE; + return sal_False; break; case DIR_RIGHT : if ( rPos.Col() < MAXCOL ) nCol = static_cast(nExtend = rPos.Col()) + 1; else - return FALSE; + return sal_False; break; case DIR_TOP : if ( rPos.Row() > 0 ) nRow = (nExtend = rPos.Row()) - 1; else - return FALSE; + return sal_False; break; case DIR_LEFT : if ( rPos.Col() > 0 ) nCol = static_cast(nExtend = rPos.Col()) - 1; else - return FALSE; + return sal_False; break; default: DBG_ERRORFILE( "unknown Direction" ); - return FALSE; + return sal_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 = sal_False; + sal_uInt16 nParam = nRPN - nParamCount - 1; for ( ; nParam < nRPN-1; nParam++ ) { FormulaToken* p = pRPN[nParam]; @@ -1708,7 +1708,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, && rRef.nRow > nExtend ) { nExtend = rRef.nRow; - bRet = TRUE; + bRet = sal_True; } break; case DIR_RIGHT : @@ -1717,7 +1717,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, > nExtend ) { nExtend = rRef.nCol; - bRet = TRUE; + bRet = sal_True; } break; case DIR_TOP : @@ -1725,7 +1725,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, && rRef.nRow < nExtend ) { nExtend = rRef.nRow; - bRet = TRUE; + bRet = sal_True; } break; case DIR_LEFT : @@ -1734,7 +1734,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, < nExtend ) { nExtend = rRef.nCol; - bRet = TRUE; + bRet = sal_True; } break; } @@ -1751,7 +1751,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, && rRef.Ref2.nRow > nExtend ) { nExtend = rRef.Ref2.nRow; - bRet = TRUE; + bRet = sal_True; } break; case DIR_RIGHT : @@ -1760,7 +1760,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, > nExtend ) { nExtend = rRef.Ref2.nCol; - bRet = TRUE; + bRet = sal_True; } break; case DIR_TOP : @@ -1768,7 +1768,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, && rRef.Ref1.nRow < nExtend ) { nExtend = rRef.Ref1.nRow; - bRet = TRUE; + bRet = sal_True; } break; case DIR_LEFT : @@ -1777,7 +1777,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, < nExtend ) { nExtend = rRef.Ref1.nCol; - bRet = TRUE; + bRet = sal_True; } break; } @@ -1793,14 +1793,14 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend, } } } - return FALSE; + return sal_False; } void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos, const ScAddress& rNewPos ) { - for ( USHORT j=0; jGetType() ) { diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx index 21f80cb1c628..9b4a7ef772d0 100644 --- a/sc/source/core/tool/unitconv.cxx +++ b/sc/source/core/tool/unitconv.cxx @@ -102,8 +102,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, sal_False ) { // read from configuration - "convert.ini" is no longer used //! config item as member to allow change of values @@ -161,18 +161,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 sal_False; } diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index 08609eeff940..a107599a9960 100644 --- a/sc/source/core/tool/userlist.cxx +++ b/sc/source/core/tool/userlist.cxx @@ -49,12 +49,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; itoUpper(pUpperSub[i]); @@ -92,19 +92,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; icompareString( rSubStr1, rSubStr2 ); } -ScUserList::ScUserList(USHORT nLim, USHORT nDel) : +ScUserList::ScUserList(sal_uInt16 nLim, sal_uInt16 nDel) : ScCollection ( nLim, nDel ) { using namespace ::com::sun::star; @@ -253,24 +253,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; iaStr == rStr ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 7dc36bc1b548..29854e1fd549 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -52,7 +52,7 @@ using namespace com::sun::star::uno; TYPEINIT1(ScTpViewItem, SfxPoolItem); -#define SC_VERSION ((USHORT)302) +#define SC_VERSION ((sal_uInt16)302) //======================================================================== @@ -151,7 +151,7 @@ void ScViewOptions::SetDefaults() aOptArr[ VOPT_FORMULAS ] = aOptArr[ VOPT_SYNTAX ] = aOptArr[ VOPT_HELPLINES ] = - aOptArr[ VOPT_BIGHANDLES ] = FALSE; + aOptArr[ VOPT_BIGHANDLES ] = sal_False; aOptArr[ VOPT_NOTES ] = aOptArr[ VOPT_NULLVALS ] = aOptArr[ VOPT_VSCROLL ] = @@ -163,7 +163,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] = @@ -189,7 +189,7 @@ Color ScViewOptions::GetGridColor( String* pStrName ) const const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy ) { - USHORT i; + sal_uInt16 i; for ( i=0; i> nSysLang >> nLang; eLnge = (LanguageType) nLang; @@ -74,10 +74,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); @@ -96,10 +96,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 69421879983e..2b393dd58703 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -47,7 +47,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; @@ -62,7 +62,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(), @@ -75,11 +75,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 = sal_False; } else { @@ -95,7 +95,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc aStrDelimDecoded = String( aStrDelimEncoded, eCharSet ); } else - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = sal_False; } const sal_Char* p2DoubleQuotes_LF = "\"\"\n"; @@ -116,7 +116,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 ); @@ -184,7 +184,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 { @@ -212,7 +212,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 2088cc84a791..8edc85ad6f49 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 = sal_False; + sal_Bool bOverflowWarn = sal_False; String& rData = aDifParser.aData; - BOOL bData = FALSE; + sal_Bool bData = sal_False; SCCOL nNumCols = 0; SCROW nNumRows = 0; @@ -96,7 +96,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 ); } @@ -104,7 +104,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, case T_VECTORS: { if( aDifParser.nVector != 0 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = sal_True; if( aDifParser.nVal > MAXCOL + 1 ) nNumCols = SCCOL_MAX; else @@ -114,7 +114,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, case T_TUPLES: { if( aDifParser.nVector != 0 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = sal_True; if( aDifParser.nVal > MAXROW + 1 ) nNumRows = SCROW_MAX; else @@ -124,7 +124,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, case T_DATA: { if( aDifParser.nVector != 0 || aDifParser.nVal != 0 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = sal_True; } break; case T_LABEL: @@ -204,10 +204,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; @@ -220,11 +220,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; @@ -254,7 +254,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; @@ -346,8 +346,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 ]; @@ -356,14 +356,14 @@ TOPIC DifParser::GetNextTopic( void ) if( aLine == pRef ) { eRet = pTopics[ nCnt ]; - bSearch = FALSE; + bSearch = sal_False; } else { nCnt++; pRef = ppKeys[ nCnt ]; if( !*pRef ) - bSearch = FALSE; + bSearch = sal_False; } } @@ -627,7 +627,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') @@ -636,7 +636,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; @@ -646,7 +646,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; @@ -656,18 +656,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 = sal_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 = sal_False; + sal_Bool bExpOverflow = sal_False; + static const sal_uInt16 nExpLimit = 4096; // ACHTUNG: muss genauer ermittelt werden! sal_Unicode cAkt; - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; enum STATE { S_FIRST, S_PRE, S_POST, S_EXP_FIRST, S_EXP, S_END, S_FINDEND }; @@ -728,7 +728,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; } @@ -749,7 +749,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; } @@ -761,7 +761,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; } @@ -785,11 +785,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; } } @@ -802,7 +802,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; @@ -869,7 +869,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!" ); @@ -895,7 +895,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; @@ -939,7 +939,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 ]; @@ -958,7 +958,7 @@ DifAttrCache::~DifAttrCache() } -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 01587c036dea..575093f48d2a 100644 --- a/sc/source/filter/excel/colrowst.cxx +++ b/sc/source/filter/excel/colrowst.cxx @@ -282,7 +282,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, sal_False ); // #i38093# rows hidden by filter need extra flag SCROW nFirstFilterScRow = SCROW_MAX; @@ -304,7 +304,7 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab ) if( ::get_flag( maRowFlags[ nScRow ], EXC_COLROW_HIDDEN ) ) { // hide the row - rDoc.ShowRow( nScRow, nScTab, FALSE ); + rDoc.ShowRow( nScRow, nScTab, sal_False ); // #i38093# rows hidden by filter need extra flag if( (nFirstFilterScRow <= nScRow) && (nScRow <= nLastFilterScRow) ) rDoc.SetRowFiltered(nScRow, nScRow, nScTab, true); @@ -313,6 +313,6 @@ 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, sal_False ); } diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index f20b63efe7ba..655ece740c6f 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -197,8 +197,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; diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 90ac8011a4bf..b37152059d3e 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -144,7 +144,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument SotStorageStreamRef xStrgStrm; if( SotStorage::IsStorageFile( pMedStrm ) ) { - xRootStrg = new SotStorage( pMedStrm, FALSE ); + xRootStrg = new SotStorage( pMedStrm, sal_False ); if( xRootStrg->GetError() ) xRootStrg = 0; } @@ -217,10 +217,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, sal_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 0652363e8822..00862032603c 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -45,8 +45,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; @@ -54,16 +54,16 @@ const UINT16 ExcelToSc::nLastInd = 399; void ImportExcel::Formula25() { XclAddress aXclPos; - UINT16 nXF = 0, nFormLen; + sal_uInt16 nXF = 0, nFormLen; double fCurVal; - BYTE nAttr0, nFlag0; - BOOL bShrFmla; + sal_uInt8 nAttr0, nFlag0; + sal_Bool bShrFmla; aIn >> aXclPos; if( GetBiff() == EXC_BIFF2 ) {// BIFF2 - BYTE nDummy; + sal_uInt8 nDummy; aIn.Ignore( 3 ); @@ -71,7 +71,7 @@ void ImportExcel::Formula25() aIn.Ignore( 1 ); aIn >> nDummy; nFormLen = nDummy; - bShrFmla = FALSE; + bShrFmla = sal_False; nAttr0 = 0x01; // Always calculate } else @@ -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, sal_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 { @@ -201,23 +201,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 = sal_False; + sal_Bool bArrayFormula = sal_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 = sal_False; if( eStatus != ConvOK ) { @@ -255,7 +255,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; @@ -374,8 +374,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; @@ -545,7 +545,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s aSRD.nCol = static_cast(nByte); aSRD.nRow = nUINT16 & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName ); @@ -556,8 +556,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 ); @@ -569,16 +569,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 ); @@ -596,10 +596,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 ); @@ -627,7 +627,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 ); @@ -639,12 +639,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 ); @@ -692,12 +692,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 ); @@ -722,9 +722,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 ); @@ -748,8 +748,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s if( nExtSheet <= 0 ) { // in aktuellem Workbook aSRD.nTab = static_cast(nTabFirst); - aSRD.SetFlag3D( TRUE ); - aSRD.SetTabRel( FALSE ); + aSRD.SetFlag3D( sal_True ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel( nRow, nCol, aSRD, bRangeName ); @@ -759,11 +759,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(nTabFirst)) ) - aSRD.SetTabDeleted( TRUE ); + aSRD.SetTabDeleted( sal_True ); if( nTabLast != nTabFirst ) { @@ -785,9 +785,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 ); @@ -818,10 +818,10 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s rR1.nTab = static_cast(nTabFirst); rR2.nTab = static_cast(nTabLast); - rR1.SetFlag3D( TRUE ); - rR1.SetTabRel( FALSE ); + rR1.SetFlag3D( sal_True ); + rR1.SetTabRel( sal_False ); rR2.SetFlag3D( nTabFirst != nTabLast ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -837,21 +837,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(nTabFirst)) ) - rR1.SetTabDeleted( TRUE ); + rR1.SetTabDeleted( sal_True ); if ( !ValidTab(static_cast(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(); } @@ -901,21 +901,21 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen, 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 = sal_False; + sal_Bool bArrayFormula = sal_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 = sal_False; if( eStatus != ConvOK ) { @@ -942,7 +942,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; @@ -974,8 +974,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; @@ -1061,7 +1061,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal aSRD.nCol = static_cast(nByte); aSRD.nRow = nUINT16 & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName ); @@ -1072,16 +1072,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 ); @@ -1125,7 +1125,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 ); @@ -1137,12 +1137,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 ); @@ -1184,9 +1184,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 ); @@ -1210,10 +1210,10 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal if( nExtSheet <= 0 ) {// in aktuellem Workbook - BOOL b3D = ( static_cast(nTabFirst) != aEingPos.Tab() ) || bRangeName; + sal_Bool b3D = ( static_cast(nTabFirst) != aEingPos.Tab() ) || bRangeName; aSRD.nTab = static_cast(nTabFirst); aSRD.SetFlag3D( b3D ); - aSRD.SetTabRel( FALSE ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel( nRow, nCol, aSRD, bRangeName ); @@ -1225,7 +1225,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal aCRD.Ref2.nTab = static_cast(nTabLast); b3D = ( static_cast(nTabLast) != aEingPos.Tab() ); aCRD.Ref2.SetFlag3D( b3D ); - aCRD.Ref2.SetTabRel( FALSE ); + aCRD.Ref2.SetTabRel( sal_False ); rRangeList.Append( aCRD ); } else @@ -1238,9 +1238,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 ); @@ -1272,9 +1272,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal rR1.nTab = static_cast(nTabFirst); rR2.nTab = static_cast(nTabLast); rR1.SetFlag3D( ( static_cast(nTabFirst) != aEingPos.Tab() ) || bRangeName ); - rR1.SetTabRel( FALSE ); + rR1.SetTabRel( sal_False ); rR2.SetFlag3D( ( static_cast(nTabLast) != aEingPos.Tab() ) || bRangeName ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -1298,7 +1298,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(); @@ -1329,11 +1329,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 sal_False; sal_uInt8 nOp; sal_uInt16 nRow1, nRow2; @@ -1518,8 +1518,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; @@ -1537,7 +1537,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 ) { @@ -1574,10 +1574,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 ) @@ -1586,13 +1586,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; } } @@ -1601,7 +1601,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; // #84453# skip missing parameters at end of parameter list while( nSkipEnd < nLastRemovable && @@ -1628,36 +1628,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(static_cast(nCol)); + rSRD.SetColRel( sal_True ); + rSRD.nRelCol = static_cast(static_cast(nCol)); } else {// abs Col - rSRD.SetColRel( FALSE ); + rSRD.SetColRel( sal_False ); rSRD.nCol = static_cast(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(static_cast(nRow | 0xC000)); + rSRD.nRelRow = static_cast(static_cast(nRow | 0xC000)); else // -> Row positiv rSRD.nRelRow = static_cast(nRow & nRowMask); } else {// abs Row - rSRD.SetRowRel( FALSE ); + rSRD.SetRowRel( sal_False ); rSRD.nRow = static_cast(nRow & nRowMask); } @@ -1691,7 +1691,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(); @@ -1733,13 +1733,13 @@ const ScTokenArray* ExcelToSc::GetBoolErr( XclBoolError eType ) // if a shared formula was found, stream seeks to first byte after , // 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 = sal_False; else { aIn.PushPosition(); @@ -1748,17 +1748,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(nCol), static_cast(nRow), GetCurrScTab() ) ) ); - bRet = TRUE; + bRet = sal_True; } else - bRet = FALSE; + bRet = sal_False; aIn.PopPosition(); } @@ -1776,26 +1776,26 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, #if 0 -BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) +sal_Bool ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) { - UINT16 nInd; - BYTE nType; - BYTE nVal; - BOOL bString = FALSE; + sal_uInt16 nInd; + sal_uInt8 nType; + sal_uInt8 nVal; + sal_Bool bString = sal_False; #ifdef OSL_BIGENDIAN // Code fuer alle anstaendigen Prozessoren - nType = *( ( ( BYTE * ) &rfCurVal ) + 7 ); - nVal = *( ( ( BYTE * ) &rfCurVal ) + 5 ); - nInd = *( ( UINT16 * ) &rfCurVal ); + nType = *( ( ( sal_uInt8 * ) &rfCurVal ) + 7 ); + nVal = *( ( ( sal_uInt8 * ) &rfCurVal ) + 5 ); + nInd = *( ( sal_uInt16 * ) &rfCurVal ); #else // fuer Schund-Prozessoren - nType = *( ( BYTE * ) &rfCurVal ); - nVal = *( ( ( BYTE * ) &rfCurVal ) + 2 ); - nInd = *( ( ( UINT16 * ) &rfCurVal ) + 3 ); + nType = *( ( sal_uInt8 * ) &rfCurVal ); + nVal = *( ( ( sal_uInt8 * ) &rfCurVal ) + 2 ); + nInd = *( ( ( sal_uInt16 * ) &rfCurVal ) + 3 ); #endif - if( ( UINT16 ) ~nInd ) + if( ( sal_uInt16 ) ~nInd ) // Wert ist Float rCell.SetHybridDouble( rfCurVal ); else @@ -1803,7 +1803,7 @@ BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) switch( nType ) { case 0: // String - bString = TRUE; + bString = sal_True; break; case 1: // Bool if( nVal ) @@ -1825,7 +1825,7 @@ BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr ) { - UINT16 nInd; + sal_uInt16 nInd; switch( eErr ) { @@ -1864,8 +1864,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 148b1542913a..77299aff113a 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -62,7 +62,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()) @@ -75,7 +75,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); @@ -96,16 +96,16 @@ bool ExcelToSc8::Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLas // otherwise it will seek to the first byte past additional content after 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 = sal_False; + sal_Bool bArrayFormula = sal_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; @@ -142,7 +142,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(nCol & 0xFF), static_cast(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(nCol & 0xFF), static_cast(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; @@ -448,14 +448,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(nCol); aSRD.nRow = nRow & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel8( nRow, nCol, aSRD, bRangeName ); @@ -466,8 +466,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 ); @@ -480,16 +480,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 ); @@ -507,10 +507,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 ); @@ -546,12 +546,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 ); @@ -563,12 +563,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 ); @@ -702,7 +702,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; @@ -716,8 +716,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, } aSRD.nTab = nTabFirst; - aSRD.SetFlag3D( TRUE ); - aSRD.SetTabRel( FALSE ); + aSRD.SetFlag3D( sal_True ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName ); @@ -727,8 +727,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) @@ -751,7 +751,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, else { if ( !ValidTab(nTabFirst)) - aSRD.SetTabDeleted( TRUE ); + aSRD.SetTabDeleted( sal_True ); if( nTabLast != nTabFirst ) { @@ -772,7 +772,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; @@ -789,10 +789,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( sal_False ); rR2.SetFlag3D( nTabFirst != nTabLast ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName ); @@ -808,10 +808,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) @@ -821,15 +821,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(); } @@ -873,17 +873,17 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, // stream seeks to first byte after ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen, const FORMULA_TYPE eFT ) { - BYTE nOp, nLen;//, 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_uInt8 nOp, nLen;//, nByte; + sal_Bool bError = sal_False; + sal_Bool bArrayFormula = sal_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 = sal_False; if( eStatus != ConvOK ) { @@ -910,7 +910,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa // Array Formula or Shared Formula [ 277] aIn.Ignore( 4 ); - bArrayFormula = TRUE; + bArrayFormula = sal_True; break; case 0x02: // Data Table [325 277] aIn.Ignore( 4 ); @@ -943,8 +943,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; @@ -990,14 +990,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(nCol); aSRD.nRow = nRow & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel8( nRow, nCol, aSRD, bRangeName ); @@ -1009,16 +1009,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 ); @@ -1064,12 +1064,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 ); @@ -1081,12 +1081,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 ); @@ -1123,7 +1123,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; @@ -1131,8 +1131,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( sal_False ); ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName ); @@ -1153,7 +1153,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; @@ -1165,10 +1165,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( sal_False ); rR2.SetFlag3D( nFirstScTab != nLastScTab ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName ); @@ -1193,7 +1193,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa aIn.Ignore( 10 ); break; default: - bError = TRUE; + bError = sal_True; } bError |= !aIn.IsValid(); } @@ -1363,11 +1363,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(nC); + const sal_Bool bColRel = ( nC & 0x4000 ) != 0; + const sal_Bool bRowRel = ( nC & 0x8000 ) != 0; + const sal_uInt8 nCol = static_cast(nC); rSRD.SetColRel( bColRel ); rSRD.SetRowRel( bRowRel ); @@ -1377,7 +1377,7 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, // C O L if( bColRel ) // rel Col - rSRD.nRelCol = static_cast(static_cast(nC)); + rSRD.nRelCol = static_cast(static_cast(nC)); else // abs Col rSRD.nCol = static_cast(nCol); @@ -1385,7 +1385,7 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, // R O W if( bRowRel ) // rel Row - rSRD.nRelRow = static_cast(static_cast(nRow)); + rSRD.nRelRow = static_cast(static_cast(nRow)); else // abs Row rSRD.nRow = Min( static_cast(nRow), MAXROW); @@ -1418,12 +1418,12 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, // stream seeks to first byte after -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; @@ -1563,7 +1563,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; @@ -1571,8 +1571,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 77afeb58d945..43bd5541fb9a 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -158,8 +158,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() ); @@ -177,7 +177,7 @@ void ImportExcel8::Boundsheet( void ) } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nScTab, FALSE ); + pD->SetVisible( nScTab, sal_False ); if( !pD->RenameTab( nScTab, aName ) ) { @@ -191,7 +191,7 @@ void ImportExcel8::Boundsheet( void ) void ImportExcel8::Scenman( void ) { - UINT16 nLastDispl; + sal_uInt16 nLastDispl; aIn.Ignore( 4 ); aIn >> nLastDispl; @@ -209,8 +209,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; @@ -354,10 +354,10 @@ XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRan ExcRoot( pRoot ), pCurrDBData(NULL), nFirstEmpty( 0 ), - bActive( FALSE ), - bHasConflict( FALSE ), - bCriteria( FALSE ), - bAutoOrAdvanced(FALSE), + bActive( sal_False ), + bHasConflict( sal_False ), + bCriteria( sal_False ), + bAutoOrAdvanced(sal_False), aFilterName(rName) { aParam.nCol1 = rRange.aStart.Col(); @@ -366,7 +366,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; } @@ -374,7 +374,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() @@ -382,7 +382,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) ); } } @@ -392,7 +392,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(), @@ -403,7 +403,7 @@ void XclImpAutoFilterData::InsertQueryParam() pCurrDBData->SetAdvancedQuerySource( &aAdvRange ); else { - pCurrDBData->SetAutoFilter( TRUE ); + pCurrDBData->SetAutoFilter( sal_True ); SetCellAttribs(); } } @@ -443,14 +443,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 ) @@ -458,8 +458,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(StartCol() + static_cast(nCol)); aEntry.eOp = bTopOfTop10 ? (bPercent ? SC_TOPPERC : SC_TOPVAL) : (bPercent ? SC_BOTPERC : SC_BOTVAL); @@ -472,12 +472,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++ ) @@ -486,7 +486,7 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) { ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty ); pQueryEntries[ nE ] = &aEntry; - bIgnore = FALSE; + bIgnore = sal_False; rStrm >> nType >> nOper; switch( nOper ) @@ -534,21 +534,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 = sal_False; aEntry.nVal = SC_EMPTYFIELDS; aEntry.eOp = SC_EQUAL; break; case EXC_AFTYPE_NOTEMPTY: - aEntry.bQueryByString = FALSE; + aEntry.bQueryByString = sal_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, @@ -558,11 +558,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(StartCol() + static_cast(nCol)); aEntry.eConnect = nE ? eConn : SC_AND; nFirstEmpty++; @@ -587,10 +587,10 @@ void XclImpAutoFilterData::SetAdvancedRange( const ScRange* pRange ) if (pRange) { aCriteriaRange = *pRange; - bCriteria = TRUE; + bCriteria = sal_True; } else - bCriteria = FALSE; + bCriteria = sal_False; } void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr ) @@ -598,11 +598,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 = sal_False; + aParam.bDestPers = sal_True; } -void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed ) +void XclImpAutoFilterData::Apply( const sal_Bool bUseUnNamed ) { CreateScDBData(bUseUnNamed); @@ -614,7 +614,7 @@ void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed ) // SCROW nRow1 = StartRow(); // SCROW nRow2 = EndRow(); // size_t nRows = nRow2 - nRow1 + 1; -// boost::scoped_array pFlags( new BYTE[nRows]); +// boost::scoped_array pFlags( new sal_uInt8[nRows]); // pExcRoot->pDoc->GetRowFlagsArray( Tab()).FillDataArray( nRow1, nRow2, // pFlags.get()); // for (size_t j=0; jGetNullDate(); - bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : FALSE; + bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : sal_False; } -UINT16 Exc1904::GetNum( void ) const +sal_uInt16 Exc1904::GetNum( void ) const { return 0x0022; } @@ -403,7 +403,7 @@ void ExcBundlesheetBase::UpdateStreamPos( XclExpStream& rStrm ) } -UINT16 ExcBundlesheetBase::GetNum( void ) const +sal_uInt16 ExcBundlesheetBase::GetNum( void ) const { return 0x0085; } @@ -423,7 +423,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 } @@ -442,7 +442,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; } @@ -575,7 +575,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; @@ -595,17 +595,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 ) { @@ -620,7 +620,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 ) { @@ -654,7 +654,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 ), @@ -662,13 +662,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 sal_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; @@ -679,12 +679,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 = sal_False; String sText; if( rEntry.pStr ) @@ -714,23 +714,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: @@ -747,7 +747,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 ) @@ -756,13 +756,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 ) { @@ -843,9 +843,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 = sal_False; + sal_Bool bAdvanced = sal_False; ScDBData* pData = NULL; ScRange aAdvRange; while( (nIndex < rDBColl.GetCount()) && !bFound ) @@ -898,9 +898,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : // AutoFilter else { - BOOL bConflict = FALSE; - BOOL bContLoop = TRUE; - BOOL bHasOr = FALSE; + sal_Bool bConflict = sal_False; + sal_Bool bContLoop = sal_True; + sal_Bool bHasOr = sal_False; SCCOLROW nFirstField = aParam.GetEntry( 0 ).nField; // create AUTOFILTER records for filtered columns @@ -962,12 +962,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(nCol) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } void ExcAutoFilterRecs::AddObjRecs() diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx index e6453c2f11e2..e075a3159b5d 100644 --- a/sc/source/filter/excel/exctools.cxx +++ b/sc/source/filter/excel/exctools.cxx @@ -98,9 +98,9 @@ XclImpOutlineBuffer::XclImpOutlineBuffer( SCSIZE nNewSize ) DBG_ASSERT( nNewSize > 0, "-OutlineBuffer::Ctor: nNewSize == 0!" ); nSize = nNewSize + 1; - pLevel = new BYTE[ nSize ]; - pOuted = new BOOL[ nSize ]; - pHidden = new BOOL[ nSize ]; + pLevel = new sal_uInt8[ nSize ]; + pOuted = new sal_Bool[ nSize ]; + pHidden = new sal_Bool[ nSize ]; pOutlineArray = NULL; Reset(); @@ -115,7 +115,7 @@ XclImpOutlineBuffer::~XclImpOutlineBuffer() } -void XclImpOutlineBuffer::SetLevel( SCSIZE nIndex, BYTE nVal, BOOL bOuted, BOOL bHidden ) +void XclImpOutlineBuffer::SetLevel( SCSIZE nIndex, sal_uInt8 nVal, sal_Bool bOuted, sal_Bool bHidden ) { if( nIndex < nSize ) { @@ -143,28 +143,28 @@ void XclImpOutlineBuffer::MakeScOutline( void ) if( !pOutlineArray || !HasOutline() ) return; - const UINT16 nNumLev = 8; - BOOL bPreOutedLevel = FALSE; - BYTE nCurrLevel = 0; - BOOL bMakeHidden[ nNumLev ]; - BOOL bMakeVisible[ nNumLev + 1 ]; + const sal_uInt16 nNumLev = 8; + sal_Bool bPreOutedLevel = sal_False; + sal_uInt8 nCurrLevel = 0; + sal_Bool bMakeHidden[ nNumLev ]; + sal_Bool bMakeVisible[ nNumLev + 1 ]; sal_uInt16 nLevel; for( nLevel = 0; nLevel < nNumLev; ++nLevel ) - bMakeHidden[ nLevel ] = FALSE; + bMakeHidden[ nLevel ] = sal_False; for( nLevel = 0; nLevel <= nNumLev; ++nLevel ) - bMakeVisible[ nLevel ] = TRUE; + bMakeVisible[ nLevel ] = sal_True; if( nLast < (nSize - 1) ) nLast++; // search for hidden attributes at end of level, move them to begin if( bButtonNormal ) { - for( BYTE nWorkLevel = 1; nWorkLevel <= nMaxLevel; nWorkLevel++ ) + for( sal_uInt8 nWorkLevel = 1; nWorkLevel <= nMaxLevel; nWorkLevel++ ) { - UINT16 nStartPos = 0; - BYTE nCurrLevel2 = 0; - BYTE nPrevLevel = 0; + sal_uInt16 nStartPos = 0; + sal_uInt8 nCurrLevel2 = 0; + sal_uInt8 nPrevLevel = 0; for( SCSIZE nC = 0 ; nC <= nLast ; nC++ ) { @@ -177,10 +177,10 @@ void XclImpOutlineBuffer::MakeScOutline( void ) if( pOuted[ nC ] && pHidden[ nStartPos ] ) { if( nStartPos ) - pOuted[ nStartPos - 1 ] = TRUE; + pOuted[ nStartPos - 1 ] = sal_True; else - bPreOutedLevel = TRUE; - pOuted[ nC ] = FALSE; + bPreOutedLevel = sal_True; + pOuted[ nC ] = sal_False; } } } @@ -190,16 +190,16 @@ void XclImpOutlineBuffer::MakeScOutline( void ) bPreOutedLevel = pHidden[ 0 ]; // generate SC outlines - UINT16 nPrevC; - UINT16 nStart[ nNumLev ]; - BOOL bDummy; - BOOL bPrevOuted = bPreOutedLevel; - BOOL bCurrHidden = FALSE; - BOOL bPrevHidden = FALSE; + sal_uInt16 nPrevC; + sal_uInt16 nStart[ nNumLev ]; + sal_Bool bDummy; + sal_Bool bPrevOuted = bPreOutedLevel; + sal_Bool bCurrHidden = sal_False; + sal_Bool bPrevHidden = sal_False; for( SCSIZE nC = 0; nC <= nLast; nC++ ) { - BYTE nWorkLevel = pLevel[ nC ]; + sal_uInt8 nWorkLevel = pLevel[ nC ]; nPrevC = static_cast< sal_uInt16 >( nC ? nC - 1 : 0 ); bPrevHidden = bCurrHidden; @@ -217,9 +217,9 @@ void XclImpOutlineBuffer::MakeScOutline( void ) // close levels while( nWorkLevel < nCurrLevel ) { - BOOL bLastLevel = (nWorkLevel == (nCurrLevel - 1)); - BOOL bRealHidden = (bMakeHidden[ nCurrLevel ] && bPrevHidden ); - BOOL bRealVisible = (bMakeVisible[ nCurrLevel ] || + sal_Bool bLastLevel = (nWorkLevel == (nCurrLevel - 1)); + sal_Bool bRealHidden = (bMakeHidden[ nCurrLevel ] && bPrevHidden ); + sal_Bool bRealVisible = (bMakeVisible[ nCurrLevel ] || (!bCurrHidden && bLastLevel)); pOutlineArray->Insert( nStart[ nCurrLevel ], nPrevC , bDummy, @@ -232,8 +232,8 @@ void XclImpOutlineBuffer::MakeScOutline( void ) } -void XclImpOutlineBuffer::SetLevelRange( SCSIZE nF, SCSIZE nL, BYTE nVal, - BOOL bOuted, BOOL bHidden ) +void XclImpOutlineBuffer::SetLevelRange( SCSIZE nF, SCSIZE nL, sal_uInt8 nVal, + sal_Bool bOuted, sal_Bool bHidden ) { DBG_ASSERT( nF <= nL, "+OutlineBuffer::SetLevelRange(): Last < First!" ); @@ -242,10 +242,10 @@ void XclImpOutlineBuffer::SetLevelRange( SCSIZE nF, SCSIZE nL, BYTE nVal, if( nL > nLast ) nLast = nL; - BYTE* pLevelCount; - BYTE* pLast; - BOOL* pOutedCount; - BOOL* pHiddenCount; + sal_uInt8* pLevelCount; + sal_uInt8* pLast; + sal_Bool* pOutedCount; + sal_Bool* pHiddenCount; pLevelCount = &pLevel[ nF ]; pLast = &pLevel[ nL ]; @@ -270,7 +270,7 @@ void XclImpOutlineBuffer::Reset( void ) for( SCSIZE nC = 0 ; nC < nSize ; nC++ ) { pLevel[ nC ] = 0; - pOuted[ nC ] = pHidden[ nC ] = FALSE; + pOuted[ nC ] = pHidden[ nC ] = sal_False; } nLast = 0; nMaxLevel = 0; @@ -280,7 +280,7 @@ void XclImpOutlineBuffer::Reset( void ) //___________________________________________________________________ -ExcScenarioCell::ExcScenarioCell( const UINT16 nC, const UINT16 nR ) : nCol( nC ), nRow( nR ) +ExcScenarioCell::ExcScenarioCell( const sal_uInt16 nC, const sal_uInt16 nR ) : nCol( nC ), nRow( nR ) { } @@ -300,8 +300,8 @@ void ExcScenarioCell::SetValue( const String& r ) 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; @@ -324,8 +324,8 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR ) : nTab( rR.pIR else pComment = new String; - UINT16 n = nCref; - UINT16 nC, nR; + sal_uInt16 n = nCref; + sal_uInt16 nC, nR; while( n ) { rIn >> nR >> nC; @@ -365,24 +365,24 @@ ExcScenario::~ExcScenario() } -void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast ) +void ExcScenario::Apply( const XclImpRoot& rRoot, const sal_Bool bLast ) { ScDocument& r = rRoot.GetDoc(); ExcScenarioCell* p = EXCSCFIRST(); 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, sal_True ); // #112621# do not show scenario frames r.SetScenarioData( nNewTab, *pComment, COL_LIGHTGRAY, /*SC_SCENARIO_SHOWFRAME|*/SC_SCENARIO_COPYALL|(nProtected ? SC_SCENARIO_PROTECT : 0) ); while( p ) { - UINT16 nCol = p->nCol; - UINT16 nRow = p->nRow; + sal_uInt16 nCol = p->nCol; + sal_uInt16 nRow = p->nRow; String aVal = p->GetValue(); r.ApplyFlagsTab( nCol, nRow, nCol, nRow, nNewTab, SC_MF_SCENARIO ); @@ -393,7 +393,7 @@ void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast ) } if( bLast ) - r.SetActiveScenario( nNewTab, TRUE ); + r.SetActiveScenario( nNewTab, sal_True ); // #111896# modify what the Active tab is set to if the new // scenario tab occurs before the active tab. @@ -421,12 +421,12 @@ ExcScenarioList::~ExcScenarioList() void ExcScenarioList::Apply( const XclImpRoot& rRoot ) { ExcScenario* p = _Last(); - UINT16 n = ( UINT16 ) Count(); + sal_uInt16 n = ( sal_uInt16 ) Count(); while( p ) { n--; - p->Apply( rRoot, ( BOOL ) ( n == nLastScenario ) ); + p->Apply( rRoot, ( sal_Bool ) ( n == nLastScenario ) ); p = _Prev(); } } diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index dbe70ae6a0ee..02c71d9414c8 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -97,7 +97,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 ) ) ); } @@ -186,7 +186,7 @@ FltError ExportXml2007::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 ) ) ); } diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index dca6723181ae..9eda8b2ebc39 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -48,11 +48,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; @@ -93,7 +93,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 ) @@ -107,15 +107,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 78883b4a5c76..7c2dccb3659d 100644 --- a/sc/source/filter/excel/frmbase.cxx +++ b/sc/source/filter/excel/frmbase.cxx @@ -54,10 +54,10 @@ _ScRangeListTabs::_ScRangeListTabs( void ) { 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 = sal_False; pAct = NULL; nAct = 0; } @@ -67,7 +67,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 ]; @@ -78,7 +78,7 @@ _ScRangeListTabs::~_ScRangeListTabs() } -void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b ) +void _ScRangeListTabs::Append( ScSingleRefData a, const sal_Bool b ) { if( b ) { @@ -96,7 +96,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b ) DBG_ASSERT( ValidTab(a.nTab), "-_ScRangeListTabs::Append(): Luegen haben kurze Abstuerze!" ); } - bHasRanges = TRUE; + bHasRanges = sal_True; if( a.nTab >= 0 ) { @@ -110,7 +110,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b ) } -void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b ) +void _ScRangeListTabs::Append( ScComplexRefData a, const sal_Bool b ) { if( b ) { @@ -156,7 +156,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b ) "+_ScRangeListTabs::Append(): 3D-Ranges werden in SC nicht unterstuetzt!" ); } - bHasRanges = TRUE; + bHasRanges = sal_True; if( a.Ref1.nTab >= 0 ) { @@ -170,7 +170,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b ) } -const ScRange* _ScRangeListTabs::First( const UINT16 n ) +const ScRange* _ScRangeListTabs::First( const sal_uInt16 n ) { DBG_ASSERT( ValidTab(n), "-_ScRangeListTabs::First(): Und tschuessssssss!" ); @@ -200,7 +200,7 @@ const ScRange* _ScRangeListTabs::Next( void ) -ConverterBase::ConverterBase( UINT16 nNewBuffer ) : +ConverterBase::ConverterBase( sal_uInt16 nNewBuffer ) : aEingPos( 0, 0, 0 ), eStatus( ConvOK ), nBufferSize( nNewBuffer ) @@ -224,7 +224,7 @@ void ConverterBase::Reset() -ExcelConverterBase::ExcelConverterBase( UINT16 nNewBuffer ) : +ExcelConverterBase::ExcelConverterBase( sal_uInt16 nNewBuffer ) : ConverterBase( nNewBuffer ) { } @@ -248,7 +248,7 @@ void ExcelConverterBase::Reset() -LotusConverterBase::LotusConverterBase( SvStream &rStr, UINT16 nNewBuffer ) : +LotusConverterBase::LotusConverterBase( SvStream &rStr, sal_uInt16 nNewBuffer ) : ConverterBase( nNewBuffer ), aIn( rStr ), nBytesLeft( 0 ) @@ -259,14 +259,14 @@ LotusConverterBase::~LotusConverterBase() { } -//UNUSED2008-05 void LotusConverterBase::Reset( INT32 nLen, const ScAddress& rEingPos ) +//UNUSED2008-05 void LotusConverterBase::Reset( sal_Int32 nLen, const ScAddress& rEingPos ) //UNUSED2008-05 { //UNUSED2008-05 ConverterBase::Reset(); //UNUSED2008-05 nBytesLeft = nLen; //UNUSED2008-05 aEingPos = rEingPos; //UNUSED2008-05 } //UNUSED2008-05 -//UNUSED2008-05 void LotusConverterBase::Reset( INT32 nLen ) +//UNUSED2008-05 void LotusConverterBase::Reset( sal_Int32 nLen ) //UNUSED2008-05 { //UNUSED2008-05 ConverterBase::Reset(); //UNUSED2008-05 nBytesLeft = nLen; diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 059f5ba7426b..f55911f3f3fb 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -145,7 +145,7 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): // ab Biff8 pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc( GetRoot() ); - bTabTruncated = FALSE; + bTabTruncated = sal_False; // Excel-Dokument per Default auf 31.12.1899, entspricht Excel-Einstellungen mit 1.1.1900 ScDocOptions aOpt = pD->GetDocOptions(); @@ -154,9 +154,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( sal_False ); // regular expressions? what's that? + aDocOpt.SetLookUpColRowNames( sal_False ); // default: no natural language refs pD->SetDocOptions( aDocOpt ); } @@ -181,7 +181,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() ) { @@ -382,7 +382,7 @@ void ImportExcel::Window1() void ImportExcel::Row25( void ) { - UINT16 nRow, nRowHeight; + sal_uInt16 nRow, nRowHeight; aIn >> nRow; aIn.Ignore( 4 ); // Mic und Mac ueberspringen @@ -398,7 +398,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(MAXCOL); + nColMac = static_cast(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( sal_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(MAXCOL); +// nColLast = static_cast(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(MAXCOL); + nColLast = static_cast(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( sal_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, sal_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 @@ -974,8 +974,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 ); @@ -1017,10 +1017,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; @@ -1031,50 +1031,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(nFirstCol), - static_cast(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast(nFirstRow - 1), nTab, sal_False, + sal_False, sal_False ); aTabOpParam.aRefFormulaEnd.Set( static_cast(nLastCol), - static_cast(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast(nFirstRow - 1), nTab, sal_False, + sal_False, sal_False ); aTabOpParam.aRefColCell.Set( static_cast(nInpCol), - static_cast(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast(nInpRow), nTab, sal_False, sal_False, + sal_False ); nRow++; break; case 1: // ROW aTabOpParam.aRefFormulaCell.Set( static_cast(nFirstCol - 1), - static_cast(nFirstRow), nTab, FALSE, FALSE, - FALSE ); + static_cast(nFirstRow), nTab, sal_False, sal_False, + sal_False ); aTabOpParam.aRefFormulaEnd.Set( static_cast(nFirstCol - 1), - static_cast(nLastRow), nTab, FALSE, FALSE, - FALSE ); + static_cast(nLastRow), nTab, sal_False, sal_False, + sal_False ); aTabOpParam.aRefRowCell.Set( static_cast(nInpCol), - static_cast(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast(nInpRow), nTab, sal_False, sal_False, + sal_False ); nCol++; break; case 2: // TWO-INPUT aTabOpParam.aRefFormulaCell.Set( static_cast(nFirstCol - 1), - static_cast(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast(nFirstRow - 1), nTab, sal_False, + sal_False, sal_False ); aTabOpParam.aRefRowCell.Set( static_cast(nInpCol), - static_cast(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast(nInpRow), nTab, sal_False, sal_False, + sal_False ); aTabOpParam.aRefColCell.Set( static_cast(nInpCol2), - static_cast(nInpRow2), nTab, FALSE, FALSE, - FALSE ); + static_cast(nInpRow2), nTab, sal_False, sal_False, + sal_False ); break; } @@ -1087,7 +1087,7 @@ void ImportExcel::TableOp( void ) } else { - bTabTruncated = TRUE; + bTabTruncated = sal_True; GetTracer().TraceInvalidRow(GetCurrScTab(), nLastRow, MAXROW); } } @@ -1114,7 +1114,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(); @@ -1170,7 +1170,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 ) ); } @@ -1253,7 +1253,7 @@ void ImportExcel::PostDocLoad( void ) { for( SCTAB n = 0 ; n < nLast ; n++ ) { - p = pExcRoot->pPrintRanges->First( static_cast(n) ); + p = pExcRoot->pPrintRanges->First( static_cast(n) ); if( p ) { DBG_ASSERT( pExcRoot->pPrintRanges->GetActList(), @@ -1279,27 +1279,27 @@ void ImportExcel::PostDocLoad( void ) { for( SCTAB n = 0 ; n < nLast ; n++ ) { - p = pExcRoot->pPrintTitles->First( static_cast(n) ); + p = pExcRoot->pPrintTitles->First( static_cast(n) ); if( p ) { DBG_ASSERT( pExcRoot->pPrintTitles->GetActList(), "-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 = sal_False; } if( p->aStart.Row() == 0 && p->aEnd.Row() == MAXROW && bColVirgin ) { pD->SetRepeatColRange( n, p ); - bColVirgin = FALSE; + bColVirgin = sal_False; } p = pExcRoot->pPrintTitles->Next(); @@ -1324,10 +1324,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 7db7d17ed307..d46831b739af 100644 --- a/sc/source/filter/excel/namebuff.cxx +++ b/sc/source/filter/excel/namebuff.cxx @@ -44,16 +44,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; } @@ -86,14 +86,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 @@ -127,15 +127,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()) @@ -145,8 +145,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 ); } @@ -180,7 +180,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 @@ -188,21 +188,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 ) @@ -212,8 +212,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(nNewTabNum); - return TRUE; + rScIndex = rTabNum = static_cast(nNewTabNum); + return sal_True; } else rTabNum = 0xFFFD; @@ -227,8 +227,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(nNewTabNum); - return TRUE; + rScIndex = rTabNum = static_cast(nNewTabNum); + return sal_True; } else rTabNum = 0xFFFE; // Tabelle einmal nicht angelegt -> wird @@ -241,11 +241,11 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex ) } } - return FALSE; + return sal_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 ); @@ -253,11 +253,11 @@ BOOL ExtSheetBuffer::IsLink( const UINT16 nExcIndex ) const if( pRet ) return pRet->bLink; else - return FALSE; + return sal_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 ); @@ -266,10 +266,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 sal_False; } @@ -288,13 +288,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; } @@ -313,7 +313,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 cfe5aedb867e..55f1f97ceea0 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -89,9 +89,9 @@ FltError ImportExcel::Read( void ) Zustand eAkt = Z_BiffNull, ePrev = Z_BiffNull; FltError eLastErr = eERR_OK; - UINT16 nOpcode; - UINT16 nBofLevel = 0; - BOOL bBiff4Workbook = FALSE; + sal_uInt16 nOpcode; + sal_uInt16 nBofLevel = 0; + sal_Bool bBiff4Workbook = sal_False; DBG_ASSERT( &aIn != NULL, "-ImportExcel::Read(): Kein Stream - wie dass?!" ); @@ -189,7 +189,7 @@ FltError ImportExcel::Read( void ) else if( pExcRoot->eDateiTyp == Biff4W ) { eAkt = Z_Biff4W; - bBiff4Workbook = TRUE; + bBiff4Workbook = sal_True; } break; case EXC_BIFF5: @@ -722,7 +722,7 @@ FltError ImportExcel::Read( void ) break; case Biff5V: default: - pD->SetVisible( GetCurrScTab(), FALSE ); + pD->SetVisible( GetCurrScTab(), sal_False ); ePrev = eAkt; eAkt = Z_Biffn0; } @@ -782,7 +782,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; } @@ -1053,7 +1053,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(), sal_False ); XclTools::SkipSubStream( maStrm ); IncCurrScTab(); } diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx index b61a844d02a5..d845ae5f6b5b 100644 --- a/sc/source/filter/excel/tokstack.cxx +++ b/sc/source/filter/excel/tokstack.cxx @@ -40,10 +40,10 @@ #include // 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 ]; @@ -69,17 +69,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 @@ -94,7 +94,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; @@ -122,7 +122,7 @@ TokenPool::TokenPool( void ) TokenPool::~TokenPool() { - UINT16 n; + sal_uInt16 n; delete[] pP_Id; delete[] pElement; @@ -172,8 +172,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 ]; @@ -191,11 +191,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,11 +207,11 @@ void TokenPool::GrowDouble( void ) //UNUSED2009-05 void TokenPool::GrowError( void ) //UNUSED2009-05 { -//UNUSED2009-05 UINT16 nP_ErrNew = nP_Err * 2; +//UNUSED2009-05 sal_uInt16 nP_ErrNew = nP_Err * 2; //UNUSED2009-05 -//UNUSED2009-05 USHORT* pP_ErrNew = new USHORT[ nP_ErrNew ]; +//UNUSED2009-05 sal_uInt16* pP_ErrNew = new sal_uInt16[ nP_ErrNew ]; //UNUSED2009-05 -//UNUSED2009-05 for( UINT16 nL = 0 ; nL < nP_Err ; nL++ ) +//UNUSED2009-05 for( sal_uInt16 nL = 0 ; nL < nP_Err ; nL++ ) //UNUSED2009-05 pP_ErrNew[ nL ] = pP_Err[ nL ]; //UNUSED2009-05 //UNUSED2009-05 nP_Err = nP_ErrNew; @@ -223,8 +223,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 ]; @@ -242,11 +242,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; @@ -258,13 +258,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 ]; @@ -284,7 +284,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 ]; @@ -299,7 +299,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 ]; @@ -314,7 +314,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 ]; @@ -326,7 +326,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!?" ); @@ -353,7 +353,7 @@ void TokenPool::GetElement( const UINT16 nId ) #endif break; case T_RefC: - pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (UINT16) nId ] ] ); + pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (sal_uInt16) nId ] ] ); break; case T_RefA: { @@ -368,7 +368,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 ) @@ -382,7 +382,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 ) @@ -391,7 +391,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 ) @@ -400,7 +400,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]; @@ -409,7 +409,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]; @@ -418,7 +418,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]; @@ -433,7 +433,7 @@ void TokenPool::GetElement( const UINT16 nId ) } -void TokenPool::GetElementRek( const UINT16 nId ) +void TokenPool::GetElementRek( const sal_uInt16 nId ) { #ifdef DBG_UTIL nRek++; @@ -445,8 +445,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 ) @@ -483,7 +483,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 ) @@ -492,7 +492,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 ) @@ -501,7 +501,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 ) @@ -510,7 +510,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]; @@ -519,7 +519,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]; @@ -528,7 +528,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]; @@ -590,7 +590,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(); @@ -626,7 +626,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++; @@ -765,7 +765,7 @@ const TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const String& rName ) if ( nElementAkt >= nElement ) GrowElement(); - pElement[nElementAkt] = static_cast(maExtNames.size()); + pElement[nElementAkt] = static_cast(maExtNames.size()); pType[nElementAkt] = T_ExtName; maExtNames.push_back(ExtName()); @@ -783,7 +783,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const String& rTabName if ( nElementAkt >= nElement ) GrowElement(); - pElement[nElementAkt] = static_cast(maExtCellRefs.size()); + pElement[nElementAkt] = static_cast(maExtCellRefs.size()); pType[nElementAkt] = T_ExtRefC; maExtCellRefs.push_back(ExtCellRef()); @@ -802,7 +802,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const String& rTabName if ( nElementAkt >= nElement ) GrowElement(); - pElement[nElementAkt] = static_cast(maExtAreaRefs.size()); + pElement[nElementAkt] = static_cast(maExtAreaRefs.size()); pType[nElementAkt] = T_ExtRefA; maExtAreaRefs.push_back(ExtAreaRef()); @@ -825,9 +825,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--; @@ -835,7 +835,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? @@ -844,14 +844,14 @@ BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const } } - return FALSE; + return sal_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--; @@ -866,7 +866,7 @@ const String* TokenPool::GetExternal( const TokenId& rId ) const //UNUSED2008-05 const String* TokenPool::GetString( const TokenId& r ) const //UNUSED2008-05 { //UNUSED2008-05 const String* p = NULL; -//UNUSED2008-05 UINT16 n = (UINT16) r; +//UNUSED2008-05 sal_uInt16 n = (sal_uInt16) r; //UNUSED2008-05 if( n && n <= nElementAkt ) //UNUSED2008-05 { //UNUSED2008-05 n--; diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 7bfd57be7290..a399f8a4c611 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -362,14 +362,14 @@ void XclExpMergedcells::Save( XclExpStream& rStrm ) void XclExpMergedcells::SaveXml( XclExpXmlStream& rStrm ) { - ULONG nCount = maMergedRanges.Count(); + sal_uLong nCount = maMergedRanges.Count(); if( !nCount ) return; sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream(); rWorksheet->startElement( XML_mergeCells, XML_count, OString::valueOf( (sal_Int32) nCount ).getStr(), FSEND ); - for( ULONG i = 0; i < nCount; ++i ) + for( sal_uLong i = 0; i < nCount; ++i ) { if( const ScRange* pRange = maMergedRanges.GetObject( i ) ) { @@ -821,7 +821,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 ); @@ -964,7 +964,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 ), @@ -974,7 +974,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 @@ -986,7 +986,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 @@ -1189,7 +1189,7 @@ XclExpDval::~XclExpDval() { } -void XclExpDval::InsertCellRange( const ScRange& rRange, ULONG nScHandle ) +void XclExpDval::InsertCellRange( const ScRange& rRange, sal_uLong nScHandle ) { if( GetBiff() == EXC_BIFF8 ) { @@ -1234,7 +1234,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) ) @@ -1247,7 +1247,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 b2801df7f54a..773bfeff9f0c 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -390,10 +390,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( sal_False ); + SetAutoLine( sal_False ); // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); @@ -534,10 +534,10 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rObjMgr, Referenc return; // OBJ record flags - SetLocked( TRUE ); + SetLocked( sal_True ); SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) ); - SetAutoFill( FALSE ); - SetAutoLine( FALSE ); + SetAutoFill( sal_False ); + SetAutoLine( sal_False ); // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 34e48671a3bc..56ab56097f85 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -522,7 +522,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!) @@ -1334,7 +1334,7 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData ) AppendExt( static_cast< sal_uInt8 >( pMatVal->GetBoolean() ? 1 : 0 ) ); AppendExt( 0, 7 ); } - else if( USHORT nErr = pMatVal->GetError() ) + else if( sal_uInt16 nErr = pMatVal->GetError() ) { AppendExt( EXC_CACHEDVAL_ERROR ); AppendExt( XclTools::GetXclErrorCode( nErr ) ); @@ -1823,7 +1823,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 @@ -1831,7 +1831,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 @@ -1999,7 +1999,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 ); @@ -2035,7 +2035,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 ); @@ -2094,7 +2094,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() ) @@ -2539,11 +2539,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; } } @@ -2609,14 +2609,14 @@ XclTokenArrayRef XclExpFormulaCompiler::CreateFormula( XclFormulaType eType, con XclTokenArrayRef XclExpFormulaCompiler::CreateFormula( XclFormulaType eType, const ScRangeList& rScRanges ) { - ULONG nCount = rScRanges.Count(); + sal_uLong nCount = rScRanges.Count(); if( nCount == 0 ) return XclTokenArrayRef(); ScTokenArray aScTokArr; SCTAB nCurrScTab = GetCurrScTab(); bool b3DRefOnly = mxImpl->Is3DRefOnly( eType ); - for( ULONG nIdx = 0; nIdx < nCount; ++nIdx ) + for( sal_uLong nIdx = 0; nIdx < nCount; ++nIdx ) { if( nIdx > 0 ) aScTokArr.AddOpCode( ocUnion ); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index bce037bd05c1..2c8434b1d8f7 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -266,7 +266,7 @@ bool XclExpAddressConverter::ConvertRange( XclRange& rXclRange, //UNUSED2008-05 bool XclExpAddressConverter::CheckRangeList( const ScRangeList& rScRanges, bool bWarn ) //UNUSED2008-05 { -//UNUSED2008-05 for( ULONG nIdx = 0, nSize = rScRanges.Count(); nIdx < nSize; ++nIdx ) +//UNUSED2008-05 for( sal_uLong nIdx = 0, nSize = rScRanges.Count(); nIdx < nSize; ++nIdx ) //UNUSED2008-05 if( const ScRange* pScRange = rScRanges.GetObject( nIdx ) ) //UNUSED2008-05 if( !CheckRange( *pScRange, bWarn ) ) //UNUSED2008-05 return false; @@ -275,7 +275,7 @@ bool XclExpAddressConverter::ConvertRange( XclRange& rXclRange, void XclExpAddressConverter::ValidateRangeList( ScRangeList& rScRanges, bool bWarn ) { - ULONG nIdx = rScRanges.Count(); + sal_uLong nIdx = rScRanges.Count(); while( nIdx ) { --nIdx; // backwards to keep nIdx valid @@ -289,7 +289,7 @@ void XclExpAddressConverter::ConvertRangeList( XclRangeList& rXclRanges, const ScRangeList& rScRanges, bool bWarn ) { rXclRanges.clear(); - for( ULONG nPos = 0, nCount = rScRanges.Count(); nPos < nCount; ++nPos ) + for( sal_uLong nPos = 0, nCount = rScRanges.Count(); nPos < nCount; ++nPos ) { if( const ScRange* pScRange = rScRanges.GetObject( nPos ) ) { @@ -496,7 +496,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, sal_False, &pItem ) == SFX_ITEM_SET ) { const SvxFieldData* pField = static_cast< const SvxFieldItem* >( pItem )->GetField(); if( const SvxURLField* pUrlField = PTR_CAST( SvxURLField, pField ) ) @@ -609,8 +609,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() ); @@ -639,8 +639,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 ); @@ -667,8 +667,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 ); @@ -727,8 +727,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 @@ -948,7 +948,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 ); @@ -1124,7 +1124,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const rStrm << EXC_CACHEDVAL_BOOL << nBool; rStrm.WriteZeroBytes( 7 ); } - else if( USHORT nScError = pMatVal->GetError() ) + else if( sal_uInt16 nScError = pMatVal->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 fcf738527025..c30d862e6df3 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -1068,7 +1068,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 @@ -1162,7 +1162,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 @@ -1283,7 +1283,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 af275bef7eef..a6e4bc801b9e 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -135,9 +135,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 ); @@ -164,11 +164,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; @@ -377,7 +377,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 ) @@ -386,7 +386,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 ) @@ -481,7 +481,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; @@ -627,7 +627,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 @@ -671,7 +671,7 @@ void XclExpNameManagerImpl::CreateBuiltInNames() void XclExpNameManagerImpl::CreateUserNames() { const ScRangeName& rNamedRanges = GetNamedRanges(); - for( USHORT nNameIdx = 0, nNameCount = rNamedRanges.GetCount(); nNameIdx < nNameCount; ++nNameIdx ) + for( sal_uInt16 nNameIdx = 0, nNameCount = rNamedRanges.GetCount(); nNameIdx < nNameCount; ++nNameIdx ) { const ScRangeData* pRangeData = rNamedRanges[ nNameIdx ]; DBG_ASSERT( rNamedRanges[ nNameIdx ], "XclExpNameManagerImpl::CreateUserNames - missing defined name" ); @@ -684,7 +684,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 +711,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/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index ddcdb3243167..ab93bd7a52f9 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -922,7 +922,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 ) { @@ -1281,7 +1281,7 @@ XclExpPivotTable::XclExpPivotTable( const XclExpRoot& rRoot, const ScDPObject& r maFieldList.AppendNewRecord( new XclExpPTField( *this, nFieldIdx ) ); const List& rDimList = pSaveData->GetDimensions(); - ULONG nDimIdx, nDimCount = rDimList.Count(); + sal_uLong nDimIdx, nDimCount = rDimList.Count(); /* 2) First process all data dimensions, they are needed for extended settings of row/column/page fields (sorting/auto show). */ @@ -1714,7 +1714,7 @@ XclExpPivotTableManager::XclExpPivotTableManager( const XclExpRoot& rRoot ) : void XclExpPivotTableManager::CreatePivotTables() { if( ScDPCollection* pDPColl = GetDoc().GetDPCollection() ) - for( USHORT nDPObj = 0, nCount = pDPColl->GetCount(); nDPObj < nCount; ++nDPObj ) + for( sal_uInt16 nDPObj = 0, nCount = pDPColl->GetCount(); nDPObj < nCount; ++nDPObj ) if( ScDPObject* pDPObj = (*pDPColl)[ nDPObj ] ) if( const XclExpPivotCache* pPCache = CreatePivotCache( *pDPObj ) ) maPTableList.AppendNewRecord( new XclExpPivotTable( GetRoot(), *pDPObj, *pPCache ) ); diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index ccebe9a4280f..10f460aa0b07 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -821,7 +821,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 ) @@ -885,7 +885,7 @@ sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet, 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; @@ -902,14 +902,14 @@ sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet, /*static*/ 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 ); @@ -1197,8 +1197,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; } }; @@ -1236,7 +1236,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 ) ); @@ -1393,7 +1393,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 @@ -1409,7 +1409,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 ) { @@ -1900,7 +1900,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 ) { @@ -1928,7 +1928,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) && @@ -1965,7 +1965,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; @@ -1987,7 +1987,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() ); @@ -2349,7 +2349,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 ); } @@ -2608,7 +2608,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 ) ) @@ -2633,7 +2633,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 b5ca318a91b4..51d700dda6bf 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -813,12 +813,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; /* #73420# 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. */ @@ -917,7 +917,7 @@ void XclExpFormulaCell::Save( XclExpStream& rStrm ) mxStringRec->Save( rStrm ); } -static const char* lcl_GetErrorString( USHORT nScErrCode ) +static const char* lcl_GetErrorString( sal_uInt16 nScErrCode ) { sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode ); switch( nXclErrCode ) @@ -940,7 +940,7 @@ static void lcl_GetFormulaInfo( ScFormulaCell& rCell, const char** pType, OUStri case NUMBERFORMAT_NUMBER: { // either value or error code - USHORT nScErrCode = rCell.GetErrCode(); + sal_uInt16 nScErrCode = rCell.GetErrCode(); if( nScErrCode ) { *pType = "e"; @@ -1036,7 +1036,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 ) @@ -1402,7 +1402,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(); } @@ -1412,7 +1412,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 ) ) @@ -1423,7 +1423,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). */ @@ -1441,8 +1441,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; } @@ -1597,7 +1597,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 @@ -1824,8 +1824,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 ); @@ -2410,7 +2410,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 ) ); @@ -2510,7 +2510,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/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index b210d18f479c..261ae4785802 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -639,7 +639,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) if( !mxScCondFmt.get() ) { - ULONG nKey = 0; + sal_uLong nKey = 0; mxScCondFmt.reset( new ScConditionalFormat( nKey, GetDocPtr() ) ); } @@ -654,7 +654,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 ) ); @@ -851,7 +851,7 @@ void XclImpValidation::ReadDV( XclImpStream& rStrm ) aValidData.ResetError(); // set the handle ID - ULONG nHandle = rDoc.AddValidationEntry( aValidData ); + sal_uLong nHandle = rDoc.AddValidationEntry( aValidData ); ScPatternAttr aPattern( rDoc.GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nHandle ) ); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 8d09cae60941..dcce436aebdb 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -471,7 +471,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb #ifdef ISSUE66550_HLINK_FOR_SHAPES if( mbSimpleMacro && ((maMacroName.Len() > 0) || (maHyperlink.getLength() > 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 ); @@ -479,7 +479,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb } #else if( mbSimpleMacro && (maMacroName.Len() > 0) ) - if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) ) + if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, sal_True ) ) pInfo->SetMacro( XclTools::GetSbMacroUrl( maMacroName, GetDocShell() ) ); #endif @@ -565,9 +565,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 ) { @@ -663,7 +663,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, sal_False ); XOBitmap aXOBitmap( aBitmap ); aXOBitmap.Bitmap2Array(); aXOBitmap.SetBitmapType( XBITMAP_8X8 ); @@ -681,7 +681,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 ) ) ); @@ -1077,13 +1077,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( sal_False ) ); } if( bLineEnd ) { xSdrObj->SetMergedItem( XLineEndItem( EMPTY_STRING, aArrowPolyPoly ) ); xSdrObj->SetMergedItem( XLineEndWidthItem( nWidth ) ); - xSdrObj->SetMergedItem( XLineEndCenterItem( FALSE ) ); + xSdrObj->SetMergedItem( XLineEndCenterItem( sal_False ) ); } } rDffConv.Progress(); @@ -1368,10 +1368,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(); } @@ -3067,15 +3067,15 @@ XclImpSimpleDffConverter::~XclImpSimpleDffConverter() { } -FASTBOOL XclImpSimpleDffConverter::GetColorFromPalette( USHORT nIndex, Color& rColor ) const +FASTBOOL XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const { ColorData nColor = GetPalette().GetColorData( static_cast< sal_uInt16 >( nIndex ) ); if( nColor == COL_AUTO ) - return FALSE; + return sal_False; rColor.SetColor( nColor ); - return TRUE; + return sal_True; } // ---------------------------------------------------------------------------- @@ -3205,7 +3205,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 @@ -3241,7 +3241,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& ) @@ -3405,14 +3405,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 { @@ -3832,7 +3832,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, sal_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 ad04a1f3930c..d1793fc00ec0 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -837,7 +837,7 @@ XclImpCachedValue::~XclImpCachedValue() { } -USHORT XclImpCachedValue::GetScError() const +sal_uInt16 XclImpCachedValue::GetScError() const { return (mnType == EXC_CACHEDVAL_ERROR) ? XclTools::GetScErrorCode( mnBoolErr ) : 0; } @@ -877,7 +877,7 @@ ScMatrixRef XclImpCachedMatrix::CreateScMatrix() const { ScMatrixRef xScMatrix; DBG_ASSERT( mnScCols * mnScRows == maValueList.Count(), "XclImpCachedMatrix::CreateScMatrix - element count mismatch" ); - if( mnScCols && mnScRows && static_cast< ULONG >( mnScCols * mnScRows ) <= maValueList.Count() ) + if( mnScCols && mnScRows && static_cast< sal_uLong >( mnScCols * mnScRows ) <= maValueList.Count() ) { xScMatrix = new ScMatrix( mnScCols, mnScRows ); const XclImpCachedValue* pValue = maValueList.First(); diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 3d373f6c36ba..956cb54f203c 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -143,7 +143,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) : // find an unused name String aOrigName( maScName ); sal_Int32 nCounter = 0; - USHORT nDummy; + sal_uInt16 nDummy; while( rRangeNames.SearchName( maScName, nDummy ) ) maScName.Assign( aOrigName ).Append( ' ' ).Append( String::CreateFromInt32( ++nCounter ) ); @@ -232,7 +232,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& rRoot ) : void XclImpNameManager::ReadName( XclImpStream& rStrm ) { - ULONG nCount = maNameList.Count(); + sal_uLong nCount = maNameList.Count(); if( nCount < 0xFFFF ) maNameList.Append( 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 29e27a698a42..6073e47cc429 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -966,7 +966,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 ); } @@ -1067,7 +1067,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 ); @@ -1141,7 +1141,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(); @@ -1354,7 +1354,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( sal_False ); aSaveData.SetDrillDown( ::get_flag( maPTExtInfo.mnFlags, EXC_SXEX_DRILLDOWN ) ); // *** fields *** @@ -1417,7 +1417,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/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 1559ef5530f5..f3310d3fa769 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -597,7 +597,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; @@ -605,17 +605,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, sal_False ) == SFX_ITEM_SET ) ScGlobal::AddLanguage( rItemSet, GetFormatter() ); } @@ -1183,7 +1183,7 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs ) void XclImpXF::ApplyPattern( SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2, - SCTAB nScTab, ULONG nForceScNumFmt ) + SCTAB nScTab, sal_uLong nForceScNumFmt ) { // force creation of cell style and hard formatting, do it here to have mpStyleSheet const ScPatternAttr& rPattern = CreatePattern(); @@ -1453,7 +1453,7 @@ void XclImpXFBuffer::ApplyPattern( if( XclImpXF* pXF = GetXF( rXFIndex.GetXFIndex() ) ) { // #108770# set 'Standard' number format for all Boolean cells - ULONG nForceScNumFmt = rXFIndex.IsBoolCell() ? GetNumFmtBuffer().GetStdScNumFmt() : NUMBERFORMAT_ENTRY_NOT_FOUND; + sal_uLong nForceScNumFmt = rXFIndex.IsBoolCell() ? GetNumFmtBuffer().GetStdScNumFmt() : NUMBERFORMAT_ENTRY_NOT_FOUND; pXF->ApplyPattern( nScCol1, nScRow1, nScCol2, nScRow2, nScTab, nForceScNumFmt ); } } @@ -1510,7 +1510,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) { XclImpXFRange* pPrevRange; XclImpXFRange* pNextRange; - ULONG nNextIndex; + sal_uLong nNextIndex; Find( pPrevRange, pNextRange, nNextIndex, nScRow ); @@ -1525,7 +1525,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 ? maIndexList.GetObject( nIndex - 1 ) : 0; @@ -1574,7 +1574,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) void XclImpXFRangeColumn::Find( XclImpXFRange*& rpPrevRange, XclImpXFRange*& rpNextRange, - ULONG& rnNextIndex, SCROW nScRow ) const + sal_uLong& rnNextIndex, SCROW nScRow ) const { // test whether list is empty @@ -1610,8 +1610,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.Count() - 1; XclImpXFRange* pMidRange; while( ((rnNextIndex - nPrevIndex) > 1) && (rpPrevRange->mnScRow2 < nScRow) ) @@ -1639,7 +1639,7 @@ void XclImpXFRangeColumn::Find( } } -void XclImpXFRangeColumn::TryConcatPrev( ULONG nIndex ) +void XclImpXFRangeColumn::TryConcatPrev( sal_uLong nIndex ) { if( !nIndex ) return; @@ -1735,7 +1735,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 f75032ff461e..89f55c9b8d9e 100644 --- a/sc/source/filter/excel/xiview.cxx +++ b/sc/source/filter/excel/xiview.cxx @@ -226,8 +226,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 10a0657c7899..a726ccf36152 100755 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -1055,17 +1055,17 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, { if( rEscherFmt.mxItemSet.is() ) { - 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, sal_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, sal_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, sal_False ) ); sal_uInt16 nTransp = pTranspItem ? pTranspItem->GetValue() : 0; ScfPropSetHelper& rAreaHlp = GetAreaHelper( ePropMode ); rAreaHlp.InitializeWrite(); @@ -1074,7 +1074,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, sal_False ) ) ) { Any aGradientAny; if( pGradItem->QueryValue( aGradientAny, MID_FILLGRADIENT ) ) @@ -1092,7 +1092,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, sal_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 d613f1279242..e9e5ed0caa72 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -600,7 +600,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 c6d6c5b9246a..37feb77930e9 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -352,8 +352,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( sal_False ); + rEE.EnableUndo( sal_False ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); } return *mrData.mxEditEngine; @@ -363,11 +363,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( sal_False ); + rEE.EnableUndo( sal_False ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); // set Calc header/footer defaults @@ -390,8 +390,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( sal_False ); + rEE.EnableUndo( sal_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 0dd988d67586..c7c0fedd4c47 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -215,7 +215,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 ) @@ -240,7 +240,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 ) @@ -328,13 +328,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 ); diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx index bcee6f690f48..9646a2faf7ce 100644 --- a/sc/source/filter/ftools/fprogressbar.cxx +++ b/sc/source/filter/ftools/fprogressbar.cxx @@ -52,7 +52,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 ); @@ -234,7 +234,7 @@ void ScfSimpleProgressBar::Init( sal_Size nSize ) //UNUSED2008-05 Init( pDocShell, rText ); //UNUSED2008-05 } -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 72e5f115fed0..d3dfee2522f7 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -206,15 +206,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 b4d764dc74a7..752333a50e91 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -108,20 +108,20 @@ const static sal_Char __FAR_DATA sMyEndComment[] = " -->"; const static sal_Char __FAR_DATA sFontFamily[] = "font-family:"; const static sal_Char __FAR_DATA sFontSize[] = "font-size:"; -const USHORT __FAR_DATA ScHTMLExport::nDefaultFontSize[SC_HTML_FONTSIZES] = +const sal_uInt16 __FAR_DATA 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* __FAR_DATA 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 __FAR_DATA 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"; @@ -131,7 +131,7 @@ const sal_Char __FAR_DATA 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, sal_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() @@ -155,7 +155,7 @@ const sal_Char __FAR_DATA 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 ); @@ -236,7 +236,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 ), @@ -246,10 +246,10 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument nUsedTables( 0 ), nIndent( 0 ), bAll( bAllP ), - bTabHasGraphics( FALSE ), + bTabHasGraphics( sal_False ), bCalcAsShown( pDocP->GetDocOptions().IsCalcAsShown() ), - bTableDataWidth( TRUE ), - bTableDataHeight( TRUE ) + bTableDataWidth( sal_True ), + bTableDataHeight( sal_True ) { strcpy( sIndent, sIndentSource ); // #100211# - checked sIndent[0] = 0; @@ -258,9 +258,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; @@ -298,10 +298,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 @@ -312,18 +312,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; @@ -345,7 +345,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; @@ -422,7 +422,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 ); @@ -492,7 +492,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. @@ -507,7 +507,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; } @@ -561,7 +561,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 { @@ -701,7 +701,7 @@ void ScHTMLExport::WriteTables() // FRAME=VOID, we do the styling of the cells in (((aByteStrOut += ' ') += OOO_STRING_SVTOOLS_HTML_frame) += '=') += OOO_STRING_SVTOOLS_HTML_TF_void; - bTabHasGraphics = bTabAlignedLeft = FALSE; + bTabHasGraphics = bTabAlignedLeft = sal_False; if ( bAll && pDrawLayer ) PrepareGraphics( pDrawLayer, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); @@ -753,7 +753,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 and // 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++ ) { @@ -765,7 +765,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) ) @@ -774,9 +774,9 @@ void ScHTMLExport::WriteTables() if ( nCol2 == nEndCol ) IncIndent(-1); WriteCell( nCol2, nRow, nTab ); - bTableDataHeight = FALSE; + bTableDataHeight = sal_False; } - bTableDataWidth = FALSE; // widths only in first row + bTableDataWidth = sal_False; // widths only in first row if ( nRow == nEndRow ) IncIndent(-1); @@ -837,9 +837,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(); @@ -847,7 +847,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } else { - bValueData = FALSE; + bValueData = sal_False; nScriptType = 0; } if ( nScriptType == 0 ) @@ -872,15 +872,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()) ); @@ -892,7 +892,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) nC = nC + nCol; for ( jC=nCol, v=0; jCGetColWidth( jC, nTab ); - nWidthPixel = ToPixel( static_cast< USHORT >( v ) ); + nWidthPixel = ToPixel( static_cast< sal_uInt16 >( v ) ); } else nWidthPixel = ToPixel( pDoc->GetColWidth( nCol, nTab ) ); @@ -907,7 +907,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 ) ); @@ -960,26 +960,26 @@ 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() ); // #97650# default is AUTO now + 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() ); // #97650# default is AUTO now #if 0 // keine StyleSheet-Fontangaben: hart fuer jede Zelle - BOOL bSetFontName = TRUE; - USHORT nSetFontSizeNumber = GetFontSizeNumber( (USHORT)rFontHeightItem.GetHeight() ); + sal_Bool bSetFontName = sal_True; + sal_uInt16 nSetFontSizeNumber = GetFontSizeNumber( (sal_uInt16)rFontHeightItem.GetHeight() ); #else - BOOL bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); - USHORT nSetFontSizeNumber = 0; - UINT32 nFontHeight = rFontHeightItem.GetHeight(); + 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 } #endif - 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. @@ -1100,7 +1100,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } String aStrOut; - BOOL bFieldText = FALSE; + sal_Bool bFieldText = sal_False; if ( pCell ) { // cell content Color* pColor; @@ -1159,51 +1159,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 = sal_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, sal_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 = sal_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, sal_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 << "=\""; @@ -1225,10 +1225,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 = sal_False; INetURLObject aFileUrl, aTargetUrl; aFileUrl.SetSmartURL( rFileNm ); aTargetUrl.SetSmartURL( rTargetNm ); @@ -1241,11 +1241,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 @@ -1272,7 +1272,7 @@ BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm, else { SfxMedium aMedium( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, - FALSE ); + sal_False ); // temp. File anlegen // aMedium.DownLoad(); diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index 341f9afbc739..a1c7aa6a8dc8 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -64,7 +64,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab, SdrPage* pDrawPage = pDrawLayer->GetPage( static_cast(nTab) ); if ( pDrawPage ) { - bTabHasGraphics = TRUE; + bTabHasGraphics = sal_True; FillGraphList( pDrawPage, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); for ( ScHTMLGraphEntry* pE = aGraphList.First(); pE; @@ -72,7 +72,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab, { if ( !pE->bInCell ) { // nicht alle in Zellen: einige neben Tabelle - bTabAlignedLeft = TRUE; + bTabAlignedLeft = sal_True; break; } } @@ -84,7 +84,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; @@ -109,7 +109,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 ) @@ -155,11 +155,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 ) @@ -168,7 +168,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: @@ -178,7 +178,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) { String aLinkName; WriteImage( aLinkName, *pGraphic, aOpt ); - pE->bWritten = TRUE; + pE->bWritten = sal_True; } } break; @@ -188,14 +188,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() ) @@ -205,7 +205,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 1c0b9fc8ec33..4fb922d9a228 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -60,23 +60,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; @@ -136,7 +136,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 ); @@ -207,7 +207,7 @@ void ScHTMLImport::WriteToDocument( if( pTable->GetTableName().Len() ) { String aName( ScfTools::GetNameFromHTMLName( pTable->GetTableName() ) ); - USHORT nPos; + sal_uInt16 nPos; if( !mpDoc->GetRangeName()->SearchName( aName, nPos ) ) InsertRangeName( mpDoc, aName, aNewRange ); } @@ -233,9 +233,9 @@ 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; - USHORT nPos; - BOOL bLoop = TRUE; + sal_uLong nIndex = 1; + sal_uInt16 nPos; + sal_Bool bLoop = sal_True; while( bLoop ) { aToken = ScfTools::GetNameFromHTMLIndex( nIndex++ ); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 85e77fc3124b..8e9fbc046f02 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -69,7 +69,7 @@ using namespace ::com::sun::star; -SV_IMPL_VARARR_SORT( ScHTMLColOffset, ULONG ); +SV_IMPL_VARARR_SORT( ScHTMLColOffset, sal_uLong ); // ============================================================================ @@ -111,10 +111,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( sal_False ), + bFirstRow( sal_True ), + bInCell( sal_False ), + bInTitle( sal_False ) { MakeColNoRef( pLocalColOffset, 0, 0, 0, 0 ); MakeColNoRef( pColOffset, 0, 0, 0, 0 ); @@ -145,13 +145,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; @@ -174,17 +174,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 ) ); @@ -242,61 +242,61 @@ void ScHTMLLayoutParser::NextRow( ImportInfo* pInfo ) nRowMax = nRowCnt; nColCnt = nColCntStart; nColOffset = nColOffsetStart; - bFirstRow = FALSE; + bFirstRow = sal_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(nPos); if ( bFound ) - return TRUE; - USHORT nCount = pOffset->Count(); + return sal_True; + sal_uInt16 nCount = pOffset->Count(); if ( !nCount ) - return FALSE; + return sal_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 sal_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 ) @@ -307,31 +307,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; @@ -339,7 +339,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; @@ -348,17 +348,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 = sal_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 = sal_False; for ( ScRange* pR = xLockedList->First(); pR; pR = xLockedList->Next() ) { if ( pR->Intersects( aRange ) ) @@ -366,10 +366,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 ); } @@ -390,11 +390,11 @@ void ScHTMLLayoutParser::Adjust() xLockedList->Clear(); 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 ( ScEEParseEntry* pE = pList->First(); pE; pE = pList->Next() ) { @@ -419,7 +419,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++; @@ -435,7 +435,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; @@ -449,7 +449,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; @@ -466,18 +466,18 @@ void ScHTMLLayoutParser::Adjust() // echte Col SeekOffset( pColOffset, pE->nOffset, &pE->nCol, nOffsetTolerance ); SCCOL nColBeforeSkip = pE->nCol; - SkipLocked( pE, FALSE ); + SkipLocked( pE, sal_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; @@ -503,7 +503,7 @@ void ScHTMLLayoutParser::Adjust() } -USHORT ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE ) +sal_uInt16 ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE ) { if ( pE->nWidth ) return pE->nWidth; @@ -511,7 +511,7 @@ USHORT ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE ) nColCntStart + pE->nColOverlap), static_cast( pLocalColOffset->Count() - 1)); SCCOL nPos = (nTmp < 0 ? 0 : static_cast(nTmp)); - USHORT nOff2 = (USHORT) (*pLocalColOffset)[nPos]; + sal_uInt16 nOff2 = (sal_uInt16) (*pLocalColOffset)[nPos]; if ( pE->nOffset < nOff2 ) return nOff2 - pE->nOffset; return 0; @@ -523,26 +523,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(nColsPerRow); - USHORT nOff = nColOffsetStart; - pLocalColOffset->Remove( (USHORT)0, pLocalColOffset->Count() ); + sal_uInt16 nWidth = nTableWidth / static_cast(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]); pE = pList->Seek( nFirstTableCell ); while ( pE ) { 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 } pE = pList->Next(); @@ -554,10 +554,10 @@ void ScHTMLLayoutParser::SetWidths() // #36350# wieso eigentlich kein pE ?!? if ( pE ) { - 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; while ( pE ) { @@ -573,8 +573,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 = sal_False; SCCOL nHere = 0; SCCOL nStop = Min( static_cast(nCol + pE->nColOverlap), nColsPerRow ); for ( ; nCol < nStop; nCol++ ) @@ -585,10 +585,10 @@ void ScHTMLLayoutParser::SetWidths() { if ( bFound ) { - bFound = FALSE; + bFound = sal_False; break; // for } - bFound = TRUE; + bFound = sal_True; nHere = nCol; } } @@ -599,8 +599,8 @@ void ScHTMLLayoutParser::SetWidths() } pE = pList->Next(); } - USHORT nWidths = 0; - USHORT nUnknown = 0; + sal_uInt16 nWidths = 0; + sal_uInt16 nUnknown = 0; for ( nCol = 0; nCol < nColsPerRow; nCol++ ) { if ( pWidths[nCol] ) @@ -610,7 +610,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++ ) @@ -623,7 +623,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 ); @@ -655,7 +655,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; } @@ -690,12 +690,12 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE ) nCol = pE->nCol - nColCntStart; SCCOL nCount = static_cast(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; @@ -707,17 +707,17 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE ) void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo ) { - bInCell = FALSE; + bInCell = sal_False; if ( bTabInTabCell ) { // in TableOff vom Stack geholt - bTabInTabCell = FALSE; + bTabInTabCell = sal_False; if ( pList->GetPos( pActEntry ) == LIST_ENTRY_NOTFOUND ) delete pActEntry; NewActEntry( pList->Last() ); // neuer freifliegender pActEntry 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 ) @@ -742,7 +742,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, sal_True ) ); pList->Insert( pActEntry, LIST_APPEND ); NewActEntry( pActEntry ); // neuer freifliegender pActEntry } @@ -754,9 +754,9 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) static ESelection aDebugSel; static String aDebugStr; static SvFileStream* pDebugStrm = NULL; - static ULONG nDebugStrmPos = 0; - static ULONG nDebugCount = 0; - static ULONG nDebugCountAll = 0; + static sal_uLong nDebugStrmPos = 0; + static sal_uLong nDebugCount = 0; + static sal_uLong nDebugCountAll = 0; static const sal_Char* sDebugState[15] = { "RTFIMP_START", "RTFIMP_END", "RTFIMP_NEXTTOKEN", "RTFIMP_UNKNOWNATTR", @@ -800,7 +800,7 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) SvFileStream& rS = *pDebugStrm; rS.WriteNumber( nDebugCountAll ); rS << ".: "; rS.WriteNumber( nDebugCount ); rS << ". State: "; - rS.WriteNumber( (USHORT) pInfo->eState ); + rS.WriteNumber( (sal_uInt16) pInfo->eState ); rS << ' ' << sDebugState[pInfo->eState] << endl; rS << "SPar,SPos EPar,EPos: "; rS.WriteNumber( aDebugSel.nStartPara ); rS << ','; @@ -865,9 +865,9 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) // If text remains: create paragraph, without calling CloseEntry(). if( bInCell ) // #108269# ...but only in opened table cells. { - bInCell = FALSE; + bInCell = sal_False; NextRow( pInfo ); - bInCell = TRUE; + bInCell = sal_True; } CloseEntry( pInfo ); } @@ -930,11 +930,11 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo ) DBG_ERROR( "Dummbatz-Dok!
oder ohne vorheriges " ); 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() ) @@ -951,7 +951,7 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo ) break; case HTML_O_ALIGN: { - bHorJustifyCenterTH = FALSE; + bHorJustifyCenterTH = sal_False; SvxCellHorJustify eVal; const String& rOptVal = pOption->GetString(); if ( rOptVal.CompareIgnoreCaseToAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) == COMPARE_EQUAL ) @@ -1044,25 +1044,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((nMaxCol - nColCntStart)); + nTableWidth = nLastWidth / static_cast((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() ) @@ -1081,15 +1081,15 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) } } } - bInCell = FALSE; + bInCell = sal_False; if ( bTabInTabCell && !(nTableWidth < nLastWidth) ) { // mehrere Tabellen in einer Zelle, untereinander - bTabInTabCell = FALSE; + bTabInTabCell = sal_False; NextRow( pInfo ); } else { // in dieser Zelle geht's los, oder nebeneinander - bTabInTabCell = FALSE; + bTabInTabCell = sal_False; nColCntStart = nColCnt; nColOffset = nTmpColOffset; nColOffsetStart = nColOffset; @@ -1119,8 +1119,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() ) @@ -1141,7 +1141,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) } } nTable = ++nMaxTable; - bFirstRow = TRUE; + bFirstRow = sal_True; nFirstTableCell = pList->Count(); pLocalColOffset = new ScHTMLColOffset; @@ -1170,7 +1170,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 @@ -1210,8 +1210,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*) nRowsPerRow1 ); else if ( nRowsPerRow1 > nR ) @@ -1224,7 +1224,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*) nR ); @@ -1244,8 +1244,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*) nRowsPerRow2 ); else if ( nRowsPerRow2 > nR ) @@ -1261,10 +1261,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 ) @@ -1292,8 +1292,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) pActEntry = pE; delete pS; } - bTabInTabCell = TRUE; - bInCell = TRUE; + bTabInTabCell = sal_True; + bInCell = sal_True; } else { // einfache Table beendet @@ -1320,8 +1320,8 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) ScHTMLImage* pImage = new ScHTMLImage; pIL->Insert( pImage, LIST_APPEND ); 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() ) @@ -1369,7 +1369,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, @@ -1380,7 +1380,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 ); @@ -1412,15 +1412,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; } @@ -1430,13 +1430,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 { @@ -1446,7 +1446,7 @@ USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption ) return 0; } else - return (USHORT)pOption->GetNumber(); // Pixel + return (sal_uInt16)pOption->GetNumber(); // Pixel } } @@ -1454,8 +1454,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() ) @@ -1470,7 +1470,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 && @@ -1484,8 +1484,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() ) @@ -1511,7 +1511,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 ) @@ -1535,7 +1535,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: @@ -1550,7 +1550,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) break; case HTML_TITLE_ON: { - bInTitle = TRUE; + bInTitle = sal_True; aString.Erase(); } break; @@ -1566,7 +1566,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) uno::UNO_QUERY_THROW); xDPS->getDocumentProperties()->setTitle(aString); } - bInTitle = FALSE; + bInTitle = sal_False; } break; case HTML_TABLE_ON: @@ -1583,7 +1583,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 @@ -1697,7 +1697,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) break; default: { // nLastToken nicht setzen! - bSetLastToken = FALSE; + bSetLastToken = sal_False; } } if ( bSetLastToken ) @@ -2800,7 +2800,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; @@ -2828,7 +2828,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 01eb076f6b3d..9f859168f35a 100644 --- a/sc/source/filter/inc/XclExpChangeTrack.hxx +++ b/sc/source/filter/inc/XclExpChangeTrack.hxx @@ -57,7 +57,7 @@ public: inline const sal_uInt8* GetGUID() const { return aGUID; } - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -93,7 +93,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; }; @@ -106,7 +106,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -119,7 +119,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -132,7 +132,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -145,7 +145,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -158,7 +158,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -168,13 +168,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; }; @@ -189,7 +189,7 @@ private: public: virtual ~XclExpChTr0x0195(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -208,7 +208,7 @@ public: inline XclExpChTr0x0194( const ScChangeTrack& rChangeTrack ); virtual ~XclExpChTr0x0194(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -236,7 +236,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; }; @@ -259,7 +259,7 @@ public: const sal_uInt8* pGUID ); virtual ~XclExpChTrInfo(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -335,7 +335,7 @@ public: void Copy( const XclExpChTrTabIdBuffer& rBuffer ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -479,7 +479,7 @@ public: const XclExpChTrTabIdBuffer& rTabIdBuffer ); virtual ~XclExpChTrCellContent(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; }; @@ -506,7 +506,7 @@ public: ScChangeTrack& rChangeTrack ); virtual ~XclExpChTrInsert(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; }; @@ -528,7 +528,7 @@ public: const XclExpChTrTabIdBuffer& rTabIdBuffer ); virtual ~XclExpChTrInsertTab(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; }; @@ -553,7 +553,7 @@ public: ScChangeTrack& rChangeTrack ); virtual ~XclExpChTrMoveRange(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; }; @@ -569,7 +569,7 @@ public: XclExpChTr0x014A( const XclExpChTrInsert& rAction ); virtual ~XclExpChTr0x014A(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; }; diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx index c850d6681235..0c48cd78b9cd 100644 --- a/sc/source/filter/inc/XclImpChangeTrack.hxx +++ b/sc/source/filter/inc/XclImpChangeTrack.hxx @@ -179,7 +179,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 e888b7dca5fe..35bcc2ef9ddc 100644 --- a/sc/source/filter/inc/decl.h +++ b/sc/source/filter/inc/decl.h @@ -38,7 +38,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 20b2400cf5a2..a94ef5abe715 100644 --- a/sc/source/filter/inc/dif.hxx +++ b/sc/source/filter/inc/dif.hxx @@ -71,42 +71,42 @@ 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] && @@ -115,7 +115,7 @@ inline BOOL DifParser::IsBOT( const sal_Unicode* pRef ) } -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] && @@ -124,7 +124,7 @@ inline BOOL DifParser::IsEOD( const sal_Unicode* pRef ) } -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] && @@ -133,26 +133,26 @@ inline BOOL DifParser::Is1_0( const sal_Unicode* pRef ) } -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; } @@ -170,7 +170,7 @@ private: friend class DifAttrCache; struct ENTRY { - UINT32 nNumFormat; + sal_uInt32 nNumFormat; SCROW nStart; SCROW nEnd; @@ -181,8 +181,8 @@ private: inline DifColumn( void ); ~DifColumn(); void SetLogical( SCROW nRow ); - void SetNumFormat( SCROW nRow, const UINT32 nNumFormat ); - void NewEntry( const SCROW nPos, const UINT32 nNumFormat ); + void SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat ); + void NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat ); void Apply( ScDocument&, const SCCOL nCol, const SCTAB nTab, const ScPatternAttr& ); void Apply( ScDocument &rDoc, const SCCOL nCol, const SCTAB nTab ); public: // geht niemanden etwas an... @@ -201,12 +201,12 @@ class DifAttrCache { private: DifColumn** ppCols; - BOOL bPlain; + sal_Bool bPlain; public: - DifAttrCache( const BOOL bPlain ); + DifAttrCache( const sal_Bool bPlain ); ~DifAttrCache(); inline 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 ); }; diff --git a/sc/source/filter/inc/eeimport.hxx b/sc/source/filter/inc/eeimport.hxx index 634dfd1b4a33..540f0438c2c3 100644 --- a/sc/source/filter/inc/eeimport.hxx +++ b/sc/source/filter/inc/eeimport.hxx @@ -49,7 +49,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* ); @@ -57,9 +57,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 = sal_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 afc8c959392b..d4081bd83588 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -69,28 +69,28 @@ struct ScEEParseEntry ScHTMLImageList* pImageList; // Grafiken in dieser Zelle SCCOL nCol; // relativ zum Beginn des Parse SCROW nRow; - USHORT nTab; // HTML TableInTable - USHORT nTwips; // RTF ColAdjust etc. + sal_uInt16 nTab; // HTML TableInTable + sal_uInt16 nTwips; // RTF ColAdjust etc. SCCOL nColOverlap; // merged cells wenn >1 SCROW nRowOverlap; // merged cells wenn >1 - USHORT nOffset; // HTML PixelOffset - USHORT nWidth; // HTML PixelWidth - BOOL bHasGraphic; // HTML any image loaded - bool bEntirePara; // TRUE = use entire paragraph, false = use selection + sal_uInt16 nOffset; // HTML PixelOffset + sal_uInt16 nWidth; // HTML PixelWidth + sal_Bool bHasGraphic; // HTML any image loaded + bool bEntirePara; // sal_True = use entire paragraph, false = use selection ScEEParseEntry( SfxItemPool* pPool ) : aItemSet( *pPool ), pValStr( NULL ), pNumStr( NULL ), pName( NULL ), pImageList( 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(sal_False), bEntirePara(true) {} ScEEParseEntry( const SfxItemSet& rItemSet ) : aItemSet( rItemSet ), pValStr( NULL ), pNumStr( NULL ), pName( NULL ), pImageList( 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(sal_False), bEntirePara(true) {} ~ScEEParseEntry() { @@ -137,11 +137,11 @@ public: ScEEParser( EditEngine* ); virtual ~ScEEParser(); - virtual ULONG Read( SvStream&, const String& rBaseURL ) = 0; + virtual sal_uLong Read( SvStream&, const String& rBaseURL ) = 0; void GetDimensions( SCCOL& nCols, SCROW& nRows ) const { nCols = nColMax; nRows = nRowMax; } - ULONG Count() const { return pList->Count(); } + sal_uLong Count() const { return pList->Count(); } ScEEParseEntry* First() const { return pList->First(); } ScEEParseEntry* Next() const { return pList->Next(); } Table* GetColWidths() const { return pColWidths; } diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx index 5da6a5d38d83..6cb141fe3d0f 100644 --- a/sc/source/filter/inc/excdoc.hxx +++ b/sc/source/filter/inc/excdoc.hxx @@ -60,9 +60,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 ed771637b704..a3e70c0563a2 100644 --- a/sc/source/filter/inc/excform.hxx +++ b/sc/source/filter/inc/excform.hxx @@ -43,9 +43,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; @@ -53,7 +53,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 ); @@ -66,20 +66,20 @@ public: virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const String& rUrl, const ::std::vector& 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 ); #if 0 - // return = TRUE -> String-Record folgt! - static BOOL SetCurVal( ScFormulaCell& rCell, double& rCurVal ); + // return = sal_True -> String-Record folgt! + static sal_Bool SetCurVal( ScFormulaCell& rCell, double& rCurVal ); #endif 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& ); @@ -93,13 +93,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 ); } @@ -124,12 +124,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 ); @@ -142,13 +142,13 @@ public: virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const String& rUrl, const ::std::vector& 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 7e4cca15dfe1..6fc43e90b96b 100644 --- a/sc/source/filter/inc/excimp8.hxx +++ b/sc/source/filter/inc/excimp8.hxx @@ -73,7 +73,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 ); @@ -94,17 +94,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: @@ -123,12 +123,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 = sal_False ); + void CreateScDBData( const sal_Bool bUseUnNamed ); void EnableRemoveFilter(); }; @@ -138,7 +138,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(); } @@ -158,7 +158,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 bc960f05b3a5..73ee9f45dfc0 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -73,7 +73,7 @@ class ExcRecord : public XclExpRecord public: virtual void Save( XclExpStream& rStrm ); - virtual UINT16 GetNum() const = 0; + virtual sal_uInt16 GetNum() const = 0; virtual sal_Size GetLen() const = 0; protected: @@ -93,7 +93,7 @@ private: protected: public: virtual void Save( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -113,7 +113,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 ); }; @@ -126,13 +126,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 { @@ -140,12 +140,12 @@ private: virtual void SaveCont( XclExpStream& rStrm ); protected: - BOOL bVal; + sal_Bool bVal; - inline ExcBoolRecord() : bVal( FALSE ) {} + inline ExcBoolRecord() : bVal( sal_False ) {} public: - inline ExcBoolRecord( const BOOL bDefault ) : bVal( bDefault ) {} + inline ExcBoolRecord( const sal_Bool bDefault ) : bVal( bDefault ) {} virtual sal_Size GetLen( void ) const; }; @@ -157,10 +157,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 ); }; @@ -176,7 +176,7 @@ private: public: ExcBof( void ); - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual sal_Size GetLen( void ) const; }; @@ -191,7 +191,7 @@ private: public: ExcBofW( void ); - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual sal_Size GetLen( void ) const; }; @@ -202,7 +202,7 @@ class ExcEof : public ExcRecord { private: public: - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual sal_Size GetLen( void ) const; }; @@ -213,11 +213,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 @@ -256,11 +256,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; }; @@ -268,11 +268,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; }; @@ -282,7 +282,7 @@ class Exc1904 : public ExcBoolRecord { public: Exc1904( ScDocument& rDoc ); - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual void SaveXml( XclExpXmlStream& rStrm ); }; @@ -295,7 +295,7 @@ class ExcBundlesheetBase : public ExcRecord protected: sal_Size nStrPos; sal_Size nOwnPos; // Position NACH # und Len - UINT16 nGrbit; + sal_uInt16 nGrbit; SCTAB nTab; ExcBundlesheetBase(); @@ -306,7 +306,7 @@ public: inline void SetStreamPos( sal_Size nNewStrPos ) { nStrPos = nNewStrPos; } void UpdateStreamPos( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; }; @@ -329,11 +329,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; }; @@ -395,8 +395,8 @@ private: class ExcFilterCondition { private: - UINT8 nType; - UINT8 nOper; + sal_uInt8 nType; + sal_uInt8 nOper; double fVal; XclExpString* pText; @@ -405,11 +405,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 ); @@ -421,25 +421,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 = sal_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 ); }; @@ -461,7 +461,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 125f74e9fa54..1caa82f926c5 100644 --- a/sc/source/filter/inc/excscen.hxx +++ b/sc/source/filter/inc/excscen.hxx @@ -45,10 +45,10 @@ 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 ); + ExcScenarioCell( const sal_uInt16 nC, const sal_uInt16 nR ); void SetValue( const String& rVal ); inline const String& GetValue( void ) const; }; @@ -64,11 +64,11 @@ protected: String* pName; String* pComment; String* pUserName; - UINT8 nProtected; + sal_uInt8 nProtected; - const UINT16 nTab; + const sal_uInt16 nTab; - void Apply( const XclImpRoot& rRoot, const BOOL bLast = FALSE ); + void Apply( const XclImpRoot& rRoot, const sal_Bool bLast = sal_False ); public: ExcScenario( XclImpStream& rIn, const RootData& rRoot ); virtual ~ExcScenario(); @@ -80,7 +80,7 @@ public: class ExcScenarioList : protected List { private: - UINT16 nLastScenario; + sal_uInt16 nLastScenario; inline ExcScenario* _First( void ) { return ( ExcScenario* ) List::First(); } inline ExcScenario* _Next( void ) { return ( ExcScenario* ) List::Next(); } inline ExcScenario* _Last( void ) { return ( ExcScenario* ) List::Last(); } @@ -92,7 +92,7 @@ public: inline void Append( ExcScenario* pNew ); - inline void SetLast( const UINT16 nIndex4Last ); + inline void SetLast( const sal_uInt16 nIndex4Last ); inline const ExcScenario* First( void ); inline const ExcScenario* Next( void ); @@ -137,7 +137,7 @@ inline const ExcScenario* ExcScenarioList::Next( void ) } -inline void ExcScenarioList::SetLast( const UINT16 n ) +inline void ExcScenarioList::SetLast( const sal_uInt16 n ) { nLastScenario = n; } diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx index 79fff8675d84..a818c0912ca0 100644 --- a/sc/source/filter/inc/exp_op.hxx +++ b/sc/source/filter/inc/exp_op.hxx @@ -63,7 +63,7 @@ public: class ExportWK1 : public ExportTyp { private: - BYTE GenFormByte( const ScPatternAttr& ); + sal_uInt8 GenFormByte( const ScPatternAttr& ); void Bof(); void Eof(); void Calcmode(); @@ -73,10 +73,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(); @@ -84,14 +84,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 3744bf497927..25f70ecfce33 100644 --- a/sc/source/filter/inc/expbase.hxx +++ b/sc/source/filter/inc/expbase.hxx @@ -59,19 +59,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/formel.hxx b/sc/source/filter/inc/formel.hxx index 6c7d4288c372..5bc88d488e78 100644 --- a/sc/source/filter/inc/formel.hxx +++ b/sc/source/filter/inc/formel.hxx @@ -84,7 +84,7 @@ public: inline void Append( const ScComplexRefData& rCRD ); using List::Count; - inline BOOL HasRanges( void ) const; + inline sal_Bool HasRanges( void ) const; inline const ScRange* First( void ); inline const ScRange* Next( void ); @@ -103,7 +103,7 @@ inline void _ScRangeList::Append( ScRange* p ) } -inline BOOL _ScRangeList::HasRanges( void ) const +inline sal_Bool _ScRangeList::HasRanges( void ) const { return Count() > 0; } @@ -143,27 +143,27 @@ class _ScRangeListTabs { private: protected: - BOOL bHasRanges; + sal_Bool bHasRanges; _ScRangeList** ppTabLists; _ScRangeList* pAct; - UINT16 nAct; + sal_uInt16 nAct; public: _ScRangeListTabs( void ); virtual ~_ScRangeListTabs(); - void Append( ScSingleRefData aSRD, const BOOL bLimit = TRUE ); - void Append( ScComplexRefData aCRD, const BOOL bLimit = TRUE ); + void Append( ScSingleRefData aSRD, const sal_Bool bLimit = sal_True ); + void Append( ScComplexRefData aCRD, const sal_Bool bLimit = sal_True ); - inline BOOL HasRanges( void ) const; + inline sal_Bool HasRanges( void ) const; - const ScRange* First( const UINT16 nTab = 0 ); + const ScRange* First( const sal_uInt16 nTab = 0 ); const ScRange* Next( void ); // const ScRange* NextContinue( void ); inline const _ScRangeList* GetActList( void ) const; }; -inline BOOL _ScRangeListTabs::HasRanges( void ) const +inline sal_Bool _ScRangeListTabs::HasRanges( void ) const { return bHasRanges; } @@ -185,9 +185,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(); @@ -204,7 +204,7 @@ public: class ExcelConverterBase : public ConverterBase { protected: - ExcelConverterBase( UINT16 nNewBuffer ); + ExcelConverterBase( sal_uInt16 nNewBuffer ); virtual ~ExcelConverterBase(); public: @@ -223,25 +223,25 @@ 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: -//UNUSED2008-05 void Reset( INT32 nLen ); -//UNUSED2008-05 void Reset( INT32 nLen, const ScAddress& rEingPos ); +//UNUSED2008-05 void Reset( sal_Int32 nLen ); +//UNUSED2008-05 void Reset( sal_Int32 nLen, const ScAddress& rEingPos ); 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: @@ -261,19 +261,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; @@ -285,7 +285,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 f399d7ea5064..5b005c5fbcf9 100644 --- a/sc/source/filter/inc/fprogressbar.hxx +++ b/sc/source/filter/inc/fprogressbar.hxx @@ -114,7 +114,7 @@ class ScfProgressBar : ScfNoCopy { 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. @@ -199,7 +199,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 ); } @@ -221,7 +221,7 @@ class ScfStreamProgressBar { public: //UNUSED2008-05 explicit ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, const String& rText ); - 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 c17aaa70445c..2860290cc169 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -312,11 +312,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, @@ -327,7 +327,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, @@ -420,7 +420,7 @@ typedef ::std::vector< String > ScfStringVec; template< typename Type > class ScfDelList { public: - inline explicit ScfDelList( USHORT nInitSize = 16, USHORT nResize = 16 ) : + inline explicit ScfDelList( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 ) : maList( nInitSize, nResize ) {} /** Creates a deep copy of the passed list (copy-constructs all contained objects). */ inline explicit ScfDelList( const ScfDelList& rSrc ) { *this = rSrc; } @@ -429,23 +429,23 @@ public: /** Creates a deep copy of the passed list (copy-constructs all contained objects). */ ScfDelList& operator=( const ScfDelList& rSrc ); - inline void Insert( Type* pObj, ULONG nIndex ) { if( pObj ) maList.Insert( pObj, nIndex ); } + inline void Insert( Type* pObj, sal_uLong nIndex ) { if( pObj ) maList.Insert( pObj, nIndex ); } inline void Append( Type* pObj ) { if( pObj ) maList.Insert( pObj, LIST_APPEND ); } /** Removes the object without deletion. */ - inline Type* Remove( ULONG nIndex ) { return static_cast< Type* >( maList.Remove( nIndex ) ); } + inline Type* Remove( sal_uLong nIndex ) { return static_cast< Type* >( maList.Remove( nIndex ) ); } /** Removes and deletes the object. */ - inline void Delete( ULONG nIndex ) { delete Remove( nIndex ); } + inline void Delete( sal_uLong nIndex ) { delete Remove( nIndex ); } /** Exchanges the contained object with the passed, returns the old. */ - inline Type* Exchange( Type* pObj, ULONG nIndex ) { return static_cast< Type* >( maList.Replace( pObj, nIndex ) ); } + inline Type* Exchange( Type* pObj, sal_uLong nIndex ) { return static_cast< Type* >( maList.Replace( pObj, nIndex ) ); } /** Replaces (deletes) the contained object. */ - inline void Replace( Type* pObj, ULONG nIndex ) { delete Exchange( pObj, nIndex ); } + inline void Replace( Type* pObj, sal_uLong nIndex ) { delete Exchange( pObj, nIndex ); } void Clear(); - inline ULONG Count() const { return maList.Count(); } + inline sal_uLong Count() const { return maList.Count(); } inline bool Empty() const { return maList.Count() == 0; } inline Type* GetCurObject() const { return static_cast< Type* >( maList.GetCurObject() ); } - inline ULONG GetCurPos() const { return maList.GetCurPos(); } + inline sal_uLong GetCurPos() const { return maList.GetCurPos(); } inline Type* GetObject( sal_uInt32 nIndex ) const { return static_cast< Type* >( maList.GetObject( nIndex ) ); } inline Type* First() const { return static_cast< Type* >( maList.First() ); } @@ -487,7 +487,7 @@ template< typename Type > class ScfDelStack : private ScfDelList< Type > { public: - inline ScfDelStack( USHORT nInitSize = 16, USHORT nResize = 16 ) : + inline ScfDelStack( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 ) : ScfDelList< Type >( nInitSize, nResize ) {} inline void Push( Type* pObj ) { Append( pObj ); } @@ -515,14 +515,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 = sal_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 @@ -531,10 +531,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 4cdf71b8610d..8f9e153fed51 100644 --- a/sc/source/filter/inc/htmlexp.hxx +++ b/sc/source/filter/inc/htmlexp.hxx @@ -51,10 +51,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) {} @@ -77,13 +77,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( sal_False ) {} }; DECLARE_LIST( ScHTMLGraphList, ScHTMLGraphEntry* ) @@ -94,11 +94,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 __FAR_DATA sIndentSource[]; ScHTMLGraphList aGraphList; @@ -114,13 +114,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 ); @@ -132,16 +132,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 = sal_False ); + sal_Bool HasCId() { return aCId.Len() > 0; } void MakeCIdURL( String& rURL ); void PrepareGraphics( ScDrawLayer*, SCTAB nTab, @@ -154,18 +154,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 0376b3cd72f5..68a7faab444d 100644 --- a/sc/source/filter/inc/htmlimp.hxx +++ b/sc/source/filter/inc/htmlimp.hxx @@ -38,11 +38,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 = sal_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 f053a1088ff1..6d200c6e3bdf 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -41,8 +41,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 @@ -61,7 +61,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; @@ -70,30 +70,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 ), @@ -138,23 +138,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* ); @@ -162,24 +162,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* ); @@ -195,7 +195,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; }; @@ -587,7 +587,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 2df58173a63a..046c338c042d 100644 --- a/sc/source/filter/inc/imp_op.hxx +++ b/sc/source/filter/inc/imp_op.hxx @@ -110,12 +110,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 @@ -182,12 +182,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 7015136f1be1..4105b40cce60 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -46,24 +46,24 @@ class LotAttrTable; struct LotAttrWK3 { - UINT8 nFont; - UINT8 nLineStyle; - UINT8 nFontCol; - UINT8 nBack; + sal_uInt8 nFont; + sal_uInt8 nLineStyle; + sal_uInt8 nFontCol; + sal_uInt8 nBack; - inline BOOL HasStyles( void ); - inline BOOL IsCentered( void ); + inline sal_Bool HasStyles( void ); + inline sal_Bool IsCentered( void ); }; -inline BOOL LotAttrWK3::HasStyles( void ) +inline sal_Bool LotAttrWK3::HasStyles( void ) { return ( nFont || nLineStyle || nFontCol || ( nBack & 0x7F ) ); // !! ohne Center-Bit!! } -inline BOOL LotAttrWK3::IsCentered( void ) +inline sal_Bool LotAttrWK3::IsCentered( void ) { return ( nBack & 0x80 ); } @@ -77,7 +77,7 @@ private: struct ENTRY { ScPatternAttr* pPattAttr; - UINT32 nHash0; + sal_uInt32 nHash0; inline ENTRY( const ScPatternAttr& r ) { pPattAttr = new ScPatternAttr( r ); } @@ -85,9 +85,9 @@ private: inline ~ENTRY() { delete pPattAttr; } - inline BOOL operator ==( const ENTRY& r ) const { return nHash0 == r.nHash0; } + inline sal_Bool operator ==( const ENTRY& r ) const { return nHash0 == r.nHash0; } - inline BOOL operator ==( const UINT32& r ) const { return nHash0 == r; } + inline sal_Bool operator ==( const sal_uInt32& r ) const { return nHash0 == r; } }; ScDocumentPool* pDocPool; @@ -96,16 +96,16 @@ private: SvxColorItem* pWhite; Color* pColTab; - 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; - ( ( UINT8* ) &rOut )[ 2 ] = rAttr.nFontCol; - ( ( UINT8* ) &rOut )[ 3 ] = rAttr.nBack; + ( ( sal_uInt8* ) &rOut )[ 0 ] = rAttr.nFont & 0x7F; + ( ( sal_uInt8* ) &rOut )[ 1 ] = rAttr.nLineStyle; + ( ( sal_uInt8* ) &rOut )[ 2 ] = rAttr.nFontCol; + ( ( sal_uInt8* ) &rOut )[ 3 ] = rAttr.nBack; } - static void LotusToScBorderLine( UINT8 nLine, SvxBorderLine& ); - const SvxColorItem& GetColorItem( const UINT8 nLotIndex ) const; - const Color& GetColor( const UINT8 nLotIndex ) const; + static void LotusToScBorderLine( sal_uInt8 nLine, SvxBorderLine& ); + const SvxColorItem& GetColorItem( const sal_uInt8 nLotIndex ) const; + const Color& GetColor( const sal_uInt8 nLotIndex ) const; public: LotAttrCache( void ); ~LotAttrCache(); @@ -127,7 +127,7 @@ private: public: ~LotAttrCol( void ); 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 = sal_True ); void Clear( void ); }; diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx index 5c8771814206..10bf93023344 100644 --- a/sc/source/filter/inc/lotfntbf.hxx +++ b/sc/source/filter/inc/lotfntbf.hxx @@ -48,7 +48,7 @@ private: SvxFontItem* pFont; SvxFontHeightItem* pHeight; SvxColorItem* pColor; - INT32 nType; // < 0 -> undefiniert + sal_Int32 nType; // < 0 -> undefiniert inline ENTRY( void ) { pTmpName = NULL; @@ -93,17 +93,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 0a341e29ae51..1521cb66377b 100644 --- a/sc/source/filter/inc/lotform.hxx +++ b/sc/source/filter/inc/lotform.hxx @@ -78,18 +78,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 '()+1' fortgeschrieben und mit @@ -99,8 +99,8 @@ private: void NegToken( TokenId& rParam ); // ACHTUNG: wie ~, nur wird '-()' 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 ); @@ -111,7 +111,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 ); @@ -123,7 +123,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 15c0a2931dc4..37257cfdaa77 100644 --- a/sc/source/filter/inc/lotimpop.hxx +++ b/sc/source/filter/inc/lotimpop.hxx @@ -47,45 +47,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 ); @@ -99,10 +99,10 @@ public: inline void ImportLotus::Read( ScAddress& rAddr ) { - UINT16 nRow; + sal_uInt16 nRow; *pIn >> nRow; rAddr.SetRow( static_cast(nRow) ); - BYTE nByte; + sal_uInt8 nByte; *pIn >> nByte; rAddr.SetTab( static_cast(nByte) ); *pIn >> nByte; @@ -123,25 +123,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; } @@ -159,7 +159,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 ab9acf9f476e..7ddde41490d4 100644 --- a/sc/source/filter/inc/lotrange.hxx +++ b/sc/source/filter/inc/lotrange.hxx @@ -35,14 +35,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; @@ -56,9 +56,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; }; @@ -84,7 +84,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 && @@ -92,7 +92,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 || @@ -100,7 +100,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 ); } @@ -119,9 +119,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 c8182e8c0c17..4e7e9239db07 100644 --- a/sc/source/filter/inc/namebuff.hxx +++ b/sc/source/filter/inc/namebuff.hxx @@ -50,16 +50,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; }; @@ -95,7 +95,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 ); } @@ -105,16 +105,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 ); //#94039# 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 ); }; @@ -131,13 +131,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; @@ -153,15 +153,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; } @@ -175,7 +175,7 @@ class ShrfmlaBuffer : public ExcRoot { size_t operator() (const ScAddress &addr) const; }; - typedef std::hash_map ShrfmlaHash; + typedef std::hash_map ShrfmlaHash; typedef std::list ShrfmlaList; ShrfmlaHash index_hash; @@ -187,7 +187,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& ); }; @@ -203,9 +203,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 ), @@ -217,14 +217,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 ); }; @@ -236,27 +236,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( sal_False ); + pSRD->SetRowRel( sal_False ); + pSRD->SetTabRel( sal_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( sal_False ); + pSRD->SetRowRel( sal_False ); + pSRD->SetTabRel( sal_False ); Add( rName, aCRD ); } @@ -271,26 +271,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 = sal_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 = sal_False; } }; public: @@ -298,11 +298,11 @@ public: virtual ~ExtSheetBuffer(); sal_Int16 Add( const String& rFilePathAndName, - const String& rTabName, const BOOL bSameWorkbook = FALSE ); + const String& rTabName, const sal_Bool bSameWorkbook = sal_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 ); }; @@ -318,13 +318,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; }; @@ -336,7 +336,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 2548bdfa34c3..aea7e847344f 100644 --- a/sc/source/filter/inc/op.h +++ b/sc/source/filter/inc/op.h @@ -33,38 +33,38 @@ // 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 ); -//UNUSED2009-05 void OP_Text( SvStream &aStream, USHORT nLaenge ); // WK3 -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 ); +//UNUSED2009-05 void OP_Text( SvStream &aStream, sal_uInt16 nLaenge ); // WK3 +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 d70eb1f29bb0..8f038d7f75d9 100644 --- a/sc/source/filter/inc/optab.h +++ b/sc/source/filter/inc/optab.h @@ -28,7 +28,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/otlnbuff.hxx b/sc/source/filter/inc/otlnbuff.hxx index 6ccca361345b..b6addd85bf99 100644 --- a/sc/source/filter/inc/otlnbuff.hxx +++ b/sc/source/filter/inc/otlnbuff.hxx @@ -36,39 +36,39 @@ class XclImpOutlineBuffer { // -> exctools.cxx private: - BYTE* pLevel; - BOOL* pOuted; - BOOL* pHidden; + sal_uInt8* pLevel; + sal_Bool* pOuted; + sal_Bool* pHidden; SCSIZE nSize; SCSIZE nLast; - BYTE nMaxLevel; + sal_uInt8 nMaxLevel; ScOutlineArray* pOutlineArray; - BOOL bButtonNormal; // TRUE -> right / under + sal_Bool bButtonNormal; // sal_True -> right / under public: XclImpOutlineBuffer( SCSIZE nNewSize ); ~XclImpOutlineBuffer(); - void SetLevel( SCSIZE nIndex, BYTE nVal, BOOL bOuted, BOOL bHidden ); + void SetLevel( SCSIZE nIndex, sal_uInt8 nVal, sal_Bool bOuted, sal_Bool bHidden ); void SetOutlineArray( ScOutlineArray* pOArray ); void Reset( void ); void MakeScOutline( void ); - void SetLevelRange( SCSIZE nF, SCSIZE nL, BYTE nVal, - BOOL bOuted, BOOL bHidden ); + void SetLevelRange( SCSIZE nF, SCSIZE nL, sal_uInt8 nVal, + sal_Bool bOuted, sal_Bool bHidden ); - inline BOOL HasOutline( void ) const; + inline sal_Bool HasOutline( void ) const; - inline void SetButtonMode( const BOOL bRightOrUnder ); + inline void SetButtonMode( const sal_Bool bRightOrUnder ); }; -inline BOOL XclImpOutlineBuffer::HasOutline( void ) const +inline sal_Bool XclImpOutlineBuffer::HasOutline( void ) const { return nMaxLevel > 0; } -inline void XclImpOutlineBuffer::SetButtonMode( const BOOL b ) +inline void XclImpOutlineBuffer::SetButtonMode( const sal_Bool b ) { bButtonNormal = b; } diff --git a/sc/source/filter/inc/rtfexp.hxx b/sc/source/filter/inc/rtfexp.hxx index 4733d243d1a5..44c2d5fa43c3 100644 --- a/sc/source/filter/inc/rtfexp.hxx +++ b/sc/source/filter/inc/rtfexp.hxx @@ -33,7 +33,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 ); @@ -44,7 +44,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 135e11e572ae..e896cd754a34 100644 --- a/sc/source/filter/inc/rtfparse.hxx +++ b/sc/source/filter/inc/rtfparse.hxx @@ -36,7 +36,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 ) : @@ -45,8 +45,8 @@ struct ScRTFCellDefault DECLARE_LIST( ScRTFDefaultList, ScRTFCellDefault* ) // Remove: (const unsigned short &) not sufficiently different from (unsigned short) -// deswegen ULONG, typedef bringt's auch nicht :-( -SV_DECL_VARARR_SORT( ScRTFColTwips, ULONG, 16, 4) +// deswegen sal_uLong, typedef bringt's auch nicht :-( +SV_DECL_VARARR_SORT( ScRTFColTwips, sal_uLong, 16, 4) #else // SC_RTFPARSE_CXX @@ -67,22 +67,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 995de274b28b..ea9f11504551 100644 --- a/sc/source/filter/inc/scflt.hxx +++ b/sc/source/filter/inc/scflt.hxx @@ -187,37 +187,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; @@ -226,51 +226,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; }; @@ -280,15 +280,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; }; @@ -298,31 +298,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; @@ -332,23 +332,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]; }; @@ -390,29 +390,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) {} @@ -421,18 +421,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 @@ -442,50 +442,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]; }; @@ -504,29 +504,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]; @@ -537,9 +537,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 ) : @@ -560,11 +560,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; }; @@ -596,11 +596,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; }; @@ -613,14 +613,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) : @@ -649,11 +649,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; }; @@ -679,12 +679,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; }; @@ -705,8 +705,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; @@ -729,8 +729,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; @@ -739,7 +739,7 @@ public: Sc10Import( SvStream& rStr, ScDocument* pDocument ); ~Sc10Import(); - ULONG Import(); + sal_uLong Import(); void LoadFileHeader(); void LoadFileInfo(); void LoadEditStateInfo(); @@ -756,7 +756,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 4ed1784f4354..7749d67de1b8 100644 --- a/sc/source/filter/inc/scfobj.hxx +++ b/sc/source/filter/inc/scfobj.hxx @@ -37,7 +37,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 03e30c1e9fc6..2bda5a2b8e8f 100644 --- a/sc/source/filter/inc/scmem.h +++ b/sc/source/filter/inc/scmem.h @@ -30,7 +30,7 @@ #include -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 06a37639be89..cf4a4a065076 100644 --- a/sc/source/filter/inc/tokstack.hxx +++ b/sc/source/filter/inc/tokstack.hxx @@ -36,26 +36,26 @@ #include 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; } }; @@ -92,25 +92,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 { @@ -120,8 +120,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 { @@ -129,12 +129,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 @@ -162,15 +162,15 @@ class TokenPool }; ::std::vector 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(); @@ -195,11 +195,11 @@ class TokenPool inline void operator >>( TokenStack& rStack ); inline const TokenId Store( void ); const TokenId Store( const double& rDouble ); -//UNUSED2008-05 const TokenId StoreError( USHORT nError ); +//UNUSED2008-05 const TokenId StoreError( sal_uInt16 nError ); // 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 ); @@ -216,7 +216,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; //UNUSED2008-05 const String* GetString( const TokenId& nId ) const; ScMatrix* GetMatrix( unsigned int n ) const; @@ -231,10 +231,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 ); @@ -304,14 +304,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; @@ -320,13 +320,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; @@ -338,7 +338,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; @@ -361,7 +361,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 ); } @@ -382,7 +382,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; @@ -393,7 +393,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 93cc074d89f6..e12a2fbd043f 100644 --- a/sc/source/filter/inc/tool.h +++ b/sc/source/filter/inc/tool.h @@ -32,22 +32,22 @@ #include // 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 @@ -65,24 +65,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 ); } @@ -97,7 +97,7 @@ public: return pAttr; } - void SetStamp( BYTE nFormat, BYTE nSt ) + void SetStamp( sal_uInt8 nFormat, sal_uInt8 nSt ) { nStamp = MAKE_STAMP( nFormat, nSt ); } @@ -113,27 +113,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 @@ -153,7 +153,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 a76a93321557..dd046389b1c4 100644 --- a/sc/source/filter/inc/xcl97dum.hxx +++ b/sc/source/filter/inc/xcl97dum.hxx @@ -35,55 +35,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 fde03337cc0f..92225db4bcb9 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -103,7 +103,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 @@ -141,7 +141,7 @@ private: XclEscherHostAppData* pCurrAppData; XclEscherClientData* pTheClientData; // always the same XclEscherClientTextbox* pAdditionalText; - USHORT nAdditionalText; + sal_uInt16 nAdditionalText; sal_uInt32 mnNextKey; bool mbIsRootDff; }; @@ -151,13 +151,13 @@ private: class XclEscherHostAppData : public EscherExHostAppData { private: - BOOL bStackedGroup; + sal_Bool bStackedGroup; public: - XclEscherHostAppData() : bStackedGroup( FALSE ) + XclEscherHostAppData() : bStackedGroup( sal_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 8afbe946d2f7..5d346624526a 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -48,7 +48,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; } @@ -77,9 +77,9 @@ protected: XclExpMsoDrawing* pClientTextbox; XclTxo* pTxo; sal_uInt16 mnObjType; - UINT16 nObjId; - UINT16 nGrbit; - BOOL bFirstOnSheet; + sal_uInt16 nObjId; + sal_uInt16 nGrbit; + sal_Bool bFirstOnSheet; bool mbOwnEscher; /// true = Escher part created on the fly. @@ -99,19 +99,19 @@ public: inline sal_uInt16 GetObjType() const { return mnObjType; } - inline void SetId( UINT16 nId ) { nObjId = nId; } + inline void SetId( sal_uInt16 nId ) { nObjId = nId; } - 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. @@ -156,13 +156,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(); }; @@ -183,7 +183,7 @@ public: virtual void Save( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; private: @@ -236,15 +236,15 @@ public: 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; }; @@ -294,7 +294,7 @@ public: class XclObproj : public ExcRecord { public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -309,7 +309,7 @@ private: public: XclCodename( const String& ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -322,13 +322,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(); } @@ -348,12 +348,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 ); @@ -362,7 +362,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 ); @@ -373,7 +373,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(); } @@ -391,7 +391,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; }; @@ -417,13 +417,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 ); @@ -435,13 +435,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 ); @@ -459,7 +459,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 ); diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx index 50c9466d2801..3708bb2c20d4 100644 --- a/sc/source/filter/inc/xecontent.hxx +++ b/sc/source/filter/inc/xecontent.hxx @@ -244,11 +244,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 ); @@ -275,7 +275,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. }; // ---------------------------------------------------------------------------- @@ -288,7 +288,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 ); @@ -296,7 +296,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 f0740735ea28..58bc0e982584 100644 --- a/sc/source/filter/inc/xename.hxx +++ b/sc/source/filter/inc/xename.hxx @@ -49,9 +49,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 ); //UNUSED2009-05 /** Inserts a new built-in defined name. */ //UNUSED2009-05 sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab ); diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx index a191cd9b1c20..d451c7367f5b 100644 --- a/sc/source/filter/inc/xerecord.hxx +++ b/sc/source/filter/inc/xerecord.hxx @@ -257,7 +257,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/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index fd7303509688..5ad896bd0d1a 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -275,10 +275,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 ) {} }; @@ -294,12 +294,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 ); @@ -321,7 +321,7 @@ private: SvNumberFormatterPtr mxFormatter; /// Special number formatter for conversion. XclExpNumFmtVec maFormatMap; /// Maps core formats to Excel indexes. NfKeywordTablePtr 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. }; @@ -477,7 +477,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. */ @@ -498,7 +498,7 @@ public: @descr Searches for cell XFs only. */ bool Equals( const ScPatternAttr& rPattern, - ULONG nScForceNumFmt, + sal_uLong nScForceNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const; @@ -527,7 +527,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 @@ -543,7 +543,7 @@ private: void Init( const SfxItemSet& rItemSet, sal_Int16 nScript, - ULONG nForceScNumFmt, + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle ); @@ -667,7 +667,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. */ @@ -700,7 +700,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; @@ -711,7 +711,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/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index 0167d160f297..aa5979ac5e68 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -973,7 +973,7 @@ public: protected: /** Returns a color from the Excel color palette. */ - virtual FASTBOOL GetColorFromPalette( USHORT nIndex, Color& rColor ) const; + virtual FASTBOOL GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const; }; // ---------------------------------------------------------------------------- @@ -1034,7 +1034,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 @@ -1045,7 +1045,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 05412c306c0c..6b638762502d 100644 --- a/sc/source/filter/inc/xihelper.hxx +++ b/sc/source/filter/inc/xihelper.hxx @@ -328,7 +328,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/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx index 104002542a17..923063a727ef 100644 --- a/sc/source/filter/inc/xistyle.hxx +++ b/sc/source/filter/inc/xistyle.hxx @@ -225,7 +225,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. @@ -239,11 +239,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. @@ -413,7 +413,7 @@ public: SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2, SCTAB nScTab, - ULONG nForceScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND ); + sal_uLong nForceScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND ); private: void ReadXF2( XclImpStream& rStrm ); @@ -595,13 +595,13 @@ private: void Find( XclImpXFRange*& rpPrevRange, XclImpXFRange*& rpNextRange, - ULONG& rnNextIndex, + sal_uLong& rnNextIndex, SCROW nScRow ) const; /** 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 ); private: ScfDelList< XclImpXFRange > maIndexList; /// The list of XF index range. @@ -660,7 +660,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 ScfRef< XclImpXFRangeColumn > XclImpXFRangeColumnRef; diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx index 83bab2acd24a..974265d00985 100644 --- a/sc/source/filter/inc/xlformula.hxx +++ b/sc/source/filter/inc/xlformula.hxx @@ -111,8 +111,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/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx index ad48c05a93f4..61218f51307c 100644 --- a/sc/source/filter/inc/xlpivot.hxx +++ b/sc/source/filter/inc/xlpivot.hxx @@ -633,7 +633,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/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 604b53a1f8ff..abbcc921cc64 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -464,7 +464,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; @@ -487,7 +487,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 efe20a583104..f97bf1f68259 100644 --- a/sc/source/filter/inc/xltools.hxx +++ b/sc/source/filter/inc/xltools.hxx @@ -119,9 +119,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 ); @@ -148,10 +148,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 c0c9d4b3d6e1..98661ca41331 100644 --- a/sc/source/filter/inc/xlview.hxx +++ b/sc/source/filter/inc/xlview.hxx @@ -152,7 +152,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 : sal_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 7ecc9127b49d..9b21fc8be8fc 100644 --- a/sc/source/filter/lotus/expop.cxx +++ b/sc/source/filter/lotus/expop.cxx @@ -41,10 +41,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; } @@ -52,41 +52,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; } @@ -94,13 +94,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(nEndCol); - USHORT nRow = static_cast(nEndRow); + sal_uInt16 nCol = static_cast(nEndCol); + sal_uInt16 nRow = static_cast(nEndRow); DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Dimensions(): Col > WK1MAXCOL" ); DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Dimensions(): Row > WK1MAXROW" ); aOut << nCol << nRow; // Ending Col/Row @@ -109,57 +109,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(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" ); @@ -167,7 +167,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(); @@ -175,24 +175,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 ) @@ -200,72 +200,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" ); @@ -274,37 +274,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 ]; @@ -317,7 +317,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 @@ -326,7 +326,7 @@ inline void ExportWK1::Hidcol() inline void ExportWK1::Cpi() { // (0x96) - //aOut << ( USHORT ) 0x96 << ( USHORT ) x; + //aOut << ( sal_uInt16 ) 0x96 << ( sal_uInt16 ) x; } @@ -354,7 +354,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; @@ -369,8 +369,8 @@ FltError ExportWK1::Write() #if SC_ROWLIMIT_MORE_THAN_64K #error row limit 64k #endif - nCol = static_cast(nScCol); - nRow = static_cast(nScRow); + nCol = static_cast(nScCol); + nRow = static_cast(nScRow); switch( pCell->GetCellType() ) { @@ -398,7 +398,7 @@ FltError ExportWK1::Write() case CELLTYPE_NONE: break; default: - DBG_ASSERT( FALSE, "ExportWK1::Write(): unbekannter Celltype!" ); + DBG_ASSERT( sal_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 3a6e39b7d818..802cdd627189 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -53,7 +53,7 @@ #include "op.h" // Konstanten ------------------------------------------------------------ -const UINT16 nBOF = 0x0000; +const sal_uInt16 nBOF = 0x0000; @@ -61,8 +61,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; @@ -87,7 +87,7 @@ extern long nDateiLaenge; // -> datei.cpp, ...der gerade offenen Datei LOTUS_ROOT* pLotusRoot = NULL; -std::map aLotusPatternPool; +std::map aLotusPatternPool; static FltError generate_Opcodes( SvStream& aStream, ScDocument& rDoc, @@ -118,12 +118,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; @@ -167,7 +167,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; @@ -224,7 +224,7 @@ FltError ScImportLotus123old( SvStream& aStream, ScDocument* pDocument, CharSet // Zeiger auf Dokument global machen pDoc = pDocument; - bEOF = FALSE; + bEOF = sal_False; eCharVon = eSrc; diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index 6a05585cf326..809ac336a371 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -48,9 +48,9 @@ -void LotAttrCache::LotusToScBorderLine( UINT8 nLine, SvxBorderLine& aBL ) +void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, SvxBorderLine& aBL ) { - static const UINT16 pPara[ 4 ][ 3 ] = + static const sal_uInt16 pPara[ 4 ][ 3 ] = { { 0,0,0 }, { DEF_LINE_WIDTH_1, 0, 0 }, @@ -69,7 +69,7 @@ void LotAttrCache::LotusToScBorderLine( UINT8 nLine, SvxBorderLine& aBL ) } -const SvxColorItem& LotAttrCache::GetColorItem( const UINT8 nLotIndex ) const +const SvxColorItem& LotAttrCache::GetColorItem( const sal_uInt8 nLotIndex ) const { DBG_ASSERT( nLotIndex > 0 && nLotIndex < 7, "-LotAttrCache::GetColorItem(): so nicht!" ); @@ -78,7 +78,7 @@ const SvxColorItem& LotAttrCache::GetColorItem( const UINT8 nLotIndex ) const } -const Color& LotAttrCache::GetColor( const UINT8 nLotIndex ) const +const Color& LotAttrCache::GetColor( const sal_uInt8 nLotIndex ) const { // Farbe <-> Index passt fuer Background, nicht aber fuer Fonts (0 <-> 7)! DBG_ASSERT( nLotIndex < 8, "*LotAttrCache::GetColor(): Index > 7!" ); @@ -122,7 +122,7 @@ LotAttrCache::~LotAttrCache() pAkt = ( ENTRY* ) List::Next(); } - for( UINT16 nCnt = 0 ; nCnt < 6 ; nCnt++ ) + for( sal_uInt16 nCnt = 0 ; nCnt < 6 ; nCnt++ ) delete ppColorItems[ nCnt ]; delete pBlack; @@ -134,7 +134,7 @@ LotAttrCache::~LotAttrCache() const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) { - UINT32 nRefHash; + sal_uInt32 nRefHash; ENTRY* pAkt = ( ENTRY* ) List::First(); MakeHash( rAttr, nRefHash ); @@ -156,7 +156,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 ); @@ -178,7 +178,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 @@ -188,7 +188,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 ) ); @@ -239,7 +239,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; ENTRY* pAkt = ( ENTRY* ) List::First(); diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index e39891568e33..ecb7eece8b2d 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -45,21 +45,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 = sal_False; + sal_Bool bNeg = sal_False; DBG_ASSERT( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" ); @@ -88,7 +88,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; @@ -165,10 +165,10 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString ) if( nAnz > 0 ) { - INT16 nNull = -1; // gibt einen auszulassenden Parameter an + sal_Int16 nNull = -1; // gibt einen auszulassenden Parameter an // 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! @@ -222,12 +222,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 @@ -237,14 +237,14 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD } else { - rSRD.SetColRel( FALSE ); + rSRD.SetColRel( sal_False ); rSRD.nCol = static_cast< SCsCOL >( nCol & 0x00FF ); } // Row-Bemachung if( nRow & 0x8000 ) { - rSRD.SetRowRel( TRUE ); + rSRD.SetRowRel( sal_True ); // vorzeichenrichtige Erweiterung switch( eTyp ) { @@ -271,7 +271,7 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD } else { - rSRD.SetRowRel( FALSE ); + rSRD.SetRowRel( sal_False ); switch( eTyp ) { // 5432 1098 7654 3210 @@ -301,16 +301,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 ); @@ -364,27 +364,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 = sal_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; @@ -418,10 +418,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( sal_False ); } aCRD.Ref2 = rR; @@ -479,7 +479,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, break; case FT_Variable: { - UINT16 nCol, nRow; + sal_uInt16 nCol, nRow; Read( nCol ); Read( nRow ); @@ -495,7 +495,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; @@ -503,7 +503,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 ); @@ -523,7 +523,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; @@ -535,7 +535,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 ); } @@ -633,7 +633,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 ); @@ -641,7 +641,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, } else { - INT16 nVal; + sal_Int16 nVal; Read( nVal ); aStack << aPool.Store( SnumToDouble( nVal ) ); } @@ -665,7 +665,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 @@ -930,7 +930,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 @@ -1196,7 +1196,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 @@ -1461,7 +1461,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 @@ -1729,7 +1729,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 33b3c8e30b97..75ac3bedb585 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -54,7 +54,7 @@ static vos:: OMutex aLotImpSemaphore; ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) : ImportTyp( pDoc, eQ ), pIn( &aStream ), - aConv( *pIn, eQ, FALSE ) + aConv( *pIn, eQ, sal_False ) { // good point to start locking of import lotus aLotImpSemaphore.acquire(); @@ -91,8 +91,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 ); @@ -117,9 +117,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 ); @@ -128,12 +128,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 ); @@ -145,14 +145,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 (nCol), static_cast (nLTab), ( UINT16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); + pD->SetColWidth( static_cast (nCol), static_cast (nLTab), ( sal_uInt16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); nCnt--; } @@ -160,12 +160,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 ); @@ -174,7 +174,7 @@ void ImportLotus::Hiddencolumn( UINT16 nRecLen ) { Skip( 2 ); - BYTE nCol; + sal_uInt8 nCol; while( nCnt ) { @@ -189,7 +189,7 @@ void ImportLotus::Hiddencolumn( UINT16 nRecLen ) void ImportLotus::Userrange( void ) { - UINT16 nRangeType; + sal_uInt16 nRangeType; ScRange aScRange; sal_Char* pBuffer = new sal_Char[ 32 ]; @@ -212,7 +212,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 ); } @@ -222,7 +222,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 ); } @@ -238,7 +238,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 ); } @@ -251,24 +251,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!" ); @@ -280,7 +280,7 @@ ScFormulaCell *ImportLotus::Formulacell( UINT16 n ) n -= 14; const ScTokenArray* pErg; - INT32 nRest = n; + sal_Int32 nRest = n; aConv.Reset( aAddr ); aConv.SetWK3(); @@ -290,7 +290,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; } @@ -302,13 +302,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 ); @@ -339,7 +339,7 @@ void ImportLotus::RowPresentation( UINT16 nRecLen ) void ImportLotus::NamedSheet( void ) { - UINT16 nLTab; + sal_uInt16 nLTab; String aName; Read( nLTab ); @@ -354,7 +354,7 @@ void ImportLotus::NamedSheet( void ) void ImportLotus::Font_Face( void ) { - BYTE nNum; + sal_uInt8 nNum; String aName; Read( nNum ); @@ -372,9 +372,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++ ) { @@ -386,9 +386,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++ ) { @@ -398,18 +398,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 = sal_False; SCCOL nCenterStart = 0, nCenterEnd = 0; Read( nRow ); @@ -445,7 +445,7 @@ void ImportLotus::_Row( const UINT16 nRecLen ) } else {// ganz neue Center - bCenter = TRUE; + bCenter = sal_True; nCenterStart = nColCnt; } nCenterEnd = nColCnt + static_cast(nRepeats); @@ -455,7 +455,7 @@ void ImportLotus::_Row( const UINT16 nRecLen ) if( bCenter ) {// evtl. alte Center bemachen pD->DoMerge( static_cast (nExtTab), nCenterStart, static_cast (nRow), nCenterEnd, static_cast (nRow) ); - bCenter = FALSE; + bCenter = sal_False; } } diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index 917337fa91d5..4e98ab610378 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -56,10 +56,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; @@ -245,10 +245,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; @@ -264,7 +264,7 @@ FltError ImportLotus::Read( SvStream& rIn ) *pIn >> nOp >> nRecLen; if( pIn->IsEof() ) - bRead = FALSE; + bRead = sal_False; else { nNextRec += nRecLen + 4; @@ -274,13 +274,13 @@ FltError ImportLotus::Read( SvStream& rIn ) case 0x0000: // BOF if( nRecLen != 26 || !BofFm3() ) { - bRead = FALSE; + bRead = sal_False; eRet = eERR_FORMAT; } break; case 0x0001: // EOF - bRead = FALSE; + bRead = sal_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 a1a428c5dbeb..1d48e9b4e63e 100644 --- a/sc/source/filter/lotus/lotus.cxx +++ b/sc/source/filter/lotus/lotus.cxx @@ -45,7 +45,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(); @@ -86,7 +86,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 1ac1fa5c470f..c2a288819da0 100644 --- a/sc/source/filter/lotus/memory.cxx +++ b/sc/source/filter/lotus/memory.cxx @@ -53,8 +53,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 @@ -70,8 +70,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() @@ -79,7 +79,7 @@ extern ScProtectionAttr* pAttrUnprot; // -> tool.cxx, fuer PutFormString() -BOOL MemNew( void ) +sal_Bool MemNew( void ) { pPuffer = new sal_Char [ 32L*1024L ]; @@ -98,20 +98,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 058898d16547..62a171137d14 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -80,57 +80,57 @@ 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 aLotusPatternPool; +extern std::map 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 (nCol), static_cast (nRow), nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( static_cast (nCol), static_cast (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); // 0 Stellen nach'm Komma! SetFormat( static_cast (nCol), static_cast (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; @@ -138,16 +138,16 @@ void OP_Number( SvStream& r, UINT16 /*n*/ ) fValue = ::rtl::math::round( fValue, 15 ); ScValueCell* pZelle = new ScValueCell( fValue ); - pDoc->PutCell( static_cast (nCol), static_cast (nRow), nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( static_cast (nCol), static_cast (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); SetFormat( static_cast (nCol), static_cast (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; @@ -168,10 +168,10 @@ void OP_Label( SvStream& r, UINT16 n ) } -//UNUSED2009-05 void OP_Text( SvStream& r, UINT16 n ) // WK3 +//UNUSED2009-05 void OP_Text( SvStream& r, sal_uInt16 n ) // WK3 //UNUSED2009-05 { -//UNUSED2009-05 UINT16 nRow; -//UNUSED2009-05 BYTE nCol, nTab; +//UNUSED2009-05 sal_uInt16 nRow; +//UNUSED2009-05 sal_uInt8 nCol, nTab; //UNUSED2009-05 sal_Char pText[ 256 ]; //UNUSED2009-05 //UNUSED2009-05 r >> nRow >> nTab >> nCol; @@ -184,10 +184,10 @@ void OP_Label( SvStream& r, UINT16 n ) //UNUSED2009-05 } -void OP_Formula( SvStream& r, UINT16 /*n*/ ) +void OP_Formula( SvStream& r, sal_uInt16 /*n*/ ) { - BYTE nFormat; - UINT16 nCol, nRow, nFormulaSize; + sal_uInt8 nFormat; + sal_uInt16 nCol, nRow, nFormulaSize; SCTAB nTab = 0; r >> nFormat >> nCol >> nRow; @@ -195,10 +195,10 @@ void OP_Formula( SvStream& r, UINT16 /*n*/ ) r >> nFormulaSize; const ScTokenArray* pErg; - INT32 nBytesLeft = nFormulaSize; + sal_Int32 nBytesLeft = nFormulaSize; ScAddress aAddress( static_cast (nCol), static_cast (nRow), nTab ); - LotusToSc aConv( r, pLotusRoot->eCharsetQ, FALSE ); + LotusToSc aConv( r, pLotusRoot->eCharsetQ, sal_False ); aConv.Reset( aAddress ); aConv.Convert( pErg, nBytesLeft ); @@ -206,24 +206,24 @@ void OP_Formula( SvStream& r, UINT16 /*n*/ ) pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pDoc->PutCell( static_cast (nCol), static_cast (nRow), nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( static_cast (nCol), static_cast (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); // nFormat = Standard -> Nachkommastellen wie Float SetFormat( static_cast (nCol), static_cast (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(nCol), static_cast(nCol), 0, true); @@ -234,10 +234,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 ); @@ -267,11 +267,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_uInt16 nColSt, nRowSt, nColEnd, nRowEnd; + sal_uInt8 nType; sal_Char* pName; sal_Char cPuffer[ 32 ]; @@ -303,29 +303,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 ... @@ -344,7 +344,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 @@ -356,7 +356,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++ ) @@ -364,30 +364,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 (nCol), static_cast (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; @@ -400,32 +400,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(nCol), static_cast(nRow), static_cast(nTab), pCell, (BOOL) TRUE ); + pDoc->PutCell( static_cast(nCol), static_cast(nRow), static_cast(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 ); @@ -433,25 +433,25 @@ void OP_Formula123( SvStream& r, UINT16 n ) pCell->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pDoc->PutCell( static_cast(nCol), static_cast(nRow), static_cast(nTab), pCell, (BOOL) TRUE ); + pDoc->PutCell( static_cast(nCol), static_cast(nRow), static_cast(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(nCol), static_cast(nRow), static_cast(nTab), pCell, (BOOL) TRUE ); + pDoc->PutCell( static_cast(nCol), static_cast(nRow), static_cast(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; @@ -466,7 +466,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. @@ -499,7 +499,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. @@ -528,9 +528,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(); @@ -542,8 +542,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); @@ -570,13 +570,13 @@ void OP_CreatePattern123( SvStream& r, UINT16 n) r >> Ver_Align; OP_VerAlign123( Ver_Align, rItemSet ); - aLotusPatternPool.insert( std::map::value_type( nPatternId, aPattern ) ); + aLotusPatternPool.insert( std::map::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) { @@ -594,7 +594,7 @@ void OP_SheetName123( SvStream& rStream, USHORT nLength ) ::std::vector 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; @@ -610,8 +610,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 { @@ -662,7 +662,7 @@ void OP_ApplyPatternArea123( SvStream& rStream ) rStream.SeekRel( nLength - 2 ); for( int i = 0; i < nTabCount; i++) { - std::map::iterator loc = aLotusPatternPool.find( nData ); + std::map::iterator loc = aLotusPatternPool.find( nData ); // #126338# 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 0e99b1140c2a..4891447624b6 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -60,10 +60,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; @@ -121,14 +121,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 ) ) ); @@ -146,7 +146,7 @@ void InitPage( void ) } -double SnumToDouble( INT16 nVal ) +double SnumToDouble( sal_Int16 nVal ) { const double pFacts[ 8 ] = { 5000.0, @@ -163,15 +163,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; @@ -191,36 +191,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 ] = sal_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 = sal_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; @@ -237,49 +237,49 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, sal_False, sal_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, sal_False, sal_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, sal_False, sal_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, sal_False, sal_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, sal_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, sal_False, sal_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, sal_False, sal_False, nL, 1 ); nIndex1 = 0; break; case 0x07: // Spezialformat @@ -290,14 +290,14 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, TRUE, nSt, 1 ); + eLanguage, sal_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, sal_False, sal_False, nSt, 1 ); break; case 0x02: // Datum: Tag, Monat, Jahr //fDate;dfDayMonthYearLong; @@ -320,7 +320,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; @@ -334,33 +334,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; @@ -369,7 +369,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, sal_False, sal_False, nL, 1 ); nIndex1 = 0; break; } @@ -386,7 +386,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 ); } @@ -400,10 +400,10 @@ void LotusRange::MakeHash( void ) // ******** nColE // **************** nRowS // **************** nRowE - nHash = static_cast(nColStart); - nHash += static_cast(nColEnd) << 6; - nHash += static_cast(nRowStart) << 12; - nHash += static_cast(nRowEnd ) << 16; + nHash = static_cast(nColStart); + nHash += static_cast(nColEnd) << 6; + nHash += static_cast(nRowStart) << 12; + nHash += static_cast(nRowEnd ) << 16; } @@ -445,17 +445,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( sal_False ); + pSingRef->SetRowRel( sal_False ); + pSingRef->SetTabRel( sal_True ); + pSingRef->SetFlag3D( sal_False ); pSingRef = &aComplRef.Ref2; pSingRef->nTab = pSingRef->nRelTab = 0; - pSingRef->SetColRel( FALSE ); - pSingRef->SetRowRel( FALSE ); - pSingRef->SetTabRel( TRUE ); - pSingRef->SetFlag3D( FALSE ); + pSingRef->SetColRel( sal_False ); + pSingRef->SetRowRel( sal_False ); + pSingRef->SetTabRel( sal_True ); + pSingRef->SetFlag3D( sal_False ); } @@ -559,12 +559,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 = sal_False; } ScRangeData* pData = new ScRangeData( pLotusRoot->pDoc, aScName, *pScTokenArray ); @@ -577,7 +577,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 ); @@ -588,16 +588,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 sal_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! @@ -616,18 +616,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( sal_False ); + pRef->SetRowRel( sal_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( sal_False ); + pRef->SetRowRel( sal_False ); + pRef->SetTabRel( sal_True ); pScTokenArray->AddDoubleReference( pFind->aScComplexRefDataRel ); } @@ -640,12 +640,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 sal_False; } diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index 084aab135f70..9a01e1af7e02 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -68,7 +68,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; @@ -88,7 +88,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; @@ -98,7 +98,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; @@ -117,7 +117,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; @@ -145,7 +145,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) sal_uInt16 nVersion; sal_uInt16 i = 1, j = 1; SCTAB nTab = 0; - SetEof( FALSE ); + SetEof( sal_False ); if( !recordsLeft() ) return eERR_OPEN; @@ -168,7 +168,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, sal_False, sal_False); else pDoc->InsertTab( nTab, aName ); } @@ -178,7 +178,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 9cb4a2d7b245..913abb27510e 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -39,44 +39,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( sal_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( sal_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( sal_False ); } if (rSRD.nTab != aEingPos.Tab()) - rSRD.SetFlag3D( TRUE); + rSRD.SetFlag3D( sal_True); } QProToSc::QProToSc( SvStream& rStream, const ScAddress& rRefPos ) : @@ -89,15 +89,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 = sal_False; + sal_Bool bNeg = sal_False; if( eOc == ocNoName ) { - bAddIn = TRUE; + bAddIn = sal_True; if( pExtString ) { ByteString s; @@ -150,8 +150,8 @@ void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtStr if( nArgs> 0 ) { - INT16 nNull = -1; - INT16 nLast = nArgs- 1; + sal_Int16 nNull = -1; + sal_Int16 nLast = nArgs- 1; if( eOc == ocZGZ ) aPool << eParam[ 2 ] << ocSep << eParam[ 1 ] << ocSep << eParam[ 0 ]; @@ -325,7 +325,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( sal_False); aStack << aPool.Store( aCRD ); break; diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 6213cbb4ebf2..aaa27f46f3f7 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -137,13 +137,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, bIsStrikeThrough; + sal_Bool bIsBold, bIsItalic, bIsUnderLine, bIsStrikeThrough; bIsBold = ( nTmpFnt & 0x0001 ) != 0; bIsItalic = ( nTmpFnt & 0x0002 ) != 0; @@ -158,7 +158,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 7fb3d16c6c8d..58c0fac79a78 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -83,8 +83,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( sal_False ); + mpEngine->EnableUndo( sal_False ); } @@ -97,9 +97,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; @@ -126,11 +126,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->Count() ); - ULONG nProgress = 0; + sal_uLong nProgress = 0; SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; @@ -145,7 +145,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu nOverlapRowMax = 0; nMergeColAdd = 0; nLastMergedRow = SCROW_MAX; - BOOL bHasGraphics = FALSE; + sal_Bool bHasGraphics = sal_False; ScEEParseEntry* pE; if (!pFormatter) pFormatter = mpDoc->GetFormatTable(); @@ -190,28 +190,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 = sal_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 = sal_False; } } } if ( bSimple ) { // Feldbefehle enthalten? - SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE ); + SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, sal_False ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) - bSimple = FALSE; + bSimple = sal_False; } // HTML @@ -241,43 +241,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, sal_False, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_BORDER, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_BORDER, sal_False, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_SHADOW, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_SHADOW, sal_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, sal_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, sal_False, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_LINEBREAK, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_LINEBREAK, sal_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, sal_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, sal_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, sal_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, sal_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, sal_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, sal_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 i=0; i<3; ++i ) + for ( sal_uInt8 i=0; i<3; ++i ) { if ( nScriptType & nScripts[i] ) { @@ -324,7 +324,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) @@ -393,7 +393,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu bHasGraphics |= GraphicSize( nCol, nRow, nTab, pE ); if ( pE->pName ) { // Anchor Name => RangeName - USHORT nIndex; + sal_uInt16 nIndex; if ( !pRangeNames->SearchName( *pE->pName, nIndex ) ) { ScRangeData* pData = new ScRangeData( mpDoc, *pE->pName, @@ -414,7 +414,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 ); @@ -428,13 +428,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, sal_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 ); } @@ -458,13 +458,13 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu } -BOOL ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, +sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE ) { ScHTMLImageList* pIL = pE->pImageList; if ( !pIL || !pIL->Count() ) - return FALSE; - BOOL bHasGraphics = FALSE; + return sal_False; + sal_Bool bHasGraphics = sal_False; OutputDevice* pDefaultDev = Application::GetDefaultDevice(); long nWidth, nHeight; nWidth = nHeight = 0; @@ -472,7 +472,7 @@ BOOL ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, for ( ScHTMLImage* pI = pIL->First(); pI; pI = pIL->Next() ) { 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 cd3f30ef9c9f..edff03ff7bd4 100644 --- a/sc/source/filter/rtf/expbase.cxx +++ b/sc/source/filter/rtf/expbase.cxx @@ -63,16 +63,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 { SCCOL nLastCol; @@ -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 c817fc2844eb..74b07b4bccc9 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -68,7 +68,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 ] ) { } @@ -79,7 +79,7 @@ ScRTFExport::~ScRTFExport() } -ULONG ScRTFExport::Write() +sal_uLong ScRTFExport::Write() { rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF; rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << sNewLine; @@ -106,10 +106,10 @@ ULONG ScRTFExport::Write() // hier kaeme die colortbl // stylesheet - UINT32 nFontHeight = + sal_uInt32 nFontHeight = ((const SvxFontHeightItem&)(rSetPara.Get( ATTR_FONT_HEIGHT ))).GetHeight(); rStrm << '{' << OOO_STRING_SVTOOLS_RTF_STYLESHEET - << '{' << OOO_STRING_SVTOOLS_RTF_FS << String( UINT32(nFontHeight / TWIPS_PER_POINT) ).GetStr() + << '{' << OOO_STRING_SVTOOLS_RTF_FS << String( sal_uInt32(nFontHeight / TWIPS_PER_POINT) ).GetStr() << ' ' << pStyleSheet->GetName().GetStr() << ";}" << '}' << sNewLine; */ @@ -133,7 +133,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++ ) @@ -191,7 +191,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 ); @@ -218,18 +218,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 = sal_False; break; // nix case CELLTYPE_EDIT : { - bValueData = FALSE; + bValueData = sal_False; EditEngine& rEngine = GetEditEngine(); const EditTextObject* pObj; ((const ScEditCell*)pCell)->GetData( pObj ); @@ -243,17 +243,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 = sal_False; - BOOL bResetPar, bResetAttr; - bResetPar = bResetAttr = FALSE; + sal_Bool bResetPar, bResetAttr; + bResetPar = bResetAttr = sal_False; const SvxHorJustifyItem& rHorJustifyItem = (const SvxHorJustifyItem&)pAttr->GetItem( ATTR_HOR_JUSTIFY ); const SvxWeightItem& rWeightItem = (const SvxWeightItem&) pAttr->GetItem( ATTR_FONT_WEIGHT ); @@ -278,17 +278,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 b3373bbf4596..6452f7f9b8b7 100644 --- a/sc/source/filter/rtf/rtfparse.cxx +++ b/sc/source/filter/rtf/rtfparse.cxx @@ -52,7 +52,7 @@ -SV_IMPL_VARARR_SORT( ScRTFColTwips, ULONG ); +SV_IMPL_VARARR_SORT( ScRTFColTwips, sal_uLong ); @@ -62,9 +62,9 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) : pColTwips( new ScRTFColTwips ), pActDefault( NULL ), pDefMerge( NULL ), - nStartAdjust( (ULONG)~0 ), + nStartAdjust( (sal_uLong)~0 ), nLastWidth(0), - bNewDef( FALSE ) + bNewDef( sal_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 ) { ScEEParseEntry* pE = pList->Last(); @@ -127,33 +127,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(nPos); if ( bFound ) - return TRUE; - USHORT nCount = pColTwips->Count(); + return sal_True; + sal_uInt16 nCount = pColTwips->Count(); if ( !nCount ) - return FALSE; + return sal_False; SCCOL nCol = *pCol; // nCol ist Einfuegeposition, da liegt der Naechsthoehere (oder auch nicht) if ( nCol < static_cast(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 sal_False; } void ScRTFParser::ColAdjust() { - if ( nStartAdjust != (ULONG)~0 ) + if ( nStartAdjust != (sal_uLong)~0 ) { SCCOL nCol = 0; ScEEParseEntry* pE; @@ -176,8 +176,8 @@ void ScRTFParser::ColAdjust() nColMax = nCol; pE = pList->Next(); } - nStartAdjust = (ULONG)~0; - pColTwips->Remove( (USHORT)0, pColTwips->Count() ); + nStartAdjust = (sal_uLong)~0; + pColTwips->Remove( (sal_uInt16)0, pColTwips->Count() ); } } @@ -233,7 +233,7 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ ) if ( bNewDef ) { ScRTFCellDefault* pD; - bNewDef = FALSE; + bNewDef = sal_False; // rechts nicht buendig? => neue Tabelle if ( nLastWidth && ((pD = pDefaultList->Last()) != 0) && pD->nTwips != nLastWidth ) @@ -321,7 +321,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->Insert( pInsDefault, LIST_APPEND ); @@ -360,7 +360,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 = pList->Count(); pList->Insert( pActEntry, LIST_APPEND ); NewActEntry( pActEntry ); // neuer freifliegender pActEntry @@ -404,11 +404,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 c9bf2a90a7a5..a7d0150ee220 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -126,7 +126,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]); } @@ -295,7 +295,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++) @@ -366,7 +366,7 @@ double lcl_PascalToDouble(sal_Char* tp6) } -void lcl_ChangeColor( USHORT nIndex, Color& rColor ) +void lcl_ChangeColor( sal_uInt16 nIndex, Color& rColor ) { ColorData aCol; @@ -393,7 +393,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( " " ); @@ -412,7 +412,7 @@ Sc10FontData::Sc10FontData(SvStream& rStream) rStream >> Height; rStream >> CharSet; rStream >> PitchAndFamily; - USHORT nLen; + sal_uInt16 nLen; rStream >> nLen; rStream.Read(FaceName, nLen); } @@ -422,13 +422,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(); @@ -449,7 +449,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; @@ -465,13 +465,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(); @@ -513,13 +513,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(); @@ -579,14 +579,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(); @@ -673,9 +673,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; iaPageFormat == rData) return i; @@ -685,15 +685,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 ), @@ -707,7 +707,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) EditEngine aEditEngine( pDoc->GetEnginePool() ); EditTextObject* pEmptyObject = aEditEngine.CreateTextObject(); - for (USHORT i=0; iaPageFormat; @@ -730,7 +730,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; @@ -805,11 +805,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 = sal_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; @@ -823,14 +823,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) @@ -851,10 +851,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); @@ -884,9 +884,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, sal_False )); + aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, sal_True )); pSet->Put( SvxSetItem( nHeadFoot ? ATTR_PAGE_FOOTERSET : ATTR_PAGE_HEADERSET, aSetItemItemSet ) ); @@ -944,7 +944,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 ) ) ); @@ -994,7 +994,7 @@ Sc10Import::~Sc10Import() } -ULONG Sc10Import::Import() +sal_uLong Sc10Import::Import() { pPrgrsBar = new ScfStreamProgressBar( rStream, pDoc->GetDocumentShell() ); @@ -1095,10 +1095,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 ); } @@ -1142,7 +1142,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( new ScRangeData( pDoc, @@ -1156,7 +1156,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 ); @@ -1207,10 +1207,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 ) { @@ -1239,13 +1239,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 ) ); + sal_Int16 Margin = Max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) ); // if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) || // ( ( OJustify & ojBottomTop ) == ojBottomTop ) ) // vielleicht so? @@ -1260,14 +1260,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; @@ -1294,10 +1294,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 ); @@ -1327,8 +1327,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 ); @@ -1340,12 +1340,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 = sal_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; @@ -1365,19 +1365,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 @@ -1388,7 +1388,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 ), @@ -1397,8 +1397,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 ); } } @@ -1408,31 +1408,31 @@ 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 //rStream.Read(&PageFormat, sizeof(PageFormat)); lcl_ReadPageFormat(rStream, PageFormat); - USHORT nAt = aPageCollection.InsertFormat(PageFormat); + sal_uInt16 nAt = aPageCollection.InsertFormat(PageFormat); String aPageName = lcl_MakeOldPageStyleFormatName( nAt ); pPrgrsBar->Progress(); @@ -1449,7 +1449,7 @@ void Sc10Import::LoadTables() rStream >> TabNo; - BYTE nLen; + sal_uInt8 nLen; rStream >> nLen; rStream.Read(TabName, sizeof(TabName) - 1); TabName[nLen] = 0; @@ -1457,7 +1457,7 @@ void Sc10Import::LoadTables() //---------------------------------------------------------- rStream >> Display; - if ( Tab == (INT16)nShowTab ) + if ( Tab == (sal_Int16)nShowTab ) { ScVObjMode eObjMode = VOBJ_MODE_SHOW; @@ -1465,10 +1465,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 @@ -1487,13 +1487,13 @@ void Sc10Import::LoadTables() /* wofuer wird das benoetigt? Da in SC 1.0 die Anzeigeflags pro Tabelle gelten und nicht pro View Dieses Flag in die ViewOptions eintragen bei Gelegenheit, Sollte der Stephan Olk machen - USHORT nDisplayMask = 0xFFFF; - USHORT nDisplayValue = 0; + sal_uInt16 nDisplayMask = 0xFFFF; + sal_uInt16 nDisplayValue = 0; if (Tab == 0) nDisplayValue = Display; else { - USHORT nDiff = Display ^ nDisplayValue; + sal_uInt16 nDiff = Display ^ nDisplayValue; nDisplayMask &= ~nDiff; } */ @@ -1504,13 +1504,13 @@ void Sc10Import::LoadTables() if (nError != 0) return; if (TabNo == 0) - pDoc->RenameTab(static_cast (TabNo), SC10TOSTRING( TabName ), FALSE); + pDoc->RenameTab(static_cast (TabNo), SC10TOSTRING( TabName ), sal_False); else pDoc->InsertTab(SC_TAB_APPEND, SC10TOSTRING( TabName ) ); pDoc->SetPageStyle( static_cast(Tab), aPageName ); - if (Visible == 0) pDoc->SetVisible(static_cast (TabNo), FALSE); + if (Visible == 0) pDoc->SetVisible(static_cast (TabNo), sal_False); // ColWidth rStream >> ID; @@ -1638,13 +1638,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; @@ -1656,7 +1656,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) case ctValue : { const SfxPoolItem* pValueFormat = pDoc->GetAttr(Col, static_cast (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)); @@ -1671,7 +1671,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); @@ -1683,7 +1683,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.Read(&Value, sizeof(Value)); rStream >> Len; @@ -1692,7 +1692,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) s[Len + 1] = 0; ScFormulaCell* pCell = new ScFormulaCell( pDoc, ScAddress( Col, static_cast (Row), Tab ) ); pCell->SetHybridFormula( SC10TOSTRING( s ),formula::FormulaGrammar::GRAM_NATIVE ); - pDoc->PutCell( Col, static_cast (Row), Tab, pCell, (BOOL)TRUE ); + pDoc->PutCell( Col, static_cast (Row), Tab, pCell, (sal_Bool)sal_True ); break; } case ctNote : @@ -1701,7 +1701,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) nError = errUnknownFormat; break; } - USHORT NoteLen; + sal_uInt16 NoteLen; rStream >> NoteLen; if (NoteLen != 0) { @@ -1747,9 +1747,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) @@ -1844,10 +1844,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) { @@ -1876,13 +1876,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 @@ -1892,15 +1892,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } // Umrandung - BOOL bEnd = FALSE; - USHORT nColorIndex = 0; - USHORT nFrameIndex = 0; + sal_Bool bEnd = sal_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; @@ -1908,15 +1908,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; @@ -1942,12 +1942,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(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 ); @@ -2018,20 +2018,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 = sal_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 ); @@ -2047,12 +2047,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 = sal_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; @@ -2116,12 +2116,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; @@ -2135,10 +2135,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nEnd = static_cast(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); @@ -2155,7 +2155,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nEnd = static_cast(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) { @@ -2189,7 +2189,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; @@ -2202,7 +2202,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) @@ -2347,7 +2347,7 @@ 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) @@ -2371,17 +2371,17 @@ void Sc10Import::LoadObjects() //----------------------------------- #endif - 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 = sal_False; // Achtung dies ist nur ein Notnagel + for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++) { rStream >> ObjectType; //rStream.Read(&GraphHeader, sizeof(GraphHeader)); @@ -2437,7 +2437,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 c0f575313459..137f545eee7d 100644 --- a/sc/source/filter/starcalc/scfobj.cxx +++ b/sc/source/filter/starcalc/scfobj.cxx @@ -59,7 +59,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 42cb37250c5c..db6a491c44ef 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -103,7 +103,7 @@ void XclExpUserBView::SaveCont( XclExpStream& rStrm ) rStrm << sUsername; } -UINT16 XclExpUserBView::GetNum() const +sal_uInt16 XclExpUserBView::GetNum() const { return 0x01A9; } @@ -120,7 +120,7 @@ XclExpUserBViewList::XclExpUserBViewList( const ScChangeTrack& rChangeTrack ) sal_uInt8 aGUID[ 16 ]; sal_Bool bValidGUID = sal_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 ); @@ -167,7 +167,7 @@ void XclExpUsersViewBegin::SaveCont( XclExpStream& rStrm ) << (sal_Int16) -1; } -UINT16 XclExpUsersViewBegin::GetNum() const +sal_uInt16 XclExpUsersViewBegin::GetNum() const { return 0x01AA; } @@ -184,7 +184,7 @@ void XclExpUsersViewEnd::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0001; } -UINT16 XclExpUsersViewEnd::GetNum() const +sal_uInt16 XclExpUsersViewEnd::GetNum() const { return 0x01AB; } @@ -201,7 +201,7 @@ void XclExpChTr0x0191::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0191::GetNum() const +sal_uInt16 XclExpChTr0x0191::GetNum() const { return 0x0191; } @@ -219,7 +219,7 @@ void XclExpChTr0x0198::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0198::GetNum() const +sal_uInt16 XclExpChTr0x0198::GetNum() const { return 0x0198; } @@ -237,7 +237,7 @@ void XclExpChTr0x0192::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 510 ); } -UINT16 XclExpChTr0x0192::GetNum() const +sal_uInt16 XclExpChTr0x0192::GetNum() const { return 0x0192; } @@ -254,7 +254,7 @@ void XclExpChTr0x0197::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0197::GetNum() const +sal_uInt16 XclExpChTr0x0197::GetNum() const { return 0x0197; } @@ -270,7 +270,7 @@ XclExpChTrEmpty::~XclExpChTrEmpty() { } -UINT16 XclExpChTrEmpty::GetNum() const +sal_uInt16 XclExpChTrEmpty::GetNum() const { return nRecNum; } @@ -291,7 +291,7 @@ void XclExpChTr0x0195::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 162 ); } -UINT16 XclExpChTr0x0195::GetNum() const +sal_uInt16 XclExpChTr0x0195::GetNum() const { return 0x0195; } @@ -315,7 +315,7 @@ void XclExpChTr0x0194::SaveCont( XclExpStream& rStrm ) lcl_WriteFixedString( rStrm, sUsername, 147 ); } -UINT16 XclExpChTr0x0194::GetNum() const +sal_uInt16 XclExpChTr0x0194::GetNum() const { return 0x0194; } @@ -344,7 +344,7 @@ void XclExpChTrHeader::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x001E; } -UINT16 XclExpChTrHeader::GetNum() const +sal_uInt16 XclExpChTrHeader::GetNum() const { return 0x0196; } @@ -374,7 +374,7 @@ void XclExpChTrInfo::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x0002; } -UINT16 XclExpChTrInfo::GetNum() const +sal_uInt16 XclExpChTrInfo::GetNum() const { return 0x0138; } @@ -497,7 +497,7 @@ void XclExpChTrTabId::SaveCont( XclExpStream& rStrm ) rStrm << nIndex; } -UINT16 XclExpChTrTabId::GetNum() const +sal_uInt16 XclExpChTrTabId::GetNum() const { return 0x013D; } @@ -813,7 +813,7 @@ void XclExpChTrCellContent::SaveActionData( XclExpStream& rStrm ) const pNewData->Write( rStrm, rIdBuffer ); } -UINT16 XclExpChTrCellContent::GetNum() const +sal_uInt16 XclExpChTrCellContent::GetNum() const { return 0x013B; } @@ -891,7 +891,7 @@ void XclExpChTrInsert::CompleteSaveAction( XclExpStream& rStrm ) const XclExpChTrEmpty( 0x0151 ).Save( rStrm ); } -UINT16 XclExpChTrInsert::GetNum() const +sal_uInt16 XclExpChTrInsert::GetNum() const { return 0x0137; } @@ -928,7 +928,7 @@ void XclExpChTrInsertTab::SaveActionData( XclExpStream& rStrm ) const rStrm.WriteZeroBytes( 133 ); } -UINT16 XclExpChTrInsertTab::GetNum() const +sal_uInt16 XclExpChTrInsertTab::GetNum() const { return 0x014D; } @@ -984,7 +984,7 @@ void XclExpChTrMoveRange::CompleteSaveAction( XclExpStream& rStrm ) const XclExpChTrEmpty( 0x014F ).Save( rStrm ); } -UINT16 XclExpChTrMoveRange::GetNum() const +sal_uInt16 XclExpChTrMoveRange::GetNum() const { return 0x0140; } @@ -1015,7 +1015,7 @@ void XclExpChTr0x014A::SaveActionData( XclExpStream& rStrm ) const Write2DRange( rStrm, aRange ); } -UINT16 XclExpChTr0x014A::GetNum() const +sal_uInt16 XclExpChTr0x014A::GetNum() const { return 0x014A; } diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index 96a301e1bef5..0de711b888e5 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -63,7 +63,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 ); @@ -72,7 +72,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea pChangeTrack = new ScChangeTrack( GetDocPtr() ); sOldUsername = pChangeTrack->GetUser(); - pChangeTrack->SetUseFixDateTime( TRUE ); + pChangeTrack->SetUseFixDateTime( sal_True ); ReadRecords(); } @@ -114,7 +114,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 ); } @@ -207,7 +207,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 ); } @@ -294,7 +294,7 @@ void XclImpChangeTrack::ReadChTrInsert() else aRange.aEnd.SetCol( MAXCOL ); - BOOL bValid = pStrm->IsValid(); + sal_Bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -396,7 +396,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(); @@ -475,13 +475,13 @@ void XclImpChangeTrack::Apply() if( pChangeTrack ) { pChangeTrack->SetUser( sOldUsername ); - pChangeTrack->SetUseFixDateTime( FALSE ); + pChangeTrack->SetUseFixDateTime( sal_False ); GetDoc().SetChangeTrack( pChangeTrack ); pChangeTrack = NULL; ScChangeViewSettings aSettings; - aSettings.SetShowChanges( TRUE ); + aSettings.SetShowChanges( sal_True ); GetDoc().SetChangeViewSettings( aSettings ); } } @@ -494,7 +494,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 1550fa97ed40..50525bad8ff0 100644 --- a/sc/source/filter/xcl97/xcl97dum.cxx +++ b/sc/source/filter/xcl97/xcl97dum.cxx @@ -38,7 +38,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 @@ -64,13 +64,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 @@ -82,7 +82,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 }; @@ -90,7 +90,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); @@ -104,7 +104,7 @@ sal_Size ExcDummy8_00a::GetLen() const } -const BYTE* ExcDummy8_00a::GetData() const +const sal_uInt8* ExcDummy8_00a::GetData() const { return pMyData; } @@ -117,7 +117,7 @@ sal_Size ExcDummy8_00b::GetLen() const } -const BYTE* ExcDummy8_00b::GetData() const +const sal_uInt8* ExcDummy8_00b::GetData() const { return pMyData; } @@ -130,7 +130,7 @@ sal_Size ExcDummy8_040::GetLen() const } -const BYTE* ExcDummy8_040::GetData() const +const sal_uInt8* ExcDummy8_040::GetData() const { return pMyData; } @@ -143,7 +143,7 @@ sal_Size ExcDummy8_041::GetLen() const } -const BYTE* ExcDummy8_041::GetData() const +const sal_uInt8* ExcDummy8_041::GetData() const { return pMyData; } @@ -156,7 +156,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 a7c6dee67dc5..834a417ca329 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -196,12 +196,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(); } } @@ -307,12 +307,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 209bbc83f6c3..9da6d5142b97 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -110,13 +110,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 ); return nCnt; } @@ -190,7 +190,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 ) @@ -321,7 +321,7 @@ void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const Rectangle& // 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()) { @@ -376,14 +376,14 @@ void XclObjComment::Save( XclExpStream& 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( sal_False ); + SetAutoFill( sal_True ); + SetAutoLine( sal_False ); nGrbit |= 0x0100; // undocumented mrEscherEx.OpenContainer( ESCHER_SpContainer ); mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT ); @@ -421,7 +421,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(); } @@ -512,7 +512,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 ) ); @@ -572,7 +572,7 @@ void XclTxo::Save( XclExpStream& rStrm ) } } -UINT16 XclTxo::GetNum() const +sal_uInt16 XclTxo::GetNum() const { return EXC_ID_TXO; } @@ -599,9 +599,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 ) ); // #100211# - checked aStorageName.AppendAscii( aBuf ); SotStorageRef xOleStg = pRootStorage->OpenSotStorage( aStorageName, @@ -613,7 +613,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 ) { @@ -635,7 +635,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 @@ -647,9 +647,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 @@ -685,7 +685,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 ) @@ -719,7 +719,7 @@ void ExcBof8_Base::SaveCont( XclExpStream& rStrm ) } -UINT16 ExcBof8_Base::GetNum() const +sal_uInt16 ExcBof8_Base::GetNum() const { return 0x0809; } @@ -809,7 +809,7 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm ) // --- class XclObproj ----------------------------------------------- -UINT16 XclObproj::GetNum() const +sal_uInt16 XclObproj::GetNum() const { return 0x00D3; } @@ -834,7 +834,7 @@ void XclCodename::SaveCont( XclExpStream& rStrm ) } -UINT16 XclCodename::GetNum() const +sal_uInt16 XclCodename::GetNum() const { return 0x01BA; } @@ -849,7 +849,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 ) @@ -885,7 +885,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 ); @@ -905,13 +905,13 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) if( !pRList ) return; - BOOL bContLoop = TRUE; + sal_Bool bContLoop = sal_True; SCROW nRow; SCCOL nCol; String sText; double fVal; - for( UINT32 nRange = 0; (nRange < pRList->Count()) && bContLoop; nRange++ ) + for( sal_uInt32 nRange = 0; (nRange < pRList->Count()) && bContLoop; nRange++ ) { const ScRange* pRange = pRList->GetObject( nRange ); for( nRow = pRange->aStart.Row(); (nRow <= pRange->aEnd.Row()) && bContLoop; nRow++ ) @@ -924,7 +924,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 ); @@ -940,25 +940,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 sal_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 ); @@ -976,7 +976,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 2 * List::Count() ); // date format } -UINT16 ExcEScenario::GetNum() const +sal_uInt16 ExcEScenario::GetNum() const { return 0x00AF; } @@ -1035,10 +1035,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 ) @@ -1068,7 +1068,7 @@ void ExcEScenarioManager::SaveXml( XclExpXmlStream& rStrm ) rWorkbook->endElement( XML_scenarios ); } -UINT16 ExcEScenarioManager::GetNum() const +sal_uInt16 ExcEScenarioManager::GetNum() const { return 0x00AE; } @@ -1161,7 +1161,7 @@ XclCalccount::XclCalccount( const ScDocument& rDoc ) } -UINT16 XclCalccount::GetNum() const +sal_uInt16 XclCalccount::GetNum() const { return 0x000C; } @@ -1195,7 +1195,7 @@ XclIteration::XclIteration( const ScDocument& rDoc ) } -UINT16 XclIteration::GetNum() const +sal_uInt16 XclIteration::GetNum() const { return 0x0011; } @@ -1230,7 +1230,7 @@ XclDelta::XclDelta( const ScDocument& rDoc ) } -UINT16 XclDelta::GetNum() const +sal_uInt16 XclDelta::GetNum() const { return 0x0010; } diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx index b124e77ac745..3d1c02fc2c11 100644 --- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx +++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx @@ -49,7 +49,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) : @@ -117,7 +117,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 8fe5a7f1db1c..4b5fa4a1114b 100644 --- a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx +++ b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx @@ -49,14 +49,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 ); @@ -73,14 +73,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 ); @@ -93,14 +93,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 9826e8385075..d02c5c52bba0 100644 --- a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx +++ b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx @@ -54,7 +54,7 @@ ScMyImpCellRangeSource::ScMyImpCellRangeSource() : ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, ScMyImpCellRangeSource* pCellRangeSource ) : @@ -70,7 +70,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 ) ) { @@ -120,7 +120,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 fde1b5534134..34645007f0f9 100644 --- a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx +++ b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx @@ -60,7 +60,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 @@ -68,7 +68,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/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx index d928444dd8ce..828f32de82da 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx @@ -464,10 +464,10 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, S // #97286# 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( pTrack->GetUserCollection().At( nPos ) ); @@ -835,7 +835,7 @@ void ScXMLChangeTrackingImportHelper::CreateChangeTrack(ScDocument* pTempDoc) { pTrack = new ScChangeTrack(pDoc, aUsers); // #97286# old files didn't store 100th seconds, disable until encountered - pTrack->SetTime100thSeconds( FALSE ); + pTrack->SetTime100thSeconds( sal_False ); ScMyActions::iterator aItr(aActions.begin()); ScMyActions::iterator aEndItr(aActions.end()); diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx index 0ca5fc360533..1f03d566ff18 100644 --- a/sc/source/filter/xml/XMLConsolidationContext.cxx +++ b/sc/source/filter/xml/XMLConsolidationContext.cxx @@ -48,7 +48,7 @@ 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 ), @@ -67,7 +67,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 ) ) { @@ -99,7 +99,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.eFunction = eFunction; sal_Bool bError = sal_False; - 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 = sal_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 52061c715ae7..76249bf4cfab 100644 --- a/sc/source/filter/xml/XMLConsolidationContext.hxx +++ b/sc/source/filter/xml/XMLConsolidationContext.hxx @@ -54,14 +54,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/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx index d7fafe1d9423..29f4cb7b7594 100644 --- a/sc/source/filter/xml/XMLDDELinksContext.cxx +++ b/sc/source/filter/xml/XMLDDELinksContext.cxx @@ -48,7 +48,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 */ ) : @@ -63,7 +63,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 ) @@ -84,7 +84,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 */ ) : @@ -106,7 +106,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 ) @@ -202,12 +202,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, @@ -224,7 +224,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) { @@ -251,7 +251,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 */ ) @@ -267,7 +267,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 */, @@ -282,7 +282,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 ) @@ -308,7 +308,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, @@ -326,7 +326,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)) @@ -339,7 +339,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 */ ) @@ -354,7 +354,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, @@ -372,7 +372,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)) @@ -385,7 +385,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 ) @@ -408,7 +408,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, @@ -431,7 +431,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) { @@ -467,7 +467,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 e9c1db58548f..077515a07a4a 100644 --- a/sc/source/filter/xml/XMLDDELinksContext.hxx +++ b/sc/source/filter/xml/XMLDDELinksContext.hxx @@ -39,14 +39,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 ); @@ -79,14 +79,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 ); @@ -111,7 +111,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, @@ -119,7 +119,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 ); @@ -134,7 +134,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, @@ -142,7 +142,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 ); @@ -157,7 +157,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, @@ -165,7 +165,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 ); @@ -181,7 +181,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, @@ -189,7 +189,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 ); @@ -211,7 +211,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, @@ -219,7 +219,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 c127ca518266..109cb21abe04 100644 --- a/sc/source/filter/xml/XMLDetectiveContext.cxx +++ b/sc/source/filter/xml/XMLDetectiveContext.cxx @@ -83,7 +83,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 ), @@ -96,7 +96,7 @@ ScXMLDetectiveContext::~ScXMLDetectiveContext() } SvXMLImportContext *ScXMLDetectiveContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { @@ -127,7 +127,7 @@ void ScXMLDetectiveContext::EndElement() ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, ScMyImpDetectiveObjVec* pNewDetectiveObjVec ): @@ -146,7 +146,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 */ ) { @@ -209,7 +209,7 @@ 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 ), @@ -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 30a8bc600bb0..c0b00384f91a 100644 --- a/sc/source/filter/xml/XMLDetectiveContext.hxx +++ b/sc/source/filter/xml/XMLDetectiveContext.hxx @@ -96,14 +96,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 ); @@ -126,7 +126,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 @@ -134,7 +134,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 ); @@ -156,14 +156,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 dbba2732ecee..42750bbc8e4f 100644 --- a/sc/source/filter/xml/XMLEmptyContext.cxx +++ b/sc/source/filter/xml/XMLEmptyContext.cxx @@ -38,7 +38,7 @@ //------------------------------------------------------------------ ScXMLEmptyContext::ScXMLEmptyContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName) : SvXMLImportContext( rImport, nPrfx, rLName ) { @@ -48,7 +48,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 ab8b69ad8403..e2a0303311b8 100644 --- a/sc/source/filter/xml/XMLEmptyContext.hxx +++ b/sc/source/filter/xml/XMLEmptyContext.hxx @@ -41,12 +41,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 a29394bf850b..a738f93add19 100644 --- a/sc/source/filter/xml/XMLExportDDELinks.cxx +++ b/sc/source/filter/xml/XMLExportDDELinks.cxx @@ -102,7 +102,7 @@ void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos) { const ScMatrix* pMatrix(NULL); if (rExport.GetDocument()) - pMatrix = rExport.GetDocument()->GetDdeLinkResultMatrix( static_cast(nPos) ); + pMatrix = rExport.GetDocument()->GetDdeLinkResultMatrix( static_cast(nPos) ); if (pMatrix) { SCSIZE nuCol; @@ -132,7 +132,7 @@ void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos) { ScMatValType nType = SC_MATVAL_VALUE; const ScMatrixValue* pMatVal = pMatrix->Get( static_cast(nColumn), static_cast(nRow), nType ); - BOOL bIsString = ScMatrix::IsNonValueType( nType); + sal_Bool bIsString = ScMatrix::IsNonValueType( nType); if (nColumn == 0) { @@ -196,7 +196,7 @@ void ScXMLExportDDELinks::WriteDDELinks(uno::ReferencegetTopic()); 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/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index 415057c219f2..6e70d4d53c0f 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -102,7 +102,7 @@ void ScMyShapeResizer::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. @@ -136,7 +136,7 @@ void ScMyShapeResizer::GetNewShapeSizePos(ScDocument* pDoc, const Rectangle& rSt sal_Int32& rEndX, sal_Int32& rEndY) const { awt::Point aRefPoint; - BOOL bNegativePage(pDoc->IsNegativePage(rEndCell.Sheet)); + sal_Bool bNegativePage(pDoc->IsNegativePage(rEndCell.Sheet)); if (bNegativePage) aRefPoint.X = rStartRect.Right(); else diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx index d841e1c4c748..9d9bfc2a1a13 100644 --- a/sc/source/filter/xml/XMLTableShapesContext.cxx +++ b/sc/source/filter/xml/XMLTableShapesContext.cxx @@ -42,7 +42,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 */ ) : @@ -55,7 +55,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 f12cb56d30da..ff38af0f9a2d 100644 --- a/sc/source/filter/xml/XMLTableShapesContext.hxx +++ b/sc/source/filter/xml/XMLTableShapesContext.hxx @@ -37,14 +37,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 00f5c9184a53..5abbe4c0ea26 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.cxx +++ b/sc/source/filter/xml/XMLTableSourceContext.cxx @@ -48,7 +48,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) : @@ -100,7 +100,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 */ ) @@ -127,9 +127,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, sal_False, sal_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 2d72a4a3364c..456c81baf636 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.hxx +++ b/sc/source/filter/xml/XMLTableSourceContext.hxx @@ -45,14 +45,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 d6d02567b9bd..c95c881b4283 100644 --- a/sc/source/filter/xml/XMLTextPContext.cxx +++ b/sc/source/filter/xml/XMLTextPContext.cxx @@ -48,7 +48,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, @@ -59,7 +59,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, @@ -91,7 +91,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, @@ -128,7 +128,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 a920e13f84a3..7df19470454f 100644 --- a/sc/source/filter/xml/XMLTextPContext.hxx +++ b/sc/source/filter/xml/XMLTextPContext.hxx @@ -42,14 +42,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, @@ -57,7 +57,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 cf415142213a..c084d83faeff 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -62,13 +62,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 ); @@ -86,13 +86,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 ); @@ -125,13 +125,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 ); @@ -149,13 +149,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 ); @@ -173,13 +173,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 ); @@ -197,13 +197,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 ); @@ -221,13 +221,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 ); @@ -246,14 +246,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, @@ -261,7 +261,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 ); @@ -293,7 +293,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, @@ -303,7 +303,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 ); @@ -337,13 +337,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 ); @@ -362,13 +362,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 ); @@ -385,13 +385,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 ); @@ -408,13 +408,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 ); @@ -431,13 +431,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 ); @@ -454,13 +454,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 ); @@ -477,13 +477,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 ); @@ -502,13 +502,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 ); @@ -525,13 +525,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 ); @@ -541,7 +541,7 @@ public: //------------------------------------------------------------------ ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -579,7 +579,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 ) @@ -621,7 +621,7 @@ void ScXMLTrackedChangesContext::EndElement() } ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -635,7 +635,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 )); @@ -657,7 +657,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 ) @@ -696,7 +696,7 @@ void ScXMLChangeInfoContext::EndElement() } ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScBigRange& rTempBigRange ) : @@ -720,7 +720,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 )); @@ -769,7 +769,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 */ ) @@ -782,7 +782,7 @@ void ScXMLBigRangeContext::EndElement() } ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper) : @@ -802,7 +802,7 @@ ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport& { 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 )); @@ -818,7 +818,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 ) @@ -858,7 +858,7 @@ void ScXMLCellContentDeletionContext::EndElement() } ScXMLDependenceContext::ScXMLDependenceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -871,7 +871,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 )); @@ -888,7 +888,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 */ ) @@ -901,7 +901,7 @@ void ScXMLDependenceContext::EndElement() } ScXMLDependingsContext::ScXMLDependingsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& /* xAttrList */, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -915,7 +915,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 ) @@ -940,7 +940,7 @@ void ScXMLDependingsContext::EndElement() } ScXMLChangeDeletionContext::ScXMLChangeDeletionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -953,7 +953,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 )); @@ -970,7 +970,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 */ ) @@ -983,7 +983,7 @@ void ScXMLChangeDeletionContext::EndElement() } ScXMLDeletionsContext::ScXMLDeletionsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& /* xAttrList */, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -997,7 +997,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 ) @@ -1023,7 +1023,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, @@ -1045,7 +1045,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 ) @@ -1061,7 +1061,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(); @@ -1112,7 +1112,7 @@ void ScXMLChangeTextPContext::EndElement() } ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScBaseCell*& rTempOldCell, rtl::OUString& rAddress, @@ -1138,7 +1138,7 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( 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 )); @@ -1216,7 +1216,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 ) @@ -1329,7 +1329,7 @@ void ScXMLChangeCellContext::EndElement() } ScXMLPreviousContext::ScXMLPreviousContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1348,7 +1348,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 )); @@ -1364,7 +1364,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 ) @@ -1388,7 +1388,7 @@ void ScXMLPreviousContext::EndElement() } ScXMLContentChangeContext::ScXMLContentChangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1404,7 +1404,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 )); @@ -1438,7 +1438,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 ) @@ -1480,7 +1480,7 @@ void ScXMLContentChangeContext::EndElement() } ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1500,7 +1500,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 )); @@ -1554,7 +1554,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 ) @@ -1585,7 +1585,7 @@ void ScXMLInsertionContext::EndElement() } ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1599,7 +1599,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 )); @@ -1622,7 +1622,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 */ ) @@ -1635,7 +1635,7 @@ void ScXMLInsertionCutOffContext::EndElement() } ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1652,7 +1652,7 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( 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 )); @@ -1686,7 +1686,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 */ ) @@ -1699,7 +1699,7 @@ void ScXMLMovementCutOffContext::EndElement() } ScXMLCutOffsContext::ScXMLCutOffsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& /* xAttrList */, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1713,7 +1713,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 ) @@ -1739,7 +1739,7 @@ void ScXMLCutOffsContext::EndElement() } ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1759,7 +1759,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 )); @@ -1818,7 +1818,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 ) @@ -1855,7 +1855,7 @@ void ScXMLDeletionContext::EndElement() } ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1871,7 +1871,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 )); @@ -1905,7 +1905,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 ) @@ -1941,7 +1941,7 @@ void ScXMLMovementContext::EndElement() } ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1957,7 +1957,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 )); @@ -1991,7 +1991,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 ec66fe7f22e7..299c835f49a9 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.hxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.hxx @@ -45,13 +45,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 14fc34954564..a6c76b830517 100644 --- a/sc/source/filter/xml/xmlannoi.cxx +++ b/sc/source/filter/xml/xmlannoi.cxx @@ -58,7 +58,7 @@ ScXMLAnnotationData::~ScXMLAnnotationData() //------------------------------------------------------------------ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLAnnotationData& rAnnotationData, @@ -86,7 +86,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 )); @@ -136,7 +136,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 ad2eed21b23a..2c39118dca1f 100644 --- a/sc/source/filter/xml/xmlannoi.hxx +++ b/sc/source/filter/xml/xmlannoi.hxx @@ -75,7 +75,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, @@ -84,7 +84,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 00c87cd661d7..f80540bafa55 100644 --- a/sc/source/filter/xml/xmlbodyi.cxx +++ b/sc/source/filter/xml/xmlbodyi.cxx @@ -72,7 +72,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), @@ -112,7 +112,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 )); @@ -130,7 +130,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 ) @@ -151,13 +151,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 e61e413ff79b..3a5c401c254f 100644 --- a/sc/source/filter/xml/xmlbodyi.hxx +++ b/sc/source/filter/xml/xmlbodyi.hxx @@ -45,11 +45,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& 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 ae5a7bcebe66..6028d70bb56a 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -99,7 +99,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ 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, @@ -313,7 +313,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 ) @@ -947,7 +947,7 @@ 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); } @@ -1022,7 +1022,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); diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index 6a63e785f959..a6091f87e485 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -103,7 +103,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, @@ -111,7 +111,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 6ea5b0192ab2..bdeaf39a3eb9 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -58,7 +58,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 ) : @@ -107,7 +107,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 */ ) @@ -198,7 +198,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, @@ -240,7 +240,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 ) diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx index 2edb496b4b28..7778192a337a 100644 --- a/sc/source/filter/xml/xmlcoli.hxx +++ b/sc/source/filter/xml/xmlcoli.hxx @@ -44,14 +44,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 ); @@ -74,7 +74,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, @@ -82,7 +82,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 3a0f5ef3126e..4c32f1859a8a 100644 --- a/sc/source/filter/xml/xmlconti.cxx +++ b/sc/source/filter/xml/xmlconti.cxx @@ -47,7 +47,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 */, @@ -62,7 +62,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 ) @@ -78,7 +78,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 83151a934d48..c7d8521d71af 100644 --- a/sc/source/filter/xml/xmlconti.hxx +++ b/sc/source/filter/xml/xmlconti.hxx @@ -42,7 +42,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, @@ -50,7 +50,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 451b085afe9e..0fd9887ea57e 100644 --- a/sc/source/filter/xml/xmlcvali.cxx +++ b/sc/source/filter/xml/xmlcvali.cxx @@ -78,14 +78,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 ); @@ -111,7 +111,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, @@ -119,7 +119,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 ); @@ -142,7 +142,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, @@ -150,7 +150,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 ); @@ -170,7 +170,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, @@ -178,7 +178,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 ); @@ -188,7 +188,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 */ ) : @@ -201,7 +201,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 ) @@ -227,7 +227,7 @@ 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) : @@ -243,7 +243,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 )); @@ -286,7 +286,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 ) @@ -493,7 +493,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, @@ -511,7 +511,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 )); @@ -531,7 +531,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 ) @@ -563,7 +563,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, @@ -582,7 +582,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 )); @@ -605,7 +605,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 ) @@ -637,7 +637,7 @@ 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, @@ -653,7 +653,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 )); @@ -673,7 +673,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 226d2e2d91b5..b8d75cf5c7c3 100644 --- a/sc/source/filter/xml/xmlcvali.hxx +++ b/sc/source/filter/xml/xmlcvali.hxx @@ -43,14 +43,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 ba107347b46a..09d8a25fa86d 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -70,7 +70,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 */ ) : @@ -85,7 +85,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 ) @@ -117,7 +117,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) : @@ -147,7 +147,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 )); @@ -231,7 +231,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 ) @@ -337,7 +337,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()) { @@ -501,7 +501,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, @@ -515,7 +515,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 )); @@ -544,7 +544,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 */ ) @@ -562,7 +562,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, @@ -576,7 +576,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 )); @@ -600,7 +600,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 */ ) @@ -618,7 +618,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, @@ -632,7 +632,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 )); @@ -656,7 +656,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 */ ) @@ -674,7 +674,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, @@ -688,7 +688,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 )); @@ -727,7 +727,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 */ ) @@ -750,7 +750,7 @@ ScXMLImport& ScXMLDataPilotGrandTotalContext::GetScImport() } ScXMLDataPilotGrandTotalContext::ScXMLDataPilotGrandTotalContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, const Reference& xAttrList, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference& xAttrList, ScXMLDataPilotTableContext* pTableContext ) : SvXMLImportContext( rImport, nPrefix, rLName ), mpTableContext(pTableContext), @@ -765,7 +765,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: @@ -794,7 +794,7 @@ ScXMLDataPilotGrandTotalContext::~ScXMLDataPilotGrandTotalContext() } SvXMLImportContext* ScXMLDataPilotGrandTotalContext::CreateChildContext( - USHORT /*nPrefix*/, const ::rtl::OUString& /*rLocalName*/, const Reference& /*xAttrList*/ ) + sal_uInt16 /*nPrefix*/, const ::rtl::OUString& /*rLocalName*/, const Reference& /*xAttrList*/ ) { return NULL; } @@ -820,7 +820,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, @@ -834,7 +834,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 )); @@ -856,7 +856,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 ) @@ -882,7 +882,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, @@ -911,7 +911,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 )); @@ -969,7 +969,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 ) @@ -1079,7 +1079,7 @@ void ScXMLDataPilotFieldContext::EndElement() } } -ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference& xAttrList, ScXMLDataPilotFieldContext* pDataPilotField) : @@ -1092,7 +1092,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 )); @@ -1146,7 +1146,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, @@ -1160,7 +1160,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 )); @@ -1179,7 +1179,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 ) @@ -1216,7 +1216,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, @@ -1230,7 +1230,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 )); @@ -1267,7 +1267,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, @@ -1281,7 +1281,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 )); @@ -1316,7 +1316,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, @@ -1330,7 +1330,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 )); @@ -1361,7 +1361,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 */, @@ -1379,7 +1379,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 ) @@ -1433,7 +1433,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, @@ -1447,7 +1447,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 )); @@ -1471,7 +1471,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 */ ) @@ -1489,7 +1489,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 */, @@ -1504,7 +1504,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 ) @@ -1530,7 +1530,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, @@ -1547,7 +1547,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 )); @@ -1582,7 +1582,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 */ ) @@ -1609,7 +1609,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, @@ -1631,7 +1631,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 ); @@ -1708,7 +1708,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 ) @@ -1732,7 +1732,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, @@ -1745,7 +1745,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 ); @@ -1761,7 +1761,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 ) @@ -1786,7 +1786,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, @@ -1799,7 +1799,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 ); @@ -1815,7 +1815,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 32300138bc3b..5ff84c587b54 100644 --- a/sc/source/filter/xml/xmldpimp.hxx +++ b/sc/source/filter/xml/xmldpimp.hxx @@ -62,14 +62,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 ); @@ -132,14 +132,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 ); @@ -178,7 +178,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, @@ -186,7 +186,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 ); @@ -203,7 +203,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, @@ -211,7 +211,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 ); @@ -228,7 +228,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, @@ -236,7 +236,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 ); @@ -253,7 +253,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, @@ -261,7 +261,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 ); @@ -282,14 +282,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 ); @@ -306,7 +306,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, @@ -314,7 +314,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 ); @@ -357,7 +357,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, @@ -365,7 +365,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 ); @@ -405,7 +405,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, @@ -423,7 +423,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, @@ -431,7 +431,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 ); @@ -448,7 +448,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, @@ -466,7 +466,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, @@ -484,7 +484,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, @@ -508,7 +508,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, @@ -516,7 +516,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 ); @@ -535,7 +535,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, @@ -543,7 +543,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 ); @@ -560,7 +560,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, @@ -568,7 +568,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 ); @@ -591,7 +591,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, @@ -599,7 +599,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 ); @@ -616,7 +616,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, @@ -624,7 +624,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 ); @@ -644,7 +644,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, @@ -652,7 +652,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 ); @@ -673,7 +673,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, @@ -681,7 +681,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 c5731dfc28fb..c91602d7e568 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -71,7 +71,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 */ ) : @@ -86,7 +86,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 ) @@ -115,7 +115,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) : @@ -153,7 +153,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 )); @@ -220,7 +220,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 ) @@ -445,7 +445,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, @@ -459,7 +459,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 )); @@ -489,7 +489,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 ) @@ -518,7 +518,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, @@ -532,7 +532,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 )); @@ -557,7 +557,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 ) @@ -586,7 +586,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, @@ -600,7 +600,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 )); @@ -625,7 +625,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 ) @@ -654,7 +654,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, @@ -668,7 +668,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 ); @@ -686,7 +686,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 */ ) @@ -704,7 +704,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, @@ -718,7 +718,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 )); @@ -747,7 +747,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 ) @@ -782,7 +782,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, @@ -797,7 +797,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 )); @@ -848,7 +848,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 */ ) @@ -866,7 +866,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, @@ -880,7 +880,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 )); @@ -899,7 +899,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 ) @@ -930,7 +930,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, @@ -944,7 +944,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 )); @@ -968,7 +968,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 e170c9eb84c0..1191925c2bcc 100644 --- a/sc/source/filter/xml/xmldrani.hxx +++ b/sc/source/filter/xml/xmldrani.hxx @@ -47,14 +47,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 ); @@ -111,14 +111,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 ); @@ -159,7 +159,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, @@ -167,7 +167,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 ); @@ -185,7 +185,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, @@ -193,7 +193,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 ); @@ -211,7 +211,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, @@ -219,7 +219,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 ); @@ -236,7 +236,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, @@ -244,7 +244,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 ); @@ -261,7 +261,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, @@ -269,7 +269,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 ); @@ -286,7 +286,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, @@ -294,7 +294,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 ); @@ -312,7 +312,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, @@ -320,7 +320,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 ); @@ -343,7 +343,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, @@ -351,7 +351,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 ddd6dbb3ce24..f8769cc95ffb 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -914,7 +914,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(nIndex) )); + ScDetOpData* pDetData(pOpList->GetObject( static_cast(nIndex) )); if( pDetData ) { const ScAddress& rDetPos = pDetData->GetPos(); @@ -1479,11 +1479,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(i)); + sal_Int32 nFields = pFields->GetCount(static_cast(i)); for (sal_Int32 j = 0; j < nFields; ++j) { ScMyColumnRowGroup aGroup; - ScOutlineEntry* pEntry(pFields->GetEntry(static_cast(i), static_cast(j))); + ScOutlineEntry* pEntry(pFields->GetEntry(static_cast(i), static_cast(j))); aGroup.nField = pEntry->GetStart(); aGroup.nLevel = static_cast(i); aGroup.bDisplay = !(pEntry->IsHidden()); @@ -1916,7 +1916,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, sal_False, XML_STYLE_FAMILY_TABLE_CELL); SvXMLExport::_ExportStyles(bUsed); } @@ -3086,7 +3086,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 ) ) { @@ -3156,7 +3156,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, //BM } //BM if(pChartListener) //BM { -//BM USHORT nIndex(0); +//BM sal_uInt16 nIndex(0); //BM pChartListener->SetString( sName ); //BM if ( GetDocument() && GetDocument()->GetChartListenerCollection()->Search( pChartListener, nIndex ) ) //BM { @@ -3213,7 +3213,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) awt::Point aPoint; Rectangle aRec = pDoc->GetMMRect(static_cast(rMyCell.aCellAddress.Column), static_cast(rMyCell.aCellAddress.Row), static_cast(rMyCell.aCellAddress.Column), static_cast(rMyCell.aCellAddress.Row), static_cast(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 @@ -4519,10 +4519,10 @@ sal_Bool SAL_CALL ScXMLExport::filter( const ::com::sun::star::uno::Sequence< :: { ScUnoGuard aGuard; if (pDoc) - pDoc->DisableIdle(TRUE); + pDoc->DisableIdle(sal_True); sal_Bool bReturn(SvXMLExport::filter(aDescriptor)); if (pDoc) - pDoc->DisableIdle(FALSE); + pDoc->DisableIdle(sal_False); return bReturn; } @@ -4531,7 +4531,7 @@ void SAL_CALL ScXMLExport::cancel() { ScUnoGuard aGuard; if (pDoc) - pDoc->DisableIdle(FALSE); + pDoc->DisableIdle(sal_False); SvXMLExport::cancel(); } diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx index 083a73d81872..fb33b5e9a450 100644 --- a/sc/source/filter/xml/xmlexternaltabi.cxx +++ b/sc/source/filter/xml/xmlexternaltabi.cxx @@ -55,7 +55,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& xAttrList, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -92,7 +92,7 @@ ScXMLExternalRefTabSourceContext::~ScXMLExternalRefTabSourceContext() } SvXMLImportContext* ScXMLExternalRefTabSourceContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference& /*xAttrList*/ ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference& /*xAttrList*/ ) { return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } @@ -138,7 +138,7 @@ void ScXMLExternalRefTabSourceContext::EndElement() // ============================================================================ ScXMLExternalRefRowsContext::ScXMLExternalRefRowsContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference& /* xAttrList */, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -151,7 +151,7 @@ ScXMLExternalRefRowsContext::~ScXMLExternalRefRowsContext() } SvXMLImportContext* ScXMLExternalRefRowsContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference& xAttrList ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference& xAttrList ) { // #i101319# row elements inside group, rows or header-rows // are treated like row elements directly in the table element @@ -181,7 +181,7 @@ void ScXMLExternalRefRowsContext::EndElement() // ============================================================================ ScXMLExternalRefRowContext::ScXMLExternalRefRowContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference& xAttrList, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -215,7 +215,7 @@ ScXMLExternalRefRowContext::~ScXMLExternalRefRowContext() } SvXMLImportContext* ScXMLExternalRefRowContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference& xAttrList ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference& xAttrList ) { const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName); @@ -258,7 +258,7 @@ void ScXMLExternalRefRowContext::EndElement() // ============================================================================ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference& xAttrList, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -365,7 +365,7 @@ ScXMLExternalRefCellContext::~ScXMLExternalRefCellContext() } SvXMLImportContext* ScXMLExternalRefCellContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference& xAttrList ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference& xAttrList ) { const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowCellElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName); @@ -407,7 +407,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& /*xAttrList*/, ScXMLExternalRefCellContext& rParent ) : SvXMLImportContext( rImport, nPrefix, rLName ), @@ -421,7 +421,7 @@ ScXMLExternalRefCellTextContext::~ScXMLExternalRefCellTextContext() } SvXMLImportContext* ScXMLExternalRefCellTextContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference& /*xAttrList*/ ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference& /*xAttrList*/ ) { return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx index 6aaff181315e..8382e681c439 100644 --- a/sc/source/filter/xml/xmlexternaltabi.hxx +++ b/sc/source/filter/xml/xmlexternaltabi.hxx @@ -37,7 +37,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, @@ -45,7 +45,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 ); @@ -66,7 +66,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, @@ -74,7 +74,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 ); @@ -90,7 +90,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, @@ -98,7 +98,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 ); @@ -115,7 +115,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, @@ -123,7 +123,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 ); @@ -149,7 +149,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, @@ -157,7 +157,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 55670d97637d..760a21a8c106 100644 --- a/sc/source/filter/xml/xmlfilti.cxx +++ b/sc/source/filter/xml/xmlfilti.cxx @@ -48,7 +48,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, @@ -71,7 +71,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 )); @@ -113,7 +113,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 ) @@ -167,7 +167,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 */, @@ -182,7 +182,7 @@ 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 ) @@ -217,7 +217,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 */, @@ -232,7 +232,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 ) @@ -268,7 +268,7 @@ 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, @@ -285,7 +285,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 )); @@ -324,7 +324,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 */ ) @@ -411,7 +411,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, @@ -435,7 +435,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 )); @@ -477,7 +477,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 ) @@ -543,7 +543,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 */, @@ -558,7 +558,7 @@ 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 ) @@ -593,7 +593,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 */, @@ -608,7 +608,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 ) @@ -644,7 +644,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, @@ -661,7 +661,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 )); @@ -700,7 +700,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 */ ) diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index df222eeb23c2..f00b7b00cfdf 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -65,7 +65,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, @@ -73,7 +73,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 ); @@ -100,7 +100,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, @@ -108,7 +108,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 ); @@ -125,7 +125,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, @@ -133,7 +133,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 ); @@ -156,7 +156,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, @@ -164,7 +164,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 ); @@ -199,7 +199,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, @@ -207,7 +207,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 ); @@ -233,7 +233,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, @@ -241,7 +241,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 ); @@ -258,7 +258,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, @@ -266,7 +266,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 ); @@ -289,7 +289,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, @@ -297,7 +297,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/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index e83f68bb2bbd..d840c39f5939 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -262,17 +262,17 @@ protected: public: ScXMLDocContext_Impl( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference& xAttrList ); virtual ~ScXMLDocContext_Impl(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const uno::Reference& xAttrList ); }; -ScXMLDocContext_Impl::ScXMLDocContext_Impl( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDocContext_Impl::ScXMLDocContext_Impl( ScXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference& /* xAttrList */ ) : SvXMLImportContext( rImport, nPrfx, rLName ) @@ -290,7 +290,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& i_xAttrList, const uno::Reference& i_xDocProps, const uno::Reference& i_xDocBuilder); @@ -298,12 +298,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& 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& i_xAttrList, const uno::Reference& i_xDocProps, const uno::Reference& i_xDocBuilder) : @@ -318,7 +318,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& i_xAttrList) { // behave like meta base class iff we encounter office:meta @@ -369,7 +369,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& xAttrList ) { @@ -1599,7 +1599,7 @@ const SvXMLTokenMap& ScXMLImport::GetConsolidationAttrTokenMap() } -SvXMLImportContext *ScXMLImport::CreateContext( USHORT nPrefix, +SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference& xAttrList ) { @@ -1864,7 +1864,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& xAttrList) { SvXMLImportContext *pContext = NULL; @@ -2067,7 +2067,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; } @@ -2848,7 +2848,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTabIsSheetBlocked( nTab )) - pDoc->SetStreamValid( nTab, TRUE ); + pDoc->SetStreamValid( nTab, sal_True ); } aTables.UpdateRowHeights(); diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index 9771655ebd4b..d11a5bc0e76a 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -785,7 +785,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 ); @@ -804,7 +804,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& xAttrList); SvXMLImportContext *CreateScriptContext( const ::rtl::OUString& rLocalName ); @@ -834,7 +834,7 @@ public: // SvI18NMap& GetI18NMap() { return *pI18NMap; } // inline const SvXMLImportItemMapper& GetParaItemMapper() const; -// SvXMLImportContext *CreateParaItemImportContext( USHORT nPrefix, +// SvXMLImportContext *CreateParaItemImportContext( sal_uInt16 nPrefix, // const ::rtl::OUString& rLocalName, // const ::com::sun::star::uno::Reference< // ::com::sun::star::xml::sax::XAttributeList& xAttrList, @@ -1031,7 +1031,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 70ec803cc46f..6c1c2cb55508 100644 --- a/sc/source/filter/xml/xmllabri.cxx +++ b/sc/source/filter/xml/xmllabri.cxx @@ -44,7 +44,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 ) @@ -58,7 +58,7 @@ ScXMLLabelRangesContext::~ScXMLLabelRangesContext() } SvXMLImportContext* ScXMLLabelRangesContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { @@ -86,7 +86,7 @@ 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 ), @@ -100,7 +100,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 ) ) { @@ -122,7 +122,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 c3cbd6532c90..9d7bbff1aa18 100644 --- a/sc/source/filter/xml/xmllabri.hxx +++ b/sc/source/filter/xml/xmllabri.hxx @@ -43,14 +43,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 ); @@ -73,14 +73,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 3ef17c321f23..13f7e4090a58 100644 --- a/sc/source/filter/xml/xmlnexpi.cxx +++ b/sc/source/filter/xml/xmlnexpi.cxx @@ -49,7 +49,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 */ ) : @@ -60,7 +60,7 @@ ScXMLNamedExpressionsContext::ScXMLNamedExpressionsContext( 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 )); @@ -78,7 +78,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 ) @@ -115,7 +115,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) : @@ -133,7 +133,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 )); @@ -169,7 +169,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 */ ) @@ -186,7 +186,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) : @@ -199,7 +199,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 )); @@ -232,7 +232,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 94d0b2738d52..251407920bd9 100644 --- a/sc/source/filter/xml/xmlnexpi.hxx +++ b/sc/source/filter/xml/xmlnexpi.hxx @@ -39,14 +39,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 ); @@ -61,14 +61,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 ); @@ -83,14 +83,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 341445431cc8..2d52f5c9516b 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -64,7 +64,7 @@ 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 ) : @@ -121,7 +121,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 ) @@ -229,7 +229,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, @@ -272,7 +272,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 ) diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx index 558555b233e3..707ebbea90f8 100644 --- a/sc/source/filter/xml/xmlrowi.hxx +++ b/sc/source/filter/xml/xmlrowi.hxx @@ -44,14 +44,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 ); @@ -74,7 +74,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, @@ -82,7 +82,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 652dd0a1dd43..963c567804bc 100644 --- a/sc/source/filter/xml/xmlsceni.cxx +++ b/sc/source/filter/xml/xmlsceni.cxx @@ -53,7 +53,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 ), @@ -72,7 +72,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 )); @@ -134,7 +134,7 @@ ScXMLTableScenarioContext::~ScXMLTableScenarioContext() } SvXMLImportContext *ScXMLTableScenarioContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ ) { @@ -147,8 +147,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 f3a5a75fa563..8c9030cbce0b 100644 --- a/sc/source/filter/xml/xmlsceni.hxx +++ b/sc/source/filter/xml/xmlsceni.hxx @@ -52,14 +52,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 ff007240b12b..71e4a62e4a4f 100644 --- a/sc/source/filter/xml/xmlsorti.cxx +++ b/sc/source/filter/xml/xmlsorti.cxx @@ -53,7 +53,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, @@ -75,7 +75,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 )); @@ -119,7 +119,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 ) @@ -219,7 +219,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, @@ -235,7 +235,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 )); @@ -264,7 +264,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 30ac31e0dd22..630f66d3bd06 100644 --- a/sc/source/filter/xml/xmlsorti.hxx +++ b/sc/source/filter/xml/xmlsorti.hxx @@ -56,7 +56,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, @@ -64,7 +64,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 ); @@ -87,7 +87,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, @@ -95,7 +95,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/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index 89077eb4bee9..e6cc7b853764 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -606,9 +606,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()) diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index 69f00106b7c7..1644ad7e7ffe 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -144,7 +144,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, @@ -171,7 +171,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 )); @@ -232,7 +232,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 ) @@ -372,24 +372,24 @@ void ScXMLTableContext::EndElement() sal_Int32 i; for (i = 0; i < nDepth; ++i) { - sal_Int32 nCount(pColArray->GetCount(static_cast(i))); + sal_Int32 nCount(pColArray->GetCount(static_cast(i))); for (sal_Int32 j = 0; j < nCount; ++j) { - ScOutlineEntry* pEntry(pColArray->GetEntry(static_cast(i), static_cast(j))); + ScOutlineEntry* pEntry(pColArray->GetEntry(static_cast(i), static_cast(j))); if (pEntry->IsHidden()) - pColArray->SetVisibleBelow(static_cast(i), static_cast(j), sal_False); + pColArray->SetVisibleBelow(static_cast(i), static_cast(j), sal_False); } } ScOutlineArray* pRowArray(pOutlineTable->GetRowArray()); nDepth = pRowArray->GetDepth(); for (i = 0; i < nDepth; ++i) { - sal_Int32 nCount(pRowArray->GetCount(static_cast(i))); + sal_Int32 nCount(pRowArray->GetCount(static_cast(i))); for (sal_Int32 j = 0; j < nCount; ++j) { - ScOutlineEntry* pEntry(pRowArray->GetEntry(static_cast(i), static_cast(j))); + ScOutlineEntry* pEntry(pRowArray->GetEntry(static_cast(i), static_cast(j))); if (pEntry->IsHidden()) - pRowArray->SetVisibleBelow(static_cast(i), static_cast(j), sal_False); + pRowArray->SetVisibleBelow(static_cast(i), static_cast(j), sal_False); } } } diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx index c066b8bf3a9e..9a60f4fcc170 100644 --- a/sc/source/filter/xml/xmltabi.hxx +++ b/sc/source/filter/xml/xmltabi.hxx @@ -58,7 +58,7 @@ 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, @@ -67,7 +67,7 @@ public: 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 ); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 7721260367c9..9e721b7e9b1a 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -800,7 +800,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::ReferenceGetViewData()->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) diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx index cc93d0a93350..4bd8a64434e6 100644 --- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx @@ -278,7 +278,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; diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 4c65632fb45e..2bc7dba9c392 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -362,7 +362,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()); @@ -1246,7 +1246,7 @@ 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 ); diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 894e57d3802e..cccdd729c0b1 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -772,7 +772,7 @@ void ScShapeChilds::SetDrawBroadcaster() { SfxBroadcaster* pDrawBC = mpViewShell->GetDocument()->GetDrawBroadcaster(); if (pDrawBC) - StartListening(*pDrawBC, TRUE); + StartListening(*pDrawBC, sal_True); } } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index 3bb66ae01d4f..1085c232538c 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -104,7 +104,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) diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index e3fe26f47b4d..c60a0b93b75a 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -102,7 +102,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, diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 4073e23f837f..a1dde515099d 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -66,7 +66,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; @@ -86,7 +86,7 @@ ScViewForwarder::~ScViewForwarder() { } -BOOL ScViewForwarder::IsValid() const +sal_Bool ScViewForwarder::IsValid() const { return mpViewShell != NULL; } @@ -170,7 +170,7 @@ public: // <-- 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; @@ -192,7 +192,7 @@ ScEditObjectViewForwarder::~ScEditObjectViewForwarder() { } -BOOL ScEditObjectViewForwarder::IsValid() const +sal_Bool ScEditObjectViewForwarder::IsValid() const { return (mpWindow != NULL); } @@ -275,7 +275,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; @@ -300,7 +300,7 @@ ScPreviewViewForwarder::~ScPreviewViewForwarder() delete mpTableInfo; } -BOOL ScPreviewViewForwarder::IsValid() const +sal_Bool ScPreviewViewForwarder::IsValid() const { return mpViewShell != NULL; } @@ -588,7 +588,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; @@ -614,7 +614,7 @@ ScEditViewForwarder::~ScEditViewForwarder() { } -BOOL ScEditViewForwarder::IsValid() const +sal_Bool ScEditViewForwarder::IsValid() const { sal_Bool bResult(sal_False); if (mpWindow && mpEditView) @@ -777,7 +777,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 @@ -1092,7 +1092,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; @@ -1243,12 +1243,12 @@ 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; - // 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 ); - mpEditEngine->EnableUndo( FALSE ); + // pEditEngine->SetUpdateMode( sal_False ); + mpEditEngine->EnableUndo( sal_False ); mpEditEngine->SetRefMapMode( MAP_100TH_MM ); mpForwarder = new SvxEditEngineForwarder(*mpEditEngine); @@ -1363,7 +1363,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 @@ -1456,7 +1456,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 @@ -1485,12 +1485,12 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::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( sal_False ); if (pDocShell) pEditEngine->SetRefDevice(pDocShell->GetRefDevice()); else @@ -1520,7 +1520,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() pEditEngine->SetText( maText ); } - bDataValid = TRUE; + bDataValid = sal_True; if (pEditEngine) pEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) ); @@ -1599,7 +1599,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 @@ -1616,9 +1616,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( sal_False ); pHdrEngine->SetRefMapMode( MAP_TWIP ); // default font must be set, independently of document @@ -1716,7 +1716,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 @@ -1740,12 +1740,12 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); + mpEditEngine = 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 ); - mpEditEngine->EnableUndo( FALSE ); +// pEditEngine->SetUpdateMode( sal_False ); + mpEditEngine->EnableUndo( sal_False ); if (mpDocSh) mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice()); else @@ -1775,7 +1775,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() mpEditEngine->SetText( msText ); } - mbDataValid = TRUE; + mbDataValid = sal_True; if (mpEditEngine) mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) ); @@ -1801,7 +1801,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; @@ -1815,7 +1815,7 @@ ScCsvViewForwarder::ScCsvViewForwarder( Window* pWindow, const Rectangle& rBound { } -BOOL ScCsvViewForwarder::IsValid() const +sal_Bool ScCsvViewForwarder::IsValid() const { return mpWindow != NULL; } @@ -1863,7 +1863,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 b1cb325ceb69..9dac737372ae 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; nPNrGetPageCount(); + for (sal_uInt16 nPNr=0; nPNrGetPage(nPNr); SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS ); @@ -114,7 +114,7 @@ void __EXPORT 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(static_cast(nTab))); if ( pPage && aLogicRect != aOldRect ) { diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index b256233d7394..45a59a482587 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -96,12 +96,12 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain pModel( pClipModel ), aObjDesc( rDesc ), pBookmark( NULL ), - bGraphic( FALSE ), - bGrIsBit( FALSE ), - bOleObj( FALSE ), + bGraphic( sal_False ), + bGrIsBit( sal_False ), + bOleObj( sal_False ), pDragSourceView( NULL ), nDragSourceFlags( 0 ), - bDragWasInternal( FALSE ), + bDragWasInternal( sal_False ), nSourceDocID( 0 ) { // @@ -119,7 +119,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 @@ -127,7 +127,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& ) {} @@ -140,9 +140,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; } // @@ -276,9 +276,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 = sal_False; // default if there are no objects if ( pModel ) { @@ -289,12 +289,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 = sal_False; break; } pObj = aIter.Next(); @@ -393,7 +393,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 ) { @@ -429,9 +429,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 ) { @@ -586,7 +586,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse // mba: no relative ULRs for clipboard! SfxMedium aMedium( xWorkStore, String() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); @@ -601,7 +601,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse delete pSrcStm; } - bRet = TRUE; + bRet = sal_True; xWorkStore->dispose(); xWorkStore = uno::Reference < embed::XStorage >(); @@ -660,8 +660,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; iGetMarkedSdrObj(); @@ -690,14 +690,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() @@ -763,7 +763,7 @@ void ScDrawTransferObj::InitDocShell() pDocSh->SetVisArea( aDestArea ); ScViewOptions aViewOpt( pDestDoc->GetViewOptions() ); - aViewOpt.SetOption( VOPT_GRID, FALSE ); + aViewOpt.SetOption( VOPT_GRID, sal_False ); pDestDoc->SetViewOptions( aViewOpt ); ScViewData aViewData( pDocSh, NULL ); @@ -771,7 +771,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 55aa0986d2ec..ed4971fa00ee 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -97,8 +97,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 = sal_False; // App-Optionen ausgewertet +sal_Bool ScInputHandler::bAutoComplete = sal_False; // wird in KeyInput gesetzt // delimiters (in addition to ScEditUtil) needed for range finder: // only characters that are allowed in formulas next to references @@ -106,7 +106,7 @@ BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt static const sal_Char __FAR_DATA pMinDelimiters[] = " !\""; -extern USHORT nEditAdjust; //! Member an ViewData +extern sal_uInt16 nEditAdjust; //! Member an ViewData //================================================================== @@ -142,7 +142,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 ) { @@ -180,7 +180,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 @@ -193,13 +193,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( sal_False ); pRangeFindList = new ScRangeFindList( pDocSh->GetTitle() ); } @@ -220,7 +220,7 @@ handle_r1c1: if (nCount) { - pEngine->SetUpdateMode( TRUE ); + pEngine->SetUpdateMode( sal_True ); pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); } @@ -240,7 +240,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, sal_False ); xub_StrLen nLen = pEngine->GetTextLen(0); ESelection aSel( 0, nLen, 0, nLen ); @@ -248,7 +248,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() ) @@ -270,17 +270,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 = sal_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; iCount(); + for (sal_uInt16 i=nIndex+1; iGetObject( i ); pNext->nSelStart = (xub_StrLen)(pNext->nSelStart + nDiff); @@ -299,7 +299,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); } @@ -375,7 +375,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; @@ -392,11 +392,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; @@ -434,23 +434,23 @@ ScInputHandler::ScInputHandler() pTipVisibleSecParent( NULL ), nTipVisibleSec( 0 ), nAutoPos( SCPOS_INVALID ), - bUseTab( FALSE ), - bTextValid( TRUE ), + bUseTab( sal_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( sal_False ), + bSelIsRef( sal_False ), + bFormulaMode( sal_False ), + bInRangeUpdate( sal_False ), + bParenthesisShown( sal_False ), + bCreatingFuncView( sal_False ), + bInEnterHandler( sal_False ), + bCommandErrorShown( sal_False ), + bInOwnChange( sal_False ), + bProtected( sal_False ), + bCellHasPercentFormat( sal_False ), nValidation( 0 ), eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ), aScaleX( 1,1 ), @@ -458,7 +458,7 @@ ScInputHandler::ScInputHandler() pRefViewSh( NULL ), pLastPattern( NULL ), pEditDefaults( NULL ), - bLastIsSymbol( FALSE ), + bLastIsSymbol( sal_False ), pLastState( NULL ), pDelayTimer( NULL ), pRangeFindList( NULL ) @@ -513,7 +513,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 @@ -540,7 +540,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 ) ); @@ -553,12 +553,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 @@ -568,12 +568,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. @@ -586,8 +586,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 @@ -606,7 +606,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) pEngine->SetKernAsianPunctuation( pDoc->GetAsianKerning() ); pEngine->SetDefaultHorizontalTextDirection( (EEHorizontalTextDirection)pDoc->GetEditTextDirection( pViewData->GetTabNo() ) ); - pEngine->SetFirstWordCapitalization( FALSE ); + pEngine->SetFirstWordCapitalization( sal_False ); } // language is set separately, so the speller is needed only if online @@ -617,7 +617,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 xXHyphenator( LinguMgr::GetHyphenator() ); pEngine->SetHyphenator( xXHyphenator ); @@ -652,16 +652,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; iGetFunction( j ); if ( pDesc->nFIndex == nId && pDesc->pFuncName ) @@ -676,7 +676,7 @@ void ScInputHandler::GetFormulaData() } } } - for(ULONG i=0;iGetFunction( i ); if ( pDesc->pFuncName ) @@ -743,7 +743,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(); xub_StrLen nLeftParentPos = 0; @@ -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 = sal_False; FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr()); while( !bFound ) @@ -771,32 +771,32 @@ 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, sal_False, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) ) { if( ppFDesc->getFunctionName().getLength() ) { nArgPos = aHelper.GetArgStart( aSelText, nNextFStart, 0 ); - nArgs = static_cast(ppFDesc->getParameterCount()); - - USHORT nActive = 0; - USHORT nCount = 0; - USHORT nCountSemicolon = 0; - USHORT nCountDot = 0; - USHORT nStartPosition = 0; - USHORT nEndPosition = 0; - BOOL bFlag = FALSE; + nArgs = static_cast(ppFDesc->getParameterCount()); + + sal_uInt16 nActive = 0; + sal_uInt16 nCount = 0; + sal_uInt16 nCountSemicolon = 0; + sal_uInt16 nCountDot = 0; + sal_uInt16 nStartPosition = 0; + sal_uInt16 nEndPosition = 0; + sal_Bool bFlag = sal_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, sal_False ) ) { - for( USHORT i=0; i < nArgs; i++ ) + for( sal_uInt16 i=0; i < nArgs; i++ ) { xub_StrLen nLength = static_cast(aArgs[i].getLength()); if( nArgPos <= aSelText.Len()-1 ) { nActive = i+1; - bFlag = TRUE; + bFlag = sal_True; } nArgPos+=nLength+1; } @@ -807,7 +807,7 @@ void ScInputHandler::ShowTipCursor() 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 == '(' ) @@ -818,7 +818,7 @@ void ScInputHandler::ShowTipCursor() } else if( !nCountDot ) { - 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 == '(' ) @@ -839,7 +839,7 @@ void ScInputHandler::ShowTipCursor() } else { - 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 == '(' ) @@ -867,13 +867,13 @@ void ScInputHandler::ShowTipCursor() { aNew.Insert( 0x25BA, nStartPosition ); ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } else { ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } } @@ -881,21 +881,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, sal_False ) ) { if( aFormula.GetChar( nPosition ) =='(' ) { ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } else break; @@ -926,7 +926,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 ) ); } @@ -950,7 +950,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 ) ); } @@ -966,7 +966,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(); @@ -989,15 +989,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 = sal_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, sal_False ) ) { ShowTip( aNew ); aAutoSearch = aText; @@ -1016,32 +1016,32 @@ 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, sal_False, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) ) { if( ppFDesc->getFunctionName().getLength() ) { nArgPos = aHelper.GetArgStart( aFormula, nNextFStart, 0 ); - nArgs = static_cast(ppFDesc->getParameterCount()); - - USHORT nActive = 0; - USHORT nCount = 0; - USHORT nCountSemicolon = 0; - USHORT nCountDot = 0; - USHORT nStartPosition = 0; - USHORT nEndPosition = 0; - BOOL bFlag = FALSE; + nArgs = static_cast(ppFDesc->getParameterCount()); + + sal_uInt16 nActive = 0; + sal_uInt16 nCount = 0; + sal_uInt16 nCountSemicolon = 0; + sal_uInt16 nCountDot = 0; + sal_uInt16 nStartPosition = 0; + sal_uInt16 nEndPosition = 0; + sal_Bool bFlag = sal_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, sal_False ) ) { - for( USHORT i=0; i < nArgs; i++ ) + for( sal_uInt16 i=0; i < nArgs; i++ ) { xub_StrLen nLength = static_cast(aArgs[i].getLength()); if( nArgPos <= aFormula.Len()-1 ) { nActive = i+1; - bFlag = TRUE; + bFlag = sal_True; } nArgPos+=nLength+1; } @@ -1052,7 +1052,7 @@ void ScInputHandler::UseFormulaData() 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 == '(' ) @@ -1063,7 +1063,7 @@ void ScInputHandler::UseFormulaData() } else if( !nCountDot ) { - 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 == '(' ) @@ -1084,7 +1084,7 @@ void ScInputHandler::UseFormulaData() } else { - 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 == '(' ) @@ -1112,13 +1112,13 @@ void ScInputHandler::UseFormulaData() { aNew.Insert( 0x25BA, nStartPosition ); ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } else { ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } } @@ -1128,7 +1128,7 @@ void ScInputHandler::UseFormulaData() } } -void ScInputHandler::NextFormulaEntry( BOOL bBack ) +void ScInputHandler::NextFormulaEntry( sal_Bool bBack ) { EditView* pActiveView = pTopView ? pTopView : pTableView; if ( pActiveView && pFormulaData ) @@ -1144,7 +1144,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) { @@ -1156,7 +1156,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 ) { @@ -1165,16 +1165,16 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns // #39393#). 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 = sal_False; aInsStr.Erase( nInsLen - 2 ); // Klammern weglassen } } - pView->InsertText( aInsStr, FALSE ); + pView->InsertText( aInsStr, sal_False ); if ( bDoParen ) // Cursor zwischen die Klammern setzen { @@ -1183,7 +1183,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns --aSel.nEndPos; pView->SetSelection(aSel); - rParInserted = TRUE; + rParInserted = sal_True; } } } @@ -1196,7 +1196,7 @@ void ScInputHandler::PasteFunctionData() if (pData) { String aInsert = pData->GetString(); - BOOL bParInserted = FALSE; + sal_Bool bParInserted = sal_False; DataChanging(); // kann nicht neu sein lcl_CompleteFunction( pTopView, aInsert, bParInserted ); @@ -1235,7 +1235,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? @@ -1249,10 +1249,10 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress pCell = new ScFormulaCell( pDoc, rPos, aBraced ); } else - bColRowName = FALSE; + bColRowName = sal_False; } - USHORT nErrCode = pCell->GetErrCode(); + sal_uInt16 nErrCode = pCell->GetErrCode(); if ( nErrCode == 0 ) { SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable()); @@ -1260,7 +1260,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 @@ -1270,7 +1270,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 ); @@ -1300,7 +1300,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 ); } @@ -1363,9 +1363,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(); } @@ -1383,7 +1383,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 @@ -1393,11 +1393,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 sal_False; } void ScInputHandler::SkipClosingPar() @@ -1440,11 +1440,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 ); } } @@ -1458,7 +1458,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 ); @@ -1469,7 +1469,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, sal_False ) ) { // #45434# durch dBase Import etc. koennen Umbrueche im String sein, // das wuerde hier mehrere Absaetze ergeben -> nicht gut @@ -1480,7 +1480,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 @@ -1491,12 +1491,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, sal_False ); pTableView->SetSelection( aSelection ); } if ( pTopView ) { - pTopView->InsertText( aIns, FALSE ); + pTopView->InsertText( aIns, sal_False ); pTopView->SetSelection( aSelection ); } @@ -1508,11 +1508,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, sal_False ); } else - bUseTab = TRUE; + bUseTab = sal_True; } } } @@ -1520,7 +1520,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 ) @@ -1531,7 +1531,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); @@ -1542,7 +1542,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() ); @@ -1551,7 +1551,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack ) if ( pTableView ) { pTableView->DeleteSelected(); - pTableView->InsertText( aIns, FALSE ); + pTableView->InsertText( aIns, sal_False ); pTableView->SetSelection( ESelection( aSel.nEndPara, aSel.nStartPos + aIns.Len(), aSel.nEndPara, aSel.nStartPos ) ); @@ -1559,13 +1559,13 @@ void ScInputHandler::NextAutoEntry( BOOL bBack ) if ( pTopView ) { pTopView->DeleteSelected(); - pTopView->InsertText( aIns, FALSE ); + pTopView->InsertText( aIns, sal_False ); pTopView->SetSelection( ESelection( aSel.nEndPara, aSel.nStartPos + aIns.Len(), aSel.nEndPara, aSel.nStartPos ) ); } - bInOwnChange = FALSE; + bInOwnChange = sal_False; } else { @@ -1594,7 +1594,7 @@ void ScInputHandler::UpdateParenthesis() //! Klammer-Hervorhebung einzeln abschaltbar ???? - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( bFormulaMode && eMode != SC_INPUT_TOP ) { if ( pTableView && !pTableView->HasSelection() ) // Selektion ist immer unten @@ -1605,7 +1605,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 == ')' ) { @@ -1619,8 +1619,8 @@ void ScInputHandler::UpdateParenthesis() if (bParenthesisShown) { // alte Hervorhebung wegnehmen - USHORT nCount = pEngine->GetParagraphCount(); - for (USHORT i=0; iGetParagraphCount(); + for (sal_uInt16 i=0; iQuickRemoveCharAttribs( i, EE_CHAR_WEIGHT ); } @@ -1630,9 +1630,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, sal_False ); - bFound = TRUE; + bFound = sal_True; } } } @@ -1646,8 +1646,8 @@ void ScInputHandler::UpdateParenthesis() if ( bParenthesisShown && !bFound && pTableView ) { - USHORT nCount = pEngine->GetParagraphCount(); - for (USHORT i=0; iGetParagraphCount(); + for (sal_uInt16 i=0; iRemoveCharAttribs( i, EE_CHAR_WEIGHT ); } @@ -1669,12 +1669,12 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron // Trotzdem wird immerhin der Editmodus beendet EnterHandler(); - bFormulaMode = FALSE; + bFormulaMode = sal_False; pRefViewSh = NULL; SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } @@ -1703,11 +1703,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; iGetView(i); Window* pWin = pThis->GetWindow(); @@ -1724,7 +1724,7 @@ void ScInputHandler::UpdateActiveView() pTopView = NULL; } -void ScInputHandler::StopInputWinEngine( BOOL bAll ) +void ScInputHandler::StopInputWinEngine( sal_Bool bAll ) { if (pInputWin) pInputWin->StopEditEngine( bAll ); @@ -1742,9 +1742,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 ) @@ -1754,7 +1754,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped ) { case SVX_HOR_JUSTIFY_STANDARD: { - BOOL bNumber = FALSE; + sal_Bool bNumber = sal_False; if (cTyped) // neu angefangen bNumber = (cTyped>='0' && cTyped<='9'); // nur Ziffern sind Zahlen else if ( pActiveViewSh ) @@ -1779,7 +1779,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 ) @@ -1791,7 +1791,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped ) pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) ); pEngine->SetDefaults( *pEditDefaults ); - nEditAdjust = sal::static_int_cast(eSvxAdjust); //! set at ViewData or with PostEditView + nEditAdjust = sal::static_int_cast(eSvxAdjust); //! set at ViewData or with PostEditView pEngine->SetVertical( bAsianVertical ); } @@ -1800,15 +1800,15 @@ void ScInputHandler::RemoveAdjust() { // harte Ausrichtungs-Attribute loeschen - BOOL bUndo = pEngine->IsUndoEnabled(); + sal_Bool bUndo = pEngine->IsUndoEnabled(); if ( bUndo ) - pEngine->EnableUndo( FALSE ); + pEngine->EnableUndo( sal_False ); // RemoveParaAttribs removes all paragraph attributes, including EE_PARA_JUST #if 0 - BOOL bChange = FALSE; - USHORT nCount = pEngine->GetParagraphCount(); - for (USHORT i=0; iGetParagraphCount(); + for (sal_uInt16 i=0; iGetParaAttribs( i ); if ( rOld.GetItemState( EE_PARA_JUST ) == SFX_ITEM_SET ) @@ -1816,7 +1816,7 @@ void ScInputHandler::RemoveAdjust() SfxItemSet aNew( rOld ); aNew.ClearItem( EE_PARA_JUST ); pEngine->SetParaAttribs( i, aNew ); - bChange = TRUE; + bChange = sal_True; } } #endif @@ -1826,14 +1826,14 @@ void ScInputHandler::RemoveAdjust() pEngine->RemoveParaAttribs(); if ( bUndo ) - pEngine->EnableUndo( TRUE ); + pEngine->EnableUndo( sal_True ); // ER 31.08.00 Only called in EnterHandler, don't change view anymore. #if 0 if (bChange) { EditView* pActiveView = pTopView ? pTopView : pTableView; - pActiveView->ShowCursor( FALSE, TRUE ); + pActiveView->ShowCursor( sal_False, sal_True ); } #endif } @@ -1842,23 +1842,23 @@ void ScInputHandler::RemoveRangeFinder() { // pRangeFindList und Farben loeschen - pEngine->SetUpdateMode(FALSE); - USHORT nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein - for (USHORT i=0; iSetUpdateMode(sal_False); + sal_uInt16 nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein + for (sal_uInt16 i=0; iQuickRemoveCharAttribs( i, EE_CHAR_COLOR ); - pEngine->SetUpdateMode(TRUE); + pEngine->SetUpdateMode(sal_True); EditView* pActiveView = pTopView ? pTopView : pTableView; - pActiveView->ShowCursor( FALSE, TRUE ); + pActiveView->ShowCursor( sal_False, sal_True ); DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle } -BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) +sal_Bool ScInputHandler::StartTable( sal_Unicode cTyped, sal_Bool bFromCommand ) { - // returns TRUE if a new edit mode was started + // returns sal_True if a new edit mode was started - BOOL bNewTable = FALSE; + sal_Bool bNewTable = sal_False; if (!bModified && ValidCol(aCursorPos.Col())) { @@ -1880,7 +1880,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) if ( aTester.IsEditable() ) { // UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise) - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); // Attribute in EditEngine uebernehmen @@ -1894,18 +1894,18 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) 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, sal_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 = sal_False; // Default: kein Prozent // Gueltigkeit angegeben? - if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) ) + if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, sal_True, &pItem ) ) nValidation = ((const SfxUInt32Item*)pItem)->GetValue(); else nValidation = 0; @@ -1931,7 +1931,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) Color aBackCol = ((const SvxBrushItem&) pPattern->GetItem( ATTR_BACKGROUND )).GetColor(); ScModule* pScMod = SC_MOD(); - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) if ( aBackCol.GetTransparency() > 0 || Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); @@ -1952,7 +1952,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) // UpdateSpellSettings enables online spelling if needed // -> also call if attributes are unchanged - UpdateSpellSettings( TRUE ); // uses pLastPattern + UpdateSpellSettings( sal_True ); // uses pLastPattern // Edit-Engine fuellen @@ -1961,7 +1961,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) { pEngine->SetText(aCurrentText); aStr = aCurrentText; - bTextValid = FALSE; + bTextValid = sal_False; aCurrentText.Erase(); } else @@ -1988,13 +1988,13 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) !cTyped && !bCreatingFuncView ) InitRangeFinder(aStr); // Formel wird editiert -> RangeFinder - bNewTable = TRUE; // -> PostEditView-Aufruf + bNewTable = sal_True; // -> PostEditView-Aufruf } else { - bProtected = TRUE; + bProtected = sal_True; eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); UpdateFormulaMode(); if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) ) { @@ -2003,7 +2003,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) // 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 = sal_True; pActiveViewSh->GetActiveWin()->GrabFocus(); pActiveViewSh->ErrorMessage(aTester.GetMessageId()); @@ -2023,7 +2023,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); @@ -2082,17 +2082,17 @@ 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 { - bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged) + bInOwnChange = sal_True; // disable ModifyHdl (reset in DataChanged) if ( eMode == SC_INPUT_NONE ) return StartTable( cTyped, bFromCommand ); else - return FALSE; + return sal_False; } -void ScInputHandler::DataChanged( BOOL bFromTopNotify ) +void ScInputHandler::DataChanged( sal_Bool bFromTopNotify ) { ImplCreateEditEngine(); @@ -2103,7 +2103,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 @@ -2111,8 +2111,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify ) pTopView->ShowCursor(); } - bModified = TRUE; - bSelIsRef = FALSE; + bModified = sal_True; + bSelIsRef = sal_False; if ( pRangeFindList && !bInRangeUpdate ) RemoveRangeFinder(); // Attribute und Markierung loeschen @@ -2144,7 +2144,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? @@ -2165,8 +2165,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify ) } UpdateFormulaMode(); - bTextValid = FALSE; // Aenderungen sind nur in der Edit-Engine - bInOwnChange = FALSE; + bTextValid = sal_False; // Aenderungen sind nur in der Edit-Engine + bInOwnChange = sal_False; } void ScInputHandler::UpdateFormulaMode() @@ -2174,19 +2174,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(); @@ -2200,12 +2200,12 @@ void ScInputHandler::UpdateFormulaMode() if (bFormulaMode) { ShowRefFrame(); - bFormulaMode = FALSE; + bFormulaMode = sal_False; pRefViewSh = NULL; pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } } @@ -2219,13 +2219,13 @@ void ScInputHandler::ShowRefFrame() ScTabViewShell* pVisibleSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); if ( pRefViewSh && pRefViewSh != pVisibleSh ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SfxViewFrame* pRefFrame = pRefViewSh->GetViewFrame(); SfxViewFrame* pOneFrame = SfxViewFrame::GetFirst(); while ( pOneFrame && !bFound ) { if ( pOneFrame == pRefFrame ) - bFound = TRUE; + bFound = sal_True; pOneFrame = SfxViewFrame::GetNext( *pOneFrame ); } @@ -2298,35 +2298,35 @@ void ScInputHandler::SetMode( ScInputMode eNewMode ) if (bProtected) { eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); if (pActiveViewSh) pActiveViewSh->GetActiveWin()->GrabFocus(); return; } - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) ScInputMode eOldMode = eMode; eMode = eNewMode; if (eOldMode == SC_INPUT_TOP && eNewMode != eOldMode) - StopInputWinEngine( FALSE ); + StopInputWinEngine( sal_False ); if (eMode==SC_INPUT_TOP || eMode==SC_INPUT_TABLE) { if (eOldMode == SC_INPUT_NONE) // not when switching between modes { - if (StartTable(0, FALSE)) // 0 = look at existing document content for text or number + if (StartTable(0, sal_False)) // 0 = look at existing document content for text or number { if (pActiveViewSh) pActiveViewSh->GetViewData()->GetDocShell()->PostEditView( pEngine, aCursorPos ); } } - 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; iGetView(i)-> SetSelection( ESelection( nPara, nLen, nPara, nLen ) ); } - pEngine->GetView(i)->ShowCursor(FALSE); + pEngine->GetView(i)->ShowCursor(sal_False); } } @@ -2345,34 +2345,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 = sal_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 '9' ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } void lcl_SelectionToEnd( EditView* pView ) @@ -2380,7 +2380,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 @@ -2388,24 +2388,24 @@ void lcl_SelectionToEnd( EditView* pView ) } } -void ScInputHandler::EnterHandler( BYTE nBlockMode ) +void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) { // #62806# 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 = sal_False; // Formatierung vorhanden ? + sal_Bool bForget = sal_False; // wegen Gueltigkeit streichen ? String aString = GetEditText(pEngine); EditView* pActiveView = pTopView ? pTopView : pTableView; @@ -2438,7 +2438,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) { @@ -2450,7 +2450,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 } } } @@ -2467,12 +2467,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, @@ -2489,7 +2489,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) double nVal; if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) ) { - bSpellErrors = FALSE; // ignore the spelling errors + bSpellErrors = sal_False; // ignore the spelling errors } } } @@ -2497,11 +2497,11 @@ 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( sal_False ); if ( bModified && !bForget ) // was wird eingeben (Text/Objekt) ? { - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); if ( nParCnt == 0 ) nParCnt = 1; ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); @@ -2513,9 +2513,9 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) if ( pActiveViewSh ) { 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, sal_False, &pItem ); if ( eState == SFX_ITEM_SET && nId != EE_CHAR_ESCAPEMENT && nId != EE_CHAR_PAIRKERNING && nId != EE_CHAR_KERNING && nId != EE_CHAR_XMLATTRIBS && @@ -2543,14 +2543,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, sal_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 @@ -2558,34 +2558,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, sal_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, sal_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 = sal_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(); @@ -2597,7 +2597,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) //! effizienter in der Liste suchen (ScUserList, nur einmal ToUpper) - USHORT nIndex; + sal_uInt16 nIndex; ScUserListData* pData = ScGlobal::GetUserList()->GetData(aString); if ( pData && pData->GetSubIndex( aString, nIndex ) ) aString = pData->GetSubStr( nIndex ); @@ -2619,23 +2619,23 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) pExecuteSh->ActiveGrabFocus(); } - bFormulaMode = FALSE; + bFormulaMode = sal_False; pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP DeleteRangeFinder(); ResetAutoPar(); - BOOL bOldMod = bModified; + sal_Bool bOldMod = bModified; - bModified = FALSE; - bSelIsRef = FALSE; + bModified = sal_False; + bSelIsRef = sal_False; eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); // #123344# Text input (through number formats) or ApplySelectionPattern modify // the cell's attributes, so pLastPattern is no longer valid @@ -2682,7 +2682,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 ) @@ -2706,7 +2706,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(); } @@ -2719,17 +2719,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) nFormSelStart = nFormSelEnd = 0; aFormText.Erase(); - bInOwnChange = FALSE; - bInEnterHandler = FALSE; + bInOwnChange = sal_False; + bInEnterHandler = sal_False; } void ScInputHandler::CancelHandler() { - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) ImplCreateEditEngine(); - bModified = FALSE; + bModified = sal_False; // don't rely on ShowRefFrame switching the active view synchronously // execute the function directly on the correct view's bindings instead @@ -2744,11 +2744,11 @@ void ScInputHandler::CancelHandler() pExecuteSh->SetTabNo(aCursorPos.Tab()); pExecuteSh->ActiveGrabFocus(); } - bFormulaMode = FALSE; + bFormulaMode = sal_False; SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP @@ -2756,7 +2756,7 @@ void ScInputHandler::CancelHandler() ResetAutoPar(); eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); if (pExecuteSh) pExecuteSh->StopEditShell(); @@ -2764,17 +2764,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 = sal_False; } -BOOL ScInputHandler::IsModalMode( SfxObjectShell* pDocSh ) +sal_Bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh ) { // Referenzen auf unbenanntes Dokument gehen nicht @@ -2794,9 +2794,9 @@ void ScInputHandler::AddRefEntry() RemoveSelection(); if (pTableView) - pTableView->InsertText( cSep, FALSE ); + pTableView->InsertText( cSep, sal_False ); if (pTopView) - pTopView->InsertText( cSep, FALSE ); + pTopView->InsertText( cSep, sal_False ); DataChanged(); } @@ -2805,7 +2805,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()) @@ -2885,17 +2885,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 ) { @@ -2915,7 +2915,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar ) if (pTableView) { - pTableView->InsertText( aText, FALSE ); + pTableView->InsertText( aText, sal_False ); if (bAddPar) { ESelection aSel = pTableView->GetSelection(); @@ -2926,7 +2926,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar ) } if (pTopView) { - pTopView->InsertText( aText, FALSE ); + pTopView->InsertText( aText, sal_False ); if (bAddPar) { ESelection aSel = pTopView->GetSelection(); @@ -2971,51 +2971,51 @@ 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(); // Alt-Return is accepted, everything else with ALT, or CTRL-TAB are not: if (( bAlt && !bControl && nCode != KEY_RETURN ) || ( bControl && aCode.GetCode() == KEY_TAB )) - return FALSE; + return sal_False; - 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 = sal_False; + sal_Bool bSkip = sal_False; + sal_Bool bDoEnter = sal_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 ) @@ -3025,7 +3025,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,33 +3052,33 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (pActiveViewSh) pActiveViewSh->FindNextUnprot( bShift ); } - bUsed = TRUE; + bUsed = sal_True; } break; case KEY_ESCAPE: 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; } @@ -3086,8 +3086,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 ) ) ) ) { @@ -3097,14 +3097,14 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (bSelIsRef) { RemoveSelection(); - bSelIsRef = FALSE; + bSelIsRef = sal_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 @@ -3141,37 +3141,37 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (pTableView || pTopView) { -// pActiveView->SetEditEngineUpdateMode(TRUE); //! gibt Muell !!!! +// pActiveView->SetEditEngineUpdateMode(sal_True); //! gibt Muell !!!! if (bDoEnter) { 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 { if (pTableView) if ( pTableView->PostKeyEvent( rKEvt ) ) - bUsed = TRUE; + bUsed = sal_True; if (pTopView) if ( pTopView->PostKeyEvent( rKEvt ) ) - bUsed = TRUE; + bUsed = sal_True; } // Auto-Eingabe: if ( bUsed && bAutoComplete ) { - bUseTab = FALSE; + bUseTab = sal_False; nAutoPos = SCPOS_INVALID; // do not search further KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); @@ -3213,9 +3213,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 = sal_False; if ( rCEvt.GetCommand() == COMMAND_CURSORPOS ) { @@ -3230,7 +3230,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; } } } @@ -3241,7 +3241,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) if (!bOptLoaded) { bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete(); - bOptLoaded = TRUE; + bOptLoaded = sal_True; } HideTip(); @@ -3250,14 +3250,14 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) if ( bSelIsRef ) { RemoveSelection(); - bSelIsRef = FALSE; + bSelIsRef = sal_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 @@ -3290,7 +3290,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) if (pTopView) pTopView->Command( rCEvt ); - bUsed = TRUE; + bUsed = sal_True; if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT ) { @@ -3317,26 +3317,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) { // #62806# 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(*pState == *pLastState); + bRepeat = sal::static_int_cast(*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 ) @@ -3358,7 +3358,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, if ( pState ) { - BOOL bIgnore = FALSE; + sal_Bool bIgnore = sal_False; // hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP), // FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird: @@ -3373,7 +3373,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, EnterHandler(); } else - bIgnore = TRUE; + bIgnore = sal_True; } if ( !bIgnore /* || bRepeat */ ) @@ -3382,16 +3382,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 = sal_False; ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); aCursorPos = pState->GetPos(); if ( pData /* || bRepeat */ ) - bTxtMod = TRUE; + bTxtMod = sal_True; else if ( bHadObject ) - bTxtMod = TRUE; + bTxtMod = sal_True; else if ( bTextValid ) bTxtMod = ( aString != aCurrentText ); else @@ -3404,13 +3404,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, pEngine->SetText( *pData ); aString = GetEditText(pEngine); lcl_RemoveTabs(aString); - bTextValid = FALSE; + bTextValid = sal_False; aCurrentText.Erase(); } else { aCurrentText = aString; - bTextValid = TRUE; //! erst nur als String merken + bTextValid = sal_True; //! erst nur als String merken } if ( pInputWin ) @@ -3431,7 +3431,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 ) @@ -3455,19 +3455,19 @@ 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 = sal_False; + bSelIsRef = sal_False; + bProtected = sal_False; + bCommandErrorShown = sal_False; } } } -// bProtected = FALSE; +// bProtected = sal_False; if ( pInputWin) { @@ -3507,7 +3507,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, HideTip(); HideTipBelow(); - bInOwnChange = FALSE; + bInOwnChange = sal_False; } void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust ) @@ -3544,13 +3544,13 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer ) { if ( pInputWin) { - pInputWin->EnableButtons( FALSE ); + pInputWin->EnableButtons( sal_False ); pInputWin->Disable(); } } else if ( !bFormulaMode ) // #39210# 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 ); @@ -3561,7 +3561,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer ) pInputWin->Disable(); } - bInOwnChange = FALSE; + bInOwnChange = sal_False; } } } @@ -3578,20 +3578,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 ) { @@ -3611,7 +3611,7 @@ const String& ScInputHandler::GetEditString() if (pEngine) { aCurrentText = pEngine->GetText(); // immer neu aus Engine - bTextValid = TRUE; + bTextValid = sal_True; } return aCurrentText; @@ -3626,16 +3626,16 @@ Size ScInputHandler::GetTextSize() return aSize; } -BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) +sal_Bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_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, sal_False ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) { // Inhalt kopieren @@ -3646,20 +3646,20 @@ BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) // Attribute loeschen - for (USHORT i=0; i 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; @@ -3693,9 +3693,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 = sal_False; if ( pTableView ) pTableView->GetEditEngine()->SetText( EMPTY_STRING ); } @@ -3724,7 +3724,7 @@ void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd ) if (pView) pView->SetSelection( ESelection(0,nStart, 0,nEnd) ); - bModified = TRUE; + bModified = sal_True; } //------------------------------------------------------------------------ @@ -3747,13 +3747,13 @@ void ScInputHandler::InputReplaceSelection( const String& rStr ) EditView* pView = GetFuncEditView(); if (pView) { - pView->SetEditEngineUpdateMode( FALSE ); -// pView->InsertText( rStr, TRUE ); + pView->SetEditEngineUpdateMode( sal_False ); +// pView->InsertText( rStr, sal_True ); 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 b028a0a153ce..f686ffdc2929 100755 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -100,7 +100,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 ) @@ -148,7 +148,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 ( sal_False ) { ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); @@ -165,7 +165,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : } DBG_ASSERT( pViewSh, "no view shell for input window" ); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // Positionsfenster, 3 Buttons, Eingabefenster InsertWindow ( 1, &aWndPos, 0, 0 ); @@ -197,7 +197,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, sal_False ); // use own handler even if ref-handler is set if (pInputHdl) pInputHdl->SetInputWindow( this ); @@ -220,14 +220,14 @@ 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 ); } __EXPORT 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#) @@ -243,7 +243,7 @@ __EXPORT ScInputWindow::~ScInputWindow() if ( pHdl && pHdl->GetInputWindow() == this ) { pHdl->SetInputWindow( NULL ); - pHdl->StopInputWinEngine( FALSE ); // #125841# reset pTopView pointer + pHdl->StopInputWinEngine( sal_False ); // #125841# reset pTopView pointer } pSh = SfxViewShell::GetNext( *pSh, &aScType ); } @@ -371,13 +371,13 @@ void __EXPORT ScInputWindow::Select() if ( rMark.IsMarked() || rMark.IsMultiMarked() ) { ScRangeList aMarkRangeList; - rMark.FillRangeListWithMarks( &aMarkRangeList, FALSE ); + rMark.FillRangeListWithMarks( &aMarkRangeList, sal_False ); ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); // check if one of the marked ranges is empty bool bEmpty = false; - const ULONG nCount = aMarkRangeList.Count(); - for ( ULONG i = 0; i < nCount; ++i ) + const sal_uLong nCount = aMarkRangeList.Count(); + for ( sal_uLong i = 0; i < nCount; ++i ) { const ScRange aRange( *aMarkRangeList.GetObject( i ) ); if ( pDoc->IsBlockEmpty( aRange.aStart.Tab(), @@ -392,7 +392,7 @@ void __EXPORT ScInputWindow::Select() if ( bEmpty ) { ScRangeList aRangeList; - const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); if ( bDataFound ) { const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) ); @@ -402,14 +402,14 @@ void __EXPORT ScInputWindow::Select() else { const sal_Bool bSubTotal( UseSubTotal( &aMarkRangeList ) ); - for ( ULONG i = 0; i < nCount; ++i ) + for ( sal_uLong i = 0; i < nCount; ++i ) { const ScRange aRange( *aMarkRangeList.GetObject( i ) ); const bool bSetCursor = ( i == nCount - 1 ? true : false ); const bool bContinue = ( i != 0 ? true : false ); if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) ) { - pViewSh->MarkRange( aRange, FALSE, FALSE ); + pViewSh->MarkRange( aRange, sal_False, sal_False ); pViewSh->SetCursor( aRange.aEnd.Col(), aRange.aEnd.Row() ); const ScRangeList aRangeList; const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal ); @@ -422,7 +422,7 @@ void __EXPORT 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 ) ); const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal ); SetFuncString( aFormula ); @@ -472,7 +472,7 @@ void __EXPORT ScInputWindow::Select() pView->SetSelection( ESelection(0,1, 0,1) ); pScMod->InputChanged(pView); SetOkCancelMode(); - pView->SetEditEngineUpdateMode(TRUE); + pView->SetEditEngineUpdateMode(sal_True); } } break; @@ -493,7 +493,7 @@ void __EXPORT 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(); @@ -521,7 +521,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); } } } @@ -553,7 +553,7 @@ void ScInputWindow::SetOkCancelMode() SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); if (!bIsOkCancelMode) { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); RemoveItem( 3 ); // SID_INPUT_SUM und SID_INPUT_EQUAL entfernen RemoveItem( 3 ); @@ -563,7 +563,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; } } @@ -577,7 +577,7 @@ void ScInputWindow::SetSumAssignMode() SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); if (bIsOkCancelMode) { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // SID_INPUT_CANCEL, und SID_INPUT_OK entfernen RemoveItem( 3 ); @@ -588,13 +588,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 = sal_False; - SetFormulaMode(FALSE); // kein editieren -> keine Formel + SetFormulaMode(sal_False); // kein editieren -> keine Formel } } -void ScInputWindow::SetFormulaMode( BOOL bSet ) +void ScInputWindow::SetFormulaMode( sal_Bool bSet ) { aWndPos.SetFormulaMode(bSet); aTextWindow.SetFormulaMode(bSet); @@ -625,7 +625,7 @@ String __EXPORT ScInputWindow::GetText() const //UNUSED2008-05 return aTextWindow.GetEditView(); //UNUSED2008-05 } -BOOL ScInputWindow::IsInputActive() +sal_Bool ScInputWindow::IsInputActive() { return aTextWindow.IsInputActive(); } @@ -640,7 +640,7 @@ void ScInputWindow::MakeDialogEditView() aTextWindow.MakeDialogEditView(); } -void ScInputWindow::StopEditEngine( BOOL bAll ) +void ScInputWindow::StopEditEngine( sal_Bool bAll ) { aTextWindow.StopEditEngine( bAll ); } @@ -678,7 +678,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() ) @@ -705,7 +705,7 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // IMAGE macro uses pScMod, pImgMgr, bHC SetItemImage( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ) ); @@ -733,11 +733,11 @@ ScTextWnd::ScTextWnd( Window* pParent ) DragSourceHelper( this ), pEditEngine ( NULL ), pEditView ( NULL ), - bIsInsertMode( TRUE ), - bFormulaMode ( FALSE ), - bInputMode ( FALSE ) + bIsInsertMode( sal_True ), + bFormulaMode ( sal_False ), + bInputMode ( sal_False ) { - EnableRTL( FALSE ); // #106269# EditEngine can't be used with VCL EnableRTL + EnableRTL( sal_False ); // #106269# EditEngine can't be used with VCL EnableRTL bIsRTL = GetSettings().GetLayoutRTL(); @@ -751,7 +751,7 @@ 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); @@ -841,7 +841,7 @@ void __EXPORT ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) if (pEditView) { - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pEditView->MouseButtonDown( rMEvt ); } } @@ -864,8 +864,8 @@ void __EXPORT ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt ) void __EXPORT 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(); @@ -875,9 +875,9 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) // already set in StartEditEngine when the EditEngine is created // #63263# verhindern, dass die EditView beim View-Umschalten wegkommt - pScMod->SetInEditCommand( TRUE ); + pScMod->SetInEditCommand( sal_True ); pEditView->Command( rCEvt ); - pScMod->SetInEditCommand( FALSE ); + pScMod->SetInEditCommand( sal_False ); // #48929# COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde // darum in dem Fall kein InputChanged @@ -921,14 +921,14 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) else Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern... - bInputMode = FALSE; + bInputMode = sal_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, @@ -938,24 +938,24 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) void __EXPORT ScTextWnd::KeyInput(const KeyEvent& rKEvt) { - bInputMode = TRUE; + bInputMode = sal_True; if (!SC_MOD()->InputKeyEvent( rKEvt )) { - BOOL bUsed = FALSE; + sal_Bool bUsed = sal_False; ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe if (!bUsed) Window::KeyInput( rKEvt ); } - bInputMode = FALSE; + bInputMode = sal_False; } void __EXPORT ScTextWnd::GetFocus() { ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) - pViewSh->SetFormShellAtTop( FALSE ); // focus in input line -> FormShell no longer on top + pViewSh->SetFormShellAtTop( sal_False ); // focus in input line -> FormShell no longer on top } void __EXPORT ScTextWnd::LoseFocus() @@ -972,7 +972,7 @@ String __EXPORT ScTextWnd::GetText() const return GetTextString(); } -void ScTextWnd::SetFormulaMode( BOOL bSet ) +void ScTextWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -985,8 +985,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 @@ -1023,7 +1023,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 ); @@ -1057,11 +1057,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( sal_False ); pEditEngine = pNew; - pEditEngine->SetUpdateMode( FALSE ); + pEditEngine->SetUpdateMode( sal_False ); pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) ); pEditEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) ); @@ -1073,7 +1073,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( sal_False, EE_PARA_ASIANCJKSPACING ) ); if ( bIsRTL ) lcl_ModifyRTLDefaults( *pSet ); pEditEngine->SetDefaults( pSet ); @@ -1082,12 +1082,12 @@ void ScTextWnd::StartEditEngine() // #57254# 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 = sal_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 ) @@ -1099,7 +1099,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 ); @@ -1120,7 +1120,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(); } @@ -1143,13 +1143,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) { @@ -1162,7 +1162,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); @@ -1183,7 +1183,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) { if ( rNewString != aString ) { - bInputMode = TRUE; + bInputMode = sal_True; // Position der Aenderung suchen, nur Rest painten @@ -1193,14 +1193,14 @@ void ScTextWnd::SetTextString( const String& rNewString ) 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) ) { @@ -1242,7 +1242,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 @@ -1261,7 +1261,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (!maAccTextDatas.empty()) maAccTextDatas.back()->TextChanged(); - bInputMode = FALSE; + bInputMode = sal_False; } } @@ -1270,7 +1270,7 @@ const String& ScTextWnd::GetTextString() const return aString; } -BOOL ScTextWnd::IsInputActive() +sal_Bool ScTextWnd::IsInputActive() { return HasFocus(); } @@ -1292,11 +1292,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( sal_False ); pEditEngine = pNew; - pEditEngine->SetUpdateMode( FALSE ); + pEditEngine->SetUpdateMode( sal_False ); pEditEngine->SetWordDelimiters( pEditEngine->GetWordDelimiters() += '=' ); pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) ); @@ -1306,7 +1306,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 ); @@ -1381,7 +1381,7 @@ ScPosWnd::ScPosWnd( Window* pParent ) : ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ), pAccel ( NULL ), nTipVisible ( 0 ), - bFormulaMode( FALSE ) + bFormulaMode( sal_False ) { Size aSize( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GW99999:GW99999")) ), GetTextHeight() ); @@ -1403,7 +1403,7 @@ __EXPORT ScPosWnd::~ScPosWnd() delete pAccel; } -void ScPosWnd::SetFormulaMode( BOOL bSet ) +void ScPosWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -1439,12 +1439,12 @@ void ScPosWnd::FillRangeNames() // per Hand sortieren, weil Funktionen nicht sortiert werden: ScRangeName* pRangeNames = pDoc->GetRangeName(); - USHORT nCount = pRangeNames->GetCount(); + sal_uInt16 nCount = pRangeNames->GetCount(); if ( nCount > 0 ) { - USHORT nValidCount = 0; + sal_uInt16 nValidCount = 0; ScRange aDummy; - USHORT i; + sal_uInt16 i; for ( i=0; iGetAppOptions(); - 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; iGetCount(); + for (sal_uInt16 i=0; iGetFunction( j ); if ( pDesc->nFIndex == nId && pDesc->pFuncName ) @@ -1522,13 +1522,13 @@ void __EXPORT 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(); } @@ -1602,7 +1602,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: @@ -1644,7 +1644,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); } } @@ -1697,7 +1697,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 ) @@ -1707,7 +1707,7 @@ void ScPosWnd::DoEnter() ScDocument* pDoc = pDocShell->GetDocument(); ScRangeName* pNames = pDoc->GetRangeName(); ScRange aSelection; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; if ( pNames && !pNames->SearchName( aText, nIndex ) && (pViewData->GetSimpleArea( aSelection ) == SC_MARK_SIMPLE) ) { @@ -1719,8 +1719,8 @@ void ScPosWnd::DoEnter() if ( aNewRanges.Insert(pNew) ) { ScDocFunc aFunc(*pDocShell); - aFunc.ModifyRangeNames( aNewRanges, FALSE ); - pViewSh->UpdateInputHandler(TRUE); + aFunc.ModifyRangeNames( aNewRanges, sal_False ); + pViewSh->UpdateInputHandler(sal_True); } else delete pNew; // shouldn't happen @@ -1731,7 +1731,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/msgpool.cxx b/sc/source/ui/app/msgpool.cxx index 78cb70fa64f0..6f471ebaa91b 100644 --- a/sc/source/ui/app/msgpool.cxx +++ b/sc/source/ui/app/msgpool.cxx @@ -66,11 +66,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, sal_False ) ), aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ), aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ), // - aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) ) + aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, sal_False ) ) { ppPoolDefaults = new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1]; @@ -98,7 +98,7 @@ __EXPORT 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; @@ -107,7 +107,7 @@ __EXPORT ScMessagePool::~ScMessagePool() } -SfxMapUnit __EXPORT ScMessagePool::GetMetric( USHORT nWhich ) const +SfxMapUnit __EXPORT 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 3d62c0396b51..4f61fdb23263 100644 --- a/sc/source/ui/app/rfindlst.cxx +++ b/sc/source/ui/app/rfindlst.cxx @@ -44,7 +44,7 @@ static ColorData aColNames[SC_RANGECOLORS] = ScRangeFindList::ScRangeFindList(const String& rName) : aDocName( rName ), - bHidden( FALSE ) + bHidden( sal_False ) { } @@ -58,7 +58,7 @@ ScRangeFindList::~ScRangeFindList() } } -ColorData ScRangeFindList::GetColorName( USHORT nIndex ) // static +ColorData ScRangeFindList::GetColorName( sal_uInt16 nIndex ) // static { return aColNames[nIndex % SC_RANGECOLORS]; } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 8051399d06fa..9a1858fe5170 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -135,11 +135,11 @@ //UNUSED2008-05 //UNUSED2008-05 class ScLibOptions : public utl::ConfigItem //UNUSED2008-05 { -//UNUSED2008-05 BOOL bWK3Flag; +//UNUSED2008-05 sal_Bool bWK3Flag; //UNUSED2008-05 //UNUSED2008-05 public: //UNUSED2008-05 ScLibOptions(); -//UNUSED2008-05 BOOL GetWK3Flag() const { return bWK3Flag; } +//UNUSED2008-05 sal_Bool GetWK3Flag() const { return bWK3Flag; } //UNUSED2008-05 }; //UNUSED2008-05 //UNUSED2008-05 #define CFGPATH_LIBFILTER "Office.Calc/Filter/Import/Lotus123" @@ -147,7 +147,7 @@ //UNUSED2008-05 //UNUSED2008-05 ScLibOptions::ScLibOptions() : //UNUSED2008-05 ConfigItem( rtl::OUString::createFromAscii( CFGPATH_LIBFILTER ) ), -//UNUSED2008-05 bWK3Flag( FALSE ) +//UNUSED2008-05 bWK3Flag( sal_False ) //UNUSED2008-05 { //UNUSED2008-05 com::sun::star::uno::Sequence aNames(1); //UNUSED2008-05 aNames[0] = rtl::OUString::createFromAscii( ENTRYSTR_WK3 ); @@ -158,7 +158,7 @@ //------------------------------------------------------------------ -ScResId::ScResId( USHORT nId ) : +ScResId::ScResId( sal_uInt16 nId ) : ResId( nId, *SC_MOD()->GetResMgr() ) { } @@ -265,7 +265,7 @@ void ScDLL::Init() ::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod ); // common SFX controller - ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod ); + ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod ); // Svx-StatusBar-Controller SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod); @@ -291,39 +291,39 @@ void ScDLL::Init() ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK); ScNavigatorDialogWrapper ::RegisterChildWindowContext( sal::static_int_cast(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(sal_False, pMod); + ScOptSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScNameDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScPivotLayoutWrapper ::RegisterChildWindow(sal_False, pMod); + ScTabOpDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScSpecialFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScDbNameDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScConsolidateDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScPrintAreasDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScCondFormatDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScColRowNameRangesDlgWrapper::RegisterChildWindow(sal_False, pMod); + ScFormulaDlgWrapper ::RegisterChildWindow(sal_False, pMod); // First docking Window for Calc - ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod); + ScFunctionChildWindow ::RegisterChildWindow(sal_False, pMod); // Redlining- Window - 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); - SvxHyperlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_FORCEDOCK); - SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod); - GalleryChildWindow ::RegisterChildWindow(FALSE, pMod); - ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod); - ::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod); + ScAcceptChgDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScSimpleRefDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE ); + ScHighlightChgDlgWrapper ::RegisterChildWindow(sal_False, pMod); + + SvxSearchDialogWrapper ::RegisterChildWindow(sal_False, pMod); + SvxHlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod); + SvxFontWorkChildWindow ::RegisterChildWindow(sal_False, pMod); + SvxHyperlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_FORCEDOCK); + SvxIMapDlgChildWindow ::RegisterChildWindow(sal_False, pMod); + GalleryChildWindow ::RegisterChildWindow(sal_False, pMod); + ScSpellDialogChildWindow ::RegisterChildWindow(sal_False, pMod); + ::avmedia::MediaPlayer ::RegisterChildWindow(sal_False, pMod); //Added by PengYunQuan for Validity Cell Range Picker // Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init @@ -346,7 +346,7 @@ void ScDLL::Init() // ::com::sun::star::form::component::Form-Objekt-Factory eintragen FmFormObjFactory(); - pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast(pMod->GetAppOptions().GetAppMetric()) ) ); + pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast(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 f7a02e1577f7..563f83a431ce 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -122,7 +122,7 @@ #define SC_IDLE_STEP 75 #define SC_IDLE_COUNT 50 -static USHORT nIdleCount = 0; +static sal_uInt16 nIdleCount = 0; //------------------------------------------------------------------ @@ -137,7 +137,7 @@ SFX_IMPL_INTERFACE( ScModule, SfxShell, ScResId(RID_APPTITLE) ) //------------------------------------------------------------------ ScModule::ScModule( SfxObjectFactory* pFact ) : - SfxModule( SfxApplication::CreateResManager( "sc" ), FALSE, pFact, NULL ), + SfxModule( SfxApplication::CreateResManager( "sc" ), sal_False, pFact, NULL ), pSelTransfer( NULL ), pMessagePool( NULL ), pRefInputHandler( NULL ), @@ -156,9 +156,9 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : pSvxErrorHdl( NULL ), pFormEditData( NULL ), nCurRefDlgId( 0 ), - bIsWaterCan( FALSE ), - bIsInEditCommand( FALSE ), - bIsInExecuteDrop( FALSE ), + bIsWaterCan( sal_False ), + bIsInEditCommand( sal_False ), + bIsInExecuteDrop( sal_False ), mbIsInSharedDocLoading( false ), mbIsInSharedDocSaving( false ) { @@ -221,10 +221,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 ) { @@ -329,7 +329,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 @@ -383,7 +383,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 ) { @@ -409,9 +409,9 @@ void ScModule::Execute( SfxRequest& rReq ) 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 @@ -432,7 +432,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 ) @@ -462,7 +462,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 ); @@ -475,7 +475,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_DETECTIVE_AUTO: { ScAppOptions aNewOpts( GetAppOptions() ); - BOOL bNew = !aNewOpts.GetDetectiveAuto(); + sal_Bool bNew = !aNewOpts.GetDetectiveAuto(); SFX_REQUEST_ARG( rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO, sal_False ); if ( pAuto ) bNew = pAuto->GetValue(); @@ -516,7 +516,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; @@ -590,7 +590,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 ) @@ -605,17 +605,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(GetAppOptions().GetAppMetric()) ) ); + rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast(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 ) ); @@ -650,7 +650,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 @@ -778,22 +778,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 = sal_False; while ((n < LRU_MAX) && nGetDocument() : NULL; const SfxPoolItem* pItem = NULL; - BOOL bRepaint = FALSE; - BOOL bUpdateMarks = FALSE; - BOOL bUpdateRefDev = FALSE; - BOOL bCalcAll = FALSE; - BOOL bSaveSpellCheck = FALSE; - BOOL bSaveAppOptions = FALSE; - BOOL bSaveInputOptions = FALSE; + sal_Bool bRepaint = sal_False; + sal_Bool bUpdateMarks = sal_False; + sal_Bool bUpdateRefDev = sal_False; + sal_Bool bCalcAll = sal_False; + sal_Bool bSaveSpellCheck = sal_False; + sal_Bool bSaveAppOptions = sal_False; + sal_Bool bSaveInputOptions = sal_False; //-------------------------------------------------------------------------- @@ -1002,19 +1002,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(pItem)->GetValue() ); - bSaveAppOptions = TRUE; + bSaveAppOptions = sal_True; } //============================================ @@ -1030,7 +1030,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 ) @@ -1038,7 +1038,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(); @@ -1069,7 +1069,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) pViewData->SetOptions( aNewViewOpt ); pViewData->GetDocument()->SetViewOptions( aNewViewOpt ); pDocSh->SetDocumentModified(); - bRepaint = TRUE; + bRepaint = sal_True; } } ScViewOptions aNewViewOpt ( GetViewOptions() ); @@ -1117,7 +1117,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 ); @@ -1137,7 +1137,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) { @@ -1158,7 +1158,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 ??? } } @@ -1166,7 +1166,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( bOldAutoSpell != bDoAutoSpell ) { SetAutoSpellProperty( bDoAutoSpell ); - bSaveSpellCheck = TRUE; + bSaveSpellCheck = sal_True; } if ( pDocSh ) pDocSh->PostPaintGridAll(); // wegen Markierungen @@ -1187,53 +1187,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; } //============================================ @@ -1270,9 +1270,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 } @@ -1330,7 +1330,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(), sal_False ); // repaint pOneViewSh->PaintGrid(); @@ -1350,7 +1350,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; @@ -1389,25 +1389,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 ) : sal_False ); } -void ScModule::InputEnterHandler( BYTE nBlockMode ) +void ScModule::InputEnterHandler( sal_uInt8 nBlockMode ) { if ( !SFX_APP()->IsDowning() ) // nicht beim Programmende { @@ -1488,7 +1488,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 ) @@ -1499,10 +1499,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, sal_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 @@ -1514,8 +1514,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, sal_False ); + // SetSumAssignMode wegen sal_False nicht noetig } pHdl->CancelHandler(); } @@ -1528,7 +1528,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) @@ -1554,7 +1554,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) else { // no ScTabViewShell - possible for example from a Basic macro - bVis = FALSE; + bVis = sal_False; nCurRefDlgId = 0; // don't set nCurRefDlgId if no dialog is created } @@ -1566,7 +1566,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 @@ -1592,12 +1592,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 = sal_False; if ( nCurRefDlgId ) { @@ -1613,7 +1613,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 @@ -1629,12 +1629,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 = sal_False; // bisher nur bei ScAnyRefDlg @@ -1644,18 +1644,18 @@ BOOL ScModule::IsTableLocked() if ( pChildWnd ) bLocked = dynamic_cast(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 = sal_False; if ( nCurRefDlgId ) { @@ -1663,18 +1663,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 = sal_False; if ( nCurRefDlgId ) { @@ -1693,7 +1693,7 @@ BOOL ScModule::IsFormulaMode() } if (bIsInEditCommand) - bIsFormula = TRUE; + bIsFormula = sal_True; return bIsFormula; } @@ -1702,14 +1702,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 = sal_False; } } } @@ -1744,8 +1744,8 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, IAnyRefDialog* pRefDlg = dynamic_cast(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( sal_False ); pRefDlg->SetReference( aNew, pDoc ); } } @@ -1813,7 +1813,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 ); @@ -1841,15 +1841,15 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG ) return 0; } - BOOL bMore = FALSE; + sal_Bool bMore = sal_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 @@ -1861,8 +1861,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; @@ -1907,7 +1907,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) @@ -1951,7 +1951,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId ) // SFX_APP()->GetOptions( aSet ); pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, - sal::static_int_cast(GetAppOptions().GetAppMetric()) ) ); + sal::static_int_cast(GetAppOptions().GetAppMetric()) ) ); // TP_CALC pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, @@ -2000,7 +2000,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) { @@ -2008,7 +2008,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(); @@ -2128,59 +2128,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 & 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 sal_False; } -BOOL ScModule::UnregisterRefWindow( USHORT nSlotId, Window *pWnd ) +sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) { - std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return FALSE; + return sal_False; std::list & rlRefWindow = iSlot->second; std::list::iterator i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ); if( i == rlRefWindow.end() ) - return FALSE; + return sal_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 >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return FALSE; + return sal_False; std::list & 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 >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) return NULL; @@ -2203,7 +2203,7 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor ) while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent; - for( std::map >::iterator i = m_mapRefWindow.begin(); + for( std::map >::iterator i = m_mapRefWindow.begin(); i!=m_mapRefWindow.end(); i++ ) for( std::list::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 c92f0bf5d206..9ac668b9d4a3 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -50,8 +50,8 @@ using namespace com::sun::star; //------------------------------------------------------------------ // static -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 @@ -67,7 +67,7 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt } // static -void ScModule::SetAutoSpellProperty( BOOL bSet ) +void ScModule::SetAutoSpellProperty( sal_Bool bSet ) { // use SvtLinguConfig instead of service LinguProperties to avoid // loading the linguistic component @@ -81,15 +81,15 @@ void ScModule::SetAutoSpellProperty( BOOL bSet ) // static -BOOL ScModule::HasThesaurusLanguage( USHORT nLang ) +sal_Bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang ) { if ( nLang == LANGUAGE_NONE ) - return FALSE; + return sal_False; lang::Locale aLocale; SvxLanguageToLocale( aLocale, nLang ); - BOOL bHasLang = FALSE; + sal_Bool bHasLang = sal_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 0b213709863d..f6872ef38f09 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -55,9 +55,9 @@ using namespace com::sun::star; // ----------------------------------------------------------------------- -BOOL lcl_IsURLButton( SdrObject* pObject ) +sal_Bool lcl_IsURLButton( SdrObject* pObject ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObject); if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) @@ -75,7 +75,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 sal_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, sal_False, sal_True, sal_True, sal_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 ); diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx index 80dc667c5de6..806ea0bc61dd 100644 --- a/sc/source/ui/app/template.cxx +++ b/sc/source/ui/app/template.cxx @@ -34,7 +34,7 @@ //------------------------------------------------------------------------ -ScTemplateDlg::ScTemplateDlg(Window * pParent, USHORT nAppResource) : +ScTemplateDlg::ScTemplateDlg(Window * pParent, sal_uInt16 nAppResource) : // SfxTemplateDlg( pParent, nAppResource ) SfxTemplateDialog( pParent ) { @@ -48,9 +48,9 @@ __EXPORT ScTemplateDlg::~ScTemplateDlg() //------------------------------------------------------------------------ -BOOL ScTemplateDlg::New(String &rNewName) +sal_Bool ScTemplateDlg::New(String &rNewName) { - return TRUE; + return sal_True; } @@ -59,9 +59,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 e6b8b3b5049a..1f9d0d4986bc 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 // static 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,8 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc nDragHandleX( 0 ), nDragHandleY( 0 ), nDragSourceFlags( 0 ), - bDragWasInternal( FALSE ), - bUsedForLink( FALSE ), + bDragWasInternal( sal_False ), + bUsedForLink( sal_False ), bUseInApi( false ) { DBG_ASSERT(pDoc->IsClipboard(), "wrong document"); @@ -148,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( nCol2 + nCol1 ); nRow2 = sal::static_int_cast( nRow2 + nRow1 ); SCCOL nDummy; - pDoc->GetClipArea( nDummy, nNonFiltered, FALSE ); + pDoc->GetClipArea( nDummy, nNonFiltered, sal_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 = sal_False; } DBG_ASSERT(!bFirst, "no sheet selected"); @@ -306,9 +306,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 ); if ( bUsedForLink ) @@ -342,7 +342,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, sal_False ); aVirtDev.SetMapMode( MapMode( MAP_PIXEL ) ); Bitmap aBmp = aVirtDev.GetBitmap( Point(), aVirtDev.GetOutputSize() ); @@ -360,7 +360,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) MapMode aMapMode( pEmbObj->GetMapUnit() ); Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); - aVDev.EnableOutput( FALSE ); + aVDev.EnableOutput( sal_False ); aVDev.SetMapMode( aMapMode ); aMtf.SetPrefSize( aVisArea.GetSize() ); aMtf.SetPrefMapMode( aMapMode ); @@ -419,7 +419,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,7 +446,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj // mba: no relative ULRs for clipboard! SfxMedium aMedium( xWorkStore, String() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); @@ -461,7 +461,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj delete pSrcStm; } - bRet = TRUE; + bRet = sal_True; xWorkStore->dispose(); xWorkStore = uno::Reference < embed::XStorage >(); @@ -494,8 +494,8 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction ) { ScMarkData aMarkData = GetSourceMarkData(); // external drag&drop doesn't copy objects, so they also aren't deleted: - // #105703# bApi=TRUE, don't show error messages from drag&drop - pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, TRUE, TRUE ); + // #105703# bApi=sal_True, don't show error messages from drag&drop + pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, sal_True, sal_True ); } } @@ -527,18 +527,18 @@ void ScTransferObj::SetDrawPersist( const SfxObjectShellRef& rRef ) void ScTransferObj::SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark ) { ScRangeList aRanges; - rMark.FillRangeListWithMarks( &aRanges, FALSE ); + rMark.FillRangeListWithMarks( &aRanges, sal_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 ) @@ -570,7 +570,7 @@ ScMarkData ScTransferObj::GetSourceMarkData() if (pRangesObj) { const ScRangeList& rRanges = pRangesObj->GetRangeList(); - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); } return aMarkData; } @@ -590,13 +590,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, sal_False ); // no UpdateRef (empty) pDestDoc->CopyStdStylesFrom( pDoc ); @@ -613,19 +613,19 @@ void ScTransferObj::InitDocShell() pDestDoc->SetLayoutRTL(0, pDoc->IsLayoutRTL(nSrcTab)); for (nCol=nStartX; nCol<=nEndX; nCol++) if ( pDoc->ColHidden(nCol, nSrcTab, nLastCol) ) - pDestDoc->ShowCol( nCol, 0, FALSE ); + pDestDoc->ShowCol( nCol, 0, sal_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); SCROW nLastRow = -1; if ( pDoc->RowHidden(nRow, nSrcTab, nLastRow) ) - pDestDoc->ShowRow( nRow, 0, FALSE ); + pDestDoc->ShowRow( nRow, 0, sal_False ); else { pDestDoc->SetRowHeight( nRow, 0, pDoc->GetOriginalHeight( nRow, nSrcTab ) ); @@ -644,16 +644,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, sal_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 @@ -722,7 +722,7 @@ void ScTransferObj::InitDocShell() //pDocSh->SvInPlaceObject::SetVisArea( aNewArea ); pDocSh->SetVisArea( aNewArea ); - pDocSh->UpdateOle(&aViewData, TRUE); + pDocSh->UpdateOle(&aViewData, sal_True); //! SetDocumentModified? if ( pDestDoc->IsChartListenerCollectionNeedsUpdate() ) @@ -731,7 +731,7 @@ void ScTransferObj::InitDocShell() } // static -SfxObjectShell* ScTransferObj::SetDrawClipDoc( BOOL bAnyOle ) +SfxObjectShell* ScTransferObj::SetDrawClipDoc( sal_Bool bAnyOle ) { // update ScGlobal::pDrawClipDocShellRef @@ -786,14 +786,14 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, if (pCell->GetCellType() == CELLTYPE_FORMULA) { ScFormulaCell* pFCell = (ScFormulaCell*) pCell; - BOOL bOut = FALSE; + sal_Bool bOut = sal_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) { @@ -801,7 +801,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) ); @@ -829,11 +829,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 a63491f0929b..75a21a5a7700 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -57,7 +57,7 @@ TYPEINIT1(ScIndexHint, SfxHint); // ScInputStatusItem - Status-Update fuer Eingabezeile // ----------------------------------------------------------------------- -//UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, +//UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, //UNUSED2008-05 SCTAB nTab, //UNUSED2008-05 SCCOL nCol, SCROW nRow, //UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow, @@ -73,7 +73,7 @@ TYPEINIT1(ScIndexHint, SfxHint); //UNUSED2008-05 { //UNUSED2008-05 } -ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, +ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, @@ -132,7 +132,7 @@ SfxPoolItem* __EXPORT 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 ) @@ -148,7 +148,7 @@ ScTablesHint::~ScTablesHint() // ScIndexHint // ----------------------------------------------------------------------- -ScIndexHint::ScIndexHint(USHORT nNewId, USHORT nIdx) : +ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) : nId( nNewId ), nIndex( nIdx ) { @@ -177,7 +177,7 @@ ScEditViewHint::~ScEditViewHint() // ScSortItem - Daten fuer den Sortierdialog // ----------------------------------------------------------------------- -ScSortItem::ScSortItem( USHORT nWhichP, +ScSortItem::ScSortItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), @@ -188,7 +188,7 @@ ScSortItem::ScSortItem( USHORT nWhichP, //------------------------------------------------------------------------ -ScSortItem::ScSortItem( USHORT nWhichP, +ScSortItem::ScSortItem( sal_uInt16 nWhichP, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) @@ -237,7 +237,7 @@ SfxPoolItem* __EXPORT ScSortItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const +sal_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(); @@ -248,23 +248,23 @@ sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMember // 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 ( sal_False ) { if ( pQueryData ) theQueryData = *pQueryData; } //------------------------------------------------------------------------ -ScQueryItem::ScQueryItem( USHORT nWhichP, +ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( sal_False ) { if ( pQueryData ) theQueryData = *pQueryData; } @@ -291,13 +291,13 @@ void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource) if (pSource) { aAdvSource = *pSource; - bIsAdvanced = TRUE; + bIsAdvanced = sal_True; } else - bIsAdvanced = FALSE; + bIsAdvanced = sal_False; } -BOOL ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const +sal_Bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const { rSource = aAdvSource; return bIsAdvanced; @@ -335,7 +335,7 @@ SfxPoolItem* __EXPORT 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 ), @@ -346,7 +346,7 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, //------------------------------------------------------------------------ -ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, +ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) @@ -395,7 +395,7 @@ SfxPoolItem* __EXPORT ScSubTotalItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const +sal_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(); @@ -406,7 +406,7 @@ sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMe // ScUserListItem - Transporter fuer den Benutzerlisten-TabPage // ----------------------------------------------------------------------- -ScUserListItem::ScUserListItem( USHORT nWhichP ) +ScUserListItem::ScUserListItem( sal_uInt16 nWhichP ) : SfxPoolItem ( nWhichP ), pUserList ( NULL ) { @@ -442,7 +442,7 @@ int __EXPORT 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 = sal_False; if ( !pUserList || !(r.pUserList) ) bEqual = ( !pUserList && !(r.pUserList) ); @@ -473,7 +473,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList ) // ----------------------------------------------------------------------- ScConsolidateItem::ScConsolidateItem( - USHORT nWhichP, + sal_uInt16 nWhichP, const ScConsolidateParam* pConsolidateData ) : SfxPoolItem ( nWhichP ) { @@ -524,8 +524,8 @@ SfxPoolItem* __EXPORT 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 @@ -587,7 +587,7 @@ SfxPoolItem* __EXPORT ScPivotItem::Clone( SfxItemPool * ) const // ScSolveItem - Daten fuer den Solver-Dialog // ----------------------------------------------------------------------- -ScSolveItem::ScSolveItem( USHORT nWhichP, +ScSolveItem::ScSolveItem( sal_uInt16 nWhichP, const ScSolveParam* pSolveData ) : SfxPoolItem ( nWhichP ) { @@ -637,7 +637,7 @@ SfxPoolItem* __EXPORT ScSolveItem::Clone( SfxItemPool * ) const // ScTabOpItem - Daten fuer den TabOp-Dialog // ----------------------------------------------------------------------- -ScTabOpItem::ScTabOpItem( USHORT nWhichP, +ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP, const ScTabOpParam* pTabOpData ) : SfxPoolItem ( nWhichP ) { @@ -688,7 +688,7 @@ SfxPoolItem* __EXPORT 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 ca62ebb887a5..ed23044bf85c 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -78,7 +78,7 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP, AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 ); //CHINA001 AddTabPage( TP_NUMBER, SvxNumberFormatTabPage::Create, 0 ); #else String number = rtl::OUString::createFromAscii ("Numbers"); - AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, FALSE, TAB_APPEND); + AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, sal_False, TAB_APPEND); #endif DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");//CHINA001 AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 ); //CHINA001 AddTabPage( TP_FONT, SvxCharNamePage::Create, 0 ); @@ -112,7 +112,7 @@ __EXPORT ScAttrDlg::~ScAttrDlg() // ----------------------------------------------------------------------- -void __EXPORT ScAttrDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) +void __EXPORT ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); //CHINA001 diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx index 5e3b23af8afa..8a7c4b05454d 100644 --- a/sc/source/ui/attrdlg/condfrmt.cxx +++ b/sc/source/ui/attrdlg/condfrmt.cxx @@ -102,7 +102,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), pEdActive ( NULL ), - bDlgLostFocus ( FALSE ), + bDlgLostFocus ( sal_False ), pDoc ( pCurDoc ) { @@ -187,7 +187,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aCond2Size2 = Size( aPos.X() - aCond2Pos2.X(), aCond2Size3.Height() ); aCond2Size1 = Size( aPos.X() - aCond2Pos1.X(), aCond2Size3.Height() ); - aCbxCond2.Check( FALSE ); + aCbxCond2.Check( sal_False ); aLbCond21.SelectEntryPos( 0 ); aLbCond22.SelectEntryPos( 0 ); @@ -202,7 +202,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aCond3Size2 = Size( aPos.X() - aCond3Pos2.X(), aCond3Size3.Height() ); aCond3Size1 = Size( aPos.X() - aCond3Pos1.X(), aCond3Size3.Height() ); - aCbxCond3.Check( FALSE ); + aCbxCond3.Check( sal_False ); aLbCond31.SelectEntryPos( 0 ); aLbCond32.SelectEntryPos( 0 ); @@ -255,7 +255,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( ; else // via Werte { - aLbCond12.SelectEntryPos( sal::static_int_cast( eMode ) ); + aLbCond12.SelectEntryPos( sal::static_int_cast( 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( eMode ) ); + aLbCond22.SelectEntryPos( sal::static_int_cast( 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( eMode ) ); + aLbCond32.SelectEntryPos( sal::static_int_cast( eMode ) ); if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) ) aEdtCond32.SetText( pEntry->GetExpression( aCurPos, 1 ) ); } @@ -374,7 +374,7 @@ void ScConditionalFormatDlg::AddRefEntry() //---------------------------------------------------------------------------- -BOOL ScConditionalFormatDlg::IsRefInputMode() const +sal_Bool ScConditionalFormatDlg::IsRefInputMode() const { return (pEdActive != NULL); } @@ -386,7 +386,7 @@ void ScConditionalFormatDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if( pEdActive ) pEdActive->GrabFocus(); } @@ -459,7 +459,7 @@ void ScConditionalFormatDlg::GetConditionalFormat( ScConditionalFormat& rCndFmt //---------------------------------------------------------------------------- // Zerstoert den Dialog -BOOL ScConditionalFormatDlg::Close() +sal_Bool ScConditionalFormatDlg::Close() { return DoClose( ScCondFormatDlgWrapper::GetChildWindowId() ); } @@ -473,7 +473,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 ); @@ -495,7 +495,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 { @@ -525,7 +525,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG ) { if( aLbCond12.IsVisible() ) { - USHORT nPos = aLbCond12.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond12.GetSelectEntryPos(); if( nPos == 6 || nPos == 7 ) // zwischen, n. zwischen { @@ -554,7 +554,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 ); @@ -576,7 +576,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 { @@ -606,7 +606,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG ) { if( aLbCond22.IsVisible() ) { - USHORT nPos = aLbCond22.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond22.GetSelectEntryPos(); if( nPos == 6 || nPos == 7 ) // zwischen, n. zwischen { @@ -635,7 +635,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 ); @@ -657,7 +657,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 { @@ -687,7 +687,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond32Hdl, void *, EMPTYARG ) { if( aLbCond32.IsVisible() ) { - USHORT nPos = aLbCond32.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond32.GetSelectEntryPos(); if( nPos == 6 || nPos == 7 ) // zwischen, n. zwischen { @@ -757,7 +757,7 @@ IMPL_LINK( ScConditionalFormatDlg, BtnHdl, PushButton*, pBtn ) GetConditionalFormat( aCondFrmt ); ScCondFrmtItem aOutItem( FID_CONDITIONAL_FORMAT, aCondFrmt ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_CONDITIONAL_FORMAT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -781,7 +781,7 @@ 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); diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 812b43645fc4..45f1ff7d549a 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -119,7 +119,7 @@ IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl); IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg // AbstractTabDialog_Impl begin -void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -129,7 +129,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } //add by CHINA001 -const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -154,7 +154,7 @@ namespace layout IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg // AbstractTabDialog_Impl begin -void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -164,7 +164,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } //add by CHINA001 -const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -205,7 +205,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(); } @@ -220,11 +220,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(); } @@ -244,12 +244,12 @@ void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc ) //AbstractScDataPilotSourceTypeDlg_Impl begin -BOOL AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const +sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const { return pDlg->IsDatabase(); } -BOOL AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const +sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const { return pDlg->IsExternal(); } @@ -294,7 +294,7 @@ void AbstractScDeleteContentsDlg_Impl::DisableObjects() { pDlg->DisableObjects(); } -USHORT AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const +sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const { return pDlg->GetDelContentsCmdBits(); } @@ -332,14 +332,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); } //add for AbstractScFillSeriesDlg_Impl end //add for AbstractScGroupDlg_Impl begin -BOOL AbstractScGroupDlg_Impl::GetColsChecked() const +sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const { return pDlg->GetColsChecked(); } @@ -356,39 +356,39 @@ InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const //add for AbstractScInsertContentsDlg_Impl begin -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 ); } @@ -405,16 +405,16 @@ InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode() //add for AbstractScInsertTableDlg_Impl begin -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 ); } @@ -422,15 +422,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 ); } @@ -446,7 +446,7 @@ String AbstractScSelEntryDlg_Impl::GetSelectEntry() const //add for AbstractScLinkedAreaDlg_Impl begin 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); } @@ -467,7 +467,7 @@ String AbstractScLinkedAreaDlg_Impl::GetSource() { return pDlg->GetSource(); } -ULONG AbstractScLinkedAreaDlg_Impl::GetRefresh() +sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh() { return pDlg->GetRefresh(); } @@ -483,31 +483,31 @@ long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const //add for AbstractScMetricInputDlg_Impl end //add for AbstractScMoveTableDlg_Impl begin -USHORT AbstractScMoveTableDlg_Impl::GetSelectedDocument() const //add for ScMoveTableDlg +sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const //add for ScMoveTableDlg { return pDlg->GetSelectedDocument(); } -USHORT AbstractScMoveTableDlg_Impl::GetSelectedTable() const +sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const { return pDlg->GetSelectedTable(); } -BOOL AbstractScMoveTableDlg_Impl::GetCopyTable() const +sal_Bool AbstractScMoveTableDlg_Impl::GetCopyTable() const { return pDlg->GetCopyTable(); } -void AbstractScMoveTableDlg_Impl::SetCopyTable(BOOL bFla) +void AbstractScMoveTableDlg_Impl::SetCopyTable(sal_Bool bFla) { return pDlg->SetCopyTable( bFla ); } -void AbstractScMoveTableDlg_Impl::EnableCopyTable(BOOL bFlag) +void AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag) { return pDlg->EnableCopyTable( bFlag); } //add for AbstractScMoveTableDlg_Impl end //add for AbstractScNameCreateDlg_Impl begin -USHORT AbstractScNameCreateDlg_Impl::GetFlags() const //add for ScNameCreateDlg +sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const //add for ScNameCreateDlg { return pDlg->GetFlags(); } @@ -529,7 +529,7 @@ const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem() //add for S //add for AbstractScPivotFilterDlg_Impl end //add for AbstractScDPFunctionDlg_Impl begin -USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionDlg +sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionDlg { return pDlg->GetFuncMask(); } @@ -540,7 +540,7 @@ USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionD //add for AbstractScDPFunctionDlg_Impl end //add for AbstractScDPSubtotalDlg_Impl begin -USHORT AbstractScDPSubtotalDlg_Impl::GetFuncMask() const //add for ScDPSubtotalDlg +sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const //add for ScDPSubtotalDlg { return pDlg->GetFuncMask(); } @@ -574,13 +574,13 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const //add for AbstractScNewScenarioDlg_Impl begin 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); } @@ -588,12 +588,12 @@ void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rCom //add for AbstractScNewScenarioDlg_Impl end //add for AbstractScShowTabDlg_Impl begin -void AbstractScShowTabDlg_Impl::Insert( const String& rString, BOOL bSelected ) //add for ScShowTabDlg +void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected ) //add for ScShowTabDlg { pDlg->Insert( rString, bSelected); } -USHORT AbstractScShowTabDlg_Impl::GetSelectEntryCount() const +sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const { return pDlg->GetSelectEntryCount(); } @@ -603,11 +603,11 @@ void AbstractScShowTabDlg_Impl::SetDescription( { 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); } @@ -713,8 +713,8 @@ AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( W AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent, //add for ScColRowLabelDlg int nId, - BOOL bCol , - BOOL bRow) + sal_Bool bCol , + sal_Bool bRow) { ScColRowLabelDlg* pDlg=NULL; switch ( nId ) @@ -739,7 +739,7 @@ VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window* const String& rStrTitle, const String& rStrLabel, int nId, - BOOL bColDefault) + sal_Bool bColDefault) { Dialog * pDlg=NULL; switch ( nId ) @@ -799,7 +799,7 @@ AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilo //add for ScDataPilotSourceTypeDlg begin AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( Window* pParent, - BOOL bEnableExternal, + sal_Bool bEnableExternal, int nId ) { ScDataPilotSourceTypeDlg * pDlg=NULL; @@ -844,7 +844,7 @@ AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSe //add for ScDeleteCellDlg begin AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Window* pParent, int nId, - BOOL bDisallowCellMove ) + sal_Bool bDisallowCellMove ) { ScDeleteCellDlg * pDlg=NULL; switch ( nId ) @@ -865,7 +865,7 @@ AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Wi //add for ScDeleteContentsDlg begin AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg - USHORT nCheckDefaults ) + sal_uInt16 nCheckDefaults ) { ScDeleteContentsDlg * pDlg=NULL; switch ( nId ) @@ -893,7 +893,7 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi String aStartStr, double fStep, double fMax, - USHORT nPossDir, + sal_uInt16 nPossDir, int nId) { ScFillSeriesDlg * pDlg=NULL; @@ -915,10 +915,10 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi //add for ScGroupDlg begin 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 ) @@ -942,7 +942,7 @@ AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Wind //add for ScInsertCellDlg begin AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg int nId, - BOOL bDisallowCellMove ) + sal_Bool bDisallowCellMove ) { ScInsertCellDlg * pDlg=NULL; switch ( nId ) @@ -964,7 +964,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W //add for ScInsertContentsDlg begin AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent, int nId, - USHORT nCheckDefaults, + sal_uInt16 nCheckDefaults, const String* pStrTitle ) { ScInsertContentsDlg * pDlg=NULL; @@ -1005,7 +1005,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, @@ -1049,12 +1049,12 @@ AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg ( //add for ScMetricInputDlg begin 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, @@ -1102,7 +1102,7 @@ AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Wi //add for ScNameCreateDlg begin -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 ) @@ -1123,7 +1123,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( //add for ScNamePasteDlg begin AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, - int nId , BOOL bInsList ) + int nId , sal_Bool bInsList ) { ScNamePasteDlg * pDlg=NULL; switch ( nId ) @@ -1143,7 +1143,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( //add for ScPivotFilterDlg begin 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 ) @@ -1229,7 +1229,7 @@ AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg( //add for ScDPShowDetailDlg begin 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 ) ); @@ -1240,7 +1240,7 @@ AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDl //add for ScNewScenarioDlg begin 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 ) @@ -1331,12 +1331,12 @@ return 0; //add for ScImportOptionsDlg begin 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 ) @@ -1389,7 +1389,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF const SfxItemSet& rCoreSet, const String& rPageStyle, int nId, - USHORT nResId ) + sal_uInt16 nResId ) { SfxTabDialog* pDlg=NULL; switch ( nId ) @@ -1410,7 +1410,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF //add for ScStyleDlg begin SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window* pParent, SfxStyleSheetBase& rStyleBase, - USHORT nRscId, + sal_uInt16 nRscId, int nId) { SfxTabDialog* pDlg=NULL; @@ -1544,7 +1544,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* //add for ScSortDlg end //------------------ Factories for TabPages-------------------- -CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) +CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1577,7 +1577,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 b121e82cb58d..86aebfc03287 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -72,7 +72,7 @@ public: \ {} \ virtual ~Class(); \ virtual short Execute() ; -// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) +// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) #define DECL_ABSTDLG2_BASE(Class,DialogClass) \ DialogClass* pDlg; \ @@ -124,15 +124,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 @@ -144,8 +144,8 @@ class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDl class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTypeDlg //add for ScDataPilotSourceTypeDlg { DECL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl, ScDataPilotSourceTypeDlg) - virtual BOOL IsDatabase() const; - virtual BOOL IsExternal() const; + virtual sal_Bool IsDatabase() const; + virtual sal_Bool IsExternal() const; }; class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg //add for ScDataPilotServiceDlg @@ -168,7 +168,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 @@ -181,13 +181,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=sal_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 @@ -199,14 +199,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(); }; @@ -214,13 +214,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 ); }; @@ -236,12 +236,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 @@ -253,17 +253,17 @@ 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 BOOL GetCopyTable () const; - virtual void SetCopyTable (BOOL bFlag=TRUE); - virtual void EnableCopyTable (BOOL bFlag=TRUE); + virtual sal_uInt16 GetSelectedDocument () const; + virtual sal_uInt16 GetSelectedTable () const; + virtual sal_Bool GetCopyTable () const; + virtual void SetCopyTable (sal_Bool bFlag=sal_True); + virtual void EnableCopyTable (sal_Bool bFlag=sal_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 @@ -281,14 +281,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; }; @@ -315,20 +315,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 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(USHORT nPos) const; - virtual USHORT GetSelectEntryPos(USHORT nPos) const; + virtual String GetSelectEntry(sal_uInt16 nPos) const; + virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const; }; class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg @@ -360,9 +360,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 ); //add by CHINA001 + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 virtual void SetInputSet( const SfxItemSet* pInSet ); //add by CHINA001 //From class Window. virtual void SetText( const XubString& rStr ); //add by CHINA001 @@ -375,9 +375,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 ); //add by CHINA001 + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 virtual void SetInputSet( const SfxItemSet* pInSet ); //add by CHINA001 //From class Window. virtual void SetText( const XubString& rStr ); //add by CHINA001 @@ -406,29 +406,29 @@ public: int nId); virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg int nId, - BOOL bCol = FALSE, - BOOL bRow = FALSE); + sal_Bool bCol = sal_False, + sal_Bool bRow = sal_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& rServices, int nId ); virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, - BOOL bDisallowCellMove = FALSE ); //add for ScDeleteCellDlg + sal_Bool bDisallowCellMove = sal_False ); //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, @@ -438,28 +438,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 = sal_False, + sal_Bool bRows = sal_True ); virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg int nId, - BOOL bDisallowCellMove = FALSE ); + sal_Bool bDisallowCellMove = sal_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, @@ -469,25 +469,25 @@ 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, long nLast = 100 ); virtual AbstractScMoveTableDlg * CreateScMoveTableDlg( Window* pParent, int nId ); //add for ScMoveTableDlg - 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, @@ -513,11 +513,11 @@ 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 = sal_False, sal_Bool bSheetProtected = sal_False ); virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ); //add for ScShowTabDlg virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent, //add for ScStringInputDlg @@ -536,12 +536,12 @@ public: 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 = sal_False, + sal_Bool bOnlyDbtoolsEncodings = sal_False, + sal_Bool bImport = sal_True ); virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame, //add for ScAttrDlg Window* pParent, const SfxItemSet* pCellAttrs, @@ -552,11 +552,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 @@ -577,9 +577,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 21c769cf0603..c18f166f6e5d 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -43,7 +43,7 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pProtectionRanges[] = +static sal_uInt16 pProtectionRanges[] = { SID_SCATTR_PROTECTION, SID_SCATTR_PROTECTION, @@ -73,7 +73,7 @@ ScTabPageProtection::ScTabPageProtection( Window* pParent, SetExchangeSupport(); // States werden in Reset gesetzt - bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = FALSE; + bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = sal_False; aBtnProtect.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); aBtnHideCell.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); @@ -91,7 +91,7 @@ __EXPORT ScTabPageProtection::~ScTabPageProtection() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageProtection::GetRanges() +sal_uInt16* __EXPORT ScTabPageProtection::GetRanges() { return pProtectionRanges; } @@ -110,9 +110,9 @@ void __EXPORT 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, sal_False, (const SfxPoolItem**)&pProtAttr ); // handelt es sich um ein Default-Item? @@ -127,8 +127,8 @@ void __EXPORT 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 = sal_False; } else { @@ -150,13 +150,13 @@ void __EXPORT ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool __EXPORT ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) { - BOOL bAttrsChanged = FALSE; - USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION ); + sal_Bool bAttrsChanged = sal_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, sal_False ); ScProtectionAttr aProtAttr; if ( !bDontCare ) @@ -167,7 +167,7 @@ BOOL __EXPORT 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 ); } @@ -198,11 +198,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 = sal_False; // DontCare ueberall aus + sal_Bool bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert if ( pBox == &aBtnProtect ) bProtect = bOn; @@ -242,7 +242,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 6004fdfcfc51..79b9e4cb302f 100644 --- a/sc/source/ui/cctrl/cbuttonw.cxx +++ b/sc/source/ui/cctrl/cbuttonw.cxx @@ -70,28 +70,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( sal_False ); DecorationView aDecoView( pOut); - USHORT nButtonStyle = BUTTON_DRAW_DEFAULT; + sal_uInt16 nButtonStyle = BUTTON_DRAW_DEFAULT; if( bBtnIn ) // gedrueckt? { nButtonStyle = BUTTON_DRAW_PRESSED; @@ -129,7 +129,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 b90a51ed6bee..0066af5938e2 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -306,7 +306,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(hash_map& rRe 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 6510fff87ead..f7eb8aa1f4e9 100644 --- a/sc/source/ui/cctrl/popmenu.cxx +++ b/sc/source/ui/cctrl/popmenu.cxx @@ -41,7 +41,7 @@ void __EXPORT 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 e27baecec115..930bddb0799f 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 @@ __EXPORT ScTbxInsertCtrl::~ScTbxInsertCtrl() { } -void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState, +void __EXPORT ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); @@ -85,7 +85,7 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt 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,8 +99,8 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() { -// USHORT nWinResId, nTbxResId; - USHORT nSlotId = GetSlotId(); +// sal_uInt16 nWinResId, nTbxResId; + sal_uInt16 nSlotId = GetSlotId(); if (nSlotId == SID_TBXCTL_INSERT) { rtl::OUString aInsertBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" )); @@ -126,7 +126,7 @@ SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() WindowAlign eNewAlign = ( GetToolBox().IsHorizontal() ) ? WINDOWALIGN_LEFT : WINDOWALIGN_TOP; ScTbxInsertPopup *pWin = new ScTbxInsertPopup( nSlotId, eNewAlign, ScResId(nWinResId), ScResId(nTbxResId), GetBindings() ); - pWin->StartPopupMode(&GetToolBox(), TRUE); + pWin->StartPopupMode(&GetToolBox(), sal_True); pWin->StartSelection(); pWin->Show(); return pWin; @@ -139,7 +139,7 @@ SfxPopupWindowType __EXPORT ScTbxInsertCtrl::GetPopupWindowType() const return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK; } -void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) +void __EXPORT ScTbxInsertCtrl::Select( sal_Bool /* bMod1 */ ) { SfxViewShell* pCurSh( SfxViewShell::Current() ); SfxDispatcher* pDispatch( 0 ); @@ -161,7 +161,7 @@ void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) // //------------------------------------------------------------------ -ScTbxInsertPopup::ScTbxInsertPopup( USHORT nId, WindowAlign eNewAlign, +ScTbxInsertPopup::ScTbxInsertPopup( sal_uInt16 nId, WindowAlign eNewAlign, const ResId& rRIdWin, const ResId& rRIdTbx, SfxBindings& rBindings ) : SfxPopupWindow ( nId, rRIdWin, rBindings), @@ -204,7 +204,7 @@ IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) { EndPopupMode(); - USHORT nLastSlotId = pBox->GetCurItemId(); + sal_uInt16 nLastSlotId = pBox->GetCurItemId(); SfxUInt16Item aItem( GetId(), nLastSlotId ); SfxDispatcher* pDisp = GetBindings().GetDispatcher(); pDisp->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); @@ -214,7 +214,7 @@ IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) IMPL_LINK(ScTbxInsertPopup, TbxClickHdl, ToolBox*, pBox) { - USHORT nLastSlotId = pBox->GetCurItemId(); + sal_uInt16 nLastSlotId = pBox->GetCurItemId(); SfxUInt16Item aItem( GetId(), nLastSlotId ); GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); if(aTbxClickHdl.IsSet()) diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 7d43b31e0b30..f2557d16e4de 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -63,8 +63,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 ) { @@ -80,10 +80,10 @@ __EXPORT 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!" ); @@ -122,19 +122,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 ), @@ -167,11 +167,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; @@ -179,7 +179,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(); @@ -204,7 +204,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 { @@ -213,7 +213,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 ); } } @@ -228,7 +228,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(); @@ -258,14 +258,14 @@ 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 ), m_xDispatchProvider( rDispatchProvider ), m_xFrame( _xFrame ) { - BOOL bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode(); mpImpl->maSliderButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); mpImpl->maIncreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); mpImpl->maDecreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); @@ -400,20 +400,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 a22953ade25b..4e6c61f2e4d0 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -50,15 +50,15 @@ static const sal_Char __FAR_DATA pStrMrg[] = "MRG"; // ============================================================================ ScAsciiOptions::ScAsciiOptions() : - bFixedLen ( FALSE ), + bFixedLen ( sal_False ), aFieldSeps ( ';' ), - bMergeFieldSeps ( FALSE ), + bMergeFieldSeps ( sal_False ), bQuotedFieldAsText(false), bDetectSpecialNumber(false), cTextSep ( cDefaultTextSep ), eCharSet ( gsl_getSystemTextEncoding() ), eLang ( LANGUAGE_SYSTEM ), - bCharSetSystem ( FALSE ), + bCharSetSystem ( sal_False ), nStartRow ( 1 ), nInfoCount ( 0 ), pColStart ( NULL ), @@ -83,8 +83,8 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) : if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT i=0; i= 1 ) { - bFixedLen = bMergeFieldSeps = FALSE; + bFixedLen = bMergeFieldSeps = sal_False; aFieldSeps.Erase(); aToken = rString.GetToken(0,','); if ( aToken.EqualsAscii(pStrFix) ) - bFixedLen = TRUE; + bFixedLen = sal_True; nSub = aToken.GetTokenCount('/'); for ( i=0; iGetRangeName(); ScDBCollection* pDbNames = pDoc->GetDBCollection(); - const USHORT nRangeCount = pRangeNames ? pRangeNames->GetCount() : 0; - const USHORT nDbCount = pDbNames ? pDbNames ->GetCount() : 0; + const sal_uInt16 nRangeCount = pRangeNames ? pRangeNames->GetCount() : 0; + const sal_uInt16 nDbCount = pDbNames ? pDbNames ->GetCount() : 0; nAreaDataCount = nRangeCount+nDbCount; pAreaData = NULL; @@ -233,7 +233,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 ) ) @@ -268,7 +268,7 @@ void ScConsolidateDlg::FillAreaLists() { String aString; - for ( USHORT i=0; + for ( sal_uInt16 i=0; (i0); i++ ) { @@ -294,7 +294,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() ) @@ -314,7 +314,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScConsolidateDlg::Close() +sal_Bool __EXPORT ScConsolidateDlg::Close() { return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() ); } @@ -326,7 +326,7 @@ void ScConsolidateDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if ( pRefInputEdit ) { @@ -345,20 +345,20 @@ void ScConsolidateDlg::SetActive() void __EXPORT 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 sal_False; SCTAB nTab = pViewData->GetTabNo(); - BOOL bEditOk = FALSE; + sal_Bool bEditOk = sal_False; String theCompleteStr; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -410,7 +410,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 ) { @@ -424,7 +424,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; iExecute( SID_CONSOLIDATE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -480,16 +480,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; iGetSelectEntryPos(); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); if ( pRangeUtil && (nSelPos > 0) @@ -609,7 +609,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 ) { @@ -632,7 +632,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/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index d271022a987c..92a25c326641 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -76,7 +76,7 @@ struct Func_Select ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) : ScCsvControl( rParent ), mrColorConfig( SC_MOD()->GetColorConfig() ), - mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ) ), + mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True ) ), maHeaderFont( GetFont() ), maColStates( 1 ), maTypeNames( 1 ), @@ -235,7 +235,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 ) ); @@ -886,8 +886,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 56aa2a50a835..a8f75992cb7f 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -127,7 +127,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 976e0ae23039..56e80e9f2d50 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -124,7 +124,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(); @@ -155,7 +155,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 31aafbcb13da..e275a34b8b88 100644 --- a/sc/source/ui/dbgui/dapitype.cxx +++ b/sc/source/ui/dbgui/dapitype.cxx @@ -43,7 +43,7 @@ using namespace com::sun::star; //------------------------------------------------------------------------- -ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ) : +ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DAPITYPE ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), @@ -66,12 +66,12 @@ ScDataPilotSourceTypeDlg::~ScDataPilotSourceTypeDlg() { } -BOOL ScDataPilotSourceTypeDlg::IsDatabase() const +sal_Bool ScDataPilotSourceTypeDlg::IsDatabase() const { return aBtnDatabase.IsChecked(); } -BOOL ScDataPilotSourceTypeDlg::IsExternal() const +sal_Bool ScDataPilotSourceTypeDlg::IsExternal() const { return aBtnExternal.IsChecked(); } diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index a2f4d61af537..a4a7c6826daa 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -77,7 +77,7 @@ public: : rEdAssign(rEd), rBtnHeader(rHdr), rBtnSize(rSize), rBtnFormat(rFmt), rBtnStrip(rStrip), rCurArea(rArea), - bHeader(FALSE), bSize(FALSE), bFormat(FALSE), bDirty(FALSE) {} + bHeader(sal_False), bSize(sal_False), bFormat(sal_False), bDirty(sal_False) {} void Save(); void Restore(); @@ -90,11 +90,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; }; @@ -109,7 +109,7 @@ void DBSaveData::Save() bSize = rBtnSize.IsChecked(); bFormat = rBtnFormat.IsChecked(); bStrip = rBtnStrip.IsChecked(); - bDirty = TRUE; + bDirty = sal_True; } @@ -125,7 +125,7 @@ void DBSaveData::Restore() rBtnSize.Check ( bSize ); rBtnFormat.Check ( bFormat ); rBtnStrip.Check ( bStrip ); - bDirty = FALSE; + bDirty = sal_False; } } @@ -169,7 +169,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, // pViewData ( ptrViewData ), pDoc ( ptrViewData->GetDocument() ), - bRefInputMode ( FALSE ), + bRefInputMode ( sal_False ), aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ), aLocalDbCol ( *(pDoc->GetDBCollection()) ) { @@ -208,7 +208,7 @@ __EXPORT ScDbNameDlg::~ScDbNameDlg() void ScDbNameDlg::Init() { - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen aBtnMore.AddWindow( &aFlOptions ); aBtnMore.AddWindow( &aBtnHeader ); @@ -250,7 +250,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; @@ -285,7 +285,7 @@ void ScDbNameDlg::Init() aEdAssign.SetText( theAreaStr ); aEdName.GrabFocus(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); NameModifyHdl( 0 ); } @@ -333,7 +333,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) aFTSource.Enable(); aFTOperations.Enable(); aBtnAdd.Enable(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); } } @@ -341,7 +341,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScDbNameDlg::Close() +sal_Bool __EXPORT ScDbNameDlg::Close() { return DoClose( ScDbNameDlgWrapper::GetChildWindowId() ); } @@ -363,9 +363,9 @@ void ScDbNameDlg::SetActive() void ScDbNameDlg::UpdateNames() { - USHORT nNameCount = aLocalDbCol.GetCount(); + sal_uInt16 nNameCount = aLocalDbCol.GetCount(); - aEdName.SetUpdateMode( FALSE ); + aEdName.SetUpdateMode( sal_False ); //----------------------------------------------------------- aEdName.Clear(); aEdAssign.SetText( EMPTY_STRING ); @@ -375,7 +375,7 @@ void ScDbNameDlg::UpdateNames() ScDBData* pDbData = NULL; String aString; - for ( USHORT i=0; iMoveTo( 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() ); @@ -522,7 +522,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() ); @@ -539,13 +539,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( sal_False ); + aBtnKeepFmt.Check( sal_False ); + aBtnStripData.Check( sal_False ); SetInfoStrings( NULL ); // leer theCurArea = ScRange(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); NameModifyHdl( 0 ); } @@ -570,7 +570,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 ) ) @@ -606,12 +606,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( sal_False ); + aBtnKeepFmt.Check( sal_False ); + aBtnStripData.Check( sal_False ); SetInfoStrings( NULL ); // leer - bSaved=FALSE; + bSaved=sal_False; pSaveObj->Restore(); NameModifyHdl( 0 ); } @@ -624,7 +624,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 ) @@ -642,11 +642,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 = sal_False; } else { @@ -657,7 +657,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) if(!bSaved) { - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); } UpdateDBData( theName ); @@ -667,7 +667,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) if ( aBtnAdd.GetText() != aStrAdd ) aBtnAdd.SetText( aStrAdd ); - bSaved=FALSE; + bSaved=sal_False; pSaveObj->Restore(); if ( aEdAssign.GetText().Len() > 0 ) @@ -699,7 +699,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 4ac3fb8d68ad..420a3bc2005b 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.cxx +++ b/sc/source/ui/dbgui/dpgroupdlg.cxx @@ -242,21 +242,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(aArr.Count()); nIdx < nCount; ++nIdx ) + for( sal_uInt16 nIdx = 0, nCount = sal::static_int_cast(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 ) { @@ -320,8 +320,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/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index d4b477cd4b33..8016c20eff34 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -282,7 +282,7 @@ void ScDPFieldWindow::Redraw() Point aPos0; Size aSize( GetSizePixel() ); Font aFont( GetFont() ); // Font vom Window - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aVirDev.SetFont( aFont ); aVirDev.SetOutputSizePixel( aSize ); @@ -402,7 +402,7 @@ void ScDPFieldWindow::SetSelectionEnd() } } -void ScDPFieldWindow::MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY ) +void ScDPFieldWindow::MoveSelection( sal_uInt16 nKeyCode, SCsCOL nDX, SCsROW nDY ) { size_t nNewIndex = CalcNewFieldIndex( nDX, nDY ); if( (eType == TYPE_SELECT) && (nNewIndex == nFieldSelected) ) @@ -541,12 +541,12 @@ void __EXPORT ScDPFieldWindow::MouseMove( const MouseEvent& rMEvt ) void __EXPORT ScDPFieldWindow::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKeyCode = rKEvt.GetKeyCode(); - USHORT nCode = rKeyCode.GetCode(); - BOOL bKeyEvaluated = FALSE; + sal_uInt16 nCode = rKeyCode.GetCode(); + sal_Bool bKeyEvaluated = sal_False; if( rKeyCode.IsMod1() && (eType != TYPE_SELECT) ) { - bKeyEvaluated = TRUE; + bKeyEvaluated = sal_True; switch( nCode ) { case KEY_UP: MoveFieldRel( 0, -1 ); break; @@ -555,12 +555,12 @@ void __EXPORT ScDPFieldWindow::KeyInput( const KeyEvent& rKEvt ) case KEY_RIGHT: MoveFieldRel( 1, 0 ); break; case KEY_HOME: MoveField( 0 ); break; case KEY_END: MoveField( aFieldArr.size() - 1 ); break; - default: bKeyEvaluated = FALSE; + default: bKeyEvaluated = sal_False; } } else { - bKeyEvaluated = TRUE; + bKeyEvaluated = sal_True; switch( nCode ) { case KEY_UP: MoveSelection( nCode, 0, -1 ); break; @@ -571,7 +571,7 @@ void __EXPORT ScDPFieldWindow::KeyInput( const KeyEvent& rKEvt ) case KEY_END: SetSelectionEnd(); break; case KEY_DELETE: pDlg->NotifyRemoveField( eType, nFieldSelected ); break; - default: bKeyEvaluated = FALSE; + default: bKeyEvaluated = sal_False; } } @@ -586,7 +586,7 @@ void __EXPORT ScDPFieldWindow::GetFocus() if( GetGetFocusFlags() & GETFOCUS_MNEMONIC ) // move field on shortcut pDlg->NotifyMoveField( eType ); else // else change focus - pDlg->NotifyFieldFocus( eType, TRUE ); + pDlg->NotifyFieldFocus( eType, sal_True ); if (pAccessible) { @@ -602,7 +602,7 @@ void __EXPORT ScDPFieldWindow::LoseFocus() { Control::LoseFocus(); Redraw(); - pDlg->NotifyFieldFocus( eType, FALSE ); + pDlg->NotifyFieldFocus( eType, sal_False ); if (pAccessible) { @@ -695,7 +695,7 @@ const String& ScDPFieldWindow::GetFieldText( size_t nIndex ) const bool ScDPFieldWindow::AddField( const String& rText, const Point& rPos, size_t& rnIndex ) { if ( aFieldArr.size() == nFieldSize ) - return FALSE; + return sal_False; size_t nNewIndex = 0; if( GetFieldIndex( rPos, nNewIndex ) ) diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index b5dd2f3242c2..5b2b7b47fdd2 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -114,14 +114,14 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pDoc ( NULL ), nSrcTab ( 0 ), nFieldCount ( 0 ), - bRefInputMode ( FALSE ), + bRefInputMode ( sal_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(rEntry.nField) ); if ( rEntry.nVal == SC_EMPTYFIELDS && !rEntry.bQueryByString && *rEntry.pStr == EMPTY_STRING ) { @@ -255,15 +255,15 @@ void __EXPORT ScFilterDlg::Init( const SfxItemSet& rArgSet ) nFieldSelPos = GetFieldSelPos( pViewData->GetCurX() ); rEntry.nField = nFieldSelPos ? (theQueryData.nCol1 + static_cast(nFieldSelPos) - 1) : static_cast(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(i+1) ); + UpdateValueList( static_cast(i+1) ); } aScrollBar.SetEndScrollHdl( LINK( this, ScFilterDlg, ScrollHdl ) ); @@ -276,17 +276,17 @@ void __EXPORT 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 ) { @@ -332,15 +332,15 @@ void __EXPORT 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 __EXPORT ScFilterDlg::Close() +sal_Bool __EXPORT ScFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); @@ -403,7 +403,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++ ) { @@ -427,13 +427,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(); @@ -448,7 +448,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) SCCOL nColumn = theQueryData.nCol1 + static_cast(nFieldSelPos) - 1; if (!pEntryLists[nColumn]) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); SCTAB nTab = nSrcTab; SCROW nFirstRow = theQueryData.nRow1; SCROW nLastRow = theQueryData.nRow2; @@ -485,10 +485,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; iInsertEntry( (*pColl)[i]->GetString(), nListPos ); nListPos++; @@ -501,30 +501,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(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 { @@ -553,7 +553,7 @@ void ScFilterDlg::UpdateHdrInValueList( USHORT nList ) //---------------------------------------------------------------------------- -void ScFilterDlg::ClearValueList( USHORT nList ) +void ScFilterDlg::ClearValueList( sal_uInt16 nList ) { if ( nList>0 && nList<=4 ) { @@ -568,10 +568,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(nField - theQueryData.nCol1 + 1); + return static_cast(nField - theQueryData.nCol1 + 1); else return 0; } @@ -582,7 +582,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem() { ScAddress theCopyPos; ScQueryParam theParam( theQueryData ); - BOOL bCopyPosOk = FALSE; + sal_Bool bCopyPosOk = sal_False; if ( aBtnCopyResult.IsChecked() ) { @@ -592,27 +592,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 = sal_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(); @@ -629,7 +629,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem() //---------------------------------------------------------------------------- -BOOL ScFilterDlg::IsRefInputMode() const +sal_Bool ScFilterDlg::IsRefInputMode() const { return bRefInputMode; } @@ -643,24 +643,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 = sal_False; } } if ( bAreaInputOk ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -686,9 +686,9 @@ IMPL_LINK( ScFilterDlg, MoreClickHdl, MoreButton*, EMPTYARG ) else { pTimer->Stop(); - bRefInputMode = FALSE; + bRefInputMode = sal_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; } @@ -718,7 +718,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 ) { @@ -726,10 +726,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 ) @@ -738,10 +738,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 ) { @@ -749,10 +749,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 ) @@ -761,10 +761,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 ) @@ -797,13 +797,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 = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nOffset] =TRUE; + bRefreshExceptQuery[nOffset] =sal_True; } else { @@ -812,8 +812,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(nField) - 1 ; } } @@ -840,14 +840,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 = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { @@ -856,9 +856,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(nField) - 1 ; } } @@ -877,14 +877,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 = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { @@ -894,9 +894,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(nField) - 1 ; } @@ -906,21 +906,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 = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(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(nField) - 1 ; } @@ -931,17 +931,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(); } @@ -961,10 +961,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 ); @@ -979,7 +979,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 @@ -996,9 +996,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(); @@ -1035,7 +1035,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] ) @@ -1044,22 +1044,22 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) { rEntry.pStr->Erase(); rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else if ( aStrVal == aStrNotEmpty ) { rEntry.pStr->Erase(); rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_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(nField) - 1) : static_cast(0); @@ -1081,31 +1081,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(rEntry.nField) ); @@ -1135,9 +1135,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(); } @@ -1150,7 +1150,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(); } @@ -1181,6 +1181,6 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); aValueEdArr[i]->SetText( aValStr ); - UpdateValueList( static_cast(i+1) ); + UpdateValueList( static_cast(i+1) ); } } diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 1e274690c31c..8028158cef88 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -98,8 +98,8 @@ ScFilterOptionsMgr::ScFilterOptionsMgr( ScFilterOptionsMgr::~ScFilterOptionsMgr() { - USHORT nEntries = rLbCopyPos.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = rLbCopyPos.GetEntryCount(); + sal_uInt16 i; for ( i=2; iGetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() ); return ( SCA_VALID == (nResult & SCA_VALID) ); } @@ -263,7 +263,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 ); @@ -282,14 +282,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 = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = rLbCopyPos.GetEntryCount(); for ( i=2; i= 3 ) { 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); + bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : sal_False); } } diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index d590ffb83457..d08d13fcb001 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -105,7 +105,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 ); @@ -116,7 +116,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent, __EXPORT ScPivotFilterDlg::~ScPivotFilterDlg() { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) delete pEntryLists[i]; if ( pOutItem ) @@ -222,12 +222,12 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) else if (rEntry.nVal == SC_NONEMPTYFIELDS) aValStr = aStrNotEmpty; } - USHORT nCondPos = (USHORT)rEntry.eOp; - USHORT nFieldSelPos = GetFieldSelPos( static_cast(rEntry.nField) ); + sal_uInt16 nCondPos = (sal_uInt16)rEntry.eOp; + sal_uInt16 nFieldSelPos = GetFieldSelPos( static_cast(rEntry.nField) ); aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); - UpdateValueList( static_cast(i+1) ); + UpdateValueList( static_cast(i+1) ); aValueEdArr[i]->SetText( aValStr ); if (aValStr == aStrEmpty || aValStr == aStrNotEmpty) aCondLbArr[i]->Disable(); @@ -236,7 +236,7 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) { aFieldLbArr[i]->SelectEntryPos( 0 ); // "keiner" selektieren aCondLbArr [i]->SelectEntryPos( 0 ); // "=" selektieren - UpdateValueList( static_cast(i) ); + UpdateValueList( static_cast(i) ); aValueEdArr[i]->SetText( EMPTY_STRING ); } aValueEdArr[i]->SetModifyHdl( LINK( this, ScPivotFilterDlg, ValModifyHdl ) ); @@ -246,12 +246,12 @@ void __EXPORT 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 ) @@ -302,7 +302,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++ ) { @@ -324,13 +324,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(); @@ -358,10 +358,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; iInsertEntry( (*pColl)[i]->GetString(), nListPos ); nListPos++; @@ -374,7 +374,7 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList ) //------------------------------------------------------------------------ -void ScPivotFilterDlg::ClearValueList( USHORT nList ) +void ScPivotFilterDlg::ClearValueList( sal_uInt16 nList ) { if ( nList>0 && nList<=3 ) { @@ -388,10 +388,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(nField - theQueryData.nCol1 + 1); + return static_cast(nField - theQueryData.nCol1 + 1); else return 0; } @@ -401,15 +401,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 ) @@ -427,19 +427,19 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() { *rEntry.pStr = EMPTY_STRING; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else if ( aStrVal == aStrNotEmpty ) { *rEntry.pStr = EMPTY_STRING; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else { *rEntry.pStr = aStrVal; rEntry.nVal = 0; - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; } rEntry.nField = nField ? (theQueryData.nCol1 + @@ -455,7 +455,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() ? (ScQueryConnect)nConnect2 : SC_AND; - theParam.bInplace = FALSE; + theParam.bInplace = sal_False; theParam.nDestTab = 0; // Woher kommen diese Werte? theParam.nDestCol = 0; theParam.nDestRow = 0; @@ -573,7 +573,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/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index b5a19ef0ec9b..794e7361338e 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -69,7 +69,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; if( const OUString* pStr = rStrings.getConstArray() ) @@ -89,7 +89,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, U } template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const vector& rMembers, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const vector& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; vector::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end(); @@ -108,16 +108,16 @@ bool lclFillListBox( ListBoxType& rLBox, const vector& rM } /** Searches for a listbox entry, starts search at specified position. */ -USHORT lclFindListBoxEntry( const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) +sal_uInt16 lclFindListBoxEntry( const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) { - USHORT nPos = nStartPos; + sal_uInt16 nPos = nStartPos; while( (nPos < rLBox.GetEntryCount()) && (rLBox.GetEntry( nPos ) != rEntry) ) ++nPos; return (nPos < rLBox.GetEntryCount()) ? nPos : LISTBOX_ENTRY_NOTFOUND; } /** 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, @@ -132,12 +132,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; @@ -180,19 +180,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; } @@ -202,7 +202,7 @@ 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(aArr.Count()); nIndex < nCount; ++nIndex ) + for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast(aArr.Count()); nIndex < nCount; ++nIndex ) InsertEntry( aArr.GetString( nIndex ) ); } @@ -235,7 +235,7 @@ ScDPFunctionDlg::ScDPFunctionDlg( Init( rLabelData, rFuncData ); } -USHORT ScDPFunctionDlg::GetFuncMask() const +sal_uInt16 ScDPFunctionDlg::GetFuncMask() const { return maLbFunc.GetSelection(); } @@ -247,7 +247,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const aRef.ReferenceType = maLbTypeWrp.GetControlValue(); aRef.ReferenceField = maLbBaseField.GetSelectEntry(); - USHORT nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); + sal_uInt16 nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); switch( nBaseItemPos ) { case SC_BASEITEM_PREV_POS: @@ -270,7 +270,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& 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 = lclFindListBoxEntry( maLbBaseItem, rFuncData.maFieldRef.ReferenceItemName, nStartPos ); + sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; + sal_uInt16 nPos = lclFindListBoxEntry( maLbBaseItem, 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 ); @@ -378,7 +378,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) mbEmptyItem = lclFillListBox( maLbBaseItem, mrLabelVec[ nBasePos ].maMembers, SC_BASEITEM_USER_POS ); // 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; @@ -417,9 +417,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; @@ -565,8 +565,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 *** @@ -591,7 +591,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 = lclFindListBoxEntry( maLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS ); @@ -661,7 +661,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 @@ -677,7 +677,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(i), !maLabelData.maMembers[i].mbVisible); + maLbHide.CheckEntryPos(static_cast(i), !maLabelData.maMembers[i].mbVisible); bool bEnable = maLbHide.GetEntryCount() > 0; maFlHide.Enable( bEnable ); maLbHide.Enable( bEnable ); @@ -718,7 +718,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 ) ), @@ -734,7 +734,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR long nDimCount = rDPObj.GetDimCount(); for (long nDim=0; nDimsecond; - BOOL bIsDataLayout = false; + sal_Bool bIsDataLayout = false; return mrDPObj.GetDimName(nDim, bIsDataLayout); } diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 56d7e3550cda..10134e696571 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -147,7 +147,7 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), aStrNewTable ( ScResId( SCSTR_NEWTABLE ) ), - bIsDrag ( FALSE ), + bIsDrag ( sal_False ), pEditActive ( NULL ), @@ -159,10 +159,10 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar GetViewData() ), pDoc ( ((ScTabViewShell*)SfxViewShell::Current())-> GetViewData()->GetDocument() ), - bRefInputMode ( FALSE ) + bRefInputMode ( sal_False ) { - xDlgDPObject->SetAlive( TRUE ); // needed to get structure information - xDlgDPObject->FillOldParam( thePivotData, FALSE ); + xDlgDPObject->SetAlive( sal_True ); // needed to get structure information + xDlgDPObject->FillOldParam( thePivotData, sal_False ); xDlgDPObject->FillLabelData( thePivotData ); Init(); @@ -174,8 +174,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; iGetAddressConvention() ); aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) ); @@ -340,16 +340,16 @@ void __EXPORT ScDPLayoutDlg::Init() InitFocus(); -// SetDispatcherLock( TRUE ); // Modal-Modus einschalten +// SetDispatcherLock( sal_True ); // Modal-Modus einschalten //@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 __EXPORT ScDPLayoutDlg::Close() +sal_Bool __EXPORT ScDPLayoutDlg::Close() { return DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); } @@ -407,7 +407,7 @@ void ScDPLayoutDlg::InitWnd( PivotField* pArr, long nCount, ScDPFieldType eType { ScDPFuncDataVec* pInitArr = NULL; ScDPFieldWindow* pInitWnd = NULL; - BOOL bDataArr = FALSE; + sal_Bool bDataArr = sal_False; switch ( eType ) { @@ -429,7 +429,7 @@ void ScDPLayoutDlg::InitWnd( PivotField* pArr, long nCount, ScDPFieldType eType case TYPE_DATA: pInitArr = &aDataArr; pInitWnd = &aWndData; - bDataArr = TRUE; + bDataArr = sal_True; break; default: break; @@ -441,7 +441,7 @@ void ScDPLayoutDlg::InitWnd( PivotField* pArr, long nCount, ScDPFieldType eType for ( long i=0; (isize()) && ((*pArr)[i].get() != NULL) && !bFound ) @@ -1259,14 +1259,14 @@ bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType ) case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break; case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break; } - bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags ); + bAllowed = ScDPObject::IsOrientationAllowed( (sal_uInt16)eOrient, pData->mnFlags ); } return bAllowed; } //---------------------------------------------------------------------------- -String ScDPLayoutDlg::GetFuncString( USHORT& rFuncMask, BOOL bIsValue ) +String ScDPLayoutDlg::GetFuncString( sal_uInt16& rFuncMask, sal_Bool bIsValue ) { String aStr; @@ -1352,17 +1352,17 @@ void ScDPLayoutDlg::CalcWndSizes() //---------------------------------------------------------------------------- -BOOL ScDPLayoutDlg::GetPivotArrays( PivotField* pPageArr, +sal_Bool ScDPLayoutDlg::GetPivotArrays( PivotField* pPageArr, PivotField* pColArr, PivotField* pRowArr, PivotField* pDataArr, - USHORT& rPageCount, - USHORT& rColCount, - USHORT& rRowCount, - USHORT& rDataCount ) + sal_uInt16& rPageCount, + sal_uInt16& rColCount, + sal_uInt16& rRowCount, + sal_uInt16& rDataCount ) { - BOOL bFit = TRUE; - USHORT i=0; + sal_Bool bFit = sal_True; + sal_uInt16 i=0; for ( i=0; (iGetAddressConvention()); + sal_uInt16 nResult = ScRange().Parse(theCurPosStr, pDoc, pDoc->GetAddressConvention()); if ( SCA_VALID != (nResult & SCA_VALID) ) // invalid source range. @@ -1411,7 +1411,7 @@ void ScDPLayoutDlg::UpdateSrcRange() ScTabViewShell * pTabViewShell = pViewData->GetViewShell(); inSheet.aSourceRange = aNewRange; xDlgDPObject->SetSheetDesc(inSheet); - xDlgDPObject->FillOldParam( thePivotData, FALSE ); + xDlgDPObject->FillOldParam( thePivotData, sal_False ); xDlgDPObject->FillLabelData(thePivotData); pTabViewShell->SetDialogDPObject(xDlgDPObject.get()); @@ -1512,8 +1512,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) && (SCA_VALID == (nResult & SCA_VALID)) ) ) @@ -1526,12 +1526,12 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) PivotFieldArr aColFieldArr; PivotFieldArr aRowFieldArr; PivotFieldArr aDataFieldArr; - USHORT nPageCount; - USHORT nColCount; - USHORT nRowCount; - USHORT nDataCount; + sal_uInt16 nPageCount; + sal_uInt16 nColCount; + sal_uInt16 nRowCount; + sal_uInt16 nDataCount; - BOOL bFit = GetPivotArrays( aPageFieldArr, aColFieldArr, aRowFieldArr, aDataFieldArr, + sal_Bool bFit = GetPivotArrays( aPageFieldArr, aColFieldArr, aRowFieldArr, aDataFieldArr, nPageCount, nColCount, nRowCount, nDataCount ); if ( bFit ) { @@ -1550,13 +1550,13 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) uno::Reference xSource = xDlgDPObject->GetSource(); ScDPObject::ConvertOrientation( aSaveData, aPageFieldArr, nPageCount, - sheet::DataPilotFieldOrientation_PAGE, NULL, 0, 0, xSource, FALSE ); + sheet::DataPilotFieldOrientation_PAGE, NULL, 0, 0, xSource, sal_False ); ScDPObject::ConvertOrientation( aSaveData, aColFieldArr, nColCount, - sheet::DataPilotFieldOrientation_COLUMN, NULL, 0, 0, xSource, FALSE ); + sheet::DataPilotFieldOrientation_COLUMN, NULL, 0, 0, xSource, sal_False ); ScDPObject::ConvertOrientation( aSaveData, aRowFieldArr, nRowCount, - sheet::DataPilotFieldOrientation_ROW, NULL, 0, 0, xSource, FALSE ); + sheet::DataPilotFieldOrientation_ROW, NULL, 0, 0, xSource, sal_False ); ScDPObject::ConvertOrientation( aSaveData, aDataFieldArr, nDataCount, - sheet::DataPilotFieldOrientation_DATA, NULL, 0, 0, xSource, FALSE, + sheet::DataPilotFieldOrientation_DATA, NULL, 0, 0, xSource, sal_False, aColFieldArr, nColCount, aRowFieldArr, nRowCount, aPageFieldArr, nPageCount ); for( ScDPLabelDataVec::const_iterator aIt = aLabelDataArr.begin(), aEnd = aLabelDataArr.end(); aIt != aEnd; ++aIt ) @@ -1626,12 +1626,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 = sal_False; // to allow deselecting when switching sheets - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); // #95513# don't hide the dialog before executing the slot, instead it is used as @@ -1667,7 +1667,7 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) else { if ( !aBtnMore.GetState() ) - aBtnMore.SetState( TRUE ); + aBtnMore.SetState( sal_True ); ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ), ScGlobal::GetRscString( STR_INVALID_TABREF ) @@ -1693,7 +1693,7 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) { if ( aBtnMore.GetState() ) { - bRefInputMode = TRUE; + bRefInputMode = sal_True; //@BugID 54702 Enablen/Disablen nur noch in Basisklasse //SFX_APPWINDOW->Enable(); if ( aEdInPos.IsEnabled() ) @@ -1711,9 +1711,9 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) } else { - bRefInputMode = FALSE; + bRefInputMode = sal_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; } @@ -1724,14 +1724,14 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, Edit *, EMPTYARG ) { 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 = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbOutPos.GetEntryCount(); for ( i=2; i 1 ) { diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 96c9f120f5b1..f1f35a4fbf48 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -51,7 +51,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 )), @@ -85,14 +85,14 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b XColorTable* pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable(); if (pColorTable) { - aLbColor.SetUpdateMode( FALSE ); + aLbColor.SetUpdateMode( sal_False ); long nCount = pColorTable->Count(); for ( long n=0; nGetColor(n); aLbColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - aLbColor.SetUpdateMode( TRUE ); + aLbColor.SetUpdateMode( sal_True ); } } } @@ -120,27 +120,27 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b 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(sal_False); + aCbProtect.Check(sal_True); if (bIsEdit) - aCbCopyAll.Enable(FALSE); + aCbCopyAll.Enable(sal_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(sal_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); */ } @@ -153,7 +153,7 @@ __EXPORT 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(); @@ -162,7 +162,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; /* @@ -185,7 +185,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/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 42f2a2d86933..abbda7b995e7 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -322,12 +322,12 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, { Seek( 0 ); mpDatStream->StartReadingUnicodeText(); - ULONG nUniPos = mpDatStream->Tell(); + sal_uLong nUniPos = mpDatStream->Tell(); if ( nUniPos > 0 ) - bPreselectUnicode = TRUE; // read 0xfeff/0xfffe + bPreselectUnicode = sal_True; // read 0xfeff/0xfffe else { - UINT16 n; + sal_uInt16 n; *mpDatStream >> n; // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with // control characters except CR,LF,TAB @@ -340,7 +340,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, case 0x0d00 : break; default: - bPreselectUnicode = TRUE; + bPreselectUnicode = sal_True; } } mpDatStream->Seek(0); @@ -369,7 +369,7 @@ 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 ); @@ -377,7 +377,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, RTL_TEXTENCODING_UNICODE : gsl_getSystemTextEncoding() ); if( nCharSet >= 0 ) - aLbCharSet.SelectEntryPos( static_cast(nCharSet) ); + aLbCharSet.SelectEntryPos( static_cast(nCharSet) ); SetSelectedCharSet(); aLbCharSet.SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) ); @@ -421,7 +421,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; @@ -430,7 +430,7 @@ 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 { @@ -568,7 +568,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 ); @@ -688,7 +688,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 5440f515c86a..3bca3a8ade22 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -50,7 +50,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 ); } @@ -65,7 +65,7 @@ private: //------------------------------------------------------------------------ -USHORT ScDelimiterTable::GetCode( const String& rDel ) const +sal_uInt16 ScDelimiterTable::GetCode( const String& rDel ) const { sal_Unicode nCode = 0; xub_StrLen i = 0; @@ -117,12 +117,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 ) ), @@ -211,9 +211,9 @@ ScImportOptionsDlg::ScImportOptionsDlg( SetSizePixel( aWinSize ); aCbFixed.Show(); aCbFixed.SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) ); - aCbFixed.Check( FALSE ); + aCbFixed.Check( sal_False ); aCbShown.Show(); - aCbShown.Check( TRUE ); + aCbShown.Check( sal_True ); } else { @@ -264,11 +264,11 @@ void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const //------------------------------------------------------------------------ -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; @@ -284,7 +284,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; @@ -296,7 +296,7 @@ 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 ); diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index f70fbb094c92..24751946253f 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -90,7 +90,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi pViewData ( NULL ), pDoc ( NULL ), pRefInputEdit ( NULL ), - bRefInputMode ( FALSE ), + bRefInputMode ( sal_False ), pTimer ( NULL ) { Init( rArgSet ); @@ -110,8 +110,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi __EXPORT ScSpecialFilterDlg::~ScSpecialFilterDlg() { - USHORT nEntries = aLbFilterArea.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = aLbFilterArea.GetEntryCount(); + sal_uInt16 i; for ( i=1; iGetChangeTrack()!=NULL) aBtnCopyResult.Disable(); ScRangeName* pRangeNames = pDoc->GetRangeName(); - const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0; + const sal_uInt16 nCount = pRangeNames ? pRangeNames->GetCount() : 0; /* * Aus den RangeNames des Dokumentes werden nun die @@ -163,9 +163,9 @@ void __EXPORT ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) { String aString; ScRangeData* pData = NULL; - USHORT nInsert = 0; + sal_uInt16 nInsert = 0; - for ( USHORT i=0; iAt( i )); if ( pData ) @@ -218,19 +218,19 @@ void __EXPORT ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) aStrUndefined ); // #35206# Spezialfilter braucht immer Spaltenkoepfe - aBtnHeader.Check(TRUE); + aBtnHeader.Check(sal_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 __EXPORT ScSpecialFilterDlg::Close() +sal_Bool __EXPORT ScSpecialFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); @@ -303,7 +303,7 @@ ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam, //---------------------------------------------------------------------------- -BOOL ScSpecialFilterDlg::IsRefInputMode() const +sal_Bool ScSpecialFilterDlg::IsRefInputMode() const { return bRefInputMode; } @@ -323,8 +323,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 = sal_False; ScRange theFilterArea; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -335,28 +335,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 = sal_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 = sal_False; } } @@ -368,7 +368,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) ) { @@ -377,21 +377,21 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( aBtnCopyResult.IsChecked() ) { - theOutParam.bInplace = FALSE; + theOutParam.bInplace = sal_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(); @@ -411,7 +411,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( bQueryOk && theOutParam.GetEntryCount() > MAXQUERY && theOutParam.GetEntry(MAXQUERY).bDoQuery ) { - bQueryOk = FALSE; // zu viele + bQueryOk = sal_False; // zu viele //! andere Fehlermeldung ?? } } @@ -419,7 +419,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( bQueryOk ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -451,17 +451,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 = sal_False; } } @@ -478,7 +478,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 ); @@ -499,14 +499,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 = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbFilterArea.GetEntryCount(); for ( i=1; i return TRUE; + * virtual sal_Bool HasExchangeSupport() const; -> return sal_True; * virtual void ActivatePage(const SfxItemSet &); * virtual int DeactivatePage(SfxItemSet * = 0); * @@ -127,8 +127,8 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent, rArgSet.Get( nWhichSort )). GetSortData() ), nFieldCount ( 0 ), - bHasHeader ( FALSE ), - bSortByRows ( FALSE ) + bHasHeader ( sal_False ), + bSortByRows ( sal_False ) { Init(); FreeResource(); @@ -179,7 +179,7 @@ void ScTabPageSortFields::Init() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageSortFields::GetRanges() +sal_uInt16* __EXPORT ScTabPageSortFields::GetRanges() { return pSortRanges; } @@ -206,7 +206,7 @@ void __EXPORT 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] ) { @@ -241,7 +241,7 @@ void __EXPORT 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 ); @@ -262,20 +262,20 @@ void __EXPORT ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT 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) @@ -320,12 +320,12 @@ BOOL __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { theSortData.bDoSort[0] = theSortData.bDoSort[1] = - theSortData.bDoSort[2] = FALSE; + theSortData.bDoSort[2] = sal_False; } rArgSet.Put( ScSortItem( SCITEM_SORTDATA, NULL, &theSortData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -340,9 +340,9 @@ void __EXPORT 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(); @@ -375,7 +375,7 @@ int __EXPORT ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP ) // ----------------------------------------------------------------------- -void ScTabPageSortFields::DisableField( USHORT nField ) +void ScTabPageSortFields::DisableField( sal_uInt16 nField ) { nField--; @@ -390,7 +390,7 @@ void ScTabPageSortFields::DisableField( USHORT nField ) // ----------------------------------------------------------------------- -void ScTabPageSortFields::EnableField( USHORT nField ) +void ScTabPageSortFields::EnableField( sal_uInt16 nField ) { nField--; @@ -423,7 +423,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 ) { @@ -476,17 +476,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 = sal_False; - for ( USHORT n=1; nGetTabNo()) + sal_uInt16 nFormat = (rSortData.nDestTab != pViewData->GetTabNo()) ? SCR_ABS_3D : SCR_ABS; @@ -794,7 +794,7 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) } else { - aBtnCopyResult.Check( FALSE ); + aBtnCopyResult.Check( sal_False ); aLbOutPos.Disable(); aEdOutPos.Disable(); aEdOutPos.SetText( EMPTY_STRING ); @@ -803,14 +803,14 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT 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(); } @@ -837,7 +837,7 @@ BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) { uno::Sequence aAlgos = pColWrap->listCollatorAlgorithms( theSortData.aCollatorLocale ); - USHORT nSel = aLbAlgorithm.GetSelectEntryPos(); + sal_uInt16 nSel = aLbAlgorithm.GetSelectEntryPos(); if ( nSel < aAlgos.getLength() ) sAlg = aAlgos[nSel]; } @@ -845,7 +845,7 @@ BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) rArgSet.Put( ScSortItem( SCITEM_SORTDATA, &theSortData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -877,7 +877,7 @@ void __EXPORT ScTabPageSortOptions::ActivatePage() int __EXPORT ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) { - BOOL bPosInputOk = TRUE; + sal_Bool bPosInputOk = sal_True; if ( aBtnCopyResult.IsChecked() ) { @@ -895,7 +895,7 @@ int __EXPORT 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) ); @@ -938,9 +938,9 @@ void ScTabPageSortOptions::FillUserSortListBox() aLbSortUser.Clear(); if ( pUserLists ) { - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); if ( nCount > 0 ) - for ( USHORT i=0; iGetString() ); } } @@ -984,7 +984,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 ); @@ -1016,14 +1016,14 @@ void __EXPORT 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 = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbOutPos.GetEntryCount(); for ( i=2; i leave list box empty if LANGUAGE_SYSTEM is selected - aFtAlgorithm.Enable( FALSE ); // nothing to select - aLbAlgorithm.Enable( FALSE ); // nothing to select + aFtAlgorithm.Enable( sal_False ); // nothing to select + aLbAlgorithm.Enable( sal_False ); // nothing to select } else { @@ -1073,7 +1073,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 fbada165b55d..070167f8ff95 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -47,7 +47,7 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pSubTotalsRanges[] = +static sal_uInt16 pSubTotalsRanges[] = { SID_SUBTOTALS, SID_SUBTOTALS, @@ -57,7 +57,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 ), @@ -94,15 +94,15 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId, __EXPORT 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; i0), "Invalid group" ); if ( (nGroupNo > 3) || (nGroupNo == 0) ) - return FALSE; + return sal_False; else nGroupIdx = nGroupNo-1; //---------------------------------------------------------- // #79058# 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, sal_False ); + *((sal_uInt16*)aLbColumns.GetEntryData( nLbEntry )) = 0; } aLbFunctions.SelectEntryPos( 0 ); @@ -175,10 +175,10 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 ); - for ( USHORT i=0; i0), "Invalid group" ); DBG_ASSERT( (aLbGroup.GetEntryCount() > 0) @@ -214,7 +214,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, || (aLbColumns.GetEntryCount() == 0) || (aLbFunctions.GetEntryCount() == 0) ) - return FALSE; + return sal_False; else nGroupIdx = nGroupNo-1; @@ -226,15 +226,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; @@ -247,18 +247,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; iGetTabNo(); SCCOL nMaxCol = rSubTotalData.nCol2; SCCOL col; - USHORT i=0; + sal_uInt16 i=0; String aFieldName; aLbGroup.Clear(); @@ -312,27 +312,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 = sal_False; - for ( USHORT n=0; n 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 ) @@ -412,7 +412,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb ) { *pFunction = nFunction; // aLbColumns.CheckEntryPos( nColumn, (nFunction != 0) );//XXX - aLbColumns.CheckEntryPos( nColumn, TRUE ); + aLbColumns.CheckEntryPos( nColumn, sal_True ); } } return 0; @@ -428,7 +428,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 ); } } @@ -485,11 +485,11 @@ void __EXPORT ScTpSubTotalGroup3::Reset( const SfxItemSet& rArgSet ) { RESET(3); #define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), rArgSet )) -BOOL __EXPORT ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } +sal_Bool __EXPORT ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } -BOOL __EXPORT ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } +sal_Bool __EXPORT ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } -BOOL __EXPORT ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } +sal_Bool __EXPORT ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } #undef FILL @@ -570,13 +570,13 @@ void __EXPORT 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( sal_False ); aLbUserDef.Disable(); aLbUserDef.SelectEntryPos( 0 ); } @@ -586,7 +586,7 @@ void __EXPORT ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) { ScSubTotalParam theSubTotalData; // auslesen, wenn schon teilweise gefuellt SfxTabDialog* pDlg = GetTabDialog(); @@ -594,12 +594,12 @@ BOOL __EXPORT 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(); @@ -611,7 +611,7 @@ BOOL __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) rArgSet.Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -623,9 +623,9 @@ void ScTpSubTotalOptions::FillUserSortListBox() aLbUserDef.Clear(); if ( pUserLists ) { - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); if ( nCount > 0 ) - for ( USHORT i=0; iGetString() ); } } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 1ee02badefe1..8207d18c5709 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -59,7 +59,7 @@ // ============================================================================ -static USHORT pValueRanges[] = +static sal_uInt16 pValueRanges[] = { FID_VALID_MODE, FID_VALID_ERRTEXT, FID_VALID_LISTTYPE, FID_VALID_LISTTYPE, @@ -167,7 +167,7 @@ void ScTPValidationValue::RefInputDonePostHdl() } -BOOL ScValidationDlg::Close() +sal_Bool ScValidationDlg::Close() { if( m_bOwnRefHdlr ) if( SfxTabPage* pPage = GetTabPage( TP_VALIDATION_VALUES ) ) @@ -181,7 +181,7 @@ ScValidationDlg::~ScValidationDlg() { //Added by PengYunQuan for Validity Cell Range Picker } @@ -191,9 +191,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; @@ -210,7 +210,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 ) @@ -229,9 +229,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: // #111771# may occur in old XML files after Excel import @@ -249,7 +249,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 ) @@ -389,7 +389,7 @@ SfxTabPage* ScTPValidationValue::Create( Window* pParent, const SfxItemSet& rArg return( new ScTPValidationValue( pParent, rArgSet ) ); } -USHORT* ScTPValidationValue::GetRanges() +sal_uInt16* ScTPValidationValue::GetRanges() { return pValueRanges; } @@ -398,38 +398,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 ); @@ -437,21 +437,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( + rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast( lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast( + rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast( 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 @@ -597,7 +597,7 @@ void ScTPValidationValue::TidyListBoxes() IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, /*pEdit*/ ) { - USHORT nPos=maLbAllow.GetSelectEntryPos(); + sal_uInt16 nPos=maLbAllow.GetSelectEntryPos(); if ( nPos == SC_VALIDDLG_ALLOW_RANGE ) { @@ -625,7 +625,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); @@ -721,12 +721,12 @@ void ScTPValidationHelp::Init() { //aLb.SetSelectHdl( LINK( this, ScTPValidationHelp, SelectHdl ) ); - aTsbHelp.EnableTriState( FALSE ); + aTsbHelp.EnableTriState( sal_False ); } //------------------------------------------------------------------------ -USHORT* __EXPORT ScTPValidationHelp::GetRanges() +sal_uInt16* __EXPORT ScTPValidationHelp::GetRanges() { return pValueRanges; } @@ -745,17 +745,17 @@ void __EXPORT 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 ); @@ -763,13 +763,13 @@ void __EXPORT ScTPValidationHelp::Reset( const SfxItemSet& rArgSet ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT 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; } //======================================================================== @@ -812,14 +812,14 @@ void ScTPValidationError::Init() aBtnSearch.SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) ); aLbAction.SelectEntryPos( 0 ); - aTsbShow.EnableTriState( FALSE ); + aTsbShow.EnableTriState( sal_False ); SelectActionHdl( NULL ); } //------------------------------------------------------------------------ -USHORT* __EXPORT ScTPValidationError::GetRanges() +sal_uInt16* __EXPORT ScTPValidationError::GetRanges() { return pValueRanges; } @@ -838,22 +838,22 @@ void __EXPORT 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 ); // #111720# 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 ); @@ -863,14 +863,14 @@ void __EXPORT ScTPValidationError::Reset( const SfxItemSet& rArgSet ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT 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; } // ----------------------------------------------------------------------- @@ -878,7 +878,7 @@ BOOL __EXPORT 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 ); @@ -915,13 +915,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 ? sal_False : sal_True ); return true; } @@ -932,7 +932,7 @@ bool ScValidationDlg::LeaveRefStatus() if( !pTabViewShell ) return false; - USHORT nId = SLOTID; + sal_uInt16 nId = SLOTID; SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); //SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); if ( pViewFrm->GetChildWindow( nId ) ) @@ -947,14 +947,14 @@ bool ScValidationDlg::SetupRefDlg() if ( m_bOwnRefHdlr ) return false; if( EnterRefMode() ) { - SetModal( FALSE ); + SetModal( sal_False ); return /*SetChkShell( GetDocShell() ),*/ 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; @@ -975,7 +975,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 ) ) @@ -1003,14 +1003,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 sal_False; } diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index d819785c843b..6182ada4836e 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 (sal_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 __EXPORT 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 = sal_False; // nur einmal } SCTAB nDestTab = aDestArea.aStart.Tab(); if (pDoc->IsStreamValid(nDestTab)) - pDoc->SetStreamValid(nDestTab, FALSE); + pDoc->SetStreamValid(nDestTab, sal_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,16 +203,16 @@ 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; + sal_Bool bFound = sal_False; ScRangeName* pNames = pSrcDoc->GetRangeName(); - USHORT nPos; + sal_uInt16 nPos; if (pNames) // benannte Bereiche { if (pNames->SearchName( rAreaName, nPos )) if ( (*pNames)[nPos]->IsValidReference( rRange ) ) - bFound = TRUE; + bFound = sal_True; } if (!bFound) // Datenbankbereiche { @@ -225,39 +225,39 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin SCROW nRow1, nRow2; (*pDBColl)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2); rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab ); - bFound = TRUE; + bFound = sal_True; } } if (!bFound) // direct reference (range or cell) { ScAddress::Details aDetails(pSrcDoc->GetAddressConvention(), 0, 0); if ( rRange.ParseAny( rAreaName, pSrcDoc, aDetails ) & SCA_VALID ) - bFound = TRUE; + bFound = sal_True; } return bFound; } // 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 sal_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 sal_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,7 +268,7 @@ 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, sal_False, pFilter); ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); //REMOVE SvEmbeddedObjectRef aRef = pSrcShell; @@ -326,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) { @@ -352,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, sal_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, sal_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, sal_False, pUndoDoc ); } } @@ -410,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, sal_False ); aNewTokenRange.aStart.SetRow( aNewTokenRange.aEnd.Row() + 2 ); } } @@ -427,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, sal_False, pRedoDoc ); pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoUpdateAreaLink( pImpl->m_pDocSh, @@ -470,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 ??? @@ -485,7 +485,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, aRef->DoClose(); - pDoc->SetInLinkUpdate( FALSE ); + pDoc->SetInLinkUpdate( sal_False ); if (bCanDo) { diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index 61683e169f02..305eea2618d9 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -45,28 +45,28 @@ 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); } //================================================================== @@ -81,8 +81,8 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell) : ScAutoStyleList::~ScAutoStyleList() { - ULONG i; - ULONG nCount = aEntries.Count(); + sal_uLong i; + sal_uLong nCount = aEntries.Count(); for (i=0; inTimeout) nPos = i; @@ -171,10 +171,10 @@ 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 { - ULONG nCount = aEntries.Count(); - for (ULONG i=0; inTimeout <= nDiff ) @@ -192,7 +192,7 @@ void ScAutoStyleList::ExecuteEntries() pDocSh->DoAutoStyle( pData->aRange, pData->aStyle ); //! oder Request ??? delete pData; - aEntries.Remove((ULONG)0); + aEntries.Remove((sal_uLong)0); } } @@ -200,8 +200,8 @@ void ScAutoStyleList::ExecuteAllNow() { aTimer.Stop(); - ULONG nCount = aEntries.Count(); - for (ULONG i=0; inTimeout == 0 ) ++nPos; @@ -231,7 +231,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 cf149d258062..cf114cf8479e 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -60,14 +60,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) @@ -80,19 +80,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( sal_False ); // CompileFormulaString if (!bOk) { delete pNew; delete pUndoColl; - return FALSE; + return sal_False; } if (bUndo) @@ -104,17 +104,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 = sal_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 ); @@ -123,9 +123,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( sal_False ); // CompileFormulaString if (bUndo) { @@ -136,21 +136,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 = sal_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 ) ) { @@ -162,15 +162,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( sal_False ); // CompileFormulaString if (bInserted) // Einfuegen hat geklappt { @@ -185,21 +185,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 = sal_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 ); @@ -209,7 +209,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) @@ -227,7 +227,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ ) } aModificator.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; } return bDone; @@ -235,45 +235,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_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 = sal_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; } } @@ -306,22 +306,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(nOutStartCol), 0, nTab, static_cast(nOutEndCol), MAXROW, nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); pDoc->CopyToDocument( 0, static_cast(nOutStartRow), nTab, MAXCOL, static_cast(nOutEndRow), nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); } else - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_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, sal_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, sal_False, pUndoDoc ); // DB- und andere Bereiche ScRangeName* pDocRange = pDoc->GetRangeName(); @@ -336,23 +336,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, sal_False, bApi ); } if (bSort) { pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben - Sort( nTab, aSortParam, FALSE, FALSE, bApi ); + Sort( nTab, aSortParam, sal_False, sal_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, sal_False, bApi ); else - Query( nTab, aQueryParam, NULL, FALSE, bApi ); + Query( nTab, aQueryParam, NULL, sal_False, bApi ); // bei nicht-inplace kann die Tabelle umgestellt worden sein // if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab ) @@ -361,8 +361,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 = sal_False; + DoSubTotals( nTab, aSubTotalParam, NULL, sal_False, bApi ); } if (bRecord) @@ -378,7 +378,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 ); @@ -400,7 +400,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); @@ -411,14 +411,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 = sal_False; SCTAB nSrcTab = nTab; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); @@ -427,15 +427,15 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, if (!pDBData) { DBG_ERROR( "Sort: keine DBData" ); - return FALSE; + return sal_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 = sal_False; ScSortParam aLocalParam( rSortParam ); if ( bCopy ) { @@ -444,12 +444,12 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, { if (!bApi) rDocShell.ErrorMessage(STR_PASTE_FULL); - return FALSE; + return sal_False; } nTab = rSortParam.nDestTab; pDestData = pDoc->GetDBAtCursor( rSortParam.nDestCol, rSortParam.nDestRow, - rSortParam.nDestTab, TRUE ); + rSortParam.nDestTab, sal_True ); if (pDestData) pDestData->GetArea(aOldDest); } @@ -460,7 +460,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if ( aLocalParam.bIncludePattern && pDoc->HasAttrib( @@ -471,7 +471,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 sal_False; } @@ -479,11 +479,11 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - BOOL bRepeatQuery = FALSE; // bestehenden Filter wiederholen? + sal_Bool bRepeatQuery = sal_False; // bestehenden Filter wiederholen? ScQueryParam aQueryParam; pDBData->GetQueryParam( aQueryParam ); if ( aQueryParam.GetEntry(0).bDoQuery ) - bRepeatQuery = TRUE; + bRepeatQuery = sal_True; if (bRepeatQuery && bCopy) { @@ -491,7 +491,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 = sal_False; } ScUndoSort* pUndoAction = 0; @@ -502,7 +502,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, sal_False, sal_True ); /* #i59745# Do not copy note captions to undo document. All existing caption objects will be repositioned while sorting which is tracked @@ -511,7 +511,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, sal_False, pUndoDoc ); const ScRange* pR = 0; if (pDestData) @@ -522,7 +522,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, sal_False, pUndoDoc ); pR = &aOldDest; } @@ -530,7 +530,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, sal_False, pUndoDoc ); ScDBCollection* pUndoDB = NULL; ScDBCollection* pDocDB = pDoc->GetDBCollection(); @@ -554,21 +554,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, sal_False, sal_False, sal_False, sal_True ); } // #105780# 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 = sal_False; aOldSortParam.nDestCol = rSortParam.nDestCol; aOldSortParam.nDestRow = rSortParam.nDestRow; aOldSortParam.nDestTab = rSortParam.nDestTab; @@ -615,7 +615,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; @@ -645,25 +645,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 = sal_False; ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rQueryParam.nCol1, rQueryParam.nRow1, rQueryParam.nCol2, rQueryParam.nRow2 ); if (!pDBData) { DBG_ERROR( "Query: keine DBData" ); - return FALSE; + return sal_False; } // Wechsel von Inplace auf nicht-Inplace, dann erst Inplace aufheben: @@ -679,23 +679,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, SCSIZE nEC = aOldQuery.GetEntryCount(); for (SCSIZE i=0; iGetDBAtCursor( rQueryParam.nDestCol, rQueryParam.nDestRow, - rQueryParam.nDestTab, TRUE ); + rQueryParam.nDestTab, sal_True ); if (pDestData) { pDestData->GetArea( aOldDest ); @@ -746,7 +746,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, { if (!bApi) rDocShell.ErrorMessage(STR_MSSG_DOSUBTOTALS_2); // kann keine Zeilen einfuegen - return FALSE; + return sal_False; } } } @@ -755,14 +755,14 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - BOOL bKeepSub = FALSE; // bestehende Teilergebnisse wiederholen? + sal_Bool bKeepSub = sal_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; @@ -774,23 +774,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, sal_False, sal_True ); pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab, aLocalParam.nCol2, aLocalParam.nRow2, nDestTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); // Attribute sichern, falls beim Filtern mitkopiert if (pDestData) { - pDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aOldDest, IDF_ALL, sal_False, pUndoDoc ); pOld = &aOldDest; } } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); pDoc->CopyToDocument( 0, rQueryParam.nRow1, nTab, MAXCOL, rQueryParam.nRow2, nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); } ScDBCollection* pDocDB = pDoc->GetDBCollection(); @@ -817,8 +817,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, sal_False, sal_True ); + pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, sal_False, pAttribDoc ); } if ( bDoSize ) @@ -842,7 +842,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, sal_False ); // sal_False - nicht loeschen if ( nFormulaCols > 0 ) { @@ -853,7 +853,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, sal_False ); ScMarkData aMark; aMark.SelectOneTable(nDestTab); @@ -872,7 +872,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, sal_False, pDoc ); } // Daten @@ -899,7 +899,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 ); @@ -977,31 +977,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1, rParam.nCol2, rParam.nRow2 ); if (!pDBData) { DBG_ERROR( "SubTotals: keine DBData" ); - return FALSE; + return sal_False; } ScEditableTester aTester( pDoc, nTab, 0,rParam.nRow1+1, MAXCOL,MAXROW ); @@ -1009,7 +1009,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if (pDoc->HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab, @@ -1017,15 +1017,15 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, { if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen - return FALSE; + return sal_False; } - BOOL bOk = TRUE; - BOOL bDelete = FALSE; + sal_Bool bOk = sal_True; + sal_Bool bDelete = sal_False; if (rParam.bReplace) if (pDoc->TestRemoveSubTotals( nTab, rParam )) { - bDelete = TRUE; + bDelete = sal_True; bOk = ( MessBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), @@ -1047,7 +1047,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; nTabCount = pDoc->GetTableCount(); pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -1062,20 +1062,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(nOutStartCol), 0, nTab, static_cast(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(nOutStartCol), 0, nTab, static_cast(nOutEndCol), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); } else - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, bOldFilter ); // Datenbereich sichern - incl. Filter-Ergebnis pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); // alle Formeln wegen Referenzen pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, - IDF_FORMULA, FALSE, pUndoDoc ); + IDF_FORMULA, sal_False, pUndoDoc ); // DB- und andere Bereiche ScRangeName* pDocRange = pDoc->GetRangeName(); @@ -1093,7 +1093,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 @@ -1107,7 +1107,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, sal_False, sal_False, bApi ); } bSuccess = pDoc->DoSubTotals( nTab, aNewParam ); @@ -1149,7 +1149,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(); @@ -1158,23 +1158,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 sal_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 = sal_False; + sal_Bool bUndoSelf = sal_False; + sal_uInt16 nErrId = 0; ScDocument* pOldUndoDoc = NULL; ScDocument* pNewUndoDoc = NULL; @@ -1184,7 +1184,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if ( !rDocShell.IsEditable() || pDoc->GetChangeTrack() ) { // not recorded -> disallow @@ -1225,7 +1225,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, sal_False, pOldUndoDoc ); } pDoc->DeleteAreaTab( aRange.aStart.Col(), aRange.aStart.Row(), @@ -1241,7 +1241,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 ) { @@ -1253,7 +1253,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, sal_False, pOldUndoDoc ); } if ( pNewObj == pOldObj ) @@ -1285,7 +1285,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) ) { DBG_ERROR("cannot insert DPObject"); @@ -1306,7 +1306,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb if ( !pDestObj->GetName().Len() ) pDestObj->SetName( pDoc->GetDPCollection()->CreateNewName() ); - BOOL bOverflow = FALSE; + sal_Bool bOverflow = sal_False; ScRange aNewOut = pDestObj->GetNewOutputRange( bOverflow ); //! test for overlap with other data pilot tables @@ -1320,7 +1320,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; } } @@ -1328,7 +1328,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 @@ -1342,7 +1342,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(); } } @@ -1350,7 +1350,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 @@ -1366,7 +1366,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; } } } @@ -1376,13 +1376,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, sal_False, pNewUndoDoc ); } pDestObj->Output( aNewOut.aStart ); rDocShell.PostPaintGridAll(); //! only necessary parts - bDone = TRUE; + bDone = sal_True; } } // else nothing (no old, no new) @@ -1403,7 +1403,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb pAction->Undo(); delete pAction; - bDone = FALSE; + bDone = sal_False; } else rDocShell.GetUndoManager()->AddUndoAction( pAction ); @@ -1432,8 +1432,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 ) { @@ -1443,13 +1443,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; iGetName() == rTarget) - bFound = TRUE; + bFound = sal_True; } if (!bFound) { @@ -1465,15 +1465,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 a073e50d105c..2537bfa0be56 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -118,15 +118,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& aArgs ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScImportParam aImParam; aImParam.nCol1 = aImParam.nCol2 = rPos.Col(); aImParam.nRow1 = aImParam.nRow2 = rPos.Row(); - aImParam.bImport = TRUE; + aImParam.bImport = sal_True; uno::Reference xResSet; uno::Sequence aSelection; @@ -156,7 +156,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, if ( rProp.Value >>= nType ) { aImParam.bSql = ( nType == sdb::CommandType::COMMAND ); - aImParam.nType = sal::static_int_cast( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable ); + aImParam.nType = sal::static_int_cast( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable ); // nType is ignored if bSql is set } } @@ -179,10 +179,10 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, aList.Insert( (void*)nEntry, LIST_APPEND ); } - BOOL bAddrInsert = FALSE; //!??? + sal_Bool bAddrInsert = sal_False; //!??? if ( bAddrInsert ) { - bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, TRUE, bAddrInsert ); + bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, sal_True, bAddrInsert ); } else { @@ -203,7 +203,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; @@ -211,14 +211,14 @@ 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(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBData* pDBData = 0; if ( !bAddrInsert ) @@ -228,7 +228,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (!pDBData) { DBG_ERROR( "DoImport: no DBData" ); - return FALSE; + return sal_False; } } @@ -237,10 +237,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 = sal_False; + sal_Bool bApi = sal_False; //! pass as argument + sal_Bool bTruncated = sal_False; // for warning + sal_uInt16 nErrStringId = 0; String aErrorMessage; SCCOL nCol = rParam.nCol1; @@ -249,23 +249,23 @@ 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 = sal_False; + sal_Bool bRealSelection = sal_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(); } // ImportDoc - also used for Redo ScDocument* pImportDoc = new ScDocument( SCDOCMODE_UNDO ); pImportDoc->InitUndo( pDoc, nTab, nTab ); - ScColumn::bDoubleAlloc = TRUE; + ScColumn::bDoubleAlloc = sal_True; // // get data from database into import document @@ -276,7 +276,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, // progress bar // only text (title is still needed, for the cancel button) ScProgress aProgress( &rDocShell, ScGlobal::GetRscString(STR_UNDO_IMPORTDATA), 0 ); - USHORT nInserted = 0; + sal_uInt16 nInserted = 0; uno::Reference xRowSet = uno::Reference( xResultSet, uno::UNO_QUERY ); @@ -373,7 +373,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, ++nRow; } - BOOL bEnd = FALSE; + sal_Bool bEnd = sal_False; if ( !bDoSelection ) xRowSet->beforeFirst(); while ( !bEnd ) @@ -381,23 +381,23 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, // skip rows that are not selected if ( !bDoSelection ) { - if ( (bEnd = !xRowSet->next()) == FALSE ) + if ( (bEnd = !xRowSet->next()) == sal_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 } } @@ -427,21 +427,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 = sal_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 ) @@ -457,15 +457,15 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, DBG_ERROR("Unexpected exception in database"); } - ScColumn::bDoubleAlloc = FALSE; + ScColumn::bDoubleAlloc = sal_False; pImportDoc->DoColResize( nTab, rParam.nCol1,nEndCol, 0 ); // // 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) { @@ -488,12 +488,12 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if ( !aTester.IsEditable() ) { nErrStringId = aTester.GetMessageId(); - bSuccess = FALSE; + bSuccess = sal_False; } else if ( pDoc->GetChangeTrack() != NULL ) { nErrStringId = STR_PROTECTIONERR; - bSuccess = FALSE; + bSuccess = sal_False; } } @@ -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 = sal_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, sal_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( sal_False,sal_False,sal_False,sal_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, sal_False, pUndoDoc ); if ( rParam.nCol2 > nEndCol ) pDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab, nUndoEndCol, nUndoEndRow, nTab, - nCopyFlags, FALSE, pUndoDoc ); + nCopyFlags, sal_False, pUndoDoc ); if ( rParam.nRow2 > nEndRow ) pDoc->CopyToDocument( rParam.nCol1, nEndRow+1, nTab, nUndoEndCol+nFormulaCols, nUndoEndRow, nTab, - nCopyFlags, FALSE, pUndoDoc ); + nCopyFlags, sal_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, sal_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 ); // #41216# 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( sal_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, sal_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, sal_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, sal_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 038d0a72e824..fa219689d933 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -126,7 +126,7 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction ) SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTabIsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); return 0; } @@ -148,17 +148,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 sal_False; } if ( !pDoc->IsAdjustHeightEnabled() ) { - return FALSE; + return sal_False; } SCTAB nTab = rRange.aStart.Tab(); @@ -168,8 +168,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, sal_False ); if ( bPaint && bChanged ) rDocShell.PostPaint( 0, nStartRow, nTab, MAXCOL, MAXROW, nTab, @@ -181,13 +181,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(); @@ -195,7 +195,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(); @@ -219,14 +219,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 sal_False; ScDocShellModificator aModificator( rDocShell ); @@ -236,7 +236,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(); @@ -260,14 +260,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(); @@ -275,7 +275,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(); @@ -299,14 +299,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 sal_False; ScDocShellModificator aModificator( rDocShell ); @@ -316,7 +316,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(); @@ -340,14 +340,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(); @@ -355,7 +355,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(); @@ -379,14 +379,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(); @@ -394,8 +394,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(); @@ -421,20 +421,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 sal_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(); @@ -463,12 +463,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDetOpList* pList = pDoc->GetDetOpList(); if ( pList && pList->Count() ) { @@ -485,8 +485,8 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic ) // Wiederholen - USHORT nCount = pList->Count(); - for (USHORT i=0; iCount(); + for (sal_uInt16 i=0; iIsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScEditableTester aTester( pDoc, rMark ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScRange aMarkRange; - BOOL bSimple = FALSE; + sal_Bool bSimple = sal_False; ScMarkData aMultiMark = rMark; - aMultiMark.SetMarking(FALSE); // fuer MarkToMulti + aMultiMark.SetMarking(sal_False); // fuer MarkToMulti ScDocument* pUndoDoc = NULL; - BOOL bMulti = !bSimple && aMultiMark.IsMultiMarked(); + sal_Bool bMulti = !bSimple && aMultiMark.IsMultiMarked(); if (!bSimple) { aMultiMark.MarkToMulti(); @@ -578,22 +578,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 = sal_False; } // keine Objekte auf geschuetzten Tabellen - BOOL bObjects = FALSE; + sal_Bool bObjects = sal_False; if ( nFlags & IDF_OBJECTS ) { - bObjects = TRUE; + bObjects = sal_True; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTabIsTabProtected(nTab)) - bObjects = FALSE; + bObjects = sal_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 ); @@ -624,7 +624,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 @@ -674,31 +674,31 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags, } #endif - 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 = sal_False; ScEditableTester aTester( pDoc, rMark ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScRange aMarkRange; ScMarkData aMultiMark = rMark; - aMultiMark.SetMarking(FALSE); // for MarkToMulti + aMultiMark.SetMarking(sal_False); // for MarkToMulti aMultiMark.MarkToMulti(); aMultiMark.GetMultiMarkArea( aMarkRange ); @@ -716,7 +716,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 ) ); @@ -729,31 +729,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 sal_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]; @@ -761,18 +761,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,sal_False,&pItem) ) { - pHasFormat[0] = TRUE; + pHasFormat[0] = sal_True; pOldFormats[0] = ((const SfxUInt32Item*)pItem)->GetValue(); } else - pHasFormat[0] = FALSE; + pHasFormat[0] = sal_False; } pDoc->SetString( rPos.Col(), rPos.Row(), rPos.Tab(), rText ); @@ -794,15 +794,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) @@ -813,14 +813,14 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); pNewCell->Delete(); - return FALSE; + return sal_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; @@ -848,7 +848,7 @@ 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 ) @@ -865,30 +865,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(sal_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 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 = sal_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 @@ -907,8 +907,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 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 ); } } @@ -1037,8 +1037,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 @@ -1086,7 +1086,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(), sal_False); rDocShell.SetDocumentModified(); @@ -1095,7 +1095,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 ); @@ -1117,7 +1117,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(), sal_False); rDocShell.PostPaintCell( rPos ); aModificator.SetDocumentModified(); @@ -1127,7 +1127,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; @@ -1174,7 +1174,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(), sal_False); aModificator.SetDocumentModified(); bDone = true; @@ -1189,23 +1189,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 = sal_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 sal_False; } ScDocShellModificator aModificator( rDocShell ); @@ -1213,7 +1213,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 @@ -1234,7 +1234,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 ); @@ -1248,38 +1248,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 = sal_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 sal_False; } ScStyleSheet* pStyleSheet = (ScStyleSheet*) pDoc->GetStyleSheetPool()->Find( rStyleName, SFX_STYLE_FAMILY_PARA ); if (!pStyleSheet) - return FALSE; + return sal_False; ScDocShellModificator aModificator( rDocShell ); ScRange aMultiRange; - BOOL bMulti = rMark.IsMultiMarked(); + sal_Bool bMulti = rMark.IsMultiMarked(); if ( bMulti ) rMark.GetMultiMarkArea( aMultiRange ); else @@ -1306,15 +1306,15 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName, } -// BOOL bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT ); +// sal_Bool bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT ); // pDoc->ApplySelectionPattern( rPattern, rMark ); pDoc->ApplySelectionStyle( (ScStyleSheet&)*pStyleSheet, rMark ); // if (!bPaintExt) // bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT ); -// USHORT nExtFlags = bPaintExt ? SC_PF_LINES : 0; - USHORT nExtFlags = 0; +// sal_uInt16 nExtFlags = bPaintExt ? SC_PF_LINES : 0; + sal_uInt16 nExtFlags = 0; if (!AdjustRowHeight( aMultiRange )) rDocShell.PostPaint( aMultiRange, PAINT_GRID, nExtFlags ); else if (nExtFlags & SC_PF_LINES) @@ -1322,13 +1322,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 ); @@ -1342,7 +1342,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) ) { DBG_ERROR("invalid row in InsertCells"); - return FALSE; + return sal_False; } ScDocument* pDoc = rDocShell.GetDocument(); @@ -1351,8 +1351,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 @@ -1365,7 +1365,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, } if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -1380,7 +1380,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; } } @@ -1392,7 +1392,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if( aMark.GetTableSelect( i ) ) { for( SCTAB j = i+1; jIsScenario(j); j++ ) - aFullMark.SelectTable( j, TRUE ); + aFullMark.SelectTable( j, sal_True ); } SCTAB nSelCount = aMark.GetSelectCount(); @@ -1432,7 +1432,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( eCmd == INS_CELLSRIGHT ) nMergeTestEndX = MAXCOL; - BOOL bNeedRefresh = FALSE; + sal_Bool bNeedRefresh = sal_False; SCCOL nEditTestEndX = (eCmd==INS_INSCOLS) ? MAXCOL : nMergeTestEndX; SCROW nEditTestEndY = (eCmd==INS_INSROWS) ? MAXROW : nMergeTestEndY; @@ -1441,7 +1441,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference @@ -1451,7 +1451,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, sal_False, sal_False ); // pRefUndoDoc is filled in InsertCol / InsertRow @@ -1462,7 +1462,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 = sal_False; std::vector qIncreaseRange; String aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTCELLS ); if (bRecord) @@ -1475,7 +1475,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; @@ -1491,7 +1491,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } SCCOL nTestCol = -1; @@ -1507,12 +1507,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 ) { @@ -1520,12 +1520,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; } } } @@ -1536,7 +1536,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, { qIncreaseRange.push_back( aRange ); } - bInsertMerge = TRUE; + bInsertMerge = sal_True; } } } @@ -1579,7 +1579,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 ); } } } @@ -1589,7 +1589,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } } } @@ -1621,7 +1621,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, break; default: DBG_ERROR("Falscher Code beim Einfuegen"); - bSuccess = FALSE; + bSuccess = sal_False; break; } @@ -1680,7 +1680,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, default: break; } - MergeCells(aRange, FALSE, TRUE, TRUE); + MergeCells(aRange, sal_False, sal_True, sal_True); } qIncreaseRange.pop_back(); } @@ -1693,14 +1693,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; @@ -1708,7 +1708,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, for( SCTAB j = i+1; jIsScenario(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) { @@ -1729,13 +1729,13 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, while( !qIncreaseRange.empty() ) { ScRange aRange = qIncreaseRange.back(); - MergeCells(aRange, FALSE, TRUE, TRUE); + MergeCells(aRange, sal_False, sal_True, sal_True); qIncreaseRange.pop_back(); } if( pViewSh ) { - pViewSh->MarkRange( rRange, FALSE ); + pViewSh->MarkRange( rRange, sal_False ); pViewSh->SetCursor( nCursorCol, nCursorRow ); } } @@ -1756,8 +1756,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 ); @@ -1771,7 +1771,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) ) { DBG_ERROR("invalid row in DeleteCells"); - return FALSE; + return sal_False; } ScDocument* pDoc = rDocShell.GetDocument(); @@ -1780,11 +1780,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 = sal_False; ScMarkData aMark; if (pTabMark) @@ -1799,7 +1799,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; } } @@ -1811,7 +1811,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( aMark.GetTableSelect( i ) ) { for( SCTAB j = i+1; jIsScenario(j); j++ ) - aFullMark.SelectTable( j, TRUE ); + aFullMark.SelectTable( j, sal_True ); } SCTAB nSelCount = aMark.GetSelectCount(); @@ -1856,7 +1856,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } // Test zusammengefasste @@ -1865,12 +1865,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 = sal_False; //Issue 8302 want to be able to insert into the middle of merged cells //the patch comes from maoyg ::std::vector qDecreaseRange; - BOOL bDeletingMerge = FALSE; + sal_Bool bDeletingMerge = sal_False; String aUndo = ScGlobal::GetRscString( STR_UNDO_DELETECELLS ); if (bRecord) rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo ); @@ -1894,7 +1894,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } nExtendStartCol = nMergeStartX; @@ -1912,12 +1912,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 ) { @@ -1925,12 +1925,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; } } } @@ -1941,7 +1941,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { qDecreaseRange.push_back( aRange ); } - bDeletingMerge = TRUE; + bDeletingMerge = sal_True; } } } @@ -1953,7 +1953,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 ) { @@ -1973,7 +1973,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( eCmd == DEL_CELLSLEFT ) { nEndRow = aExtendMergeRange.aEnd.Row(); - bNeedRefresh = TRUE; + bNeedRefresh = sal_True; } else { @@ -1989,7 +1989,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 ); } } } @@ -1999,7 +1999,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } } } @@ -2031,26 +2031,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, sal_False, pUndoDoc ); } } pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE ); + pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, sal_False, sal_False ); pUndoData = new ScRefUndoData( pDoc ); pDoc->BeginDrawUndo(); } - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; for( i=0; iDeleteAreaTab(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, sal_False, sal_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,sal_False,pUndoDoc,NULL,sal_False); delete pRefUndoDoc; SCTAB* pTabs = new SCTAB[nSelCount]; @@ -2167,7 +2167,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( !pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { - MergeCells( aRange, FALSE, TRUE, TRUE ); + MergeCells( aRange, sal_False, sal_True, sal_True ); } qDecreaseRange.pop_back(); } @@ -2199,7 +2199,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 ); } } } @@ -2235,11 +2235,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 ); @@ -2256,21 +2256,21 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) || !ValidRow(nDestRow) ) { DBG_ERROR("invalid row in MoveBlock"); - return FALSE; + return sal_False; } // zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird! - BOOL bScenariosAdded = FALSE; + sal_Bool bScenariosAdded = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_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; @@ -2281,7 +2281,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; @@ -2299,13 +2299,13 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, SCCOL nOldEndCol = nEndCol; SCROW nOldEndRow = nEndRow; - BOOL bClipOver = FALSE; + sal_Bool bClipOver = sal_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; } @@ -2316,14 +2316,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, sal_False ); SCROW nUndoAdd = nUndoEndRow - nDestEndRow; nDestEndRow = nDestRow + nClipY; nUndoEndRow = nDestEndRow + nUndoAdd; @@ -2334,7 +2334,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (!bApi) rDocShell.ErrorMessage(STR_PASTE_FULL); delete pClipDoc; - return FALSE; + return sal_False; } // Test auf Zellschutz @@ -2351,7 +2351,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); delete pClipDoc; - return FALSE; + return sal_False; } // Test auf zusammengefasste - beim Verschieben erst nach dem Loeschen @@ -2363,14 +2363,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0); delete pClipDoc; - return FALSE; + return sal_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 ); // @@ -2382,9 +2382,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 ); @@ -2392,30 +2392,30 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (bCut) { pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab, - nUndoFlags, FALSE, pUndoDoc ); + nUndoFlags, sal_False, pUndoDoc ); pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE ); + pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, sal_False, sal_False ); } if ( nDestTab != nStartTab ) pUndoDoc->AddUndoTab( nDestTab, nDestEndTab, bWholeCols, bWholeRows ); pDoc->CopyToDocument( nDestCol, nDestRow, nDestTab, nDestEndCol, nDestEndRow, nDestEndTab, - nUndoFlags, FALSE, pUndoDoc ); + nUndoFlags, sal_False, pUndoDoc ); pUndoData = new ScRefUndoData( pDoc ); pDoc->BeginDrawUndo(); } - BOOL bSourceHeight = FALSE; // Hoehen angepasst? + sal_Bool bSourceHeight = sal_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 ); @@ -2431,7 +2431,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 @@ -2442,17 +2442,17 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, delete pRefUndoDoc; delete pUndoData; delete pClipDoc; - return FALSE; + return sal_False; } - bSourceHeight = AdjustRowHeight( rSource, FALSE ); + bSourceHeight = AdjustRowHeight( rSource, sal_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 @@ -2461,16 +2461,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, sal_False, bIncludeFiltered ); // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - UnmergeCells( aPasteDest, FALSE, TRUE ); + UnmergeCells( aPasteDest, sal_False, sal_True ); VirtualDevice aVirtDev; - BOOL bDestHeight = AdjustRowHeight( + sal_Bool bDestHeight = AdjustRowHeight( ScRange( 0,nDestRow,nDestTab, MAXCOL,nDestEndRow,nDestEndTab ), - FALSE ); + sal_False ); /* Paste cell notes and drawing objects after adjusting formula references and row heights. There are no cell notes or drawing objects, if the @@ -2481,19 +2481,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, sal_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, sal_False, sal_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, sal_False, pUndoDoc, NULL, sal_False ); delete pRefUndoDoc; } @@ -2511,7 +2511,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; } @@ -2528,7 +2528,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? { @@ -2590,7 +2590,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; } //------------------------------------------------------------------------ @@ -2693,9 +2693,9 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ) } -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 = sal_False; WaitObject aWait( rDocShell.GetActiveDialogParent() ); ScDocShellModificator aModificator( rDocShell ); @@ -2705,20 +2705,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 = sal_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 @@ -2740,7 +2740,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); @@ -2748,20 +2748,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 = sal_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 = sal_False; if ( bVbaEnabled ) - bRecord = FALSE; - BOOL bWasLinked = pDoc->IsLinked(nTab); + bRecord = sal_False; + sal_Bool bWasLinked = pDoc->IsLinked(nTab); ScDocument* pUndoDoc = NULL; ScRefUndoData* pUndoData = NULL; if (bRecord) @@ -2769,13 +2769,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,sal_False, pUndoDoc ); String aOldName; pDoc->GetName( nTab, aOldName ); - pUndoDoc->RenameTab( nTab, aOldName, FALSE ); + pUndoDoc->RenameTab( nTab, aOldName, sal_False ); if (bWasLinked) pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab), pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab), @@ -2784,13 +2784,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 ) ); @@ -2804,7 +2804,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) @@ -2840,7 +2840,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 { @@ -2850,18 +2850,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 sal_False; } ScDocShellModificator aModificator( rDocShell ); @@ -2870,7 +2870,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; iIsVisible(i)) @@ -2880,7 +2880,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung? - return FALSE; + return sal_False; } } @@ -2896,15 +2896,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?) @@ -2927,17 +2927,17 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) pBindings->Invalidate( SID_ATTR_SIZE ); } - return TRUE; + return sal_True; } -//UNUSED2009-05 BOOL ScDocFunc::SetGrammar( formula::FormulaGrammar::Grammar eGrammar ) +//UNUSED2009-05 sal_Bool ScDocFunc::SetGrammar( formula::FormulaGrammar::Grammar eGrammar ) //UNUSED2009-05 { //UNUSED2009-05 ScDocument* pDoc = rDocShell.GetDocument(); //UNUSED2009-05 //UNUSED2009-05 if ( pDoc->GetGrammar() == eGrammar ) -//UNUSED2009-05 return TRUE; +//UNUSED2009-05 return sal_True; //UNUSED2009-05 -//UNUSED2009-05 BOOL bUndo(pDoc->IsUndoEnabled()); +//UNUSED2009-05 sal_Bool bUndo(pDoc->IsUndoEnabled()); //UNUSED2009-05 ScDocShellModificator aModificator( rDocShell ); //UNUSED2009-05 //UNUSED2009-05 pDoc->SetGrammar( eGrammar ); @@ -2952,7 +2952,7 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) //UNUSED2009-05 ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); //UNUSED2009-05 if (NULL != pViewSh) //UNUSED2009-05 { -//UNUSED2009-05 pViewSh->UpdateInputHandler( FALSE, FALSE ); +//UNUSED2009-05 pViewSh->UpdateInputHandler( sal_False, sal_False ); //UNUSED2009-05 } //UNUSED2009-05 //UNUSED2009-05 aModificator.SetDocumentModified(); @@ -2964,24 +2964,24 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) //UNUSED2009-05 //pBindings->Invalidate( FID_TAB_USE_R1C1 ); //UNUSED2009-05 } //UNUSED2009-05 -//UNUSED2009-05 return TRUE; +//UNUSED2009-05 return sal_True; //UNUSED2009-05 } -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 = sal_False; if ( !pDoc->IsDocEditable() ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); - return FALSE; + return sal_False; } ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; String sOldName; pDoc->GetName(nTab, sOldName); if (pDoc->RenameTab( nTab, rName )) @@ -2995,7 +2995,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; } @@ -3051,7 +3051,7 @@ bool ScDocFunc::SetTabBgColor( return false; } - USHORT nTab; + sal_uInt16 nTab; Color aNewTabBgColor; bool bSuccess = true; size_t nTabProtectCount = 0; @@ -3105,9 +3105,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 @@ -3122,30 +3122,30 @@ 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 ) { if (!nRangeCnt) - return TRUE; + return sal_True; ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) - bRecord = FALSE; + bRecord = sal_False; // import into read-only document is possible if ( !pDoc->IsChangeReadOnlyEnabled() && !rDocShell.IsEditable() ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung? - return FALSE; + return sal_False; } - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; SCCOLROW nStart = pRanges[0]; SCCOLROW nEnd = pRanges[2*nRangeCnt-1]; - BOOL bFormula = FALSE; + sal_Bool bFormula = sal_False; if ( eMode == SC_SIZE_OPTIMAL ) { //! Option "Formeln anzeigen" - woher nehmen? @@ -3162,13 +3162,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(nStart), 0, nTab, static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); + pDoc->CopyToDocument( static_cast(nStart), 0, nTab, static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, static_cast(nStart), nTab, MAXCOL, static_cast(nEnd), nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, static_cast(nStart), nTab, MAXCOL, static_cast(nEnd), nTab, IDF_NONE, sal_False, pUndoDoc ); } pUndoRanges = new SCCOLROW[ 2*nRangeCnt ]; @@ -3179,8 +3179,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 = sal_False; pDoc->IncSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln for (SCCOLROW nRangeNo=0; nRangeNoGetRowFlags(nRow,nTab); + sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab); SCROW nLastRow = -1; bool bHidden = pDoc->RowHidden(nRow, nTab, nLastRow); if ( !bHidden && ( nOld & CR_MANUALSIZE ) ) @@ -3213,9 +3213,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 ) @@ -3223,14 +3223,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 @@ -3240,7 +3240,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa SCCOL nLastCol = -1; if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab, nLastCol) ) { - USHORT nThisSize = nSizeTwips; + sal_uInt16 nThisSize = nSizeTwips; if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) nThisSize = nSizeTwips + @@ -3292,21 +3292,21 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa } -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 = sal_False; SCTAB nTab = rPos.Tab(); SfxBindings* pBindings = rDocShell.GetViewBindings(); SCCOLROW nPos = bColumn ? static_cast(rPos.Col()) : static_cast(rPos.Row()); if (nPos == 0) - return FALSE; // erste Spalte / Zeile + return sal_False; // erste Spalte / Zeile ScBreakType nBreak = bColumn ? pDoc->HasColBreak(static_cast(nPos), nTab) : @@ -3316,7 +3316,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(nPos), nTab, false, true); @@ -3327,7 +3327,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos, pDoc->UpdatePageBreaks( nTab ); if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); if (bColumn) { @@ -3353,17 +3353,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 = sal_False; SCTAB nTab = rPos.Tab(); SfxBindings* pBindings = rDocShell.GetViewBindings(); @@ -3381,7 +3381,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, sal_False ) ); if (bColumn) pDoc->RemoveColBreak(static_cast(nPos), nTab, false, true); @@ -3391,7 +3391,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, pDoc->UpdatePageBreaks( nTab ); if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); if (bColumn) { @@ -3417,7 +3417,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, if (bSetModified) aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -3447,7 +3447,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) @@ -3501,7 +3501,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(); @@ -3576,18 +3576,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 sal_False; } // #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached @@ -3596,7 +3596,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL ScRange aMarkRange; ScMarkData aMultiMark = rMark; - aMultiMark.SetMarking(FALSE); // for MarkToMulti + aMultiMark.SetMarking(sal_False); // for MarkToMulti aMultiMark.MarkToMulti(); aMultiMark.GetMultiMarkArea( aMarkRange ); @@ -3608,7 +3608,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 ) ); @@ -3621,21 +3621,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 sal_False; } ScRange aMarkRange; @@ -3656,7 +3656,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 ) ); @@ -3682,15 +3682,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -3700,14 +3700,14 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_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(); @@ -3716,7 +3716,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; @@ -3731,13 +3731,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, sal_False, pUndoDoc, &aMark ); if (bSize) { pDoc->CopyToDocument( nStartCol,0,0, nEndCol,MAXROW,nTabCount-1, - IDF_NONE, FALSE, pUndoDoc, &aMark ); + IDF_NONE, sal_False, pUndoDoc, &aMark ); pDoc->CopyToDocument( 0,nStartRow,0, MAXCOL,nEndRow,nTabCount-1, - IDF_NONE, FALSE, pUndoDoc, &aMark ); + IDF_NONE, sal_False, pUndoDoc, &aMark ); } pDoc->BeginDrawUndo(); } @@ -3759,8 +3759,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, for (SCTAB nTab=0; nTabIsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScMarkData aMark; if (pTabMark) @@ -3820,7 +3820,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 ); @@ -3835,7 +3835,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, sal_False, pUndoDoc ); } // use TokenArray if given, string (and flags) otherwise @@ -3877,7 +3877,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()); @@ -3887,12 +3887,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -3902,7 +3902,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -3910,7 +3910,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 ); @@ -3923,7 +3923,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, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoTabOp( &rDocShell, @@ -3938,7 +3938,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()); @@ -3960,12 +3960,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -3975,7 +3975,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -3983,7 +3983,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 ); @@ -4030,7 +4030,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, sal_False, pUndoDoc, &aMark ); } pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), @@ -4050,7 +4050,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, // rDocShell.PostPaintDataChanged(); aModificator.SetDocumentModified(); - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4058,14 +4058,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -4075,7 +4075,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -4083,7 +4083,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 ); @@ -4137,7 +4137,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, sal_False, pUndoDoc, &aMark ); } if (aDestArea.aStart.Col() <= aDestArea.aEnd.Col() && @@ -4168,7 +4168,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()); @@ -4176,8 +4176,8 @@ 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 ) { ScDocShellModificator aModificator( rDocShell ); @@ -4190,7 +4190,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -4198,7 +4198,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScRange aSourceArea = rRange; @@ -4215,7 +4215,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, aDestArea.aEnd.SetRow( sal::static_int_cast( aSourceArea.aEnd.Row() + nCount ) ); break; case FILL_TO_TOP: - if (nCount > sal::static_int_cast( aSourceArea.aStart.Row() )) + if (nCount > sal::static_int_cast( aSourceArea.aStart.Row() )) { DBG_ERROR("FillAuto: Row < 0"); nCount = aSourceArea.aStart.Row(); @@ -4226,7 +4226,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, aDestArea.aEnd.SetCol( sal::static_int_cast( aSourceArea.aEnd.Col() + nCount ) ); break; case FILL_TO_LEFT: - if (nCount > sal::static_int_cast( aSourceArea.aStart.Col() )) + if (nCount > sal::static_int_cast( aSourceArea.aStart.Col() )) { DBG_ERROR("FillAuto: Col < 0"); nCount = aSourceArea.aStart.Col(); @@ -4247,7 +4247,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if ( pDoc->HasSelectedBlockMatrixFragment( nStartCol, nStartRow, @@ -4255,7 +4255,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(STR_MATRIXFRAGMENTERR); - return FALSE; + return sal_False; } WaitObject aWait( rDocShell.GetActiveDialogParent() ); @@ -4276,7 +4276,7 @@ BOOL ScDocFunc::FillAuto( 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, sal_False, pUndoDoc, &aMark ); } pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), @@ -4298,12 +4298,12 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, aModificator.SetDocumentModified(); rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren) - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::MergeCells( const ScRange& rRange, sal_Bool bContents, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -4315,20 +4315,20 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, SCTAB nTab = rRange.aStart.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScEditableTester aTester( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if ( nStartCol == nEndCol && nStartRow == nEndRow ) { // nichts zu tun - return TRUE; + return sal_True; } if ( pDoc->HasAttrib( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, @@ -4337,10 +4337,10 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, // "Zusammenfassen nicht verschachteln !" if (!bApi) rDocShell.ErrorMessage(STR_MSSG_MERGECELLS_0); - return FALSE; + return sal_False; } - BOOL bNeedContents = bContents && + sal_Bool bNeedContents = bContents && ( !pDoc->IsBlockEmpty( nTab, nStartCol,nStartRow+1, nStartCol,nEndRow, true ) || !pDoc->IsBlockEmpty( nTab, nStartCol+1,nStartRow, nEndCol,nEndRow, true ) ); @@ -4359,7 +4359,7 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, pUndoDoc->InitUndo( pDoc, nTab, nTab ); // 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, sal_False, pUndoDoc ); } if( bHasNotes ) pDoc->BeginDrawUndo(); @@ -4393,10 +4393,10 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, 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 ) { ScDocShellModificator aModificator( rDocShell ); @@ -4404,7 +4404,7 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) SCTAB nTab = rRange.aStart.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if ( pDoc->HasAttrib( rRange, HASATTR_MERGED ) ) { @@ -4417,7 +4417,7 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) { ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( aExtended, IDF_ATTRIB, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aExtended, IDF_ATTRIB, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoRemoveMerge( &rDocShell, rRange, pUndoDoc ) ); } @@ -4433,32 +4433,32 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) aExtended.aEnd.Col(), aExtended.aEnd.Row(), nTab, SC_MF_HOR | SC_MF_VER ); - pDoc->ExtendMerge( aRefresh, TRUE, FALSE ); + pDoc->ExtendMerge( aRefresh, sal_True, sal_False ); if ( !AdjustRowHeight( aExtended ) ) rDocShell.PostPaint( aExtended, PAINT_GRID ); aModificator.SetDocumentModified(); } else if (!bApi) - Sound::Beep(); //! FALSE zurueck??? + Sound::Beep(); //! sal_False zurueck??? - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, BOOL bApi ) +sal_Bool ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, sal_Bool bApi ) { return SetNewRangeNames( new ScRangeName( rNewRanges ), bApi ); } -BOOL ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, BOOL /* bApi */ ) // takes ownership of pNewRanges +sal_Bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, sal_Bool /* bApi */ ) // takes ownership of pNewRanges { ScDocShellModificator aModificator( rDocShell ); DBG_ASSERT( pNewRanges, "pNewRanges is 0" ); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { @@ -4472,18 +4472,18 @@ BOOL ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, BOOL /* bApi */ ) // #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( sal_False ); // CompileFormulaString aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -4491,7 +4491,7 @@ BOOL ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, BOOL /* bApi */ ) 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; @@ -4507,8 +4507,8 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, String aContent; ScRange( nX1, nY1, nTab, nX2, nY2, nTab ).Format( aContent, SCR_ABS_3D, pDoc ); - BOOL bInsert = FALSE; - USHORT nOldPos; + sal_Bool bInsert = sal_False; + sal_uInt16 nOldPos; if (rList.SearchName( aName, nOldPos )) // vorhanden ? { ScRangeData* pOld = rList[nOldPos]; @@ -4517,7 +4517,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 ); @@ -4532,15 +4532,15 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, if ( nResult == RET_YES ) { rList.AtFree(nOldPos); - bInsert = TRUE; + bInsert = sal_True; } else if ( nResult == RET_CANCEL ) - rCancel = TRUE; + rCancel = sal_True; } } } else - bInsert = TRUE; + bInsert = sal_True; if (bInsert) { @@ -4556,14 +4556,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 sal_False; // war nix ScDocShellModificator aModificator( rDocShell ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -4571,26 +4571,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 = sal_False; if ( nFlags & ( NAME_LEFT | NAME_RIGHT ) ) if ( nStartCol == nEndCol ) - bValid = FALSE; + bValid = sal_False; if (bValid) { ScDocument* pDoc = rDocShell.GetDocument(); ScRangeName* pNames = pDoc->GetRangeName(); if (!pNames) - return FALSE; // soll nicht sein + return sal_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; @@ -4606,7 +4606,7 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi ) if ( bRight ) --nContX2; - BOOL bCancel = FALSE; + sal_Bool bCancel = sal_False; SCCOL i; SCROW j; @@ -4643,21 +4643,21 @@ 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 = sal_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 nCount = pList->GetCount(); - USHORT nValidCount = 0; - USHORT i; + sal_uInt16 nCount = pList->GetCount(); + sal_uInt16 nValidCount = 0; + sal_uInt16 i; for (i=0; iInitUndo( pDoc, nTab, nTab ); pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); pDoc->BeginDrawUndo(); // wegen Hoehenanpassung } ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ]; - USHORT j = 0; + sal_uInt16 j = 0; for (i=0; iInitUndo( pDoc, nTab, nTab ); pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, - IDF_ALL, FALSE, pRedoDoc ); + IDF_ALL, sal_False, pRedoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoListNames( &rDocShell, @@ -4736,7 +4736,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi ) rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PAINT_GRID ); //! rDocShell.UpdateOle(GetViewData()); aModificator.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4746,16 +4746,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 = sal_False; String aFormula; pDoc->GetFormula( nStartCol, nStartRow, nTab, aFormula ); @@ -4770,17 +4770,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, sal_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, sal_False, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } } @@ -4793,15 +4793,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(); @@ -4809,9 +4809,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 (nLinkPosGetLinks()[nLinkPos]; @@ -4844,7 +4844,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 @@ -4869,7 +4869,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen pLink->Update(); // kein SetInCreate -> Update ausfuehren - pLink->SetDoInsert(TRUE); // Default = TRUE + pLink->SetDoInsert(sal_True); // Default = TRUE SfxBindings* pBindings = rDocShell.GetViewBindings(); if (pBindings) @@ -4877,7 +4877,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 e7089349fdb7..9ded868e872d 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -274,17 +274,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( sal_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; @@ -296,7 +296,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) { UpdateLinks(); // don't prevent establishing of listeners anymore - aDocument.SetInsertingFromOtherDoc( FALSE ); + aDocument.SetInsertingFromOtherDoc( sal_False ); if ( bRet ) { ScChartListenerCollection* pChartListener = aDocument.GetChartListenerCollection(); @@ -323,12 +323,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 = sal_False; else if( !(*pNameBuffer == '\\' && *(pNameBuffer+1) == '\'') ) aDocURLBuffer.append(*pNameBuffer); // falls escaped Quote: nur Quote in den Namen ++pNameBuffer; @@ -344,7 +344,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 } @@ -361,8 +361,8 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) ScDPCollection* pDPCollection = aDocument.GetDPCollection(); if ( pDPCollection ) { - USHORT nDPCount = pDPCollection->GetCount(); - for (USHORT nDP=0; nDPGetCount(); + for (sal_uInt16 nDP=0; nDPGetName().Len() ) @@ -373,12 +373,12 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) ScColumn::bDoubleAlloc = sal_False; } else - aDocument.SetInsertingFromOtherDoc( FALSE ); + aDocument.SetInsertingFromOtherDoc( sal_False ); - aDocument.SetImportingXML( FALSE ); + aDocument.SetImportingXML( sal_False ); aDocument.EnableExecuteLink( true ); - aDocument.EnableUndo( TRUE ); - bIsEmpty = FALSE; + aDocument.EnableUndo( sal_True ); + bIsEmpty = sal_False; if (pModificator) { @@ -390,10 +390,10 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) DBG_ERROR("The Modificator should exist"); } - aDocument.DisableIdle( FALSE ); + aDocument.DisableIdle( sal_False ); } -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 ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::LoadXML" ); @@ -406,7 +406,7 @@ 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 ); @@ -420,7 +420,7 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R if ( nError ) pLoadMedium->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); - aDocument.SetXMLFromWrapper( FALSE ); + aDocument.SetXMLFromWrapper( sal_False ); AfterXMLLoading(bRet); //! row heights... @@ -428,11 +428,11 @@ 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); @@ -441,12 +441,12 @@ BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R else bRet = aImport.Export(sal_True); - aDocument.DisableIdle( FALSE ); + aDocument.DisableIdle( sal_False ); return bRet; } -BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::Load( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" ); @@ -458,7 +458,7 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium ) GetUndoManager()->Clear(); - BOOL bRet = SfxObjectShell::Load( rMedium ); + sal_Bool bRet = SfxObjectShell::Load( rMedium ); if( bRet ) { if (GetMedium()) @@ -491,7 +491,7 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium ) if ( bRet ) aDocument.InvalidateTableArea(); - bIsEmpty = FALSE; + bIsEmpty = sal_False; FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES ); return bRet; } @@ -514,7 +514,7 @@ void __EXPORT 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: @@ -569,7 +569,7 @@ void __EXPORT 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: @@ -593,7 +593,7 @@ void __EXPORT 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); @@ -601,7 +601,7 @@ void __EXPORT 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: @@ -638,7 +638,7 @@ void __EXPORT 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 ); @@ -795,8 +795,8 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScChangeViewSettings* pChangeViewSet = aDocument.GetChangeViewSettings(); if ( pChangeViewSet && pChangeViewSet->ShowChanges() ) { - pChangeViewSet->SetShowChanges( FALSE ); - pChangeViewSet->SetShowAccepted( FALSE ); + pChangeViewSet->SetShowChanges( sal_False ); + pChangeViewSet->SetShowAccepted( sal_False ); aDocument.SetChangeViewSettings( *pChangeViewSet ); bChangedViewSettings = true; } @@ -821,8 +821,8 @@ void __EXPORT 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 ); } } @@ -917,7 +917,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) // Inhalte fuer Organizer laden -BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::LoadFrom" ); @@ -925,7 +925,7 @@ BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium ) WaitObject aWait( GetActiveDialogParent() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (GetMedium()) { @@ -993,13 +993,13 @@ private: } -BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) +sal_Bool __EXPORT 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 = sal_False; // sal_False heisst Benutzerabbruch !! // bei Fehler: Fehler am Stream setzen!! ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() ); @@ -1007,13 +1007,13 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) GetUndoManager()->Clear(); // ob nach dem Import optimale Spaltenbreiten gesetzt werden sollen - BOOL bSetColWidths = FALSE; - BOOL bSetSimpleTextColWidths = FALSE; - BOOL bSimpleColWidth[MAXCOLCOUNT]; - memset( bSimpleColWidth, 1, (MAXCOLCOUNT) * sizeof(BOOL) ); + sal_Bool bSetColWidths = sal_False; + sal_Bool bSetSimpleTextColWidths = sal_False; + sal_Bool bSimpleColWidth[MAXCOLCOUNT]; + memset( bSimpleColWidth, 1, (MAXCOLCOUNT) * sizeof(sal_Bool) ); ScRange aColWidthRange; // ob nach dem Import optimale Zeilenhoehen gesetzt werden sollen - BOOL bSetRowHeights = FALSE; + sal_Bool bSetRowHeights = sal_False; aConvFilterName.Erase(); //@ #BugId 54198 @@ -1032,10 +1032,10 @@ BOOL __EXPORT 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 ); @@ -1051,7 +1051,7 @@ BOOL __EXPORT 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)) @@ -1060,7 +1060,7 @@ BOOL __EXPORT 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(); } @@ -1072,22 +1072,22 @@ BOOL __EXPORT 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 = sal_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) || @@ -1105,9 +1105,9 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) MakeDrawLayer(); //! im Filter CalcOutputFactor(); // #93255# prepare update of row height - ScColumn::bDoubleAlloc = TRUE; + ScColumn::bDoubleAlloc = sal_True; FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat ); - ScColumn::bDoubleAlloc = FALSE; + ScColumn::bDoubleAlloc = sal_False; aDocument.UpdateFontCharSet(); if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) aDocument.UpdateChartListenerCollection(); //! fuer alle Importe? @@ -1119,7 +1119,7 @@ BOOL __EXPORT 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) { @@ -1127,23 +1127,23 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); } else - bRet = TRUE; + bRet = sal_True; // #93255# update of row height done inside of Excel filter to speed up chart import -// bSetRowHeights = TRUE; // #75357# optimal row heights must be updated +// bSetRowHeights = sal_True; // #75357# optimal row heights must be updated } else if (aFltName.EqualsAscii(pFilterAscii)) { SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; ScAsciiOptions aOptions; - BOOL bOptInit = FALSE; + sal_Bool bOptInit = sal_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 ) @@ -1157,7 +1157,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) } FltError eError = eERR_OK; - BOOL bOverflow = FALSE; + sal_Bool bOverflow = sal_False; if( ! rMedium.IsStorage() ) { @@ -1191,8 +1191,8 @@ BOOL __EXPORT 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)) { @@ -1200,7 +1200,7 @@ BOOL __EXPORT 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(); } @@ -1213,7 +1213,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 ); } - ULONG eError = DBaseImport( rMedium.GetPhysicalName(), + sal_uLong eError = DBaseImport( rMedium.GetPhysicalName(), ScGlobal::GetCharsetValue(sItStr), bSimpleColWidth ); if (eError != eERR_OK) @@ -1223,16 +1223,16 @@ BOOL __EXPORT 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 = sal_True; + bSetSimpleTextColWidths = sal_True; // Memo-Felder fuehren zu einem bSimpleColWidth[nCol]==FALSE for ( SCCOL nCol=0; nCol <= MAXCOL && !bSetRowHeights; nCol++ ) { if ( !bSimpleColWidth[nCol] ) - bSetRowHeights = TRUE; + bSetRowHeights = sal_True; } } else if (aFltName.EqualsAscii(pFilterDif)) @@ -1245,7 +1245,7 @@ BOOL __EXPORT 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(); } @@ -1266,14 +1266,14 @@ BOOL __EXPORT 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)) { @@ -1299,29 +1299,29 @@ BOOL __EXPORT 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 = sal_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)) { @@ -1340,14 +1340,14 @@ BOOL __EXPORT 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 { @@ -1361,7 +1361,7 @@ BOOL __EXPORT 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(); @@ -1372,7 +1372,7 @@ BOOL __EXPORT 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(pItem))->GetValue(); lcl_parseHtmlFilterOption(aFilterOption, eLang, bDateConvert); @@ -1391,10 +1391,10 @@ BOOL __EXPORT 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(); } @@ -1414,7 +1414,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if (!bCalc3) - aDocument.SetInsertingFromOtherDoc( FALSE ); + aDocument.SetInsertingFromOtherDoc( sal_False ); } else { @@ -1447,18 +1447,18 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) { for ( SCCOL nCol=0; nCol <= nEndCol; nCol++ ) { - 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, sal_False, &aMark, (bSetSimpleTextColWidths && bSimpleColWidth[nCol]) ); aDocument.SetColWidth( nCol, nTab, - nWidth + (USHORT)ScGlobal::nLastColWidthExtra ); + nWidth + (sal_uInt16)ScGlobal::nLastColWidthExtra ); } } // if ( bSetRowHeights ) // { // // nExtra must be 0 // aDocument.SetOptimalHeight( 0, nEndRow, nTab, 0, &aVirtDev, -// nPPTX, nPPTY, aZoom, aZoom, FALSE ); +// nPPTX, nPPTY, aZoom, aZoom, sal_False ); // } } if ( bSetRowHeights ) @@ -1470,7 +1470,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) if ( bRet ) aDocument.InvalidateTableArea(); - bIsEmpty = FALSE; + bIsEmpty = sal_False; return bRet; } @@ -1514,7 +1514,7 @@ ScDocShell::PrepareSaveGuard::~PrepareSaveGuard() } -BOOL __EXPORT ScDocShell::Save() +sal_Bool __EXPORT ScDocShell::Save() { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Save" ); @@ -1523,14 +1523,14 @@ BOOL __EXPORT 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 __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::SaveAs" ); @@ -1549,7 +1549,7 @@ BOOL __EXPORT 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 ); @@ -1557,13 +1557,13 @@ BOOL __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) } -BOOL __EXPORT ScDocShell::IsInformationLost() +sal_Bool __EXPORT ScDocShell::IsInformationLost() { /* const SfxFilter *pFilt = GetMedium()->GetFilter(); - BOOL bRet = pFilt && pFilt->IsAlienFormat() && bNoInformLost; + sal_Bool bRet = pFilt && pFilt->IsAlienFormat() && bNoInformLost; if (bNoInformLost) // nur einmal!! - bNoInformLost = FALSE; + bNoInformLost = sal_False; return bRet; */ //!!! bei Gelegenheit ein korrekte eigene Behandlung einbauen @@ -1573,7 +1573,7 @@ BOOL __EXPORT 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 fColScale = 1.0; double f = nWidth; @@ -1588,7 +1588,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 ) ); @@ -1631,7 +1631,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, sal_False, SVX_HOR_JUSTIFY_STANDARD ); rStream.WriteUnicodeOrByteText( aString ); } @@ -1642,19 +1642,19 @@ 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; + sal_Bool bContextOrNotAsciiEncoding; if ( eCharSet == RTL_TEXTENCODING_UNICODE ) { rStream.StartWritingUnicodeText(); - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = sal_False; } else { @@ -1670,7 +1670,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt aStrDelimDecoded = String( aStrDelimEncoded, eCharSet ); } else - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = sal_False; } SCCOL nStartCol = 0; @@ -1688,8 +1688,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; @@ -1704,10 +1704,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 = sal_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 ) @@ -1753,7 +1753,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt } if ( nCol == nEndCol ) { - bProgress = TRUE; + bProgress = sal_True; nNextCol = nStartCol; nNextRow = nRow + 1; } @@ -1771,26 +1771,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 = sal_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() ) { @@ -1805,7 +1805,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt else { ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter ); - bString = FALSE; + bString = sal_False; } } else @@ -1819,7 +1819,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt } else ((ScFormulaCell*)pCell)->GetString( aString ); - bString = TRUE; + bString = sal_True; } } break; @@ -1833,7 +1833,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt } else ((ScStringCell*)pCell)->GetString( aString ); - bString = TRUE; + bString = sal_True; break; case CELLTYPE_EDIT : { @@ -1842,7 +1842,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 : @@ -1858,14 +1858,14 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt else { ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter ); - bString = FALSE; + bString = sal_False; } } break; default: DBG_ERROR( "ScDocShell::AsciiSave: unknown CellType" ); aString.Erase(); - bString = FALSE; + bString = sal_False; } if ( bFixedWidth ) @@ -2009,7 +2009,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt rStream.SetNumberFormatInt( nOldNumberFormatInt ); } -BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) +sal_Bool __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertTo" ); @@ -2025,7 +2025,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) DBG_ASSERT( rMed.GetFilter(), "Filter == 0" ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String aFltName = rMed.GetFilter()->GetFilterName(); /* @@ -2117,7 +2117,7 @@ BOOL __EXPORT 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(); } @@ -2134,7 +2134,7 @@ BOOL __EXPORT 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()) @@ -2147,7 +2147,7 @@ BOOL __EXPORT 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(); } @@ -2163,9 +2163,9 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) WaitObject aWait( GetActiveDialogParent() ); // HACK damit Sba geoffnetes TempFile ueberschreiben kann rMed.CloseOutStream(); - BOOL bHasMemo = FALSE; + sal_Bool bHasMemo = sal_False; - ULONG eError = DBaseExport( rMed.GetPhysicalName(), + sal_uLong eError = DBaseExport( rMed.GetPhysicalName(), ScGlobal::GetCharsetValue(sCharSet), bHasMemo ); if ( eError != eERR_OK && (eError & ERRCODE_WARNING_MASK) ) @@ -2189,7 +2189,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) } else { - bRet = TRUE; + bRet = sal_True; if ( bHasMemo ) { SfxStringItem* pNameItem = @@ -2197,9 +2197,9 @@ BOOL __EXPORT 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 = sal_False; if ( bRet && !MoveFile( aTmpFile, aDbtFile ) ) - bRet = FALSE; + bRet = sal_False; if ( !bRet ) { KillFile( aTmpFile ); @@ -2218,7 +2218,7 @@ BOOL __EXPORT 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(); } @@ -2234,7 +2234,7 @@ BOOL __EXPORT 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()) @@ -2254,7 +2254,7 @@ BOOL __EXPORT 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 ); } } @@ -2283,15 +2283,15 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) } -BOOL __EXPORT ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) +sal_Bool __EXPORT ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) { return SfxObjectShell::SaveCompleted( xStor ); } -BOOL __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) +sal_Bool __EXPORT 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 ) ); @@ -2299,7 +2299,7 @@ BOOL __EXPORT 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 @@ -2338,7 +2338,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId ) } -USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) +sal_uInt16 __EXPORT ScDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) { if(SC_MOD()->GetCurRefDlgId()>0) { @@ -2354,12 +2354,12 @@ USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } } - return FALSE; + return sal_False; } if ( aDocument.IsInLinkUpdate() || aDocument.IsInInterpreter() ) { ErrorMessage(STR_CLOSE_ERROR_LINK); - return FALSE; + return sal_False; } DoEnterHandler(); @@ -2384,9 +2384,9 @@ USHORT __EXPORT 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; } @@ -2440,9 +2440,9 @@ String ScDocShell::GetDifFilterName() // static return String::CreateFromAscii(pFilterDif); } -BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static +sal_Bool ScDocShell::HasAutomaticTableName( const String& rFilter ) // static { - // 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 ) @@ -2463,15 +2463,15 @@ BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static 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 ( sal_False ), \ + bDocumentModifiedPending( sal_False ), \ nDocumentLock ( 0 ), \ nCanUpdate (com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG), \ - bUpdateEnabled ( TRUE ), \ + bUpdateEnabled ( sal_True ), \ pOldAutoDBRange ( NULL ), \ pDocHelper ( NULL ), \ pAutoStyleList ( NULL ), \ @@ -2586,7 +2586,7 @@ SfxUndoManager* __EXPORT ScDocShell::GetUndoManager() return aDocument.GetUndoManager(); } -void ScDocShell::SetModified( BOOL bModified ) +void ScDocShell::SetModified( sal_Bool bModified ) { if ( SfxObjectShell::IsEnableSetModified() ) { @@ -2596,7 +2596,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 @@ -2616,16 +2616,16 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ ) if ( bIsModified ) { if ( aDocument.IsAutoCalcShellDisabled() ) - SetDocumentModifiedPending( TRUE ); + SetDocumentModifiedPending( sal_True ); else { - SetDocumentModifiedPending( FALSE ); + SetDocumentModifiedPending( sal_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: @@ -2637,9 +2637,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(sal_False); // always reset, also if not refreshed } // #b6697848# notify UNO objects after BCA_BRDCST_ALWAYS etc. @@ -2651,9 +2651,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 ); @@ -2688,7 +2688,7 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ ) } } -void ScDocShell::SetInUndo(BOOL bSet) +void ScDocShell::SetInUndo(sal_Bool bSet) { bIsInUndo = bSet; } @@ -2703,8 +2703,8 @@ void ScDocShell::GetDocStat( ScDocStat& rDocStat ) if ( pPrinter ) for ( SCTAB i=0; i( rDocStat.nPageCount + - (USHORT) ScPrintFunc( this, pPrinter, i ).GetTotalPages() ); + rDocStat.nPageCount = sal::static_int_cast( rDocStat.nPageCount + + (sal_uInt16) ScPrintFunc( this, pPrinter, i ).GetTotalPages() ); } @@ -2778,7 +2778,7 @@ void ScDocShell::UseSheetSaveEntries() for (nTab = 0; nTab < nTabCount; ++nTab) if (aDocument.IsStreamValid(nTab)) - aDocument.SetStreamValid(nTab, FALSE); + aDocument.SetStreamValid(nTab, sal_False); } } } @@ -2793,8 +2793,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 ); } @@ -2814,7 +2814,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 ); @@ -2866,7 +2866,7 @@ void ScDocShell::SetChangeRecording( bool bActivate ) { aDocument.StartChangeTracking(); ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); aDocument.SetChangeViewSettings(aChangeViewSet); } else @@ -2881,7 +2881,7 @@ void ScDocShell::SetChangeRecording( bool bActivate ) // Slots invalidieren SfxBindings* pBindings = GetViewBindings(); if (pBindings) - pBindings->InvalidateAll(FALSE); + pBindings->InvalidateAll(sal_False); } } diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 14ff7622818c..084e35b610ba 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -72,22 +72,22 @@ using namespace com::sun::star; //------------------------------------------------------------------ -BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) +sal_Bool __EXPORT 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 @@ -129,13 +129,13 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt //------------------------------------------------------------------ -BOOL ScDocShell::IsEmpty() const +sal_Bool ScDocShell::IsEmpty() const { return bIsEmpty; } -void ScDocShell::SetEmpty(BOOL bSet) +void ScDocShell::SetEmpty(sal_Bool bSet) { bIsEmpty = bSet; } @@ -211,7 +211,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( aAsian.GetCharDistanceCompression() ) ); + aDocument.SetAsianCompression( sal::static_int_cast( aAsian.GetCharDistanceCompression() ) ); } if ( !aDocument.IsValidAsianKerning() ) @@ -257,7 +257,7 @@ ScDrawLayer* ScDocShell::MakeDrawLayer() InitItems(); // incl. Undo und Basic Broadcast( SfxSimpleHint( SC_HINT_DRWLAYER_NEW ) ); if (nDocumentLock) - pDrawLayer->setLock(TRUE); + pDrawLayer->setLock(sal_True); } return pDrawLayer; } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 233843935bbd..ec23a1b3a21a 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -115,8 +115,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; @@ -127,7 +127,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 ??? @@ -177,7 +177,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(), @@ -204,7 +204,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 ) ) { @@ -228,7 +228,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 ) ); @@ -236,14 +236,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 ) { @@ -259,9 +259,9 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc) ScRangeListRef xRangeList = pPaint->GetRangeList(); if (xRangeList) { - USHORT nParts = pPaint->GetParts(); - ULONG nCount = xRangeList->Count(); - for ( ULONG i=0; iGetParts(); + sal_uLong nCount = xRangeList->Count(); + for ( sal_uLong i=0; iGetObject(i); @@ -283,63 +283,63 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc) } } -void ScDocShell::LockDocument_Impl(USHORT nNew) +void ScDocShell::LockDocument_Impl(sal_uInt16 nNew) { if (!nDocumentLock) { ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer(); if (pDrawLayer) - pDrawLayer->setLock(TRUE); + pDrawLayer->setLock(sal_True); } nDocumentLock = nNew; } -void ScDocShell::UnlockDocument_Impl(USHORT nNew) +void ScDocShell::UnlockDocument_Impl(sal_uInt16 nNew) { nDocumentLock = nNew; if (!nDocumentLock) { ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer(); if (pDrawLayer) - pDrawLayer->setLock(FALSE); + pDrawLayer->setLock(sal_False); } } -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(sal_False); } void ScDocShell::UnlockPaint() { - UnlockPaint_Impl(FALSE); + UnlockPaint_Impl(sal_False); } void ScDocShell::LockDocument() { - LockPaint_Impl(TRUE); + LockPaint_Impl(sal_True); LockDocument_Impl(nDocumentLock + 1); } @@ -347,7 +347,7 @@ void ScDocShell::UnlockDocument() { if (nDocumentLock) { - UnlockPaint_Impl(TRUE); + UnlockPaint_Impl(sal_True); UnlockDocument_Impl(nDocumentLock - 1); } else @@ -358,7 +358,7 @@ void ScDocShell::UnlockDocument() //------------------------------------------------------------------ -void ScDocShell::SetInplace( BOOL bInplace ) +void ScDocShell::SetInplace( sal_Bool bInplace ) { if (bIsInplace != bInplace) { @@ -375,7 +375,7 @@ void ScDocShell::CalcOutputFactor() return; } - BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); + sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if (bTextWysiwyg) { nPrtToScreenFactor = 1.0; @@ -428,8 +428,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(); @@ -438,7 +438,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( ::utl::MiscCfg().GetYear2000() ) ); + aDocOpt.SetYear2000( sal::static_int_cast( ::utl::MiscCfg().GetYear2000() ) ); if (bForLoading) { @@ -463,7 +463,7 @@ Printer* ScDocShell::GetDocumentPrinter() // fuer OLE return aDocument.GetPrinter(); } -SfxPrinter* ScDocShell::GetPrinter(BOOL bCreateIfNotExist) +SfxPrinter* ScDocShell::GetPrinter(sal_Bool bCreateIfNotExist) { return aDocument.GetPrinter(bCreateIfNotExist); } @@ -472,7 +472,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, sal_False ); // sal_False or sal_True??? SvxFontListItem aFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST ); PutItem( aFontListItem ); @@ -484,9 +484,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( sal_False ); if ( pOld && pOld->IsPrinting() ) return SFX_PRINTERROR_BUSY; @@ -557,8 +557,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 ); @@ -665,13 +665,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.. @@ -681,7 +681,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, sal_False, sal_False ); SfxItemSet aSet( GetPool(), SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR, @@ -733,7 +733,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 @@ -769,7 +769,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() && @@ -781,14 +781,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 ) { @@ -800,9 +800,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 ) ) { DBG_ERROR( "lcl_FindAction(): found equal action!" ); @@ -815,9 +815,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( sal_False ); //! Funktionen an die DocShell if (!pViewSh) return; @@ -835,17 +835,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck { // #51138# visuelles RedLining einschalten ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); aDocument.SetChangeViewSettings(aChangeViewSet); } } // #97286# 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 @@ -868,7 +868,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 ) { @@ -884,7 +884,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 ); @@ -910,7 +910,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 ); } @@ -935,9 +935,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 = sal_False; String aOldUser = pThisTrack->GetUser(); - pThisTrack->SetUseFixDateTime( TRUE ); + pThisTrack->SetUseFixDateTime( sal_True ); ScMarkData& rMarkData = pViewSh->GetViewData()->GetMarkData(); ScMarkData aOldMarkData( rMarkData ); pSourceAction = pFirstMergeAction; @@ -986,10 +986,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 ) @@ -1002,7 +1002,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck if ( pOldAction && pOldAction->IsVirgin() ) { pThisTrack->Reject( pOldAction ); - bHasRejected = TRUE; + bHasRejected = sal_True; bExecute = false; } } @@ -1017,7 +1017,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; } @@ -1039,7 +1039,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(); @@ -1058,7 +1058,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, sal_False, sal_False, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT ); } break; @@ -1077,17 +1077,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, sal_False ); } break; case SC_CAT_INSERT_ROWS: - GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, TRUE, FALSE ); + GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, sal_True, sal_False ); break; case SC_CAT_INSERT_COLS: - GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, TRUE, FALSE ); + GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, sal_True, sal_False ); break; case SC_CAT_DELETE_TABS : - GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), TRUE, FALSE ); + GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), sal_True, sal_False ); break; case SC_CAT_DELETE_ROWS: { @@ -1095,7 +1095,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, sal_False ); // #i101099# [Collaboration] Changes are not correctly shown if ( bShared ) @@ -1115,7 +1115,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, sal_False ); } } break; @@ -1124,7 +1124,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, sal_False, sal_False ); } break; default: @@ -1164,10 +1164,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 ) @@ -1189,7 +1189,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck rMarkData = aOldMarkData; pThisTrack->SetUser(aOldUser); - pThisTrack->SetUseFixDateTime( FALSE ); + pThisTrack->SetUseFixDateTime( sal_False ); pSourceTrack->Clear(); //! der ist jetzt verhunzt @@ -1230,11 +1230,11 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) // reset show changes ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( FALSE ); + aChangeViewSet.SetShowChanges( sal_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 ) ) @@ -1248,8 +1248,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 ) { @@ -1261,8 +1261,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; @@ -1305,7 +1305,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 ) { @@ -1319,7 +1319,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() ) @@ -1337,18 +1337,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() ) @@ -1376,13 +1376,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 bba756b397cb..fe147466bd80 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -138,7 +138,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 @@ -154,9 +154,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: @@ -211,18 +211,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, sal_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 @@ -230,7 +230,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; @@ -248,17 +248,17 @@ void ScDocShell::Execute( SfxRequest& rReq ) } // bei Bedarf neuen Datenbankbereich anlegen - BOOL bMakeArea = FALSE; + sal_Bool bMakeArea = sal_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 ); @@ -273,7 +273,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 ); @@ -288,7 +288,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,19 +312,19 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pReqArgs) { ScDocument* pDoc = GetDocument(); -// BOOL bUndo (pDoc->IsUndoEnabled()); +// sal_Bool bUndo (pDoc->IsUndoEnabled()); const SfxPoolItem* pItem; String aChartName, aRangeName; ScRange aSingleRange; ScRangeListRef aRangeListRef; - BOOL bMultiRange = FALSE; + sal_Bool bMultiRange = sal_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 = sal_False; + sal_Bool bRowInit = sal_False; + sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE); if( IS_AVAILABLE( SID_CHART_NAME, &pItem ) ) aChartName = ((const SfxStringItem*)pItem)->GetValue(); @@ -335,25 +335,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->Count() ) { - bMultiRange = TRUE; + bMultiRange = sal_True; aSingleRange = *aRangeListRef->GetObject(0); // fuer Header - bValid = TRUE; + bValid = sal_True; } else aRangeListRef.Clear(); @@ -375,7 +375,7 @@ 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 @@ -383,13 +383,13 @@ void ScDocShell::Execute( SfxRequest& rReq ) { for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++) if (aDocument.HasValueData( i, nRow1, nTab )) - bColHeaders = FALSE; + bColHeaders = sal_False; } if (!bRowInit) { for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++) if (aDocument.HasValueData( nCol1, i, nTab )) - bRowHeaders = FALSE; + bRowHeaders = sal_False; } //CHINA001 ScColRowLabelDlg aDlg( pParent, bRowHeaders, bColHeaders ); @@ -407,7 +407,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) rReq.AppendItem(SfxBoolItem(FN_PARAM_2, bRowHeaders)); } else - bOk = FALSE; + bOk = sal_False; delete pDlg; //CHINA001 } @@ -452,9 +452,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 @@ -483,7 +483,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(); @@ -526,7 +526,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 = sal_False; ScDBCollection* pDBColl = aDocument.GetDBCollection(); if ((nCanUpdate != com::sun::star::document::UpdateDocMode::NO_UPDATE) && @@ -541,7 +541,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) ); if (aBox.Execute() == RET_YES) { - for (USHORT i=0; iGetCount(); i++) + for (sal_uInt16 i=0; iGetCount(); i++) { ScDBData* pDBData = (*pDBColl)[i]; if ( pDBData->IsStripData() && @@ -555,7 +555,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) @@ -576,7 +576,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } } } - bDone = TRUE; + bDone = sal_True; } } } @@ -618,18 +618,18 @@ void ScDocShell::Execute( SfxRequest& rReq ) { // get argument (recorded macro) SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, sal_False ); - BOOL bDo = TRUE; + 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, sal_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 @@ -659,7 +659,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { pDoc->StartChangeTracking(); ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); pDoc->SetChangeViewSettings(aChangeViewSet); } @@ -669,7 +669,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // Slots invalidieren if (pBindings) - pBindings->InvalidateAll(FALSE); + pBindings->InvalidateAll(sal_False); if ( !pItem ) rReq.AppendItem( SfxBoolItem( FID_CHG_RECORD, bActivateTracking ) ); rReq.Done(); @@ -684,7 +684,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, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); if ( ExecuteChangeProtectionDialog( pParent ) ) { @@ -699,7 +699,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 ) { @@ -709,12 +709,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 = sal_False; } else // merge might reject some actions - bDo = ExecuteChangeProtectionDialog( NULL, TRUE ); + bDo = ExecuteChangeProtectionDialog( NULL, sal_True ); } if ( !bDo ) { @@ -725,25 +725,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(); @@ -751,7 +751,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, sal_False ); // filter name from dialog contains application prefix, // GetFilter needs name without the prefix. @@ -763,7 +763,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, sal_False, pFilter, pSet ); } else { @@ -785,14 +785,14 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScDocShell* pOtherDocSh = new ScDocShell; SfxObjectShellRef 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; @@ -810,7 +810,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 ) { @@ -827,19 +827,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 ); @@ -859,7 +859,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) ) { @@ -887,7 +887,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) ) { @@ -899,7 +899,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 @@ -911,15 +911,15 @@ void ScDocShell::Execute( SfxRequest& rReq ) nActualTab--; } while(aDocument.IsScenario(nActualTab)); - BOOL bSheetProtected = aDocument.IsTabProtected(nActualTab); + sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab); //! anderen Titel am Dialog setzen //CHINA001 ScNewScenarioDlg* pNewDlg = -//CHINA001 new ScNewScenarioDlg( GetActiveDialogParent(), aName, TRUE, bSheetProtected); +//CHINA001 new ScNewScenarioDlg( GetActiveDialogParent(), aName, sal_True, bSheetProtected); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, TRUE,bSheetProtected); + AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, sal_True,bSheetProtected); DBG_ASSERT(pNewDlg, "Dialog create fail!");//CHINA001 pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags ); if ( pNewDlg->Execute() == RET_OK ) @@ -939,11 +939,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 @@ -1170,15 +1170,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 = sal_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 ) ); @@ -1203,7 +1203,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) ); @@ -1224,21 +1224,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 = sal_False; ScTabViewShell* pSh = GetBestViewShell(); if ( pSh ) { @@ -1246,7 +1246,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi ) { pHdl->FormulaPreview(); // Teilergebnis als QuickHelp - bDone = TRUE; + bDone = sal_True; } else { @@ -1259,7 +1259,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 ) ); @@ -1275,7 +1275,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) } } -void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) +void ScDocShell::DoHardRecalc( sal_Bool /* bApi */ ) { WaitObject aWaitObj( GetActiveDialogParent() ); ScTabViewShell* pSh = GetBestViewShell(); @@ -1287,7 +1287,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) @@ -1306,7 +1306,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) // (somewhat consistent with charts) for (nTab=0; nTabGetName(); String aOldName = aNewName; - BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? + sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); @@ -1391,7 +1391,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 ) @@ -1409,9 +1409,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 ); @@ -1423,8 +1423,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 ) ); } @@ -1442,9 +1442,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 = sal_False; SCTAB nTab = rRange.aStart.Tab(); String aStyleName = aDocument.GetPageStyle( nTab ); @@ -1454,15 +1454,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) @@ -1512,7 +1512,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 ) @@ -1521,11 +1521,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 = sal_False; SCTAB nTabCount = aDocument.GetTableCount(); SCTAB nUseTab = MAXTAB+1; @@ -1539,7 +1539,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) { @@ -1577,7 +1577,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 @@ -1637,7 +1637,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, aOldData, aNewData ) ); } - PageStyleModified( aNewName, FALSE ); + PageStyleModified( aNewName, sal_False ); rReq.Done(); } delete pDlg; @@ -1673,9 +1673,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 ) { @@ -1794,7 +1794,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */, SCTAB nCurTab ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) @@ -1839,7 +1839,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, sal_False, &pItem ) == SFX_ITEM_SET ); if ( rbHasOptions ) { rOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions(); @@ -1977,7 +1977,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 = sal_False; // erste Seite gefunden long nTabStart = 0; SCTAB nTabCount = aDocument.GetTableCount(); for ( SCTAB nTab=0; nTabGetTableSelect( nTab ) ) { long nNext = nTabStart + aPageArr[nTab]; - BOOL bSelected = FALSE; + sal_Bool bSelected = sal_False; for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert? - bSelected = TRUE; + bSelected = sal_True; if (bSelected) { ScPrintFunc aPrintFunc( this, pPrinter, nTab ); aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle - bFound = TRUE; + bFound = sal_True; } nTabStart = nNext; } @@ -2004,9 +2004,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 = sal_False; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); if (pDrawLayer) { @@ -2029,10 +2029,10 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) { Rectangle aObjRect = pObject->GetLogicRect(); if ( aObjRect.IsOver( aMMRect ) ) - bFound = TRUE; + bFound = sal_True; } else - bFound = TRUE; + bFound = sal_True; } pObject = aIter.Next(); @@ -2044,7 +2044,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 ) @@ -2064,14 +2064,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 = sal_False; + sal_Bool bAnyPrintRanges = aDocument.HasPrintRange(); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SCTAB nTabCount = aDocument.GetTableCount(); for ( SCTAB nTab=0; nTabInitJob( pDialogParent, !bIsAPI && bHasTransp ); + sal_Bool bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp ); if ( bContinue ) { - for ( USHORT n=0; nShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetPrintPreview( sal_True ); } ScPrintFunc aPrintFunc( this, pPrinter, nTab, nAttrPage, nTotalPages, pMarkedRange, &aOptions ); aPrintFunc.SetDrawView( pDrawView ); - nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, TRUE, &rProgress, NULL ); + nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, sal_True, &rProgress, NULL ); nTabStart += aPageArr[nTab]; if ( aDocument.NeedPageResetAfterTab(nTab) ) @@ -2198,13 +2198,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() ) ); @@ -2292,15 +2292,15 @@ void ScDocShell::GetSbxState( SfxItemSet &rSet ) pVisibleSh->GetState( rSet ); } -void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect ) +void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uInt16 nAspect ) { -// bIsOle = TRUE; // jetzt ueber den CreateMode +// bIsOle = sal_True; // jetzt ueber den CreateMode 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 ) @@ -2310,7 +2310,7 @@ void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup * 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 { @@ -2319,13 +2319,13 @@ void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup * 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 __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const +Rectangle __EXPORT ScDocShell::GetVisArea( sal_uInt16 nAspect ) const { SfxObjectCreateMode eShellMode = GetCreateMode(); if ( eShellMode == SFX_CREATE_MODE_ORGANIZER ) @@ -2339,7 +2339,7 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const { // Rectangle aArea( 0,0, 3175,3175 ); // 120x120 Pixel in 1:1 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 ); @@ -2377,8 +2377,8 @@ Rectangle __EXPORT 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 ) { @@ -2392,7 +2392,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, if ( pStyleSheet ) pStyleSet = &pStyleSheet->GetItemSet(); else - rbHeader = rbFooter = FALSE; + rbHeader = rbFooter = sal_False; } DBG_ASSERT( pStyleSet, "PageStyle-Set not found! :-(" ); @@ -2430,7 +2430,7 @@ long __EXPORT 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" ) ) { @@ -2477,7 +2477,7 @@ long __EXPORT 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" ) ) { @@ -2508,7 +2508,7 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem, ScRangeName* pRange = aDocument.GetRangeName(); if( pRange ) { - USHORT nPos; + sal_uInt16 nPos; if( pRange->SearchName( aPos, nPos ) ) { ScRangeData* pData = (*pRange)[ nPos ]; @@ -2556,7 +2556,7 @@ SCTAB ScDocShell::GetCurTab() return pViewData ? pViewData->GetTabNo() : static_cast(0); } -ScTabViewShell* ScDocShell::GetBestViewShell( BOOL bOnlyVisible ) +ScTabViewShell* ScDocShell::GetBestViewShell( sal_Bool bOnlyVisible ) { ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); // falsches Doc? @@ -2588,11 +2588,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 ) { @@ -2618,7 +2618,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) @@ -2636,7 +2636,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 ); @@ -2662,7 +2662,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 ) ) { @@ -2680,7 +2680,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable ) } ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( FALSE ); + aChangeViewSet.SetShowChanges( sal_False ); aDocument.SetChangeViewSettings( aChangeViewSet ); } diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 013511ab0acb..fb5c30c5826e 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -77,13 +77,13 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String // ehemalige viewfunc/dbfunc Methoden // -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) { @@ -99,7 +99,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 @@ -126,12 +126,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 ); @@ -175,11 +175,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 = sal_False; if (pData) { // Bereich nehmen, wenn nichts anderes markiert @@ -190,11 +190,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 @@ -211,9 +211,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, sal_False, bOnlyDown ); if ( nOldCol1 != nStartCol || nOldCol2 != nEndCol || nOldRow1 != nStartRow ) - bUseThis = FALSE; // passt gar nicht + bUseThis = sal_False; // passt gar nicht else if ( nOldRow2 != nEndRow ) { // Bereich auf neue End-Zeile erweitern @@ -225,15 +225,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 = sal_False; // immer Markierung nehmen (Bug 11964) } // fuer Import nie "unbenannt" nehmen if ( bUseThis && eMode == SC_DB_IMPORT && bIsNoName ) - bUseThis = FALSE; + bUseThis = sal_False; } if ( bUseThis ) @@ -247,13 +247,13 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe nStartCol = nEndCol = nCol; nStartRow = nEndRow = nRow; nStartTab = nEndTab = nTab; -// bMark = FALSE; // nichts zu markieren +// bMark = sal_False; // nichts zu markieren } else { if ( bSelected ) { -// bMark = FALSE; +// bMark = sal_False; } else { // zusammenhaengender Bereich @@ -269,13 +269,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, sal_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 ) ) @@ -302,9 +302,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( sal_False ); } else { @@ -313,12 +313,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; @@ -331,12 +331,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( sal_False ); // CompileFormulaString ScDBCollection* pRedoColl = new ScDBCollection( *pColl ); GetUndoManager()->AddUndoAction( new ScUndoDBData( this, pUndoColl, pRedoColl ) ); @@ -352,7 +352,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe } // if (bMark) -// MarkRange( ScRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ), FALSE ); +// MarkRange( ScRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ), sal_False ); return pData; } @@ -369,7 +369,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 ) ) { @@ -403,12 +403,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, sal_False ); if (bChange) PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID|PAINT_LEFT ); @@ -426,8 +426,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( sal_False ); aDocument.LockStreamValid( true ); // ignore draw page size (but not formula results) if ( bBefore ) // check all sheets up to nUpdateTab { @@ -439,7 +439,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 @@ -448,7 +448,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore ) if ( aUpdateSheets.GetTableSelect( nTab ) ) { aDocument.UpdatePageBreaks( nTab ); - aDocument.SetPendingRowHeights( nTab, FALSE ); + aDocument.SetPendingRowHeights( nTab, sal_False ); } } else // only nUpdateTab @@ -457,7 +457,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore ) { AdjustRowHeight( 0, MAXROW, nUpdateTab ); aDocument.UpdatePageBreaks( nUpdateTab ); - aDocument.SetPendingRowHeights( nUpdateTab, FALSE ); + aDocument.SetPendingRowHeights( nUpdateTab, sal_False ); } } aDocument.LockStreamValid( false ); @@ -474,8 +474,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; iGetCount(); + for ( sal_uInt16 i=0; iGetDBAtArea( 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) @@ -512,14 +512,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 = sal_False; for (nPos=0; nPosnTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow) - bErr = TRUE; + bErr = sal_True; } if (bErr) @@ -546,7 +546,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); @@ -589,28 +589,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, sal_False, sal_True ); // Zeilenstatus aDocument.CopyToDocument( 0,0,nDestTab, MAXCOL,MAXROW,nDestTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); // alle Formeln aDocument.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, - IDF_FORMULA, FALSE, pUndoDoc ); + IDF_FORMULA, sal_False, pUndoDoc ); // komplette Ausgangszeilen aDocument.CopyToDocument( 0,aDestArea.nRowStart,nDestTab, MAXCOL,aDestArea.nRowEnd,nDestTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); // alten Ausgabebereich if (pDestData) - aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc ); + aDocument.CopyToDocument( aOldDest, IDF_ALL, sal_False, pUndoDoc ); GetUndoManager()->AddUndoAction( new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc, - TRUE, nInsertCount, pUndoTab, pUndoData ) ); + sal_True, nInsertCount, pUndoTab, pUndoData ) ); } else { @@ -619,15 +619,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, sal_False, pUndoDoc ); // alten Ausgabebereich if (pDestData) - aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc ); + aDocument.CopyToDocument( aOldDest, IDF_ALL, sal_False, pUndoDoc ); GetUndoManager()->AddUndoAction( new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc, - FALSE, 0, NULL, pUndoData ) ); + sal_False, 0, NULL, pUndoData ) ); } } @@ -645,7 +645,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) @@ -669,7 +669,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)) { @@ -707,22 +707,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,sal_False, pUndoDoc ); } GetUndoManager()->AddUndoAction( @@ -761,14 +761,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, @@ -791,8 +791,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()) @@ -801,7 +801,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; @@ -820,8 +820,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, sal_False ); // ohne Formel-Update + aDocument.SetScenario( nNewTab, sal_True ); aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags ); ScMarkData aDestMark = rMark; @@ -830,19 +830,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, sal_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 @@ -857,7 +857,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r return nTab; } -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 ); @@ -876,7 +876,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec if (!aDocument.CopyTab( nSrcTab, nDestTab )) { //! EndDrawUndo? - return FALSE; + return sal_False; } else { @@ -897,7 +897,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec new ScUndoCopyTab( this, aSrcList, aDestList ) ); } - BOOL bVbaEnabled = aDocument.IsInVBAMode(); + sal_Bool bVbaEnabled = aDocument.IsInVBAMode(); if ( bVbaEnabled ) { StarBASIC* pStarBASIC = GetBasic(); @@ -933,7 +933,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec else { if ( aDocument.GetChangeTrack() ) - return FALSE; + return sal_False; if ( nSrcTabBroadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return TRUE; + return sal_True; } @@ -972,7 +972,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer ) { ScDBDocFunc aFunc(*this); - BOOL bContinue = TRUE; + sal_Bool bContinue = sal_True; ScDBData* pDBData = static_cast(pRefreshTimer); ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); @@ -981,11 +981,11 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer ) ScRange aRange; pDBData->GetArea( aRange ); ::com::sun::star::uno::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, sal_True, sal_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 fbb6dc8ead35..a199c697ea43 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -73,7 +73,7 @@ void __EXPORT 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 ) @@ -85,9 +85,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) @@ -172,12 +172,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) @@ -190,8 +190,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) Rectangle aOldArea = SfxObjectShell::GetVisArea(); Rectangle aNewArea = aOldArea; - BOOL bChange = FALSE; - BOOL bEmbedded = aDocument.IsEmbedded(); + sal_Bool bChange = sal_False; + sal_Bool bEmbedded = aDocument.IsEmbedded(); if (bEmbedded) aNewArea = aDocument.GetEmbeddedRect(); else @@ -200,10 +200,10 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) if ( nTab != aDocument.GetVisibleTab() ) { aDocument.SetVisibleTab( nTab ); - bChange = TRUE; + bChange = sal_True; } - 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 ); @@ -217,8 +217,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) if (aNewArea != aOldArea) { - SetVisAreaOrSize( aNewArea, TRUE ); // hier muss auch der Start angepasst werden - bChange = TRUE; + SetVisAreaOrSize( aNewArea, sal_True ); // hier muss auch der Start angepasst werden + bChange = sal_True; } // if (bChange) @@ -248,14 +248,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,sal_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,sal_False,&pItem) == SFX_ITEM_SET) { SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet(); SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges()); @@ -283,7 +283,7 @@ void __EXPORT 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 @@ -297,12 +297,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 @@ -333,7 +333,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); @@ -350,11 +350,11 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS } -BOOL __EXPORT ScDocShell::Insert( SfxObjectShell &rSource, - USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3, - USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted ) +sal_Bool __EXPORT 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 @@ -369,8 +369,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]; @@ -385,7 +385,7 @@ void ScDocShell::UpdateLinks() } else // nicht mehr benutzt -> loeschen { - pTabLink->SetAddUndo(TRUE); + pTabLink->SetAddUndo(sal_True); pLinkManager->Remove(k); } } @@ -401,8 +401,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 = sal_False; for (SCTAB j=0; jSetInCreate( TRUE ); + pLink->SetInCreate( sal_True ); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName ); pLink->Update(); - pLink->SetInCreate( FALSE ); + pLink->SetInCreate( sal_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; iGetLinks().Count(); + for (sal_uInt16 i=0; iGetLinks()[i]; if (pBase->ISA(ScTableLink)) { ScTableLink* pTabLink = (ScTableLink*)pBase; -// pTabLink->SetAddUndo(FALSE); //! Undo's zusammenfassen - pTabLink->SetPaint(FALSE); // Paint nur einmal am Ende +// pTabLink->SetAddUndo(sal_False); //! Undo's zusammenfassen + pTabLink->SetPaint(sal_False); // Paint nur einmal am Ende pTabLink->Update(); - pTabLink->SetPaint(TRUE); -// pTabLink->SetAddUndo(TRUE); - bAny = TRUE; + pTabLink->SetPaint(sal_True); +// pTabLink->SetAddUndo(sal_True); + bAny = sal_True; } } @@ -463,7 +463,7 @@ BOOL ScDocShell::ReloadTabLinks() SetDocumentModified(); } - return TRUE; //! Fehler erkennen + return sal_True; //! Fehler erkennen } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index cb9d625da70c..93101e802651 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -104,7 +104,7 @@ using namespace com::sun::star; namespace { - ULONG lcl_getDBaseConnection(uno::Reference& _rDrvMgr,uno::Reference& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet) + sal_uLong lcl_getDBaseConnection(uno::Reference& _rDrvMgr,uno::Reference& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet) { INetURLObject aURL; aURL.SetSmartProtocol( INET_PROT_FILE ); @@ -161,7 +161,7 @@ namespace // MoveFile/KillFile/IsDocument: similar to SfxContentHelper // static -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; @@ -206,7 +206,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& // static -BOOL ScDocShell::KillFile( const INetURLObject& rURL ) +sal_Bool ScDocShell::KillFile( const INetURLObject& rURL ) { sal_Bool bRet = sal_True; try @@ -226,7 +226,7 @@ BOOL ScDocShell::KillFile( const INetURLObject& rURL ) } // static -BOOL ScDocShell::IsDocument( const INetURLObject& rURL ) +sal_Bool ScDocShell::IsDocument( const INetURLObject& rURL ) { sal_Bool bRet = sal_False; try @@ -246,10 +246,10 @@ BOOL ScDocShell::IsDocument( const INetURLObject& rURL ) // ----------------------------------------------------------------------- -ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, - BOOL bSimpleColWidth[MAXCOLCOUNT] ) +sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, + sal_Bool bSimpleColWidth[MAXCOLCOUNT] ) { - ULONG nErr = eERR_OK; + sal_uLong nErr = eERR_OK; long i; try @@ -257,7 +257,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, String aTabName; uno::Reference xDrvMan; uno::Reference 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); @@ -364,7 +364,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, } SCROW nRow = 1; // 0 is column titles - BOOL bEnd = FALSE; + sal_Bool bEnd = sal_False; while ( !bEnd && xRowSet->next() ) { if ( nRow <= MAXROW ) @@ -373,7 +373,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, for (i=0; iGetFormatTable(); @@ -440,8 +440,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 = sal_False; + sal_Bool bPrecDefined = sal_False; sal_Int32 nFieldLen = 0; sal_Int32 nPrecision = 0; sal_Int32 nDbType = sdbc::DataType::SQLNULL; @@ -463,30 +463,30 @@ 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; - bTypeDefined = TRUE; + bTypeDefined = sal_True; break; } if ( bTypeDefined && !nFieldLen && nToken > 2 ) @@ -498,7 +498,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, if ( CharClass::isAsciiNumeric(aTmp) ) { nPrecision = aTmp.ToInt32(); - bPrecDefined = TRUE; + bPrecDefined = sal_True; } } } @@ -528,7 +528,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 { @@ -584,8 +584,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, } } } - BOOL bSdbLenAdjusted = FALSE; - BOOL bSdbLenBad = FALSE; + sal_Bool bSdbLenAdjusted = sal_False; + sal_Bool bSdbLenBad = sal_False; // Feldlaenge if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen ) { // maximale Feldbreite bestimmen @@ -627,9 +627,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 ) { @@ -637,7 +637,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.. @@ -709,13 +709,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; @@ -731,11 +731,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 = sal_False; } long nColCount = nLastCol - nFirstCol + 1; @@ -759,7 +759,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO { uno::Reference xDrvMan; uno::Reference 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); @@ -928,7 +928,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO { aDocument.GetValue( nDocCol, nDocRow, nTab, fVal ); // #39274# 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 d381ff067a99..4c58e2ad9c86 100644 --- a/sc/source/ui/docshell/editable.cxx +++ b/sc/source/ui/docshell/editable.cxx @@ -38,15 +38,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 ); } @@ -54,29 +54,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 ); } @@ -88,12 +88,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 = sal_False; if ( !bThisMatrix ) - bOnlyMatrix = FALSE; + bOnlyMatrix = sal_False; } } } @@ -124,12 +124,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 = sal_False; if ( !bThisMatrix ) - bOnlyMatrix = FALSE; + bOnlyMatrix = sal_False; } } } @@ -138,19 +138,19 @@ void ScEditableTester::TestView( ScViewFunc* pView ) { if ( bIsEditable || bOnlyMatrix ) { - BOOL bThisMatrix; + sal_Bool bThisMatrix; if ( !pView->SelectionEditable( &bThisMatrix ) ) { - bIsEditable = FALSE; + bIsEditable = sal_False; if ( !bThisMatrix ) - bOnlyMatrix = FALSE; + bOnlyMatrix = sal_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 7fa31246275a..2fb4c01741c9 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1339,7 +1339,7 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell) case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = static_cast(pCell); - USHORT nError = pFCell->GetErrCode(); + sal_uInt16 nError = pFCell->GetErrCode(); if (nError) return new FormulaErrorToken( nError); else if (pFCell->IsValue()) @@ -1442,7 +1442,7 @@ static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, ScRange& rRang case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = static_cast(pCell); - USHORT nError = pFCell->GetErrCode(); + sal_uInt16 nError = pFCell->GetErrCode(); if (nError) xMat->PutDouble( CreateDoubleError( nError), nC, nR); else if (pFCell->IsValue()) @@ -1846,7 +1846,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getRangeNameTokens(sal_u ScRangeName* pExtNames = pSrcDoc->GetRangeName(); String aUpperName = ScGlobal::pCharClass->upper(rName); - USHORT n; + sal_uInt16 n; bool bRes = pExtNames->SearchNameUpper(aUpperName, n); if (!bRes) return ScExternalRefCache::TokenArrayRef(); @@ -2045,7 +2045,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 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 a17279f409a9..244f80dd0d5a 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -112,9 +112,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( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_True ), bSingle( sal_True ), bUndo( sal_False ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -127,9 +127,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( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_False ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -137,15 +137,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( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_False ), bSingle( sal_False ), bUndo( sal_Bool( pDocSh != NULL ) ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -160,9 +160,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( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_False ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -174,7 +174,7 @@ ScImportExport::ScImportExport( ScDocument* p, const String& rPos ) ScRangeName* pRange = pDoc->GetRangeName(); if( pRange ) { - USHORT nPos; + sal_uInt16 nPos; if( pRange->SearchName( aPos, nPos ) ) { ScRangeData* pData = (*pRange)[ nPos ]; @@ -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 = sal_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 sal_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, sal_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, sal_False, pRedoDoc ); ScMarkData aDestMark; aDestMark.SelectOneTable( aRange.aStart.Tab() ); pDocSh->GetUndoManager()->AddUndoAction( @@ -293,9 +293,9 @@ void ScImportExport::EndPaste() #if 0 -BOOL ScImportExport::ImportData( SvData& rData ) +sal_Bool ScImportExport::ImportData( SvData& rData ) { - ULONG nFmt = rData.GetFormat(); + sal_uLong nFmt = rData.GetFormat(); if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE ) { MSE40HTMLClipFormatObj aMSE40ClpObj; @@ -304,12 +304,12 @@ BOOL ScImportExport::ImportData( SvData& rData ) SvStream* pStream = aMSE40ClpObj.GetStream(); return ImportStream( *pStream, nFmt ); } - return FALSE; + return sal_False; } else { void* pMem; - ULONG nSize = rData.GetMinMemorySize(); + sal_uLong nSize = rData.GetMinMemorySize(); rData.GetData( &pMem, TRANSFER_REFERENCE ); if( nFmt == FORMAT_STRING || nFmt == FORMAT_RTF @@ -336,14 +336,14 @@ BOOL ScImportExport::ImportData( SvData& rData ) #endif -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 sal_False; } -BOOL ScImportExport::ExportData( const String& rMimeType, +sal_Bool ScImportExport::ExportData( const String& rMimeType, ::com::sun::star::uno::Any & rValue ) { SvMemoryStream aStrm; @@ -351,17 +351,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 sal_False; } -BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt ) +sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong nFmt ) { switch ( nFmt ) { @@ -386,14 +386,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; } @@ -409,16 +409,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 sal_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 ) @@ -436,74 +436,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 sal_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 sal_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 ) { @@ -521,7 +521,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 @@ -532,33 +532,33 @@ 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 sal_False; } //static -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 ) @@ -622,10 +622,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 = sal_False; const sal_Unicode* p0 = p; for( ;; ) { @@ -643,7 +643,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 ) @@ -817,18 +817,18 @@ 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(); + sal_uLong nOldPos = rStrm.Tell(); if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) rStrm.StartReadingUnicodeText(); - BOOL bData = BOOL( !bSingle ); + sal_Bool bData = sal_Bool( !bSingle ); if( !bSingle) bOk = StartPaste(); @@ -876,7 +876,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; @@ -887,7 +887,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm ) aRange.aEnd.SetCol( nEndCol ); aRange.aEnd.SetRow( nEndRow ); bOk = StartPaste(); - bData = TRUE; + bData = sal_True; } else break; @@ -903,7 +903,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 ) @@ -935,12 +935,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; @@ -949,28 +949,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 = sal_False; for ( xub_StrLen nPos=0; nPosisLetterNumeric( 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 = sal_False; } if ( nFound == 1 ) @@ -987,13 +987,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 ) @@ -1010,9 +1010,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 = sal_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) @@ -1048,14 +1048,14 @@ static bool lcl_PutString( pSecondTransliteration->isEqual( aMStr, xMonths[i].AbbrevName ) ) { nMonth = sal::static_int_cast( i+1 ); - bSecondCal = TRUE; + bSecondCal = sal_True; } else if ( i == 8 && pSecondTransliteration->isEqual( aMStr, aSepShortened ) ) { // #102136# correct English abbreviation is SEPT, // but data mostly contains SEP only nMonth = sal::static_int_cast( i+1 ); - bSecondCal = TRUE; + bSecondCal = sal_True; } } } @@ -1111,12 +1111,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, sal_False ); return bMultiLine; // success } @@ -1157,12 +1157,12 @@ 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 xProgress( new ScProgress( pDocSh, ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos )); @@ -1170,21 +1170,21 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) rStrm.StartReadingUnicodeText(); - BOOL bOld = ScColumn::bDoubleAlloc; - ScColumn::bDoubleAlloc = TRUE; + sal_Bool bOld = ScColumn::bDoubleAlloc; + ScColumn::bDoubleAlloc = sal_True; SCCOL nStartCol = aRange.aStart.Col(); SCCOL nEndCol = aRange.aEnd.Col(); 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(); @@ -1211,7 +1211,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) } String aLine, aCell; - USHORT i; + sal_uInt16 i; SCROW nRow = nStartRow; while(--nSkipLines>0) @@ -1233,7 +1233,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) bool bQuotedAsText = pExtOptions && pExtOptions->IsQuotedAsText(); - ULONG nOriginalStreamPos = rStrm.Tell(); + sal_uLong nOriginalStreamPos = rStrm.Tell(); do { @@ -1254,11 +1254,11 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) // SC_COL_SKIP. for ( i=0; i MAXCOL) - bOverflow = TRUE; // display warning on import + bOverflow = sal_True; // display warning on import else if (!bDetermineRange) { xub_StrLen nStart = pColStart[i]; @@ -1280,7 +1280,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 @@ -1291,7 +1291,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 MAXCOL) - bOverflow = TRUE; // display warning on import + bOverflow = sal_True; // display warning on import else if (!bDetermineRange) { if (bIsQuoted && bQuotedAsText) @@ -1333,7 +1333,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 } } @@ -1356,7 +1356,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) { delete pEnglishTransliteration; delete pEnglishCalendar; - return FALSE; + return sal_False; } } @@ -1365,7 +1365,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if (!StartPaste()) { EndPaste(); - return FALSE; + return sal_False; } } @@ -1382,7 +1382,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if (bRangeIsDetermined) EndPaste(); - return TRUE; + return sal_True; } @@ -1428,7 +1428,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p // -BOOL ScImportExport::Doc2Text( SvStream& rStrm ) +sal_Bool ScImportExport::Doc2Text( SvStream& rStrm ) { SCCOL nCol; SCROW nRow; @@ -1453,7 +1453,7 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm ) { if (bFormulas) { - pDoc->GetFormula( nCol, nRow, aRange.aStart.Tab(), aCell, TRUE ); + pDoc->GetFormula( nCol, nRow, aRange.aStart.Tab(), aCell, sal_True ); if( aCell.Search( cSep ) != STRING_NOTFOUND ) lcl_WriteString( rStrm, aCell, cStr, cStr ); else @@ -1525,14 +1525,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 = sal_False; SylkVersion eVersion = SYLK_OTHER; // US-English separators for StringToDouble @@ -1543,8 +1543,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) @@ -1572,7 +1572,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) if( cTag == 'C' ) // Content { if( *p++ != ';' ) - return FALSE; + return sal_False; while( *p ) { sal_Unicode ch = *p++; @@ -1606,15 +1606,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 = sal_False; const sal_Unicode* q = p; while( *q && *q != ';' ) q++; @@ -1624,7 +1624,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) { pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(), ScBaseCell::CreateTextCell( aText, pDoc), - (BOOL) TRUE); + (sal_Bool) sal_True); } else { @@ -1668,7 +1668,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 ); } @@ -1691,7 +1691,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) else if( cTag == 'F' ) // Format { if( *p++ != ';' ) - return FALSE; + return sal_False; sal_Int32 nFormat = -1; while( *p ) { @@ -1733,7 +1733,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 ) ); } @@ -1780,7 +1780,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) aRange.aEnd.SetCol( nEndCol ); aRange.aEnd.SetRow( nEndRow ); bOk = StartPaste(); - bData = TRUE; + bData = sal_True; } else break; @@ -1791,7 +1791,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) } -BOOL ScImportExport::Doc2Sylk( SvStream& rStrm ) +sal_Bool ScImportExport::Doc2Sylk( SvStream& rStrm ) { SCCOL nCol; SCROW nRow; @@ -1811,7 +1811,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm ) { String aBufStr; double nVal; - BOOL bForm = FALSE; + sal_Bool bForm = sal_False; SCROW r = nRow - nStartRow + 1; SCCOL c = nCol - nStartCol + 1; ScBaseCell* pCell; @@ -1832,7 +1832,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 ); @@ -1931,35 +1931,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 ); @@ -1978,12 +1978,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, sal_False, pDoc ); EndPaste(); } @@ -1993,7 +1993,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) @@ -2001,10 +2001,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(); @@ -2014,15 +2014,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 @@ -2030,7 +2030,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 ); pImp->WriteToDocument(); EndPaste(); @@ -2051,21 +2051,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 822c74800ab2..5e2503f94e15 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -64,11 +64,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 @@ -96,9 +96,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 = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -106,19 +106,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 = sal_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 = sal_False; if ( bColumns ) bRes = pArray->Insert( nStartCol, nEndCol, bSize ); else @@ -131,13 +131,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, sal_False); - USHORT nParts = 0; // Datenbereich nicht geaendert + sal_uInt16 nParts = 0; // Datenbereich nicht geaendert if ( bColumns ) nParts |= PAINT_TOP; else @@ -148,7 +148,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 { @@ -160,9 +160,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 = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -173,7 +173,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) { @@ -183,8 +183,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 = sal_False; if ( bColumns ) bRes = pArray->Remove( nStartCol, nEndCol, bSize ); else @@ -197,13 +197,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, sal_False ) ); } if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); - USHORT nParts = 0; // Datenbereich nicht geaendert + sal_uInt16 nParts = 0; // Datenbereich nicht geaendert if ( bColumns ) nParts |= PAINT_TOP; else @@ -213,7 +213,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 @@ -228,13 +228,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 = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) { @@ -249,9 +249,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, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable ); @@ -262,20 +262,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(), sal_False, sal_False, bApi ); + SelectLevel( nTab, sal_False, pTable->GetRowArray()->GetDepth(), sal_False, sal_False, bApi ); pDoc->SetOutlineTable( nTab, NULL ); pDoc->UpdatePageBreaks( nTab ); if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_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(); @@ -285,7 +285,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(); @@ -296,7 +296,7 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); ScDocument* pUndoDoc = NULL; @@ -317,14 +317,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, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, sal_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(), sal_False, sal_False, bApi ); + SelectLevel( nTab, sal_False, pTable->GetRowArray()->GetDepth(), sal_False, sal_False, bApi ); pDoc->SetOutlineTable( nTab, NULL ); } @@ -340,30 +340,30 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA } if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_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 = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); // ist schon da if (!pTable) - return FALSE; + return sal_False; ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); if (!pArray) - return FALSE; + return sal_False; SCCOLROW nStart, nEnd; pArray->GetRange( nStart, nEnd ); @@ -374,15 +374,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, sal_False ); pDoc->CopyToDocument( static_cast(nStart), 0, nTab, - static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_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, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pUndoDoc ); } rDocShell.GetUndoManager()->AddUndoAction( @@ -396,21 +396,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( sal_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( sal_False ); } SCCOLROW nThisStart = pEntry->GetStart(); @@ -433,14 +433,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 = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -451,7 +451,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) @@ -468,14 +468,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, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoOutlineBlock( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, - pUndoDoc, pUndoTab, TRUE ) ); + pUndoDoc, pUndoTab, sal_True ) ); } // Spalten @@ -490,14 +490,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( sal_False ); + pEntry->SetVisible( sal_True ); if (nStartnMax) nMax=nEnd; } } for ( i=nMin; i<=nMax; i++ ) - pDoc->ShowCol( static_cast(i), nTab, TRUE ); + pDoc->ShowCol( static_cast(i), nTab, sal_True ); // Zeilen @@ -511,22 +511,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( sal_False ); + pEntry->SetVisible( sal_True ); if (nStartnMax) 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->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() ); } @@ -537,9 +537,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 = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -550,18 +550,18 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_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; @@ -578,16 +578,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(nEffStartCol), 0, nTab, static_cast(nEffEndCol), MAXROW, nTab, IDF_NONE, - FALSE, pUndoDoc ); - pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, FALSE, pUndoDoc ); + sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoOutlineBlock( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, - pUndoDoc, pUndoTab, FALSE ) ); + pUndoDoc, pUndoTab, sal_False ) ); } // Spalten @@ -600,7 +600,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, nEnd = pEntry->GetEnd(); if ( static_cast(nStartCol)<=nEnd && static_cast(nEndCol)>=nStart ) - HideOutline( nTab, TRUE, nColLevel, i, FALSE, FALSE, bApi ); + HideOutline( nTab, sal_True, nColLevel, i, sal_False, sal_False, bApi ); } // Zeilen @@ -613,7 +613,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, sal_False, nRowLevel, i, sal_False, sal_False, bApi ); } pDoc->UpdatePageBreaks( nTab ); @@ -621,7 +621,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() ); } @@ -634,12 +634,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 = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); @@ -652,34 +652,34 @@ 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, sal_False ); pDoc->CopyToDocument( static_cast(nStart), 0, nTab, - static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_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, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_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(); - pEntry->SetHidden(FALSE); + pEntry->SetHidden(sal_False); SCCOLROW i; for ( i = nStart; i <= nEnd; i++ ) { if ( bColumns ) - pDoc->ShowCol( static_cast(i), nTab, TRUE ); + pDoc->ShowCol( static_cast(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 ); @@ -692,14 +692,14 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US for ( i = nSubStart; i <= nSubEnd; i++ ) { if ( bColumns ) - pDoc->ShowCol( static_cast(i), nTab, FALSE ); + pDoc->ShowCol( static_cast(i), nTab, sal_False ); else - pDoc->ShowRow( i, nTab, FALSE ); + pDoc->ShowRow( i, nTab, sal_False ); } } } - pArray->SetVisibleBelow( nLevel, nEntry, TRUE, TRUE ); + pArray->SetVisibleBelow( nLevel, nEntry, sal_True, sal_True ); pDoc->InvalidatePageBreaks(nTab); pDoc->UpdatePageBreaks( nTab ); @@ -715,15 +715,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 = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); @@ -736,36 +736,36 @@ 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, sal_False ); pDoc->CopyToDocument( static_cast(nStart), 0, nTab, - static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_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, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pUndoDoc ); } rDocShell.GetUndoManager()->AddUndoAction( new ScUndoDoOutline( &rDocShell, nStart, nEnd, nTab, pUndoDoc, - bColumns, nLevel, nEntry, FALSE ) ); + bColumns, nLevel, nEntry, sal_False ) ); } //! HideCursor(); - pEntry->SetHidden(TRUE); + pEntry->SetHidden(sal_True); SCCOLROW i; for ( i = nStart; i <= nEnd; i++ ) { if ( bColumns ) - pDoc->ShowCol( static_cast(i), nTab, FALSE ); + pDoc->ShowCol( static_cast(i), nTab, sal_False ); else - pDoc->ShowRow( i, nTab, FALSE ); + pDoc->ShowRow( i, nTab, sal_False ); } - pArray->SetVisibleBelow( nLevel, nEntry, FALSE ); + pArray->SetVisibleBelow( nLevel, nEntry, sal_False ); pDoc->InvalidatePageBreaks(nTab); pDoc->UpdatePageBreaks( nTab ); @@ -781,7 +781,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 db55c2364305..68076f04ce77 100644 --- a/sc/source/ui/docshell/pagedata.cxx +++ b/sc/source/ui/docshell/pagedata.cxx @@ -42,7 +42,7 @@ ScPrintRangeData::ScPrintRangeData() nPagesX = nPagesY = 0; pPageEndX = NULL; pPageEndY = NULL; - bTopDown = bAutomatic = TRUE; + bTopDown = bAutomatic = sal_True; nFirstPage = 1; } @@ -108,18 +108,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 sal_False; - for (USHORT i=0; i 1 ) { long nPage = pData[0].GetFirstPage(); - for (USHORT i=0; sal::static_int_cast(i+1)(i+1)GetRangeName(); if (pNames) { - USHORT nPos; + sal_uInt16 nPos; if( pNames->SearchName( rName, nPos ) ) { ScRangeData* pData = (*pNames)[ nPos ]; if ( pData->IsValidReference( rRange ) ) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } ScServerObjectSvtListenerForwarder::ScServerObjectSvtListenerForwarder( @@ -82,7 +82,7 @@ void ScServerObjectSvtListenerForwarder::Notify( SvtBroadcaster& /* rBC */, cons ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) : aForwarder( this ), pDocSh( pShell ), - bRefreshListener( FALSE ) + bRefreshListener( sal_False ) { // parse item string @@ -144,12 +144,12 @@ void ScServerObject::EndListeningAll() SfxListener::EndListeningAll(); } -BOOL __EXPORT ScServerObject::GetData( +sal_Bool __EXPORT 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 sal_False; // named ranges may have changed -> update aRange if ( aItemStr.Len() ) @@ -158,7 +158,7 @@ BOOL __EXPORT ScServerObject::GetData( if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange ) { aRange = aNew; - bRefreshListener = TRUE; + bRefreshListener = sal_True; } } @@ -170,7 +170,7 @@ BOOL __EXPORT ScServerObject::GetData( pDocSh->GetDocument()->StartListeningArea( aRange, &aForwarder ); StartListening(*pDocSh); StartListening(*SFX_APP()); - bRefreshListener = FALSE; + bRefreshListener = sal_False; } String aDdeTextFmt = pDocSh->GetDdeTextFmt(); @@ -180,7 +180,7 @@ BOOL __EXPORT 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" ) ) { @@ -210,7 +210,7 @@ BOOL __EXPORT ScServerObject::GetData( void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { - BOOL bDataChanged = FALSE; + sal_Bool bDataChanged = sal_False; // DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor if ( &rBC == pDocSh ) @@ -231,7 +231,7 @@ void __EXPORT 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 @@ -240,25 +240,25 @@ void __EXPORT 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 d89009540156..405437e5c18f 100644 --- a/sc/source/ui/docshell/sizedev.cxx +++ b/sc/source/ui/docshell/sizedev.cxx @@ -42,11 +42,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 = sal_False; aOldMapMode = pDevice->GetMapMode(); pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode @@ -56,7 +56,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 697b39052b9f..f794f3fb7e54 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -78,34 +78,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( sal_False ), + bInEdit( sal_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( sal_False ), + bInEdit( sal_False ), + bAddUndo( sal_True ), + bDoPaint( sal_True ) { pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell ); SetRefreshHandler( LINK( this, ScTableLink, RefreshHdl ) ); @@ -136,7 +136,7 @@ void __EXPORT ScTableLink::Edit( Window* pParent, const Link& rEndEditHdl ) if (pParent) Application::SetDefDialogParent(pParent); - bInEdit = TRUE; + bInEdit = sal_True; SvBaseLink::Edit( pParent, LINK( this, ScTableLink, TableEndEditHdl ) ); } @@ -163,14 +163,14 @@ void __EXPORT 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 = sal_False; // nur einmal } // Verbindung wird im dtor aufgehoben @@ -178,30 +178,30 @@ void __EXPORT 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 sal_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 sal_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 ) @@ -214,10 +214,10 @@ 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, sal_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 ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); SfxObjectShellRef aRef = pSrcShell; @@ -231,7 +231,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 ); @@ -239,18 +239,18 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, ScDocShellModificator aModificator( *pImpl->m_pDocSh ); - BOOL bNotFound = FALSE; + sal_Bool bNotFound = sal_False; ScDocument* pSrcDoc = pSrcShell->GetDocument(); // #74835# 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; nTabGetLinkMode(nTab); + sal_uInt8 nMode = pDoc->GetLinkMode(nTab); if (nMode && pDoc->GetLinkDoc(nTab)==aFileName) { String aTabName = pDoc->GetLinkTab(nTab); @@ -260,12 +260,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 = sal_False; ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab); - pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pUndoDoc); + pDoc->CopyToDocument(aRange, IDF_ALL, sal_False, pUndoDoc); pUndoDoc->TransferDrawPage( pDoc, nTab, nTab ); pUndoDoc->SetLink( nTab, nMode, aFileName, aFilterName, aOptions, aTabName, GetRefreshDelay() ); @@ -282,7 +282,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, { pDoc->RenameTab( nTab, ScGlobal::GetDocTabName( aNewUrl, aTabName ), - FALSE, TRUE ); // kein RefUpdate, kein ValidTabName + sal_False, sal_True ); // kein RefUpdate, kein ValidTabName } } @@ -303,7 +303,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, sal_False, // nicht neu einfuegen (nMode == SC_LINK_VALUE) ); // nur Werte? else { @@ -340,7 +340,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, pCell = aCellIter.GetNext(); } - ULONG nRanges = aErrorCells.Count(); + sal_uLong nRanges = aErrorCells.Count(); if ( nRanges ) // found any? { ScTokenArray aTokenArr; @@ -349,7 +349,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, aTokenArr.AddOpCode( ocClose ); aTokenArr.AddOpCode( ocStop ); - for (ULONG nPos=0; nPosaStart.Col(); @@ -381,7 +381,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 +426,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, //! Fehler ausgeben ? } - pDoc->SetInLinkUpdate( FALSE ); + pDoc->SetInLinkUpdate( sal_False ); // notify Uno objects (for XRefreshListener) //! also notify Uno objects if file name was changed! @@ -434,7 +434,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 +447,7 @@ IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink ) { if ( pImpl->m_aEndEditLink.IsSet() ) pImpl->m_aEndEditLink.Call( pLink ); - bInEdit = FALSE; + bInEdit = sal_False; Application::SetDefDialogParent( pImpl->m_pOldParent ); return 0; } @@ -458,15 +458,15 @@ String ScDocumentLoader::GetOptions( SfxMedium& rMedium ) // static { 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 ) // static + sal_Bool bWithContent, sal_Bool bWithInteraction ) // static { TypeId aScType = TYPE(ScDocShell); SfxObjectShell* pDocSh = SfxObjectShell::GetFirst( &aScType ); @@ -479,7 +479,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 +488,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 sal_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, sal_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 +506,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName, aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter ); } - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; if ( pMedium->GetError() == ERRCODE_NONE ) { if ( pSfxFilter ) @@ -531,12 +531,12 @@ void ScDocumentLoader::RemoveAppPrefix( String& rFilterName ) // static 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 +545,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, sal_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; @@ -603,12 +603,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 1072af30c7a1..396522fb0121 100644 --- a/sc/source/ui/docshell/tpstat.cxx +++ b/sc/source/ui/docshell/tpstat.cxx @@ -85,9 +85,9 @@ __EXPORT ScDocStatPage::~ScDocStatPage() //------------------------------------------------------------------------ -BOOL __EXPORT ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ ) +sal_Bool __EXPORT ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ ) { - return FALSE; + return sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index e2f70432d679..6e621d1dec55 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -92,7 +92,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) { @@ -113,14 +113,14 @@ void lcl_setModified( SfxObjectShell* pShell ) void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); Window* pWin = pViewData->GetActiveWin(); // SfxViewFrame* pViewFrame = SfxViewShell::Current()->GetViewFrame(); //!!! koennte knallen 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(); @@ -137,7 +137,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; @@ -189,9 +189,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) } if( pView->AreObjectsMarked() ) - pView->SetAttrToMarked( *rReq.GetArgs(), FALSE ); + pView->SetAttrToMarked( *rReq.GetArgs(), sal_False ); else - pView->SetDefaultAttr( *rReq.GetArgs(), FALSE); + pView->SetDefaultAttr( *rReq.GetArgs(), sal_False); pView->InvalidateAttribs(); } break; @@ -265,7 +265,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 ); @@ -316,7 +316,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; @@ -343,7 +343,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, sal_False, &pItem )) { rtl::OUString sMacro; SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT ); @@ -353,10 +353,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) if ( pObj->IsGroupObject() ) { SdrObjList* pOL = pObj->GetSubList(); - ULONG nObj = pOL->GetObjCount(); - for ( ULONG index=0; indexGetObjCount(); + for ( sal_uLong index=0; indexGetObj(index), TRUE ); + pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), sal_True ); pInfo->SetMacro( sMacro ); } } @@ -370,10 +370,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(); @@ -382,7 +382,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage ) SfxItemSet aNewAttr( pView->GetDefaultAttr() ); if( bHasMarked ) - pView->MergeAttrFromMarked( aNewAttr, FALSE ); + pView->MergeAttrFromMarked( aNewAttr, sal_False ); //CHINA001 SvxLineTabDialog* pDlg //CHINA001 = new SvxLineTabDialog( pViewData->GetDialogParent(), @@ -404,9 +404,9 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage ) if ( pDlg->Execute() == RET_OK ) { if( bHasMarked ) - pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), sal_False ); else - pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), sal_False ); pView->InvalidateAttribs(); rReq.Done(); @@ -415,14 +415,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, sal_False ); //CHINA001 SvxAreaTabDialog* pDlg //CHINA001 = new SvxAreaTabDialog( pViewData->GetDialogParent(), @@ -451,9 +451,9 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage ) if ( pDlg->Execute() == RET_OK ) { if( bHasMarked ) - pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), sal_False ); else - pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), sal_False ); pView->InvalidateAttribs(); rReq.Done(); @@ -462,26 +462,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, sal_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(), sal_False ); pView->InvalidateAttribs(); rReq.Done(); @@ -494,7 +494,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 7da571fc05a7..4aeffad840fe 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -57,7 +57,7 @@ #include #include -USHORT ScGetFontWorkId(); // in drtxtob +sal_uInt16 ScGetFontWorkId(); // in drtxtob using namespace com::sun::star; @@ -91,14 +91,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(); @@ -115,18 +115,18 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles switch( pView->GetAnchor() ) { 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, sal_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, sal_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, sal_False ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, sal_False ) ); break; } } @@ -138,14 +138,14 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl // #111711# 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 ); @@ -194,7 +194,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl } } - BOOL bCanRename = FALSE; + sal_Bool bCanRename = sal_False; if ( nMarkCount > 1 ) { #ifdef ISSUE66550_HLINK_FOR_SHAPES @@ -217,10 +217,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl #endif 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(rMarkList.GetMark( 0 )->GetMarkedSdrObj()); @@ -273,7 +273,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 ) ); } } @@ -292,17 +292,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(sal_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 ) ) @@ -325,7 +325,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 = sal_False; if ( pDrView->IsAction() ) // action rectangle { Rectangle aRect; @@ -336,7 +336,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 ) @@ -365,7 +365,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(sal_False); if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SFX_ITEM_DEFAULT ) { @@ -377,18 +377,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; iGetMarkedSdrObj(); if ( !pObj->ISA(SdrUnoObj) ) { if(nLayerNo!=pObj->GetLayer()) { - bResult=FALSE; + bResult=sal_False; break; } } diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx index 45b26584f29a..0b6e790ea9a4 100644 --- a/sc/source/ui/drawfunc/drawsh4.cxx +++ b/sc/source/ui/drawfunc/drawsh4.cxx @@ -55,7 +55,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) ) @@ -68,7 +68,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet) !((SdrTextObj*) pObj)->HasText() ) { if ( pDlg ) - pDlg->SetActive(FALSE); + pDlg->SetActive(sal_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 e79097ef8874..3130e39b79f1 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -83,7 +83,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 @@ -163,14 +163,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(); @@ -178,7 +178,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) const String& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( eMode == HLINK_FIELD || eMode == HLINK_BUTTON ) { ScDrawView* pView = pViewData->GetScDrawView(); @@ -239,14 +239,14 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) //! Undo ??? pViewData->GetDocShell()->SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; } } #ifdef ISSUE66550_HLINK_FOR_SHAPES else { SetHlinkForObject( pObj, rURL ); - bDone = TRUE; + bDone = sal_True; } #endif } @@ -254,7 +254,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) 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 !!! } @@ -265,7 +265,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) } } -USHORT ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2 +sal_uInt16 ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2 //------------------------------------------------------------------ @@ -279,7 +279,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) @@ -300,7 +300,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( sal_False ); break; case SID_FRAME_TO_TOP: @@ -371,13 +371,13 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) case SID_DELETE_CONTENTS: pView->DeleteMarked(); if (!pTabView->IsDrawSelMode()) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_CUT: pView->DoCut(); if (!pTabView->IsDrawSelMode()) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_COPY: @@ -433,7 +433,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 ); } } @@ -450,14 +450,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) @@ -471,7 +471,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) case SID_FONTWORK: { - USHORT nId = ScGetFontWorkId(); + sal_uInt16 nId = ScGetFontWorkId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if ( rReq.GetArgs() ) @@ -493,11 +493,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, sal_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 ); } @@ -565,7 +565,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) } // ChartListenerCollectionNeedsUpdate is needed for Navigator update - pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE ); + pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True ); pDocSh->SetDrawModified(); } @@ -604,7 +604,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(); } @@ -690,12 +690,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-> @@ -723,7 +723,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) } else { - BOOL bLock = FALSE; + sal_Bool bLock = sal_False; const SfxItemSet *pArgs = rReq.GetArgs(); if( pArgs && pArgs->Count() >= 1 ) bLock = static_cast(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue(); @@ -731,7 +731,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 ); } @@ -741,8 +741,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/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index a5159d8a8043..68d8557039af 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -109,7 +109,7 @@ TYPEINIT1( ScDrawTextObjectBar, SfxShell ); void ScDrawTextObjectBar::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -122,7 +122,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) : SfxShell(pData->GetViewShell()), pViewData(pData), pClipEvtLstnr(NULL), - bPastePossible(FALSE) + bPastePossible(sal_False) { SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() ); @@ -142,7 +142,7 @@ __EXPORT ScDrawTextObjectBar::~ScDrawTextObjectBar() { if ( pClipEvtLstnr ) { - pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), FALSE ); + pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), sal_False ); // #122057# 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. @@ -171,7 +171,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) } const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_COPY: @@ -188,10 +188,10 @@ void __EXPORT 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(); @@ -213,8 +213,8 @@ void __EXPORT 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; @@ -230,13 +230,13 @@ void __EXPORT 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), sal_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), sal_False, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) { @@ -269,7 +269,7 @@ void __EXPORT 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(); @@ -277,7 +277,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) const String& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pOutView && ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) ) { const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection(); @@ -314,7 +314,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) pOutView->SetSelection( aSel ); } - bDone = TRUE; + bDone = sal_True; } if (!bDone) @@ -396,13 +396,13 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) void __EXPORT 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 = sal_False; if (IsNoteEdit()) { // #i21255# notes now support rich text formatting (#i74140# but not fontwork) - bDisableFontWork = TRUE; + bDisableFontWork = sal_True; } if ( bDisableFontWork ) @@ -417,7 +417,7 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) OutlinerView* pOutView = pView->GetTextEditOutlinerView(); if ( pOutView ) { - BOOL bField = FALSE; + sal_Bool bField = sal_False; const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection(); if (pFieldItem) { @@ -428,7 +428,7 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) aHLinkItem.SetName( pURLField->GetRepresentation() ); aHLinkItem.SetURL( pURLField->GetURL() ); aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() ); - bField = TRUE; + bField = sal_True; } } if (!bField) @@ -477,7 +477,7 @@ void __EXPORT 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 ) ); } } @@ -499,7 +499,7 @@ void __EXPORT 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) @@ -536,7 +536,7 @@ void __EXPORT 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() ) ); @@ -544,7 +544,7 @@ void __EXPORT ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet ) } SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) @@ -588,7 +588,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq ) SdrView* pView = pViewData->GetScDrawView(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SfxItemSet aSet( pView->GetDefaultAttr() ); @@ -635,41 +635,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 = sal_False; //! GetPortions and GetAttribs should be const! EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine(); - ULONG nParCount = pOutliner->GetParagraphCount(); - for (ULONG nPar=0; nParGetParagraphCount(); + for (sal_uLong nPar=0; 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( sal_False ); String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); pOutliner->GetUndoManager().EnterListAction( aName, aName ); - bChanged = TRUE; + bChanged = sal_True; } String aFieldText = rEditEng.GetText( aFieldSel ); @@ -687,7 +687,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 @@ -701,15 +701,15 @@ void __EXPORT 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 ) { @@ -721,7 +721,7 @@ void __EXPORT 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 ) { @@ -731,7 +731,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) rReq.Done( aEmptyAttr ); pViewData->GetScDrawView()->InvalidateDrawTextAttrs(); - bDone = FALSE; // bereits hier passiert + bDone = sal_False; // bereits hier passiert } break; @@ -875,13 +875,13 @@ void __EXPORT 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() ); @@ -904,8 +904,8 @@ void __EXPORT 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()); @@ -917,10 +917,10 @@ void __EXPORT 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()) { @@ -945,16 +945,16 @@ void __EXPORT 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: { @@ -969,19 +969,19 @@ void __EXPORT 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; } @@ -990,13 +990,13 @@ void __EXPORT 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 ); @@ -1008,7 +1008,7 @@ void __EXPORT 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; @@ -1017,18 +1017,18 @@ void __EXPORT 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 = sal_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 61fbf3d0f96e..31a9049aeadb 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -56,7 +56,7 @@ #include "scabstdlg.hxx" //CHINA00 //------------------------------------------------------------------------ -BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, +sal_Bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ) { //CHINA001 ScCharDlg* pDlg = new ScCharDlg( pViewData->GetDialogParent(), @@ -69,7 +69,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!");//CHINA001 - BOOL bRet = ( pDlg->Execute() == RET_OK ); + sal_Bool bRet = ( pDlg->Execute() == RET_OK ); if ( bRet ) { @@ -82,7 +82,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(); @@ -114,7 +114,7 @@ BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr, RID_SCDLG_PARAGRAPH); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 - BOOL bRet = ( pDlg->Execute() == RET_OK ); + sal_Bool bRet = ( pDlg->Execute() == RET_OK ); if ( bRet ) { @@ -139,7 +139,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 27f1a3dbb77f..137ddfa654d2 100644 --- a/sc/source/ui/drawfunc/drtxtob2.cxx +++ b/sc/source/ui/drawfunc/drtxtob2.cxx @@ -57,12 +57,12 @@ //------------------------------------------------------------------------ -USHORT ScGetFontWorkId() +sal_uInt16 ScGetFontWorkId() { return SvxFontWorkChildWindow::GetChildWindowId(); } -BOOL ScDrawTextObjectBar::IsNoteEdit() +sal_Bool ScDrawTextObjectBar::IsNoteEdit() { return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetSdrView()->GetTextEditObject() ); } @@ -74,7 +74,7 @@ void __EXPORT 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: @@ -84,7 +84,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq ) case SID_CUT: pView->DoCut(); if (!pTabView->IsDrawSelMode()) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_PASTE: @@ -118,11 +118,11 @@ void __EXPORT 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, sal_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 ); } @@ -139,7 +139,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 ); @@ -152,12 +152,12 @@ void __EXPORT 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() ) @@ -180,7 +180,7 @@ void __EXPORT 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 ) ); @@ -211,12 +211,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-> @@ -238,7 +238,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) ) @@ -251,7 +251,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet) !((SdrTextObj*) pObj)->HasText() ) { if ( pDlg ) - pDlg->SetActive(FALSE); + pDlg->SetActive(sal_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 20daacffac0e..5e40fcea171d 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -65,19 +65,19 @@ FuConstArc::~FuConstArc() |* \************************************************************************/ -BOOL __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) { // #95491# 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; } @@ -88,7 +88,7 @@ BOOL __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) |* \************************************************************************/ -BOOL __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt ) +sal_Bool __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt ) { return FuConstruct::MouseMove(rMEvt); } @@ -99,25 +99,25 @@ BOOL __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt ) |* \************************************************************************/ -BOOL __EXPORT FuConstArc::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool __EXPORT FuConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->IsCreateObj() && rMEvt.IsLeft() ) { // Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->EndCreateObj( SDRCREATE_NEXTPOINT ); - bReturn = TRUE; + bReturn = sal_True; } /* else if ( pView->IsCreateObj() && rMEvt.IsRight() ) { // Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->EndCreateObj( SDRCREATE_FORCEEND ); - bReturn = TRUE; + bReturn = sal_True; } */ return (FuConstruct::MouseButtonUp(rMEvt) || bReturn); @@ -127,14 +127,14 @@ BOOL __EXPORT 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 __EXPORT FuConstArc::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstArc::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } @@ -171,7 +171,7 @@ void FuConstArc::Activate() break; } - pView->SetCurrentObj( sal::static_int_cast( aObjKind ) ); + pView->SetCurrentObj( sal::static_int_cast( aObjKind ) ); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 69a47f0584d0..be8dd2bf2188 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -75,12 +75,12 @@ FuConstCustomShape::~FuConstCustomShape() |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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() ) ); @@ -102,7 +102,7 @@ BOOL __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) pObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); } - bReturn = TRUE; + bReturn = sal_True; } return bReturn; } @@ -113,7 +113,7 @@ BOOL __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstCustomShape::MouseMove(const MouseEvent& rMEvt) { return FuConstruct::MouseMove(rMEvt); } @@ -124,18 +124,18 @@ BOOL __EXPORT FuConstCustomShape::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_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); } @@ -144,14 +144,14 @@ BOOL __EXPORT 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 __EXPORT FuConstCustomShape::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstCustomShape::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 440f49f41326..58075d5fc1ce 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -73,12 +73,12 @@ FuConstPolygon::~FuConstPolygon() |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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); @@ -86,15 +86,15 @@ BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { // Texteingabe hier nicht zulassen aVEvt.eEvent = SDREVENT_BEGDRAGOBJ; - pView->EnableExtendedMouseEventDispatcher(FALSE); + pView->EnableExtendedMouseEventDispatcher(sal_False); } else { - pView->EnableExtendedMouseEventDispatcher(TRUE); + pView->EnableExtendedMouseEventDispatcher(sal_True); } if ( pView->MouseButtonDown(rMEvt, pWindow) ) - bReturn = TRUE; + bReturn = sal_True; return bReturn; } @@ -105,10 +105,10 @@ BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt) { pView->MouseMove(rMEvt, pWindow); - BOOL bReturn = FuConstruct::MouseMove(rMEvt); + sal_Bool bReturn = FuConstruct::MouseMove(rMEvt); return bReturn; } @@ -118,13 +118,13 @@ BOOL __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; - BOOL bSimple = FALSE; + sal_Bool bReturn = sal_False; + sal_Bool bSimple = sal_False; SdrViewEvent aVEvt; (void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt); @@ -133,11 +133,11 @@ BOOL __EXPORT 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 @@ -150,14 +150,14 @@ BOOL __EXPORT 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 __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } @@ -170,7 +170,7 @@ BOOL __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt) void FuConstPolygon::Activate() { - pView->EnableExtendedMouseEventDispatcher(TRUE); + pView->EnableExtendedMouseEventDispatcher(sal_True); SdrObjKind eKind; @@ -221,7 +221,7 @@ void FuConstPolygon::Activate() break; } - pView->SetCurrentObj(sal::static_int_cast(eKind)); + pView->SetCurrentObj(sal::static_int_cast(eKind)); pView->SetEditMode(SDREDITMODE_CREATE); @@ -242,7 +242,7 @@ void FuConstPolygon::Deactivate() { pView->SetEditMode(SDREDITMODE_EDIT); - pView->EnableExtendedMouseEventDispatcher(FALSE); + pView->EnableExtendedMouseEventDispatcher(sal_False); FuConstruct::Deactivate(); diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index 733c6fe08b45..19106e891389 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -73,12 +73,12 @@ FuConstRectangle::~FuConstRectangle() |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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() ) { @@ -106,7 +106,7 @@ BOOL __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt) { return FuConstruct::MouseMove(rMEvt); } @@ -117,12 +117,12 @@ BOOL __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->IsCreateObj() && rMEvt.IsLeft() ) { @@ -142,11 +142,11 @@ BOOL __EXPORT 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); } @@ -155,14 +155,14 @@ BOOL __EXPORT 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 __EXPORT FuConstRectangle::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstRectangle::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } @@ -205,7 +205,7 @@ void FuConstRectangle::Activate() break; } - pView->SetCurrentObj(sal::static_int_cast(aObjKind)); + pView->SetCurrentObj(sal::static_int_cast(aObjKind)); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index bb918e9005ae..25a6e556e43e 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -69,7 +69,7 @@ FuConstruct::~FuConstruct() { } -BYTE FuConstruct::Command(const CommandEvent& rCEvt) +sal_uInt8 FuConstruct::Command(const CommandEvent& rCEvt) { // special code for non-VCL OS2/UNX removed @@ -82,18 +82,18 @@ BYTE FuConstruct::Command(const CommandEvent& rCEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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(); @@ -109,16 +109,16 @@ BOOL __EXPORT 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 = sal_False; return bReturn; } @@ -129,7 +129,7 @@ BOOL __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) { FuDraw::MouseMove(rMEvt); @@ -167,7 +167,7 @@ BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) pViewShell->SetActivePointer( aNewPointer ); } } - return TRUE; + return sal_True; } /************************************************************************* @@ -176,16 +176,16 @@ BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# 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() ) @@ -200,8 +200,8 @@ BOOL __EXPORT 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); @@ -214,7 +214,7 @@ BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) Point aMousePixel = rMEvt.GetPosPixel(); pText->SetInEditMode( pObj, &aMousePixel ); } - bReturn = TRUE; + bReturn = sal_True; } } } @@ -227,9 +227,9 @@ BOOL __EXPORT 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() ) { @@ -244,7 +244,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) else if ( pView->IsMarkObj() ) pView->EndMarkObj(); - else bReturn = FALSE; + else bReturn = sal_False; if ( !pView->IsAction() ) { @@ -252,7 +252,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 ) { - pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()); + pView->MarkObj(aPnt, -2, sal_False, rMEvt.IsMod1()); SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher(); if ( pView->AreObjectsMarked() ) @@ -269,14 +269,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 __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; switch ( rKEvt.GetKeyCode().GetCode() ) { @@ -285,7 +285,7 @@ BOOL __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) { pView->BrkAction(); pWindow->ReleaseMouse(); - bReturn = TRUE; + bReturn = sal_True; } else // Zeichenmodus beenden { @@ -296,7 +296,7 @@ BOOL __EXPORT 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 c1212d4d9699..4f499f519298 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -43,8 +43,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, sal_False ); + SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, sal_False ); if( pInventorItem ) nInventor = pInventorItem->GetValue(); if( pIdentifierItem ) @@ -67,19 +67,19 @@ FuConstUnoControl::~FuConstUnoControl() |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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; } @@ -90,7 +90,7 @@ BOOL __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt) { return FuConstruct::MouseMove(rMEvt); } @@ -101,18 +101,18 @@ BOOL __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_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); } @@ -121,14 +121,14 @@ BOOL __EXPORT 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 __EXPORT FuConstUnoControl::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT 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 bad23bf26ed1..219d3ab4a4af 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -90,19 +90,19 @@ void FuDraw::DoModifiers(const MouseEvent& rMEvt) // Control = Snap (Toggle) // Alt = zentrisch - BOOL bShift = rMEvt.IsShift(); -// BOOL bCtrl = rMEvt.IsMod1(); - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bShift = rMEvt.IsShift(); +// sal_Bool bCtrl = rMEvt.IsMod1(); + sal_Bool bAlt = rMEvt.IsMod2(); // ScViewData* pViewData = pViewShell->GetViewData(); // const ScViewOptions& rOpt = pViewData->GetOptions(); // const ScGridOptions& rGrid = rOpt.GetGridOptions(); -// BOOL bGridOpt = rGrid.GetUseGridSnap(); +// sal_Bool bGridOpt = rGrid.GetUseGridSnap(); - BOOL bOrtho = bShift; - BOOL bAngleSnap = bShift; -// BOOL bGridSnap = ( bGridOpt != bCtrl ); // andere Snap's nicht unterstuetzt - BOOL bCenter = bAlt; + sal_Bool bOrtho = bShift; + sal_Bool bAngleSnap = bShift; +// sal_Bool bGridSnap = ( bGridOpt != bCtrl ); // andere Snap's nicht unterstuetzt + sal_Bool bCenter = bAlt; // #i33136# if(doConstructOrthogonal()) @@ -134,12 +134,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(sal_False); if (pView->IsAngleSnapEnabled()) - pView->SetAngleSnapEnabled(FALSE); + pView->SetAngleSnapEnabled(sal_False); if (pView->IsGridSnap() != bGridOpt) pView->SetGridSnap(bGridOpt); @@ -147,9 +147,9 @@ void FuDraw::ResetModifiers() pView->SetSnapEnabled(bGridOpt); if (pView->IsCreate1stPointAsCenter()) - pView->SetCreate1stPointAsCenter(FALSE); + pView->SetCreate1stPointAsCenter(sal_False); if (pView->IsResizeAtCenter()) - pView->SetResizeAtCenter(FALSE); + pView->SetResizeAtCenter(sal_False); } /************************************************************************* @@ -158,13 +158,13 @@ void FuDraw::ResetModifiers() |* \************************************************************************/ -BOOL __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); DoModifiers( rMEvt ); - return FALSE; + return sal_False; } /************************************************************************* @@ -173,14 +173,14 @@ BOOL __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt) { // #106438# evaluate modifiers only if in a drawing layer action // (don't interfere with keyboard shortcut handling) if (pView->IsAction()) DoModifiers( rMEvt ); - return FALSE; + return sal_False; } /************************************************************************* @@ -189,35 +189,35 @@ BOOL __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuDraw::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuDraw::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); ResetModifiers(); - return FALSE; + return sal_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 = sal_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(); @@ -232,17 +232,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 __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; ScViewData& rViewData = *pViewShell->GetViewData(); switch ( rKEvt.GetKeyCode().GetCode() ) @@ -255,14 +255,14 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) * { * pView->BrkAction(); * pWindow->ReleaseMouse(); - * bReturn = TRUE; + * bReturn = sal_True; * } * else if ( pView->IsTextEdit() ) * { * pView->EndTextEdit(); * pView->SetCreateMode(); * pViewShell->GetScDrawView()->InvalidateDrawTextAttrs(); - * bReturn = TRUE; + * bReturn = sal_True; * } * else */ @@ -271,13 +271,13 @@ BOOL __EXPORT 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() ) { @@ -290,15 +290,15 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) // Beim Bezier-Editieren ist jetzt wieder das Objekt selektiert if (!pView->AreObjectsMarked()) - pViewShell->SetDrawShell( FALSE ); + pViewShell->SetDrawShell( sal_False ); - bReturn = TRUE; + bReturn = sal_True; } break; case KEY_DELETE: //! ueber Accelerator pView->DeleteMarked(); - bReturn = TRUE; + bReturn = sal_True; break; case KEY_RETURN: @@ -310,7 +310,7 @@ BOOL __EXPORT 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 ) { @@ -318,10 +318,10 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) 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; } } } @@ -338,7 +338,7 @@ BOOL __EXPORT 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; } } } @@ -368,7 +368,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->AreObjectsMarked()) pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } // #98994# handle Mod1 and Mod2 to get travelling running on different systems @@ -391,7 +391,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) } // consumed - bReturn = TRUE; + bReturn = sal_True; } } } @@ -410,13 +410,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { // #97016# mark last object pView->UnmarkAllObj(); - pView->MarkNextObj(FALSE); + pView->MarkNextObj(sal_False); // #97016# II if(pView->AreObjectsMarked()) pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -435,13 +435,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { // #97016# mark first object pView->UnmarkAllObj(); - pView->MarkNextObj(TRUE); + pView->MarkNextObj(sal_True); // #97016# II if(pView->AreObjectsMarked()) pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -470,7 +470,7 @@ BOOL __EXPORT 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) { @@ -497,7 +497,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) nY = 0; } - BOOL bReadOnly = rViewData.GetDocShell()->IsReadOnly(); + sal_Bool bReadOnly = rViewData.GetDocShell()->IsReadOnly(); if(!rKEvt.GetKeyCode().IsMod1() && !bReadOnly) { @@ -565,7 +565,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) // #97016# II pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } else @@ -584,13 +584,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->IsDragObj()) { FASTBOOL 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(sal_False); pView->MovAction(aEndPoint); pView->EndDragObj(); @@ -606,7 +606,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); pView->MakeVisible(aVisRect, *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -673,7 +673,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) } } - bReturn = TRUE; + bReturn = sal_True; } } } @@ -697,7 +697,7 @@ BOOL __EXPORT 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; } } @@ -761,7 +761,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 ); @@ -771,13 +771,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 sal_False; } void FuDraw::ForcePointer(const MouseEvent* pMEvt) @@ -785,7 +785,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; @@ -841,9 +841,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 = sal_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 53a44f058dda..4cc08ececd49 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -106,7 +106,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 @@ -148,7 +148,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 ) { // #74778# set the size so the graphic has its original pixel size @@ -193,7 +193,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 ); // #118522# SetGraphicLink has to be used after inserting the object, @@ -256,23 +256,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 = sal_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 @@ -287,9 +287,9 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, { String aFileName = aDlg.GetPath(); String aFilterName = aDlg.GetCurrentFilter(); - BOOL bAsLink = aDlg.IsAsLink(); + sal_Bool bAsLink = aDlg.IsAsLink(); - lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, FALSE, pViewSh, pWindow, pView ); + lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_False, pViewSh, pWindow, pView ); // append items for recording rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) ); @@ -302,7 +302,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, // error is handled in SvxOpenGraphicDialog::GetGraphic #if 0 - USHORT nRes = 0; + sal_uInt16 nRes = 0; switch ( nError ) { case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break; @@ -319,7 +319,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, } else { - ULONG nStreamError = GetGrfFilter()->GetLastError().nStreamError; + sal_uLong nStreamError = GetGrfFilter()->GetLastError().nStreamError; if( ERRCODE_NONE != nStreamError ) ErrorHandler::HandleError( nStreamError ); } diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 297e8fa38651..0c68c871ece1 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -98,7 +98,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 +118,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 +228,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 = sal_False; ::rtl::OUString aName; sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; @@ -236,7 +236,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie uno::Reference< io::XInputStream > xIconMetaFile; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False ); if ( nSlot == SID_INSERT_OBJECT && pNameItem ) { @@ -427,7 +427,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie if (bIsFromFile) { // #45012# Objekt ist selektiert, also Draw-Shell aktivieren - pViewShell->SetDrawShell( TRUE ); + pViewShell->SetDrawShell( sal_True ); } else { @@ -516,7 +516,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; } @@ -524,18 +524,18 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* aMultiMark.MarkToMulti(); ScRangeList aRanges; - aMultiMark.FillRangeListWithMarks( &aRanges, FALSE ); + aMultiMark.FillRangeListWithMarks( &aRanges, sal_False ); String aStr; ScDocument* pDocument = pViewSh->GetViewData()->GetDocument(); aRanges.Format( aStr, SCR_ABS_3D, pDocument, pDocument->GetAddressConvention() ); aRangeString = aStr; // get "total" range for positioning - ULONG nCount = aRanges.Count(); + sal_uLong nCount = aRanges.Count(); if ( nCount > 0 ) { aPositionRange = *aRanges.GetObject(0); - for (ULONG i=1; iGetChartArea( aDummy, aMarkDest, nMarkTab ); + sal_Bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab ); // Objekt-Groesse awt::Size aSz = xObj->getVisualAreaSize( nAspect ); @@ -574,17 +574,17 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - BOOL bSizeCh = FALSE; + sal_Bool bSizeCh = sal_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) { @@ -597,12 +597,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 ) ) { @@ -614,15 +614,15 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* // -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle if ( ((const SfxBoolItem*)pItem)->GetValue() ) - nToTable = static_cast(pScDoc->GetTableCount()); + nToTable = static_cast(pScDoc->GetTableCount()); else - nToTable = static_cast(pData->GetTabNo()); + nToTable = static_cast(pData->GetTabNo()); } } else { if (bDrawRect) - nToTable = static_cast(nMarkTab); + nToTable = static_cast(nMarkTab); rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) ); } @@ -637,7 +637,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* if ( pScDoc->InsertTab( nNewTab, aTabName ) ) { - BOOL bAppend = TRUE; + sal_Bool bAppend = sal_True; if (bUndo) { @@ -647,7 +647,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 @@ -657,7 +657,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* } else if ( nToTable != pData->GetTabNo() ) { - pViewSh->SetTabNo( nToTable, TRUE ); + pViewSh->SetTabNo( nToTable, sal_True ); } } @@ -788,7 +788,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( sal_False ); } else { diff --git a/sc/source/ui/drawfunc/fumark.cxx b/sc/source/ui/drawfunc/fumark.cxx index 02554c495729..929f3cfd5b4e 100644 --- a/sc/source/ui/drawfunc/fumark.cxx +++ b/sc/source/ui/drawfunc/fumark.cxx @@ -51,8 +51,8 @@ FuMarkRect::FuMarkRect(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq) : FuPoor(pViewSh, pWin, pViewP, pDoc, rReq), - bVisible(FALSE), - bStartDrag(FALSE) + bVisible(sal_False), + bStartDrag(sal_False) { } @@ -72,18 +72,18 @@ FuMarkRect::~FuMarkRect() |* \************************************************************************/ -BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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; } /************************************************************************* @@ -92,7 +92,7 @@ BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt) +sal_Bool FuMarkRect::MouseMove(const MouseEvent& rMEvt) { if ( bStartDrag ) { @@ -106,7 +106,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt) aZoomRect = aRect; aZoomRect.Justify(); pViewShell->DrawMarkRect(aZoomRect); - bVisible = TRUE; + bVisible = sal_True; } ForcePointer(&rMEvt); @@ -120,7 +120,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); @@ -129,12 +129,12 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) { // Hide ZoomRect pViewShell->DrawMarkRect(aZoomRect); - bVisible = FALSE; + bVisible = sal_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 @@ -142,7 +142,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) aZoomRect.SetSize(Size()); // dann ganz leer } - bStartDrag = FALSE; + bStartDrag = sal_False; pWindow->ReleaseMouse(); pViewShell->GetViewData()->GetDispatcher(). @@ -154,11 +154,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; } /************************************************************************* @@ -167,7 +167,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() ) { @@ -183,14 +183,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 = sal_False; switch ( rKEvt.GetKeyCode().GetCode() ) { @@ -198,7 +198,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; } @@ -246,7 +246,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 @@ -269,8 +269,8 @@ void FuMarkRect::Deactivate() { // Hide ZoomRect pViewShell->DrawMarkRect(aZoomRect); - bVisible = FALSE; - bStartDrag = FALSE; + bVisible = sal_False; + bStartDrag = sal_False; } } diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index 0bffdfe7ef84..dabda66355ab 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -55,7 +55,7 @@ FuPoor::FuPoor(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, pDrDoc(pDoc), aSfxRequest(rReq), pDialog(NULL), - bIsInDragMode(FALSE), + bIsInDragMode(sal_False), // #95491# remember MouseButton state mnCode(0) { @@ -178,21 +178,21 @@ IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, EMPTYARG ) IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer ) // #95491# moved from inline to *.cxx -BOOL FuPoor::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool FuPoor::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - return FALSE; + return sal_False; } // #95491# moved from inline to *.cxx -BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - return FALSE; + return sal_False; } /************************************************************************* @@ -207,25 +207,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 = sal_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(); @@ -306,7 +306,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); @@ -316,24 +316,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 sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_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 4a456522003c..964e9cb5081e 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -80,7 +80,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(sal_False) { } @@ -94,7 +94,7 @@ FuSelection::~FuSelection() { } -BYTE FuSelection::Command(const CommandEvent& rCEvt) +sal_uInt8 FuSelection::Command(const CommandEvent& rCEvt) { // special code for non-VCL OS2/UNX removed @@ -107,7 +107,7 @@ BYTE FuSelection::Command(const CommandEvent& rCEvt) |* \************************************************************************/ -BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); @@ -116,13 +116,13 @@ BOOL __EXPORT 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 = sal_False; + bIsInDragMode = sal_False; // irgendwo muss es ja zurueckgesetzt werden (#50033#) - BOOL bReturn = FuDraw::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt); aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() ); @@ -162,16 +162,16 @@ BOOL __EXPORT 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 { @@ -201,7 +201,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) pObj = pHit; } - ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE ); + ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ); #ifdef ISSUE66550_HLINK_FOR_SHAPES // For interoperability favour links over macros if both are defined if ( pInfo->GetHlink().getLength() > 0 ) @@ -225,7 +225,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) pObjSh->CallXScript( pInfo->GetMacro(), *pInArgs, aRet, aOutArgsIndex, aOutArgs); pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() ); - return TRUE; // kein CaptureMouse etc. + return sal_True; // kein CaptureMouse etc. } } } @@ -259,13 +259,13 @@ BOOL __EXPORT 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 @@ -280,7 +280,7 @@ BOOL __EXPORT 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, sal_False, rMEvt.IsMod1() ) ) { //********************************************************* //Objekt verschieben @@ -296,11 +296,11 @@ BOOL __EXPORT 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 { @@ -312,7 +312,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) //Objekt selektieren //******************************************************** pView->BegMarkObj(aMDPos); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -336,9 +336,9 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) { - BOOL bReturn = FuDraw::MouseMove(rMEvt); + sal_Bool bReturn = FuDraw::MouseMove(rMEvt); if (aDragTimer.IsActive() ) { @@ -356,7 +356,7 @@ BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) ForceScroll(aPix); pView->MovAction(aPnt); - bReturn = TRUE; + bReturn = sal_True; } // Ein VCControl ist aktiv @@ -369,7 +369,7 @@ BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) //VCSbxForm* pForm = (VCSbxForm*)(SbxObject*)(pPage->GetSbxForm()); //((VCManager*)(pForm->GetVCContainer()))-> // MouseMove( pWindow, rMEvt ); - bReturn = TRUE; + bReturn = sal_True; } ForcePointer(&rMEvt); @@ -383,14 +383,14 @@ BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuDraw::MouseButtonUp(rMEvt); -// BOOL bOle = pViewShell->GetViewData()->IsOle(); - BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt); +// sal_Bool bOle = pViewShell->GetViewData()->IsOle(); + sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); if (aDragTimer.IsActive() ) { @@ -418,7 +418,7 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) FuText* pText = static_cast(pPoor); pText->StopDragMode(pObj ); } - bReturn = TRUE; + bReturn = sal_True; } else if (pView->IsAction() ) { @@ -427,16 +427,16 @@ BOOL __EXPORT 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 ); @@ -454,9 +454,9 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) /* if ( pView->IsObjEdit() ) { - BOOL bShowCursor = TRUE; + sal_Bool bShowCursor = sal_True; //! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor); - bReturn = TRUE; + bReturn = sal_True; } */ /************************************************************************** @@ -473,7 +473,7 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) pIPClient->DeactivateObject(); } - USHORT nClicks = rMEvt.GetClicks(); + sal_uInt16 nClicks = rMEvt.GetClicks(); if ( nClicks == 2 && rMEvt.IsLeft() ) { if ( pView->AreObjectsMarked() ) @@ -491,7 +491,7 @@ BOOL __EXPORT 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 @@ -517,8 +517,8 @@ BOOL __EXPORT 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); @@ -531,13 +531,13 @@ BOOL __EXPORT 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 @@ -551,8 +551,8 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) //((VCManager*)(pForm->GetVCContainer()))-> // MouseButtonUp( pWindow, rMEvt ); //HMHpView->ShowMarkHdl(); - bVCAction = FALSE; - bReturn = TRUE; + bVCAction = sal_False; + bReturn = sal_True; } ForcePointer(&rMEvt); @@ -573,14 +573,14 @@ BOOL __EXPORT 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 = sal_False; if (!bReturn) { @@ -631,7 +631,7 @@ void FuSelection::Deactivate() /************************************************************************** * Hide Cursor **************************************************************************/ -// BOOL bShowCursor = FALSE; +// sal_Bool bShowCursor = sal_False; //! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor); // pView->SetDragMode(SDRDRAG_MOVE); diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx index 402143ac0a8c..503235e865a6 100644 --- a/sc/source/ui/drawfunc/fusel2.cxx +++ b/sc/source/ui/drawfunc/fusel2.cxx @@ -63,19 +63,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 sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_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)) { @@ -93,11 +93,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 = sal_False; else if ( nCurX == nEndCol && nCurY == nEndRow ) - bStart = TRUE; + bStart = sal_True; SCsCOL nDifX; SCsROW nDifY; @@ -111,9 +111,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, sal_False ); - bFound = TRUE; + bFound = sal_True; } } @@ -148,7 +148,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 a13cfc61d1c6..99aab320e16d 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -131,13 +131,13 @@ FuText::~FuText() |* \************************************************************************/ -BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# 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() ) { @@ -152,13 +152,13 @@ BOOL __EXPORT 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() ) { @@ -198,8 +198,8 @@ BOOL __EXPORT 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 @@ -213,7 +213,7 @@ BOOL __EXPORT 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 @@ -244,7 +244,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) } else { - BOOL bMacro = FALSE; + sal_Bool bMacro = sal_False; // if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV)) if (bMacro && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) @@ -256,7 +256,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) { if (pView->IsEditMode()) { - BOOL bPointMode=pView->HasMarkablePoints(); + sal_Bool bPointMode=pView->HasMarkablePoints(); if (!rMEvt.IsShift()) { @@ -276,7 +276,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) pHdl=pView->GetHdl(nHdlNum); } - if ( pView->MarkObj(aMDPos, -2, FALSE, rMEvt.IsMod1()) ) + if ( pView->MarkObj(aMDPos, -2, sal_False, rMEvt.IsMod1()) ) { aDragTimer.Start(); @@ -333,7 +333,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow )); // return (bReturn); - return TRUE; + return sal_True; } /************************************************************************* @@ -342,9 +342,9 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; // pViewShell->SetActivePointer(aNewPointer); @@ -361,7 +361,7 @@ BOOL __EXPORT 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() ) { @@ -386,12 +386,12 @@ BOOL __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if (aDragTimer.IsActive() ) { @@ -403,7 +403,7 @@ BOOL __EXPORT 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() ) { @@ -437,20 +437,20 @@ BOOL __EXPORT 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( sal_False ) ); + aItemSet.Put( SdrTextAutoGrowHeightItem( sal_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); } } // #93382# 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(); @@ -462,10 +462,10 @@ BOOL __EXPORT 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(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -481,7 +481,7 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) if ( !pView->AreObjectsMarked() ) { - pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()); + pView->MarkObj(aPnt, -2, sal_False, rMEvt.IsMod1()); SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher(); if ( pView->AreObjectsMarked() ) @@ -501,7 +501,7 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 ) { - pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()); + pView->MarkObj(aPnt, -2, sal_False, rMEvt.IsMod1()); SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher(); if ( pView->AreObjectsMarked() ) @@ -574,18 +574,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 __EXPORT FuText::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuText::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->KeyInput(rKEvt, pWindow) ) { - bReturn = TRUE; + bReturn = sal_True; lcl_InvalidateAttribs( pViewShell->GetViewFrame()->GetBindings() ); } else @@ -619,10 +619,10 @@ void FuText::Activate() /********************************************************************** * Kein Textobjekt im EditMode, daher CreateMode setzen **********************************************************************/ - USHORT nObj = OBJ_TEXT; + sal_uInt16 nObj = OBJ_TEXT; -/* UINT16 nIdent; - UINT32 nInvent; +/* sal_uInt16 nIdent; + sal_uInt32 nInvent; pView->TakeCurrentObj(nIdent, nInvent); */ pView->SetCurrentObj(nObj); @@ -678,7 +678,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 || @@ -695,9 +695,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); // if (! pView->IsEditMode() ) @@ -729,7 +729,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 @@ -751,7 +751,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 || @@ -770,8 +770,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 @@ -847,8 +847,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(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -859,12 +859,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( sal_False ) ); + aSet.Put( SdrTextAutoGrowHeightItem( sal_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/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx index 534e68705fa8..e61289f00710 100644 --- a/sc/source/ui/drawfunc/futext3.cxx +++ b/sc/source/ui/drawfunc/futext3.cxx @@ -58,10 +58,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; @@ -187,7 +187,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(), sal_False); } } diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 25cda28aaa9d..add82f255f05 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -95,14 +95,14 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet ) { ScDrawView* pView = GetViewData()->GetScDrawView(); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_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 78948550aea6..9aec72095c1e 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -74,7 +74,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet ) if( pView ) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { @@ -117,7 +117,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, sal_False, &pItem ) ) ) pItem = NULL; if( pItem ) diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 1d522fb3211e..99cc1c14688f 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -75,7 +75,7 @@ SFX_IMPL_DOCKINGWINDOW( ScFunctionChildWindow, FID_FUNCTION_BOX ) #************************************************************************/ __EXPORT ScFunctionChildWindow::ScFunctionChildWindow( Window* pParentP, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentP, nId ) @@ -124,13 +124,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=sal_False; aCatBox.SetDropDownLineCount(9); Font aFont=aFiFuncDesc.GetFont(); aFont.SetColor(Color(COL_BLACK)); @@ -150,7 +150,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=aCatBox.GetEntry( 0)+String("www"); @@ -165,7 +165,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, GetOutputSizePixel().Height()-2*aTxtSize.Height()); aPrivatSplit.SetYRange(aYRange); SelHdl(&aCatBox); - bInit=TRUE; + bInit=sal_True; } /************************************************************************* @@ -205,10 +205,10 @@ __EXPORT ScFunctionDockWin::~ScFunctionDockWin() void ScFunctionDockWin::InitLRUList() { const ScAppOptions& rAppOpt = SC_MOD()->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 i; + sal_uInt16 i; for ( i=0; iGet( pLRUListIds[i] ); } - USHORT nSelPos = aCatBox.GetSelectEntryPos(); + sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos(); if(nSelPos == 0) UpdateFunctionList(); @@ -265,7 +265,7 @@ void ScFunctionDockWin::UpdateLRUList() void ScFunctionDockWin::SetSize() { - USHORT nSelEntry=0; + sal_uInt16 nSelEntry=0; SfxChildAlignment aChildAlign=eSfxOldAlignment;//GetAlignment(); short nNewDockMode; switch(aChildAlign) @@ -343,16 +343,16 @@ void ScFunctionDockWin::SetSize() void ScFunctionDockWin::SetLeftRightSize() { - if(bSizeFlag==FALSE) + if(bSizeFlag==sal_False) { - bSizeFlag=TRUE; + bSizeFlag=sal_True; Size aDiffSize=GetSizePixel(); Size aNewSize=GetOutputSizePixel(); aDiffSize.Width()-=aNewSize.Width(); aDiffSize.Height()-=aNewSize.Height(); - //@ SetUpdateMode( FALSE); + //@ SetUpdateMode( sal_False); String aString = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ww")); @@ -373,8 +373,8 @@ void ScFunctionDockWin::SetLeftRightSize() aNewSize.Width()+=aDiffSize.Width(); aNewSize.Height()+=aDiffSize.Height(); //SetSizePixel(aNewSize); - //@ SetUpdateMode( TRUE); - bSizeFlag=FALSE; + //@ SetUpdateMode( sal_True); + bSizeFlag=sal_False; } } @@ -395,9 +395,9 @@ void ScFunctionDockWin::SetLeftRightSize() void ScFunctionDockWin::SetTopBottonSize() { - if(bSizeFlag==FALSE) + if(bSizeFlag==sal_False) { - bSizeFlag=TRUE; + bSizeFlag=sal_True; Size aDiffSize=GetSizePixel(); Size aNewSize=GetOutputSizePixel(); aDiffSize.Width()-=aNewSize.Width(); @@ -409,8 +409,8 @@ void ScFunctionDockWin::SetTopBottonSize() aNewSize.Width()+=aDiffSize.Width(); aNewSize.Height()+=aDiffSize.Height(); //SetSizePixel(aNewSize); - //@ SetUpdateMode( TRUE); - bSizeFlag=FALSE; + //@ SetUpdateMode( sal_True); + bSizeFlag=sal_False; } } @@ -431,7 +431,7 @@ void ScFunctionDockWin::SetTopBottonSize() void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize) { - if((ULONG)aNewSize.Width()Execute( FID_FUNCTION_BOX, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, @@ -673,7 +673,7 @@ BOOL __EXPORT ScFunctionDockWin::Close() SfxDockingWindow::Close(); - return( TRUE ); + return( sal_True ); } @@ -703,7 +703,7 @@ SfxChildAlignment __EXPORT ScFunctionDockWin::CheckAlignment(SfxChildAlignment / } else { - bInit=FALSE; + bInit=sal_False; eSfxOldAlignment=aChildAlign; eSfxNewAlignment=aChildAlign; } @@ -815,12 +815,12 @@ void __EXPORT 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( sal_False ); if ( nSelPos > 0 ) { @@ -837,7 +837,7 @@ void ScFunctionDockWin::UpdateFunctionList() } else // LRU-Liste { - for ( USHORT i=0; iSetEntryData( @@ -848,7 +848,7 @@ void ScFunctionDockWin::UpdateFunctionList() //------------------------------------------------------ - pAllFuncList->SetUpdateMode( TRUE ); + pAllFuncList->SetUpdateMode( sal_True ); if ( pAllFuncList->GetEntryCount() > 0 ) { @@ -877,7 +877,7 @@ void ScFunctionDockWin::UpdateFunctionList() #* #************************************************************************/ -void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ??? +void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ??? { String aFirstArgStr; String aParaStr; @@ -919,8 +919,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) @@ -948,7 +948,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); @@ -957,7 +957,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ??? else { aString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" )); - pEdView->InsertText(aString,FALSE); + pEdView->InsertText(aString,sal_False); pHdl->DataChanged(); } } @@ -1030,7 +1030,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 } //... @@ -1133,10 +1133,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( aStr.ToInt32() ); + sal_uInt16 nSelPos=sal::static_int_cast( aStr.ToInt32() ); aCatBox.SelectEntryPos(nSelPos); SelHdl(&aCatBox); diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 2d9cdef1b54e..845bf1adfa5a 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(sal_True); pParentDoc = pMyViewFrm->GetObjectShell(); } } @@ -132,10 +132,10 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, if ( pInputHdl ) pInputHdl->NotifyChange( NULL ); - m_aHelper.enableInput( FALSE ); + m_aHelper.enableInput( sal_False ); m_aHelper.EnableSpreadsheets(); m_aHelper.Init(); - m_aHelper.SetDispatcherLock( TRUE ); + m_aHelper.SetDispatcherLock( sal_True ); notifyChange(); fill(); @@ -165,26 +165,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 = sal_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, sal_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 = sal_False; } if ( !bEdit ) @@ -197,12 +197,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,sal_False,sal_False); pData->SetFStart( 1 ); // hinter dem "=" } - pData->SetMode( (USHORT) eMode ); + pData->SetMode( (sal_uInt16) eMode ); String rStrExp = GetMeText(); pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp ); @@ -284,9 +284,9 @@ __EXPORT ScFormulaDlg::~ScFormulaDlg() delete pCell; } -BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) +sal_Bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) { - BOOL bAlive = FALSE; + sal_Bool bAlive = sal_False; // gehoert der InputHandler zu irgendeiner ViewShell ? @@ -295,7 +295,7 @@ BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) while ( pSh && !bAlive ) { if (((ScTabViewShell*)pSh)->GetInputHandler() == pHdl) - bAlive = TRUE; + bAlive = sal_True; pSh = SfxViewShell::GetNext( *pSh, &aScType ); } @@ -325,10 +325,10 @@ ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell,PtrTabVi } -BOOL __EXPORT ScFormulaDlg::Close() +sal_Bool __EXPORT ScFormulaDlg::Close() { - DoEnter(FALSE); - return TRUE; + DoEnter(sal_False); + return sal_True; } // -------------------------------------------------------------------------- @@ -336,7 +336,7 @@ BOOL __EXPORT ScFormulaDlg::Close() // -------------------------------------------------------------------------- bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; ::std::auto_ptr pFCell( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) ); @@ -344,7 +344,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? @@ -357,10 +357,10 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced ) ); } else - bColRowName = FALSE; + bColRowName = sal_False; } - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); if ( nErrCode == 0 ) { SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable()); @@ -368,7 +368,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 ); @@ -378,7 +378,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 ); @@ -409,7 +409,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 ); @@ -421,7 +421,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 ) { @@ -429,7 +429,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 @@ -452,7 +452,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } else { - USHORT nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() ) + sal_uInt16 nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() ) ? SCA_VALID : SCA_VALID | SCA_TAB_3D; rRef.Format( aRefStr, nFmt, pRefDoc, pRefDoc->GetAddressConvention() ); @@ -462,21 +462,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 sal_False; - return TRUE; // everything else is allowed + return sal_True; // everything else is allowed } void ScFormulaDlg::SetActive() @@ -498,7 +498,7 @@ void ScFormulaDlg::SaveLRUEntry(const ScFuncDesc* pFuncDescP) } } -void ScFormulaDlg::doClose(BOOL /*_bOk*/) +void ScFormulaDlg::doClose(sal_Bool /*_bOk*/) { m_aHelper.DoClose( ScFormulaDlgWrapper::GetChildWindowId() ); } @@ -515,7 +515,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); } @@ -527,10 +527,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 sal_False; } void ScFormulaDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton) { @@ -540,7 +540,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 ); @@ -549,9 +549,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( sal_False ); // sal_False = Cancel - m_aHelper.SetDispatcherLock( FALSE ); // Modal-Modus ausschalten + m_aHelper.SetDispatcherLock( sal_False ); // Modal-Modus ausschalten clear(); @@ -559,7 +559,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 a3b27ba21b1d..860b1bb23249 100644 --- a/sc/source/ui/formdlg/privsplt.cxx +++ b/sc/source/ui/formdlg/privsplt.cxx @@ -63,7 +63,7 @@ ScPrivatSplit::ScPrivatSplit( Window* pParent, const ResId& rResId, aWinPointer=GetPointer(); - aMovingFlag=FALSE; + aMovingFlag=sal_False; if(eScSplit==SC_SPLIT_HORZ) { aWinPointer=Pointer(POINTER_HSPLIT); @@ -349,7 +349,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(); @@ -388,17 +388,17 @@ void ScPrivatSplit::StateChanged( StateChangedType nType ) if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE, FALSE ); + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } @@ -412,7 +412,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/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx index 70731ac8a1f7..ffd86491da5d 100644 --- a/sc/source/ui/inc/IAnyRefDialog.hxx +++ b/sc/source/ui/inc/IAnyRefDialog.hxx @@ -44,18 +44,18 @@ public: virtual ~IAnyRefDialog(){} //virtual void ShowReference(const String& _sRef) = 0; - //virtual void HideReference( BOOL bDoneRefMode = TRUE ) = 0; + //virtual void HideReference( sal_Bool bDoneRefMode = sal_True ) = 0; //virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0; //virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0; 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 = sal_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 a077129c374c..16e3117c7cd3 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -114,10 +114,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; @@ -160,15 +160,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(); @@ -198,51 +198,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=sal_False, + sal_Bool bDisabled=sal_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=sal_False, + sal_Bool bDisabled=sal_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=sal_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 62f7bfd865e7..ecbeed14ef42 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -72,7 +72,7 @@ class ScFormulaReferenceHelper SfxBindings* m_pBindings; ::std::auto_ptr 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 @@ -81,9 +81,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* ); @@ -98,24 +98,24 @@ 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 = sal_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); //Added by PengYunQuan for Validity Cell Range Picker }; @@ -225,12 +225,12 @@ private: template template ScRefHdlrImplBase::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW, - TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast( nResId ) ) ), ScRefHandler( *static_cast(this), pB, bBindRef ){} + TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast( nResId ) ) ), ScRefHandler( *static_cast(this), pB, bBindRef ){} template template ScRefHdlrImplBase::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ ) -:TWindow( pParent, ScResId(static_cast( nResIdP )), rArg ), ScRefHandler( *static_cast(this), pB, bBindRef ){} +:TWindow( pParent, ScResId(static_cast( nResIdP )), rArg ), ScRefHandler( *static_cast(this), pB, bBindRef ){} template ScRefHdlrImplBase::~ScRefHdlrImplBase(){} @@ -244,12 +244,12 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase template ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase(rt1, rt2, rt3, rt4 ) { - SC_MOD()->RegisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); + SC_MOD()->RegisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); } ~ScRefHdlrImpl() { - SC_MOD()->UnregisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); + SC_MOD()->UnregisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); } }; //============================================================================ @@ -265,7 +265,7 @@ inline bool ScRefHandler::CanInputStart( const ScRefEdit *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 608f95a3bb51..115a4f739363 100644 --- a/sc/source/ui/inc/areasave.hxx +++ b/sc/source/ui/inc/areasave.hxx @@ -44,7 +44,7 @@ private: String aOptions; String aSourceArea; ScRange aDestArea; - ULONG nRefresh; + sal_uLong nRefresh; public: ScAreaLinkSaver( const ScAreaLink& rSource ); @@ -53,8 +53,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; @@ -70,9 +70,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 08c6e3cf0a91..c5e0e4cde789 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -55,11 +55,11 @@ 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; @@ -81,7 +81,7 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; formula::RefEdit* pRefInputEdit; ScDocument* pDoc; ScViewData* pViewData; @@ -90,9 +90,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 a5c7a2b554b4..a8bd1dfa81ee 100644 --- a/sc/source/ui/inc/asciiopt.hxx +++ b/sc/source/ui/inc/asciiopt.hxx @@ -59,19 +59,19 @@ class 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(); @@ -82,7 +82,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; @@ -90,31 +90,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 ); }; @@ -124,13 +124,13 @@ public: //CHINA001 class ScImportAsciiDlg : public ModalDialog //CHINA001 { //CHINA001 SvStream* pDatStream; -//CHINA001 ULONG* pRowPosArray; -//CHINA001 ULONG* pRowPosArrayUnicode; -//CHINA001 USHORT nArrayEndPos; -//CHINA001 USHORT nArrayEndPosUnicode; -//CHINA001 ULONG nStreamPos; -//CHINA001 ULONG nStreamPosUnicode; -//CHINA001 BOOL bVFlag; +//CHINA001 sal_uLong* pRowPosArray; +//CHINA001 sal_uLong* pRowPosArrayUnicode; +//CHINA001 sal_uInt16 nArrayEndPos; +//CHINA001 sal_uInt16 nArrayEndPosUnicode; +//CHINA001 sal_uLong nStreamPos; +//CHINA001 sal_uLong nStreamPosUnicode; +//CHINA001 sal_Bool bVFlag; //CHINA001 //CHINA001 FixedLine aFlFieldOpt; //CHINA001 FixedText aFtCharSet; diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx index 752ee01ddd62..de95dfcdaa2c 100644 --- a/sc/source/ui/inc/attrdlg.hxx +++ b/sc/source/ui/inc/attrdlg.hxx @@ -54,7 +54,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 75059f4f88cc..d396857930f8 100644 --- a/sc/source/ui/inc/auditsh.hxx +++ b/sc/source/ui/inc/auditsh.hxx @@ -39,7 +39,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 52a033c202b2..6ea0f6c7f358 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -75,7 +75,7 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; //CHINA001 ScDocument* pDoc ); //CHINA001 ~ScAutoFormatDlg(); //CHINA001 -//CHINA001 USHORT GetIndex() const { return nIndex; } +//CHINA001 sal_uInt16 GetIndex() const { return nIndex; } //CHINA001 String GetCurrFormatName(); //CHINA001 //CHINA001 private: @@ -106,9 +106,9 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; //CHINA001 //------------------------ //CHINA001 ScAutoFormat* pFormat; //CHINA001 const ScAutoFormatData* pSelFmtData; -//CHINA001 USHORT nIndex; -//CHINA001 BOOL bCoreDataChanged; -//CHINA001 BOOL bFmtInserted; +//CHINA001 sal_uInt16 nIndex; +//CHINA001 sal_Bool bCoreDataChanged; +//CHINA001 sal_Bool bFmtInserted; //CHINA001 //CHINA001 void Init (); //CHINA001 void UpdateChecks (); @@ -141,7 +141,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; @@ -160,7 +160,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 (); @@ -168,7 +168,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; @@ -176,26 +176,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 5540ecf87aac..3423876f0616 100644 --- a/sc/source/ui/inc/autostyl.hxx +++ b/sc/source/ui/inc/autostyl.hxx @@ -41,13 +41,13 @@ private: ScDocShell* pDocSh; Timer aTimer; Timer aInitTimer; - ULONG nTimerStart; + sal_uLong nTimerStart; List aEntries; List 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* ); @@ -56,8 +56,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 8de5dafe7768..a6e37137f62c 100644 --- a/sc/source/ui/inc/cbutton.hxx +++ b/sc/source/ui/inc/cbutton.hxx @@ -48,16 +48,16 @@ public: void Draw( const Point& rAt, const Size& rSize, - BOOL bState, - BOOL bBtnIn = FALSE ); + sal_Bool bState, + sal_Bool bBtnIn = sal_False ); void Draw( const Point& rAt, - BOOL bState, - BOOL bBtnIn = FALSE ) + sal_Bool bState, + sal_Bool bBtnIn = sal_False ) { Draw( rAt, aBtnSize, bState, bBtnIn ); } - void Draw( BOOL bState, - BOOL bBtnIn = FALSE ) + void Draw( sal_Bool bState, + sal_Bool bBtnIn = sal_False ) { Draw( aBtnPos, aBtnSize, bState, bBtnIn ); } void SetOptSizePixel(); @@ -70,7 +70,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 563e18d96656..113574297368 100644 --- a/sc/source/ui/inc/cellsh.hxx +++ b/sc/source/ui/inc/cellsh.hxx @@ -57,12 +57,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 ); DECL_LINK( ClipboardChanged, TransferableDataHelper* ); DECL_LINK( DialogClosed, AbstractScLinkedAreaDlg* ); diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx index 587412defea2..5616817b3679 100644 --- a/sc/source/ui/inc/colrowba.hxx +++ b/sc/source/ui/inc/colrowba.hxx @@ -50,24 +50,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; }; @@ -84,19 +84,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.hxx b/sc/source/ui/inc/condfrmt.hxx index ecd4c529d57a..3909792d753d 100644 --- a/sc/source/ui/inc/condfrmt.hxx +++ b/sc/source/ui/inc/condfrmt.hxx @@ -53,9 +53,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; @@ -125,7 +125,7 @@ private: Size aCond3Size3; 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 faeecb370c78..342de87f7bbe 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -49,7 +49,7 @@ enum ScConflictAction SC_CONFLICT_ACTION_KEEP_OTHER }; -typedef ::std::vector< ULONG > ScChangeActionList; +typedef ::std::vector< sal_uLong > ScChangeActionList; //============================================================================= @@ -62,8 +62,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; }; @@ -82,11 +82,11 @@ private: static void Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap ); public: -//UNUSED2008-05 static bool HasSharedAction( ScConflictsList& rConflictsList, ULONG nSharedAction ); - static bool HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction ); +//UNUSED2008-05 static bool HasSharedAction( ScConflictsList& rConflictsList, sal_uLong nSharedAction ); + 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(); @@ -152,7 +152,7 @@ public: ScConflictsListBox( Window* pParent, const ResId& rResId ); ~ScConflictsListBox(); -//UNUSED2008-05 ULONG GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const; +//UNUSED2008-05 sal_uLong GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const; }; //============================================================================= diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index e82e2619cce0..fc53a377420d 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -60,10 +60,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(); @@ -107,17 +107,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* ); @@ -125,8 +125,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 b7d4d292c406..1e775345d42e 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -50,7 +50,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 ImageList aEntryImages; ImageList aHCEntryImages; 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(); //UNUSED2008-05 void AdjustTitle(); @@ -118,8 +118,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; @@ -138,18 +138,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; } @@ -159,7 +159,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 424326565619..0d7d68913a61 100644 --- a/sc/source/ui/inc/corodlg.hxx +++ b/sc/source/ui/inc/corodlg.hxx @@ -47,8 +47,8 @@ class ScColRowLabelDlg : public ModalDialog { public: ScColRowLabelDlg( Window* pParent, - BOOL bCol = FALSE, - BOOL bRow = FALSE ) + sal_Bool bCol = sal_False, + sal_Bool bRow = sal_False ) : ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ), aFlColRow ( this, ScResId(6) ), aBtnRow ( this, ScResId(2) ), @@ -62,8 +62,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 77d844d161b3..6b920c31afa6 100644 --- a/sc/source/ui/inc/crdlg.hxx +++ b/sc/source/ui/inc/crdlg.hxx @@ -45,7 +45,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 e45ff4403633..cfb859b82895 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -50,9 +50,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; @@ -83,15 +83,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=sal_False); + void AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef=sal_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 52be4b4ebd8c..0ae09022d3f7 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -77,7 +77,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 ); @@ -89,7 +89,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 ); @@ -150,7 +150,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 07659b1dbc59..4222bc0bfec6 100644 --- a/sc/source/ui/inc/dapitype.hxx +++ b/sc/source/ui/inc/dapitype.hxx @@ -51,11 +51,11 @@ private: HelpButton aBtnHelp; public: - ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ); + ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ); ~ScDataPilotSourceTypeDlg(); - BOOL IsDatabase() const; - BOOL IsExternal() const; + sal_Bool IsDatabase() const; + sal_Bool IsExternal() const; }; diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx index efdd29b44738..c443be157f8c 100644 --- a/sc/source/ui/inc/dbdocfun.hxx +++ b/sc/source/ui/inc/dbdocfun.hxx @@ -81,42 +81,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 = sal_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 = sal_False ); }; diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index baadae0a64dc..46d12646f13f 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -58,40 +58,40 @@ 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 ); + ScDBData* GetDBData( sal_Bool bMarkArea = sal_True, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP ); 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 = sal_False ); void DeletePivotTable(); // Wang Xu Ming -- 2009-6-17 // DataPilot Migration - ULONG RecalcPivotTable(); + sal_uLong RecalcPivotTable(); // End Comments - 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 ); @@ -99,35 +99,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 = sal_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 cd878c651d6c..604a9b828984 100644 --- a/sc/source/ui/inc/dbnamdlg.hxx +++ b/sc/source/ui/inc/dbnamdlg.hxx @@ -58,9 +58,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; @@ -85,7 +85,7 @@ private: PushButton aBtnRemove; MoreButton aBtnMore; - BOOL bSaved; + sal_Bool bSaved; const String aStrAdd; // "Hinzufuegen" @@ -98,7 +98,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 ae5cb565b4e7..d3a07ffcc482 100644 --- a/sc/source/ui/inc/delcldlg.hxx +++ b/sc/source/ui/inc/delcldlg.hxx @@ -52,7 +52,7 @@ private: public: - ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove = FALSE ); + ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove = sal_False ); ~ScDeleteCellDlg(); DelCellCmd GetDelCellCmd() const; diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx index 3991184d7c5e..7491dfab0e27 100644 --- a/sc/source/ui/inc/delcodlg.hxx +++ b/sc/source/ui/inc/delcodlg.hxx @@ -51,21 +51,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 e36e1a9af92f..7424f03e138d 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -53,11 +53,11 @@ class ScDocFunc private: ScDocShell& rDocShell; - BOOL AdjustRowHeight( const ScRange& rRange, BOOL bPaint = TRUE ); + sal_Bool AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint = sal_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: @@ -66,27 +66,27 @@ 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); - - BOOL DeleteContents( const ScMarkData& rMark, USHORT nFlags, - BOOL bRecord, BOOL bApi ); - - BOOL TransliterateText( const ScMarkData& rMark, sal_Int32 nType, - BOOL bRecord, 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 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 = sal_False); + + sal_Bool DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, + sal_Bool bRecord, sal_Bool bApi ); + + sal_Bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType, + sal_Bool bRecord, sal_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 ); @@ -98,90 +98,90 @@ 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 = sal_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 ); -//UNUSED2009-05 BOOL SetGrammar( formula::FormulaGrammar::Grammar eGrammar ); +//UNUSED2009-05 sal_Bool SetGrammar( formula::FormulaGrammar::Grammar eGrammar ); - 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 - 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 ScRange& rRange, BOOL bContents, - BOOL bRecord, BOOL bApi ); - BOOL UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ); + sal_Bool MergeCells( const ScRange& rRange, sal_Bool bContents, + sal_Bool bRecord, sal_Bool bApi ); + sal_Bool UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ); - BOOL SetNewRangeNames( ScRangeName* pNewRanges, BOOL bApi ); // takes ownership of pNewRanges - BOOL ModifyRangeNames( const ScRangeName& rNewRanges, BOOL bApi ); + sal_Bool SetNewRangeNames( ScRangeName* pNewRanges, sal_Bool bApi ); // takes ownership of pNewRanges + sal_Bool ModifyRangeNames( const ScRangeName& rNewRanges, sal_Bool bApi ); - 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 19147cfaf61f..03a086223742 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -72,7 +72,7 @@ class ScSheetSaveData; namespace sfx2 { class FileDialogHelper; } struct DocShell_Impl; -typedef ::std::hash_map< ULONG, ULONG > ScChangeActionMergeMap; +typedef ::std::hash_map< sal_uLong, sal_uLong > ScChangeActionMergeMap; //================================================================== @@ -100,16 +100,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; @@ -143,23 +143,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, - BOOL bSimpleColWidth[MAXCOLCOUNT] ); - SC_DLLPRIVATE ULONG DBaseExport( const String& rFullFileName, CharSet eCharSet, - BOOL& bHasMemo ); + SC_DLLPRIVATE sal_uLong DBaseImport( const String& rFullFileName, CharSet eCharSet, + sal_Bool bSimpleColWidth[MAXCOLCOUNT] ); + 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(); @@ -181,8 +181,8 @@ 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(); @@ -198,38 +198,38 @@ public: 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 ); + 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 = sal_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 ); @@ -239,8 +239,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(); @@ -259,59 +259,59 @@ 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 if /// protection was successfully changed. - /// If bJustQueryIfProtected==TRUE protection is not + /// If bJustQueryIfProtected==sal_True protection is not /// changed and 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 = sal_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 ); - BOOL MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord ); + const Color& rColor, sal_uInt16 nFlags ); + 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 ); + sal_Bool bForceSelected, sal_Bool bIsAPI ); - void UpdateOle( const ScViewData* pViewData, BOOL bSnapSize = FALSE ); - BOOL IsOle(); + void UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize = sal_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 ); @@ -319,14 +319,14 @@ public: void CancelAutoDBRange(); // called when dialog is cancelled void UpdateLinks(); // Link-Eintraege aktuallisieren - BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren) + sal_Bool ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren) 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 ); @@ -335,17 +335,17 @@ public: 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(); @@ -354,19 +354,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 ); @@ -378,17 +378,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... @@ -396,7 +396,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(); @@ -404,7 +404,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* ); @@ -448,8 +448,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 25cb3e05acac..c3da78d9b91a 100644 --- a/sc/source/ui/inc/dpcontrol.hxx +++ b/sc/source/ui/inc/dpcontrol.hxx @@ -114,7 +114,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 d417d1427dda..433d46100de9 100644 --- a/sc/source/ui/inc/drawsh.hxx +++ b/sc/source/ui/inc/drawsh.hxx @@ -78,13 +78,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 fa6b03638551..7112fbacddf9 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -48,7 +48,7 @@ class ScDrawView: public FmFormView Fraction aScaleY; SdrDropMarkerOverlay* pDropMarker; SdrObject* pDropMarkObj; - BOOL bInConstruct; + sal_Bool bInConstruct; //HMHBOOL bDisableHdl; void Construct(); @@ -81,12 +81,12 @@ public: //HMHBOOL IsDisableHdl() const { return bDisableHdl; } - 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(); @@ -105,17 +105,17 @@ 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 ); //UNUSED2008-05 String GetSelectedChartName() const; bool HasMarkedControl() const; bool HasMarkedInternal() const; - FASTBOOL InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0); + FASTBOOL 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. */ @@ -140,7 +140,7 @@ public: inline void UnlockInternalLayer() { LockInternalLayer( false ); } SdrEndTextEditKind ScEndTextEdit(); // ruft SetDrawTextUndo(0) -//UNUSED2009-05 void CaptionTextDirection(USHORT nSlot); +//UNUSED2009-05 void CaptionTextDirection(sal_uInt16 nSlot); ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CopyToTransferable(); }; diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx index 5c493df2f769..332d28b89c9f 100644 --- a/sc/source/ui/inc/drtxtob.hxx +++ b/sc/source/ui/inc/drtxtob.hxx @@ -37,7 +37,7 @@ #include "shellids.hxx" -USHORT ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId() +sal_uInt16 ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId() class ScViewData; class TransferableDataHelper; @@ -47,7 +47,7 @@ class ScDrawTextObjectBar : public SfxShell { ScViewData* pViewData; TransferableClipboardListener* pClipEvtLstnr; - BOOL bPastePossible; + sal_Bool bPastePossible; DECL_LINK( ClipboardChanged, TransferableDataHelper* ); @@ -69,8 +69,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 @@ -80,7 +80,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 9a1175d3310d..157c0d01fa81 100644 --- a/sc/source/ui/inc/drwtrans.hxx +++ b/sc/source/ui/inc/drwtrans.hxx @@ -58,14 +58,14 @@ 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; @@ -91,11 +91,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; } diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index 5d23172f7d8c..f308c2815113 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -60,7 +60,7 @@ class ScFunctionChildWindow : public SfxChildWindow { public: - ScFunctionChildWindow( Window*, USHORT, SfxBindings*, + ScFunctionChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); SFX_DECL_CHILDWINDOW(ScFunctionChildWindow); @@ -87,17 +87,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; @@ -105,7 +105,7 @@ private: void UpdateFunctionList(); void UpdateLRUList(); - void DoEnter(BOOL bOk); //@@ ??? + void DoEnter(sal_Bool bOk); //@@ ??? void SetDescription(); void SetLeftRightSize(); void SetTopBottonSize(); @@ -122,7 +122,7 @@ private: protected: - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void Resize(); virtual void Resizing( Size& rSize ); virtual void SetSize(); @@ -144,7 +144,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 4b6e8d0596bc..d2f7487edef2 100644 --- a/sc/source/ui/inc/editable.hxx +++ b/sc/source/ui/inc/editable.hxx @@ -39,8 +39,8 @@ class ScRange; class ScEditableTester { - BOOL bIsEditable; - BOOL bOnlyMatrix; + sal_Bool bIsEditable; + sal_Bool bOnlyMatrix; public: // no test in ctor @@ -77,9 +77,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 ebada82a32fb..3c1792c3333b 100644 --- a/sc/source/ui/inc/editsh.hxx +++ b/sc/source/ui/inc/editsh.hxx @@ -48,8 +48,8 @@ private: EditView* pEditView; ScViewData* pViewData; TransferableClipboardListener* pClipEvtLstnr; - BOOL bPastePossible; - BOOL bIsInsertMode; + sal_Bool bPastePossible; + sal_Bool bIsInsertMode; const SvxURLField* GetURLField(); ScInputHandler* GetMyInputHdl(); @@ -77,7 +77,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 old mode 100755 new mode 100644 index 539dbe54e275..5c74777edf47 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -98,11 +98,11 @@ private: FieldString& rText, bool bFocus ); - /** @return TRUE, if the field index is inside of the control area. */ + /** @return sal_True, if the field index is inside of the control area. */ bool IsValidIndex( size_t nIndex ) const; - /** @return TRUE, if the field with the given index exists. */ + /** @return sal_True, if the field with the given index exists. */ bool IsExistingIndex( size_t nIndex ) const; - /** @return TRUE, if the field with the given index exists and the text is + /** @return sal_True, if the field with the given index exists and the text is too long for the button control. */ bool IsShortenedText( size_t nIndex ) const; /** @return The new selection index after moving to the given direction. */ @@ -115,7 +115,7 @@ private: /** Sets selection to last field. */ void SetSelectionEnd(); /** Sets selection to new position relative to current. */ - void MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY ); + void MoveSelection( sal_uInt16 nKeyCode, SCsCOL nDX, SCsROW nDY ); /** Moves the selected field to nDestIndex. */ void MoveField( size_t nDestIndex ); @@ -183,16 +183,16 @@ public: /** Inserts a field using the specified pixel position. @param rPos The coordinates to insert the field. @param rnIndex The new index of the field is returned here. - @return TRUE, if the field has been created. */ + @return sal_True, if the field has been created. */ bool AddField( const String& rText, const Point& rPos, size_t& rnIndex ); /** Calculates the field index at a specific pixel position. @param rnIndex The index of the field is returned here. - @return TRUE, if the index value is valid. */ + @return sal_True, if the index value is valid. */ bool GetFieldIndex( const Point& rPos, size_t& rnIndex ) const; /** Calculates a field index at a specific pixel position. Returns in every case the index of an existing field. @param rnIndex The index of the field is returned here. - @return TRUE, if the index value is valid. */ + @return sal_True, if the index value is valid. */ void GetExistingIndex( const Point& rPos, size_t& rnIndex ); /** Notifies this control that the offset of the first field has been changed. diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx index 7f2fb046093c..2bdc42b90881 100644 --- a/sc/source/ui/inc/filldlg.hxx +++ b/sc/source/ui/inc/filldlg.hxx @@ -64,7 +64,7 @@ public: String aStartStr, double fStep, double fMax, - USHORT nPossDir ); + sal_uInt16 nPossDir ); ~ScFillSeriesDlg(); FillDir GetFillDir() const { return theFillDir; } @@ -76,7 +76,7 @@ public: String GetStartStr() const { return aEdStartVal.GetText(); } - void SetEdStartValEnabled(BOOL bFlag=FALSE); + void SetEdStartValEnabled(sal_Bool bFlag=sal_False); private: FixedLine aFlDirection; @@ -99,7 +99,7 @@ private: RadioButton aBtnMonth; RadioButton aBtnYear; - BOOL bStartValFlag; + sal_Bool bStartValFlag; FixedText aFtStartVal; Edit aEdStartVal; String aStartStrVal; @@ -128,10 +128,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 31e0e3a5d4b1..885a5b68e7e2 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -99,13 +99,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; @@ -153,7 +153,7 @@ private: ScFilterOptionsMgr* pOptionsMgr; - const USHORT nWhichQuery; + const sal_uInt16 nWhichQuery; const ScQueryParam theQueryData; ScQueryItem* pOutItem; ScViewData* pViewData; @@ -165,12 +165,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; @@ -180,10 +180,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: @@ -210,10 +210,10 @@ 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; @@ -232,14 +232,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 92e3833dff7d..d72679a47ca2 100644 --- a/sc/source/ui/inc/foptmgr.hxx +++ b/sc/source/ui/inc/foptmgr.hxx @@ -79,7 +79,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 f863662f7cd0..18b8fa24c6a4 100644 --- a/sc/source/ui/inc/formula.hxx +++ b/sc/source/ui/inc/formula.hxx @@ -83,11 +83,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(); @@ -104,31 +104,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 = sal_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 686f2a00ae5b..e643b92397e9 100644 --- a/sc/source/ui/inc/fuconarc.hxx +++ b/sc/source/ui/inc/fuconarc.hxx @@ -44,10 +44,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 e6ecbfb2e2c3..3980bfef7b3f 100644 --- a/sc/source/ui/inc/fuconcustomshape.hxx +++ b/sc/source/ui/inc/fuconcustomshape.hxx @@ -42,10 +42,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 3a27ffcc2f69..ef82acdf3b04 100644 --- a/sc/source/ui/inc/fuconpol.hxx +++ b/sc/source/ui/inc/fuconpol.hxx @@ -46,10 +46,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 fb609e4a7681..e98c823e0d15 100644 --- a/sc/source/ui/inc/fuconrec.hxx +++ b/sc/source/ui/inc/fuconrec.hxx @@ -44,10 +44,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 28b20c7a94df..994aa1ac48b2 100644 --- a/sc/source/ui/inc/fuconstr.hxx +++ b/sc/source/ui/inc/fuconstr.hxx @@ -50,13 +50,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 ffe2c1e9722b..de3fcb4a5f65 100644 --- a/sc/source/ui/inc/fuconuno.hxx +++ b/sc/source/ui/inc/fuconuno.hxx @@ -40,8 +40,8 @@ class FuConstUnoControl : public FuConstruct { protected: - UINT32 nInventor; - UINT16 nIdentifier; + sal_uInt32 nInventor; + sal_uInt16 nIdentifier; public: FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView, @@ -49,10 +49,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 2344ca629c2f..80b33dca50e9 100644 --- a/sc/source/ui/inc/fudraw.hxx +++ b/sc/source/ui/inc/fudraw.hxx @@ -48,7 +48,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(); @@ -58,14 +58,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); // #97016# 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 5138a134cc2e..fe54e7027426 100644 --- a/sc/source/ui/inc/fuedipo.hxx +++ b/sc/source/ui/inc/fuedipo.hxx @@ -45,10 +45,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 fcadc54768e8..8156656fe794 100644 --- a/sc/source/ui/inc/fumark.hxx +++ b/sc/source/ui/inc/fumark.hxx @@ -43,8 +43,8 @@ class FuMarkRect : public FuPoor protected: Point aBeginPos; Rectangle aZoomRect; - BOOL bVisible; - BOOL bStartDrag; + sal_Bool bVisible; + sal_Bool bStartDrag; ScRangeListRef aSourceRange; public: @@ -52,7 +52,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(); @@ -62,10 +62,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 d8b5c7796971..224e5e19d850 100644 --- a/sc/source/ui/inc/funcpage.hxx +++ b/sc/source/ui/inc/funcpage.hxx @@ -104,15 +104,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 715c9d36a101..084cc6271700 100644 --- a/sc/source/ui/inc/funcutl.hxx +++ b/sc/source/ui/inc/funcutl.hxx @@ -67,7 +67,7 @@ private: MultiLineEdit* pMEdit; Link aSelChangedLink; Selection aOldSel; - BOOL bMouseFlag; + sal_Bool bMouseFlag; DECL_LINK( ChangedHdl, ScEditBox* ); protected: @@ -102,7 +102,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 ); @@ -111,7 +111,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 6d9b7ae2af5a..3f41c9f15535 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -70,7 +70,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 // #95491# member to hold state of the mouse buttons for creation @@ -94,16 +94,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 sal_False; } // #95491# moved from inline to *.cxx - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; } + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); // { return sal_False; } // #95491# moved from inline to *.cxx - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; } + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); // { return sal_False; } - virtual BYTE Command(const CommandEvent& rCEvt); + virtual sal_uInt8 Command(const CommandEvent& rCEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren @@ -113,9 +113,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 c12b5739d61c..8dae89c71b63 100644 --- a/sc/source/ui/inc/fusel.hxx +++ b/sc/source/ui/inc/fusel.hxx @@ -52,11 +52,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 @@ -66,10 +66,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 41a41b054554..b25d4792b755 100644 --- a/sc/source/ui/inc/futext.hxx +++ b/sc/source/ui/inc/futext.hxx @@ -42,7 +42,7 @@ class SdrOutliner; class FuText : public FuConstruct { protected: -// USHORT nOldObjectBar; +// sal_uInt16 nOldObjectBar; SdrTextObj* pTextObj; public: @@ -51,10 +51,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 @@ -64,8 +64,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 = sal_False, const KeyEvent* pInitialKey = NULL ); + void StopEditMode(sal_Bool bTextDirection = sal_False); void StopDragMode(SdrObject* pObject); // #98185# Create default drawing objects via keyboard diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx index dd656b948a6b..3f0fae61b658 100644 --- a/sc/source/ui/inc/gridmerg.hxx +++ b/sc/source/ui/inc/gridmerg.hxx @@ -43,8 +43,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 a2283bf2b7de..aad45058de2c 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -145,61 +145,61 @@ private: ::std::auto_ptr mpDPFieldPopup; ::std::auto_ptr 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; @@ -207,15 +207,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. @@ -227,24 +227,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 ); @@ -253,42 +253,42 @@ 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 DrawStartTimer(); - void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer ); + void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer ); void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev ); - //BOOL DrawBeforeScroll(); - void DrawAfterScroll(/*BOOL bVal*/); + //sal_Bool DrawBeforeScroll(); + void DrawAfterScroll(/*sal_Bool bVal*/); //void DrawMarks(); - //BOOL NeedDrawMarks(); + //sal_Bool NeedDrawMarks(); void DrawComboButton( const Point& rCellPos, long nCellSizeX, long nCellSizeY, - BOOL bArrowState, - BOOL bBtnIn = FALSE ); + sal_Bool bArrowState, + sal_Bool bBtnIn = sal_False ); 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 ); @@ -347,7 +347,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 ); @@ -363,7 +363,7 @@ 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 = sal_False, sal_Bool bRepeat = sal_False ); //UNUSED2008-05 void DrawDragRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); @@ -373,21 +373,21 @@ public: void ShowCursor(); void DrawCursor(); void DrawAutoFillMark(); - 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 = sal_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 03f05ab0705d..7dc0d6aad615 100644 --- a/sc/source/ui/inc/groupdlg.hxx +++ b/sc/source/ui/inc/groupdlg.hxx @@ -39,12 +39,12 @@ class ScGroupDlg : public ModalDialog { public: ScGroupDlg( Window* pParent, - USHORT nResId, - BOOL bUnGroup = FALSE, - BOOL bRows = TRUE ); + sal_uInt16 nResId, + sal_Bool bUnGroup = sal_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 ec4dd49705d1..4c7140b23eb2 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -52,10 +52,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; @@ -65,18 +65,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(); @@ -99,20 +99,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 ); @@ -120,14 +120,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 1f1ea7242b17..67a9868952e2 100644 --- a/sc/source/ui/inc/hfedtdlg.hxx +++ b/sc/source/ui/inc/hfedtdlg.hxx @@ -45,11 +45,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 b500473b2071..b0699f7f5b5a 100644 --- a/sc/source/ui/inc/highred.hxx +++ b/sc/source/ui/inc/highred.hxx @@ -104,7 +104,7 @@ private: protected: - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); public: ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, @@ -114,8 +114,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 6182d30dc96e..ed4d66b79408 100644 --- a/sc/source/ui/inc/hiranges.hxx +++ b/sc/source/ui/inc/hiranges.hxx @@ -51,9 +51,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 d959069c46b6..eba954ee76ea 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -44,19 +44,19 @@ class SC_DLLPUBLIC ScImportOptions public: ScImportOptions() : nFieldSepCode(0), nTextSepCode(0), - eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(FALSE), - bSaveAsShown(FALSE) + eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(sal_False), + bSaveAsShown(sal_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(sal_False), bSaveAsShown(sal_False) { eCharSet = ScGlobal::GetCharsetValue(aStrFont); } ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), - bFixedWidth(FALSE), bSaveAsShown(FALSE) + bFixedWidth(sal_False), bSaveAsShown(sal_False) { SetTextEncoding( nEnc ); } ScImportOptions( const ScImportOptions& rCpy ) @@ -79,7 +79,7 @@ public: return *this; } - BOOL operator==( const ScImportOptions& rCmp ) + sal_Bool operator==( const ScImportOptions& rCmp ) { return nFieldSepCode == rCmp.nFieldSepCode @@ -97,8 +97,8 @@ public: sal_Unicode nTextSepCode; String aStrFont; CharSet eCharSet; - BOOL bFixedWidth; - BOOL bSaveAsShown; + sal_Bool bFixedWidth; + sal_Bool bSaveAsShown; }; diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index 86a91216edcc..25b33b525362 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -58,33 +58,33 @@ class 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 @@ -95,22 +95,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 = sal_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 ); @@ -119,29 +119,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; } @@ -153,7 +153,7 @@ public: // static -inline BOOL ScImportExport::IsEndianSwap( const SvStream& rStrm ) +inline sal_Bool ScImportExport::IsEndianSwap( const SvStream& rStrm ) { #ifdef OSL_BIGENDIAN return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN; @@ -182,7 +182,7 @@ public: rStr.getLength() * sizeof(sal_Unicode), STREAM_READ) { SetStreamCharSet( RTL_TEXTENCODING_UNICODE ); - SetEndianSwap( FALSE ); + SetEndianSwap( sal_False ); } }; diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index f3eba8b26f6b..8291877bbc57 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -69,38 +69,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 @@ -111,21 +111,21 @@ 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: void UpdateActiveView(); void SyncViews( EditView* pSourceView = NULL ); - BOOL StartTable( sal_Unicode cTyped, BOOL bFromCommand ); + sal_Bool StartTable( sal_Unicode cTyped, sal_Bool bFromCommand ); void RemoveSelection(); void UpdateFormulaMode(); void InvalidateAttribs(); @@ -133,11 +133,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(); @@ -148,7 +148,7 @@ private: void UpdateAutoCorrFlag(); void ResetAutoPar(); void AutoParAdded(); - BOOL CursorAtClosingPar(); + sal_Bool CursorAtClosingPar(); void SkipClosingPar(); DECL_LINK( ModifyHdl, void* ); DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* ); @@ -160,39 +160,39 @@ 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; } const ScAddress& GetCursorPos() const { return aCursorPos; } - BOOL GetTextAndFields( ScEditEngineDefaulter& rDestEngine ); + sal_Bool GetTextAndFields( ScEditEngineDefaulter& rDestEngine ); - BOOL KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit = FALSE ); - void EnterHandler( BYTE nBlockMode = 0 ); + sal_Bool KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit = sal_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 = sal_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 = sal_False, ScTabViewShell* pSourceSh = NULL, - BOOL bStopEditing = TRUE); + sal_Bool bStopEditing = sal_True); void UpdateCellAdjust( SvxCellHorJustify eJust ); void ResetDelayTimer(); //BugId 54702 @@ -210,21 +210,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 = sal_False ); + void DataChanged( sal_Bool bFromTopNotify = sal_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 ); @@ -232,19 +232,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 = sal_False ); void FormulaPreview(); @@ -253,7 +253,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 236d34a8254f..60a6896cf696 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -55,18 +55,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(); @@ -103,13 +103,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; }; //======================================================================== @@ -119,16 +119,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(); @@ -158,17 +158,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(); //UNUSED2008-05 EditView* ActivateEdit( const String& rText, //UNUSED2008-05 const ESelection& rSel ); @@ -182,7 +182,7 @@ public: // Fuer FunktionsAutopiloten void MakeDialogEditView(); - void StopEditEngine( BOOL bAll ); + void StopEditEngine( sal_Bool bAll ); void SetInputHandler( ScInputHandler* pNew ); @@ -207,7 +207,7 @@ private: String aTextCancel; String aTextSum; String aTextEqual; - BOOL bIsOkCancelMode; + sal_Bool bIsOkCancelMode; }; //================================================================== @@ -216,7 +216,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 110c914f294c..e4b0d2b9d03e 100644 --- a/sc/source/ui/inc/inscldlg.hxx +++ b/sc/source/ui/inc/inscldlg.hxx @@ -50,7 +50,7 @@ private: HelpButton aBtnHelp; public: - ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove = FALSE ); + ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = sal_False ); ~ScInsertCellDlg(); InsCellCmd GetInsCellCmd() const; diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx index cf8008809d52..debd448c422f 100644 --- a/sc/source/ui/inc/inscodlg.hxx +++ b/sc/source/ui/inc/inscodlg.hxx @@ -46,20 +46,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: @@ -96,19 +96,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 660d16b62cca..73e07f0d79fc 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -73,13 +73,13 @@ 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: @@ -109,7 +109,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 fa288c609070..7ee7de254414 100644 --- a/sc/source/ui/inc/lbseldlg.hxx +++ b/sc/source/ui/inc/lbseldlg.hxx @@ -54,14 +54,14 @@ private: public: ScSelEntryDlg( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const String& aTitle, const String& aLbTitle, List& aEntryList ); ~ScSelEntryDlg(); String GetSelectEntry() const; -//UNUSED2008-05 USHORT GetSelectEntryPos() const; +//UNUSED2008-05 sal_uInt16 GetSelectEntryPos() const; }; diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index c90e1ea47e94..ee4896e4b8b9 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -91,7 +91,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 @@ -99,7 +99,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 7bc33b3af96b..bf769c397b82 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 c9249f9fe945..092457d4a1da 100644 --- a/sc/source/ui/inc/mtrindlg.hxx +++ b/sc/source/ui/inc/mtrindlg.hxx @@ -40,11 +40,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 6ca196a4fbb5..e05795518555 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -46,11 +46,11 @@ public: ScMoveTableDlg( Window* pParent ); ~ScMoveTableDlg(); - USHORT GetSelectedDocument () const; + sal_uInt16 GetSelectedDocument () const; SCTAB GetSelectedTable () const; - BOOL GetCopyTable () const; - void SetCopyTable (BOOL bFlag=TRUE); - void EnableCopyTable (BOOL bFlag=TRUE); + sal_Bool GetCopyTable () const; + void SetCopyTable (sal_Bool bFlag=sal_True); + void EnableCopyTable (sal_Bool bFlag=sal_True); private: FixedText aFtDoc; @@ -62,9 +62,9 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - USHORT nDocument; + sal_uInt16 nDocument; SCTAB nTable; - BOOL bCopyTable; + sal_Bool bCopyTable; //-------------------------------------- void Init (); void InitDocListBox (); diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx index 8f2e90bcacfc..eea0dd01ec6f 100644 --- a/sc/source/ui/inc/namecrea.hxx +++ b/sc/source/ui/inc/namecrea.hxx @@ -50,9 +50,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 b122c57a19fd..f83e7f0ad3e5 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -69,7 +69,7 @@ private: PushButton aBtnAdd; PushButton aBtnRemove; MoreButton aBtnMore; - BOOL bSaved; + sal_Bool bSaved; const String aStrAdd; // "Hinzufuegen" const String aStrModify; // "Aendern" @@ -86,7 +86,7 @@ private: void Init(); void UpdateChecks(); void UpdateNames(); - void CalcCurTableAssign( String& aAssign, USHORT nPos ); + void CalcCurTableAssign( String& aAssign, sal_uInt16 nPos ); // Handler: DECL_LINK( OkBtnHdl, void * ); @@ -100,7 +100,7 @@ private: protected: - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); public: @@ -110,10 +110,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 c3e408d0c373..ad98d257ba46 100644 --- a/sc/source/ui/inc/namepast.hxx +++ b/sc/source/ui/inc/namepast.hxx @@ -53,7 +53,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 b464bd6cc9ad..0a8971491cf7 100644 --- a/sc/source/ui/inc/navcitem.hxx +++ b/sc/source/ui/inc/navcitem.hxx @@ -39,11 +39,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 8d53742b6f1e..bf034b27c618 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -93,7 +93,7 @@ private: private: const ScenarioEntry* GetSelectedEntry() const; - void ExecuteScenarioSlot( USHORT nSlotId ); + void ExecuteScenarioSlot( sal_uInt16 nSlotId ); void SelectScenario(); void EditScenario(); void DeleteScenario( bool bQueryBox ); @@ -150,7 +150,7 @@ protected: private: ScNavigatorDlg& rDlg; SCCOL nCol; - USHORT nKeyGroup; + sal_uInt16 nKeyGroup; void EvalText (); void ExecuteCol (); @@ -209,7 +209,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 896c64606646..4332ee8cf454 100644 --- a/sc/source/ui/inc/navsett.hxx +++ b/sc/source/ui/inc/navsett.hxx @@ -37,21 +37,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 65e36565ceb8..3523259d84b4 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -51,27 +51,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 444774ed2068..acdbf5e25a37 100644 --- a/sc/source/ui/inc/olinefun.hxx +++ b/sc/source/ui/inc/olinefun.hxx @@ -45,21 +45,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 104f9e8f11da..8aa62084c7fd 100644 --- a/sc/source/ui/inc/olinewin.hxx +++ b/sc/source/ui/inc/olinewin.hxx @@ -208,7 +208,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 0573ecb86f1e..df0377517ded 100644 --- a/sc/source/ui/inc/opredlin.hxx +++ b/sc/source/ui/inc/opredlin.hxx @@ -78,7 +78,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 93d5fefa8358..25a3c8abe7c9 100644 --- a/sc/source/ui/inc/optload.hxx +++ b/sc/source/ui/inc/optload.hxx @@ -59,7 +59,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 bbd98f1d1818..652fd7fc8fc9 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -62,7 +62,7 @@ protected: struct ScOptConditionRow { String aLeftStr; - USHORT nOperator; + sal_uInt16 nOperator; String aRightStr; ScOptConditionRow() : nOperator(0) {} @@ -73,9 +73,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 maConditions; @@ -83,16 +83,16 @@ class ScOptSolverSave com::sun::star::uno::Sequence 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& rConditions, const String& rEngine, const com::sun::star::uno::Sequence& 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& GetConditions() const { return maConditions; } @@ -109,9 +109,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 42844513af92..26d2262b5a8e 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,36 +203,36 @@ 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 = sal_False ); 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(); @@ -245,7 +245,7 @@ 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(); @@ -255,10 +255,10 @@ public: #endif 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 bcd85c8f5a96..85160b22c7a8 100644 --- a/sc/source/ui/inc/pagedata.hxx +++ b/sc/source/ui/inc/pagedata.hxx @@ -44,8 +44,8 @@ private: size_t nPagesY; SCROW* pPageEndY; long nFirstPage; - BOOL bTopDown; - BOOL bAutomatic; + sal_Bool bTopDown; + sal_Bool bAutomatic; public: ScPrintRangeData(); @@ -64,10 +64,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 @@ -84,7 +84,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 ae02fdb38114..fa79312a8536 100644 --- a/sc/source/ui/inc/parawin.hxx +++ b/sc/source/ui/inc/parawin.hxx @@ -62,10 +62,10 @@ private: Link aFxLink; Link aArgModifiedLink; - ::std::vector aVisibleArgMapping; + ::std::vector aVisibleArgMapping; const ScFuncDesc* pFuncDesc; ScAnyRefDlg* pMyParent; - USHORT nArgs; // unsuppressed arguments + sal_uInt16 nArgs; // unsuppressed arguments Font aFntBold; Font aFntLight; @@ -90,10 +90,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; @@ -110,7 +110,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(); @@ -118,40 +118,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 426f95399b33..4733f8bae6b0 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -111,14 +111,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]; @@ -129,9 +129,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 365df0acc38b..5736377cef17 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -66,7 +66,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; } @@ -109,7 +109,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 60a7502c9734..888a11f5596e 100644 --- a/sc/source/ui/inc/pntlock.hxx +++ b/sc/source/ui/inc/pntlock.hxx @@ -34,32 +34,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 8ac0fba4e80d..bc1f6c094d84 100644 --- a/sc/source/ui/inc/popmenu.hxx +++ b/sc/source/ui/inc/popmenu.hxx @@ -36,15 +36,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(sal_False) {} + ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(sal_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 87d15dcdaf86..e5f901720b36 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -40,11 +40,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]; @@ -57,33 +57,33 @@ 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; // 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; @@ -101,7 +101,7 @@ private: void UpdateDrawView(); void DoPrint( ScPreviewLocationData* pFillLocation ); - void InvalidateLocationData( ULONG nId ); + void InvalidateLocationData( sal_uLong nId ); using Window::SetZoom; @@ -124,18 +124,18 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ); - void DataChanged(BOOL bNewTime = FALSE); // statt Invalidate rufen + void DataChanged(sal_Bool bNewTime = sal_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(); @@ -143,19 +143,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 15b477abad3c..d32ea007e737 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -50,12 +50,12 @@ class ScDocument; 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; @@ -97,7 +97,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; List aEntries; @@ -111,11 +111,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 ); @@ -124,24 +124,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 @@ -150,8 +150,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 7ff97f8d0152..e77b7c6bc9fe 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -57,7 +57,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; @@ -66,11 +66,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 ); @@ -81,8 +81,8 @@ 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 = sal_False); + virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_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 ); @@ -101,7 +101,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 ); @@ -110,22 +110,22 @@ 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 SfxPrinter* GetPrinter( sal_Bool bCreate = sal_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 ); + virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI ); + virtual sal_uInt16 Print( SfxProgress& rProgress, sal_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 e3966bdc3d37..601496c315eb 100644 --- a/sc/source/ui/inc/printfun.hxx +++ b/sc/source/ui/inc/printfun.hxx @@ -64,14 +64,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; @@ -91,7 +91,7 @@ public: MapMode aUserMapMode; Paper ePaper; Orientation eOrientation; - USHORT nPaperBin; + sal_uInt16 nPaperBin; }; struct ScPrintState // Variablen aus ScPrintFunc retten @@ -101,7 +101,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; @@ -116,7 +116,7 @@ private: SCROW nStartRow; SCROW nEndRow; size_t nPagesX; - BOOL* pHidden; + sal_Bool* pHidden; //! Anzahl wirklich sichtbarer cachen??? public: @@ -134,7 +134,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; }; @@ -152,10 +152,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 @@ -164,19 +164,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; @@ -189,9 +189,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; @@ -258,27 +258,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 @@ -293,32 +293,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(); @@ -328,31 +328,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 6194a4342849..375f176222b3 100644 --- a/sc/source/ui/inc/privsplt.hxx +++ b/sc/source/ui/inc/privsplt.hxx @@ -37,7 +37,7 @@ class ScPrivatSplit : public Control private: Link aCtrModifiedLink; - BOOL aMovingFlag; + sal_Bool aMovingFlag; Pointer aWinPointer; SC_SPLIT_DIRECTION eScSplit; short nOldX; @@ -52,7 +52,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 ef245ebf26cf..cd691211dbfb 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -67,8 +67,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(); @@ -82,7 +82,7 @@ public: explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVec& rLabelVec, const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ); - USHORT GetFuncMask() const; + sal_uInt16 GetFuncMask() const; ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const; private: @@ -123,7 +123,7 @@ public: const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData, const ScDPNameVec& rDataFields, bool bEnableLayout ); - USHORT GetFuncMask() const; + sal_uInt16 GetFuncMask() const; void FillLabelData( ScDPLabelData& rLabelData ) const; @@ -212,7 +212,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 e16c3266510e..45eef2f364fb 100644 --- a/sc/source/ui/inc/pvlaydlg.hxx +++ b/sc/source/ui/inc/pvlaydlg.hxx @@ -91,19 +91,19 @@ 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 NotifyMoveField ( ScDPFieldType eToType ); void NotifyRemoveField ( ScDPFieldType eType, size_t nFieldIndex ); - BOOL NotifyMoveSlider ( USHORT nKeyCode ); // return TRUE, if position changed + sal_Bool NotifyMoveSlider ( sal_uInt16 nKeyCode ); // return sal_True, if position changed protected: virtual void Deactivate(); @@ -159,7 +159,7 @@ private: ScDPFieldType eDnDFromType; size_t nDnDFromIndex; - BOOL bIsDrag; + sal_Bool bIsDrag; ::formula::RefEdit* pEditActive; @@ -185,7 +185,7 @@ private: ScPivotParam thePivotData; ScViewData* pViewData; ScDocument* pDoc; - BOOL bRefInputMode; + sal_Bool bRefInputMode; private: ScDPFieldWindow& GetFieldWindow ( ScDPFieldType eType ); @@ -199,8 +199,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 = sal_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 ); @@ -210,14 +210,14 @@ private: ScDPFieldType eToType, const Point& rAtPos ); void RemoveField ( ScDPFieldType eRemType, size_t nRemIndex ); - BOOL GetPivotArrays ( PivotField* pPageArr, + sal_Bool GetPivotArrays ( PivotField* pPageArr, PivotField* pColArr, PivotField* pRowArr, PivotField* pDataArr, - USHORT& rPageCount, - USHORT& rColCount, - USHORT& rRowCount, - USHORT& rDataCount ); + sal_uInt16& rPageCount, + sal_uInt16& rColCount, + sal_uInt16& rRowCount, + sal_uInt16& rDataCount ); void UpdateSrcRange(); diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx index e7e064359349..a891fde67bec 100644 --- a/sc/source/ui/inc/redcom.hxx +++ b/sc/source/ui/inc/redcom.hxx @@ -60,7 +60,7 @@ protected: public: ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet, - ScDocShell *,ScChangeAction *,BOOL bPrevNext = FALSE); + ScDocShell *,ScChangeAction *,sal_Bool bPrevNext = sal_False); ~ScRedComDialog(); short Execute(); diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index 617d7c0a669a..1798c7287922 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -36,7 +36,7 @@ class Class : public SfxChildWindow \ { \ public: \ - Class( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); \ + Class( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); \ SFX_DECL_CHILDWINDOW(Class); \ }; @@ -68,7 +68,7 @@ class ScAcceptChgDlgWrapper: public SfxChildWindow { public: ScAcceptChgDlgWrapper( Window*, - USHORT, + sal_uInt16, SfxBindings*, SfxChildWinInfo* ); @@ -81,20 +81,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 ); } }; //-->Added by PengYunQuan for Validity Cell Range Picker diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx index 87b5330e0f96..5c80ab2d557e 100644 --- a/sc/source/ui/inc/refundo.hxx +++ b/sc/source/ui/inc/refundo.hxx @@ -60,7 +60,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 225fd01451df..42699c5edae8 100644 --- a/sc/source/ui/inc/rfindlst.hxx +++ b/sc/source/ui/inc/rfindlst.hxx @@ -37,11 +37,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) {} }; @@ -49,23 +49,23 @@ class ScRangeFindList { List aEntries; String aDocName; - BOOL bHidden; + sal_Bool bHidden; 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; } + sal_Bool IsHidden() const { return bHidden; } - static ColorData GetColorName( USHORT nIndex ); + static ColorData GetColorName( sal_uInt16 nIndex ); }; diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx index 5be21d87a6f2..2a673d6d9c77 100644 --- a/sc/source/ui/inc/scendlg.hxx +++ b/sc/source/ui/inc/scendlg.hxx @@ -41,14 +41,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 = sal_False, sal_Bool bSheetProtected = sal_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; @@ -68,7 +68,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 3e1a7db38fb2..07b37dd6a61d 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -39,9 +39,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 ]; @@ -116,9 +116,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* ); @@ -130,7 +130,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 84a408267b20..455ad68ecfb1 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -37,7 +37,7 @@ public: ScDocument* pDoc ); ~ScAutoFormatDlg(); - USHORT GetIndex() const { return nIndex; } + sal_uInt16 GetIndex() const { return nIndex; } String GetCurrFormatName(); private: @@ -68,9 +68,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 957d174a3deb..5b92f31baa51 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -39,12 +39,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 = sal_False, + sal_Bool bOnlyDbtoolsEncodings = sal_False, + sal_Bool bImport = sal_True ); ~ScImportOptionsDlg(); @@ -68,7 +68,7 @@ private: 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 99bd6c2a805a..84fb33e7a6ef 100644 --- a/sc/source/ui/inc/scuitphfedit.hxx +++ b/sc/source/ui/inc/scuitphfedit.hxx @@ -59,7 +59,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); @@ -67,9 +67,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: @@ -93,7 +93,7 @@ private: FixedInfo aFtInfo; ScPopupMenu aPopUpFile; - USHORT nWhich; + sal_uInt16 nWhich; String aCmdArr[6]; private: @@ -119,7 +119,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 ); @@ -131,7 +131,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 ); @@ -143,7 +143,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 ); @@ -155,7 +155,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 ad12d9c743ad..fa7718abd4bc 100644 --- a/sc/source/ui/inc/select.hxx +++ b/sc/source/ui/inc/select.hxx @@ -59,8 +59,8 @@ private: ScViewData* pViewData; ScViewSelectionEngine* pEngine; - BOOL bAnchor; - BOOL bStarted; + sal_Bool bAnchor; + sal_Bool bStarted; ScAddress aAnchorPos; ScSplitPos GetWhich(); @@ -71,17 +71,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 = sal_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 ); }; @@ -92,27 +92,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 = sal_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 c695c918dad0..3df2420f0ca3 100644 --- a/sc/source/ui/inc/seltrans.hxx +++ b/sc/source/ui/inc/seltrans.hxx @@ -66,7 +66,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 68e807461cad..2a3fa940037a 100644 --- a/sc/source/ui/inc/servobj.hxx +++ b/sc/source/ui/inc/servobj.hxx @@ -54,7 +54,7 @@ private: ScDocShell* pDocSh; ScRange aRange; String aItemStr; - BOOL bRefreshListener; + sal_Bool bRefreshListener; void Clear(); @@ -62,9 +62,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 = sal_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 00ebb8a7c480..6da486588cee 100644 --- a/sc/source/ui/inc/shtabdlg.hxx +++ b/sc/source/ui/inc/shtabdlg.hxx @@ -62,11 +62,11 @@ public: 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 ba5b8ca287c3..dc268901d30a 100644 --- a/sc/source/ui/inc/simpref.hxx +++ b/sc/source/ui/inc/simpref.hxx @@ -71,14 +71,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(); @@ -88,7 +88,7 @@ private: protected: - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); public: ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, @@ -97,9 +97,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(); @@ -111,9 +111,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 615755be0240..2221396c97e2 100644 --- a/sc/source/ui/inc/sizedev.hxx +++ b/sc/source/ui/inc/sizedev.hxx @@ -36,7 +36,7 @@ class ScDocShell; class ScSizeDeviceProvider { OutputDevice* pDevice; - BOOL bOwner; + sal_Bool bOwner; double nPPTX; double nPPTY; MapMode aOldMapMode; @@ -48,7 +48,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 fa1b9eb6341c..18923980c437 100644 --- a/sc/source/ui/inc/solvrdlg.hxx +++ b/sc/source/ui/inc/solvrdlg.hxx @@ -58,9 +58,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; @@ -86,7 +86,7 @@ private: ScDocument* pDoc; const SCTAB nCurTab; formula::RefEdit* pEdActive; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; const String errMsgInvalidVar; const String errMsgInvalidForm; const String errMsgNoFormula; @@ -95,7 +95,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 e6f9ab1bf0c8..da7beb3f1b46 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -50,21 +50,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 eef0d170c2c8..67f7a197c4ad 100644 --- a/sc/source/ui/inc/spelldialog.hxx +++ b/sc/source/ui/inc/spelldialog.hxx @@ -51,7 +51,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 f44d4a8f7094..92f97164aaef 100644 --- a/sc/source/ui/inc/spelleng.hxx +++ b/sc/source/ui/inc/spelleng.hxx @@ -120,7 +120,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(); @@ -154,7 +154,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/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx index 63e37becf188..93eb54dd5ddd 100644 --- a/sc/source/ui/inc/styledlg.hxx +++ b/sc/source/ui/inc/styledlg.hxx @@ -42,15 +42,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/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx index d77ee812fdb3..e1bb3809207e 100644 --- a/sc/source/ui/inc/tabcont.hxx +++ b/sc/source/ui/inc/tabcont.hxx @@ -45,13 +45,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: @@ -77,9 +77,9 @@ public: using TabBar::StartDrag; 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 e9286ca5ee96..088f6c28a140 100644 --- a/sc/source/ui/inc/tabopdlg.hxx +++ b/sc/source/ui/inc/tabopdlg.hxx @@ -59,10 +59,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; @@ -90,7 +90,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 71d62f964fef..742519fc8929 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -41,8 +41,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: @@ -66,12 +66,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 a06664c7c4ee..751df38a598b 100644 --- a/sc/source/ui/inc/tabsplit.hxx +++ b/sc/source/ui/inc/tabsplit.hxx @@ -37,7 +37,7 @@ class ScTabSplitter : public Splitter { private: ScViewData* pViewData; - BOOL bFixed; + sal_Bool bFixed; protected: virtual void MouseMove( const MouseEvent& rMEvt ); @@ -51,7 +51,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 ab21a6161752..9c3327805a88 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -75,14 +75,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 ); @@ -111,7 +111,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; @@ -139,21 +139,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; @@ -171,12 +171,12 @@ private: double mfPendingTabBarWidth; // Tab bar width relative to frame window width. - BOOL bMinimized; - BOOL bInUpdateHeader; - BOOL bInActivatePart; - BOOL bInZoomUpdate; - BOOL bMoveIsShift; - BOOL bNewStartIfMarking; + sal_Bool bMinimized; + sal_Bool bInUpdateHeader; + sal_Bool bInActivatePart; + sal_Bool bInZoomUpdate; + sal_Bool bMoveIsShift; + sal_Bool bNewStartIfMarking; void Init(); @@ -194,8 +194,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 ); protected: void UpdateHeaderWidth( const ScVSplitPos* pWhich = NULL, @@ -209,11 +209,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(); @@ -228,7 +228,7 @@ public: void HideListBox(); - BOOL HasHintWindow() const { return pInputHintWindow != NULL; } + sal_Bool HasHintWindow() const { return pInputHintWindow != NULL; } void RemoveHintWindow(); void TestHintWindow(); @@ -249,13 +249,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 = sal_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; } @@ -270,7 +270,7 @@ public: ScPageBreakData* GetPageBreakData() { return pPageBreakData; } ScHighlightRanges* GetHighlightRanges() { return pHighlightRanges; } - void UpdatePageBreakData( BOOL bForcePaint = FALSE ); + void UpdatePageBreakData( sal_Bool bForcePaint = sal_False ); void DrawMarkRect( const Rectangle& rRect ); @@ -280,18 +280,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; } // 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, BOOL bAll ); + 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 +301,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 = sal_False ); void UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ); void StopRefMode(); @@ -323,9 +323,9 @@ public: //UNUSED2008-05 void ActiveReleaseMouse(); //UNUSED2008-05 Point ActivePixelToLogic( const Point& rDevicePoint ); - 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 = sal_False ); SC_DLLPUBLIC void CellContentChanged(); void SelectionChanged(); @@ -353,10 +353,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(); @@ -368,42 +368,42 @@ 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 = sal_False, sal_Bool bKeepSel = sal_False ); void MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bKeepSel = sal_False ); void MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bKeepSel = sal_False ); void MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bKeepSel = sal_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 = sal_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 ); void SetNewStartIfMarking(); // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet - SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE, bool bSameTabButMoved = false ); - void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE ); + SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = sal_False, sal_Bool bExtendSelection = sal_False, bool bSameTabButMoved = false ); + void SelectNextTab( short nDir, sal_Bool bExtendSelection = sal_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 ); @@ -430,7 +430,7 @@ public: void PaintLeftArea( SCROW nStartRow, SCROW nEndRow ); void PaintLeft(); - BOOL PaintExtras(); + sal_Bool PaintExtras(); void RecalcPPT(); @@ -460,69 +460,69 @@ 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 = sal_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 = sal_False, sal_Bool bRows = sal_False, sal_Bool bCellSelection = sal_False ); void InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - BOOL bTestNeg = FALSE, - BOOL bCols = FALSE, BOOL bRows = FALSE ); + sal_Bool bTestNeg = sal_False, + sal_Bool bCols = sal_False, sal_Bool bRows = sal_False ); void InitOwnBlockMode(); - void DoneBlockMode( BOOL bContinue = FALSE ); + void DoneBlockMode( sal_Bool bContinue = sal_False ); - BOOL IsBlockMode() const { return bIsBlockMode; } + sal_Bool IsBlockMode() const { return bIsBlockMode; } 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 = sal_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 = sal_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 = sal_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 28cc2a823928..6d69b50ad2a9 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -100,15 +100,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; @@ -144,37 +144,37 @@ 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; -//UNUSED2008-05 BOOL bChartDlgIsEdit; // Datenbereich aendern - BOOL bChartAreaValid; // wenn Chart aufgezogen wird +//UNUSED2008-05 sal_Bool bChartDlgIsEdit; // Datenbereich aendern + 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 ); //UNUSED2008-05 void SetMySubShell( SfxShell* pShell ); SfxShell* GetMySubShell() const; @@ -199,9 +199,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 = sal_False ); virtual void ShowCursor(FASTBOOL bOn); @@ -217,12 +217,12 @@ 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 WriteUserData(String &, sal_Bool bBrowse = sal_False); + virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_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 ); @@ -257,10 +257,10 @@ public: void ExecuteInputDirect(); ScInputHandler* GetInputHandler() const; - void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE ); + void UpdateInputHandler( sal_Bool bForce = sal_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(); @@ -310,32 +310,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 = sal_False ); - void SetFormShellAtTop( BOOL bSet ); + void SetFormShellAtTop( sal_Bool bSet ); ObjectSelectionType GetCurObjectSelectionType(); @@ -343,8 +343,8 @@ public: void StopEditShell(); - BOOL IsDrawTextShell() const; - BOOL IsAuditShell() const; + sal_Bool IsDrawTextShell() const; + sal_Bool IsAuditShell() const; void SetDrawTextUndo( SfxUndoManager* pUndoMgr ); @@ -352,10 +352,10 @@ public: //UNUSED2008-05 void ResetChartArea(); 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; -//UNUSED2008-05 BOOL IsChartDlgEdit() const; -//UNUSED2008-05 void SetChartDlgEdit(BOOL bFlag){bChartDlgIsEdit=bFlag;} +//UNUSED2008-05 sal_Bool IsChartDlgEdit() const; +//UNUSED2008-05 void SetChartDlgEdit(sal_Bool bFlag){bChartDlgIsEdit=bFlag;} void SetEditChartName(const String& aStr){aEditChartName=aStr;} //UNUSED2008-05 const String& GetEditChartName() const; @@ -365,27 +365,27 @@ 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 = sal_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 ); + sal_Bool bSilent, sal_Bool bIsAPI ); + virtual sal_uInt16 Print( SfxProgress& rProgress, sal_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 @@ -396,15 +396,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(); } @@ -415,20 +415,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 a056da0a982c..27b9ceff8520 100644 --- a/sc/source/ui/inc/tbinsert.hxx +++ b/sc/source/ui/inc/tbinsert.hxx @@ -36,20 +36,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 = sal_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 ); }; @@ -73,7 +73,7 @@ protected: virtual void PopupModeEnd(); public: - ScTbxInsertPopup( USHORT nId, WindowAlign eAlign, + ScTbxInsertPopup( sal_uInt16 nId, WindowAlign eAlign, const ResId& rRIdWin, const ResId& rRIdTbx, SfxBindings& rBindings ); ~ScTbxInsertPopup(); diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index 6ea4f6e169ed..c442c3e7c0ac 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -50,10 +50,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 ); }; @@ -69,13 +69,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 302b5de5ffd2..de580944ef26 100644 --- a/sc/source/ui/inc/textdlgs.hxx +++ b/sc/source/ui/inc/textdlgs.hxx @@ -42,7 +42,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, @@ -59,7 +59,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 31f2c9458c83..1c664ecb8f1f 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -45,8 +45,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/tphf.hxx b/sc/source/ui/inc/tphf.hxx index efd681a688a6..e63985d300e8 100644 --- a/sc/source/ui/inc/tphf.hxx +++ b/sc/source/ui/inc/tphf.hxx @@ -41,16 +41,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 ); // using SvxHFPage::ActivatePage; // using SvxHFPage::DeactivatePage; @@ -63,7 +63,7 @@ private: PushButton aBtnEdit; SfxItemSet aDataSet; String aStrPageStyle; - USHORT nPageUsage; + sal_uInt16 nPageUsage; const ScStyleDlg* pStyleDlg; #ifdef _TPHF_CXX @@ -80,7 +80,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 ); @@ -92,7 +92,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 d9d26d2111cd..3cdc6e91c882 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -110,7 +110,7 @@ private: Timer aTimer; ScPopupMenu* pPopupMenu; Link aMLink; - USHORT nSelected; + sal_uInt16 nSelected; SC_DLLPRIVATE DECL_LINK( TimerHdl, Timer*); @@ -130,7 +130,7 @@ public: void SetPopupMenu(ScPopupMenu* pPopUp); - USHORT GetSelected(); + sal_uInt16 GetSelected(); void SetMenuHdl( const Link& rLink ) { aMLink = rLink; } const Link& GetMenuHdl() const { return aMLink; } @@ -144,16 +144,16 @@ public: //CHINA001 class ScHFEditPage : public SfxTabPage //CHINA001 { //CHINA001 public: -//CHINA001 virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); +//CHINA001 virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); //CHINA001 virtual void Reset ( const SfxItemSet& rCoreSet ); //CHINA001 //CHINA001 void SetNumType(SvxNumType eNumType); //CHINA001 //CHINA001 protected: //CHINA001 ScHFEditPage( Window* pParent, -//CHINA001 USHORT nResId, +//CHINA001 sal_uInt16 nResId, //CHINA001 const SfxItemSet& rCoreSet, -//CHINA001 USHORT nWhich ); +//CHINA001 sal_uInt16 nWhich ); //CHINA001 virtual ~ScHFEditPage(); //CHINA001 //CHINA001 private: @@ -174,7 +174,7 @@ public: //CHINA001 FixedInfo aFtInfo; //CHINA001 ScPopupMenu aPopUpFile; //CHINA001 -//CHINA001 USHORT nWhich; +//CHINA001 sal_uInt16 nWhich; //CHINA001 String aCmdArr[6]; //CHINA001 //CHINA001 private: @@ -191,7 +191,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -203,7 +203,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -215,7 +215,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -227,7 +227,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet ); diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx index 358c29f83d97..3eae915e0768 100644 --- a/sc/source/ui/inc/tpprint.hxx +++ b/sc/source/ui/inc/tpprint.hxx @@ -45,8 +45,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 d1ba772a8ca2..83769422e2a7 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -61,8 +61,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: @@ -93,16 +93,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]; @@ -111,10 +111,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 * ); @@ -147,8 +147,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: @@ -189,7 +189,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 1c928ff2ef13..3725f58d8637 100644 --- a/sc/source/ui/inc/tpstat.hxx +++ b/sc/source/ui/inc/tpstat.hxx @@ -47,7 +47,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 6dd640e7925e..a370e73934ba 100644 --- a/sc/source/ui/inc/tpsubt.hxx +++ b/sc/source/ui/inc/tpsubt.hxx @@ -47,16 +47,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; @@ -71,17 +71,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 * ); @@ -101,7 +101,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 ); }; @@ -118,7 +118,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 ); }; @@ -135,7 +135,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 ); }; @@ -151,10 +151,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: @@ -171,7 +171,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 980a574dc61d..0e0eea20efdb 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -57,8 +57,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 f26e48889f1d..99d5b21f8db9 100644 --- a/sc/source/ui/inc/tpusrlst.hxx +++ b/sc/source/ui/inc/tpusrlst.hxx @@ -46,8 +46,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 ); @@ -78,7 +78,7 @@ private: const String aStrCopyFrom; const String aStrCopyErr; - const USHORT nWhichUserLists; + const sal_uInt16 nWhichUserLists; ScUserList* pUserLists; ScDocument* pDoc; @@ -86,20 +86,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 81760eb66c67..0c839c513c2a 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -99,7 +99,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; @@ -155,7 +155,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 546637c726d0..4cfbc4ba1673 100644 --- a/sc/source/ui/inc/transobj.hxx +++ b/sc/source/ui/inc/transobj.hxx @@ -60,9 +60,9 @@ 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 @@ -72,7 +72,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: @@ -92,7 +92,7 @@ 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(); @@ -103,13 +103,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/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx index 770411b63e1b..1b86a5722e54 100644 --- a/sc/source/ui/inc/uiitems.hxx +++ b/sc/source/ui/inc/uiitems.hxx @@ -54,7 +54,7 @@ class ScInputStatusItem : public SfxPoolItem public: TYPEINFO(); -//UNUSED2008-05 ScInputStatusItem( USHORT nWhich, +//UNUSED2008-05 ScInputStatusItem( sal_uInt16 nWhich, //UNUSED2008-05 SCTAB nTab, //UNUSED2008-05 SCCOL nCol, SCROW nRow, //UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow, @@ -62,7 +62,7 @@ public: //UNUSED2008-05 const String& rString, //UNUSED2008-05 const EditTextObject* pData ); - ScInputStatusItem( USHORT nWhich, + ScInputStatusItem( sal_uInt16 nWhich, const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, @@ -100,16 +100,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; } }; @@ -135,16 +135,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; } }; //---------------------------------------------------------------------------- @@ -154,10 +154,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(); @@ -165,7 +165,7 @@ public: virtual String GetValueText() const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const; ScViewData* GetViewData () const { return pViewData; } const ScSortParam& GetSortData () const { return theSortData; } @@ -182,10 +182,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(); @@ -197,13 +197,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; }; @@ -214,10 +214,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(); @@ -225,7 +225,7 @@ public: virtual String GetValueText() const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const; ScViewData* GetViewData () const { return pViewData; } const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; } @@ -242,7 +242,7 @@ class SC_DLLPUBLIC ScUserListItem : public SfxPoolItem { public: TYPEINFO(); - ScUserListItem( USHORT nWhich ); + ScUserListItem( sal_uInt16 nWhich ); ScUserListItem( const ScUserListItem& rItem ); ~ScUserListItem(); @@ -264,7 +264,7 @@ class ScConsolidateItem : public SfxPoolItem { public: TYPEINFO(); - ScConsolidateItem( USHORT nWhich, + ScConsolidateItem( sal_uInt16 nWhich, const ScConsolidateParam* pParam ); ScConsolidateItem( const ScConsolidateItem& rItem ); ~ScConsolidateItem(); @@ -286,8 +286,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(); @@ -297,12 +297,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; }; //---------------------------------------------------------------------------- @@ -312,7 +312,7 @@ class ScSolveItem : public SfxPoolItem { public: TYPEINFO(); - ScSolveItem( USHORT nWhich, + ScSolveItem( sal_uInt16 nWhich, const ScSolveParam* pParam ); ScSolveItem( const ScSolveItem& rItem ); ~ScSolveItem(); @@ -334,7 +334,7 @@ class ScTabOpItem : public SfxPoolItem { public: TYPEINFO(); - ScTabOpItem( USHORT nWhich, + ScTabOpItem( sal_uInt16 nWhich, const ScTabOpParam* pParam ); ScTabOpItem( const ScTabOpItem& rItem ); ~ScTabOpItem(); @@ -356,7 +356,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 6f2bb3572832..c97fd53d431f 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -47,7 +47,7 @@ public: ScSimpleUndo( ScDocShell* pDocSh ); virtual ~ScSimpleUndo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); protected: ScDocShell* pDocShell; @@ -84,7 +84,7 @@ protected: // void BeginRedo(); void EndRedo(); - BOOL AdjustHeight(); + sal_Bool AdjustHeight(); void ShowBlock(); }; @@ -154,16 +154,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 574926ecbf52..c04ebb575f46 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -54,29 +54,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(); }; @@ -93,7 +93,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; @@ -102,11 +102,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(); }; @@ -116,7 +116,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(); @@ -124,18 +124,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(); @@ -156,7 +156,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; @@ -164,27 +164,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( sal_False ), + bTranspose( sal_False ), + bAsLink( sal_False ), eMoveMode( INS_NONE ) {} }; @@ -198,16 +198,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; @@ -215,15 +215,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(); }; @@ -233,27 +233,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(); @@ -267,14 +267,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; @@ -283,12 +283,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(); }; @@ -301,14 +301,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; @@ -316,16 +316,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(); }; @@ -338,7 +338,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 ); @@ -347,7 +347,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; @@ -355,12 +355,12 @@ private: ScMarkData aMarkData; ScRange aRange; ScDocument* pUndoDoc; - BOOL bMulti; + sal_Bool bMulti; ScPatternAttr* pApplyPattern; SvxBoxItem* pLineOuter; SvxBoxInfoItem* pLineInner; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); }; @@ -375,14 +375,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; @@ -396,8 +396,8 @@ private: ScOutlineTable* pUndoTab; SCCOLROW nRangeCnt; SCCOLROW* pRanges; - USHORT nNewSize; - BOOL bWidth; + sal_uInt16 nNewSize; + sal_Bool bWidth; ScSizeMode eMode; SdrUndoAction* pDrawUndo; }; @@ -413,13 +413,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; @@ -433,9 +433,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(); }; @@ -454,7 +454,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; @@ -475,21 +475,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; }; @@ -507,7 +507,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; @@ -517,8 +517,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(); }; @@ -536,13 +536,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; @@ -553,7 +553,7 @@ private: ScRefAddress theFormulaEnd; ScRefAddress theRowCell; ScRefAddress theColCell; - BYTE nMode; + sal_uInt8 nMode; }; @@ -572,7 +572,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; @@ -582,8 +582,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 ); @@ -596,13 +596,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; @@ -611,10 +611,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(); @@ -632,7 +632,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; @@ -657,7 +657,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; @@ -683,10 +683,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; @@ -694,7 +694,7 @@ private: String aStyleName; ScRange aRange; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); }; @@ -709,7 +709,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; @@ -732,7 +732,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; @@ -740,8 +740,8 @@ private: ScDocument* pUndoDoc; String aFormula; formula::FormulaGrammar::AddressConvention eConv; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; void SetChangeTrack(); }; @@ -755,13 +755,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; @@ -771,7 +771,7 @@ private: String aOptions; String aAreaName; ScRange aRange; - ULONG nRefreshDelay; + sal_uLong nRefreshDelay; }; @@ -783,13 +783,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; @@ -799,7 +799,7 @@ private: String aOptions; String aAreaName; ScRange aRange; - ULONG nRefreshDelay; + sal_uLong nRefreshDelay; }; @@ -811,19 +811,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; @@ -840,11 +840,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; }; @@ -853,20 +853,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; }; @@ -881,7 +881,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; @@ -897,20 +897,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; }; @@ -925,7 +925,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; @@ -947,7 +947,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; @@ -970,7 +970,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 53f129166d10..965cb3daebae 100644 --- a/sc/source/ui/inc/undocell.hxx +++ b/sc/source/ui/inc/undocell.hxx @@ -49,13 +49,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; @@ -66,7 +66,7 @@ private: ScPatternAttr* pOldPattern; ScPatternAttr* pNewPattern; ScPatternAttr* pApplyPattern; - BOOL bIsAutomatic; + sal_Bool bIsAutomatic; void DoChange( const ScPatternAttr* pWhichPattern ) const; }; @@ -79,14 +79,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; @@ -94,10 +94,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; @@ -114,13 +114,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; @@ -128,8 +128,8 @@ private: ScAddress aPos; ScBaseCell* pOldCell; double nValue; - ULONG nEndChangeAction; - BOOL bNeedHeight; + sal_uLong nEndChangeAction; + sal_Bool bNeedHeight; void SetChangeTrack(); }; @@ -141,13 +141,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; @@ -155,8 +155,8 @@ private: ScAddress aPos; ScBaseCell* pOldCell; ScBaseCell* pEnteredCell; - ULONG nEndChangeAction; - BOOL bNeedHeight; + sal_uLong nEndChangeAction; + sal_Bool bNeedHeight; void SetChangeTrack(); }; @@ -168,13 +168,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; @@ -182,10 +182,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 @@ -193,24 +193,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 @@ -226,7 +226,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; @@ -238,9 +238,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 ); }; @@ -274,7 +274,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; @@ -302,7 +302,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; @@ -325,14 +325,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; }; @@ -349,7 +349,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; @@ -357,7 +357,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 a2fcd392e9b4..90e486a505be 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -53,14 +53,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; @@ -69,10 +69,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; }; @@ -84,13 +84,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; @@ -98,8 +98,8 @@ private: ScAddress aBlockStart; ScAddress aBlockEnd; ScOutlineTable* pUndoTable; - BOOL bColumns; - BOOL bMake; + sal_Bool bColumns; + sal_Bool bMake; }; @@ -110,13 +110,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; @@ -126,8 +126,8 @@ private: SCTAB nTab; ScDocument* pUndoDoc; ScOutlineTable* pUndoTable; - BOOL bColumns; - USHORT nLevel; + sal_Bool bColumns; + sal_uInt16 nLevel; }; @@ -139,13 +139,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; @@ -154,7 +154,7 @@ private: ScAddress aBlockEnd; ScDocument* pUndoDoc; ScOutlineTable* pUndoTable; - BOOL bShow; + sal_Bool bShow; }; @@ -171,7 +171,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; @@ -196,7 +196,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; @@ -222,7 +222,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; @@ -244,24 +244,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; }; @@ -273,13 +273,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; @@ -291,9 +291,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; }; @@ -301,20 +301,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; }; @@ -331,7 +331,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; @@ -355,7 +355,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; @@ -369,7 +369,7 @@ private: ScDBData* pUndoDBData; ScDBData* pRedoDBData; SCCOL nFormulaCols; - BOOL bRedoFilled; + sal_Bool bRedoFilled; }; @@ -388,7 +388,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; @@ -403,7 +403,7 @@ private: ScDBCollection* pUndoDB; ScRange aOldQuery; ScRange aNewQuery; - BOOL bQuerySize; + sal_Bool bQuerySize; }; //UNUSED2008-05 class ScUndoPivot: public ScSimpleUndo @@ -419,7 +419,7 @@ private: //UNUSED2008-05 virtual void Undo(); //UNUSED2008-05 virtual void Redo(); //UNUSED2008-05 virtual void Repeat(SfxRepeatTarget& rTarget); -//UNUSED2008-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; +//UNUSED2008-05 virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; //UNUSED2008-05 //UNUSED2008-05 virtual String GetComment() const; //UNUSED2008-05 @@ -447,13 +447,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; @@ -462,7 +462,7 @@ private: ScDocument* pNewUndoDoc; ScDPObject* pOldDPObject; ScDPObject* pNewDPObject; - BOOL bAllowMove; + sal_Bool bAllowMove; }; @@ -472,7 +472,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(); @@ -480,7 +480,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; @@ -488,7 +488,7 @@ private: ScArea aDestArea; ScDocument* pUndoDoc; ScConsolidateParam aParam; - BOOL bInsRef; + sal_Bool bInsRef; SCSIZE nInsertCount; ScOutlineTable* pUndoTab; ScDBData* pUndoData; @@ -501,29 +501,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(); }; diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx index a2647985af9f..20db8643e3ca 100644 --- a/sc/source/ui/inc/undodraw.hxx +++ b/sc/source/ui/inc/undodraw.hxx @@ -45,16 +45,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 527c973b6705..0f986396c89d 100644 --- a/sc/source/ui/inc/undoolk.hxx +++ b/sc/source/ui/inc/undoolk.hxx @@ -37,7 +37,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 5e7b86449722..b22554f1eeaa 100644 --- a/sc/source/ui/inc/undostyl.hxx +++ b/sc/source/ui/inc/undostyl.hxx @@ -78,7 +78,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; }; @@ -95,7 +95,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 c8d135070ab1..24e36c0f8d97 100644 --- a/sc/source/ui/inc/undotab.hxx +++ b/sc/source/ui/inc/undotab.hxx @@ -69,23 +69,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(); }; @@ -97,14 +97,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; @@ -112,10 +112,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(); }; @@ -135,14 +135,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: SvShorts theTabs; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; 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; @@ -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; @@ -195,7 +195,7 @@ private: SvShorts theOldTabs; SvShorts theNewTabs; - void DoChange( BOOL bUndo ) const; + void DoChange( sal_Bool bUndo ) const; }; @@ -212,7 +212,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; @@ -241,7 +241,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; @@ -260,14 +260,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; @@ -277,7 +277,7 @@ private: String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; ScMarkData aMarkData; SdrUndoAction* pDrawUndo; }; @@ -290,20 +290,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; @@ -323,7 +323,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; @@ -331,13 +331,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; }; @@ -347,21 +347,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; }; // ============================================================================ @@ -377,7 +377,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; @@ -401,7 +401,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; @@ -424,7 +424,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; @@ -433,7 +433,7 @@ private: ScPrintRangeSaver* pOldRanges; ScPrintRangeSaver* pNewRanges; - void DoChange( BOOL bUndo ); + void DoChange( sal_Bool bUndo ); }; @@ -446,14 +446,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; @@ -465,8 +465,8 @@ private: String aNewComment; Color aOldColor; Color aNewColor; - USHORT nOldFlags; - USHORT nNewFlags; + sal_uInt16 nOldFlags; + sal_uInt16 nNewFlags; }; @@ -483,7 +483,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; @@ -500,21 +500,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 ); }; @@ -529,7 +529,7 @@ private: //UNUSED2009-05 virtual void Undo(); //UNUSED2009-05 virtual void Redo(); //UNUSED2009-05 virtual void Repeat(SfxRepeatTarget& rTarget); -//UNUSED2009-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; +//UNUSED2009-05 virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; //UNUSED2009-05 //UNUSED2009-05 virtual String GetComment() const; //UNUSED2009-05 diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index f7cb9af23b63..ffe44b1e2061 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -119,9 +119,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 ) { @@ -140,7 +140,7 @@ public: DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" ); if ( IsInExecute() ) - EndDialog( FALSE ); + EndDialog( sal_False ); else if ( GetStyle() & WB_CLOSEABLE ) Close(); } @@ -160,7 +160,7 @@ public: (m_pHandler->*m_pRefInputStartPostHdl)( pEdit, pButton ); } - virtual void RefInputDone( BOOL bForced = FALSE ) + virtual void RefInputDone( sal_Bool bForced = sal_False ) { if( !CanInputDone( bForced ) ) return; @@ -175,11 +175,11 @@ public: (m_pHandler->*m_pRefInputDonePostHdl)(); } - BOOL IsChildFocus(); + sal_Bool IsChildFocus(); enum { SLOTID = SID_VALIDITY_REFERENCE }; - BOOL Close(); + sal_Bool Close(); //-->Added by PengYunQuan for Validity Cell Range Picker }; @@ -197,9 +197,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: @@ -262,7 +262,7 @@ private: //TYPEINFO(); void TidyListBoxes(); public: - USHORT GetAllowEntryPos(); + sal_uInt16 GetAllowEntryPos(); String GetMinText(); void SetupRefDlg(); void RemoveRefDlg(); @@ -294,8 +294,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 ); }; @@ -327,8 +327,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 fb9c674a4488..6df6497dde0d 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -139,7 +139,7 @@ private: SCCOL nPosX[2]; SCROW nPosY[2]; - BOOL bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten + sal_Bool bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten ScViewDataTable(); ~ScViewDataTable(); @@ -208,14 +208,14 @@ private: ScRange aDelRange; // fuer AutoFill-Loeschen 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*); @@ -249,9 +249,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 = sal_False, sal_Bool bStopEditing = sal_True ); void WriteUserData(String& rData); void ReadUserData(const String& rData); @@ -264,8 +264,8 @@ public: void SetViewShell( ScTabViewShell* pViewSh ); - 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(); @@ -283,7 +283,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; } @@ -292,7 +292,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; } void SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX ); void SetPosY( ScVSplitPos eWhich, SCROW nNewPosY ); @@ -306,15 +306,15 @@ 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 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; } @@ -336,31 +336,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 = sal_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; } @@ -369,7 +369,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 ) @@ -377,11 +377,11 @@ public: void SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ ) { nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = nNewZ; } - void ResetDelMark() { bDelMarkValid = FALSE; } + void ResetDelMark() { bDelMarkValid = sal_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 ); @@ -389,20 +389,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(); @@ -410,13 +410,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 = sal_False ); ScSplitPos GetEditActivePart() const { return eEditActivePart; } SCCOL GetEditViewCol() const { return nEditCol; } @@ -427,18 +427,18 @@ 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 = sal_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; @@ -447,7 +447,7 @@ public: //UNUSED2008-05 SCCOL LastCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der letzten Seite //UNUSED2008-05 SCROW LastCellsY( ScVSplitPos eWhichY ) const; - BOOL IsOle(); + sal_Bool IsOle(); //UNUSED2008-05 void UpdateOle( ScSplitPos eWhich ); void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void SetScreen( const Rectangle& rVisArea ); @@ -468,8 +468,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; } @@ -479,9 +479,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 @@ -505,7 +505,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 59da2966cc60..4e6aa7bb0b74 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -79,7 +79,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 ); @@ -90,190 +90,190 @@ 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, sal_Bool bSubTotal); bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue ); String GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal ); 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 = sal_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 void CutToClip( ScDocument* pClipDoc = NULL, sal_Bool bIncludeObjects = sal_False ); + SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc = NULL, sal_Bool bCut = sal_False, sal_Bool bApi = sal_False, + sal_Bool bIncludeObjects = sal_False, sal_Bool bStopEdit = sal_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 = sal_False, + sal_Bool bTranspose = sal_False, sal_Bool bAsLink = sal_False, InsCellCmd eMoveMode = INS_NONE, - USHORT nUndoExtraFlags = IDF_NONE, - BOOL bAllowDialogs = FALSE ); + sal_uInt16 nUndoExtraFlags = IDF_NONE, + sal_Bool bAllowDialogs = sal_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 = sal_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 = sal_False, sal_Bool bSameDocClipboard = sal_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 = sal_False, sal_Bool bAllowDialogs = sal_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=sal_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 = sal_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 = sal_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 ); + sal_Bool bRecord = sal_True ); void RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet ); void UpdateStyleSheetInUse( SfxStyleSheet* 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 = sal_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 RemoveMerge( BOOL bRecord = TRUE ); + sal_Bool MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord = sal_True ); + sal_Bool RemoveMerge( sal_Bool bRecord = sal_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 SvShorts &TheTabs, BOOL bRecord = TRUE ); + sal_Bool DeleteTable( SCTAB nTabNr, sal_Bool bRecord = sal_True ); + sal_Bool DeleteTables(const SvShorts &TheTabs, sal_Bool bRecord = sal_True ); - BOOL RenameTable( const String& rName, SCTAB nTabNr ); - void MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ); + sal_Bool RenameTable( const String& rName, SCTAB nTabNr ); + void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy ); 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 ); @@ -283,13 +283,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 ); @@ -301,24 +301,24 @@ 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 ); -//UNUSED2008-05 void DoSpellingChecker( BOOL bRecord = TRUE ); - void DoHangulHanjaConversion( BOOL bRecord = TRUE ); - void DoThesaurus( BOOL bRecord = TRUE ); +//UNUSED2008-05 void DoSpellingChecker( sal_Bool bRecord = sal_True ); + void DoHangulHanjaConversion( sal_Bool bRecord = sal_True ); + void DoThesaurus( sal_Bool bRecord = sal_True ); //UNUSED2008-05 DECL_LINK( SpellError, void * ); /** 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(); @@ -333,17 +333,17 @@ public: inline void HideNote() { ShowNote( false ); } void EditNote(); - void ForgetFormatArea() { bFormatValid = FALSE; } - BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL ); + void ForgetFormatArea() { bFormatValid = sal_False; } + sal_Bool SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix = NULL ); // interne Hilfsfunktionen protected: void UpdateLineAttrs( SvxBorderLine& rLine, const SvxBorderLine* pDestLine, const SvxBorderLine* pSrcLine, - BOOL bColor ); + sal_Bool bColor ); -//UNUSED2008-05 void PaintWidthHeight( BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd ); +//UNUSED2008-05 void PaintWidthHeight( sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd ); private: @@ -355,12 +355,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 ); }; diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index eb1c6df2f902..503b86976d39 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -52,21 +52,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. @@ -74,7 +74,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 ); @@ -102,9 +102,9 @@ 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 ); #ifdef OLD_SELECTION_PAINT - BOOL GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont ); + sal_Bool GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, sal_Bool& rCont ); void GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); #endif }; diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index d2cc5a7390cf..1f95a3db251d 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -68,7 +68,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(); @@ -90,9 +90,9 @@ ScRedlinData::ScRedlinData() nInfo=RD_SPECIAL_NONE; nActionNo=0; pData=NULL; - bDisabled=FALSE; - bIsRejectable=FALSE; - bIsAcceptable=FALSE; + bDisabled=sal_False; + bIsRejectable=sal_False; + bIsAcceptable=sal_False; nTable=SCTAB_MAX; nCol=SCCOL_MAX; nRow=SCROW_MAX; @@ -103,9 +103,9 @@ ScRedlinData::~ScRedlinData() nInfo=RD_SPECIAL_NONE; nActionNo=0; pData=NULL; - bDisabled=FALSE; - bIsRejectable=FALSE; - bIsAcceptable=FALSE; + bDisabled=sal_False; + bIsRejectable=sal_False; + bIsAcceptable=sal_False; } @@ -141,16 +141,16 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP aStrEmpty ( ScResId( STR_EMPTY )) { FreeResource(); -// bScAcceptChgDlgIsDead=FALSE; - bNoSelection=FALSE; - bNeedsUpdate=FALSE; - bIgnoreMsg=FALSE; +// bScAcceptChgDlgIsDead=sal_False; + bNoSelection=sal_False; + bNeedsUpdate=sal_False; + bIgnoreMsg=sal_False; nAcceptCount=0; nRejectCount=0; - bAcceptEnableFlag=TRUE; - bRejectEnableFlag=TRUE; - bHasFilterEntry=FALSE; - bUseColor=FALSE; + bAcceptEnableFlag=sal_True; + bRejectEnableFlag=sal_True; + bHasFilterEntry=sal_False; + bUseColor=sal_False; aReOpenTimer.SetTimeout(50); aReOpenTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl )); @@ -172,7 +172,7 @@ 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(sal_False); pTPView->InsertCalcHeader(); pTPView->SetRejectClickHdl( LINK( this, ScAcceptChgDlg,RejectHandle)); pTPView->SetAcceptClickHdl( LINK(this, ScAcceptChgDlg, AcceptHandle)); @@ -201,7 +201,7 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP } ScAcceptChgDlg::~ScAcceptChgDlg() { -// bScAcceptChgDlgIsDead=TRUE; +// bScAcceptChgDlgIsDead=sal_True; ClearView(); ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -224,13 +224,13 @@ void ScAcceptChgDlg::ReInit(ScViewData* ptrViewData) pDoc=NULL; } - bNoSelection=FALSE; - bNeedsUpdate=FALSE; - bIgnoreMsg=FALSE; + bNoSelection=sal_False; + bNeedsUpdate=sal_False; + bIgnoreMsg=sal_False; nAcceptCount=0; nRejectCount=0; - bAcceptEnableFlag=TRUE; - bRejectEnableFlag=TRUE; + bAcceptEnableFlag=sal_True; + bRejectEnableFlag=sal_True; // #91781# don't call Init here (switching between views), just set link below // (dialog is just hidden, not deleted anymore, when switching views) @@ -260,7 +260,7 @@ void __EXPORT ScAcceptChgDlg::Init() aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser()); pTPFilter->ClearAuthors(); ScStrCollection aUserColl=pChanges->GetUserCollection(); - for(USHORT i=0;iInsertAuthor(aUserColl[i]->GetString()); } @@ -275,7 +275,7 @@ void __EXPORT 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()); @@ -318,10 +318,10 @@ void ScAcceptChgDlg::ClearView() { nAcceptCount=0; nRejectCount=0; - pTheView->SetUpdateMode(FALSE); + pTheView->SetUpdateMode(sal_False); pTheView->Clear(); - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); } String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType) @@ -355,11 +355,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 sal_False; - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -376,7 +376,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) { if(!pScChangeAction->IsDialogParent()) { - pScChangeAction->GetDescription( aDesc, pDoc, TRUE); + pScChangeAction->GetDescription( aDesc, pDoc, sal_True); } } else @@ -405,12 +405,12 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) if(pRangeEntry!=NULL) { - bFlag=TRUE; + bFlag=sal_True; } } else { - bFlag=TRUE; + bFlag=sal_True; } } @@ -419,7 +419,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(); @@ -427,7 +427,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA SvLBoxEntry* pEntry=NULL; - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -455,13 +455,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA { aString=aStrContentWithChild; pNewData->nInfo=RD_SPECIAL_VISCONTENT; - pNewData->bIsRejectable=FALSE; - pNewData->bIsAcceptable=FALSE; + pNewData->bIsRejectable=sal_False; + pNewData->bIsAcceptable=sal_False; } else { aString=*MakeTypeString(eType); - pScChangeAction->GetDescription( aDesc, pDoc, TRUE); + pScChangeAction->GetDescription( aDesc, pDoc, sal_True); } } else @@ -470,9 +470,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=sal_False; } else pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete()); @@ -480,11 +480,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())) { @@ -495,13 +495,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA aString+=' '; aString+=ScGlobal::pLocaleData->getTime(aDateTime); aString+='\t'; - bIsGenerated=FALSE; + bIsGenerated=sal_False; } else { aString+='\t'; aString+='\t'; - bIsGenerated=TRUE; + bIsGenerated=sal_True; } String aComment=pScChangeAction->GetComment(); @@ -531,14 +531,14 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA //SC_CAS_VIRGIN,SC_CAS_ACCEPTED,SC_CAS_REJECTED if(pRangeEntry!=NULL) { - bHasFilterEntry=TRUE; - bFlag=TRUE; + bHasFilterEntry=sal_True; + bFlag=sal_True; } } else if(!bIsGenerated) { - bHasFilterEntry=TRUE; - bFlag=TRUE; + bHasFilterEntry=sal_True; + bFlag=sal_True; } } } @@ -570,18 +570,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=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -602,12 +602,12 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang if(pRangeEntry!=NULL && pScChangeAction->GetState()==eState) { - bFlag=TRUE; + bFlag=sal_True; } } else if(pScChangeAction->GetState()==eState && !bIsGenerated) { - bFlag=TRUE; + bFlag=sal_True; } } @@ -637,13 +637,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang { aString=aStrContentWithChild; pNewData->nInfo=RD_SPECIAL_VISCONTENT; - pNewData->bIsRejectable=FALSE; - pNewData->bIsAcceptable=FALSE; + pNewData->bIsRejectable=sal_False; + pNewData->bIsAcceptable=sal_False; } else { aString=*MakeTypeString(eType); - pScChangeAction->GetDescription( aDesc, pDoc, TRUE); + pScChangeAction->GetDescription( aDesc, pDoc, sal_True); } } else @@ -652,9 +652,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=sal_False; } else pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete()); @@ -662,7 +662,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang } aString+='\t'; - pScChangeAction->GetRefString(aRefStr, pDoc, TRUE); + pScChangeAction->GetRefString(aRefStr, pDoc, sal_True); aString+=aRefStr; aString+='\t'; @@ -701,16 +701,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=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -730,11 +730,11 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte //SC_CAS_VIRGIN,SC_CAS_ACCEPTED,SC_CAS_REJECTED if(pRangeEntry!=NULL) { - bFlag=TRUE; + bFlag=sal_True; } } else if(!bIsGenerated) - bFlag=TRUE; + bFlag=sal_True; } String aRefStr; @@ -775,7 +775,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'; @@ -811,7 +811,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte pNewData->pData=(void *)pScChangeAction; pNewData->nActionNo=pScChangeAction->GetActionNumber(); pNewData->bIsAcceptable=pScChangeAction->IsClickable(); - pNewData->bIsRejectable=FALSE; + pNewData->bIsRejectable=sal_False; pNewData->bDisabled=!pNewData->bIsAcceptable; pNewData->aDateTime=aDateTime; pNewData->nRow = aRef.aStart.Row(); @@ -820,7 +820,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte if(pTheView->IsValidComment(&aComment) && bFlag) { - bHasFilterEntry=TRUE; + bHasFilterEntry=sal_True; pEntry=pTheView->InsertEntry(aString,pNewData,pParent); } else @@ -834,7 +834,7 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt ) { ClearView(); UpdateView(); - bNoSelection=FALSE; + bNoSelection=sal_False; } return SfxModelessDialog::PreNotify(rNEvt); @@ -843,16 +843,16 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt ) void ScAcceptChgDlg::UpdateView() { - bNeedsUpdate=FALSE; + bNeedsUpdate=sal_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(sal_False); + sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()|| pTPFilter->IsAuthor()||pTPFilter->IsComment(); bUseColor=bFilterFlag; @@ -866,11 +866,11 @@ void ScAcceptChgDlg::UpdateView() } } ScChangeActionTable ActionTable; - BOOL bTheFlag=FALSE; + sal_Bool bTheFlag=sal_False; while(pScChangeAction!=NULL) { - bHasFilterEntry=FALSE; + bHasFilterEntry=sal_False; switch(pScChangeAction->GetState()) { case SC_CAS_VIRGIN: @@ -885,7 +885,7 @@ void ScAcceptChgDlg::UpdateView() else pParent=NULL; - bTheFlag=TRUE; + bTheFlag=sal_True; break; case SC_CAS_ACCEPTED: @@ -903,12 +903,12 @@ void ScAcceptChgDlg::UpdateView() { if(!bFilterFlag) { - pParent->EnableChildsOnDemand(TRUE); + pParent->EnableChildsOnDemand(sal_True); } else { - BOOL bTestFlag=bHasFilterEntry; - bHasFilterEntry=FALSE; + sal_Bool bTestFlag=bHasFilterEntry; + bHasFilterEntry=sal_False; if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag) pTheView->RemoveEntry(pParent); } @@ -918,7 +918,7 @@ void ScAcceptChgDlg::UpdateView() } if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) ) - bTheFlag=FALSE; + bTheFlag=sal_False; pTPView->EnableAccept(bTheFlag); pTPView->EnableAcceptAll(bTheFlag); @@ -930,16 +930,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) @@ -949,7 +949,7 @@ void ScAcceptChgDlg::UpdateView() } //---------------------------------------------------------------------------- -BOOL ScAcceptChgDlg::Close() +sal_Bool ScAcceptChgDlg::Close() { return SfxModelessDialog::Close(); } @@ -973,23 +973,23 @@ 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) { -// bSimpleRefDlgStarted=TRUE; - USHORT nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId(); - pViewFrm->ShowChildWindow(nAcceptId,FALSE); +// bSimpleRefDlgStarted=sal_True; + sal_uInt16 nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId(); + pViewFrm->ShowChildWindow(nAcceptId,sal_False); pWnd->SetCloseHdl(LINK( this, ScAcceptChgDlg,RefInfoHandle)); pWnd->SetRefString(pTPFilter->GetRange()); - pWnd->SetAutoReOpen(FALSE); + pWnd->SetAutoReOpen(sal_False); Window* pWin=pWnd->GetWindow(); pWin->SetPosSizePixel(GetPosPixel(),GetSizePixel()); Hide(); @@ -1001,10 +1001,10 @@ IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG ) IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult) { - USHORT nId; + sal_uInt16 nId; -// bSimpleRefDlgStarted=FALSE; - ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE); +// bSimpleRefDlgStarted=sal_False; + ScSimpleRefDlgWrapper::SetAutoReOpen(sal_True); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if(pResult!=NULL) @@ -1024,12 +1024,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, sal_False ); } return 0; } @@ -1050,7 +1050,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef ) { SetPointer(Pointer(POINTER_WAIT)); - bIgnoreMsg=TRUE; + bIgnoreMsg=sal_True; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pRef!=NULL) @@ -1082,7 +1082,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef ) } SetPointer(Pointer(POINTER_ARROW)); - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; return 0; } IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) @@ -1090,7 +1090,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(); @@ -1105,7 +1105,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) { if(pEntryData->nInfo==RD_SPECIAL_CONTENT) { - pChanges->SelectContent(pScChangeAction,TRUE); + pChanges->SelectContent(pScChangeAction,sal_True); } else { @@ -1124,7 +1124,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) ClearView(); UpdateView(); } - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; return 0; } @@ -1179,7 +1179,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) { @@ -1203,7 +1203,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG ) } SetPointer(Pointer(POINTER_ARROW)); - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; return 0; } @@ -1212,7 +1212,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG ) { SetPointer(Pointer(POINTER_WAIT)); - bIgnoreMsg=TRUE; + bIgnoreMsg=sal_True; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pChanges!=NULL) { @@ -1231,7 +1231,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG ) ClearView(); UpdateView(); } - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; SetPointer(Pointer(POINTER_ARROW)); return 0; @@ -1243,7 +1243,7 @@ IMPL_LINK( ScAcceptChgDlg, SelectHandle, SvxRedlinTable*, EMPTYARG ) { aSelectionTimer.Start(); } - bNoSelection=FALSE; + bNoSelection=sal_False; return 0; } @@ -1276,12 +1276,12 @@ void ScAcceptChgDlg::GetDependents( const ScChangeAction* pScChangeAction, } } -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 = sal_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 @@ -1292,7 +1292,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo { pActionTable->Insert( pScChangeAction->GetActionNumber(), (ScChangeAction*) pScChangeAction ); - bParentInserted = TRUE; + bParentInserted = sal_True; } SvLBoxEntry* pEntry=NULL; @@ -1304,18 +1304,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=sal_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=sal_False; + pParentData->bDisabled=sal_False; } while(pCChild!=NULL) { @@ -1324,7 +1324,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo pEntry=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_NONE); if(pEntry!=NULL) - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; } pCChild=(const ScChangeActionContent*)pActionTable->Next(); } @@ -1336,13 +1336,13 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo if(pEntry!=NULL) { - bTheTestFlag=FALSE; + bTheTestFlag=sal_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=sal_False; + pParentData->bDisabled=sal_False; } } @@ -1350,10 +1350,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); @@ -1376,35 +1376,35 @@ BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent) { if(pScChangeAction->GetState()==eState && InsertFilteredAction(pScChangeAction,eState,pParent)!=NULL) - bTheTestFlag=FALSE; + bTheTestFlag=sal_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,sal_False,sal_True); if(pEntry!=NULL) { - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData()); - pEntryData->bIsRejectable=FALSE; - pEntryData->bIsAcceptable=FALSE; - pEntryData->bDisabled=TRUE; + pEntryData->bIsRejectable=sal_False; + pEntryData->bIsAcceptable=sal_False; + pEntryData->bDisabled=sal_True; if(pChild->IsDialogParent()) { - //pEntry->EnableChildsOnDemand(TRUE); + //pEntry->EnableChildsOnDemand(sal_True); Expand(pChanges,pChild,pEntry); } } @@ -1412,11 +1412,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(); @@ -1425,18 +1425,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,sal_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=sal_False; + pEntryData->bIsAcceptable=sal_False; + pEntryData->bDisabled=sal_True; - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; if ( pChild->IsDialogParent() ) { Expand(pChanges,pChild,pEntry); @@ -1444,7 +1444,7 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction, pChanges->GetDependents((ScChangeAction*) pChild,aDelActionTable); if(aDelActionTable.First()!=NULL) { - pEntry->EnableChildsOnDemand(TRUE); + pEntry->EnableChildsOnDemand(sal_True); } aDelActionTable.Clear(); */ @@ -1455,10 +1455,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) { @@ -1513,8 +1513,8 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable ) if(pEntry->HasChildsOnDemand()) { - BOOL bTheTestFlag=TRUE; - pEntry->EnableChildsOnDemand(FALSE); + sal_Bool bTheTestFlag=sal_True; + pEntry->EnableChildsOnDemand(sal_False); pTheView->RemoveEntry(pTheView->FirstChild(pEntry)); if(pEntryData!=NULL) @@ -1556,32 +1556,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(sal_False); ScChangeActionTable ActionTable; - BOOL bTheFlag=FALSE; + sal_Bool bTheFlag=sal_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; @@ -1601,7 +1601,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, else pParent=NULL; - bTheFlag=TRUE; + bTheFlag=sal_True; break; case SC_CAS_ACCEPTED: @@ -1619,12 +1619,12 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, { if(!bFilterFlag) { - pParent->EnableChildsOnDemand(TRUE); + pParent->EnableChildsOnDemand(sal_True); } else { - BOOL bTestFlag=bHasFilterEntry; - bHasFilterEntry=FALSE; + sal_Bool bTestFlag=bHasFilterEntry; + bHasFilterEntry=sal_False; if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag) pTheView->RemoveEntry(pParent); } @@ -1634,22 +1634,22 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, } if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) ) - bTheFlag=FALSE; + bTheFlag=sal_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(sal_False); SvLBoxEntry* pEntry=pTheView->GetCurEntry(); @@ -1658,7 +1658,7 @@ 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; @@ -1669,19 +1669,19 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction) pTheView->SetCurEntry(pTheView->GetModel()->GetEntry(0)); } - BOOL bRemove=FALSE; + sal_Bool bRemove=sal_False; // MUST do it backwards, don't delete parents before children and GPF pEntry=pTheView->Last(); while(pEntry!=NULL) { - bRemove=FALSE; + bRemove=sal_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; } @@ -1694,33 +1694,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(sal_False); - ULONG nPos=LIST_APPEND; + sal_uLong nPos=LIST_APPEND; - BOOL bRemove=FALSE; + sal_Bool bRemove=sal_False; SvLBoxEntry* pEntry=pTheView->First(); SvLBoxEntry* pNextEntry = (pEntry ? pTheView->NextSibling(pEntry) : NULL); SvLBoxEntry* pLastEntry=NULL; while(pEntry!=NULL) { - bRemove=FALSE; + bRemove=sal_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) @@ -1756,7 +1756,7 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,U else AppendChanges(pChgTrack,nStartAction,nEndAction); - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); } @@ -1767,8 +1767,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) { @@ -1777,7 +1777,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) if(!bIgnoreMsg) { - bNoSelection=TRUE; + bNoSelection=sal_True; switch(pTrackInfo->eMsgType) { @@ -1786,7 +1786,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: @@ -1803,7 +1803,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) } IMPL_LINK( ScAcceptChgDlg, ReOpenTimerHdl, Timer*, EMPTYARG ) { - ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE); + ScSimpleRefDlgWrapper::SetAutoReOpen(sal_True); aAcceptChgCtr.ShowFilterPage(); RefHandle(NULL); @@ -1814,9 +1814,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 = sal_False; pTabView->DoneBlockMode(); // clears old marking SvLBoxEntry* pEntry = pTheView->FirstSelected(); @@ -1835,16 +1835,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 = sal_False; + bRejectFlag = sal_False; } bAcceptEnableFlag = bAcceptFlag; bRejectEnableFlag = bRejectFlag; @@ -1853,7 +1853,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 ); @@ -1881,11 +1881,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); @@ -1896,7 +1896,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) } } - aPopup.EnableItem(SC_CHANGES_COMMENT,FALSE); + aPopup.EnableItem(SC_CHANGES_COMMENT,sal_False); if(pDoc->IsDocEditable() && pEntry!=NULL) { @@ -1910,7 +1910,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) } } - USHORT nCommand=aPopup.Execute( this, GetPointerPosPixel() ); + sal_uInt16 nCommand=aPopup.Execute( this, GetPointerPosPixel() ); if(nCommand) @@ -1925,14 +1925,14 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) ScChangeAction* pScChangeAction= (ScChangeAction*) pEntryData->pData; - pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,FALSE); + pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,sal_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); /* @@ -1982,13 +1982,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;iSetTab(i,(USHORT)aStr.ToInt32(),MAP_PIXEL); + pTheView->SetTab(i,(sal_uInt16)aStr.ToInt32(),MAP_PIXEL); } } } @@ -2000,11 +2000,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;iGetTab(i)); rInfo.aExtraString += ';'; @@ -2029,7 +2029,7 @@ void ScAcceptChgDlg::InitFilter() pTheView->SetFilterComment(pTPFilter->IsComment()); utl::SearchParam aSearchParam( pTPFilter->GetComment(), - utl::SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE ); + utl::SearchParam::SRCH_REGEXP,sal_False,sal_False,sal_False ); pTheView->SetCommentParams(&aSearchParam); @@ -2118,8 +2118,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/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 4c544954b2bc..bd058da042cb 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -70,8 +70,8 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi , pAccel( NULL ) , pHiddenMarks(NULL) , nRefTab(0) - , bHighLightRef( FALSE ) - , bAccInserted( FALSE ) + , bHighLightRef( sal_False ) + , bAccInserted( sal_False ) { ScInputOptions aInputOption=SC_MOD()->GetInputOptions(); bEnableColorRef=aInputOption.GetRangeFinder(); @@ -85,14 +85,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); @@ -114,8 +114,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); } } @@ -132,7 +132,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr ) { if( /*!pRefEdit &&*/ bEnableColorRef ) { - bHighLightRef=TRUE; + bHighLightRef=sal_True; ScViewData* pViewData=ScDocShell::GetViewData(); if ( pViewData ) { @@ -141,14 +141,14 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr ) ScRangeList aRangeList; - pTabViewShell->DoneRefMode( FALSE ); + pTabViewShell->DoneRefMode( sal_False ); pTabViewShell->ClearHighlightRanges(); if( ParseWithNames( aRangeList, rStr, pDoc ) ) { ScRange* pRangeEntry = aRangeList.First(); - USHORT nIndex=0; + sal_uInt16 nIndex=0; while(pRangeEntry != NULL) { ColorData aColName = ScRangeFindList::GetColorName(nIndex++); @@ -174,7 +174,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 ) @@ -196,7 +196,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr ) { if( /*!pRefEdit &&*/ bEnableColorRef) { - bHighLightRef=TRUE; + bHighLightRef=sal_True; ScViewData* pViewData=ScDocShell::GetViewData(); if ( pViewData && pRefComp.get() ) { @@ -211,17 +211,17 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr ) if(pTabViewShell!=NULL && pScTokA!=NULL) { - pTabViewShell->DoneRefMode( FALSE ); + pTabViewShell->DoneRefMode( sal_False ); pTabViewShell->ClearHighlightRanges(); pScTokA->Reset(); const ScToken* pToken = static_cast(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) @@ -253,7 +253,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr ) } } // ----------------------------------------------------------------------------- -void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode ) +void ScFormulaReferenceHelper::HideReference( sal_Bool bDoneRefMode ) { ScViewData* pViewData=ScDocShell::GetViewData(); @@ -263,14 +263,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( sal_False ); pTabViewShell->ClearHighlightRanges(); } - bHighLightRef=FALSE; + bHighLightRef=sal_False; } } // ----------------------------------------------------------------------------- @@ -323,9 +323,9 @@ void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::R { pViewShell->SetTabNo( pRange->aStart.Tab() ); pViewShell->MoveCursorAbs( pRange->aStart.Col(), - pRange->aStart.Row(), SC_FOLLOW_JUMP, FALSE, FALSE ); + pRange->aStart.Row(), SC_FOLLOW_JUMP, sal_False, sal_False ); pViewShell->MoveCursorAbs( pRange->aEnd.Col(), - pRange->aEnd.Row(), SC_FOLLOW_JUMP, TRUE, FALSE ); + pRange->aEnd.Row(), SC_FOLLOW_JUMP, sal_True, sal_False ); m_pDlg->SetReference( *pRange, pDoc ); } } @@ -348,7 +348,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; } // if ( pViewData ) @@ -365,13 +365,13 @@ 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 ) { //