summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-10 16:55:21 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-10 20:21:13 -0500
commit12343c15568dcc2c9209d8ca41fda2263122448f (patch)
tree3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui
parent99745dbcbb25b61437914c9782475d0b67a4b0bd (diff)
parentce6308e4fad2281241bf4ca78280eba29f744d43 (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx8
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx106
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx60
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx32
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx8
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx30
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx78
-rw-r--r--sc/source/ui/app/client.cxx6
-rw-r--r--sc/source/ui/app/drwtrans.cxx64
-rw-r--r--sc/source/ui/app/inputhdl.cxx705
-rwxr-xr-x[-rw-r--r--]sc/source/ui/app/inputwin.cxx165
-rw-r--r--sc/source/ui/app/lnktrans.cxx2
-rw-r--r--sc/source/ui/app/msgpool.cxx8
-rw-r--r--sc/source/ui/app/rfindlst.cxx2
-rw-r--r--sc/source/ui/app/scdll.cxx54
-rw-r--r--sc/source/ui/app/scmod.cxx311
-rw-r--r--sc/source/ui/app/scmod2.cxx12
-rw-r--r--sc/source/ui/app/seltrans.cxx28
-rw-r--r--sc/source/ui/app/template.cxx10
-rw-r--r--sc/source/ui/app/transobj.cxx84
-rw-r--r--sc/source/ui/app/uiitems.cxx48
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx4
-rw-r--r--sc/source/ui/attrdlg/condfrmt.cxx76
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx152
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx146
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx32
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx16
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx10
-rw-r--r--sc/source/ui/cctrl/popmenu.cxx2
-rw-r--r--sc/source/ui/cctrl/tbinsert.cxx10
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx44
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx46
-rw-r--r--sc/source/ui/dbgui/asciiopt.src17
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx46
-rw-r--r--sc/source/ui/dbgui/consdlg.src16
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx8
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx4
-rw-r--r--sc/source/ui/dbgui/dapitype.cxx4
-rw-r--r--sc/source/ui/dbgui/dapitype.src8
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx83
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.cxx16
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.src16
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx80
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx291
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx26
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx39
-rw-r--r--sc/source/ui/dbgui/imoptdlg.src15
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx52
-rw-r--r--sc/source/ui/dbgui/pivot.hrc4
-rw-r--r--sc/source/ui/dbgui/pivot.src39
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx74
-rw-r--r--sc/source/ui/dbgui/pvfundlg.src23
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx474
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx41
-rw-r--r--sc/source/ui/dbgui/scendlg.hrc3
-rw-r--r--sc/source/ui/dbgui/scendlg.src15
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx86
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx34
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx67
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx8
-rw-r--r--sc/source/ui/dbgui/textimportoptions.src5
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx109
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx111
-rw-r--r--sc/source/ui/dbgui/validate.cxx98
-rw-r--r--sc/source/ui/dbgui/validate.src17
-rw-r--r--sc/source/ui/docshell/arealink.cxx53
-rw-r--r--sc/source/ui/docshell/autostyl.cxx24
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx306
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx100
-rw-r--r--sc/source/ui/docshell/docfunc.cxx849
-rw-r--r--sc/source/ui/docshell/docsh.cxx439
-rw-r--r--sc/source/ui/docshell/docsh2.cxx16
-rw-r--r--sc/source/ui/docshell/docsh3.cxx168
-rw-r--r--sc/source/ui/docshell/docsh4.cxx311
-rw-r--r--sc/source/ui/docshell/docsh5.cxx174
-rw-r--r--sc/source/ui/docshell/docsh6.cxx70
-rw-r--r--sc/source/ui/docshell/docsh8.cxx92
-rw-r--r--sc/source/ui/docshell/editable.cxx44
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/docshell/impex.cxx304
-rw-r--r--sc/source/ui/docshell/olinefun.cxx226
-rw-r--r--sc/source/ui/docshell/pagedata.cxx14
-rw-r--r--sc/source/ui/docshell/pntlock.cxx6
-rw-r--r--sc/source/ui/docshell/servobj.cxx36
-rw-r--r--sc/source/ui/docshell/sizedev.cxx6
-rw-r--r--sc/source/ui/docshell/tablink.cxx105
-rw-r--r--sc/source/ui/docshell/tpstat.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx56
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx54
-rw-r--r--sc/source/ui/drawfunc/drawsh4.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx52
-rw-r--r--sc/source/ui/drawfunc/drformsh.src14
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx126
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx12
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx28
-rw-r--r--sc/source/ui/drawfunc/fuconarc.cxx22
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx26
-rw-r--r--sc/source/ui/drawfunc/fuconpol.cxx38
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx22
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx48
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx24
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx110
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx22
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx48
-rw-r--r--sc/source/ui/drawfunc/fumark.cxx44
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx32
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx126
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx20
-rw-r--r--sc/source/ui/drawfunc/futext.cxx88
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx4
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx8
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx4
-rw-r--r--sc/source/ui/drawfunc/objdraw.src890
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx70
-rw-r--r--sc/source/ui/formdlg/dwfunctr.src4
-rw-r--r--sc/source/ui/formdlg/formula.cxx76
-rw-r--r--sc/source/ui/formdlg/privsplt.cxx12
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx8
-rw-r--r--sc/source/ui/inc/IAnyRefDialog.hxx8
-rw-r--r--sc/source/ui/inc/acredlin.hxx60
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx52
-rw-r--r--sc/source/ui/inc/areasave.hxx10
-rw-r--r--sc/source/ui/inc/areasdlg.hxx16
-rw-r--r--sc/source/ui/inc/asciiopt.hxx30
-rw-r--r--sc/source/ui/inc/attrdlg.hxx2
-rw-r--r--sc/source/ui/inc/auditsh.hxx2
-rw-r--r--sc/source/ui/inc/autofmt.hxx16
-rw-r--r--sc/source/ui/inc/autostyl.hxx10
-rw-r--r--sc/source/ui/inc/cbutton.hxx14
-rw-r--r--sc/source/ui/inc/cellsh.hxx4
-rw-r--r--sc/source/ui/inc/colrowba.hxx26
-rw-r--r--sc/source/ui/inc/condfrmt.hrc6
-rw-r--r--sc/source/ui/inc/condfrmt.hxx13
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx26
-rw-r--r--sc/source/ui/inc/consdlg.hxx16
-rw-r--r--sc/source/ui/inc/content.hxx48
-rw-r--r--sc/source/ui/inc/corodlg.hxx8
-rw-r--r--sc/source/ui/inc/crdlg.hxx4
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx12
-rw-r--r--sc/source/ui/inc/csvruler.hxx6
-rw-r--r--sc/source/ui/inc/dapitype.hxx2
-rw-r--r--sc/source/ui/inc/datafdlg.hxx2
-rw-r--r--sc/source/ui/inc/dbdocfun.hxx36
-rw-r--r--sc/source/ui/inc/dbfunc.hxx62
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx8
-rw-r--r--sc/source/ui/inc/delcldlg.hxx4
-rw-r--r--sc/source/ui/inc/delcodlg.hxx14
-rw-r--r--sc/source/ui/inc/docfunc.hxx144
-rw-r--r--sc/source/ui/inc/docsh.hxx207
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx2
-rw-r--r--sc/source/ui/inc/drawsh.hxx8
-rw-r--r--sc/source/ui/inc/drawview.hxx12
-rw-r--r--sc/source/ui/inc/drtxtob.hxx10
-rw-r--r--sc/source/ui/inc/drwtrans.hxx20
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx22
-rw-r--r--sc/source/ui/inc/editable.hxx10
-rw-r--r--sc/source/ui/inc/editsh.hxx6
-rw-r--r--sc/source/ui/inc/fieldwnd.hxx33
-rw-r--r--sc/source/ui/inc/filldlg.hxx33
-rw-r--r--sc/source/ui/inc/filtdlg.hxx36
-rw-r--r--sc/source/ui/inc/foptmgr.hxx2
-rw-r--r--sc/source/ui/inc/formula.hxx22
-rw-r--r--sc/source/ui/inc/fuconarc.hxx8
-rw-r--r--sc/source/ui/inc/fuconcustomshape.hxx8
-rw-r--r--sc/source/ui/inc/fuconpol.hxx8
-rw-r--r--sc/source/ui/inc/fuconrec.hxx8
-rw-r--r--sc/source/ui/inc/fuconstr.hxx12
-rw-r--r--sc/source/ui/inc/fuconuno.hxx12
-rw-r--r--sc/source/ui/inc/fudraw.hxx10
-rw-r--r--sc/source/ui/inc/fuedipo.hxx8
-rw-r--r--sc/source/ui/inc/fumark.hxx14
-rw-r--r--sc/source/ui/inc/funcpage.hxx14
-rw-r--r--sc/source/ui/inc/funcutl.hxx6
-rw-r--r--sc/source/ui/inc/fupoor.hxx16
-rw-r--r--sc/source/ui/inc/fusel.hxx14
-rw-r--r--sc/source/ui/inc/futext.hxx14
-rw-r--r--sc/source/ui/inc/gridmerg.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx104
-rw-r--r--sc/source/ui/inc/groupdlg.hxx10
-rw-r--r--sc/source/ui/inc/hdrcont.hxx36
-rw-r--r--sc/source/ui/inc/hfedtdlg.hxx4
-rw-r--r--sc/source/ui/inc/highred.hxx6
-rw-r--r--sc/source/ui/inc/hiranges.hxx4
-rw-r--r--sc/source/ui/inc/imoptdlg.hxx24
-rw-r--r--sc/source/ui/inc/impex.hxx86
-rw-r--r--sc/source/ui/inc/inputhdl.hxx102
-rw-r--r--sc/source/ui/inc/inputwin.hxx36
-rw-r--r--sc/source/ui/inc/inscldlg.hxx4
-rw-r--r--sc/source/ui/inc/inscodlg.hxx42
-rw-r--r--sc/source/ui/inc/instbdlg.hxx16
-rw-r--r--sc/source/ui/inc/lbseldlg.hxx2
-rw-r--r--sc/source/ui/inc/linkarea.hxx4
-rw-r--r--sc/source/ui/inc/msgpool.hxx2
-rw-r--r--sc/source/ui/inc/mtrindlg.hxx6
-rw-r--r--sc/source/ui/inc/mvtabdlg.hxx10
-rw-r--r--sc/source/ui/inc/namecrea.hxx6
-rw-r--r--sc/source/ui/inc/namedlg.hxx8
-rw-r--r--sc/source/ui/inc/namepast.hxx4
-rw-r--r--sc/source/ui/inc/navcitem.hxx4
-rw-r--r--sc/source/ui/inc/navipi.hxx24
-rw-r--r--sc/source/ui/inc/navsett.hxx18
-rw-r--r--sc/source/ui/inc/notemark.hxx10
-rw-r--r--sc/source/ui/inc/olinefun.hxx24
-rw-r--r--sc/source/ui/inc/olinewin.hxx2
-rw-r--r--sc/source/ui/inc/opredlin.hxx2
-rw-r--r--sc/source/ui/inc/optload.hxx2
-rw-r--r--sc/source/ui/inc/optsolver.hxx20
-rw-r--r--sc/source/ui/inc/output.hxx86
-rw-r--r--sc/source/ui/inc/pagedata.hxx14
-rw-r--r--sc/source/ui/inc/parawin.hxx46
-rw-r--r--sc/source/ui/inc/pfiltdlg.hxx10
-rw-r--r--sc/source/ui/inc/pfuncache.hxx4
-rw-r--r--sc/source/ui/inc/pntlock.hxx24
-rw-r--r--sc/source/ui/inc/popmenu.hxx12
-rw-r--r--sc/source/ui/inc/preview.hxx64
-rw-r--r--sc/source/ui/inc/prevloc.hxx40
-rw-r--r--sc/source/ui/inc/prevwsh.hxx30
-rw-r--r--sc/source/ui/inc/printfun.hxx118
-rw-r--r--sc/source/ui/inc/privsplt.hxx4
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx26
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx46
-rw-r--r--sc/source/ui/inc/redcom.hxx2
-rw-r--r--sc/source/ui/inc/reffact.hxx16
-rw-r--r--sc/source/ui/inc/refundo.hxx2
-rw-r--r--sc/source/ui/inc/rfindlst.hxx10
-rw-r--r--sc/source/ui/inc/scendlg.hxx10
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx12
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx8
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx13
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx16
-rw-r--r--sc/source/ui/inc/select.hxx26
-rw-r--r--sc/source/ui/inc/seltrans.hxx2
-rw-r--r--sc/source/ui/inc/servobj.hxx6
-rw-r--r--sc/source/ui/inc/shtabdlg.hxx12
-rw-r--r--sc/source/ui/inc/simpref.hxx22
-rw-r--r--sc/source/ui/inc/sizedev.hxx4
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx8
-rw-r--r--sc/source/ui/inc/sortdlg.hxx20
-rw-r--r--sc/source/ui/inc/spelldialog.hxx2
-rw-r--r--sc/source/ui/inc/spelleng.hxx4
-rw-r--r--sc/source/ui/inc/strindlg.hxx4
-rw-r--r--sc/source/ui/inc/styledlg.hxx6
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx7
-rw-r--r--sc/source/ui/inc/tabcont.hxx12
-rw-r--r--sc/source/ui/inc/tabopdlg.hxx6
-rw-r--r--sc/source/ui/inc/tabpages.hxx16
-rw-r--r--sc/source/ui/inc/tabsplit.hxx4
-rw-r--r--sc/source/ui/inc/tabview.hxx163
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx144
-rw-r--r--sc/source/ui/inc/tbinsert.hxx8
-rw-r--r--sc/source/ui/inc/tbzoomsliderctrl.hxx10
-rw-r--r--sc/source/ui/inc/textdlgs.hxx4
-rw-r--r--sc/source/ui/inc/tpcalc.hxx6
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx2
-rw-r--r--sc/source/ui/inc/tpformula.hxx2
-rw-r--r--sc/source/ui/inc/tphf.hxx14
-rw-r--r--sc/source/ui/inc/tphfedit.hxx4
-rw-r--r--sc/source/ui/inc/tpprint.hxx4
-rw-r--r--sc/source/ui/inc/tpsort.hxx24
-rw-r--r--sc/source/ui/inc/tpstat.hxx2
-rw-r--r--sc/source/ui/inc/tpsubt.hxx30
-rw-r--r--sc/source/ui/inc/tptable.hxx4
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx22
-rw-r--r--sc/source/ui/inc/tpview.hxx4
-rw-r--r--sc/source/ui/inc/transobj.hxx17
-rw-r--r--sc/source/ui/inc/ui_pch.hxx4
-rw-r--r--sc/source/ui/inc/uiitems.hxx56
-rw-r--r--sc/source/ui/inc/undobase.hxx19
-rw-r--r--sc/source/ui/inc/undoblk.hxx258
-rw-r--r--sc/source/ui/inc/undocell.hxx76
-rw-r--r--sc/source/ui/inc/undodat.hxx122
-rw-r--r--sc/source/ui/inc/undodraw.hxx10
-rw-r--r--sc/source/ui/inc/undoolk.hxx2
-rw-r--r--sc/source/ui/inc/undostyl.hxx4
-rw-r--r--sc/source/ui/inc/undotab.hxx90
-rw-r--r--sc/source/ui/inc/validate.hxx26
-rw-r--r--sc/source/ui/inc/viewdata.hxx122
-rw-r--r--sc/source/ui/inc/viewfunc.hxx203
-rw-r--r--sc/source/ui/inc/viewutil.hxx14
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx394
-rw-r--r--sc/source/ui/miscdlgs/acredlin.src4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx130
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx36
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx34
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.src4
-rw-r--r--sc/source/ui/miscdlgs/crdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx107
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx20
-rw-r--r--sc/source/ui/miscdlgs/delcldlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/delcodlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx48
-rw-r--r--sc/source/ui/miscdlgs/groupdlg.cxx8
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx27
-rw-r--r--sc/source/ui/miscdlgs/highred.src9
-rw-r--r--sc/source/ui/miscdlgs/inscldlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx68
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx17
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.src10
-rw-r--r--sc/source/ui/miscdlgs/lbseldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx33
-rw-r--r--sc/source/ui/miscdlgs/linkarea.src6
-rw-r--r--sc/source/ui/miscdlgs/mtrindlg.cxx10
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx36
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx14
-rw-r--r--sc/source/ui/miscdlgs/namepast.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx37
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.src4
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx10
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.src12
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx58
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx14
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.src3
-rw-r--r--sc/source/ui/miscdlgs/shtabdlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx34
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx28
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx21
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx24
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx20
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx4
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx64
-rw-r--r--sc/source/ui/navipi/content.cxx218
-rw-r--r--sc/source/ui/navipi/navcitem.cxx4
-rw-r--r--sc/source/ui/navipi/navipi.cxx84
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx10
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx28
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx18
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx16
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx68
-rw-r--r--sc/source/ui/optdlg/tpview.cxx98
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx106
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx10
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.src48
-rw-r--r--sc/source/ui/pagedlg/pagedlg.src26
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx34
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx22
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx24
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx105
-rw-r--r--sc/source/ui/src/attrdlg.src4
-rw-r--r--sc/source/ui/src/autofmt.src12
-rw-r--r--sc/source/ui/src/condfrmt.src27
-rw-r--r--sc/source/ui/src/crnrdlg.src9
-rw-r--r--sc/source/ui/src/dbnamdlg.src12
-rw-r--r--sc/source/ui/src/filter.src78
-rw-r--r--sc/source/ui/src/globstr.src38
-rw-r--r--sc/source/ui/src/hdrcont.src22
-rw-r--r--sc/source/ui/src/miscdlgs.src109
-rw-r--r--sc/source/ui/src/namedlg.src12
-rw-r--r--sc/source/ui/src/opredlin.src6
-rw-r--r--sc/source/ui/src/optdlg.src57
-rw-r--r--sc/source/ui/src/optsolver.src37
-rw-r--r--sc/source/ui/src/popup.src108
-rw-r--r--sc/source/ui/src/scfuncs.src11
-rw-r--r--sc/source/ui/src/scstring.src39
-rw-r--r--sc/source/ui/src/simpref.src2
-rw-r--r--sc/source/ui/src/solveroptions.src4
-rw-r--r--sc/source/ui/src/solvrdlg.src7
-rw-r--r--sc/source/ui/src/sortdlg.src21
-rw-r--r--sc/source/ui/src/subtdlg.src8
-rw-r--r--sc/source/ui/src/tabopdlg.src8
-rw-r--r--sc/source/ui/styleui/styledlg.cxx8
-rw-r--r--sc/source/ui/undo/areasave.cxx34
-rw-r--r--sc/source/ui/undo/refundo.cxx6
-rw-r--r--sc/source/ui/undo/undobase.cxx61
-rw-r--r--sc/source/ui/undo/undoblk.cxx271
-rw-r--r--sc/source/ui/undo/undoblk2.cxx33
-rw-r--r--sc/source/ui/undo/undoblk3.cxx241
-rw-r--r--sc/source/ui/undo/undocell.cxx130
-rw-r--r--sc/source/ui/undo/undodat.cxx332
-rw-r--r--sc/source/ui/undo/undodraw.cxx16
-rw-r--r--sc/source/ui/undo/undoolk.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx24
-rw-r--r--sc/source/ui/undo/undotab.cxx305
-rw-r--r--sc/source/ui/undo/undoutil.cxx15
-rw-r--r--sc/source/ui/unoobj/addruno.cxx16
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx20
-rw-r--r--sc/source/ui/unoobj/appluno.cxx181
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx871
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx14
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx12
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx25
-rw-r--r--sc/source/ui/unoobj/confuno.cxx14
-rw-r--r--sc/source/ui/unoobj/cursuno.cxx10
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx89
-rw-r--r--sc/source/ui/unoobj/datauno.cxx138
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx4
-rw-r--r--sc/source/ui/unoobj/detreg.cxx21
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx20
-rw-r--r--sc/source/ui/unoobj/docuno.cxx299
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx16
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx2
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx54
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx8
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx71
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx52
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx94
-rw-r--r--sc/source/ui/unoobj/miscuno.cxx2
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx14
-rw-r--r--sc/source/ui/unoobj/optuno.cxx8
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx122
-rw-r--r--sc/source/ui/unoobj/servuno.cxx10
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx28
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx22
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx160
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/unoobj/textuno.cxx66
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx227
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx82
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx32
-rw-r--r--sc/source/ui/vba/makefile.mk12
-rw-r--r--sc/source/ui/vba/testvba/makefile.mk5
-rw-r--r--sc/source/ui/vba/testvba/testvba.cxx6
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx83
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx10
-rw-r--r--sc/source/ui/vba/vbaassistant.cxx4
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxis.cxx32
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx4
-rw-r--r--sc/source/ui/vba/vbacharacters.hxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx34
-rw-r--r--sc/source/ui/vba/vbacomment.cxx6
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx217
-rw-r--r--sc/source/ui/vba/vbaeventshelper.hxx9
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx2
-rw-r--r--sc/source/ui/vba/vbafiledialogselecteditems.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx28
-rw-r--r--sc/source/ui/vba/vbaformat.cxx14
-rw-r--r--sc/source/ui/vba/vbaformatcondition.cxx2
-rw-r--r--sc/source/ui/vba/vbafoundfiles.cxx2
-rw-r--r--sc/source/ui/vba/vbahelper.cxx24
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx2
-rw-r--r--sc/source/ui/vba/vbanames.cxx2
-rw-r--r--sc/source/ui/vba/vbapagebreak.cxx8
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx2
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx26
-rw-r--r--sc/source/ui/vba/vbaquerytable.cxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx353
-rw-r--r--sc/source/ui/vba/vbarange.hxx23
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx43
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx10
-rw-r--r--sc/source/ui/vba/vbawindow.cxx6
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx12
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx76
-rw-r--r--sc/source/ui/vba/vbaworkbooks.hxx5
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx71
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx1
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx14
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx6
-rw-r--r--sc/source/ui/view/auditsh.cxx14
-rw-r--r--sc/source/ui/view/cellsh.cxx101
-rw-r--r--sc/source/ui/view/cellsh1.cxx236
-rw-r--r--sc/source/ui/view/cellsh2.cxx200
-rw-r--r--sc/source/ui/view/cellsh3.cxx118
-rw-r--r--sc/source/ui/view/cellsh4.cxx48
-rw-r--r--sc/source/ui/view/colrowba.cxx50
-rw-r--r--sc/source/ui/view/dbfunc.cxx74
-rw-r--r--sc/source/ui/view/dbfunc2.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx296
-rw-r--r--sc/source/ui/view/dbfunc4.cxx14
-rw-r--r--sc/source/ui/view/drawattr.cxx6
-rw-r--r--sc/source/ui/view/drawutil.cxx4
-rw-r--r--sc/source/ui/view/drawvie3.cxx24
-rw-r--r--sc/source/ui/view/drawvie4.cxx42
-rw-r--r--sc/source/ui/view/drawview.cxx97
-rw-r--r--sc/source/ui/view/editsh.cxx132
-rw-r--r--sc/source/ui/view/formatsh.cxx254
-rw-r--r--sc/source/ui/view/galwrap.cxx4
-rw-r--r--sc/source/ui/view/gridmerg.cxx6
-rw-r--r--sc/source/ui/view/gridwin.cxx684
-rw-r--r--sc/source/ui/view/gridwin2.cxx158
-rw-r--r--sc/source/ui/view/gridwin3.cxx66
-rw-r--r--sc/source/ui/view/gridwin4.cxx212
-rw-r--r--sc/source/ui/view/gridwin5.cxx46
-rw-r--r--sc/source/ui/view/hdrcont.cxx124
-rw-r--r--sc/source/ui/view/hintwin.cxx2
-rw-r--r--sc/source/ui/view/imapwrap.cxx2
-rw-r--r--sc/source/ui/view/invmerge.cxx6
-rw-r--r--sc/source/ui/view/notemark.cxx10
-rw-r--r--sc/source/ui/view/olinewin.cxx64
-rw-r--r--sc/source/ui/view/output.cxx280
-rw-r--r--sc/source/ui/view/output2.cxx542
-rw-r--r--sc/source/ui/view/output3.cxx8
-rw-r--r--sc/source/ui/view/pfuncache.cxx6
-rw-r--r--sc/source/ui/view/pgbrksh.cxx2
-rw-r--r--sc/source/ui/view/pivotsh.cxx8
-rw-r--r--sc/source/ui/view/preview.cxx254
-rw-r--r--sc/source/ui/view/prevloc.cxx136
-rw-r--r--sc/source/ui/view/prevwsh.cxx105
-rw-r--r--sc/source/ui/view/prevwsh2.cxx18
-rw-r--r--sc/source/ui/view/printfun.cxx360
-rw-r--r--sc/source/ui/view/reffact.cxx28
-rw-r--r--sc/source/ui/view/select.cxx204
-rw-r--r--sc/source/ui/view/selectionstate.cxx6
-rw-r--r--sc/source/ui/view/spelldialog.cxx8
-rw-r--r--sc/source/ui/view/spelleng.cxx14
-rw-r--r--sc/source/ui/view/tabcont.cxx70
-rw-r--r--sc/source/ui/view/tabsplit.cxx6
-rw-r--r--sc/source/ui/view/tabview.cxx272
-rw-r--r--sc/source/ui/view/tabview2.cxx108
-rw-r--r--sc/source/ui/view/tabview3.cxx302
-rw-r--r--sc/source/ui/view/tabview4.cxx50
-rw-r--r--sc/source/ui/view/tabview5.cxx72
-rw-r--r--sc/source/ui/view/tabvwsh.cxx3
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx48
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx166
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx367
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx31
-rw-r--r--sc/source/ui/view/tabvwsh8.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx32
-rw-r--r--sc/source/ui/view/tabvwsha.cxx81
-rw-r--r--sc/source/ui/view/tabvwshb.cxx122
-rw-r--r--sc/source/ui/view/tabvwshc.cxx14
-rw-r--r--sc/source/ui/view/tabvwshd.cxx2
-rw-r--r--sc/source/ui/view/tabvwshe.cxx24
-rw-r--r--sc/source/ui/view/tabvwshf.cxx82
-rw-r--r--sc/source/ui/view/tabvwshh.cxx12
-rw-r--r--sc/source/ui/view/viewdata.cxx294
-rw-r--r--sc/source/ui/view/viewfun2.cxx430
-rw-r--r--sc/source/ui/view/viewfun3.cxx294
-rw-r--r--sc/source/ui/view/viewfun4.cxx88
-rw-r--r--sc/source/ui/view/viewfun5.cxx72
-rw-r--r--sc/source/ui/view/viewfun6.cxx18
-rw-r--r--sc/source/ui/view/viewfun7.cxx87
-rw-r--r--sc/source/ui/view/viewfunc.cxx514
-rw-r--r--sc/source/ui/view/viewutil.cxx64
538 files changed, 15701 insertions, 15416 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 23b41060e20c..e3ee6d51b165 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -174,7 +174,7 @@ Rectangle ScAccessibleCell::GetBoundingBox(void) const
mpViewShell->GetViewData()->GetMergeSizePixel(
maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY);
aCellRect.SetSize(Size(nSizeX, nSizeY));
- aCellRect.SetPos(mpViewShell->GetViewData()->GetScrPos(maCellAddress.Col(), maCellAddress.Row(), meSplitPos, TRUE));
+ aCellRect.SetPos(mpViewShell->GetViewData()->GetScrPos(maCellAddress.Col(), maCellAddress.Row(), meSplitPos, sal_True));
Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos);
if (pWindow)
@@ -343,7 +343,7 @@ sal_Bool ScAccessibleCell::IsOpaque(
sal_Bool ScAccessibleCell::IsSelected()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -379,7 +379,7 @@ void ScAccessibleCell::FillDependends(utl::AccessibleRelationSetHelper* pRelatio
{
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
while ( !bFound && aIter.GetNextRef( aRef ) )
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 5e59d9b09eee..1428756f1ff4 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -93,7 +93,7 @@ sal_Bool SAL_CALL ScAccessibleCellBase::isVisible( )
bool bRowFiltered = mpDoc->RowFiltered(maCellAddress.Row(), maCellAddress.Tab());
if (bColHidden || bColFiltered || bRowHidden || bRowFiltered)
- bVisible = sal_False;
+ bVisible = false;
}
return bVisible;
}
@@ -260,7 +260,7 @@ sal_Bool SAL_CALL
SolarMutexGuard aGuard;
IsObjectValid();
double fValue = 0;
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if((aNumber >>= fValue) && mpDoc && mpDoc->GetDocumentShell())
{
uno::Reference<XAccessibleStateSet> xParentStates;
@@ -273,7 +273,7 @@ sal_Bool SAL_CALL
{
ScDocShell* pDocShell = (ScDocShell*) mpDoc->GetDocumentShell();
ScDocFunc aFunc(*pDocShell);
- bResult = aFunc.PutCell( maCellAddress, new ScValueCell(fValue), TRUE );
+ bResult = aFunc.PutCell( maCellAddress, new ScValueCell(fValue), sal_True );
}
}
return bResult;
@@ -333,7 +333,7 @@ uno::Sequence<sal_Int8> SAL_CALL
sal_Bool ScAccessibleCellBase::IsEditable(
const uno::Reference<XAccessibleStateSet>& rxParentStates)
{
- sal_Bool bEditable(sal_False);
+ sal_Bool bEditable(false);
if (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::EDITABLE))
bEditable = sal_True;
return bEditable;
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index d3233a2bea05..314fddb334c7 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -223,7 +223,7 @@ sal_Bool SAL_CALL ScAccessibleContextBase::isShowing( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- sal_Bool bShowing(sal_False);
+ sal_Bool bShowing(false);
if (mxParent.is())
{
uno::Reference<XAccessibleComponent> xParentComponent (mxParent->getAccessibleContext(), uno::UNO_QUERY);
@@ -497,7 +497,7 @@ sal_Bool SAL_CALL
for (int i=0; i<nLength; ++i, ++pServiceNames)
if (sServiceName == *pServiceNames)
return sal_True;
- return sal_False;
+ return false;
}
uno::Sequence< ::rtl::OUString> SAL_CALL
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 1ca0cfce5da1..b85aca92fa41 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -549,7 +549,7 @@ sal_Bool SAL_CALL ScAccessibleCsvRuler::setSelection( sal_Int32 /* nStartIndex *
throw( IndexOutOfBoundsException, RuntimeException )
{
ensureAlive();
- return sal_False;
+ return false;
}
OUString SAL_CALL ScAccessibleCsvRuler::getText() throw( RuntimeException )
@@ -744,7 +744,7 @@ sal_Bool SAL_CALL ScAccessibleCsvRuler::copyText( sal_Int32 /* nStartIndex */, s
throw( IndexOutOfBoundsException, RuntimeException )
{
ensureAlive();
- return sal_False;
+ return false;
}
@@ -1112,7 +1112,7 @@ sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleRowSelected( sal_Int32 /* nRo
throw( IndexOutOfBoundsException, RuntimeException )
{
ensureAlive();
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleColumnSelected( sal_Int32 nColumn )
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index f4915eee443d..36db896458c9 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -156,10 +156,10 @@ ScAccessibleDataPilotControl::ScAccessibleDataPilotControl(
ScDPFieldControlBase* pDPFieldWindow)
:
ScAccessibleContextBase(rxParent, AccessibleRole::GROUP_BOX),
- mpDPFieldWindow(pDPFieldWindow)
+ mpFieldWindow(pFieldWindow)
{
- if (mpDPFieldWindow)
- maChildren.resize(mpDPFieldWindow->GetFieldCount());
+ if (mpFieldWindow)
+ maChildren.resize(mpFieldWindow->GetFieldCount());
}
ScAccessibleDataPilotControl::~ScAccessibleDataPilotControl(void)
@@ -187,13 +187,13 @@ void SAL_CALL ScAccessibleDataPilotControl::disposing()
void ScAccessibleDataPilotControl::AddField(sal_Int32 nNewIndex)
{
- sal_Bool bAdded(sal_False);
- if (static_cast<sal_uInt32>(nNewIndex) == maChildren.size())
+ sal_Bool bAdded(false);
+ if (static_cast<size_t>(nNewIndex) == maChildren.size())
{
maChildren.push_back(AccessibleWeak());
bAdded = sal_True;
}
- else if (static_cast<sal_uInt32>(nNewIndex) < maChildren.size())
+ else if (static_cast<size_t>(nNewIndex) < maChildren.size())
{
::std::vector < AccessibleWeak >::iterator aItr = maChildren.begin() + nNewIndex;
maChildren.insert(aItr, AccessibleWeak());
@@ -230,10 +230,10 @@ void ScAccessibleDataPilotControl::AddField(sal_Int32 nNewIndex)
void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
{
- sal_Bool bRemoved(sal_False);
+ sal_Bool bRemoved(false);
uno::Reference< XAccessible > xTempAcc;
ScAccessibleDataPilotButton* pField = NULL;
- if (static_cast<sal_uInt32>(nOldIndex) < maChildren.size())
+ if (static_cast<size_t>(nOldIndex) < maChildren.size())
{
xTempAcc = getAccessibleChild(nOldIndex);
pField = maChildren[nOldIndex].pAcc;
@@ -274,8 +274,8 @@ void ScAccessibleDataPilotControl::RemoveField(sal_Int32 nOldIndex)
void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex)
{
- DBG_ASSERT(static_cast<sal_uInt32>(nOldIndex) < maChildren.size() &&
- static_cast<sal_uInt32>(nNewIndex) < maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(static_cast<size_t>(nOldIndex) < maChildren.size() &&
+ static_cast<size_t>(nNewIndex) < maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nOldIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nOldIndex].pAcc)
@@ -288,7 +288,7 @@ void ScAccessibleDataPilotControl::FieldFocusChange(sal_Int32 nOldIndex, sal_Int
void ScAccessibleDataPilotControl::FieldNameChange(sal_Int32 nIndex)
{
- DBG_ASSERT(static_cast<sal_uInt32>(nIndex) < maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(static_cast<size_t>(nIndex) < maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -297,11 +297,11 @@ void ScAccessibleDataPilotControl::FieldNameChange(sal_Int32 nIndex)
void ScAccessibleDataPilotControl::GotFocus()
{
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
- sal_Int32 nIndex(mpDPFieldWindow->GetSelectedField());
+ sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
maChildren[nIndex].pAcc->SetFocused();
@@ -310,11 +310,11 @@ void ScAccessibleDataPilotControl::GotFocus()
void ScAccessibleDataPilotControl::LostFocus()
{
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
- sal_Int32 nIndex(mpDPFieldWindow->GetSelectedField());
+ sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
maChildren[nIndex].pAcc->ResetFocused();
@@ -332,13 +332,13 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDataPilotControl::getAccessib
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
Point aAbsPoint(VCLPoint(rPoint));
Point aControlEdge(GetBoundingBoxOnScreen().TopLeft());
Point aRelPoint(aAbsPoint - aControlEdge);
- size_t nChildIndex(0);
- if (mpDPFieldWindow->GetFieldIndex(aRelPoint, nChildIndex))
+ size_t nChildIndex = mpFieldWindow->GetFieldIndex( aRelPoint );
+ if( nChildIndex != PIVOTFIELD_INVALID )
xAcc = getAccessibleChild(static_cast< long >( nChildIndex ));
}
}
@@ -356,8 +356,8 @@ void SAL_CALL ScAccessibleDataPilotControl::grabFocus( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- mpDPFieldWindow->GrabFocus();
+ if (mpFieldWindow)
+ mpFieldWindow->GrabFocus();
}
sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getForeground( )
@@ -366,9 +366,9 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getForeground( )
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- nColor = mpDPFieldWindow->GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+ nColor = mpFieldWindow->GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
}
return nColor;
}
@@ -379,7 +379,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getBackground( )
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
if (mpDPFieldWindow->GetFieldType() == TYPE_SELECT)
{
@@ -400,8 +400,8 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getAccessibleChildCount(void)
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetFieldCount();
+ if (mpFieldWindow)
+ return mpFieldWindow->GetFieldCount();
else
return 0;
}
@@ -412,17 +412,17 @@ uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibl
SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xAcc;
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- if (nIndex < 0 || static_cast< size_t >( nIndex ) >= mpDPFieldWindow->GetFieldCount())
+ if (nIndex < 0 || static_cast< size_t >( nIndex ) >= mpFieldWindow->GetFieldCount())
throw lang::IndexOutOfBoundsException();
- DBG_ASSERT(static_cast<sal_uInt32>(mpDPFieldWindow->GetFieldCount()) == maChildren.size(), "did not recognize a child count change");
+ DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (!xTempAcc.is())
{
- maChildren[nIndex].pAcc = new ScAccessibleDataPilotButton(this, mpDPFieldWindow, nIndex);
+ maChildren[nIndex].pAcc = new ScAccessibleDataPilotButton(this, mpFieldWindow, nIndex);
xTempAcc = maChildren[nIndex].pAcc;
maChildren[nIndex].xWeakAcc = xTempAcc;
}
@@ -486,8 +486,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetDescription();
+ if (mpFieldWindow)
+ return mpFieldWindow->GetDescription();
return rtl::OUString();
}
@@ -497,8 +497,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetName();
+ if (mpFieldWindow)
+ return mpFieldWindow->GetName();
return rtl::OUString();
}
@@ -506,8 +506,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
Rectangle ScAccessibleDataPilotControl::GetBoundingBoxOnScreen(void) const
throw (uno::RuntimeException)
{
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetWindowExtentsRelative(NULL);
+ if (mpFieldWindow)
+ return mpFieldWindow->GetWindowExtentsRelative(NULL);
else
return Rectangle();
}
@@ -515,8 +515,8 @@ Rectangle ScAccessibleDataPilotControl::GetBoundingBoxOnScreen(void) const
Rectangle ScAccessibleDataPilotControl::GetBoundingBox(void) const
throw (uno::RuntimeException)
{
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetWindowExtentsRelative(mpDPFieldWindow->GetAccessibleParentWindow());
+ if (mpFieldWindow)
+ return mpFieldWindow->GetWindowExtentsRelative(mpFieldWindow->GetAccessibleParentWindow());
else
return Rectangle();
}
@@ -530,7 +530,7 @@ ScAccessibleDataPilotButton::ScAccessibleDataPilotButton(
ScDPFieldControlBase* pDPFieldWindow,
sal_Int32 nIndex)
: ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
- mpDPFieldWindow(pDPFieldWindow),
+ mpFieldWindow(pFieldWindow),
mnIndex(nIndex)
{
}
@@ -588,9 +588,9 @@ void SAL_CALL ScAccessibleDataPilotButton::grabFocus( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- mpDPFieldWindow->GrabFocusWithSel(getAccessibleIndexInParent());
+ mpFieldWindow->GrabFocusAndSelect(getAccessibleIndexInParent());
}
}
@@ -600,9 +600,9 @@ throw (uno::RuntimeException)
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- nColor = mpDPFieldWindow->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
+ nColor = mpFieldWindow->GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
}
return nColor;
}
@@ -613,9 +613,9 @@ throw (uno::RuntimeException)
SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- nColor = mpDPFieldWindow->GetSettings().GetStyleSettings().GetFaceColor().GetColor();
+ nColor = mpFieldWindow->GetSettings().GetStyleSettings().GetFaceColor().GetColor();
}
return nColor;
}
@@ -658,7 +658,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::OPAQUE);
pStateSet->AddState(AccessibleStateType::FOCUSABLE);
- if (mpDPFieldWindow && (sal::static_int_cast<sal_Int32>(mpDPFieldWindow->GetSelectedField()) == mnIndex))
+ if (mpFieldWindow && (sal::static_int_cast<sal_Int32>(mpFieldWindow->GetSelectedIndex()) == mnIndex))
pStateSet->AddState(AccessibleStateType::FOCUSED);
if (isShowing())
pStateSet->AddState(AccessibleStateType::SHOWING);
@@ -704,8 +704,8 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationI
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (mpDPFieldWindow)
- return mpDPFieldWindow->GetFieldText(getAccessibleIndexInParent());
+ if (mpFieldWindow)
+ return mpFieldWindow->GetFieldText(getAccessibleIndexInParent());
return rtl::OUString();
}
@@ -715,9 +715,9 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBoxOnScreen(void) const
{
Rectangle aRect(GetBoundingBox());
- if (mpDPFieldWindow)
+ if (mpFieldWindow)
{
- Point aParentPos(mpDPFieldWindow->GetWindowExtentsRelative(NULL).TopLeft());
+ Point aParentPos(mpFieldWindow->GetWindowExtentsRelative(NULL).TopLeft());
aRect.Move(aParentPos.getX(), aParentPos.getY());
}
@@ -727,8 +727,8 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBoxOnScreen(void) const
Rectangle ScAccessibleDataPilotButton::GetBoundingBox(void) const
throw (::com::sun::star::uno::RuntimeException)
{
- if (mpDPFieldWindow)
- return Rectangle (mpDPFieldWindow->GetFieldPosition(const_cast<ScAccessibleDataPilotButton*> (this)->getAccessibleIndexInParent()), mpDPFieldWindow->GetFieldSize());
+ if (mpFieldWindow)
+ return Rectangle (mpFieldWindow->GetFieldPosition(const_cast<ScAccessibleDataPilotButton*> (this)->getAccessibleIndexInParent()), mpFieldWindow->GetFieldSize());
else
return Rectangle();
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index af8190078614..fe8ef7b9decf 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -79,7 +79,7 @@ using ::std::for_each;
struct ScAccessibleShapeData
{
- ScAccessibleShapeData() : pAccShape(NULL), pRelationCell(NULL), bSelected(sal_False), bSelectable(sal_True) {}
+ ScAccessibleShapeData() : pAccShape(NULL), pRelationCell(NULL), bSelected(false), bSelectable(sal_True) {}
~ScAccessibleShapeData();
mutable ::accessibility::AccessibleShape* pAccShape;
mutable ScAddress* pRelationCell; // if it is NULL this shape is anchored on the table
@@ -126,7 +126,7 @@ struct ScShapeDataLess
}
sal_Bool LessThanSheet(const ScAccessibleShapeData* pData) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
uno::Reference< beans::XPropertySet> xProps(pData->xShape, uno::UNO_QUERY);
if (xProps.is())
{
@@ -142,7 +142,7 @@ struct ScShapeDataLess
}
sal_Bool operator()(const ScAccessibleShapeData* pData1, const ScAccessibleShapeData* pData2) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (pData1 && pData2)
{
uno::Reference< beans::XPropertySet> xProps1(pData1->xShape, uno::UNO_QUERY);
@@ -178,7 +178,7 @@ struct ScShapeDataLess
else if (!pData1 && pData2)
bResult = !LessThanSheet(pData2);
else
- bResult = sal_False;
+ bResult = false;
return bResult;
}
};
@@ -189,7 +189,7 @@ struct DeselectShape
{
if (pAccShapeData)
{
- pAccShapeData->bSelected = sal_False;
+ pAccShapeData->bSelected = false;
if (pAccShapeData->pAccShape)
pAccShapeData->pAccShape->ResetState(AccessibleStateType::SELECTED);
}
@@ -319,7 +319,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
uno::Reference<drawing::XShapes> xShapes(xSelectionSupplier->getSelection(), uno::UNO_QUERY);
if (xShapes.is())
- FindSelectedShapesChanges(xShapes, sal_False);
+ FindSelectedShapesChanges(xShapes, false);
}
if (pViewShell)
{
@@ -355,7 +355,7 @@ void ScChildrenShapes::SetDrawBroadcaster()
SfxBroadcaster* pDrawBC = mpViewShell->GetViewData()->GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
{
- StartListening(*pDrawBC, TRUE);
+ StartListening(*pDrawBC, sal_True);
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(mpViewShell->GetViewData()->GetDocument()->GetDrawLayer()) );
maShapeTreeInfo.SetSdrView(mpViewShell->GetViewData()->GetScDrawView());
@@ -429,7 +429,7 @@ sal_Bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurr
if ( pReplacement )
pReplacement->Init();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (pCurrentChild && pReplacement)
{
DBG_ASSERT(pCurrentChild->GetXShape().get() == pReplacement->GetXShape().get(), "XShape changes and should be inserted sorted");
@@ -475,7 +475,7 @@ sal_Int32 ScChildrenShapes::GetCount() const
if (pObj/* && (pObj->GetLayer() != SC_LAYER_INTERN)*/)
{
uno::Reference< drawing::XShape > xShape (pObj->getUnoShape(), uno::UNO_QUERY);
- AddShape(xShape, sal_False); //inserts in the correct order
+ AddShape(xShape, false); //inserts in the correct order
}
}
}
@@ -524,7 +524,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint)
if(mpViewShell)
{
sal_Int32 i(maZOrderedShapes.size() - 1);
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && i >= 0)
{
ScAccessibleShapeData* pShape = maZOrderedShapes[i];
@@ -560,7 +560,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint)
sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
uno::Reference<drawing::XShape>& rShape) const
{
- sal_Bool bResult (sal_False);
+ sal_Bool bResult (false);
if (maZOrderedShapes.size() <= 1)
GetCount(); // fill list with filtered shapes (no internal shapes)
@@ -568,14 +568,14 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
throw uno::RuntimeException();
if (!maZOrderedShapes[nIndex])
- return sal_False;
+ return false;
bResult = maZOrderedShapes[nIndex]->bSelected;
rShape = maZOrderedShapes[nIndex]->xShape;
#ifdef DBG_UTIL // test whether it is truly selected by a slower method
uno::Reference< drawing::XShape > xReturnShape;
- sal_Bool bDebugResult(sal_False);
+ sal_Bool bDebugResult(false);
uno::Reference<container::XIndexAccess> xIndexAccess;
xSelectionSupplier->getSelection() >>= xIndexAccess;
@@ -608,7 +608,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
sal_Bool ScChildrenShapes::SelectionChanged()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (!xSelectionSupplier.is())
throw uno::RuntimeException();
@@ -667,7 +667,7 @@ void ScChildrenShapes::DeselectAll()
catch (lang::IllegalArgumentException&)
{
DBG_ERRORFILE("nothing selected before");
- bSomethingSelected = sal_False;
+ bSomethingSelected = false;
}
if (bSomethingSelected)
@@ -748,7 +748,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC
{
SortedShapes::iterator aItr = maZOrderedShapes.begin();
SortedShapes::iterator aEndItr = maZOrderedShapes.end();
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while(!bFound && aItr != aEndItr)
{
if (*aItr)
@@ -799,7 +799,7 @@ void ScChildrenShapes::Deselect(sal_Int32 nChildIndex)
DBG_ERRORFILE("something not selectable");
}
- maZOrderedShapes[nChildIndex]->bSelected = sal_False;
+ maZOrderedShapes[nChildIndex]->bSelected = false;
if (maZOrderedShapes[nChildIndex]->pAccShape)
maZOrderedShapes[nChildIndex]->pAccShape->ResetState(AccessibleStateType::SELECTED);
}
@@ -864,7 +864,7 @@ utl::AccessibleRelationSetHelper* ScChildrenShapes::GetRelationSet(const ScAddre
sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::XShapes>& xShapes, sal_Bool /* bCommitChange */) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
SortedShapes aShapesList;
uno::Reference<container::XIndexAccess> xIndexAcc(xShapes, uno::UNO_QUERY);
if (xIndexAcc.is())
@@ -921,7 +921,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
{
if ((*aDataItr)->bSelected)
{
- (*aDataItr)->bSelected = sal_False;
+ (*aDataItr)->bSelected = false;
if ((*aDataItr)->pAccShape)
{
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::SELECTED);
@@ -1054,7 +1054,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s
if( aPropAny >>= nLayerID )
{
if( (nLayerID == SC_LAYER_INTERN) || (nLayerID == SC_LAYER_HIDDEN) )
- pShape->bSelectable = sal_False;
+ pShape->bSelectable = false;
else
pShape->bSelectable = sal_True;
}
@@ -1071,7 +1071,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s
if (xEnum.is())
{
uno::Reference<drawing::XShape> xSelectedShape;
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && xEnum->hasMoreElements())
{
xEnum->nextElement() >>= xSelectedShape;
@@ -1132,7 +1132,7 @@ void ScChildrenShapes::RemoveShape(const uno::Reference<drawing::XShape>& xShape
sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xShape, ScChildrenShapes::SortedShapes::iterator& rItr) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
ScAccessibleShapeData aShape;
aShape.xShape = xShape;
ScShapeDataLess aLess;
@@ -1143,7 +1143,7 @@ sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xSha
#ifdef DBG_UTIL // test whether it finds truly the correct shape (perhaps it is not really sorted)
SortedShapes::iterator aDebugItr = maZOrderedShapes.begin();
SortedShapes::iterator aEndItr = maZOrderedShapes.end();
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while (!bFound && aDebugItr != aEndItr)
{
if (*aDebugItr && ((*aDebugItr)->xShape.get() == xShape.get()))
@@ -1205,7 +1205,7 @@ ScAccessibleDocument::ScAccessibleDocument(
mpAccessibleSpreadsheet(NULL),
mpChildrenShapes(NULL),
mpTempAccEdit(NULL),
- mbCompleteSheetSelected(sal_False)
+ mbCompleteSheetSelected(false)
{
if (pViewShell)
{
@@ -1214,13 +1214,13 @@ ScAccessibleDocument::ScAccessibleDocument(
if( pWin )
{
pWin->AddChildEventListener( LINK( this, ScAccessibleDocument, WindowChildEventListener ));
- USHORT nCount = pWin->GetChildCount();
+ sal_uInt16 nCount = pWin->GetChildCount();
for( sal_uInt16 i=0; i < nCount; ++i )
{
Window *pChildWin = pWin->GetChild( i );
if( pChildWin &&
AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- AddChild( pChildWin->GetAccessible(), sal_False );
+ AddChild( pChildWin->GetAccessible(), false );
}
}
if (pViewShell->GetViewData()->HasEditView( eSplitPos ))
@@ -1228,7 +1228,7 @@ ScAccessibleDocument::ScAccessibleDocument(
uno::Reference<XAccessible> xAcc = new ScAccessibleEditObject(this, pViewShell->GetViewData()->GetEditView(eSplitPos),
pViewShell->GetWindowByPos(eSplitPos), GetCurrentCellName(), GetCurrentCellDescription(),
CellInEditMode);
- AddChild(xAcc, sal_False);
+ AddChild(xAcc, false);
}
}
maVisArea = GetVisibleArea_Impl();
@@ -1433,7 +1433,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& /* aEvent */ )
throw (uno::RuntimeException)
{
- sal_Bool bSelectionChanged(sal_False);
+ sal_Bool bSelectionChanged(false);
if (mpAccessibleSpreadsheet)
{
sal_Bool bOldSelected(mbCompleteSheetSelected);
@@ -1656,7 +1656,7 @@ sal_Bool SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpChildrenShapes)
{
@@ -2007,7 +2007,7 @@ void ScAccessibleDocument::FreeAccessibleSpreadsheet()
sal_Bool ScAccessibleDocument::IsTableSelected() const
{
- sal_Bool bResult (sal_False);
+ sal_Bool bResult (false);
if(mpViewShell)
{
SCTAB nTab(getVisibleTable());
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 33f06e3707d9..9535e84e0da3 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -212,7 +212,7 @@ void ScNotesChilds::Init(const Rectangle& rVisRect, sal_Int32 nOffset)
mnOffset = nOffset;
const ScPreviewLocationData& rData = mpViewShell->GetLocationData();
- mnParagraphs = AddNotes(rData, rVisRect, sal_False, maMarks);
+ mnParagraphs = AddNotes(rData, rVisRect, false, maMarks);
mnParagraphs += AddNotes(rData, rVisRect, sal_True, maNotes);
}
}
@@ -228,7 +228,7 @@ struct ScParaFound
ScParaFound(sal_Int32 nIndex) : mnIndex(nIndex) {}
sal_Bool operator() (const ScAccNote& rNote)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (rNote.mnParaCount > mnIndex)
bResult = sal_True;
else
@@ -285,7 +285,7 @@ struct ScPointFound
ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {}
sal_Bool operator() (const ScAccNote& rNote)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (maPoint.IsInside(rNote.maRect))
bResult = sal_True;
else
@@ -356,7 +356,7 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
aNote.mnParaCount = 1;
ScAccNotes::iterator aItr = rOldNotes.begin();
ScAccNotes::iterator aEndItr = rOldNotes.end();
- sal_Bool bAddNote(sal_False);
+ sal_Bool bAddNote(false);
for (sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex)
{
if (rData.GetNoteInRange(rVisRect, nIndex, bMark, aNote.maNoteCell, aNote.maRect))
@@ -428,7 +428,7 @@ sal_Int32 ScNotesChilds::CheckChanges(const ScPreviewLocationData& rData,
{
nParagraphs += aNote.mnParaCount;
rNewNotes.push_back(aNote);
- bAddNote = sal_False;
+ bAddNote = false;
}
}
}
@@ -482,7 +482,7 @@ void ScNotesChilds::DataChanged(const Rectangle& rVisRect)
mnParagraphs = CheckChanges(mpViewShell->GetLocationData(), rVisRect, sal_True, maMarks, aNewMarks, aOldParas, aNewParas);
maMarks = aNewMarks;
ScAccNotes aNewNotes;
- mnParagraphs += CheckChanges(mpViewShell->GetLocationData(), rVisRect, sal_False, maNotes, aNewNotes, aOldParas, aNewParas);
+ mnParagraphs += CheckChanges(mpViewShell->GetLocationData(), rVisRect, false, maNotes, aNewNotes, aOldParas, aNewParas);
maNotes = aNewNotes;
std::for_each(aOldParas.begin(), aOldParas.end(), ScChildGone(mpAccDoc));
@@ -535,7 +535,7 @@ private:
};
ScIAccessibleViewForwarder::ScIAccessibleViewForwarder()
- : mbValid(sal_False)
+ : mbValid(false)
{
}
@@ -657,7 +657,7 @@ struct ScShapeChildLess
{
sal_Bool operator()(const ScShapeChild& rChild1, const ScShapeChild& rChild2) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (rChild1.mxShape.is() && rChild2.mxShape.is())
bResult = (rChild1.mxShape.get() < rChild2.mxShape.get());
return bResult;
@@ -761,7 +761,7 @@ void ScShapeChilds::SetDrawBroadcaster()
{
SfxBroadcaster* pDrawBC = mpViewShell->GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
- StartListening(*pDrawBC, TRUE);
+ StartListening(*pDrawBC, sal_True);
}
}
@@ -903,7 +903,7 @@ sal_Bool ScShapeChilds::ReplaceChild (::accessibility::AccessibleShape* /* pCurr
throw (uno::RuntimeException)
{
DBG_ERRORFILE("should not be called in the page preview");
- return sal_False;
+ return false;
}
///===== Internal ========================================================
@@ -1021,7 +1021,7 @@ struct ScShapePointFound
ScShapePointFound(const awt::Point& rPoint) : maPoint(VCLPoint(rPoint)) {}
sal_Bool operator() (const ScShapeChild& rShape)
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if ((VCLRectangle(rShape.mpAccShape->getBounds())).IsInside(maPoint))
bResult = sal_True;
return bResult;
@@ -1107,9 +1107,9 @@ void ScShapeChilds::FillShapes(const Rectangle& aPixelPaintRect, const MapMode&
Window* pWin = mpViewShell->GetWindow();
if (pPage && pWin)
{
- sal_Bool bForeAdded(sal_False);
- sal_Bool bBackAdded(sal_False);
- sal_Bool bControlAdded(sal_False);
+ sal_Bool bForeAdded(false);
+ sal_Bool bBackAdded(false);
+ sal_Bool bControlAdded(false);
Rectangle aClippedPixelPaintRect(aPixelPaintRect);
if (mpAccDoc)
{
@@ -1454,7 +1454,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
}
if (!mpFooter)
{
- mpFooter = new ScAccessiblePageHeader( this, mpViewShell, sal_False, aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters - 1 );
+ mpFooter = new ScAccessiblePageHeader( this, mpViewShell, false, aCount.nBackShapes + aCount.nHeaders + aCount.nTables + aCount.nNoteParagraphs + aCount.nFooters - 1 );
mpFooter->acquire();
}
}
@@ -1550,7 +1550,7 @@ uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessi
{
if ( !mpFooter )
{
- mpFooter = new ScAccessiblePageHeader( this, mpViewShell, sal_False, nIndex );
+ mpFooter = new ScAccessiblePageHeader( this, mpViewShell, false, nIndex );
mpFooter->acquire();
}
xAccessible = mpFooter;
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 6df608748c3a..d30cd246857e 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -62,7 +62,7 @@ ScAccessibleEditObject::ScAccessibleEditObject(
mpEditView(pEditView),
mpWindow(pWin),
meObjectType(eObjectType),
- mbHasFocus(sal_False)
+ mbHasFocus(false)
{
CreateTextHelper();
SetName(rName);
@@ -91,9 +91,9 @@ void SAL_CALL ScAccessibleEditObject::disposing()
void ScAccessibleEditObject::LostFocus()
{
- mbHasFocus = sal_False;
+ mbHasFocus = false;
if (mpTextHelper)
- mpTextHelper->SetFocus(sal_False);
+ mpTextHelper->SetFocus(false);
CommitFocusLost();
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 2cc571f5e89e..e1c2d5ea6544 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -277,7 +277,7 @@ sal_Bool ScAccessiblePreviewCell::IsDefunc(
sal_Bool ScAccessiblePreviewCell::IsEditable(
const uno::Reference<XAccessibleStateSet>& /* rxParentStates */)
{
- return sal_False;
+ return false;
}
sal_Bool ScAccessiblePreviewCell::IsOpaque(
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index d55fcdd3aac3..465566216edf 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -103,7 +103,7 @@ void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint&
if (rHint.ISA( SfxSimpleHint ))
{
const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint;
- ULONG nId = rRef.GetId();
+ sal_uLong nId = rRef.GetId();
if (nId == SC_HINT_ACC_VISAREACHANGED)
{
if (mpTextHelper)
@@ -163,7 +163,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewHeaderCell::setCurrentValue( const uno::Any
throw (uno::RuntimeException)
{
// it is not possible to set a value
- return sal_False;
+ return false;
}
uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMaximumValue() throw (uno::RuntimeException)
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 342c7f68d91f..12b64837dc00 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -101,7 +101,7 @@ void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if (rHint.ISA( SfxSimpleHint ))
{
const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint;
- ULONG nId = rRef.GetId();
+ sal_uLong nId = rRef.GetId();
if ( nId == SFX_HINT_DATACHANGED )
{
// column / row layout may change with any document change,
@@ -293,7 +293,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleRowSelected( sal_Int32 n
if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
throw lang::IndexOutOfBoundsException();
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleColumnSelected( sal_Int32 nColumn )
@@ -306,7 +306,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleColumnSelected( sal_Int3
if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
throw lang::IndexOutOfBoundsException();
- return sal_False;
+ return false;
}
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
@@ -376,7 +376,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleSelected( sal_Int32 nRow
else
throw lang::IndexOutOfBoundsException();
- return sal_False;
+ return false;
}
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 7402311b93c1..94f051df2d59 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -73,7 +73,7 @@ ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
ScAccessibleSpreadsheet& rParent, const ScRange& rRange ) :
ScAccessibleTableBase( rParent.mpAccDoc, rParent.mpDoc, rRange),
- mbIsSpreadsheet( sal_False )
+ mbIsSpreadsheet( false )
{
ConstructScAccessibleSpreadsheet( rParent.mpAccDoc, rParent.mpViewShell, rParent.mnTab, rParent.meSplitPos );
}
@@ -101,9 +101,9 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
mpAccCell = 0;
meSplitPos = eSplitPos;
mnTab = nTab;
- mbHasSelection = sal_False;
- mbDelIns = sal_False;
- mbIsFocusSend = sal_False;
+ mbHasSelection = false;
+ mbDelIns = false;
+ mbIsFocusSend = false;
maVisCells = GetVisCells(GetVisArea(mpViewShell, meSplitPos));
if (mpViewShell)
{
@@ -268,7 +268,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if (!mbDelIns)
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
else
- mbDelIns = sal_False;
+ mbDelIns = false;
}
// commented out, because to use a ModelChangeEvent is not the right way
// at the moment there is no way, but the Java/Gnome Api should be extended sometime
@@ -457,7 +457,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nR
if ((nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
throw lang::IndexOutOfBoundsException();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -475,7 +475,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0))
throw lang::IndexOutOfBoundsException();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell && mpViewShell->GetViewData())
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -527,7 +527,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow,
(nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
throw lang::IndexOutOfBoundsException();
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpViewShell)
{
const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData();
@@ -648,7 +648,7 @@ void SAL_CALL
sal_Int32 nCol(getAccessibleColumn(nChildIndex));
sal_Int32 nRow(getAccessibleRow(nChildIndex));
- SelectCell(nRow, nCol, sal_False);
+ SelectCell(nRow, nCol, false);
}
}
@@ -690,7 +690,7 @@ sal_Int32 SAL_CALL
mpMarkedRanges = new ScRangeList();
ScMarkData aMarkData(mpViewShell->GetViewData()->GetMarkData());
aMarkData.MarkToMulti();
- aMarkData.FillRangeListWithMarks(mpMarkedRanges, sal_False);
+ aMarkData.FillRangeListWithMarks(mpMarkedRanges, false);
}
// is possible, because there shouldn't be overlapped ranges in it
if (mpMarkedRanges)
@@ -711,7 +711,7 @@ uno::Reference<XAccessible > SAL_CALL
if (!mpMarkedRanges)
{
mpMarkedRanges = new ScRangeList();
- mpViewShell->GetViewData()->GetMarkData().FillRangeListWithMarks(mpMarkedRanges, sal_False);
+ mpViewShell->GetViewData()->GetMarkData().FillRangeListWithMarks(mpMarkedRanges, false);
}
if (mpMarkedRanges)
{
@@ -755,7 +755,7 @@ void ScAccessibleSpreadsheet::SelectCell(sal_Int32 nRow, sal_Int32 nCol, sal_Boo
mpViewShell->SetTabNo( maRange.aStart.Tab() );
mpViewShell->DoneBlockMode( sal_True ); // continue selecting
- mpViewShell->InitBlockMode( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), maRange.aStart.Tab(), bDeselect, sal_False, sal_False );
+ mpViewShell->InitBlockMode( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), maRange.aStart.Tab(), bDeselect, false, false );
mpViewShell->SelectionChanged();
}
@@ -905,7 +905,7 @@ sal_Bool ScAccessibleSpreadsheet::IsDefunc(
sal_Bool ScAccessibleSpreadsheet::IsEditable(
const uno::Reference<XAccessibleStateSet>& /* rxParentStates */)
{
- sal_Bool bProtected(sal_False);
+ sal_Bool bProtected(false);
if (mpDoc && mpDoc->IsTabProtected(maRange.aStart.Tab()))
bProtected = sal_True;
return !bProtected;
@@ -913,7 +913,7 @@ sal_Bool ScAccessibleSpreadsheet::IsEditable(
sal_Bool ScAccessibleSpreadsheet::IsFocused()
{
- sal_Bool bFocused(sal_False);
+ sal_Bool bFocused(false);
if (mpViewShell)
{
if (mpViewShell->GetViewData()->GetActivePart() == meSplitPos)
@@ -924,7 +924,7 @@ sal_Bool ScAccessibleSpreadsheet::IsFocused()
sal_Bool ScAccessibleSpreadsheet::IsCompleteSheetSelected()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if(mpViewShell)
{
//#103800#; use a copy of MarkData
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index a4a595972238..26b188e065ab 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -234,14 +234,14 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleRowSelected( sal_Int32 /* n
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
OSL_FAIL("not implemented yet");
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleColumnSelected( sal_Int32 /* nColumn */ )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
OSL_FAIL("not implemented yet");
- return sal_False;
+ return false;
}
uno::Reference< XAccessible > SAL_CALL ScAccessibleTableBase::getAccessibleCellAt( sal_Int32 /* nRow */, sal_Int32 /* nColumn */ )
@@ -272,7 +272,7 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleSelected( sal_Int32 /* nRow
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
OSL_FAIL("not implemented yet");
- return sal_False;
+ return false;
}
//===== XAccessibleExtendedTable ========================================
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 4abf771296f2..2dbbd15c2f12 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -67,7 +67,7 @@ public:
ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell);
virtual ~ScViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -87,7 +87,7 @@ ScViewForwarder::~ScViewForwarder()
{
}
-BOOL ScViewForwarder::IsValid() const
+sal_Bool ScViewForwarder::IsValid() const
{
return mpViewShell != NULL;
}
@@ -167,7 +167,7 @@ public:
const EditView* _pEditView);
virtual ~ScEditObjectViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -187,7 +187,7 @@ ScEditObjectViewForwarder::~ScEditObjectViewForwarder()
{
}
-BOOL ScEditObjectViewForwarder::IsValid() const
+sal_Bool ScEditObjectViewForwarder::IsValid() const
{
return (mpWindow != NULL);
}
@@ -266,7 +266,7 @@ public:
ScPreviewViewForwarder(ScPreviewShell* pViewShell);
virtual ~ScPreviewViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -291,7 +291,7 @@ ScPreviewViewForwarder::~ScPreviewViewForwarder()
delete mpTableInfo;
}
-BOOL ScPreviewViewForwarder::IsValid() const
+sal_Bool ScPreviewViewForwarder::IsValid() const
{
return mpViewShell != NULL;
}
@@ -569,7 +569,7 @@ public:
ScEditViewForwarder(EditView* pEditView, Window* pWin);
virtual ~ScEditViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -595,9 +595,9 @@ ScEditViewForwarder::~ScEditViewForwarder()
{
}
-BOOL ScEditViewForwarder::IsValid() const
+sal_Bool ScEditViewForwarder::IsValid() const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (mpWindow && mpEditView)
{
bResult = sal_True;
@@ -645,7 +645,7 @@ Point ScEditViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMa
sal_Bool ScEditViewForwarder::GetSelection( ESelection& rSelection ) const
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
rSelection = mpEditView->GetSelection();
@@ -660,7 +660,7 @@ sal_Bool ScEditViewForwarder::GetSelection( ESelection& rSelection ) const
sal_Bool ScEditViewForwarder::SetSelection( const ESelection& rSelection )
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->SetSelection(rSelection);
@@ -675,7 +675,7 @@ sal_Bool ScEditViewForwarder::SetSelection( const ESelection& rSelection )
sal_Bool ScEditViewForwarder::Copy()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->Copy();
@@ -690,7 +690,7 @@ sal_Bool ScEditViewForwarder::Copy()
sal_Bool ScEditViewForwarder::Cut()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->Cut();
@@ -705,7 +705,7 @@ sal_Bool ScEditViewForwarder::Cut()
sal_Bool ScEditViewForwarder::Paste()
{
- sal_Bool bResult(sal_False);
+ sal_Bool bResult(false);
if (IsValid())
{
mpEditView->Paste();
@@ -737,7 +737,7 @@ ScAccessibleCellTextData::ScAccessibleCellTextData(ScTabViewShell* pViewShell,
mpEditViewForwarder(NULL),
mpViewShell(pViewShell),
meSplitPos(eSplitPos),
- mbViewEditEngine(sal_False),
+ mbViewEditEngine(false),
mpAccessibleCell( pAccCell )
{
}
@@ -756,7 +756,7 @@ void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL; // invalid now
@@ -1017,7 +1017,7 @@ void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint&
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpWindow = NULL;
@@ -1094,7 +1094,7 @@ IMPL_LINK(ScAccessibleEditObjectTextData, NotifyHdl, EENotify*, aNotify)
ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView, Window* pWin)
:
ScAccessibleEditObjectTextData(pEditView, pWin),
- mbEditEngineCreated(sal_False)
+ mbEditEngineCreated(false)
{
ScTextWnd* pTxtWnd = (ScTextWnd*)pWin;
@@ -1150,7 +1150,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
{
if (mbEditEngineCreated && mpEditEngine)
ResetEditMode();
- mbEditEngineCreated = sal_False;
+ mbEditEngineCreated = false;
mpEditView = pTxtWnd->GetEditView();
ScAccessibleEditObjectTextData::GetTextForwarder(); // fill the mpForwarder
@@ -1164,9 +1164,9 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
mbEditEngineCreated = sal_True;
- mpEditEngine->EnableUndo( FALSE );
+ mpEditEngine->EnableUndo( false );
mpEditEngine->SetRefMapMode( MAP_100TH_MM );
mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
@@ -1220,7 +1220,7 @@ void ScAccessibleEditLineTextData::ResetEditMode()
DELETEZ(mpForwarder);
DELETEZ(mpEditViewForwarder);
DELETEZ(mpViewForwarder);
- mbEditEngineCreated = sal_False;
+ mbEditEngineCreated = false;
}
void ScAccessibleEditLineTextData::TextChanged()
@@ -1277,7 +1277,7 @@ void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL; // invalid now
@@ -1355,7 +1355,7 @@ void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const S
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL; // invalid now
@@ -1384,9 +1384,9 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
}
- pEditEngine->EnableUndo( FALSE );
+ pEditEngine->EnableUndo( false );
if (pDocShell)
pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
else
@@ -1416,7 +1416,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
pEditEngine->SetText( maText );
}
- bDataValid = TRUE;
+ bDataValid = sal_True;
if (pEditEngine)
pEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) );
@@ -1449,7 +1449,7 @@ ScAccessibleHeaderTextData::ScAccessibleHeaderTextData(ScPreviewShell* pViewShel
mpDocSh(NULL),
mpEditObj(pEditObj),
mbHeader(bHeader),
- mbDataValid(sal_False),
+ mbDataValid(false),
meAdjust(eAdjust)
{
if (pViewShell && pViewShell->GetDocument())
@@ -1479,7 +1479,7 @@ void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL;// invalid now
@@ -1496,9 +1496,9 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, TRUE );
+ ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, sal_True );
- pHdrEngine->EnableUndo( FALSE );
+ pHdrEngine->EnableUndo( false );
pHdrEngine->SetRefMapMode( MAP_TWIP );
// default font must be set, independently of document
@@ -1564,7 +1564,7 @@ ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
msText(sText),
maCellPos(aCellPos),
mbMarkNote(bMarkNote),
- mbDataValid(sal_False)
+ mbDataValid(false)
{
if (pViewShell && pViewShell->GetDocument())
mpDocSh = (ScDocShell*) pViewShell->GetDocument()->GetDocumentShell();
@@ -1593,7 +1593,7 @@ void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
mpViewShell = NULL;// invalid now
@@ -1617,9 +1617,9 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
}
- mpEditEngine->EnableUndo( FALSE );
+ mpEditEngine->EnableUndo( false );
if (mpDocSh)
mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice());
else
@@ -1649,7 +1649,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
mpEditEngine->SetText( msText );
}
- mbDataValid = TRUE;
+ mbDataValid = sal_True;
if (mpEditEngine)
mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) );
@@ -1675,7 +1675,7 @@ class ScCsvViewForwarder : public SvxViewForwarder
public:
explicit ScCsvViewForwarder( Window* pWindow, const Rectangle& rBoundBox );
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -1689,7 +1689,7 @@ ScCsvViewForwarder::ScCsvViewForwarder( Window* pWindow, const Rectangle& rBound
{
}
-BOOL ScCsvViewForwarder::IsValid() const
+sal_Bool ScCsvViewForwarder::IsValid() const
{
return mpWindow != NULL;
}
@@ -1735,7 +1735,7 @@ void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if( nId == SFX_HINT_DYING )
{
mpWindow = NULL;
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 34102618a9bd..bd7eeaf37aa0 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -73,8 +73,8 @@ SdrOle2Obj* ScClient::GetDrawObj()
SdrOle2Obj* pOle2Obj = NULL;
String aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj );
- USHORT nPages = pModel->GetPageCount();
- for (USHORT nPNr=0; nPNr<nPages && !pOle2Obj; nPNr++)
+ sal_uInt16 nPages = pModel->GetPageCount();
+ for (sal_uInt16 nPNr=0; nPNr<nPages && !pOle2Obj; nPNr++)
{
SdrPage* pPage = pModel->GetPage(nPNr);
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -114,7 +114,7 @@ void ScClient::RequestNewObjectArea( Rectangle& aLogicRect )
aLogicRect.SetPos( aOldRect.TopLeft() );
}
- USHORT nTab = pViewSh->GetViewData()->GetTabNo();
+ sal_uInt16 nTab = pViewSh->GetViewData()->GetTabNo();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
if ( pPage && aLogicRect != aOldRect )
{
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 0ad71d1c8236..dbfe52654470 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -69,6 +69,9 @@
#include "drawview.hxx"
#include "viewdata.hxx"
#include "scmod.hxx"
+#include "chartlis.hxx"
+#include "rangeutl.hxx"
+#include "formula/grammar.hxx"
// #108584#
#include "scitems.hxx"
@@ -80,6 +83,7 @@
#include <editeng/fhgtitem.hxx>
#include <vcl/svapp.hxx>
+
using namespace com::sun::star;
// -----------------------------------------------------------------------
@@ -97,12 +101,12 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
pModel( pClipModel ),
aObjDesc( rDesc ),
pBookmark( NULL ),
- bGraphic( FALSE ),
- bGrIsBit( FALSE ),
- bOleObj( FALSE ),
+ bGraphic( false ),
+ bGrIsBit( false ),
+ bOleObj( false ),
pDragSourceView( NULL ),
nDragSourceFlags( 0 ),
- bDragWasInternal( FALSE ),
+ bDragWasInternal( false ),
nSourceDocID( 0 )
{
//
@@ -120,7 +124,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
// OLE object
//
- UINT16 nSdrObjKind = pObject->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObject->GetObjIdentifier();
if (nSdrObjKind == OBJ_OLE2)
{
// if object has no persistence it must be copied as a part of document
@@ -128,7 +132,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
{
uno::Reference< embed::XEmbedPersist > xPersObj( ((SdrOle2Obj*)pObject)->GetObjRef(), uno::UNO_QUERY );
if ( xPersObj.is() && xPersObj->hasEntry() )
- bOleObj = TRUE;
+ bOleObj = sal_True;
}
catch( uno::Exception& )
{}
@@ -141,9 +145,9 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
if (nSdrObjKind == OBJ_GRAF)
{
- bGraphic = TRUE;
+ bGraphic = sal_True;
if ( ((SdrGrafObj*)pObject)->GetGraphic().GetType() == GRAPHIC_BITMAP )
- bGrIsBit = TRUE;
+ bGrIsBit = sal_True;
}
//
@@ -236,9 +240,15 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
//
if ( pContainerShell )
{
- const ScDocument* pDoc = pContainerShell->GetDocument();
+ ScDocument* pDoc = pContainerShell->GetDocument();
if ( pDoc )
+ {
nSourceDocID = pDoc->GetDocumentID();
+ if ( pPage )
+ {
+ ScChartHelper::FillProtectedChartRangesVector( m_aProtectedChartRangesVector, pDoc, pPage );
+ }
+ }
}
}
@@ -274,9 +284,9 @@ ScDrawTransferObj* ScDrawTransferObj::GetOwnClipboard( Window* )
return pObj;
}
-BOOL lcl_HasOnlyControls( SdrModel* pModel )
+sal_Bool lcl_HasOnlyControls( SdrModel* pModel )
{
- BOOL bOnlyControls = FALSE; // default if there are no objects
+ sal_Bool bOnlyControls = false; // default if there are no objects
if ( pModel )
{
@@ -287,12 +297,12 @@ BOOL lcl_HasOnlyControls( SdrModel* pModel )
SdrObject* pObj = aIter.Next();
if ( pObj )
{
- bOnlyControls = TRUE; // only set if there are any objects at all
+ bOnlyControls = sal_True; // only set if there are any objects at all
while ( pObj )
{
if (!pObj->ISA(SdrUnoObj))
{
- bOnlyControls = FALSE;
+ bOnlyControls = false;
break;
}
pObj = aIter.Next();
@@ -377,7 +387,7 @@ void ScDrawTransferObj::AddSupportedFormats()
sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
if ( bOleObj && nFormat != SOT_FORMAT_GDIMETAFILE )
@@ -391,7 +401,7 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF
if( aOleData.GetTransferable().is() && aOleData.HasFormat( rFlavor ) )
{
- ULONG nOldSwapMode = 0;
+ sal_uLong nOldSwapMode = 0;
if( pModel )
{
@@ -427,9 +437,9 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF
DBG_ASSERT( pPv, "pPv not there..." );
aView.MarkAllObj( pPv );
if ( nFormat == SOT_FORMAT_GDIMETAFILE )
- bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( TRUE ), rFlavor );
+ bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( sal_True ), rFlavor );
else
- bOK = SetBitmap( aView.GetAllMarkedBitmap( TRUE ), rFlavor );
+ bOK = SetBitmap( aView.GetAllMarkedBitmap( sal_True ), rFlavor );
}
else if ( nFormat == SOT_FORMATSTR_ID_SVXB )
{
@@ -479,7 +489,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
{
// called from SetObject, put data into stream
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
switch (nUserObjectId)
{
case SCDRAWTRANS_TYPE_DRAWMODEL:
@@ -580,11 +590,11 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE );
// write document storage
- pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+ pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, false );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -599,7 +609,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -658,8 +668,8 @@ void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB nTab )
DBG_ASSERT(pDestPV,"PageView ?");
const SdrMarkList& rMarkList = rSource.GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrMark* pMark = rMarkList.GetMark(i);
SdrObject* pObj = pMark->GetMarkedSdrObj();
@@ -688,14 +698,14 @@ void ScDrawTransferObj::SetDragSourceObj( SdrObject* pObj, SCTAB nTab )
//! add as listener with document, delete pDragSourceView if document gone
}
-void ScDrawTransferObj::SetDragSourceFlags( USHORT nFlags )
+void ScDrawTransferObj::SetDragSourceFlags( sal_uInt16 nFlags )
{
nDragSourceFlags = nFlags;
}
void ScDrawTransferObj::SetDragWasInternal()
{
- bDragWasInternal = TRUE;
+ bDragWasInternal = sal_True;
}
SdrOle2Obj* ScDrawTransferObj::GetSingleObject()
@@ -761,7 +771,7 @@ void ScDrawTransferObj::InitDocShell()
pDocSh->SetVisArea( aDestArea );
ScViewOptions aViewOpt( pDestDoc->GetViewOptions() );
- aViewOpt.SetOption( VOPT_GRID, FALSE );
+ aViewOpt.SetOption( VOPT_GRID, false );
pDestDoc->SetViewOptions( aViewOpt );
ScViewData aViewData( pDocSh, NULL );
@@ -769,7 +779,7 @@ void ScDrawTransferObj::InitDocShell()
aViewData.SetScreen( aDestArea );
aViewData.SetCurX( 0 );
aViewData.SetCurY( 0 );
- pDocSh->UpdateOle(&aViewData, TRUE);
+ pDocSh->UpdateOle(&aViewData, sal_True);
}
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 060afa19040e..e821dc0b773b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -99,8 +99,8 @@ using namespace formula;
// STATIC DATA -----------------------------------------------------------
-BOOL ScInputHandler::bOptLoaded = FALSE; // App-Optionen ausgewertet
-BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt
+sal_Bool ScInputHandler::bOptLoaded = false; // App-Optionen ausgewertet
+sal_Bool ScInputHandler::bAutoComplete = false; // wird in KeyInput gesetzt
// delimiters (in addition to ScEditUtil) needed for range finder:
// only characters that are allowed in formulas next to references
@@ -108,7 +108,7 @@ BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt
static const sal_Char pMinDelimiters[] = " !\"";
-extern USHORT nEditAdjust; //! Member an ViewData
+extern sal_uInt16 nEditAdjust; //! Member an ViewData
//==================================================================
@@ -143,7 +143,7 @@ void ScInputHandler::InitRangeFinder( const String& rFormula )
xub_StrLen nLen = rFormula.Len();
xub_StrLen nPos = 0;
xub_StrLen nStart = 0;
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
ScRange aRange;
while ( nPos < nLen && nCount < RANGEFIND_MAX )
{
@@ -181,7 +181,7 @@ handle_r1c1:
{
String aTest = rFormula.Copy( nStart, nPos-nStart );
const ScAddress::Details aAddrDetails( pDoc, aCursorPos );
- USHORT nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails );
+ sal_uInt16 nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails );
if ( nFlags & SCA_VALID )
{
// Tabelle setzen, wenn nicht angegeben
@@ -194,13 +194,13 @@ handle_r1c1:
{
// #i73766# if a single ref was parsed, set the same "abs" flags for ref2,
// so Format doesn't output a double ref because of different flags.
- USHORT nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE );
+ sal_uInt16 nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE );
nFlags |= nAbsFlags << 4;
}
if (!nCount)
{
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
pRangeFindList = new ScRangeFindList( pDocSh->GetTitle() );
}
@@ -221,7 +221,7 @@ handle_r1c1:
if (nCount)
{
- pEngine->SetUpdateMode( TRUE );
+ pEngine->SetUpdateMode( sal_True );
pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) );
}
@@ -241,7 +241,7 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld
// Dummy-InsertText fuer Update und Paint
// dafuer muss oben die Selektion aufgehoben werden (vor QuickInsertText)
- pView->InsertText( EMPTY_STRING, FALSE );
+ pView->InsertText( EMPTY_STRING, false );
xub_StrLen nLen = pEngine->GetTextLen(0);
ESelection aSel( 0, nLen, 0, nLen );
@@ -249,7 +249,7 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld
}
}
-void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew )
+void ScInputHandler::UpdateRange( sal_uInt16 nIndex, const ScRange& rNew )
{
ScTabViewShell* pDocView = pRefViewSh ? pRefViewSh : pActiveViewSh;
if ( pDocView && pRangeFindList && nIndex < pRangeFindList->Count() )
@@ -271,17 +271,17 @@ void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew )
lcl_Replace( pTopView, aNewStr, aOldSel );
lcl_Replace( pTableView, aNewStr, aOldSel );
- bInRangeUpdate = TRUE;
+ bInRangeUpdate = sal_True;
DataChanged();
- bInRangeUpdate = FALSE;
+ bInRangeUpdate = false;
long nDiff = aNewStr.Len() - (long)(nOldEnd-nOldStart);
pData->aRef = rNew;
pData->nSelEnd = (xub_StrLen)(pData->nSelEnd + nDiff);
- USHORT nCount = (USHORT) pRangeFindList->Count();
- for (USHORT i=nIndex+1; i<nCount; i++)
+ sal_uInt16 nCount = (sal_uInt16) pRangeFindList->Count();
+ for (sal_uInt16 i=nIndex+1; i<nCount; i++)
{
ScRangeFindData* pNext = pRangeFindList->GetObject( i );
pNext->nSelStart = (xub_StrLen)(pNext->nSelStart + nDiff);
@@ -300,7 +300,7 @@ void ScInputHandler::DeleteRangeFinder()
if ( pRangeFindList && pPaintView )
{
ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
- pRangeFindList->SetHidden(TRUE);
+ pRangeFindList->SetHidden(sal_True);
pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); // wegnehmen
DELETEZ(pRangeFindList);
}
@@ -376,7 +376,7 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos )
const sal_Unicode* p0 = rStr.GetBuffer();
register const sal_Unicode* p;
const sal_Unicode* p1;
- USHORT nQuotes = 0;
+ sal_uInt16 nQuotes = 0;
if ( nPos < nLen / 2 )
{
p = p0;
@@ -393,11 +393,11 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos )
nQuotes++;
}
// Odd number of quotes that we find ourselves in a string
- BOOL bLookInString = ((nQuotes % 2) != 0);
- BOOL bInString = bLookInString;
+ sal_Bool bLookInString = ((nQuotes % 2) != 0);
+ sal_Bool bInString = bLookInString;
p = p0 + nPos;
p1 = (nDir < 0 ? p0 : p0 + nLen) ;
- USHORT nLevel = 1;
+ sal_uInt16 nLevel = 1;
while ( p != p1 && nLevel )
{
p += nDir;
@@ -435,23 +435,23 @@ ScInputHandler::ScInputHandler()
pTipVisibleSecParent( NULL ),
nTipVisibleSec( 0 ),
nAutoPos( SCPOS_INVALID ),
- bUseTab( FALSE ),
- bTextValid( TRUE ),
+ bUseTab( false ),
+ bTextValid( sal_True ),
nFormSelStart( 0 ),
nFormSelEnd( 0 ),
nAutoPar( 0 ),
eMode( SC_INPUT_NONE ),
- bModified( FALSE ),
- bSelIsRef( FALSE ),
- bFormulaMode( FALSE ),
- bInRangeUpdate( FALSE ),
- bParenthesisShown( FALSE ),
- bCreatingFuncView( FALSE ),
- bInEnterHandler( FALSE ),
- bCommandErrorShown( FALSE ),
- bInOwnChange( FALSE ),
- bProtected( FALSE ),
- bCellHasPercentFormat( FALSE ),
+ bModified( false ),
+ bSelIsRef( false ),
+ bFormulaMode( false ),
+ bInRangeUpdate( false ),
+ bParenthesisShown( false ),
+ bCreatingFuncView( false ),
+ bInEnterHandler( false ),
+ bCommandErrorShown( false ),
+ bInOwnChange( false ),
+ bProtected( false ),
+ bCellHasPercentFormat( false ),
nValidation( 0 ),
eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ),
aScaleX( 1,1 ),
@@ -459,7 +459,7 @@ ScInputHandler::ScInputHandler()
pRefViewSh( NULL ),
pLastPattern( NULL ),
pEditDefaults( NULL ),
- bLastIsSymbol( FALSE ),
+ bLastIsSymbol( false ),
pLastState( NULL ),
pDelayTimer( NULL ),
pRangeFindList( NULL )
@@ -514,7 +514,7 @@ void ScInputHandler::UpdateRefDevice()
if (!pEngine)
return;
- BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if ( bTextWysiwyg && pActiveViewSh )
pEngine->SetRefDevice( pActiveViewSh->GetViewData()->GetDocument()->GetPrinter() );
else
@@ -541,7 +541,7 @@ void ScInputHandler::ImplCreateEditEngine()
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
}
else
- pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
+ pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) );
UpdateRefDevice(); // also sets MapMode
pEngine->SetPaperSize( Size( 1000000, 1000000 ) );
@@ -554,12 +554,12 @@ void ScInputHandler::ImplCreateEditEngine()
void ScInputHandler::UpdateAutoCorrFlag()
{
- ULONG nCntrl = pEngine->GetControlWord();
- ULONG nOld = nCntrl;
+ sal_uLong nCntrl = pEngine->GetControlWord();
+ sal_uLong nOld = nCntrl;
// don't use pLastPattern here (may be invalid because of AutoStyle)
- BOOL bDisable = bLastIsSymbol || bFormulaMode;
+ sal_Bool bDisable = bLastIsSymbol || bFormulaMode;
if ( bDisable )
nCntrl &= ~EE_CNTRL_AUTOCORRECT;
else
@@ -569,12 +569,12 @@ void ScInputHandler::UpdateAutoCorrFlag()
pEngine->SetControlWord(nCntrl);
}
-void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
+void ScInputHandler::UpdateSpellSettings( sal_Bool bFromStartTab )
{
if ( pActiveViewSh )
{
ScViewData* pViewData = pActiveViewSh->GetViewData();
- BOOL bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
+ sal_Bool bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
// SetDefaultLanguage is independent of the language attributes,
// ScGlobal::GetEditDefaultLanguage is always used.
@@ -587,8 +587,8 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
if ( bFromStartTab || eMode != SC_INPUT_NONE )
{
- ULONG nCntrl = pEngine->GetControlWord();
- ULONG nOld = nCntrl;
+ sal_uLong nCntrl = pEngine->GetControlWord();
+ sal_uLong nOld = nCntrl;
if( bOnlineSpell )
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
@@ -607,7 +607,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
pEngine->SetKernAsianPunctuation( pDoc->GetAsianKerning() );
pEngine->SetDefaultHorizontalTextDirection(
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( pViewData->GetTabNo() ) );
- pEngine->SetFirstWordCapitalization( FALSE );
+ pEngine->SetFirstWordCapitalization( false );
}
// language is set separately, so the speller is needed only if online
@@ -618,7 +618,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
pEngine->SetSpeller( xXSpellChecker1 );
}
- BOOL bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
+ sal_Bool bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
if ( bHyphen ) {
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
@@ -653,16 +653,16 @@ void ScInputHandler::GetFormulaData()
// wie in ScPosWnd::FillFunctions (inputwin.cxx)
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
- USHORT nMRUCount = rOpt.GetLRUFuncListCount();
- const USHORT* pMRUList = rOpt.GetLRUFuncList();
+ sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount();
+ const sal_uInt16* pMRUList = rOpt.GetLRUFuncList();
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
- ULONG nListCount = pFuncList->GetCount();
+ sal_uLong nListCount = pFuncList->GetCount();
if (pMRUList)
{
- for (USHORT i=0; i<nMRUCount; i++)
+ for (sal_uInt16 i=0; i<nMRUCount; i++)
{
- USHORT nId = pMRUList[i];
- for (ULONG j=0; j<nListCount; j++)
+ sal_uInt16 nId = pMRUList[i];
+ for (sal_uLong j=0; j<nListCount; j++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction( j );
if ( pDesc->nFIndex == nId && pDesc->pFuncName )
@@ -677,7 +677,7 @@ void ScInputHandler::GetFormulaData()
}
}
}
- for(ULONG i=0;i<nListCount;i++)
+ for(sal_uLong i=0;i<nListCount;i++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction( i );
if ( pDesc->pFuncName )
@@ -744,7 +744,7 @@ void ScInputHandler::ShowTipCursor()
if ( bFormulaMode && pActiveView && pFormulaDataPara && pEngine->GetParagraphCount() == 1 )
{
- String aFormula = pEngine->GetText( (USHORT) 0 );
+ String aFormula = pEngine->GetText( (sal_uInt16) 0 );
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
if( aSel.nEndPos )
@@ -758,8 +758,8 @@ void ScInputHandler::ShowTipCursor()
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< ::rtl::OUString> aArgs;
- USHORT nArgs;
- BOOL bFound = FALSE;
+ sal_uInt16 nArgs;
+ sal_Bool bFound = false;
FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr());
while( !bFound )
@@ -771,40 +771,40 @@ void ScInputHandler::ShowTipCursor()
sal_Unicode c = ( nLeftParentPos > 0 ) ? aSelText.GetChar( nLeftParentPos-1 ) : 0;
if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z' )) )
continue;
- nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, TRUE);
- if( aHelper.GetNextFunc( aSelText, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
+ nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, sal_True);
+ if( aHelper.GetNextFunc( aSelText, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
{
if( ppFDesc->getFunctionName().getLength() )
{
nArgPos = aHelper.GetArgStart( aSelText, nNextFStart, 0 );
- nArgs = static_cast<USHORT>(ppFDesc->getParameterCount());
+ nArgs = static_cast<sal_uInt16>(ppFDesc->getParameterCount());
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = false;
String aNew;
- USHORT nParAutoPos = SCPOS_INVALID;
- if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, FALSE ) )
+ sal_uInt16 nParAutoPos = SCPOS_INVALID;
+ if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, false ) )
{
- USHORT nActive = 0;
- for( USHORT i=0; i < nArgs; i++ )
+ sal_uInt16 nActive = 0;
+ for( sal_uInt16 i=0; i < nArgs; i++ )
{
xub_StrLen nLength = static_cast<xub_StrLen>(aArgs[i].getLength());
if( nArgPos <= aSelText.Len()-1 )
{
nActive = i+1;
- bFlag = TRUE;
+ bFlag = sal_True;
}
nArgPos+=nLength+1;
}
if( bFlag )
{
- USHORT nCountSemicolon = aNew.GetTokenCount(cSep)-1;
- USHORT nCountDot = aNew.GetTokenCount(cSheetSep)-1;
- USHORT nStartPosition = 0;
- USHORT nEndPosition = 0;
+ sal_uInt16 nCountSemicolon = aNew.GetTokenCount(cSep)-1;
+ sal_uInt16 nCountDot = aNew.GetTokenCount(cSheetSep)-1;
+ sal_uInt16 nStartPosition = 0;
+ sal_uInt16 nEndPosition = 0;
if( !nCountSemicolon )
{
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -815,8 +815,8 @@ void ScInputHandler::ShowTipCursor()
}
else if( !nCountDot )
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -837,8 +837,8 @@ void ScInputHandler::ShowTipCursor()
}
else
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -866,13 +866,13 @@ void ScInputHandler::ShowTipCursor()
{
aNew.Insert( 0x25BA, nStartPosition );
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
{
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -880,21 +880,21 @@ void ScInputHandler::ShowTipCursor()
}
else
{
- USHORT nPosition = 0;
+ sal_uInt16 nPosition = 0;
String aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
if( aText.GetChar( aSel.nEndPos-1 ) == '=' )
{
break;
}
String aNew;
- USHORT nParAutoPos = SCPOS_INVALID;
+ sal_uInt16 nParAutoPos = SCPOS_INVALID;
nPosition = aText.Len()+1;
- if( pFormulaDataPara->FindText( aText, aNew, nParAutoPos, FALSE ) )
+ if( pFormulaDataPara->FindText( aText, aNew, nParAutoPos, false ) )
{
if( aFormula.GetChar( nPosition ) =='(' )
{
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
else
break;
@@ -925,7 +925,7 @@ void ScInputHandler::ShowTip( const String& rText )
aPos = pTipVisibleParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
+ sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
nTipVisible = Help::ShowTip(pTipVisibleParent, aRect, rText, nAlign);
pTipVisibleParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
}
@@ -949,7 +949,7 @@ void ScInputHandler::ShowTipBelow( const String& rText )
}
aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER;
+ sal_uInt16 nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER;
nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign);
pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
}
@@ -965,7 +965,7 @@ void ScInputHandler::UseFormulaData()
// Formeln duerfen nur 1 Absatz haben
if ( pActiveView && pFormulaData && pEngine->GetParagraphCount() == 1 )
{
- String aTotal = pEngine->GetText( (USHORT) 0 );
+ String aTotal = pEngine->GetText( (sal_uInt16) 0 );
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
@@ -988,15 +988,15 @@ void ScInputHandler::UseFormulaData()
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< ::rtl::OUString> aArgs;
- USHORT nArgs;
- BOOL bFound = FALSE;
+ sal_uInt16 nArgs;
+ sal_Bool bFound = false;
String aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
if ( aText.Len() )
{
String aNew;
nAutoPos = SCPOS_INVALID;
- if ( pFormulaData->FindText( aText, aNew, nAutoPos, FALSE ) )
+ if ( pFormulaData->FindText( aText, aNew, nAutoPos, false ) )
{
ShowTip( aNew );
aAutoSearch = aText;
@@ -1015,40 +1015,40 @@ void ScInputHandler::UseFormulaData()
sal_Unicode c = ( nLeftParentPos > 0 ) ? aFormula.GetChar( nLeftParentPos-1 ) : 0;
if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z') ) )
continue;
- nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, TRUE);
- if( aHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
+ nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, sal_True);
+ if( aHelper.GetNextFunc( aFormula, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
{
if( ppFDesc->getFunctionName().getLength() )
{
nArgPos = aHelper.GetArgStart( aFormula, nNextFStart, 0 );
- nArgs = static_cast<USHORT>(ppFDesc->getParameterCount());
+ nArgs = static_cast<sal_uInt16>(ppFDesc->getParameterCount());
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = false;
String aNew;
- USHORT nParAutoPos = SCPOS_INVALID;
- if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, FALSE ) )
+ sal_uInt16 nParAutoPos = SCPOS_INVALID;
+ if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, false ) )
{
- USHORT nActive = 0;
- for( USHORT i=0; i < nArgs; i++ )
+ sal_uInt16 nActive = 0;
+ for( sal_uInt16 i=0; i < nArgs; i++ )
{
xub_StrLen nLength = static_cast<xub_StrLen>(aArgs[i].getLength());
if( nArgPos <= aFormula.Len()-1 )
{
nActive = i+1;
- bFlag = TRUE;
+ bFlag = sal_True;
}
nArgPos+=nLength+1;
}
if( bFlag )
{
- USHORT nCountSemicolon = aNew.GetTokenCount(cSep)-1;
- USHORT nCountDot = aNew.GetTokenCount(cSheetSep)-1;
- USHORT nStartPosition = 0;
- USHORT nEndPosition = 0;
+ sal_uInt16 nCountSemicolon = aNew.GetTokenCount(cSep)-1;
+ sal_uInt16 nCountDot = aNew.GetTokenCount(cSheetSep)-1;
+ sal_uInt16 nStartPosition = 0;
+ sal_uInt16 nEndPosition = 0;
if( !nCountSemicolon )
{
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -1059,8 +1059,8 @@ void ScInputHandler::UseFormulaData()
}
else if( !nCountDot )
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -1081,8 +1081,8 @@ void ScInputHandler::UseFormulaData()
}
else
{
- USHORT nCount = 0;
- for( USHORT i = 0; i < aNew.Len(); i++ )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; i < aNew.Len(); i++ )
{
sal_Unicode cNext = aNew.GetChar( i );
if( cNext == '(' )
@@ -1110,13 +1110,13 @@ void ScInputHandler::UseFormulaData()
{
aNew.Insert( 0x25BA, nStartPosition );
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
{
ShowTipBelow( aNew );
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1126,7 +1126,7 @@ void ScInputHandler::UseFormulaData()
}
}
-void ScInputHandler::NextFormulaEntry( BOOL bBack )
+void ScInputHandler::NextFormulaEntry( sal_Bool bBack )
{
EditView* pActiveView = pTopView ? pTopView : pTableView;
if ( pActiveView && pFormulaData )
@@ -1142,7 +1142,7 @@ void ScInputHandler::NextFormulaEntry( BOOL bBack )
pActiveView->ShowCursor();
}
-void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParInserted )
+void lcl_CompleteFunction( EditView* pView, const String& rInsert, sal_Bool& rParInserted )
{
if (pView)
{
@@ -1154,7 +1154,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
String aInsStr = rInsert;
xub_StrLen nInsLen = aInsStr.Len();
- BOOL bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '('
+ sal_Bool bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '('
&& aInsStr.GetChar(nInsLen-1) == ')' );
if ( bDoParen )
{
@@ -1162,16 +1162,16 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
// schon eine Klammer steht (z.B. wenn der Funktionsname geaendert wurde).
ESelection aWordSel = pView->GetSelection();
- String aOld = pView->GetEditEngine()->GetText((USHORT)0);
+ String aOld = pView->GetEditEngine()->GetText((sal_uInt16)0);
sal_Unicode cNext = aOld.GetChar(aWordSel.nEndPos);
if ( cNext == '(' )
{
- bDoParen = FALSE;
+ bDoParen = false;
aInsStr.Erase( nInsLen - 2 ); // Klammern weglassen
}
}
- pView->InsertText( aInsStr, FALSE );
+ pView->InsertText( aInsStr, false );
if ( bDoParen ) // Cursor zwischen die Klammern setzen
{
@@ -1180,7 +1180,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
--aSel.nEndPos;
pView->SetSelection(aSel);
- rParInserted = TRUE;
+ rParInserted = sal_True;
}
}
}
@@ -1193,7 +1193,7 @@ void ScInputHandler::PasteFunctionData()
if (pData)
{
String aInsert = pData->GetString();
- BOOL bParInserted = FALSE;
+ sal_Bool bParInserted = false;
DataChanging(); // kann nicht neu sein
lcl_CompleteFunction( pTopView, aInsert, bParInserted );
@@ -1232,7 +1232,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
// wenn ein Name eigentlich als Bereich in die Gesamt-Formel
// eingefuegt wird, bei der Einzeldarstellung aber als
// single-Zellbezug interpretiert wird
- BOOL bColRowName = pCell->HasColRowName();
+ sal_Bool bColRowName = pCell->HasColRowName();
if ( bColRowName )
{
// ColRowName im RPN-Code?
@@ -1246,10 +1246,10 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
pCell = new ScFormulaCell( pDoc, rPos, aBraced );
}
else
- bColRowName = FALSE;
+ bColRowName = false;
}
- USHORT nErrCode = pCell->GetErrCode();
+ sal_uInt16 nErrCode = pCell->GetErrCode();
if ( nErrCode == 0 )
{
SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable());
@@ -1257,7 +1257,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
if ( pCell->IsValue() )
{
double n = pCell->GetValue();
- ULONG nFormat = aFormatter.GetStandardFormat( n, 0,
+ sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0,
pCell->GetFormatType(), ScGlobal::eLnge );
aFormatter.GetInputLineString( n, nFormat, aValue );
//! display OutputString but insert InputLineString
@@ -1267,7 +1267,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
String aStr;
pCell->GetString( aStr );
- ULONG nFormat = aFormatter.GetStandardFormat(
+ sal_uLong nFormat = aFormatter.GetStandardFormat(
pCell->GetFormatType(), ScGlobal::eLnge);
aFormatter.GetOutputString( aStr, nFormat,
aValue, &pColor );
@@ -1297,7 +1297,7 @@ void ScInputHandler::FormulaPreview()
{
String aPart = pActiveView->GetSelected();
if (!aPart.Len())
- aPart = pEngine->GetText((USHORT)0);
+ aPart = pEngine->GetText((sal_uInt16)0);
ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument();
aValue = lcl_Calculate( aPart, pDoc, aCursorPos );
}
@@ -1360,9 +1360,9 @@ void ScInputHandler::PasteManualTip()
}
}
if ( pTopView )
- pTopView->InsertText( aInsert, TRUE );
+ pTopView->InsertText( aInsert, sal_True );
if ( pTableView )
- pTableView->InsertText( aInsert, TRUE );
+ pTableView->InsertText( aInsert, sal_True );
DataChanged();
}
@@ -1380,7 +1380,7 @@ void ScInputHandler::AutoParAdded()
++nAutoPar; // closing parenthesis can be overwritten
}
-BOOL ScInputHandler::CursorAtClosingPar()
+sal_Bool ScInputHandler::CursorAtClosingPar()
{
// test if the cursor is before a closing parenthesis
@@ -1390,11 +1390,11 @@ BOOL ScInputHandler::CursorAtClosingPar()
{
ESelection aSel = pActiveView->GetSelection();
xub_StrLen nPos = aSel.nStartPos;
- String aFormula = pEngine->GetText((USHORT)0);
+ String aFormula = pEngine->GetText((sal_uInt16)0);
if ( nPos < aFormula.Len() && aFormula.GetChar(nPos) == ')' )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScInputHandler::SkipClosingPar()
@@ -1437,11 +1437,11 @@ void ScInputHandler::GetColData()
else
{
pColumnData = new TypedScStrCollection;
- pColumnData->SetCaseSensitive( TRUE ); // equal strings are handled in FindText
+ pColumnData->SetCaseSensitive( sal_True ); // equal strings are handled in FindText
}
pDoc->GetDataEntries( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- *pColumnData, TRUE );
+ *pColumnData, sal_True );
}
}
@@ -1455,7 +1455,7 @@ void ScInputHandler::UseColData() // beim Tippen
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( aSel.nEndPara+1 == nParCnt )
{
xub_StrLen nParLen = pEngine->GetTextLen( aSel.nEndPara );
@@ -1466,7 +1466,7 @@ void ScInputHandler::UseColData() // beim Tippen
{
String aNew;
nAutoPos = SCPOS_INVALID; // nix
- if ( pColumnData->FindText( aText, aNew, nAutoPos, FALSE ) )
+ if ( pColumnData->FindText( aText, aNew, nAutoPos, false ) )
{
// durch dBase Import etc. koennen Umbrueche im String sein,
// das wuerde hier mehrere Absaetze ergeben -> nicht gut
@@ -1477,7 +1477,7 @@ void ScInputHandler::UseColData() // beim Tippen
//! genaue Ersetzung im EnterHandler !!!
// ein Space zwischen Absaetzen:
- ULONG nEdLen = pEngine->GetTextLen() + nParCnt - 1;
+ sal_uLong nEdLen = pEngine->GetTextLen() + nParCnt - 1;
String aIns = aNew.Copy( (xub_StrLen)nEdLen );
// selection must be "backwards", so the cursor stays behind the last
@@ -1488,12 +1488,12 @@ void ScInputHandler::UseColData() // beim Tippen
// when editing in input line, apply to both edit views
if ( pTableView )
{
- pTableView->InsertText( aIns, FALSE );
+ pTableView->InsertText( aIns, false );
pTableView->SetSelection( aSelection );
}
if ( pTopView )
{
- pTopView->InsertText( aIns, FALSE );
+ pTopView->InsertText( aIns, false );
pTopView->SetSelection( aSelection );
}
@@ -1505,11 +1505,11 @@ void ScInputHandler::UseColData() // beim Tippen
// verschlucken, wenn noch etwas kommt
String aDummy;
- USHORT nNextPos = nAutoPos;
- bUseTab = pColumnData->FindText( aText, aDummy, nNextPos, FALSE );
+ sal_uInt16 nNextPos = nAutoPos;
+ bUseTab = pColumnData->FindText( aText, aDummy, nNextPos, false );
}
else
- bUseTab = TRUE;
+ bUseTab = sal_True;
}
}
}
@@ -1517,7 +1517,7 @@ void ScInputHandler::UseColData() // beim Tippen
}
}
-void ScInputHandler::NextAutoEntry( BOOL bBack )
+void ScInputHandler::NextAutoEntry( sal_Bool bBack )
{
EditView* pActiveView = pTopView ? pTopView : pTableView;
if ( pActiveView && pColumnData )
@@ -1528,7 +1528,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( aSel.nEndPara+1 == nParCnt && aSel.nStartPara == aSel.nEndPara )
{
String aText = GetEditText(pEngine);
@@ -1539,7 +1539,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
String aNew;
if ( pColumnData->FindText( aAutoSearch, aNew, nAutoPos, bBack ) )
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
lcl_RemoveLineEnd( aNew );
String aIns = aNew.Copy( aAutoSearch.Len() );
@@ -1548,7 +1548,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
if ( pTableView )
{
pTableView->DeleteSelected();
- pTableView->InsertText( aIns, FALSE );
+ pTableView->InsertText( aIns, false );
pTableView->SetSelection( ESelection(
aSel.nEndPara, aSel.nStartPos + aIns.Len(),
aSel.nEndPara, aSel.nStartPos ) );
@@ -1556,13 +1556,13 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
if ( pTopView )
{
pTopView->DeleteSelected();
- pTopView->InsertText( aIns, FALSE );
+ pTopView->InsertText( aIns, false );
pTopView->SetSelection( ESelection(
aSel.nEndPara, aSel.nStartPos + aIns.Len(),
aSel.nEndPara, aSel.nStartPos ) );
}
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
else
{
@@ -1591,7 +1591,7 @@ void ScInputHandler::UpdateParenthesis()
//! Klammer-Hervorhebung einzeln abschaltbar ????
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( bFormulaMode && eMode != SC_INPUT_TOP )
{
if ( pTableView && !pTableView->HasSelection() ) // Selektion ist immer unten
@@ -1602,7 +1602,7 @@ void ScInputHandler::UpdateParenthesis()
// Das Zeichen links vom Cursor wird angeschaut
xub_StrLen nPos = aSel.nStartPos - 1;
- String aFormula = pEngine->GetText((USHORT)0);
+ String aFormula = pEngine->GetText((sal_uInt16)0);
sal_Unicode c = aFormula.GetChar(nPos);
if ( c == '(' || c == ')' )
{
@@ -1616,8 +1616,8 @@ void ScInputHandler::UpdateParenthesis()
if (bParenthesisShown)
{
// alte Hervorhebung wegnehmen
- USHORT nCount = pEngine->GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pEngine->GetParagraphCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
pEngine->QuickRemoveCharAttribs( i, EE_CHAR_WEIGHT );
}
@@ -1627,9 +1627,9 @@ void ScInputHandler::UpdateParenthesis()
pEngine->QuickSetAttribs( aSet, aSelOther );
// Dummy-InsertText fuer Update und Paint (Selektion ist leer)
- pTableView->InsertText( EMPTY_STRING, FALSE );
+ pTableView->InsertText( EMPTY_STRING, false );
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1643,8 +1643,8 @@ void ScInputHandler::UpdateParenthesis()
if ( bParenthesisShown && !bFound && pTableView )
{
- USHORT nCount = pEngine->GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pEngine->GetParagraphCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
pTableView->RemoveCharAttribs( i, EE_CHAR_WEIGHT );
}
@@ -1666,12 +1666,12 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron
// Trotzdem wird immerhin der Editmodus beendet
EnterHandler();
- bFormulaMode = FALSE;
+ bFormulaMode = false;
pRefViewSh = NULL;
SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
@@ -1700,11 +1700,11 @@ void ScInputHandler::UpdateActiveView()
pActiveViewSh->GetWindowByPos( pActiveViewSh->GetViewData()->GetEditActivePart() ) :
NULL;
- USHORT nCount = pEngine->GetViewCount();
+ sal_uInt16 nCount = pEngine->GetViewCount();
if (nCount > 0)
{
pTableView = pEngine->GetView(0);
- for (USHORT i=1; i<nCount; i++)
+ for (sal_uInt16 i=1; i<nCount; i++)
{
EditView* pThis = pEngine->GetView(i);
Window* pWin = pThis->GetWindow();
@@ -1721,7 +1721,7 @@ void ScInputHandler::UpdateActiveView()
pTopView = NULL;
}
-void ScInputHandler::StopInputWinEngine( BOOL bAll )
+void ScInputHandler::StopInputWinEngine( sal_Bool bAll )
{
if (pInputWin)
pInputWin->StopEditEngine( bAll );
@@ -1739,9 +1739,9 @@ void ScInputHandler::ForgetLastPattern()
{
pLastPattern = NULL;
if ( !pLastState && pActiveViewSh )
- pActiveViewSh->UpdateInputHandler( TRUE ); // Status neu holen
+ pActiveViewSh->UpdateInputHandler( sal_True ); // Status neu holen
else
- NotifyChange( pLastState, TRUE );
+ NotifyChange( pLastState, sal_True );
}
void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
@@ -1751,7 +1751,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
{
case SVX_HOR_JUSTIFY_STANDARD:
{
- BOOL bNumber = FALSE;
+ sal_Bool bNumber = false;
if (cTyped) // neu angefangen
bNumber = (cTyped>='0' && cTyped<='9'); // nur Ziffern sind Zahlen
else if ( pActiveViewSh )
@@ -1776,7 +1776,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
break;
}
- BOOL bAsianVertical = pLastPattern &&
+ sal_Bool bAsianVertical = pLastPattern &&
((const SfxBoolItem&)pLastPattern->GetItem( ATTR_STACKED )).GetValue() &&
((const SfxBoolItem&)pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( bAsianVertical )
@@ -1788,7 +1788,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
pEngine->SetDefaults( *pEditDefaults );
- nEditAdjust = sal::static_int_cast<USHORT>(eSvxAdjust); //! set at ViewData or with PostEditView
+ nEditAdjust = sal::static_int_cast<sal_uInt16>(eSvxAdjust); //! set at ViewData or with PostEditView
pEngine->SetVertical( bAsianVertical );
}
@@ -1797,16 +1797,16 @@ void ScInputHandler::RemoveAdjust()
{
// harte Ausrichtungs-Attribute loeschen
- BOOL bUndo = pEngine->IsUndoEnabled();
+ sal_Bool bUndo = pEngine->IsUndoEnabled();
if ( bUndo )
- pEngine->EnableUndo( FALSE );
+ pEngine->EnableUndo( false );
// non-default paragraph attributes (e.g. from clipboard)
// must be turned into character attributes
pEngine->RemoveParaAttribs();
if ( bUndo )
- pEngine->EnableUndo( TRUE );
+ pEngine->EnableUndo( sal_True );
}
@@ -1814,14 +1814,14 @@ void ScInputHandler::RemoveRangeFinder()
{
// pRangeFindList und Farben loeschen
- pEngine->SetUpdateMode(FALSE);
- USHORT nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein
- for (USHORT i=0; i<nCount; i++)
+ pEngine->SetUpdateMode(false);
+ sal_uInt16 nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein
+ for (sal_uInt16 i=0; i<nCount; i++)
pEngine->QuickRemoveCharAttribs( i, EE_CHAR_COLOR );
- pEngine->SetUpdateMode(TRUE);
+ pEngine->SetUpdateMode(sal_True);
EditView* pActiveView = pTopView ? pTopView : pTableView;
- pActiveView->ShowCursor( FALSE, TRUE );
+ pActiveView->ShowCursor( false, sal_True );
DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle
}
@@ -1853,7 +1853,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if (!aTester.IsEditable())
{
- bProtected = TRUE;
+ bProtected = true;
// We allow read-only input mode activation when explicit cell
// activation is requested (double-click or F2) and if it's not
// part of an array.
@@ -1861,7 +1861,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if (bShowError)
{
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( true );
UpdateFormulaMode();
if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) )
{
@@ -1870,7 +1870,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// Set the flag before showing the error message because the command handler
// for the next IME command may be called when showing the dialog.
if ( bFromCommand )
- bCommandErrorShown = TRUE;
+ bCommandErrorShown = true;
pActiveViewSh->GetActiveWin()->GrabFocus();
pActiveViewSh->ErrorMessage(aTester.GetMessageId());
@@ -1882,7 +1882,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if (bStartInputMode)
{
// UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise)
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
// Attribute in EditEngine uebernehmen
@@ -1896,18 +1896,18 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
const SfxItemSet& rAttrSet = pPattern->GetItemSet();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) )
{
- ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT ==
pDoc->GetFormatTable()->GetType( nFormat ) );
}
else
- bCellHasPercentFormat = FALSE; // Default: kein Prozent
+ bCellHasPercentFormat = false; // Default: kein Prozent
// Gueltigkeit angegeben?
- if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, true, &pItem ) )
nValidation = ((const SfxUInt32Item*)pItem)->GetValue();
else
nValidation = 0;
@@ -1954,7 +1954,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// UpdateSpellSettings enables online spelling if needed
// -> also call if attributes are unchanged
- UpdateSpellSettings( TRUE ); // uses pLastPattern
+ UpdateSpellSettings( true ); // uses pLastPattern
// Edit-Engine fuellen
@@ -1963,7 +1963,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
{
pEngine->SetText(aCurrentText);
aStr = aCurrentText;
- bTextValid = FALSE;
+ bTextValid = false;
aCurrentText.Erase();
}
else
@@ -2005,7 +2005,7 @@ void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel )
DBG_ASSERT( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" );
EditEngine* pEngine = pEditView->GetEditEngine();
- USHORT nCount = pEngine->GetParagraphCount();
+ sal_uInt16 nCount = pEngine->GetParagraphCount();
if (nCount > 1)
{
xub_StrLen nParLen = pEngine->GetTextLen(rSel.nStartPara);
@@ -2064,18 +2064,18 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
return 0;
}
-BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand ) // return TRUE = new view created
+sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand ) // return sal_True = new view created
{
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
- bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
+ bInOwnChange = true; // disable ModifyHdl (reset in DataChanged)
if ( eMode == SC_INPUT_NONE )
return StartTable( cTyped, bFromCommand, false );
else
- return FALSE;
+ return false;
}
-void ScInputHandler::DataChanged( BOOL bFromTopNotify )
+void ScInputHandler::DataChanged( sal_Bool bFromTopNotify )
{
ImplCreateEditEngine();
@@ -2086,7 +2086,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
{
// table EditEngine is formatted below, input line needs formatting after paste
// #i20282# not when called from the input line's modify handler
- pTopView->GetEditEngine()->QuickFormatDoc( TRUE );
+ pTopView->GetEditEngine()->QuickFormatDoc( sal_True );
// #i23720# QuickFormatDoc hides the cursor, but can't show it again because it
// can't safely access the EditEngine's current view, so the cursor has to be
@@ -2094,8 +2094,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
pTopView->ShowCursor();
}
- bModified = TRUE;
- bSelIsRef = FALSE;
+ bModified = sal_True;
+ bSelIsRef = false;
if ( pRangeFindList && !bInRangeUpdate )
RemoveRangeFinder(); // Attribute und Markierung loeschen
@@ -2124,7 +2124,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
{
ScViewData* pViewData = pActiveViewSh->GetViewData();
- BOOL bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer
+ sal_Bool bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer
if (!bNeedGrow)
{
// Cursor vor dem Ende?
@@ -2145,8 +2145,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
}
UpdateFormulaMode();
- bTextValid = FALSE; // Aenderungen sind nur in der Edit-Engine
- bInOwnChange = FALSE;
+ bTextValid = false; // Aenderungen sind nur in der Edit-Engine
+ bInOwnChange = false;
}
void ScInputHandler::UpdateFormulaMode()
@@ -2154,19 +2154,19 @@ void ScInputHandler::UpdateFormulaMode()
SfxApplication* pSfxApp = SFX_APP();
if ( pEngine->GetParagraphCount() == 1 &&
- ( pEngine->GetText((USHORT)0).GetChar(0) == '=' ||
- pEngine->GetText((USHORT)0).GetChar(0) == '+' ||
- pEngine->GetText((USHORT)0).GetChar(0) == '-' ) &&
+ ( pEngine->GetText((sal_uInt16)0).GetChar(0) == '=' ||
+ pEngine->GetText((sal_uInt16)0).GetChar(0) == '+' ||
+ pEngine->GetText((sal_uInt16)0).GetChar(0) == '-' ) &&
!bProtected )
{
if (!bFormulaMode)
{
- bFormulaMode = TRUE;
+ bFormulaMode = sal_True;
pRefViewSh = pActiveViewSh;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(this);
if (pInputWin)
- pInputWin->SetFormulaMode(TRUE);
+ pInputWin->SetFormulaMode(sal_True);
if ( bAutoComplete )
GetFormulaData();
@@ -2180,12 +2180,12 @@ void ScInputHandler::UpdateFormulaMode()
if (bFormulaMode)
{
ShowRefFrame();
- bFormulaMode = FALSE;
+ bFormulaMode = false;
pRefViewSh = NULL;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
}
@@ -2199,13 +2199,13 @@ void ScInputHandler::ShowRefFrame()
ScTabViewShell* pVisibleSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
if ( pRefViewSh && pRefViewSh != pVisibleSh )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SfxViewFrame* pRefFrame = pRefViewSh->GetViewFrame();
SfxViewFrame* pOneFrame = SfxViewFrame::GetFirst();
while ( pOneFrame && !bFound )
{
if ( pOneFrame == pRefFrame )
- bFound = TRUE;
+ bFound = sal_True;
pOneFrame = SfxViewFrame::GetNext( *pOneFrame );
}
@@ -2277,7 +2277,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
if (bProtected)
{
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( sal_True );
if (pActiveViewSh)
pActiveViewSh->GetActiveWin()->GrabFocus();
return;
@@ -2287,12 +2287,12 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
// Disable paste mode when edit mode starts.
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = true; // disable ModifyHdl (reset below)
ScInputMode eOldMode = eMode;
eMode = eNewMode;
if (eOldMode == SC_INPUT_TOP && eNewMode != eOldMode)
- StopInputWinEngine( FALSE );
+ StopInputWinEngine( false );
if (eMode==SC_INPUT_TOP || eMode==SC_INPUT_TABLE)
{
@@ -2305,11 +2305,11 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
}
}
- USHORT nPara = pEngine->GetParagraphCount()-1;
+ sal_uInt16 nPara = pEngine->GetParagraphCount()-1;
xub_StrLen nLen = pEngine->GetText(nPara).Len();
- USHORT nCount = pEngine->GetViewCount();
+ sal_uInt16 nCount = pEngine->GetViewCount();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if ( eMode == SC_INPUT_TABLE && eOldMode == SC_INPUT_TOP )
{
@@ -2320,7 +2320,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
pEngine->GetView(i)->
SetSelection( ESelection( nPara, nLen, nPara, nLen ) );
}
- pEngine->GetView(i)->ShowCursor(FALSE);
+ pEngine->GetView(i)->ShowCursor(false);
}
}
@@ -2328,34 +2328,34 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
if (eMode==SC_INPUT_TABLE || eMode==SC_INPUT_TYPE)
{
if (pTableView)
- pTableView->SetEditEngineUpdateMode(TRUE);
+ pTableView->SetEditEngineUpdateMode(sal_True);
}
else
{
if (pTopView)
- pTopView->SetEditEngineUpdateMode(TRUE);
+ pTopView->SetEditEngineUpdateMode(sal_True);
}
if (eNewMode != eOldMode)
UpdateFormulaMode();
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
//----------------------------------------------------------------------------------------
-// lcl_IsNumber - TRUE, wenn nur Ziffern (dann keine Autokorrektur)
+// lcl_IsNumber - sal_True, wenn nur Ziffern (dann keine Autokorrektur)
-BOOL lcl_IsNumber(const String& rString)
+sal_Bool lcl_IsNumber(const String& rString)
{
xub_StrLen nLen = rString.Len();
for (xub_StrLen i=0; i<nLen; i++)
{
sal_Unicode c = rString.GetChar(i);
if ( c < '0' || c > '9' )
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
void lcl_SelectionToEnd( EditView* pView )
@@ -2363,7 +2363,7 @@ void lcl_SelectionToEnd( EditView* pView )
if ( pView )
{
EditEngine* pEngine = pView->GetEditEngine();
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
nParCnt = 1;
ESelection aSel( nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); // empty selection, cursor at the end
@@ -2371,24 +2371,24 @@ void lcl_SelectionToEnd( EditView* pView )
}
}
-void ScInputHandler::EnterHandler( BYTE nBlockMode )
+void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
{
// Bei Makro-Aufrufen fuer Gueltigkeit kann Tod und Teufel passieren,
// darum dafuer sorgen, dass EnterHandler nicht verschachtelt gerufen wird:
if (bInEnterHandler) return;
- bInEnterHandler = TRUE;
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInEnterHandler = sal_True;
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
ImplCreateEditEngine();
- BOOL bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
+ sal_Bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
SfxApplication* pSfxApp = SFX_APP();
EditTextObject* pObject = NULL;
ScPatternAttr* pCellAttrs = NULL;
- BOOL bAttrib = FALSE; // Formatierung vorhanden ?
- BOOL bForget = FALSE; // wegen Gueltigkeit streichen ?
+ sal_Bool bAttrib = false; // Formatierung vorhanden ?
+ sal_Bool bForget = false; // wegen Gueltigkeit streichen ?
String aString = GetEditText(pEngine);
EditView* pActiveView = pTopView ? pTopView : pTableView;
@@ -2423,7 +2423,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
{
// #i67990# don't use pLastPattern in EnterHandler
const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() );
- BOOL bOk = pData->IsDataValid( aString, *pPattern, aCursorPos );
+ sal_Bool bOk = pData->IsDataValid( aString, *pPattern, aCursorPos );
if (!bOk)
{
@@ -2435,7 +2435,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
Window* pParent = Application::GetDefDialogParent();
if ( pData->DoError( pParent, aString, aCursorPos ) )
- bForget = TRUE; // Eingabe nicht uebernehmen
+ bForget = sal_True; // Eingabe nicht uebernehmen
}
}
}
@@ -2452,12 +2452,12 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
// or an invalid action - normal cell input is always aborted
pActiveViewSh->DataPilotInput( aCursorPos, aString );
- bForget = TRUE;
+ bForget = sal_True;
}
}
pEngine->CompleteOnlineSpelling();
- BOOL bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
+ sal_Bool bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
if ( bSpellErrors )
{
// #i3820# If the spell checker flags numerical input as error,
@@ -2474,7 +2474,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
double nVal;
if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) )
{
- bSpellErrors = FALSE; // ignore the spelling errors
+ bSpellErrors = false; // ignore the spelling errors
}
}
}
@@ -2482,17 +2482,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
// After RemoveAdjust, the EditView must not be repainted (has wrong font size etc).
// SetUpdateMode must come after CompleteOnlineSpelling.
// The view is hidden in any case below (Broadcast).
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
if ( bModified && !bForget ) // was wird eingeben (Text/Objekt) ?
{
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
nParCnt = 1;
bool bUniformAttribs = true;
SfxItemSet aPara1Attribs = pEngine->GetAttribs(0, 0, pEngine->GetTextLen(0));
- for (USHORT nPara = 1; nPara < nParCnt; ++nPara)
+ for (sal_uInt16 nPara = 1; nPara < nParCnt; ++nPara)
{
SfxItemSet aPara2Attribs = pEngine->GetAttribs(nPara, 0, pEngine->GetTextLen(nPara));
if (!(aPara1Attribs == aPara2Attribs))
@@ -2512,9 +2512,9 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if ( pActiveViewSh && bUniformAttribs )
{
SfxItemSet* pCommonAttrs = NULL;
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)
+ for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)
{
- SfxItemState eState = aOldAttribs.GetItemState( nId, FALSE, &pItem );
+ SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem );
if ( eState == SFX_ITEM_SET &&
nId != EE_CHAR_ESCAPEMENT && nId != EE_CHAR_PAIRKERNING &&
nId != EE_CHAR_KERNING && nId != EE_CHAR_XMLATTRIBS &&
@@ -2542,14 +2542,14 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
// check if EditObject is needed
if ( bSpellErrors || nParCnt > 1 )
- bAttrib = TRUE;
+ bAttrib = sal_True;
else
{
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++)
+ for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++)
{
- SfxItemState eState = aOldAttribs.GetItemState( nId, FALSE, &pItem );
+ SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem );
if (eState == SFX_ITEM_DONTCARE)
- bAttrib = TRUE;
+ bAttrib = sal_True;
else if (eState == SFX_ITEM_SET)
{
// keep same items in EditEngine as in ScEditAttrTester
@@ -2557,34 +2557,34 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS )
{
if ( *pItem != pEditDefaults->Get(nId) )
- bAttrib = TRUE;
+ bAttrib = sal_True;
}
}
}
// Feldbefehle enthalten?
- SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
- bAttrib = TRUE;
+ bAttrib = sal_True;
// not converted characters?
- SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, FALSE );
+ SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, false );
if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET )
- bAttrib = TRUE;
+ bAttrib = sal_True;
// Formeln immer als Formeln erkennen (#38309#)
// (der Test vorher ist trotzdem noetig wegen Zell-Attributen)
}
if (bMatrix)
- bAttrib = FALSE;
+ bAttrib = false;
if (bAttrib)
{
- ULONG nCtrl = pEngine->GetControlWord();
- ULONG nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
+ sal_uLong nCtrl = pEngine->GetControlWord();
+ sal_uLong nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
if ( ( nCtrl & EE_CNTRL_ALLOWBIGOBJS ) != nWantBig )
pEngine->SetControlWord( (nCtrl & ~EE_CNTRL_ALLOWBIGOBJS) | nWantBig );
pObject = pEngine->CreateTextObject();
@@ -2612,23 +2612,23 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
pExecuteSh->ActiveGrabFocus();
}
- bFormulaMode = FALSE;
+ bFormulaMode = false;
pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
DeleteRangeFinder();
ResetAutoPar();
- BOOL bOldMod = bModified;
+ sal_Bool bOldMod = bModified;
- bModified = FALSE;
- bSelIsRef = FALSE;
+ bModified = false;
+ bSelIsRef = false;
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( sal_True );
// Text input (through number formats) or ApplySelectionPattern modify
// the cell's attributes, so pLastPattern is no longer valid
@@ -2675,7 +2675,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
{
SfxBindings& rBindings = pExecuteSh->GetViewFrame()->GetBindings();
- USHORT nId = FID_INPUTLINE_ENTER;
+ sal_uInt16 nId = FID_INPUTLINE_ENTER;
if ( nBlockMode == SC_ENTER_BLOCK )
nId = FID_INPUTLINE_BLOCK;
else if ( nBlockMode == SC_ENTER_MATRIX )
@@ -2699,7 +2699,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
// mit Eingabe zusammenfassen ?
- pExecuteSh->ApplySelectionPattern( *pCellAttrs, TRUE, TRUE );
+ pExecuteSh->ApplySelectionPattern( *pCellAttrs, sal_True, sal_True );
pExecuteSh->AdjustBlockHeight();
}
@@ -2712,17 +2712,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
nFormSelStart = nFormSelEnd = 0;
aFormText.Erase();
- bInOwnChange = FALSE;
- bInEnterHandler = FALSE;
+ bInOwnChange = false;
+ bInEnterHandler = false;
}
void ScInputHandler::CancelHandler()
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
ImplCreateEditEngine();
- bModified = FALSE;
+ bModified = false;
// don't rely on ShowRefFrame switching the active view synchronously
// execute the function directly on the correct view's bindings instead
@@ -2737,11 +2737,11 @@ void ScInputHandler::CancelHandler()
pExecuteSh->SetTabNo(aCursorPos.Tab());
pExecuteSh->ActiveGrabFocus();
}
- bFormulaMode = FALSE;
+ bFormulaMode = false;
SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
SC_MOD()->SetRefInputHdl(NULL);
if (pInputWin)
- pInputWin->SetFormulaMode(FALSE);
+ pInputWin->SetFormulaMode(false);
UpdateAutoCorrFlag();
}
pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
@@ -2749,7 +2749,7 @@ void ScInputHandler::CancelHandler()
ResetAutoPar();
eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
+ StopInputWinEngine( sal_True );
if (pExecuteSh)
pExecuteSh->StopEditShell();
@@ -2757,17 +2757,17 @@ void ScInputHandler::CancelHandler()
pEngine->SetText(String());
if ( !pLastState && pExecuteSh )
- pExecuteSh->UpdateInputHandler( TRUE ); // Status neu holen
+ pExecuteSh->UpdateInputHandler( sal_True ); // Status neu holen
else
- NotifyChange( pLastState, TRUE );
+ NotifyChange( pLastState, sal_True );
nFormSelStart = nFormSelEnd = 0;
aFormText.Erase();
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
-BOOL ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
+sal_Bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
{
// Referenzen auf unbenanntes Dokument gehen nicht
@@ -2787,9 +2787,9 @@ void ScInputHandler::AddRefEntry()
RemoveSelection();
if (pTableView)
- pTableView->InsertText( cSep, FALSE );
+ pTableView->InsertText( cSep, false );
if (pTopView)
- pTopView->InsertText( cSep, FALSE );
+ pTopView->InsertText( cSep, false );
DataChanged();
}
@@ -2798,7 +2798,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
{
HideTip();
- BOOL bOtherDoc = ( pRefViewSh &&
+ sal_Bool bOtherDoc = ( pRefViewSh &&
pRefViewSh->GetViewData()->GetDocument() != pDoc );
if (bOtherDoc)
if (!pDoc->GetDocumentShell()->HasName())
@@ -2877,17 +2877,17 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
if (pTableView || pTopView)
{
if (pTableView)
- pTableView->InsertText( aRefStr, TRUE );
+ pTableView->InsertText( aRefStr, sal_True );
if (pTopView)
- pTopView->InsertText( aRefStr, TRUE );
+ pTopView->InsertText( aRefStr, sal_True );
DataChanged();
}
- bSelIsRef = TRUE;
+ bSelIsRef = sal_True;
}
-void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
+void ScInputHandler::InsertFunction( const String& rFuncName, sal_Bool bAddPar )
{
if ( eMode == SC_INPUT_NONE )
{
@@ -2907,7 +2907,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
if (pTableView)
{
- pTableView->InsertText( aText, FALSE );
+ pTableView->InsertText( aText, false );
if (bAddPar)
{
ESelection aSel = pTableView->GetSelection();
@@ -2918,7 +2918,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
}
if (pTopView)
{
- pTopView->InsertText( aText, FALSE );
+ pTopView->InsertText( aText, false );
if (bAddPar)
{
ESelection aSel = pTopView->GetSelection();
@@ -2963,20 +2963,20 @@ void ScInputHandler::ClearText()
DataChanged();
}
-BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE */ )
+sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /* = sal_False */ )
{
if (!bOptLoaded)
{
bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
- bOptLoaded = TRUE;
+ bOptLoaded = sal_True;
}
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nModi = aCode.GetModifier();
- BOOL bShift = aCode.IsShift();
- BOOL bControl = aCode.IsMod1();
- BOOL bAlt = aCode.IsMod2();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nModi = aCode.GetModifier();
+ sal_Bool bShift = aCode.IsShift();
+ sal_Bool bControl = aCode.IsMod1();
+ sal_Bool bAlt = aCode.IsMod2();
+ sal_uInt16 nCode = aCode.GetCode();
sal_Unicode nChar = rKEvt.GetCharCode();
if (bAlt && !bControl && nCode != KEY_RETURN)
@@ -2993,30 +2993,30 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
return true;
}
- BOOL bInputLine = ( eMode==SC_INPUT_TOP );
+ sal_Bool bInputLine = ( eMode==SC_INPUT_TOP );
- BOOL bUsed = FALSE;
- BOOL bSkip = FALSE;
- BOOL bDoEnter = FALSE;
+ sal_Bool bUsed = false;
+ sal_Bool bSkip = false;
+ sal_Bool bDoEnter = false;
switch ( nCode )
{
case KEY_RETURN:
if (bControl && !bShift && !bInputLine)
- bDoEnter = TRUE;
+ bDoEnter = sal_True;
else if ( nModi == 0 && nTipVisible && pFormulaData && nAutoPos != SCPOS_INVALID )
{
PasteFunctionData();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if ( nModi == 0 && nTipVisible && aManualTip.Len() )
{
PasteManualTip();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else
{
- BYTE nMode = SC_ENTER_NORMAL;
+ sal_uInt8 nMode = SC_ENTER_NORMAL;
if ( bShift && bControl )
nMode = SC_ENTER_MATRIX;
else if ( bAlt )
@@ -3026,7 +3026,7 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if (pActiveViewSh)
pActiveViewSh->MoveCursorEnter( bShift && !bControl );
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
case KEY_TAB:
@@ -3052,26 +3052,26 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if ( nTipVisible )
{
HideTip();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if( nTipVisibleSec )
{
HideTipBelow();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if (eMode != SC_INPUT_NONE)
{
CancelHandler();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else
- bSkip = TRUE;
+ bSkip = sal_True;
break;
case KEY_F2:
if ( !bShift && !bControl && !bAlt && eMode == SC_INPUT_TABLE )
{
eMode = SC_INPUT_TYPE;
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
}
@@ -3079,8 +3079,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
// Cursortasten nur ausfuehren, wenn schon im Edit-Modus
// z.B. wegen Shift-Ctrl-PageDn (ist nicht als Accelerator definiert)
- BOOL bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
- BOOL bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln
+ sal_Bool bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
+ sal_Bool bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln
if ( !bUsed && !bSkip && ( bDoEnter || EditEngine::DoesKeyChangeText(rKEvt) ||
( eMode != SC_INPUT_NONE && ( bCursorKey || bInsKey ) ) ) )
{
@@ -3090,14 +3090,14 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if (bSelIsRef)
{
RemoveSelection();
- bSelIsRef = FALSE;
+ bSelIsRef = false;
}
UpdateActiveView();
- BOOL bNewView = DataChanging( nChar );
+ sal_Bool bNewView = DataChanging( nChar );
if (bProtected) // Zelle geschuetzt?
- bUsed = TRUE; // Key-Event nicht weiterleiten
+ bUsed = sal_True; // Key-Event nicht weiterleiten
else // Aenderungen erlaubt
{
if (bNewView ) // neu anlegen
@@ -3138,15 +3138,15 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
if (pTableView)
if( pTableView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) )
- bUsed = TRUE;
+ bUsed = sal_True;
if (pTopView)
if( pTopView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) )
- bUsed = TRUE;
+ bUsed = sal_True;
}
else if ( nAutoPar && nChar == ')' && CursorAtClosingPar() )
{
SkipClosingPar();
- bUsed = TRUE;
+ bUsed = sal_True;
}
else
{
@@ -3154,18 +3154,18 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : NULL;
if ( pTableView->PostKeyEvent( rKEvt, pFrameWin ) )
- bUsed = TRUE;
+ bUsed = true;
}
if (pTopView)
if ( pTopView->PostKeyEvent( rKEvt ) )
- bUsed = TRUE;
+ bUsed = sal_True;
}
// Auto-Eingabe:
if ( bUsed && bAutoComplete )
{
- bUseTab = FALSE;
+ bUseTab = false;
nAutoPos = SCPOS_INVALID; // do not search further
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
@@ -3207,9 +3207,9 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
return bUsed;
}
-BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
+sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForce )
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = false;
if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
{
@@ -3224,7 +3224,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
pTableView->Command( rCEvt );
else if (pTopView) // call only once
pTopView->Command( rCEvt );
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
}
@@ -3235,7 +3235,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if (!bOptLoaded)
{
bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
- bOptLoaded = TRUE;
+ bOptLoaded = sal_True;
}
HideTip();
@@ -3244,14 +3244,14 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if ( bSelIsRef )
{
RemoveSelection();
- bSelIsRef = FALSE;
+ bSelIsRef = false;
}
UpdateActiveView();
- BOOL bNewView = DataChanging( 0, TRUE );
+ sal_Bool bNewView = DataChanging( 0, sal_True );
if (bProtected) // cell protected
- bUsed = TRUE; // event is used
+ bUsed = sal_True; // event is used
else // changes allowed
{
if (bNewView) // create new edit view
@@ -3284,7 +3284,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if (pTopView)
pTopView->Command( rCEvt );
- bUsed = TRUE;
+ bUsed = sal_True;
if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
{
@@ -3311,26 +3311,26 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
}
void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
- BOOL bForce, ScTabViewShell* pSourceSh,
- BOOL bStopEditing)
+ sal_Bool bForce, ScTabViewShell* pSourceSh,
+ sal_Bool bStopEditing)
{
// Wenn der Aufruf aus einem Makro-Aufruf im EnterHandler kommt,
// gleich abbrechen und nicht den Status durcheinander bringen
if (bInEnterHandler)
return;
- BOOL bRepeat = (pState == pLastState);
+ sal_Bool bRepeat = (pState == pLastState);
if (!bRepeat && pState && pLastState)
- bRepeat = sal::static_int_cast<BOOL>(*pState == *pLastState);
+ bRepeat = sal::static_int_cast<sal_Bool>(*pState == *pLastState);
if (bRepeat && !bForce)
return;
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
if ( pState && !pLastState ) // wieder enablen
- bForce = TRUE;
+ bForce = sal_True;
- BOOL bHadObject = pLastState && pLastState->GetEditData();
+ sal_Bool bHadObject = pLastState && pLastState->GetEditData();
//! Before EditEngine gets eventually created (so it gets the right pools)
if ( pSourceSh )
@@ -3352,7 +3352,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( pState )
{
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = false;
// hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP),
// FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird:
@@ -3367,7 +3367,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
EnterHandler();
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
if ( !bIgnore )
@@ -3376,16 +3376,16 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
const ScAddress& rEPos = pState->GetEndPos();
const EditTextObject* pData = pState->GetEditData();
String aString = pState->GetString();
- BOOL bTxtMod = FALSE;
+ sal_Bool bTxtMod = false;
ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
aCursorPos = pState->GetPos();
if ( pData )
- bTxtMod = TRUE;
+ bTxtMod = true;
else if ( bHadObject )
- bTxtMod = TRUE;
+ bTxtMod = sal_True;
else if ( bTextValid )
bTxtMod = ( aString != aCurrentText );
else
@@ -3398,13 +3398,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
pEngine->SetText( *pData );
aString = GetEditText(pEngine);
lcl_RemoveTabs(aString);
- bTextValid = FALSE;
+ bTextValid = false;
aCurrentText.Erase();
}
else
{
aCurrentText = aString;
- bTextValid = TRUE; //! erst nur als String merken
+ bTextValid = sal_True; //! erst nur als String merken
}
if ( pInputWin )
@@ -3425,7 +3425,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( !aPosStr.Len() ) // kein Name -> formatieren
{
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if( aAddrDetails.eConv == formula::FormulaGrammar::CONV_XL_R1C1 )
nFlags |= SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE;
if ( rSPos != rEPos )
@@ -3437,8 +3437,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
else
aCursorPos.Format( aPosStr, SCA_VALID | nFlags, pDoc, aAddrDetails );
}
-
+ //IAccessibility2 Implementation 2009-----
+ // Disable the accessible VALUE_CHANGE event
+ sal_Bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(false);
+ pInputWin->SetAccessibilityEventsSuppressed(sal_True);
pInputWin->SetPosString(aPosStr);
+ pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed);
+ //-----IAccessibility2 Implementation 2009
pInputWin->SetSumAssignMode();
}
@@ -3449,14 +3454,14 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
// Online spelling is turned back on in StartTable, after setting
// the right language from cell attributes.
- ULONG nCntrl = pEngine->GetControlWord();
+ sal_uLong nCntrl = pEngine->GetControlWord();
if ( nCntrl & EE_CNTRL_ONLINESPELLING )
pEngine->SetControlWord( nCntrl & ~EE_CNTRL_ONLINESPELLING );
- bModified = FALSE;
- bSelIsRef = FALSE;
- bProtected = FALSE;
- bCommandErrorShown = FALSE;
+ bModified = false;
+ bSelIsRef = false;
+ bProtected = false;
+ bCommandErrorShown = false;
}
}
}
@@ -3499,7 +3504,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
HideTip();
HideTipBelow();
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust )
@@ -3536,13 +3541,13 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
{
if ( pInputWin)
{
- pInputWin->EnableButtons( FALSE );
+ pInputWin->EnableButtons( false );
pInputWin->Disable();
}
}
else if ( !bFormulaMode ) // Formel auch z.B. bei Hilfe behalten
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = sal_True; // disable ModifyHdl (reset below)
pActiveViewSh = NULL;
pEngine->SetText( EMPTY_STRING );
@@ -3553,7 +3558,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
pInputWin->Disable();
}
- bInOwnChange = FALSE;
+ bInOwnChange = false;
}
}
}
@@ -3570,20 +3575,20 @@ void ScInputHandler::InputSelection( EditView* pView )
ResetAutoPar();
}
-void ScInputHandler::InputChanged( EditView* pView, BOOL bFromNotify )
+void ScInputHandler::InputChanged( EditView* pView, sal_Bool bFromNotify )
{
ESelection aSelection = pView->GetSelection();
UpdateActiveView();
// #i20282# DataChanged needs to know if this is from the input line's modify handler
- BOOL bFromTopNotify = ( bFromNotify && pView == pTopView );
+ sal_Bool bFromTopNotify = ( bFromNotify && pView == pTopView );
- BOOL bNewView = DataChanging(); //! kann das hier ueberhaupt sein?
+ sal_Bool bNewView = DataChanging(); //! kann das hier ueberhaupt sein?
aCurrentText = pView->GetEditEngine()->GetText(); // auch den String merken
pEngine->SetText( aCurrentText );
DataChanged( bFromTopNotify );
- bTextValid = TRUE; // wird in DataChanged auf FALSE gesetzt
+ bTextValid = sal_True; // wird in DataChanged auf sal_False gesetzt
if ( pActiveViewSh )
{
@@ -3603,7 +3608,7 @@ const String& ScInputHandler::GetEditString()
if (pEngine)
{
aCurrentText = pEngine->GetText(); // immer neu aus Engine
- bTextValid = TRUE;
+ bTextValid = sal_True;
}
return aCurrentText;
@@ -3618,16 +3623,16 @@ Size ScInputHandler::GetTextSize()
return aSize;
}
-BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
+sal_Bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if (pEngine)
{
// Feldbefehle enthalten?
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
SfxItemSet aSet = pEngine->GetAttribs( ESelection(0,0,nParCnt,0) );
- SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
{
// Inhalt kopieren
@@ -3638,20 +3643,20 @@ BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
// Attribute loeschen
- for (USHORT i=0; i<nParCnt; i++)
+ for (sal_uInt16 i=0; i<nParCnt; i++)
rDestEngine.QuickRemoveCharAttribs( i );
// Absaetze zusammenfassen
while ( nParCnt > 1 )
{
- xub_StrLen nLen = rDestEngine.GetTextLen( (USHORT)0 );
+ xub_StrLen nLen = rDestEngine.GetTextLen( (sal_uInt16)0 );
ESelection aSel( 0,nLen, 1,0 );
rDestEngine.QuickInsertText( ' ', aSel ); // Umbruch durch Space ersetzen
--nParCnt;
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -3684,9 +3689,9 @@ EditView* ScInputHandler::GetFuncEditView()
{
if ( eMode != SC_INPUT_TABLE )
{
- bCreatingFuncView = TRUE; // RangeFinder nicht anzeigen
+ bCreatingFuncView = sal_True; // RangeFinder nicht anzeigen
SetMode( SC_INPUT_TABLE );
- bCreatingFuncView = FALSE;
+ bCreatingFuncView = false;
if ( pTableView )
pTableView->GetEditEngine()->SetText( EMPTY_STRING );
}
@@ -3715,7 +3720,7 @@ void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd )
if (pView)
pView->SetSelection( ESelection(0,nStart, 0,nEnd) );
- bModified = TRUE;
+ bModified = sal_True;
}
//------------------------------------------------------------------------
@@ -3738,12 +3743,12 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
EditView* pView = GetFuncEditView();
if (pView)
{
- pView->SetEditEngineUpdateMode( FALSE );
+ pView->SetEditEngineUpdateMode( false );
pView->GetEditEngine()->SetText( aFormText );
pView->SetSelection( ESelection(0,nFormSelStart, 0,nFormSelEnd) );
- pView->SetEditEngineUpdateMode( TRUE );
+ pView->SetEditEngineUpdateMode( sal_True );
}
- bModified = TRUE;
+ bModified = sal_True;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index eaf5544d41e5..6a93fc130e02 100644..100755
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -101,7 +101,7 @@ enum ScNameInputType
SFX_IMPL_CHILDWINDOW(ScInputWindowWrapper,FID_INPUTLINE_STATUS)
ScInputWindowWrapper::ScInputWindowWrapper( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* /* pInfo */ )
: SfxChildWindow( pParentP, nId )
@@ -149,7 +149,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ),
aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ),
aTextEqual ( ScResId( SCSTR_QHELP_BTNEQUAL ) ),
- bIsOkCancelMode ( FALSE )
+ bIsOkCancelMode ( false )
{
ScModule* pScMod = SC_MOD();
SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod );
@@ -196,7 +196,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
aWndPos .Show();
aTextWindow .Show();
- pInputHdl = SC_MOD()->GetInputHdl( pViewSh, FALSE ); // use own handler even if ref-handler is set
+ pInputHdl = SC_MOD()->GetInputHdl( pViewSh, false ); // use own handler even if ref-handler is set
if (pInputHdl)
pInputHdl->SetInputWindow( this );
@@ -219,14 +219,15 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten
}
else if ( pViewSh )
- pViewSh->UpdateInputHandler( TRUE ); // unbedingtes Update
+ pViewSh->UpdateInputHandler( sal_True ); // unbedingtes Update
pImgMgr->RegisterToolBox( this );
+ SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA));
}
ScInputWindow::~ScInputWindow()
{
- BOOL bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear?
+ sal_Bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear?
// if any view's input handler has a pointer to this input window, reset it
// (may be several ones, #74522#)
@@ -242,7 +243,7 @@ ScInputWindow::~ScInputWindow()
if ( pHdl && pHdl->GetInputWindow() == this )
{
pHdl->SetInputWindow( NULL );
- pHdl->StopInputWinEngine( FALSE ); // reset pTopView pointer
+ pHdl->StopInputWinEngine( false ); // reset pTopView pointer
}
pSh = SfxViewShell::GetNext( *pSh, &aScType );
}
@@ -268,7 +269,7 @@ void ScInputWindow::SetInputHandler( ScInputHandler* pNew )
sal_Bool ScInputWindow::UseSubTotal(ScRangeList* pRangeList) const
{
- sal_Bool bSubTotal(sal_False);
+ sal_Bool bSubTotal(false);
ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
if ( pViewSh )
{
@@ -370,7 +371,7 @@ void ScInputWindow::Select()
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
ScRangeList aMarkRangeList;
- rMark.FillRangeListWithMarks( &aMarkRangeList, FALSE );
+ rMark.FillRangeListWithMarks( &aMarkRangeList, false );
ScDocument* pDoc = pViewSh->GetViewData()->GetDocument();
// check if one of the marked ranges is empty
@@ -391,7 +392,7 @@ void ScInputWindow::Select()
if ( bEmpty )
{
ScRangeList aRangeList;
- const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList );
+ const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList );
if ( bDataFound )
{
ScAddress aAddr = aRangeList.back()->aEnd;
@@ -410,7 +411,7 @@ void ScInputWindow::Select()
const bool bContinue = ( i != 0 ? true : false );
if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) )
{
- pViewSh->MarkRange( aRange, FALSE, FALSE );
+ pViewSh->MarkRange( aRange, false, false );
pViewSh->SetCursor( aRange.aEnd.Col(), aRange.aEnd.Row() );
const ScRangeList aRangeList;
ScAddress aAddr = aRange.aEnd;
@@ -426,7 +427,7 @@ void ScInputWindow::Select()
else // nur in Eingabezeile einfuegen
{
ScRangeList aRangeList;
- const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList );
+ const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList );
const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) );
ScAddress aAddr = pViewSh->GetViewData()->GetCurPos();
const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal, aAddr );
@@ -477,7 +478,7 @@ void ScInputWindow::Select()
pView->SetSelection( ESelection(0,1, 0,1) );
pScMod->InputChanged(pView);
SetOkCancelMode();
- pView->SetEditEngineUpdateMode(TRUE);
+ pView->SetEditEngineUpdateMode(sal_True);
}
}
break;
@@ -498,7 +499,7 @@ void ScInputWindow::Resize()
aTextWindow.Invalidate();
}
-void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit )
+void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit )
{
//! new method at ScModule to query if function autopilot is open
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
@@ -526,7 +527,7 @@ void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit )
if ( bDoEdit )
SetOkCancelMode(); // nicht, wenn gleich hinterher Enter/Cancel
- pView->SetEditEngineUpdateMode(TRUE);
+ pView->SetEditEngineUpdateMode(sal_True);
}
}
}
@@ -566,7 +567,7 @@ void ScInputWindow::SetOkCancelMode()
SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL );
SetItemText ( SID_INPUT_OK, aTextOk );
SetHelpId ( SID_INPUT_OK, HID_INSWIN_OK );
- bIsOkCancelMode = TRUE;
+ bIsOkCancelMode = sal_True;
}
}
@@ -589,13 +590,13 @@ void ScInputWindow::SetSumAssignMode()
SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME );
SetItemText ( SID_INPUT_EQUAL, aTextEqual );
SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC );
- bIsOkCancelMode = FALSE;
+ bIsOkCancelMode = false;
- SetFormulaMode(FALSE); // kein editieren -> keine Formel
+ SetFormulaMode(false); // kein editieren -> keine Formel
}
}
-void ScInputWindow::SetFormulaMode( BOOL bSet )
+void ScInputWindow::SetFormulaMode( sal_Bool bSet )
{
aWndPos.SetFormulaMode(bSet);
aTextWindow.SetFormulaMode(bSet);
@@ -611,7 +612,7 @@ String ScInputWindow::GetText() const
return ToolBox::GetText();
}
-BOOL ScInputWindow::IsInputActive()
+sal_Bool ScInputWindow::IsInputActive()
{
return aTextWindow.IsInputActive();
}
@@ -626,7 +627,7 @@ void ScInputWindow::MakeDialogEditView()
aTextWindow.MakeDialogEditView();
}
-void ScInputWindow::StopEditEngine( BOOL bAll )
+void ScInputWindow::StopEditEngine( sal_Bool bAll )
{
aTextWindow.StopEditEngine( bAll );
}
@@ -664,7 +665,7 @@ void ScInputWindow::PosGrabFocus()
aWndPos.GrabFocus();
}
-void ScInputWindow::EnableButtons( BOOL bEnable )
+void ScInputWindow::EnableButtons( sal_Bool bEnable )
{
// when enabling buttons, always also enable the input window itself
if ( bEnable && !IsEnabled() )
@@ -717,11 +718,11 @@ ScTextWnd::ScTextWnd( Window* pParent )
DragSourceHelper( this ),
pEditEngine ( NULL ),
pEditView ( NULL ),
- bIsInsertMode( TRUE ),
- bFormulaMode ( FALSE ),
- bInputMode ( FALSE )
+ bIsInsertMode( sal_True ),
+ bFormulaMode ( false ),
+ bInputMode ( false )
{
- EnableRTL( FALSE ); // EditEngine can't be used with VCL EnableRTL
+ EnableRTL( false ); // EditEngine can't be used with VCL EnableRTL
bIsRTL = GetSettings().GetLayoutRTL();
@@ -735,13 +736,17 @@ ScTextWnd::ScTextWnd( Window* pParent )
Color aBgColor= rStyleSettings.GetWindowColor();
Color aTxtColor= rStyleSettings.GetWindowTextColor();
- aTextFont.SetTransparent ( TRUE );
+ aTextFont.SetTransparent ( sal_True );
aTextFont.SetFillColor ( aBgColor );
//aTextFont.SetColor ( COL_FIELDTEXT );
aTextFont.SetColor (aTxtColor);
aTextFont.SetWeight ( WEIGHT_NORMAL );
- SetSizePixel ( Size(1,TBX_WINDOW_HEIGHT) );
+ Size aSize(1,TBX_WINDOW_HEIGHT);
+ Size aMinEditSize( Edit::GetMinimumEditSize() );
+ if( aMinEditSize.Height() > aSize.Height() )
+ aSize.Height() = aMinEditSize.Height();
+ SetSizePixel ( aSize );
SetBackground ( aBgColor );
SetLineColor ( COL_BLACK );
SetMapMode ( MAP_TWIP );
@@ -816,7 +821,7 @@ void ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt )
if (pEditView)
{
- pEditView->SetEditEngineUpdateMode( TRUE );
+ pEditView->SetEditEngineUpdateMode( sal_True );
pEditView->MouseButtonDown( rMEvt );
}
}
@@ -839,8 +844,8 @@ void ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt )
void ScTextWnd::Command( const CommandEvent& rCEvt )
{
- bInputMode = TRUE;
- USHORT nCommand = rCEvt.GetCommand();
+ bInputMode = sal_True;
+ sal_uInt16 nCommand = rCEvt.GetCommand();
if ( pEditView /* && ( nCommand == COMMAND_STARTDRAG || nCommand == COMMAND_VOICE ) */ )
{
ScModule* pScMod = SC_MOD();
@@ -850,9 +855,9 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
// already set in StartEditEngine when the EditEngine is created
// verhindern, dass die EditView beim View-Umschalten wegkommt
- pScMod->SetInEditCommand( TRUE );
+ pScMod->SetInEditCommand( true );
pEditView->Command( rCEvt );
- pScMod->SetInEditCommand( FALSE );
+ pScMod->SetInEditCommand( false );
// COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde
// darum in dem Fall kein InputChanged
@@ -896,14 +901,14 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
else
Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern...
- bInputMode = FALSE;
+ bInputMode = false;
}
void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
{
if ( pEditView )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
pEditView->Command( aDragEvent );
// handling of d&d to different view (CancelHandler) can't be done here,
@@ -913,24 +918,24 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
void ScTextWnd::KeyInput(const KeyEvent& rKEvt)
{
- bInputMode = TRUE;
+ bInputMode = sal_True;
if (!SC_MOD()->InputKeyEvent( rKEvt ))
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = false;
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh )
bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe
if (!bUsed)
Window::KeyInput( rKEvt );
}
- bInputMode = FALSE;
+ bInputMode = false;
}
void ScTextWnd::GetFocus()
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh )
- pViewSh->SetFormShellAtTop( FALSE ); // focus in input line -> FormShell no longer on top
+ pViewSh->SetFormShellAtTop( false ); // focus in input line -> FormShell no longer on top
}
void ScTextWnd::LoseFocus()
@@ -947,7 +952,7 @@ String ScTextWnd::GetText() const
return GetTextString();
}
-void ScTextWnd::SetFormulaMode( BOOL bSet )
+void ScTextWnd::SetFormulaMode( sal_Bool bSet )
{
if ( bSet != bFormulaMode )
{
@@ -960,8 +965,8 @@ void ScTextWnd::UpdateAutoCorrFlag()
{
if ( pEditEngine )
{
- ULONG nControl = pEditEngine->GetControlWord();
- ULONG nOld = nControl;
+ sal_uLong nControl = pEditEngine->GetControlWord();
+ sal_uLong nOld = nControl;
if ( bFormulaMode )
nControl &= ~EE_CNTRL_AUTOCORRECT; // keine Autokorrektur in Formeln
else
@@ -998,7 +1003,7 @@ void lcl_ModifyRTLDefaults( SfxItemSet& rSet )
//rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
// PaperSize width is limited to USHRT_MAX in RTL mode (because of EditEngine's
- // USHORT values in EditLine), so the text may be wrapped and line spacing must be
+ // sal_uInt16 values in EditLine), so the text may be wrapped and line spacing must be
// increased to not see the beginning of the next line.
SvxLineSpacingItem aItem( SVX_LINESPACE_TWO_LINES, EE_PARA_SBL );
aItem.SetPropLineSpace( 200 );
@@ -1032,11 +1037,11 @@ void ScTextWnd::StartEditEngine()
pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
}
else
- pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
- pNew->SetExecuteURL( FALSE );
+ pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
+ pNew->SetExecuteURL( false );
pEditEngine = pNew;
- pEditEngine->SetUpdateMode( FALSE );
+ pEditEngine->SetUpdateMode( false );
pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) );
pEditEngine->SetWordDelimiters(
ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) );
@@ -1048,7 +1053,7 @@ void ScTextWnd::StartEditEngine()
pEditEngine->SetFontInfoInItemSet( *pSet, aTextFont );
lcl_ExtendEditFontAttribs( *pSet );
// turn off script spacing to match DrawText output
- pSet->Put( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ pSet->Put( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
if ( bIsRTL )
lcl_ModifyRTLDefaults( *pSet );
pEditEngine->SetDefaults( pSet );
@@ -1057,12 +1062,12 @@ void ScTextWnd::StartEditEngine()
// Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in
// die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen.
- BOOL bFilled = FALSE;
+ sal_Bool bFilled = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl();
if ( pHdl ) //! Testen, ob's der richtige InputHdl ist?
bFilled = pHdl->GetTextAndFields( *pEditEngine );
- pEditEngine->SetUpdateMode( TRUE );
+ pEditEngine->SetUpdateMode( sal_True );
// aString ist die Wahrheit...
if ( bFilled && pEditEngine->GetText() == aString )
@@ -1074,7 +1079,7 @@ void ScTextWnd::StartEditEngine()
pEditView->SetInsertMode(bIsInsertMode);
// Text aus Clipboard wird als ASCII einzeilig uebernommen
- ULONG n = pEditView->GetControlWord();
+ sal_uLong n = pEditView->GetControlWord();
pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE );
pEditEngine->InsertView( pEditView, EE_APPEND );
@@ -1095,7 +1100,7 @@ void ScTextWnd::StartEditEngine()
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document
- BYTE nScript = pDoc->GetStringScriptType( aString );
+ sal_uInt8 nScript = pDoc->GetStringScriptType( aString );
if ( nScript & SCRIPTTYPE_COMPLEX )
Invalidate();
}
@@ -1118,13 +1123,13 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify*, EMPTYARG)
// while an InputHandler method is modifying the EditEngine content
if ( pHdl && !pHdl->IsInOwnChange() )
- pHdl->InputChanged( pEditView, TRUE ); // #i20282# InputChanged must know if called from modify handler
+ pHdl->InputChanged( pEditView, sal_True ); // #i20282# InputChanged must know if called from modify handler
}
return 0;
}
-void ScTextWnd::StopEditEngine( BOOL bAll )
+void ScTextWnd::StopEditEngine( sal_Bool bAll )
{
if (pEditView)
{
@@ -1137,7 +1142,7 @@ void ScTextWnd::StopEditEngine( BOOL bAll )
pScMod->InputSelection( pEditView );
aString = pEditEngine->GetText();
bIsInsertMode = pEditView->IsInsertMode();
- BOOL bSelection = pEditView->HasSelection();
+ sal_Bool bSelection = pEditView->HasSelection();
pEditEngine->SetModifyHdl(Link());
DELETEZ(pEditView);
DELETEZ(pEditEngine);
@@ -1158,20 +1163,20 @@ void ScTextWnd::SetTextString( const String& rNewString )
{
if ( rNewString != aString )
{
- bInputMode = TRUE;
+ bInputMode = sal_True;
// Position der Aenderung suchen, nur Rest painten
if (!pEditEngine)
{
- BOOL bPaintAll;
+ sal_Bool bPaintAll;
if ( bIsRTL )
- bPaintAll = TRUE;
+ bPaintAll = sal_True;
else
{
// test if CTL script type is involved
- BYTE nOldScript = 0;
- BYTE nNewScript = 0;
+ sal_uInt8 nOldScript = 0;
+ sal_uInt8 nNewScript = 0;
SfxObjectShell* pObjSh = SfxObjectShell::Current();
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
@@ -1214,7 +1219,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
if (nDifPos)
nInvPos += GetTextWidth(aString,0,nDifPos);
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( nDifPos == aString.Len() ) // only new characters appended
nFlags = INVALIDATE_NOERASE; // then background is already clear
@@ -1233,7 +1238,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
if (!maAccTextDatas.empty())
maAccTextDatas.back()->TextChanged();
- bInputMode = FALSE;
+ bInputMode = false;
}
}
@@ -1242,7 +1247,7 @@ const String& ScTextWnd::GetTextString() const
return aString;
}
-BOOL ScTextWnd::IsInputActive()
+sal_Bool ScTextWnd::IsInputActive()
{
return HasFocus();
}
@@ -1264,11 +1269,11 @@ void ScTextWnd::MakeDialogEditView()
pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
}
else
- pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
- pNew->SetExecuteURL( FALSE );
+ pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
+ pNew->SetExecuteURL( false );
pEditEngine = pNew;
- pEditEngine->SetUpdateMode( FALSE );
+ pEditEngine->SetUpdateMode( false );
pEditEngine->SetWordDelimiters( pEditEngine->GetWordDelimiters() += '=' );
pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) );
@@ -1278,7 +1283,7 @@ void ScTextWnd::MakeDialogEditView()
if ( bIsRTL )
lcl_ModifyRTLDefaults( *pSet );
pEditEngine->SetDefaults( pSet );
- pEditEngine->SetUpdateMode( TRUE );
+ pEditEngine->SetUpdateMode( sal_True );
pEditView = new EditView( pEditEngine, this );
pEditEngine->InsertView( pEditView, EE_APPEND );
@@ -1353,7 +1358,7 @@ ScPosWnd::ScPosWnd( Window* pParent ) :
ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ),
pAccel ( NULL ),
nTipVisible ( 0 ),
- bFormulaMode( FALSE )
+ bFormulaMode( false )
{
Size aSize( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GW99999:GW99999")) ),
GetTextHeight() );
@@ -1375,7 +1380,7 @@ ScPosWnd::~ScPosWnd()
delete pAccel;
}
-void ScPosWnd::SetFormulaMode( BOOL bSet )
+void ScPosWnd::SetFormulaMode( sal_Bool bSet )
{
if ( bSet != bFormulaMode )
{
@@ -1446,16 +1451,16 @@ void ScPosWnd::FillFunctions()
String aFirstName;
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
- USHORT nMRUCount = rOpt.GetLRUFuncListCount();
- const USHORT* pMRUList = rOpt.GetLRUFuncList();
+ sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount();
+ const sal_uInt16* pMRUList = rOpt.GetLRUFuncList();
if (pMRUList)
{
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
- ULONG nListCount = pFuncList->GetCount();
- for (USHORT i=0; i<nMRUCount; i++)
+ sal_uLong nListCount = pFuncList->GetCount();
+ for (sal_uInt16 i=0; i<nMRUCount; i++)
{
- USHORT nId = pMRUList[i];
- for (ULONG j=0; j<nListCount; j++)
+ sal_uInt16 nId = pMRUList[i];
+ for (sal_uLong j=0; j<nListCount; j++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction( j );
if ( pDesc->nFIndex == nId && pDesc->pFuncName )
@@ -1485,13 +1490,13 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( rHint.ISA(SfxSimpleHint) )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId();
if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL)
FillRangeNames();
}
else if ( rHint.ISA(SfxEventHint) )
{
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
if ( nEventId == SFX_EVENT_ACTIVATEDOC )
FillRangeNames();
}
@@ -1565,7 +1570,7 @@ void ScPosWnd::Modify()
// determine the action that would be taken for the current input
ScNameInputType eType = lcl_GetInputType( GetText() ); // uses current view
- USHORT nStrId = 0;
+ sal_uInt16 nStrId = 0;
switch ( eType )
{
case SC_NAME_INPUT_CELL:
@@ -1607,7 +1612,7 @@ void ScPosWnd::Modify()
Rectangle aRect( aPos, aPos );
String aText = ScGlobal::GetRscString( nStrId );
- USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
+ sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
nTipVisible = Help::ShowTip(pWin, aRect, aText, nAlign);
}
}
@@ -1660,7 +1665,7 @@ void ScPosWnd::DoEnter()
ScNameInputType eType = lcl_GetInputType( aText );
if ( eType == SC_NAME_INPUT_BAD_NAME || eType == SC_NAME_INPUT_BAD_SELECTION )
{
- USHORT nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION;
+ sal_uInt16 nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION;
pViewSh->ErrorMessage( nId );
}
else if ( eType == SC_NAME_INPUT_DEFINE )
@@ -1682,7 +1687,7 @@ void ScPosWnd::DoEnter()
{
ScDocFunc aFunc(*pDocShell);
aFunc.ModifyRangeNames( aNewRanges );
- pViewSh->UpdateInputHandler(TRUE);
+ pViewSh->UpdateInputHandler(true);
}
else
delete pNew; // shouldn't happen
@@ -1693,7 +1698,7 @@ void ScPosWnd::DoEnter()
// for all selection types, excecute the SID_CURRENTCELL slot
SfxStringItem aPosItem( SID_CURRENTCELL, aText );
- SfxBoolItem aUnmarkItem( FN_PARAM_1, TRUE ); // remove existing selection
+ SfxBoolItem aUnmarkItem( FN_PARAM_1, sal_True ); // remove existing selection
pViewSh->GetViewData()->GetDispatcher().Execute( SID_CURRENTCELL,
SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD,
diff --git a/sc/source/ui/app/lnktrans.cxx b/sc/source/ui/app/lnktrans.cxx
index 055f8da1a828..d410d6b10099 100644
--- a/sc/source/ui/app/lnktrans.cxx
+++ b/sc/source/ui/app/lnktrans.cxx
@@ -73,7 +73,7 @@ void ScLinkTransferObj::AddSupportedFormats()
sal_Bool ScLinkTransferObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
if ( aLinkURL.Len() )
{
INetBookmark aBmk( aLinkURL, aLinkText );
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 31c31734612d..535b97ef9381 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -67,11 +67,11 @@ ScMessagePool::ScMessagePool()
aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ),
aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ),
aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ),
- aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, FALSE ) ),
+ aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, false ) ),
aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ),
aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ),
//
- aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) )
+ aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, false ) )
{
ppPoolDefaults = new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1];
@@ -99,7 +99,7 @@ ScMessagePool::~ScMessagePool()
Delete();
SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults)
- for ( USHORT i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ )
+ for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ )
SetRefCount( *ppPoolDefaults[i], 0 );
delete[] ppPoolDefaults;
@@ -108,7 +108,7 @@ ScMessagePool::~ScMessagePool()
}
-SfxMapUnit ScMessagePool::GetMetric( USHORT nWhich ) const
+SfxMapUnit ScMessagePool::GetMetric( sal_uInt16 nWhich ) const
{
// eigene Attribute: Twips, alles andere 1/100 mm
diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx
index c82bc7d79512..d64a15b2bf09 100644
--- a/sc/source/ui/app/rfindlst.cxx
+++ b/sc/source/ui/app/rfindlst.cxx
@@ -45,7 +45,7 @@ static ColorData aColNames[SC_RANGECOLORS] =
ScRangeFindList::ScRangeFindList(const String& rName) :
aDocName( rName ),
- bHidden( FALSE )
+ bHidden( false )
{
}
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 961176c3f892..d1c56ec1ae77 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -131,7 +131,7 @@
//------------------------------------------------------------------
-ScResId::ScResId( USHORT nId ) :
+ScResId::ScResId( sal_uInt16 nId ) :
ResId( nId, *SC_MOD()->GetResMgr() )
{
}
@@ -236,7 +236,7 @@ void ScDLL::Init()
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
// common SFX controller
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pMod );
// Svx-StatusBar-Controller
SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod);
@@ -262,36 +262,36 @@ void ScDLL::Init()
ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK);
ScNavigatorDialogWrapper ::RegisterChildWindowContext(
sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
- ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScOptSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod);
- ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScColRowNameRangesDlgWrapper::RegisterChildWindow(FALSE, pMod);
- ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod);
+ ScSolverDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScOptSolverDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScNameDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScPivotLayoutWrapper ::RegisterChildWindow(false, pMod);
+ ScTabOpDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScFilterDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScSpecialFilterDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScDbNameDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScConsolidateDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScPrintAreasDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScCondFormatDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScColRowNameRangesDlgWrapper::RegisterChildWindow(false, pMod);
+ ScFormulaDlgWrapper ::RegisterChildWindow(false, pMod);
// First docking Window for Calc
- ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod);
+ ScFunctionChildWindow ::RegisterChildWindow(false, pMod);
// Redlining- Window
- ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- ScSimpleRefDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
- ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod);
+ ScAcceptChgDlgWrapper ::RegisterChildWindow(false, pMod);
+ ScSimpleRefDlgWrapper ::RegisterChildWindow(false, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE );
+ ScHighlightChgDlgWrapper ::RegisterChildWindow(false, pMod);
- SvxSearchDialogWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxHlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod);
- SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod);
- SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod);
- GalleryChildWindow ::RegisterChildWindow(FALSE, pMod);
- ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod);
+ SvxSearchDialogWrapper ::RegisterChildWindow(false, pMod);
+ SvxHlinkDlgWrapper ::RegisterChildWindow(false, pMod);
+ SvxFontWorkChildWindow ::RegisterChildWindow(false, pMod);
+ SvxIMapDlgChildWindow ::RegisterChildWindow(false, pMod);
+ GalleryChildWindow ::RegisterChildWindow(false, pMod);
+ ScSpellDialogChildWindow ::RegisterChildWindow(false, pMod);
- ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod);
+ ScValidityRefChildWin::RegisterChildWindow(false, pMod);
// Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init
@@ -308,7 +308,7 @@ void ScDLL::Init()
// ::com::sun::star::form::component::Form-Objekt-Factory eintragen
FmFormObjFactory();
- pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<UINT16>(pMod->GetAppOptions().GetAppMetric()) ) );
+ pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<sal_uInt16>(pMod->GetAppOptions().GetAppMetric()) ) );
// StarOne Services are now handled in the registry
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index ba9634af5464..41ba2db31cbe 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -58,7 +58,6 @@
#include <vcl/status.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/printer.hxx>
#include <editeng/langitem.hxx>
#include <svtools/colorcfg.hxx>
@@ -118,7 +117,7 @@
#define SC_IDLE_STEP 75
#define SC_IDLE_COUNT 50
-static USHORT nIdleCount = 0;
+static sal_uInt16 nIdleCount = 0;
//------------------------------------------------------------------
@@ -132,7 +131,7 @@ SFX_IMPL_INTERFACE( ScModule, SfxShell, ScResId(RID_APPTITLE) )
//------------------------------------------------------------------
ScModule::ScModule( SfxObjectFactory* pFact ) :
- SfxModule( SfxApplication::CreateResManager( "sc" ), FALSE, pFact, NULL ),
+ SfxModule( SfxApplication::CreateResManager( "sc" ), false, pFact, NULL ),
pSelTransfer( NULL ),
pMessagePool( NULL ),
pRefInputHandler( NULL ),
@@ -151,9 +150,9 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
pSvxErrorHdl( NULL ),
pFormEditData( NULL ),
nCurRefDlgId( 0 ),
- bIsWaterCan( FALSE ),
- bIsInEditCommand( FALSE ),
- bIsInExecuteDrop( FALSE ),
+ bIsWaterCan( false ),
+ bIsInEditCommand( false ),
+ bIsInExecuteDrop( false ),
mbIsInSharedDocLoading( false ),
mbIsInSharedDocSaving( false )
{
@@ -216,10 +215,10 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
if ( ScDetectiveFunc::IsColorsInitialized() )
{
const svtools::ColorConfig& rColors = GetColorConfig();
- BOOL bArrows =
+ sal_Bool bArrows =
( ScDetectiveFunc::GetArrowColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVE).nColor ||
ScDetectiveFunc::GetErrorColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVEERROR).nColor );
- BOOL bComments =
+ sal_Bool bComments =
( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor );
if ( bArrows || bComments )
{
@@ -324,7 +323,7 @@ void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA(SfxSimpleHint) )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId();
if ( nHintId == SFX_HINT_DEINITIALIZING )
{
// ConfigItems must be removed before ConfigManager
@@ -367,68 +366,6 @@ void ScModule::DeleteCfg()
}
//------------------------------------------------------------------
-
-#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s))
-
-void ScModule::FillStatusBar(StatusBar& rStatusBar)
-{
- // Dokumentposition (Tabelle x / y)
- rStatusBar.InsertItem( SID_STATUS_DOCPOS,
- TEXT_WIDTH( String().Fill( 10, 'X' ) ),
- SIB_LEFT|SIB_AUTOSIZE );
- rStatusBar.SetHelpId( SID_STATUS_DOCPOS, SID_STATUS_DOCPOS );
-
- // Seitenvorlage
- rStatusBar.InsertItem( SID_STATUS_PAGESTYLE,
- TEXT_WIDTH( String().Fill( 15, 'X' ) ),
- SIB_LEFT|SIB_AUTOSIZE );
- rStatusBar.SetHelpId( SID_STATUS_PAGESTYLE, SID_STATUS_PAGESTYLE );
-
- // Einfuege-/Ueberschreibmodus
- rStatusBar.InsertItem( SID_ATTR_INSERT,
- SvxInsertStatusBarControl::GetDefItemWidth(rStatusBar),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_ATTR_INSERT, SID_ATTR_INSERT );
-
- // Selektionsmodus
- rStatusBar.InsertItem( SID_STATUS_SELMODE,
- SvxSelectionModeControl::GetDefItemWidth(rStatusBar),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_STATUS_SELMODE, SID_STATUS_SELMODE );
-
- // Dokument geaendert
- rStatusBar.InsertItem( SID_DOC_MODIFIED,
- SvxModifyControl::GetDefItemWidth(rStatusBar));
-
- // signatures
- rStatusBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rStatusBar ), SIB_USERDRAW );
- rStatusBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE);
-
-
- rStatusBar.SetHelpId( SID_DOC_MODIFIED, SID_DOC_MODIFIED );
-
- // den aktuellen Kontext anzeigen Uhrzeit / FramePos / TabellenInfo / Errors
- rStatusBar.InsertItem( SID_ATTR_SIZE,
- SvxPosSizeStatusBarControl::GetDefItemWidth(rStatusBar),
- SIB_AUTOSIZE|SIB_LEFT|SIB_USERDRAW);
- rStatusBar.SetHelpId( SID_ATTR_SIZE, SID_ATTR_SIZE );
-
- // Ma"sstab
- rStatusBar.InsertItem( SID_ATTR_ZOOM,
- SvxZoomStatusBarControl::GetDefItemWidth(rStatusBar),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_ATTR_ZOOM, SID_ATTR_ZOOM );
-
- // ZoomSlider
- rStatusBar.InsertItem( SID_ATTR_ZOOMSLIDER,
- TEXT_WIDTH( String().Fill( 15, 'X' ) ),
- SIB_CENTER );
- rStatusBar.SetHelpId( SID_ATTR_ZOOMSLIDER, SID_ATTR_ZOOMSLIDER );
-}
-
-#undef TEXT_WIDTH
-
-//------------------------------------------------------------------
//
// von der Applikation verschoben:
//
@@ -440,7 +377,7 @@ void ScModule::Execute( SfxRequest& rReq )
SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL;
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -448,27 +385,21 @@ void ScModule::Execute( SfxRequest& rReq )
{
String aMacroName =
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles"));
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
- pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() );
- pApp->LeaveBasicCall();
+ SfxApplication::CallAppBasic( aMacroName );
}
break;
case SID_EURO_CONVERTER:
{
String aMacroName =
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main"));
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
- pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() );
- pApp->LeaveBasicCall();
+ SfxApplication::CallAppBasic( aMacroName );
}
break;
case SID_AUTOSPELL_CHECK:
{
- BOOL bSet;
+ sal_Bool bSet;
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
else
{ // Toggle
@@ -489,7 +420,7 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_ATTR_METRIC:
{
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) )
{
FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue();
switch( eUnit )
@@ -519,7 +450,7 @@ void ScModule::Execute( SfxRequest& rReq )
case FID_AUTOCOMPLETE:
{
ScAppOptions aNewOpts( GetAppOptions() );
- BOOL bNew = !aNewOpts.GetAutoComplete();
+ sal_Bool bNew = !aNewOpts.GetAutoComplete();
aNewOpts.SetAutoComplete( bNew );
SetAppOptions( aNewOpts );
ScInputHandler::SetAutoComplete( bNew );
@@ -532,8 +463,8 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_DETECTIVE_AUTO:
{
ScAppOptions aNewOpts( GetAppOptions() );
- BOOL bNew = !aNewOpts.GetDetectiveAuto();
- SFX_REQUEST_ARG( rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO, sal_False );
+ sal_Bool bNew = !aNewOpts.GetDetectiveAuto();
+ SFX_REQUEST_ARG( rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO, false );
if ( pAuto )
bNew = pAuto->GetValue();
@@ -573,7 +504,7 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_ATTR_CHAR_CTL_LANGUAGE:
{
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), sal_True, &pItem ) )
{
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL;
@@ -647,7 +578,7 @@ void ScModule::Execute( SfxRequest& rReq )
void ScModule::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -662,17 +593,17 @@ void ScModule::GetState( SfxItemSet& rSet )
rSet.Put( SfxUInt16Item( nWhich, GetAppOptions().GetStatusFunc() ) );
break;
case SID_ATTR_METRIC:
- rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast<UINT16>(GetAppOptions().GetAppMetric()) ) );
+ rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast<sal_uInt16>(GetAppOptions().GetAppMetric()) ) );
break;
case SID_AUTOSPELL_CHECK:
{
- BOOL bAuto;
+ sal_Bool bAuto;
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
if ( pDocSh )
bAuto = pDocSh->GetDocument()->GetDocOptions().IsAutoSpell();
else
{
- USHORT nDummyLang, nDummyCjk, nDummyCtl;
+ sal_uInt16 nDummyLang, nDummyCjk, nDummyCtl;
GetSpellSettings( nDummyLang, nDummyCjk, nDummyCtl, bAuto );
}
rSet.Put( SfxBoolItem( nWhich, bAuto ) );
@@ -707,7 +638,7 @@ void ScModule::HideDisabledSlots( SfxItemSet& rSet )
{
SfxBindings& rBindings = pViewFrm->GetBindings();
SfxWhichIter aIter( rSet );
- for( USHORT nWhich = aIter.FirstWhich(); nWhich != 0; nWhich = aIter.NextWhich() )
+ for( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich != 0; nWhich = aIter.NextWhich() )
{
ScViewUtil::HideDisabledSlot( rSet, rBindings, nWhich );
// always disable the slots
@@ -835,22 +766,22 @@ const ScDocOptions& ScModule::GetDocOptions()
#define LRU_MAX 10
#endif
-void ScModule::InsertEntryToLRUList(USHORT nFIndex)
+void ScModule::InsertEntryToLRUList(sal_uInt16 nFIndex)
{
if(nFIndex != 0)
{
const ScAppOptions& rAppOpt = GetAppOptions();
- USHORT nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (USHORT)LRU_MAX );
- USHORT* pLRUListIds = rAppOpt.GetLRUFuncList();
+ sal_uInt16 nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX );
+ sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList();
- USHORT aIdxList[LRU_MAX];
- USHORT n = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 aIdxList[LRU_MAX];
+ sal_uInt16 n = 0;
+ sal_Bool bFound = false;
while ((n < LRU_MAX) && n<nLRUFuncCount) // alte Liste abklappern
{
if (!bFound && (pLRUListIds[n]== nFIndex))
- bFound = TRUE; // erster! Treffer
+ bFound = sal_True; // erster! Treffer
else if (bFound)
aIdxList[n ] = pLRUListIds[n]; // hinter Treffer kopieren
else if ((n+1) < LRU_MAX)
@@ -872,7 +803,7 @@ void ScModule::InsertEntryToLRUList(USHORT nFIndex)
void ScModule::RecentFunctionsChanged()
{
// update function list window
- USHORT nFuncListID = ScFunctionChildWindow::GetChildWindowId();
+ sal_uInt16 nFuncListID = ScFunctionChildWindow::GetChildWindowId();
//! notify all views
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
@@ -997,7 +928,7 @@ SvtUserOptions& ScModule::GetUserOptions()
return *pUserOptions;
}
-USHORT ScModule::GetOptDigitLanguage()
+sal_uInt16 ScModule::GetOptDigitLanguage()
{
SvtCTLOptions::TextNumerals eNumerals = GetCTLOptions().GetCTLTextNumerals();
return ( eNumerals == SvtCTLOptions::NUMERALS_ARABIC ) ? LANGUAGE_ENGLISH_US :
@@ -1016,12 +947,12 @@ USHORT ScModule::GetOptDigitLanguage()
// und SID_AUTOSPELL_CHECK
//
-#define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),TRUE,&item))
+#define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),sal_True,&item))
void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
{
- USHORT nOldSpellLang, nOldCjkLang, nOldCtlLang;
- BOOL bOldAutoSpell;
+ sal_uInt16 nOldSpellLang, nOldCjkLang, nOldCtlLang;
+ sal_Bool bOldAutoSpell;
GetSpellSettings( nOldSpellLang, nOldCjkLang, nOldCtlLang, bOldAutoSpell );
if (!pAppCfg)
@@ -1041,12 +972,12 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL;
const SfxPoolItem* pItem = NULL;
- BOOL bRepaint = FALSE;
- BOOL bUpdateMarks = FALSE;
- BOOL bUpdateRefDev = FALSE;
- BOOL bCalcAll = FALSE;
- BOOL bSaveAppOptions = FALSE;
- BOOL bSaveInputOptions = FALSE;
+ sal_Bool bRepaint = false;
+ sal_Bool bUpdateMarks = false;
+ sal_Bool bUpdateRefDev = false;
+ sal_Bool bCalcAll = false;
+ sal_Bool bSaveAppOptions = false;
+ sal_Bool bSaveInputOptions = false;
//--------------------------------------------------------------------------
@@ -1058,19 +989,19 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
{
PutItem( *pItem );
pAppCfg->SetAppMetric( (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue() );
- bSaveAppOptions = TRUE;
+ bSaveAppOptions = sal_True;
}
if ( IS_AVAILABLE(SCITEM_USERLIST,pItem) )
{
ScGlobal::SetUserList( ((const ScUserListItem*)pItem)->GetUserList() );
- bSaveAppOptions = TRUE;
+ bSaveAppOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_OPT_SYNCZOOM,pItem) )
{
pAppCfg->SetSynchronizeZoom( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
- bSaveAppOptions = TRUE;
+ bSaveAppOptions = sal_True;
}
//============================================
@@ -1086,7 +1017,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
ScViewData* pViewData = pViewSh->GetViewData();
const ScViewOptions& rOldOpt = pViewData->GetOptions();
- BOOL bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) !=
+ sal_Bool bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) !=
rNewOpt.GetOption( VOPT_ANCHOR ) );
if ( rOldOpt != rNewOpt )
@@ -1094,7 +1025,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
pViewData->SetOptions( rNewOpt ); // veraendert rOldOpt
pViewData->GetDocument()->SetViewOptions( rNewOpt );
pDocSh->SetDocumentModified();
- bRepaint = TRUE;
+ bRepaint = sal_True;
}
if ( bAnchorList )
pViewSh->UpdateAnchorHandles();
@@ -1125,7 +1056,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
pViewData->SetOptions( aNewViewOpt );
pViewData->GetDocument()->SetViewOptions( aNewViewOpt );
pDocSh->SetDocumentModified();
- bRepaint = TRUE;
+ bRepaint = sal_True;
}
}
ScViewOptions aNewViewOpt ( GetViewOptions() );
@@ -1177,7 +1108,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// nach den eigentlichen DocOptions auch noch die TabDistance setzen
if ( IS_AVAILABLE(SID_ATTR_DEFTABSTOP,pItem) )
{
- USHORT nTabDist = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = ((SfxUInt16Item*)pItem)->GetValue();
ScDocOptions aOpt(GetDocOptions());
aOpt.SetTabDistance(nTabDist);
SetDocOptions( aOpt );
@@ -1197,7 +1128,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if ( IS_AVAILABLE(SID_AUTOSPELL_CHECK,pItem) ) // an Doc-Options
{
- BOOL bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue();
if (pDoc)
{
@@ -1218,7 +1149,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
//#92038#; don't set document modified, because this flag is no longer saved
// pDocSh->SetDocumentModified();
- bRepaint = TRUE; // weil HideAutoSpell evtl. ungueltig
+ bRepaint = sal_True; // weil HideAutoSpell evtl. ungueltig
//! alle Views painten ???
}
}
@@ -1244,53 +1175,53 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if ( IS_AVAILABLE(SID_SC_INPUT_SELECTIONPOS,pItem) )
{
pInputCfg->SetMoveDir( ((const SfxUInt16Item*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_SELECTION,pItem) )
{
pInputCfg->SetMoveSelection( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_EDITMODE,pItem) )
{
pInputCfg->SetEnterEdit( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_FMT_EXPAND,pItem) )
{
pInputCfg->SetExtendFormat( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_RANGEFINDER,pItem) )
{
pInputCfg->SetRangeFinder( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_REF_EXPAND,pItem) )
{
pInputCfg->SetExpandRefs( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_MARK_HEADER,pItem) )
{
pInputCfg->SetMarkHeader( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
- bUpdateMarks = TRUE;
+ bSaveInputOptions = sal_True;
+ bUpdateMarks = sal_True;
}
if ( IS_AVAILABLE(SID_SC_INPUT_TEXTWYSIWYG,pItem) )
{
- BOOL bNew = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bNew = ((const SfxBoolItem*)pItem)->GetValue();
if ( bNew != pInputCfg->GetTextWysiwyg() )
{
pInputCfg->SetTextWysiwyg( bNew );
- bSaveInputOptions = TRUE;
- bUpdateRefDev = TRUE;
+ bSaveInputOptions = sal_True;
+ bUpdateRefDev = sal_True;
}
}
if( IS_AVAILABLE( SID_SC_INPUT_REPLCELLSWARN, pItem ) )
{
pInputCfg->SetReplaceCellsWarn( ((const SfxBoolItem*)pItem)->GetValue() );
- bSaveInputOptions = TRUE;
+ bSaveInputOptions = sal_True;
}
//============================================
@@ -1321,9 +1252,9 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
WaitObject aWait( pDocSh->GetActiveDialogParent() );
pDoc->CalcAll();
if ( pViewSh )
- pViewSh->UpdateCharts( TRUE );
+ pViewSh->UpdateCharts( sal_True );
else
- ScDBFunc::DoUpdateCharts( ScAddress(), pDoc, TRUE );
+ ScDBFunc::DoUpdateCharts( ScAddress(), pDoc, sal_True );
if (pBindings)
pBindings->Invalidate( SID_ATTR_SIZE ); //SvxPosSize-StatusControl-Update
}
@@ -1381,7 +1312,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// update view scale
ScViewData* pViewData = pOneViewSh->GetViewData();
- pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), FALSE );
+ pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), false );
// repaint
pOneViewSh->PaintGrid();
@@ -1401,7 +1332,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
//
//------------------------------------------------------------------
-ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, BOOL bUseRef )
+ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, sal_Bool bUseRef )
{
if ( pRefInputHandler && bUseRef )
return pRefInputHandler;
@@ -1440,25 +1371,25 @@ void ScModule::SetInputMode( ScInputMode eMode )
pHdl->SetMode( eMode );
}
-BOOL ScModule::IsEditMode()
+sal_Bool ScModule::IsEditMode()
{
ScInputHandler* pHdl = GetInputHdl();
return pHdl && pHdl->IsEditMode();
}
-BOOL ScModule::IsInputMode()
+sal_Bool ScModule::IsInputMode()
{
ScInputHandler* pHdl = GetInputHdl();
return pHdl && pHdl->IsInputMode();
}
-BOOL ScModule::InputKeyEvent( const KeyEvent& rKEvt, BOOL bStartEdit )
+sal_Bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, sal_Bool bStartEdit )
{
ScInputHandler* pHdl = GetInputHdl();
- return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : FALSE );
+ return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : false );
}
-void ScModule::InputEnterHandler( BYTE nBlockMode )
+void ScModule::InputEnterHandler( sal_uInt8 nBlockMode )
{
if ( !SFX_APP()->IsDowning() ) // nicht beim Programmende
{
@@ -1539,7 +1470,7 @@ String ScModule::InputGetFormulaStr()
return aStr;
}
-void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
+void ScModule::ActivateInputWindow( const String* pStrFormula, sal_Bool bMatrix )
{
ScInputHandler* pHdl = GetInputHdl();
if ( pHdl )
@@ -1550,10 +1481,10 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
// Formel uebernehmen
if ( pWin )
{
- pWin->SetFuncString( *pStrFormula, FALSE );
- // SetSumAssignMode wegen FALSE nicht noetig
+ pWin->SetFuncString( *pStrFormula, false );
+ // SetSumAssignMode wegen sal_False nicht noetig
}
- BYTE nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL;
+ sal_uInt8 nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL;
pHdl->EnterHandler( nMode );
// ohne Invalidate bleibt die Selektion stehen, wenn die Formel unveraendert ist
@@ -1565,8 +1496,8 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
// Abbrechen
if ( pWin )
{
- pWin->SetFuncString( EMPTY_STRING, FALSE );
- // SetSumAssignMode wegen FALSE nicht noetig
+ pWin->SetFuncString( EMPTY_STRING, false );
+ // SetSumAssignMode wegen sal_False nicht noetig
}
pHdl->CancelHandler();
}
@@ -1579,7 +1510,7 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix )
//
//------------------------------------------------------------------
-void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
+void ScModule::SetRefDialog( sal_uInt16 nId, sal_Bool bVis, SfxViewFrame* pViewFrm )
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
@@ -1605,7 +1536,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
else
{
// no ScTabViewShell - possible for example from a Basic macro
- bVis = FALSE;
+ bVis = false;
nCurRefDlgId = 0; // don't set nCurRefDlgId if no dialog is created
}
@@ -1617,7 +1548,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
}
}
-SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId )
+SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId )
{
// first try the current view
@@ -1643,12 +1574,12 @@ SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId )
return NULL; // none found
}
-BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh)
+sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bIsModal = FALSE;
+ sal_Bool bIsModal = false;
if ( nCurRefDlgId )
{
@@ -1664,7 +1595,7 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh)
// in 592 and above, the dialog isn't visible in other views
// if the dialog is open but can't be accessed, disable input
- bIsModal = TRUE;
+ bIsModal = sal_True;
}
// pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten
@@ -1680,12 +1611,12 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh)
return bIsModal;
}
-BOOL ScModule::IsTableLocked()
+sal_Bool ScModule::IsTableLocked()
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bLocked = FALSE;
+ sal_Bool bLocked = false;
// bisher nur bei ScAnyRefDlg
@@ -1695,18 +1626,18 @@ BOOL ScModule::IsTableLocked()
if ( pChildWnd )
bLocked = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow())->IsTableLocked();
else
- bLocked = TRUE; // for other views, see IsModalMode
+ bLocked = sal_True; // for other views, see IsModalMode
}
return bLocked;
}
-BOOL ScModule::IsRefDialogOpen()
+sal_Bool ScModule::IsRefDialogOpen()
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bIsOpen = FALSE;
+ sal_Bool bIsOpen = false;
if ( nCurRefDlgId )
{
@@ -1714,18 +1645,18 @@ BOOL ScModule::IsRefDialogOpen()
if ( pChildWnd )
bIsOpen = pChildWnd->IsVisible();
else
- bIsOpen = TRUE; // for other views, see IsModalMode
+ bIsOpen = sal_True; // for other views, see IsModalMode
}
return bIsOpen;
}
-BOOL ScModule::IsFormulaMode()
+sal_Bool ScModule::IsFormulaMode()
{
//! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents)
- BOOL bIsFormula = FALSE;
+ sal_Bool bIsFormula = false;
if ( nCurRefDlgId )
{
@@ -1744,7 +1675,7 @@ BOOL ScModule::IsFormulaMode()
}
if (bIsInEditCommand)
- bIsFormula = TRUE;
+ bIsFormula = sal_True;
return bIsFormula;
}
@@ -1753,14 +1684,14 @@ void lcl_MarkedTabs( const ScMarkData& rMark, SCTAB& rStartTab, SCTAB& rEndTab )
{
if (rMark.GetSelectCount() > 1)
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for (SCTAB i=0; i<=MAXTAB; i++)
if (rMark.GetTableSelect(i))
{
if (bFirst)
rStartTab = i;
rEndTab = i;
- bFirst = FALSE;
+ bFirst = false;
}
}
}
@@ -1795,8 +1726,8 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow());
// hide the (color) selection now instead of later from LoseFocus,
- // don't abort the ref input that causes this call (bDoneRefMode = FALSE)
- pRefDlg->HideReference( FALSE );
+ // don't abort the ref input that causes this call (bDoneRefMode = sal_False)
+ pRefDlg->HideReference( false );
pRefDlg->SetReference( aNew, pDoc );
}
}
@@ -1864,7 +1795,7 @@ void ScModule::EndReference()
void ScModule::AnythingChanged()
{
- ULONG nOldTime = aIdleTimer.GetTimeout();
+ sal_uLong nOldTime = aIdleTimer.GetTimeout();
if ( nOldTime != SC_IDLE_MIN )
aIdleTimer.SetTimeout( SC_IDLE_MIN );
@@ -1892,15 +1823,15 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
return 0;
}
- BOOL bMore = FALSE;
+ sal_Bool bMore = false;
ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bLinks = pDoc->IdleCheckLinks();
- BOOL bWidth = pDoc->IdleCalcTextWidth();
- BOOL bSpell = pDoc->ContinueOnlineSpelling();
+ sal_Bool bLinks = pDoc->IdleCheckLinks();
+ sal_Bool bWidth = pDoc->IdleCalcTextWidth();
+ sal_Bool bSpell = pDoc->ContinueOnlineSpelling();
if ( bSpell )
aSpellTimer.Start(); // da ist noch was
@@ -1912,8 +1843,8 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
lcl_CheckNeedsRepaint( pDocSh );
}
- ULONG nOldTime = aIdleTimer.GetTimeout();
- ULONG nNewTime = nOldTime;
+ sal_uLong nOldTime = aIdleTimer.GetTimeout();
+ sal_uLong nNewTime = nOldTime;
if ( bMore )
{
nNewTime = SC_IDLE_MIN;
@@ -1958,7 +1889,7 @@ IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG )
}
//virtuelle Methoden fuer den Optionendialog
-SfxItemSet* ScModule::CreateItemSet( USHORT nId )
+SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
if(SID_SC_EDITOPTIONS == nId)
@@ -2002,7 +1933,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId )
// SFX_APP()->GetOptions( aSet );
pRet->Put( SfxUInt16Item( SID_ATTR_METRIC,
- sal::static_int_cast<UINT16>(GetAppOptions().GetAppMetric()) ) );
+ sal::static_int_cast<sal_uInt16>(GetAppOptions().GetAppMetric()) ) );
// TP_CALC
pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP,
@@ -2051,7 +1982,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId )
return pRet;
}
-void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void ScModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(SID_SC_EDITOPTIONS == nId)
{
@@ -2059,7 +1990,7 @@ void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
}
-SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -2190,59 +2121,59 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
return 0;
}
-BOOL ScModule::RegisterRefWindow( USHORT nSlotId, Window *pWnd )
+sal_Bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
{
std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() )
{
rlRefWindow.push_back( pWnd );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScModule::UnregisterRefWindow( USHORT nSlotId, Window *pWnd )
+sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
{
- std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return FALSE;
+ return false;
std::list<Window*> & rlRefWindow = iSlot->second;
std::list<Window*>::iterator i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
if( i == rlRefWindow.end() )
- return FALSE;
+ return false;
rlRefWindow.erase( i );
if( !rlRefWindow.size() )
m_mapRefWindow.erase( nSlotId );
- return TRUE;
+ return sal_True;
}
-BOOL ScModule::IsAliveRefDlg( USHORT nSlotId, Window *pWnd )
+sal_Bool ScModule::IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd )
{
- std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return FALSE;
+ return false;
std::list<Window*> & rlRefWindow = iSlot->second;
return rlRefWindow.end() != std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
}
-Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
+Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, Window *pWndAncestor )
{
if (!pWndAncestor)
return NULL;
- std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
return NULL;
@@ -2265,7 +2196,7 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor )
while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
- for( std::map<USHORT, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
+ for( std::map<sal_uInt16, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
i!=m_mapRefWindow.end(); ++i )
for( std::list<Window*>::iterator j = i->second.begin(); j!=i->second.end(); ++j )
if ( pWndAncestor->IsWindowOrChild( *j, (*j)->IsSystemWindow() ) )
diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx
index f5441715f270..eaa2aa9aa237 100644
--- a/sc/source/ui/app/scmod2.cxx
+++ b/sc/source/ui/app/scmod2.cxx
@@ -50,8 +50,8 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang,
- BOOL& rAutoSpell )
+void ScModule::GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang,
+ sal_Bool& rAutoSpell )
{
// use SvtLinguConfig instead of service LinguProperties to avoid
// loading the linguistic component
@@ -66,7 +66,7 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt
rAutoSpell = aOptions.bIsSpellAuto;
}
-void ScModule::SetAutoSpellProperty( BOOL bSet )
+void ScModule::SetAutoSpellProperty( sal_Bool bSet )
{
// use SvtLinguConfig instead of service LinguProperties to avoid
// loading the linguistic component
@@ -79,15 +79,15 @@ void ScModule::SetAutoSpellProperty( BOOL bSet )
-BOOL ScModule::HasThesaurusLanguage( USHORT nLang )
+sal_Bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang )
{
if ( nLang == LANGUAGE_NONE )
- return FALSE;
+ return false;
lang::Locale aLocale;
SvxLanguageToLocale( aLocale, nLang );
- BOOL bHasLang = FALSE;
+ sal_Bool bHasLang = false;
try
{
uno::Reference< linguistic2::XThesaurus > xThes(LinguMgr::GetThesaurus());
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index f229e885d0d5..7e9cbd9621a2 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -56,9 +56,9 @@ using namespace com::sun::star;
// -----------------------------------------------------------------------
-BOOL lcl_IsURLButton( SdrObject* pObject )
+sal_Bool lcl_IsURLButton( SdrObject* pObject )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObject);
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
@@ -76,7 +76,7 @@ BOOL lcl_IsURLButton( SdrObject* pObject )
uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType );
form::FormButtonType eTmp;
if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL )
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -98,13 +98,13 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView
{
// handle selection on drawing layer
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount )
{
if ( nMarkCount == 1 )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if ( nSdrObjKind == OBJ_GRAF )
{
@@ -176,11 +176,11 @@ ScSelectionTransferObj::~ScSelectionTransferObj()
DBG_ASSERT( !pView, "ScSelectionTransferObj dtor: ForgetView not called" );
}
-BOOL ScSelectionTransferObj::StillValid()
+sal_Bool ScSelectionTransferObj::StillValid()
{
//! check if view still has same cell selection
- //! (but return FALSE if data has changed inbetween)
- return FALSE;
+ //! (but return sal_False if data has changed inbetween)
+ return false;
}
void ScSelectionTransferObj::ForgetView()
@@ -296,10 +296,10 @@ void ScSelectionTransferObj::CreateCellData()
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- // bApi = TRUE -> no error mesages
- // #i18364# bStopEdit = FALSE -> don't end edit mode
+ // bApi = sal_True -> no error mesages
+ // #i18364# bStopEdit = sal_False -> don't end edit mode
// (this may be called from pasting into the edit line)
- BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE, TRUE, FALSE );
+ sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, sal_True, sal_True, false );
ScDrawLayer::SetGlobalDrawPersist(NULL);
@@ -332,7 +332,7 @@ void ScSelectionTransferObj::CreateCellData()
}
//! make static member of ScDrawView
-extern void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle );
+extern void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle );
void ScSelectionTransferObj::CreateDrawData()
{
@@ -344,7 +344,7 @@ void ScSelectionTransferObj::CreateDrawData()
ScDrawView* pDrawView = pView->GetScDrawView();
if ( pDrawView )
{
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -401,7 +401,7 @@ ScDrawTransferObj* ScSelectionTransferObj::GetDrawData()
sal_Bool ScSelectionTransferObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
uno::Reference<datatransfer::XTransferable> xSource;
switch (eMode)
diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx
index b9bddee4fe1d..c613bf9cd41a 100644
--- a/sc/source/ui/app/template.cxx
+++ b/sc/source/ui/app/template.cxx
@@ -35,7 +35,7 @@
//------------------------------------------------------------------------
-ScTemplateDlg::ScTemplateDlg(Window * pParent, USHORT nAppResource) :
+ScTemplateDlg::ScTemplateDlg(Window * pParent, sal_uInt16 nAppResource) :
// SfxTemplateDlg( pParent, nAppResource )
SfxTemplateDialog( pParent )
{
@@ -49,9 +49,9 @@ ScTemplateDlg::~ScTemplateDlg()
//------------------------------------------------------------------------
-BOOL ScTemplateDlg::New(String &rNewName)
+sal_Bool ScTemplateDlg::New(String &rNewName)
{
- return TRUE;
+ return sal_True;
}
@@ -60,9 +60,9 @@ void ScTemplateDlg::Edit(const String &)
}
-BOOL ScTemplateDlg::Delete(const String &)
+sal_Bool ScTemplateDlg::Delete(const String &)
{
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index ad855bfbbc59..b584c7e86f7c 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -107,7 +107,7 @@ void ScTransferObj::GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCR
}
void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor,
- const ScRange& rBlock, BOOL bMetaFile )
+ const ScRange& rBlock, sal_Bool bMetaFile )
{
if (!pDoc)
return;
@@ -133,8 +133,9 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
nDragHandleX( 0 ),
nDragHandleY( 0 ),
nDragSourceFlags( 0 ),
- bDragWasInternal( FALSE ),
- bUsedForLink( FALSE )
+ bDragWasInternal( false ),
+ bUsedForLink( false ),
+ bUseInApi( false )
{
DBG_ASSERT(pDoc->IsClipboard(), "wrong document");
@@ -147,25 +148,25 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
SCCOL nCol2;
SCROW nRow2;
pDoc->GetClipStart( nCol1, nRow1 );
- pDoc->GetClipArea( nCol2, nRow2, TRUE ); // real source area - include filtered rows
+ pDoc->GetClipArea( nCol2, nRow2, sal_True ); // real source area - include filtered rows
nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nCol1 );
nRow2 = sal::static_int_cast<SCROW>( nRow2 + nRow1 );
SCCOL nDummy;
- pDoc->GetClipArea( nDummy, nNonFiltered, FALSE );
+ pDoc->GetClipArea( nDummy, nNonFiltered, false );
bHasFiltered = (nNonFiltered < (nRow2 - nRow1));
++nNonFiltered; // to get count instead of diff
SCTAB nTab1=0;
SCTAB nTab2=0;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for (SCTAB i=0; i<=MAXTAB; i++)
if (pDoc->HasTable(i))
{
if (bFirst)
nTab1 = i;
nTab2 = i;
- bFirst = FALSE;
+ bFirst = false;
}
DBG_ASSERT(!bFirst, "no sheet selected");
@@ -257,7 +258,7 @@ void ScTransferObj::AddSupportedFormats()
sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
{
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
- sal_Bool bOK = sal_False;
+ sal_Bool bOK = false;
if( HasFormat( nFormat ) )
{
@@ -303,9 +304,9 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
// if this transfer object was used to create a DDE link, filtered rows
// have to be included for subsequent calls (to be consistent with link data)
if ( nFormat == SOT_FORMATSTR_ID_LINK )
- bUsedForLink = TRUE;
+ bUsedForLink = sal_True;
- BOOL bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink;
+ sal_Bool bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink;
ScImportExport aObj( pDoc, aBlock );
ScExportTextOptions aTextOptions(ScExportTextOptions::None, 0, true);
@@ -346,7 +347,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
VirtualDevice aVirtDev;
aVirtDev.SetOutputSizePixel( aVirtDev.LogicToPixel( aMMRect.GetSize(), MAP_100TH_MM ) );
- PaintToDev( &aVirtDev, pDoc, 1.0, aBlock, FALSE );
+ PaintToDev( &aVirtDev, pDoc, 1.0, aBlock, false );
aVirtDev.SetMapMode( MapMode( MAP_PIXEL ) );
Bitmap aBmp = aVirtDev.GetBitmap( Point(), aVirtDev.GetOutputSize() );
@@ -364,7 +365,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
MapMode aMapMode( pEmbObj->GetMapUnit() );
Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) );
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( false );
aVDev.SetMapMode( aMapMode );
aMtf.SetPrefSize( aVisArea.GetSize() );
aMtf.SetPrefMapMode( aMapMode );
@@ -394,7 +395,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
{
// called from SetObject, put data into stream
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
switch (nUserObjectId)
{
case SCTRANS_TYPE_IMPEX:
@@ -423,7 +424,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
// write old format without support for unicode characters.
// Get the data from the EditEngine's transferable instead.
- USHORT nParCnt = pEngine->GetParagraphCount();
+ sal_uInt16 nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
nParCnt = 1;
ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) );
@@ -446,11 +447,11 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), embed::ElementModes::READWRITE );
// write document storage
- pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
+ pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, false );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -465,7 +466,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -499,7 +500,7 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction )
ScMarkData aMarkData = GetSourceMarkData();
// external drag&drop doesn't copy objects, so they also aren't deleted:
// bApi=TRUE, don't show error messages from drag&drop
- pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, TRUE, TRUE );
+ pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, true, true );
}
}
@@ -531,18 +532,23 @@ void ScTransferObj::SetDrawPersist( const SfxObjectShellRef& rRef )
void ScTransferObj::SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark )
{
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
xDragSourceRanges = new ScCellRangesObj( pSourceShell, aRanges );
}
-void ScTransferObj::SetDragSourceFlags( USHORT nFlags )
+void ScTransferObj::SetDragSourceFlags( sal_uInt16 nFlags )
{
nDragSourceFlags = nFlags;
}
void ScTransferObj::SetDragWasInternal()
{
- bDragWasInternal = TRUE;
+ bDragWasInternal = sal_True;
+}
+
+void ScTransferObj::SetUseInApi( bool bSet )
+{
+ bUseInApi = bSet;
}
ScDocument* ScTransferObj::GetSourceDocument()
@@ -569,7 +575,7 @@ ScMarkData ScTransferObj::GetSourceMarkData()
if (pRangesObj)
{
const ScRangeList& rRanges = pRangesObj->GetRangeList();
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
}
return aMarkData;
}
@@ -589,13 +595,13 @@ void ScTransferObj::InitDocShell()
ScDocument* pDestDoc = pDocSh->GetDocument();
ScMarkData aDestMark;
- aDestMark.SelectTable( 0, TRUE );
+ aDestMark.SelectTable( 0, sal_True );
pDestDoc->SetDocOptions( pDoc->GetDocOptions() ); // #i42666#
String aTabName;
pDoc->GetName( aBlock.aStart.Tab(), aTabName );
- pDestDoc->RenameTab( 0, aTabName, FALSE ); // no UpdateRef (empty)
+ pDestDoc->RenameTab( 0, aTabName, false ); // no UpdateRef (empty)
pDestDoc->CopyStdStylesFrom( pDoc );
@@ -612,18 +618,18 @@ void ScTransferObj::InitDocShell()
pDestDoc->SetLayoutRTL(0, pDoc->IsLayoutRTL(nSrcTab));
for (nCol=nStartX; nCol<=nEndX; nCol++)
if ( pDoc->ColHidden(nCol, nSrcTab) )
- pDestDoc->ShowCol( nCol, 0, FALSE );
+ pDestDoc->ShowCol( nCol, 0, false );
else
pDestDoc->SetColWidth( nCol, 0, pDoc->GetColWidth( nCol, nSrcTab ) );
- ScBitMaskCompressedArray< SCROW, BYTE> & rDestRowFlags =
+ ScBitMaskCompressedArray< SCROW, sal_uInt8> & rDestRowFlags =
pDestDoc->GetRowFlagsArrayModifiable(0);
for (SCROW nRow = nStartY; nRow <= nEndY; ++nRow)
{
- BYTE nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab);
+ sal_uInt8 nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab);
if ( pDoc->RowHidden(nRow, nSrcTab) )
- pDestDoc->ShowRow( nRow, 0, FALSE );
+ pDestDoc->ShowRow( nRow, 0, false );
else
{
pDestDoc->SetRowHeight( nRow, 0, pDoc->GetOriginalHeight( nRow, nSrcTab ) );
@@ -642,16 +648,16 @@ void ScTransferObj::InitDocShell()
// pDoc is always a Clipboard-document
ScRange aDestRange( nStartX,nStartY,0, nEndX,nEndY,0 );
- BOOL bWasCut = pDoc->IsCutMode();
+ sal_Bool bWasCut = pDoc->IsCutMode();
if (!bWasCut)
- pDoc->SetClipArea( aDestRange, TRUE ); // Cut
- pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, FALSE );
+ pDoc->SetClipArea( aDestRange, sal_True ); // Cut
+ pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, false );
pDoc->SetClipArea( aDestRange, bWasCut );
StripRefs( pDoc, nStartX,nStartY, nEndX,nEndY, pDestDoc, 0,0 );
ScRange aMergeRange = aDestRange;
- pDestDoc->ExtendMerge( aMergeRange, TRUE );
+ pDestDoc->ExtendMerge( aMergeRange, sal_True );
pDoc->CopyDdeLinks( pDestDoc ); // copy values of DDE Links
@@ -720,7 +726,7 @@ void ScTransferObj::InitDocShell()
//pDocSh->SvInPlaceObject::SetVisArea( aNewArea );
pDocSh->SetVisArea( aNewArea );
- pDocSh->UpdateOle(&aViewData, TRUE);
+ pDocSh->UpdateOle(&aViewData, sal_True);
//! SetDocumentModified?
if ( pDestDoc->IsChartListenerCollectionNeedsUpdate() )
@@ -728,7 +734,7 @@ void ScTransferObj::InitDocShell()
}
}
-SfxObjectShell* ScTransferObj::SetDrawClipDoc( BOOL bAnyOle )
+SfxObjectShell* ScTransferObj::SetDrawClipDoc( sal_Bool bAnyOle )
{
// update ScGlobal::pDrawClipDocShellRef
@@ -782,14 +788,14 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*) pCell;
- BOOL bOut = FALSE;
+ sal_Bool bOut = false;
ScDetectiveRefIter aRefIter( pFCell );
while ( !bOut && aRefIter.GetNextRef( aRef ) )
{
if ( aRef.aStart.Tab() != nSrcTab || aRef.aEnd.Tab() != nSrcTab ||
aRef.aStart.Col() < nStartX || aRef.aEnd.Col() > nEndX ||
aRef.aStart.Row() < nStartY || aRef.aEnd.Row() > nEndY )
- bOut = TRUE;
+ bOut = sal_True;
}
if (bOut)
{
@@ -797,7 +803,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
SCROW nRow = aIter.GetRow() - nSubY;
ScBaseCell* pNew = 0;
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
if (nErrCode)
{
pNew = new ScStringCell( ScGlobal::GetErrorString(nErrCode) );
@@ -825,11 +831,11 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
// number formats
- ULONG nOldFormat = ((const SfxUInt32Item*)
+ sal_uLong nOldFormat = ((const SfxUInt32Item*)
pDestDoc->GetAttr(nCol,nRow,nDestTab, ATTR_VALUE_FORMAT))->GetValue();
if ( (nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
{
- ULONG nNewFormat = pFCell->GetStandardFormat( *pFormatter,
+ sal_uLong nNewFormat = pFCell->GetStandardFormat( *pFormatter,
nOldFormat );
pDestDoc->ApplyAttr( nCol,nRow,nDestTab,
SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat) );
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 1d6be7abdfc3..d01efc5ee730 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -58,7 +58,7 @@ TYPEINIT1(ScIndexHint, SfxHint);
// ScInputStatusItem - Status-Update fuer Eingabezeile
// -----------------------------------------------------------------------
-ScInputStatusItem::ScInputStatusItem( USHORT nWhichP,
+ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP,
const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
@@ -117,7 +117,7 @@ SfxPoolItem* ScInputStatusItem::Clone( SfxItemPool * ) const
// ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht
// -----------------------------------------------------------------------
-ScTablesHint::ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2) :
+ScTablesHint::ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2) :
nId( nNewId ),
nTab1( nTable1 ),
nTab2( nTable2 )
@@ -133,7 +133,7 @@ ScTablesHint::~ScTablesHint()
// ScIndexHint
// -----------------------------------------------------------------------
-ScIndexHint::ScIndexHint(USHORT nNewId, USHORT nIdx) :
+ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) :
nId( nNewId ),
nIndex( nIdx )
{
@@ -162,7 +162,7 @@ ScEditViewHint::~ScEditViewHint()
// ScSortItem - Daten fuer den Sortierdialog
// -----------------------------------------------------------------------
-ScSortItem::ScSortItem( USHORT nWhichP,
+ScSortItem::ScSortItem( sal_uInt16 nWhichP,
ScViewData* ptrViewData,
const ScSortParam* pSortData ) :
SfxPoolItem ( nWhichP ),
@@ -173,7 +173,7 @@ ScSortItem::ScSortItem( USHORT nWhichP,
//------------------------------------------------------------------------
-ScSortItem::ScSortItem( USHORT nWhichP,
+ScSortItem::ScSortItem( sal_uInt16 nWhichP,
const ScSortParam* pSortData ) :
SfxPoolItem ( nWhichP ),
pViewData ( NULL )
@@ -222,7 +222,7 @@ SfxPoolItem* ScSortItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
+bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
{
// Return empty value as there is no useful conversion
rVal = com::sun::star::uno::Any();
@@ -233,23 +233,23 @@ bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd *
// ScQueryItem - Daten fuer den Filterdialog
// -----------------------------------------------------------------------
-ScQueryItem::ScQueryItem( USHORT nWhichP,
+ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
ScViewData* ptrViewData,
const ScQueryParam* pQueryData ) :
SfxPoolItem ( nWhichP ),
pViewData ( ptrViewData ),
- bIsAdvanced ( FALSE )
+ bIsAdvanced ( false )
{
if ( pQueryData ) theQueryData = *pQueryData;
}
//------------------------------------------------------------------------
-ScQueryItem::ScQueryItem( USHORT nWhichP,
+ScQueryItem::ScQueryItem( sal_uInt16 nWhichP,
const ScQueryParam* pQueryData ) :
SfxPoolItem ( nWhichP ),
pViewData ( NULL ),
- bIsAdvanced ( FALSE )
+ bIsAdvanced ( false )
{
if ( pQueryData ) theQueryData = *pQueryData;
}
@@ -276,13 +276,13 @@ void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource)
if (pSource)
{
aAdvSource = *pSource;
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
}
else
- bIsAdvanced = FALSE;
+ bIsAdvanced = false;
}
-BOOL ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
+sal_Bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const
{
rSource = aAdvSource;
return bIsAdvanced;
@@ -320,7 +320,7 @@ SfxPoolItem* ScQueryItem::Clone( SfxItemPool * ) const
// ScSubTotalItem - Daten fuer den Zwischenergebnisdialog
// -----------------------------------------------------------------------
-ScSubTotalItem::ScSubTotalItem( USHORT nWhichP,
+ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
ScViewData* ptrViewData,
const ScSubTotalParam* pSubTotalData ) :
SfxPoolItem ( nWhichP ),
@@ -331,7 +331,7 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP,
//------------------------------------------------------------------------
-ScSubTotalItem::ScSubTotalItem( USHORT nWhichP,
+ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP,
const ScSubTotalParam* pSubTotalData ) :
SfxPoolItem ( nWhichP ),
pViewData ( NULL )
@@ -380,7 +380,7 @@ SfxPoolItem* ScSubTotalItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
+bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const
{
// Return empty value as there is no useful conversion
rVal = com::sun::star::uno::Any();
@@ -391,7 +391,7 @@ bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMember
// ScUserListItem - Transporter fuer den Benutzerlisten-TabPage
// -----------------------------------------------------------------------
-ScUserListItem::ScUserListItem( USHORT nWhichP )
+ScUserListItem::ScUserListItem( sal_uInt16 nWhichP )
: SfxPoolItem ( nWhichP ),
pUserList ( NULL )
{
@@ -427,7 +427,7 @@ int ScUserListItem::operator==( const SfxPoolItem& rItem ) const
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
const ScUserListItem& r = (const ScUserListItem&)rItem;
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = false;
if ( !pUserList || !(r.pUserList) )
bEqual = ( !pUserList && !(r.pUserList) );
@@ -458,7 +458,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList )
// -----------------------------------------------------------------------
ScConsolidateItem::ScConsolidateItem(
- USHORT nWhichP,
+ sal_uInt16 nWhichP,
const ScConsolidateParam* pConsolidateData ) :
SfxPoolItem ( nWhichP )
{
@@ -509,8 +509,8 @@ SfxPoolItem* ScConsolidateItem::Clone( SfxItemPool * ) const
// ScPivotItem - Daten fuer den Pivot-Dialog
// -----------------------------------------------------------------------
-ScPivotItem::ScPivotItem( USHORT nWhichP, const ScDPSaveData* pData,
- const ScRange* pRange, BOOL bNew ) :
+ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData,
+ const ScRange* pRange, sal_Bool bNew ) :
SfxPoolItem ( nWhichP )
{
// pSaveData must always exist
@@ -572,7 +572,7 @@ SfxPoolItem* ScPivotItem::Clone( SfxItemPool * ) const
// ScSolveItem - Daten fuer den Solver-Dialog
// -----------------------------------------------------------------------
-ScSolveItem::ScSolveItem( USHORT nWhichP,
+ScSolveItem::ScSolveItem( sal_uInt16 nWhichP,
const ScSolveParam* pSolveData )
: SfxPoolItem ( nWhichP )
{
@@ -622,7 +622,7 @@ SfxPoolItem* ScSolveItem::Clone( SfxItemPool * ) const
// ScTabOpItem - Daten fuer den TabOp-Dialog
// -----------------------------------------------------------------------
-ScTabOpItem::ScTabOpItem( USHORT nWhichP,
+ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP,
const ScTabOpParam* pTabOpData )
: SfxPoolItem ( nWhichP )
{
@@ -673,7 +673,7 @@ SfxPoolItem* ScTabOpItem::Clone( SfxItemPool * ) const
// ScCondFrmtItem - Daten fuer den Dialog bedingte Formatierung
// -----------------------------------------------------------------------
-ScCondFrmtItem::ScCondFrmtItem( USHORT nWhichP,
+ScCondFrmtItem::ScCondFrmtItem( sal_uInt16 nWhichP,
//! const ScConditionalFormat* pCondFrmt )
const ScConditionalFormat& rCondFrmt )
: SfxPoolItem ( nWhichP ),
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 1f2e11e49985..7095de34ce2f 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -73,7 +73,7 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP,
AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
#else
String number(RTL_CONSTASCII_USTRINGPARAM("Numbers"));
- AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, FALSE, TAB_APPEND);
+ AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, false, TAB_APPEND);
#endif
DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
@@ -105,7 +105,7 @@ ScAttrDlg::~ScAttrDlg()
// -----------------------------------------------------------------------
-void ScAttrDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
+void ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx
index a36edf55fd33..9afdd62faf18 100644
--- a/sc/source/ui/attrdlg/condfrmt.cxx
+++ b/sc/source/ui/attrdlg/condfrmt.cxx
@@ -72,7 +72,6 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aFtCond1Template ( this, ScResId( FT_COND1_TEMPLATE ) ),
aLbCond1Template ( this, ScResId( LB_COND1_TEMPLATE ) ),
aBtnNew1 ( this, ScResId( BTN_COND1_NEW ) ),
- aFlSep1 ( this, ScResId( FL_SEP1 ) ),
aCbxCond2 ( this, ScResId( CBX_COND2 ) ),
aLbCond21 ( this, ScResId( LB_COND2_1 ) ),
@@ -85,7 +84,6 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aFtCond2Template ( this, ScResId( FT_COND2_TEMPLATE ) ),
aLbCond2Template ( this, ScResId( LB_COND2_TEMPLATE ) ),
aBtnNew2 ( this, ScResId( BTN_COND2_NEW ) ),
- aFlSep2 ( this, ScResId( FL_SEP2 ) ),
aCbxCond3 ( this, ScResId( CBX_COND3 ) ),
aLbCond31 ( this, ScResId( LB_COND3_1 ) ),
@@ -102,8 +100,10 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
+ aFlSep2 ( this, ScResId( FL_SEP2 ) ),
+ aFlSep1 ( this, ScResId( FL_SEP1 ) ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
pDoc ( pCurDoc )
{
@@ -188,7 +188,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aCond2Size2 = Size( aPos.X() - aCond2Pos2.X(), aCond2Size3.Height() );
aCond2Size1 = Size( aPos.X() - aCond2Pos1.X(), aCond2Size3.Height() );
- aCbxCond2.Check( FALSE );
+ aCbxCond2.Check( false );
aLbCond21.SelectEntryPos( 0 );
aLbCond22.SelectEntryPos( 0 );
@@ -203,7 +203,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
aCond3Size2 = Size( aPos.X() - aCond3Pos2.X(), aCond3Size3.Height() );
aCond3Size1 = Size( aPos.X() - aCond3Pos1.X(), aCond3Size3.Height() );
- aCbxCond3.Check( FALSE );
+ aCbxCond3.Check( false );
aLbCond31.SelectEntryPos( 0 );
aLbCond32.SelectEntryPos( 0 );
@@ -256,7 +256,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
;
else // via Werte
{
- aLbCond12.SelectEntryPos( sal::static_int_cast<USHORT>( eMode ) );
+ aLbCond12.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eMode ) );
if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) )
aEdtCond12.SetText( pEntry->GetExpression( aCurPos, 1 ) );
}
@@ -264,7 +264,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
if ( pCurrentFormat->Count() > 1 )
{
- aCbxCond2.Check( TRUE );
+ aCbxCond2.Check( sal_True );
pEntry= pCurrentFormat->GetEntry( 1 );
aEdtCond21.SetText( pEntry->GetExpression( aCurPos, 0 ) );
aLbCond2Template.SelectEntry( pEntry->GetStyle() );
@@ -279,7 +279,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
;
else // via Werte
{
- aLbCond22.SelectEntryPos( sal::static_int_cast<USHORT>( eMode ) );
+ aLbCond22.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eMode ) );
if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) )
aEdtCond22.SetText( pEntry->GetExpression( aCurPos, 1 ) );
}
@@ -287,7 +287,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
if ( pCurrentFormat->Count() > 2 )
{
- aCbxCond3.Check( TRUE );
+ aCbxCond3.Check( sal_True );
pEntry= pCurrentFormat->GetEntry( 2 );
aEdtCond31.SetText( pEntry->GetExpression( aCurPos, 0 ) );
aLbCond3Template.SelectEntry( pEntry->GetStyle() );
@@ -302,7 +302,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
;
else // via Werte
{
- aLbCond32.SelectEntryPos( sal::static_int_cast<USHORT>( eMode ) );
+ aLbCond32.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eMode ) );
if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) )
aEdtCond32.SetText( pEntry->GetExpression( aCurPos, 1 ) );
}
@@ -322,6 +322,32 @@ ScConditionalFormatDlg::ScConditionalFormatDlg(
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
//SFX_APPWINDOW->Enable(); // Ref-Feld hat Focus
// SFX_APPWINDOW->Disable();
+
+ aLbCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+ aLbCond12.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+ aEdtCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+ aRbCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 );
+
+ aLbCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+ aLbCond22.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+ aEdtCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+ aRbCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 );
+
+ aLbCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aLbCond32.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aEdtCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aRbCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 );
+ aLbCond11.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) );
+ aLbCond12.SetAccessibleName( ScResId(LABEL_CONDITIONS) );
+ aEdtCond11.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) );
+
+ aLbCond21.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) );
+ aLbCond22.SetAccessibleName( ScResId(LABEL_CONDITIONS) );
+ aEdtCond21.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) );
+
+ aLbCond31.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) );
+ aLbCond32.SetAccessibleName( ScResId(LABEL_CONDITIONS) );
+ aEdtCond31.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) );
}
//----------------------------------------------------------------------------
@@ -372,7 +398,7 @@ void ScConditionalFormatDlg::AddRefEntry()
//----------------------------------------------------------------------------
-BOOL ScConditionalFormatDlg::IsRefInputMode() const
+sal_Bool ScConditionalFormatDlg::IsRefInputMode() const
{
return (pEdActive != NULL);
}
@@ -383,7 +409,7 @@ void ScConditionalFormatDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -457,7 +483,7 @@ void ScConditionalFormatDlg::GetConditionalFormat( ScConditionalFormat& rCndFmt
//----------------------------------------------------------------------------
// Zerstoert den Dialog
-BOOL ScConditionalFormatDlg::Close()
+sal_Bool ScConditionalFormatDlg::Close()
{
return DoClose( ScCondFormatDlgWrapper::GetChildWindowId() );
}
@@ -470,7 +496,7 @@ BOOL ScConditionalFormatDlg::Close()
IMPL_LINK( ScConditionalFormatDlg, ClickCond1Hdl, void *, EMPTYARG )
{
- BOOL bChecked = aCbxCond1.IsChecked();
+ sal_Bool bChecked = aCbxCond1.IsChecked();
aLbCond11.Enable( bChecked );
aLbCond12.Enable( bChecked );
@@ -491,7 +517,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond1Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ChangeCond11Hdl, void *, EMPTYARG )
{
- USHORT nPos = aLbCond11.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond11.GetSelectEntryPos();
if( nPos == 0 ) // Zellwert
{
@@ -520,7 +546,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG )
{
if( aLbCond12.IsVisible() )
{
- USHORT nPos = aLbCond12.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond12.GetSelectEntryPos();
aEdtCond11.Show();
aRbCond11.Show();
@@ -558,7 +584,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ClickCond2Hdl, void *, EMPTYARG )
{
- BOOL bChecked = aCbxCond2.IsChecked();
+ sal_Bool bChecked = aCbxCond2.IsChecked();
aLbCond21.Enable( bChecked );
aLbCond22.Enable( bChecked );
@@ -579,7 +605,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond2Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ChangeCond21Hdl, void *, EMPTYARG )
{
- USHORT nPos = aLbCond21.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond21.GetSelectEntryPos();
if( nPos == 0 ) // Zellwert
{
@@ -608,7 +634,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG )
{
if( aLbCond22.IsVisible() )
{
- USHORT nPos = aLbCond22.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond22.GetSelectEntryPos();
aEdtCond21.Show();
aRbCond21.Show();
@@ -646,7 +672,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ClickCond3Hdl, void *, EMPTYARG )
{
- BOOL bChecked = aCbxCond3.IsChecked();
+ sal_Bool bChecked = aCbxCond3.IsChecked();
aLbCond31.Enable( bChecked );
aLbCond32.Enable( bChecked );
@@ -667,7 +693,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond3Hdl, void *, EMPTYARG )
IMPL_LINK( ScConditionalFormatDlg, ChangeCond31Hdl, void *, EMPTYARG )
{
- USHORT nPos = aLbCond31.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond31.GetSelectEntryPos();
if( nPos == 0 ) // Zellwert
{
@@ -696,7 +722,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond32Hdl, void *, EMPTYARG )
{
if( aLbCond32.IsVisible() )
{
- USHORT nPos = aLbCond32.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCond32.GetSelectEntryPos();
aEdtCond31.Show();
aRbCond31.Show();
@@ -773,7 +799,7 @@ IMPL_LINK( ScConditionalFormatDlg, BtnHdl, PushButton*, pBtn )
GetConditionalFormat( aCondFrmt );
ScCondFrmtItem aOutItem( FID_CONDITIONAL_FORMAT, aCondFrmt );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_CONDITIONAL_FORMAT,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -796,9 +822,9 @@ IMPL_LINK( ScConditionalFormatDlg, NewBtnHdl, PushButton*, pBtn )
// unlock the dispatcher so SID_STYLE_NEW can be executed
// (SetDispatcherLock would affect all Calc documents)
SfxDispatcher* pDisp = GetBindings().GetDispatcher();
- BOOL bLocked = pDisp->IsLocked();
+ sal_Bool bLocked = pDisp->IsLocked();
if (bLocked)
- pDisp->Lock(sal_False);
+ pDisp->Lock(false);
// Execute the "new style" slot, complete with undo and all necessary updates.
// The return value (SfxUInt16Item) is ignored, look for new styles instead.
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 2c3bd0e5f5de..cbf62f945e36 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -125,7 +125,7 @@ IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -135,7 +135,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -160,7 +160,7 @@ namespace layout
IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -170,7 +170,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -211,7 +211,7 @@ void AbstractScImportAsciiDlg_Impl::SaveParameters()
// AbstractScImportAsciiDlg_Impl end
//AbstractScAutoFormatDlg_Impl begin
-USHORT AbstractScAutoFormatDlg_Impl::GetIndex() const
+sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
{
return pDlg->GetIndex();
}
@@ -226,11 +226,11 @@ String AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
//AbstractScColRowLabelDlg_Impl begin
-BOOL AbstractScColRowLabelDlg_Impl::IsCol()
+sal_Bool AbstractScColRowLabelDlg_Impl::IsCol()
{
return pDlg->IsCol();
}
-BOOL AbstractScColRowLabelDlg_Impl::IsRow()
+sal_Bool AbstractScColRowLabelDlg_Impl::IsRow()
{
return pDlg->IsRow();
}
@@ -315,7 +315,7 @@ void AbstractScDeleteContentsDlg_Impl::DisableObjects()
{
pDlg->DisableObjects();
}
-USHORT AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
+sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
{
return pDlg->GetDelContentsCmdBits();
}
@@ -353,14 +353,14 @@ String AbstractScFillSeriesDlg_Impl::GetStartStr() const
{
return pDlg->GetStartStr();
}
-void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(BOOL bFlag)
+void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(sal_Bool bFlag)
{
pDlg->SetEdStartValEnabled(bFlag);
}
-BOOL AbstractScGroupDlg_Impl::GetColsChecked() const
+sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const
{
return pDlg->GetColsChecked();
}
@@ -377,39 +377,39 @@ InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
-USHORT AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
+sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
{
return pDlg->GetInsContentsCmdBits();
}
-USHORT AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
+sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
{
return pDlg->GetFormulaCmdBits();
}
-BOOL AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
+sal_Bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
{
return pDlg->IsSkipEmptyCells();
}
-BOOL AbstractScInsertContentsDlg_Impl::IsLink() const
+sal_Bool AbstractScInsertContentsDlg_Impl::IsLink() const
{
return pDlg->IsLink();
}
-void AbstractScInsertContentsDlg_Impl::SetFillMode( BOOL bSet )
+void AbstractScInsertContentsDlg_Impl::SetFillMode( sal_Bool bSet )
{
pDlg->SetFillMode( bSet );
}
-void AbstractScInsertContentsDlg_Impl::SetOtherDoc( BOOL bSet )
+void AbstractScInsertContentsDlg_Impl::SetOtherDoc( sal_Bool bSet )
{
pDlg->SetOtherDoc( bSet );
}
-BOOL AbstractScInsertContentsDlg_Impl::IsTranspose() const
+sal_Bool AbstractScInsertContentsDlg_Impl::IsTranspose() const
{
return pDlg->IsTranspose();
}
-void AbstractScInsertContentsDlg_Impl::SetChangeTrack( BOOL bSet )
+void AbstractScInsertContentsDlg_Impl::SetChangeTrack( sal_Bool bSet )
{
pDlg->SetChangeTrack( bSet );
}
@@ -426,16 +426,16 @@ InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode()
-BOOL AbstractScInsertTableDlg_Impl::GetTablesFromFile()
+sal_Bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
{
return pDlg->GetTablesFromFile();
}
-BOOL AbstractScInsertTableDlg_Impl::GetTablesAsLink()
+sal_Bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
{
return pDlg->GetTablesAsLink();
}
-const String* AbstractScInsertTableDlg_Impl::GetFirstTable( USHORT* pN )
+const String* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
{
return pDlg->GetFirstTable( pN );
}
@@ -443,15 +443,15 @@ ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables()
{
return pDlg->GetDocShellTables();
}
-BOOL AbstractScInsertTableDlg_Impl::IsTableBefore()
+sal_Bool AbstractScInsertTableDlg_Impl::IsTableBefore()
{
return pDlg->IsTableBefore();
}
-USHORT AbstractScInsertTableDlg_Impl::GetTableCount()
+sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
{
return pDlg->GetTableCount();
}
-const String* AbstractScInsertTableDlg_Impl::GetNextTable( USHORT* pN )
+const String* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
{
return pDlg->GetNextTable( pN );
}
@@ -467,7 +467,7 @@ String AbstractScSelEntryDlg_Impl::GetSelectEntry() const
void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh )
+ sal_uLong nRefresh )
{
pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh);
}
@@ -488,7 +488,7 @@ String AbstractScLinkedAreaDlg_Impl::GetSource()
{
return pDlg->GetSource();
}
-ULONG AbstractScLinkedAreaDlg_Impl::GetRefresh()
+sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh()
{
return pDlg->GetRefresh();
}
@@ -504,12 +504,12 @@ long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const
-USHORT AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
+sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
{
return pDlg->GetSelectedDocument();
}
-USHORT AbstractScMoveTableDlg_Impl::GetSelectedTable() const
+sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const
{
return pDlg->GetSelectedTable();
}
@@ -529,11 +529,11 @@ void AbstractScMoveTableDlg_Impl::SetForceCopyTable()
{
return pDlg->SetForceCopyTable();
}
-void AbstractScMoveTableDlg_Impl::EnableCopyTable(BOOL bFlag)
+void AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag)
{
return pDlg->EnableCopyTable( bFlag);
}
-void AbstractScMoveTableDlg_Impl::EnableRenameTable(BOOL bFlag)
+void AbstractScMoveTableDlg_Impl::EnableRenameTable(sal_Bool bFlag)
{
return pDlg->EnableRenameTable( bFlag);
}
@@ -541,7 +541,7 @@ void AbstractScMoveTableDlg_Impl::EnableRenameTable(BOOL bFlag)
-USHORT AbstractScNameCreateDlg_Impl::GetFlags() const
+sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const
{
return pDlg->GetFlags();
}
@@ -563,7 +563,7 @@ const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem()
-USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const
+sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const
{
return pDlg->GetFuncMask();
}
@@ -574,7 +574,7 @@ USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const
-USHORT AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
+sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
{
return pDlg->GetFuncMask();
}
@@ -608,13 +608,13 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
pDlg->SetScenarioData(rName,rComment, rColor,nFlags);
}
void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const
+ Color& rColor, sal_uInt16& rFlags ) const
{
pDlg->GetScenarioData( rName,rComment,rColor,rFlags);
}
@@ -622,26 +622,26 @@ void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rCom
-void AbstractScShowTabDlg_Impl::Insert( const String& rString, BOOL bSelected )
+void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected )
{
pDlg->Insert( rString, bSelected);
}
-USHORT AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
+sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
{
return pDlg->GetSelectEntryCount();
}
void AbstractScShowTabDlg_Impl::SetDescription(
const String& rTitle, const String& rFixedText,
- ULONG nDlgHelpId, ULONG nLbHelpId )
+ const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId )
{
- pDlg->SetDescription( rTitle, rFixedText,nDlgHelpId, nLbHelpId );
+ pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
}
-USHORT AbstractScShowTabDlg_Impl::GetSelectEntryPos(USHORT nPos) const
+sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const
{
return pDlg->GetSelectEntryPos( nPos);
}
-String AbstractScShowTabDlg_Impl::GetSelectEntry(USHORT nPos) const
+String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
{
return pDlg->GetSelectEntry(nPos);
}
@@ -747,8 +747,8 @@ AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( W
AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent,
int nId,
- BOOL bCol ,
- BOOL bRow)
+ sal_Bool bCol ,
+ sal_Bool bRow)
{
ScColRowLabelDlg* pDlg=NULL;
switch ( nId )
@@ -773,7 +773,7 @@ VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window*
const String& rStrTitle,
const String& rStrLabel,
int nId,
- BOOL bColDefault)
+ sal_Bool bColDefault)
{
Dialog * pDlg=NULL;
switch ( nId )
@@ -833,7 +833,7 @@ AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilo
AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( Window* pParent,
- BOOL bEnableExternal,
+ sal_Bool bEnableExternal,
int nId )
{
ScDataPilotSourceTypeDlg * pDlg=NULL;
@@ -878,7 +878,7 @@ AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSe
AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Window* pParent, int nId,
- BOOL bDisallowCellMove )
+ sal_Bool bDisallowCellMove )
{
ScDeleteCellDlg * pDlg=NULL;
switch ( nId )
@@ -919,7 +919,7 @@ AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg( Window
AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId,
- USHORT nCheckDefaults )
+ sal_uInt16 nCheckDefaults )
{
ScDeleteContentsDlg * pDlg=NULL;
switch ( nId )
@@ -947,7 +947,7 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir,
+ sal_uInt16 nPossDir,
int nId)
{
ScFillSeriesDlg * pDlg=NULL;
@@ -969,10 +969,10 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi
AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
int nId,
- BOOL bUnGroup ,
- BOOL bRows )
+ sal_Bool bUnGroup ,
+ sal_Bool bRows )
{
ScGroupDlg * pDlg=NULL;
switch ( nId )
@@ -996,7 +996,7 @@ AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Wind
AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent,
int nId,
- BOOL bDisallowCellMove )
+ sal_Bool bDisallowCellMove )
{
ScInsertCellDlg * pDlg=NULL;
switch ( nId )
@@ -1018,7 +1018,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
int nId,
- USHORT nCheckDefaults,
+ sal_uInt16 nCheckDefaults,
const String* pStrTitle )
{
ScInsertContentsDlg * pDlg=NULL;
@@ -1059,7 +1059,7 @@ AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg
// add for ScSelEntryDlg begin
AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList,
@@ -1103,12 +1103,12 @@ AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg (
AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( Window* pParent,
- USHORT nResId, // Ableitung fuer jeden Dialog!
+ sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
long nCurrent,
long nDefault,
int nId ,
FieldUnit eFUnit,
- USHORT nDecimals,
+ sal_uInt16 nDecimals,
long nMaximum ,
long nMinimum,
long nFirst,
@@ -1158,7 +1158,7 @@ AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Wi
-AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId )
+AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId )
{
ScNameCreateDlg * pDlg=NULL;
switch ( nId )
@@ -1179,7 +1179,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg (
AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList,
- int nId , BOOL bInsList )
+ int nId , sal_Bool bInsList )
{
ScNamePasteDlg * pDlg=NULL;
switch ( nId )
@@ -1199,7 +1199,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg (
AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg ( Window* pParent,
- const SfxItemSet& rArgSet, USHORT nSourceTab , int nId )
+ const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId )
{
ScPivotFilterDlg * pDlg=NULL;
switch ( nId )
@@ -1221,9 +1221,9 @@ AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg
AbstractScDPFunctionDlg * ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg ( Window* pParent,
int nId,
- const ScDPLabelDataVec& rLabelVec,
+ const ScDPLabelDataVector& rLabelVec,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData )
+ const ScPivotFuncData& rFuncData )
{
ScDPFunctionDlg * pDlg=NULL;
switch ( nId )
@@ -1246,7 +1246,7 @@ AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg (
int nId,
ScDPObject& rDPObj,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData,
+ const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields,
bool bEnableLayout )
{
@@ -1285,7 +1285,7 @@ AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
- Window* pParent, int nId, ScDPObject& rDPObj, USHORT nOrient )
+ Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient )
{
if( nId == RID_SCDLG_DPSHOWDETAIL )
return new AbstractScDPShowDetailDlg_Impl( new ScDPShowDetailDlg( pParent, rDPObj, nOrient ) );
@@ -1296,7 +1296,7 @@ AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDl
AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window* pParent, const String& rName,
int nId,
- BOOL bEdit , BOOL bSheetProtected )
+ sal_Bool bEdit , sal_Bool bSheetProtected )
{
ScNewScenarioDlg * pDlg=NULL;
switch ( nId )
@@ -1340,14 +1340,14 @@ AbstractScShowTabDlg * ScAbstractDialogFactory_Impl::CreateScShowTabDlg ( Window
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId,
int nId )
{
ScStringInputDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_STRINPUT :
- pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle,rDefault, nHelpId );
+ pDlg = new ScStringInputDlg( pParent, rTitle, rEditTitle, rDefault, sHelpId, sEditHelpId );
break;
default:
break;
@@ -1365,14 +1365,14 @@ AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId ,
int nId )
{
ScTabBgColorDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_TAB_BG_COLOR :
- pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, nHelpId );
+ pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId );
break;
default:
break;
@@ -1387,12 +1387,12 @@ return 0;
AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* pParent,
int nId,
- BOOL bAscii,
+ sal_Bool bAscii,
const ScImportOptions* pOptions,
const String* pStrTitle,
- BOOL bMultiByte,
- BOOL bOnlyDbtoolsEncodings,
- BOOL bImport )
+ sal_Bool bMultiByte,
+ sal_Bool bOnlyDbtoolsEncodings,
+ sal_Bool bImport )
{
ScImportOptionsDlg * pDlg=NULL;
switch ( nId )
@@ -1445,7 +1445,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF
const SfxItemSet& rCoreSet,
const String& rPageStyle,
int nId,
- USHORT nResId )
+ sal_uInt16 nResId )
{
SfxTabDialog* pDlg=NULL;
switch ( nId )
@@ -1466,7 +1466,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF
SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId,
+ sal_uInt16 nRscId,
int nId)
{
SfxTabDialog* pDlg=NULL;
@@ -1594,7 +1594,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window*
//------------------ Factories for TabPages--------------------
-CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
+CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1631,7 +1631,7 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
return 0;
}
-GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
+GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
{
switch ( nId )
{
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 7b6295482f42..d1eaf2edbab0 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -125,15 +125,15 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg //add for
class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg //add for ScAutoFormatDlg
{
DECL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl, ScAutoFormatDlg)
- virtual USHORT GetIndex() const;
+ virtual sal_uInt16 GetIndex() const;
virtual String GetCurrFormatName();
};
class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg //add for ScColRowLabelDlg
{
DECL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl,ScColRowLabelDlg)
- virtual BOOL IsCol();
- virtual BOOL IsRow();
+ virtual sal_Bool IsCol();
+ virtual sal_Bool IsRow();
};
class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDlg //add for ScDataPilotDatabaseDlg
@@ -178,7 +178,7 @@ class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg //a
{
DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
virtual void DisableObjects();
- virtual USHORT GetDelContentsCmdBits() const;
+ virtual sal_uInt16 GetDelContentsCmdBits() const;
};
class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg //add for ScFillSeriesDlg
@@ -191,13 +191,13 @@ class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg //add for ScF
virtual double GetStep() const;
virtual double GetMax() const;
virtual String GetStartStr() const;
- virtual void SetEdStartValEnabled(BOOL bFlag=FALSE);
+ virtual void SetEdStartValEnabled(sal_Bool bFlag=false);
};
class AbstractScGroupDlg_Impl : public AbstractScGroupDlg //add for ScGroupDlg
{
DECL_ABSTDLG_BASE( AbstractScGroupDlg_Impl, ScGroupDlg)
- virtual BOOL GetColsChecked() const;
+ virtual sal_Bool GetColsChecked() const;
};
class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg //add for ScInsertCellDlg
@@ -209,14 +209,14 @@ class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg //add for S
class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg //add for ScInsertContentsDlg
{
DECL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl, ScInsertContentsDlg)
- virtual USHORT GetInsContentsCmdBits() const;
- virtual USHORT GetFormulaCmdBits() const;
- virtual BOOL IsSkipEmptyCells() const;
- virtual BOOL IsLink() const;
- virtual void SetFillMode( BOOL bSet );
- virtual void SetOtherDoc( BOOL bSet );
- virtual BOOL IsTranspose() const;
- virtual void SetChangeTrack( BOOL bSet );
+ virtual sal_uInt16 GetInsContentsCmdBits() const;
+ virtual sal_uInt16 GetFormulaCmdBits() const;
+ virtual sal_Bool IsSkipEmptyCells() const;
+ virtual sal_Bool IsLink() const;
+ virtual void SetFillMode( sal_Bool bSet );
+ virtual void SetOtherDoc( sal_Bool bSet );
+ virtual sal_Bool IsTranspose() const;
+ virtual void SetChangeTrack( sal_Bool bSet );
virtual void SetCellShiftDisabled( int nDisable );
virtual InsCellCmd GetMoveMode();
};
@@ -224,13 +224,13 @@ class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg //a
class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg //add for ScInsertTableDlg
{
DECL_ABSTDLG_BASE( AbstractScInsertTableDlg_Impl, ScInsertTableDlg)
- virtual BOOL GetTablesFromFile();
- virtual BOOL GetTablesAsLink();
- virtual const String* GetFirstTable( USHORT* pN = NULL );
+ virtual sal_Bool GetTablesFromFile();
+ virtual sal_Bool GetTablesAsLink();
+ virtual const String* GetFirstTable( sal_uInt16* pN = NULL );
virtual ScDocShell* GetDocShellTables();
- virtual BOOL IsTableBefore();
- virtual USHORT GetTableCount();
- virtual const String* GetNextTable( USHORT* pN = NULL );
+ virtual sal_Bool IsTableBefore();
+ virtual sal_uInt16 GetTableCount();
+ virtual const String* GetNextTable( sal_uInt16* pN = NULL );
};
@@ -246,12 +246,12 @@ class AbstractScLinkedAreaDlg_Impl : public AbstractScLinkedAreaDlg //add for S
virtual void InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh );
+ sal_uLong nRefresh );
virtual String GetURL();
virtual String GetFilter(); // may be empty
virtual String GetOptions(); // filter options
virtual String GetSource(); // separated by ";"
- virtual ULONG GetRefresh(); // 0 if disabled
+ virtual sal_uLong GetRefresh(); // 0 if disabled
};
class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg //add for ScMetricInputDlg
@@ -263,20 +263,20 @@ class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg //add for
class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg //add for ScMoveTableDlg
{
DECL_ABSTDLG_BASE( AbstractScMoveTableDlg_Impl, ScMoveTableDlg)
- virtual USHORT GetSelectedDocument () const;
- virtual USHORT GetSelectedTable () const;
+ virtual sal_uInt16 GetSelectedDocument () const;
+ virtual sal_uInt16 GetSelectedTable () const;
virtual bool GetCopyTable () const;
virtual bool GetRenameTable () const;
virtual void GetTabNameString( String& rString ) const;
virtual void SetForceCopyTable ();
- virtual void EnableCopyTable (BOOL bFlag=TRUE);
- virtual void EnableRenameTable (BOOL bFlag=TRUE);
+ virtual void EnableCopyTable (sal_Bool bFlag=true);
+ virtual void EnableRenameTable (sal_Bool bFlag=true);
};
class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg //add for ScNameCreateDlg
{
DECL_ABSTDLG_BASE( AbstractScNameCreateDlg_Impl, ScNameCreateDlg)
- virtual USHORT GetFlags() const;
+ virtual sal_uInt16 GetFlags() const;
};
class AbstractScNamePasteDlg_Impl : public AbstractScNamePasteDlg //add for ScNamePasteDlg
@@ -294,14 +294,14 @@ class AbstractScPivotFilterDlg_Impl : public AbstractScPivotFilterDlg //add for
class AbstractScDPFunctionDlg_Impl : public AbstractScDPFunctionDlg //add for ScDPFunctionDlg
{
DECL_ABSTDLG_BASE( AbstractScDPFunctionDlg_Impl, ScDPFunctionDlg)
- virtual USHORT GetFuncMask() const;
+ virtual sal_uInt16 GetFuncMask() const;
virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const;
};
class AbstractScDPSubtotalDlg_Impl : public AbstractScDPSubtotalDlg //add for ScDPSubtotalDlg
{
DECL_ABSTDLG_BASE( AbstractScDPSubtotalDlg_Impl, ScDPSubtotalDlg)
- virtual USHORT GetFuncMask() const;
+ virtual sal_uInt16 GetFuncMask() const;
virtual void FillLabelData( ScDPLabelData& rLabelData ) const;
};
@@ -328,20 +328,20 @@ class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg //add for
{
DECL_ABSTDLG_BASE( AbstractScNewScenarioDlg_Impl, ScNewScenarioDlg )
virtual void SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
+ const Color& rColor, sal_uInt16 nFlags );
virtual void GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const;
+ Color& rColor, sal_uInt16& rFlags ) const;
};
class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg //add for ScShowTabDlg
{
DECL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl,ScShowTabDlg)
- virtual void Insert( const String& rString, BOOL bSelected );
- virtual USHORT GetSelectEntryCount() const;
- virtual void SetDescription(const String& rTitle, const String& rFixedText,ULONG nDlgHelpId, ULONG nLbHelpId );
- virtual String GetSelectEntry(USHORT nPos) const;
- virtual USHORT GetSelectEntryPos(USHORT nPos) const;
+ virtual void Insert( const String& rString, sal_Bool bSelected );
+ virtual sal_uInt16 GetSelectEntryCount() const;
+ virtual void SetDescription(const String& rTitle, const String& rFixedText, const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId );
+ virtual String GetSelectEntry(sal_uInt16 nPos) const;
+ virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const;
};
class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg
@@ -373,9 +373,9 @@ class AbstractScTextImportOptionsDlg_Impl : public AbstractScTextImportOptionsDl
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -388,9 +388,9 @@ namespace layout
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -417,32 +417,32 @@ public:
int nId);
virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg
int nId,
- BOOL bCol = FALSE,
- BOOL bRow = FALSE);
+ sal_Bool bCol = false,
+ sal_Bool bRow = false);
virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent, //add for ScColOrRowDlg
const String& rStrTitle,
const String& rStrLabel,
int nId,
- BOOL bColDefault = TRUE );
+ sal_Bool bColDefault = sal_True );
virtual VclAbstractDialog * CreateScSortWarningDlg( Window* pParent, const String& rExtendText, const String& rCurrentText, int nId );
virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ); //add for ScDataPilotDatabaseDlg
- virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, BOOL bEnableExternal, int nId ) ; //add for ScDataPilotSourceTypeDlg
+ virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, sal_Bool bEnableExternal, int nId ) ; //add for ScDataPilotSourceTypeDlg
virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( Window* pParent, //add for ScDataPilotServiceDlg
const com::sun::star::uno::Sequence<rtl::OUString>& rServices,
int nId );
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId,
- BOOL bDisallowCellMove = FALSE ); //add for ScDeleteCellDlg
+ sal_Bool bDisallowCellMove = false ); //add for ScDeleteCellDlg
//for dataform
virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell); //add for ScDeleteCellDlg
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
- USHORT nCheckDefaults = 0 );
+ sal_uInt16 nCheckDefaults = 0 );
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg
ScDocument& rDocument,
@@ -452,28 +452,28 @@ public:
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir,
+ sal_uInt16 nPossDir,
int nId);
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
- USHORT nResId,
+ sal_uInt16 nResId,
int nId,
- BOOL bUnGroup = FALSE,
- BOOL bRows = TRUE );
+ sal_Bool bUnGroup = false,
+ sal_Bool bRows = sal_True );
virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg
int nId,
- BOOL bDisallowCellMove = FALSE );
+ sal_Bool bDisallowCellMove = false );
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
int nId,
- USHORT nCheckDefaults = 0,
+ sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL );
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData, //add for ScInsertTableDlg
SCTAB nTabCount, bool bFromFile, int nId);
virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList,
@@ -483,12 +483,12 @@ public:
int nId);
virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent, //add for ScMetricInputDlg
- USHORT nResId, // Ableitung fuer jeden Dialog!
+ sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
long nCurrent,
long nDefault,
int nId ,
FieldUnit eFUnit = FUNIT_MM,
- USHORT nDecimals = 2,
+ sal_uInt16 nDecimals = 2,
long nMaximum = 1000,
long nMinimum = 0,
long nFirst = 1,
@@ -498,23 +498,23 @@ public:
const String& rDefault,
int nId );
- virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ); //add for ScNameCreateDlg
+ virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ); //add for ScNameCreateDlg
virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg
- int nId , BOOL bInsList=TRUE );
+ int nId , sal_Bool bInsList=sal_True );
virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg
- const SfxItemSet& rArgSet, USHORT nSourceTab , int nId );
+ const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId );
virtual AbstractScDPFunctionDlg * CreateScDPFunctionDlg( Window* pParent, int nId,
- const ScDPLabelDataVec& rLabelVec,
+ const ScDPLabelDataVector& rLabelVec,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData );
+ const ScPivotFuncData& rFuncData );
virtual AbstractScDPSubtotalDlg * CreateScDPSubtotalDlg( Window* pParent, int nId,
ScDPObject& rDPObj,
const ScDPLabelData& rLabelData,
- const ScDPFuncData& rFuncData,
+ const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields,
bool bEnableLayout );
@@ -530,35 +530,35 @@ public:
virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId,
ScDPObject& rDPObj,
- USHORT nOrient );
+ sal_uInt16 nOrient );
virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const String& rName, //add for ScNewScenarioDlg
int nId,
- BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE );
+ sal_Bool bEdit = false, sal_Bool bSheetProtected = false );
virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ); //add for ScShowTabDlg
virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent, //add for ScStringInputDlg
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId,
int nId );
virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg ( Window* pParent, //add for ScStringInputDlg
const String& rTitle, //Dialog Title
const String& rTabBgColorNoColorText, //Label for no tab color
const Color& rDefaultColor, //Currently selected Color
- ULONG nHelpId ,
+ const rtl::OString& sHelpId ,
int nId );
virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent, //add for ScImportOptionsDlg
int nId,
- BOOL bAscii = TRUE,
+ sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const String* pStrTitle = NULL,
- BOOL bMultiByte = FALSE,
- BOOL bOnlyDbtoolsEncodings = FALSE,
- BOOL bImport = TRUE );
+ sal_Bool bMultiByte = false,
+ sal_Bool bOnlyDbtoolsEncodings = false,
+ sal_Bool bImport = sal_True );
virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame, //add for ScAttrDlg
Window* pParent,
const SfxItemSet* pCellAttrs,
@@ -569,11 +569,11 @@ public:
const SfxItemSet& rCoreSet,
const String& rPageStyle,
int nId,
- USHORT nResId = RID_SCDLG_HFEDIT );
+ sal_uInt16 nResId = RID_SCDLG_HFEDIT );
virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,//add for ScStyleDlg
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId,
+ sal_uInt16 nRscId,
int nId);
virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent, //add for ScSubTotalDlg
@@ -591,9 +591,9 @@ public:
virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg
const SfxItemSet* pArgSet,int nId );
// For TabPage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId );
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId );
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId );
};
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 7d9ec8b40682..41f8a7939a47 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -44,7 +44,7 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pProtectionRanges[] =
+static sal_uInt16 pProtectionRanges[] =
{
SID_SCATTR_PROTECTION,
SID_SCATTR_PROTECTION,
@@ -74,7 +74,7 @@ ScTabPageProtection::ScTabPageProtection( Window* pParent,
SetExchangeSupport();
// States werden in Reset gesetzt
- bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = FALSE;
+ bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = false;
aBtnProtect.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) );
aBtnHideCell.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) );
@@ -92,7 +92,7 @@ ScTabPageProtection::~ScTabPageProtection()
//------------------------------------------------------------------------
-USHORT* ScTabPageProtection::GetRanges()
+sal_uInt16* ScTabPageProtection::GetRanges()
{
return pProtectionRanges;
}
@@ -111,9 +111,9 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs )
{
// Variablen initialisieren
- USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION );
+ sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION );
const ScProtectionAttr* pProtAttr = NULL;
- SfxItemState eItemState = rCoreAttrs.GetItemState( nWhich, FALSE,
+ SfxItemState eItemState = rCoreAttrs.GetItemState( nWhich, false,
(const SfxPoolItem**)&pProtAttr );
// handelt es sich um ein Default-Item?
@@ -128,8 +128,8 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs )
// Defaults, die erscheinen wenn ein TriState weggeklickt wird:
// (weil alles zusammen ein Attribut ist, kann auch nur alles zusammen
// auf DontCare stehen - #38543#)
- bProtect = TRUE;
- bHideForm = bHideCell = bHidePrint = FALSE;
+ bProtect = sal_True;
+ bHideForm = bHideCell = bHidePrint = false;
}
else
{
@@ -151,13 +151,13 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs )
// -----------------------------------------------------------------------
-BOOL ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs )
{
- BOOL bAttrsChanged = FALSE;
- USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION );
+ sal_Bool bAttrsChanged = false;
+ sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION );
const SfxPoolItem* pOldItem = GetOldItem( rCoreAttrs, SID_SCATTR_PROTECTION );
const SfxItemSet& rOldSet = GetItemSet();
- SfxItemState eItemState = rOldSet.GetItemState( nWhich, FALSE );
+ SfxItemState eItemState = rOldSet.GetItemState( nWhich, false );
ScProtectionAttr aProtAttr;
if ( !bDontCare )
@@ -168,7 +168,7 @@ BOOL ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs )
aProtAttr.SetHidePrint( bHidePrint );
if ( bTriEnabled )
- bAttrsChanged = TRUE; // DontCare -> richtiger Wert
+ bAttrsChanged = sal_True; // DontCare -> richtiger Wert
else
bAttrsChanged = !pOldItem || !( aProtAttr == *(const ScProtectionAttr*)pOldItem );
}
@@ -199,11 +199,11 @@ IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox )
{
TriState eState = pBox->GetState();
if ( eState == STATE_DONTKNOW )
- bDontCare = TRUE; // alles zusammen auf DontCare
+ bDontCare = sal_True; // alles zusammen auf DontCare
else
{
- bDontCare = FALSE; // DontCare ueberall aus
- BOOL bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert
+ bDontCare = false; // DontCare ueberall aus
+ sal_Bool bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert
if ( pBox == &aBtnProtect )
bProtect = bOn;
@@ -243,7 +243,7 @@ void ScTabPageProtection::UpdateButtons()
aBtnHidePrint.SetState( bHidePrint ? STATE_CHECK : STATE_NOCHECK );
}
- BOOL bEnable = ( aBtnHideCell.GetState() != STATE_CHECK );
+ sal_Bool bEnable = ( aBtnHideCell.GetState() != STATE_CHECK );
{
aBtnProtect.Enable( bEnable );
aBtnHideFormula.Enable( bEnable );
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index 34698c7b9104..823aec21d053 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -71,28 +71,28 @@ void ScDDComboBoxButton::SetOptSizePixel()
void ScDDComboBoxButton::Draw( const Point& rAt,
const Size& rSize,
- BOOL bState,
- BOOL bBtnIn /* = FALSE */ )
+ sal_Bool bState,
+ sal_Bool bBtnIn /* = sal_False */ )
{
if ( rSize.Width() == 0 || rSize.Height() == 0 )
return; // #i43092# rectangle with size 0 would have RECT_EMPTY as end position
// save old state
- BOOL bHadFill = pOut->IsFillColor();
+ sal_Bool bHadFill = pOut->IsFillColor();
Color aOldFill = pOut->GetFillColor();
- BOOL bHadLine = pOut->IsLineColor();
+ sal_Bool bHadLine = pOut->IsLineColor();
Color aOldLine = pOut->GetLineColor();
- BOOL bOldEnable = pOut->IsMapModeEnabled();
+ sal_Bool bOldEnable = pOut->IsMapModeEnabled();
Size aLogPix( 1, 1 );
Rectangle aBtnRect( rAt, rSize );
Rectangle aInnerRect = aBtnRect;
- pOut->EnableMapMode( FALSE );
+ pOut->EnableMapMode( false );
DecorationView aDecoView( pOut);
- USHORT nButtonStyle = BUTTON_DRAW_DEFAULT;
+ sal_uInt16 nButtonStyle = BUTTON_DRAW_DEFAULT;
if( bBtnIn ) // gedrueckt?
{
nButtonStyle = BUTTON_DRAW_PRESSED;
@@ -130,7 +130,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
//------------------------------------------------------------------------
void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect,
- BOOL bState )
+ sal_Bool bState )
{
// no need to save old line and fill color here (is restored after the call)
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 7bd9f501edab..2a5d415410dc 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -36,7 +36,7 @@
#include <vcl/outdev.hxx>
#include <vcl/settings.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/decoview.hxx>
#include "strload.hxx"
#include "global.hxx"
@@ -307,7 +307,7 @@ IMPL_LINK( ScMenuFloatingWindow::SubMenuItemData, TimeoutHdl, void*, EMPTYARG )
size_t ScMenuFloatingWindow::MENU_NOT_SELECTED = 999;
-ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel) :
+ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel) :
PopupMenuFloatingWindow(pParent),
maOpenTimer(this),
maCloseTimer(this),
@@ -1160,7 +1160,7 @@ void ScDPFieldPopupWindow::setAllMemberState(bool bSet)
{
size_t n = maMembers.size();
for (size_t i = 0; i < n; ++i)
- maChecks.CheckEntryPos(static_cast< USHORT >( i ), bSet);
+ maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), bSet);
}
void ScDPFieldPopupWindow::selectCurrentMemberOnly(bool bSet)
@@ -1356,7 +1356,7 @@ void ScDPFieldPopupWindow::initMembers()
for (size_t i = 0; i < n; ++i)
{
maChecks.InsertEntry(maMembers[i].maName);
- maChecks.CheckEntryPos(static_cast< USHORT >( i ), maMembers[i].mbVisible);
+ maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), maMembers[i].mbVisible);
if (maMembers[i].mbVisible)
++nVisMemCount;
}
@@ -1391,7 +1391,7 @@ void ScDPFieldPopupWindow::getResult(boost::unordered_map<OUString, bool, OUStri
size_t n = maMembers.size();
for (size_t i = 0; i < n; ++i)
{
- bool bState = maChecks.IsChecked(static_cast< USHORT >( i ));
+ bool bState = maChecks.IsChecked(static_cast< sal_uInt16 >( i ));
aResult.insert(ResultMap::value_type(maMembers[i].maName, bState));
}
rResult.swap(aResult);
diff --git a/sc/source/ui/cctrl/popmenu.cxx b/sc/source/ui/cctrl/popmenu.cxx
index 03414b4e25ec..0f0e135e08b4 100644
--- a/sc/source/ui/cctrl/popmenu.cxx
+++ b/sc/source/ui/cctrl/popmenu.cxx
@@ -42,7 +42,7 @@
void ScPopupMenu::Select()
{
nSel = GetCurItemId();
- bHit = TRUE;
+ bHit = sal_True;
}
diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx
index a0a66f7e8ab8..191adb337664 100644
--- a/sc/source/ui/cctrl/tbinsert.cxx
+++ b/sc/source/ui/cctrl/tbinsert.cxx
@@ -62,7 +62,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ScTbxInsertCtrl, SfxUInt16Item);
//
//------------------------------------------------------------------
-ScTbxInsertCtrl::ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+ScTbxInsertCtrl::ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(0)
{
@@ -73,7 +73,7 @@ ScTbxInsertCtrl::~ScTbxInsertCtrl()
{
}
-void ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState,
+void ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState,
const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) );
@@ -85,7 +85,7 @@ void ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState,
if(pItem)
{
nLastSlotId = pItem->GetValue();
- USHORT nImageId = nLastSlotId ? nLastSlotId : GetSlotId();
+ sal_uInt16 nImageId = nLastSlotId ? nLastSlotId : GetSlotId();
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nImageId ));
Image aImage = GetImage( m_xFrame,
@@ -99,7 +99,7 @@ void ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState,
SfxPopupWindow* ScTbxInsertCtrl::CreatePopupWindow()
{
- USHORT nSlotId = GetSlotId();
+ sal_uInt16 nSlotId = GetSlotId();
if (nSlotId == SID_TBXCTL_INSERT)
{
rtl::OUString aInsertBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" ));
@@ -123,7 +123,7 @@ SfxPopupWindowType ScTbxInsertCtrl::GetPopupWindowType() const
return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK;
}
-void ScTbxInsertCtrl::Select( BOOL /* bMod1 */ )
+void ScTbxInsertCtrl::Select( sal_Bool /* bMod1 */ )
{
SfxViewShell* pCurSh( SfxViewShell::Current() );
SfxDispatcher* pDispatch( 0 );
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 1b6cb14279b2..575269c5a0ec 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -54,8 +54,8 @@ SFX_IMPL_TOOLBOX_CONTROL( ScZoomSliderControl, SvxZoomSliderItem );
// -----------------------------------------------------------------------
ScZoomSliderControl::ScZoomSliderControl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx )
:SfxToolBoxControl( nSlotId, nId, rTbx )
{
@@ -71,10 +71,10 @@ ScZoomSliderControl::~ScZoomSliderControl()
// -----------------------------------------------------------------------
-void ScZoomSliderControl::StateChanged( USHORT /*nSID*/, SfxItemState eState,
+void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId ));
DBG_ASSERT( pBox ,"Control not found!" );
@@ -113,19 +113,19 @@ Window* ScZoomSliderControl::CreateItemWindow( Window *pParent )
struct ScZoomSliderWnd::ScZoomSliderWnd_Impl
{
- USHORT mnCurrentZoom;
- USHORT mnMinZoom;
- USHORT mnMaxZoom;
- USHORT mnSliderCenter;
+ sal_uInt16 mnCurrentZoom;
+ sal_uInt16 mnMinZoom;
+ sal_uInt16 mnMaxZoom;
+ sal_uInt16 mnSliderCenter;
std::vector< long > maSnappingPointOffsets;
- std::vector< USHORT > maSnappingPointZooms;
+ std::vector< sal_uInt16 > maSnappingPointZooms;
Image maSliderButton;
Image maIncreaseButton;
Image maDecreaseButton;
bool mbValuesSet;
bool mbOmitPaint;
- ScZoomSliderWnd_Impl( USHORT nCurrentZoom ) :
+ ScZoomSliderWnd_Impl( sal_uInt16 nCurrentZoom ) :
mnCurrentZoom( nCurrentZoom ),
mnMinZoom( 10 ),
mnMaxZoom( 400 ),
@@ -158,11 +158,11 @@ const long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of two
// -----------------------------------------------------------------------
-USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
+sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
{
Size aSliderWindowSize = GetOutputSizePixel();
const long nControlWidth = aSliderWindowSize.Width();
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( nOffset < nSliderXOffset )
return mpImpl->mnMinZoom;
@@ -170,7 +170,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
return mpImpl->mnMaxZoom;
// check for snapping points:
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
std::vector< long >::iterator aSnappingPointIter;
for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin();
aSnappingPointIter != mpImpl->maSnappingPointOffsets.end();
@@ -195,7 +195,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth;
const long nOffsetToSliderLeft = nOffset - nSliderXOffset;
- nRet = mpImpl->mnMinZoom + USHORT( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 );
+ nRet = mpImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 );
}
else
{
@@ -204,7 +204,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth;
const long nOffsetToSliderCenter = nOffset - nControlWidth/2;
- nRet = mpImpl->mnSliderCenter + USHORT( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 );
+ nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 );
}
}
@@ -219,7 +219,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
// -----------------------------------------------------------------------
-long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const
+long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 nCurrentZoom ) const
{
Size aSliderWindowSize = GetOutputSizePixel();
const long nControlWidth = aSliderWindowSize.Width();
@@ -249,7 +249,7 @@ long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const
ScZoomSliderWnd::ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom ):
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom ):
Window( pParent ),
mpImpl( new ScZoomSliderWnd_Impl( nCurrentZoom ) ),
aLogicalSize( 115, 40 ),
@@ -390,20 +390,20 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem )
mpImpl->maSnappingPointZooms.clear();
// get all snapping points:
- std::set< USHORT > aTmpSnappingPoints;
- for ( USHORT j = 0; j < rSnappingPoints.getLength(); ++j )
+ std::set< sal_uInt16 > aTmpSnappingPoints;
+ for ( sal_uInt16 j = 0; j < rSnappingPoints.getLength(); ++j )
{
const sal_Int32 nSnappingPoint = rSnappingPoints[j];
- aTmpSnappingPoints.insert( (USHORT)nSnappingPoint );
+ aTmpSnappingPoints.insert( (sal_uInt16)nSnappingPoint );
}
// remove snapping points that are to close to each other:
- std::set< USHORT >::iterator aSnappingPointIter;
+ std::set< sal_uInt16 >::iterator aSnappingPointIter;
long nLastOffset = 0;
for ( aSnappingPointIter = aTmpSnappingPoints.begin(); aSnappingPointIter != aTmpSnappingPoints.end(); ++aSnappingPointIter )
{
- const USHORT nCurrent = *aSnappingPointIter;
+ const sal_uInt16 nCurrent = *aSnappingPointIter;
const long nCurrentOffset = Zoom2Offset( nCurrent );
if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist )
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 73826a06c9d9..c0b9305ba3ee 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -51,15 +51,15 @@ static const sal_Char pStrMrg[] = "MRG";
// ============================================================================
ScAsciiOptions::ScAsciiOptions() :
- bFixedLen ( FALSE ),
+ bFixedLen ( false ),
aFieldSeps ( ';' ),
- bMergeFieldSeps ( FALSE ),
+ bMergeFieldSeps ( false ),
bQuotedFieldAsText(false),
bDetectSpecialNumber(false),
cTextSep ( cDefaultTextSep ),
eCharSet ( gsl_getSystemTextEncoding() ),
eLang ( LANGUAGE_SYSTEM ),
- bCharSetSystem ( FALSE ),
+ bCharSetSystem ( false ),
nStartRow ( 1 ),
nInfoCount ( 0 ),
pColStart ( NULL ),
@@ -84,8 +84,8 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) :
if (nInfoCount)
{
pColStart = new xub_StrLen[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (USHORT i=0; i<nInfoCount; i++)
+ pColFormat = new sal_uInt8[nInfoCount];
+ for (sal_uInt16 i=0; i<nInfoCount; i++)
{
pColStart[i] = rOpt.pColStart[i];
pColFormat[i] = rOpt.pColFormat[i];
@@ -106,7 +106,7 @@ ScAsciiOptions::~ScAsciiOptions()
}
-void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat )
+void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat )
{
delete[] pColStart;
delete[] pColFormat;
@@ -116,8 +116,8 @@ void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const
if (nInfoCount)
{
pColStart = new xub_StrLen[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (USHORT i=0; i<nInfoCount; i++)
+ pColFormat = new sal_uInt8[nInfoCount];
+ for (sal_uInt16 i=0; i<nInfoCount; i++)
{
pColStart[i] = pStart[i];
pColFormat[i] = pFormat[i];
@@ -169,7 +169,7 @@ ScAsciiOptions& ScAsciiOptions::operator=( const ScAsciiOptions& rCpy )
}
-BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
+sal_Bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
{
if ( bFixedLen == rCmp.bFixedLen &&
aFieldSeps == rCmp.aFieldSeps &&
@@ -183,14 +183,14 @@ BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const
{
DBG_ASSERT( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat),
"0-Zeiger in ScAsciiOptions" );
- for (USHORT i=0; i<nInfoCount; i++)
+ for (sal_uInt16 i=0; i<nInfoCount; i++)
if ( pColStart[i] != rCmp.pColStart[i] ||
pColFormat[i] != rCmp.pColFormat[i] )
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//
@@ -212,18 +212,18 @@ void ScAsciiOptions::ReadFromString( const String& rString )
if ( nCount >= 1 )
{
- bFixedLen = bMergeFieldSeps = FALSE;
+ bFixedLen = bMergeFieldSeps = false;
aFieldSeps.Erase();
aToken = rString.GetToken(0,',');
if ( aToken.EqualsAscii(pStrFix) )
- bFixedLen = TRUE;
+ bFixedLen = sal_True;
nSub = aToken.GetTokenCount('/');
for ( i=0; i<nSub; i++ )
{
String aCode = aToken.GetToken( i, '/' );
if ( aCode.EqualsAscii(pStrMrg) )
- bMergeFieldSeps = TRUE;
+ bMergeFieldSeps = sal_True;
else
{
sal_Int32 nVal = aCode.ToInt32();
@@ -279,11 +279,11 @@ void ScAsciiOptions::ReadFromString( const String& rString )
if (nInfoCount)
{
pColStart = new xub_StrLen[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++)
+ pColFormat = new sal_uInt8[nInfoCount];
+ for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++)
{
pColStart[nInfo] = (xub_StrLen) aToken.GetToken( 2*nInfo, '/' ).ToInt32();
- pColFormat[nInfo] = (BYTE) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32();
+ pColFormat[nInfo] = (sal_uInt8) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32();
}
}
else
@@ -313,6 +313,10 @@ void ScAsciiOptions::ReadFromString( const String& rString )
aToken = rString.GetToken(7, ',');
bDetectSpecialNumber = aToken.EqualsAscii("true") ? true : false;
}
+ else
+ bDetectSpecialNumber = sal_True; // default of versions that didn't add the parameter
+
+ // 9th token is used for "Save as shown" in export options
}
@@ -375,7 +379,7 @@ String ScAsciiOptions::WriteToString() const
//
DBG_ASSERT( !nInfoCount || (pColStart && pColFormat), "0-Zeiger in ScAsciiOptions" );
- for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++)
+ for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++)
{
if (nInfo)
aOutStr += '/';
@@ -400,6 +404,8 @@ String ScAsciiOptions::WriteToString() const
// Detect special nubmers.
aOutStr += String::CreateFromAscii(bDetectSpecialNumber ? "true" : "false");
+ // 9th token is used for "Save as shown" in export options
+
return aOutStr;
}
diff --git a/sc/source/ui/dbgui/asciiopt.src b/sc/source/ui/dbgui/asciiopt.src
index 9396b862d2f3..94008212c263 100644
--- a/sc/source/ui/dbgui/asciiopt.src
+++ b/sc/source/ui/dbgui/asciiopt.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_ASCII
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_ASCII";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 320 , 305 ) ;
@@ -71,6 +72,7 @@ ModalDialog RID_SCDLG_ASCII
ListBox LB_CHARSET
{
+ HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CHARSET";
Pos = MAP_APPFONT ( 76 , 14 ) ;
Size = MAP_APPFONT ( 130 , 61 ) ;
TabStop = TRUE ;
@@ -87,6 +89,7 @@ ModalDialog RID_SCDLG_ASCII
ListBox LB_CUSTOMLANG
{
+ HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CUSTOMLANG";
Pos = MAP_APPFONT ( 76 , 30 ) ;
Size = MAP_APPFONT ( 130 , 61 ) ;
TabStop = TRUE ;
@@ -103,6 +106,7 @@ ModalDialog RID_SCDLG_ASCII
NumericField NF_AT_ROW
{
+ HelpID = "sc:NumericField:RID_SCDLG_ASCII:NF_AT_ROW";
Border = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 76 , 46 ) ;
@@ -121,6 +125,7 @@ ModalDialog RID_SCDLG_ASCII
};
RadioButton RB_FIXED
{
+ HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_FIXED";
Pos = MAP_APPFONT ( 12 , 75 ) ;
Size = MAP_APPFONT ( 243 , 10 ) ;
Text [ en-US ] = "~Fixed width" ;
@@ -128,6 +133,7 @@ ModalDialog RID_SCDLG_ASCII
};
RadioButton RB_SEPARATED
{
+ HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_SEPARATED";
Pos = MAP_APPFONT ( 12 , 89 ) ;
Size = MAP_APPFONT ( 243 , 10 ) ;
Text [ en-US ] = "~Separated by" ;
@@ -137,6 +143,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CKB_TAB
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_TAB";
Pos = MAP_APPFONT ( 20 , 102 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -144,6 +151,7 @@ ModalDialog RID_SCDLG_ASCII
};
CheckBox CKB_COMMA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_COMMA";
Pos = MAP_APPFONT ( 92 , 102 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -151,6 +159,7 @@ ModalDialog RID_SCDLG_ASCII
};
CheckBox CKB_OTHER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_OTHER";
Pos = MAP_APPFONT ( 164 , 102 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -158,6 +167,7 @@ ModalDialog RID_SCDLG_ASCII
};
Edit ED_OTHER
{
+ HelpID = "sc:Edit:RID_SCDLG_ASCII:ED_OTHER";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 100 ) ;
Size = MAP_APPFONT ( 37 , 12 ) ;
@@ -167,6 +177,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CKB_SEMICOLON
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SEMICOLON";
Pos = MAP_APPFONT ( 20 , 115 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -174,6 +185,7 @@ ModalDialog RID_SCDLG_ASCII
};
CheckBox CKB_SPACE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SPACE";
Pos = MAP_APPFONT ( 92 , 115 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
@@ -182,6 +194,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CB_ASONCE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_ASONCE";
Pos = MAP_APPFONT ( 20 , 130 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
@@ -190,6 +203,7 @@ ModalDialog RID_SCDLG_ASCII
ComboBox CB_TEXTSEP
{
+ HelpID = "sc:ComboBox:RID_SCDLG_ASCII:CB_TEXTSEP";
Pos = MAP_APPFONT ( 218 , 128 ) ;
Size = MAP_APPFONT ( 37 , 94 ) ;
TabStop = TRUE ;
@@ -211,6 +225,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CB_QUOTED_AS_TEXT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_QUOTED_AS_TEXT";
Pos = MAP_APPFONT ( 12 , 158 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
@@ -219,6 +234,7 @@ ModalDialog RID_SCDLG_ASCII
CheckBox CB_DETECT_SPECIAL_NUMBER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_DETECT_SPECIAL_NUMBER";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
@@ -239,6 +255,7 @@ ModalDialog RID_SCDLG_ASCII
};
ListBox LB_TYPE1
{
+ HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_TYPE1";
Pos = MAP_APPFONT ( 76 , 198 ) ;
Size = MAP_APPFONT ( 60 , 68 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index b6d7f2430091..3ac55d55cc12 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -65,7 +65,7 @@ public:
ScAreaData() {}
~ScAreaData() {}
- void Set( const String& rName, const String& rArea, BOOL bDb )
+ void Set( const String& rName, const String& rArea, sal_Bool bDb )
{
aStrName = rName;
aStrArea = rArea;
@@ -74,7 +74,7 @@ public:
String aStrName;
String aStrArea;
- BOOL bIsDbArea;
+ sal_Bool bIsDbArea;
};
@@ -156,7 +156,7 @@ void ScConsolidateDlg::Init()
DBG_ASSERT( pViewData && pDoc && pRangeUtil, "Error in Ctor" );
String aStr;
- USHORT i=0;
+ sal_uInt16 i=0;
aEdDataArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
aEdDestArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
@@ -222,8 +222,8 @@ void ScConsolidateDlg::Init()
ScRangeName* pRangeNames = pDoc->GetRangeName();
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- const USHORT nRangeCount = pRangeNames ? pRangeNames->size() : 0;
- const USHORT nDbCount = pDbNames ? pDbNames ->GetCount() : 0;
+ const sal_uInt16 nRangeCount = pRangeNames ? pRangeNames->size() : 0;
+ const sal_uInt16 nDbCount = pDbNames ? pDbNames ->GetCount() : 0;
nAreaDataCount = nRangeCount+nDbCount;
pAreaData = NULL;
@@ -234,7 +234,7 @@ void ScConsolidateDlg::Init()
String aStrName;
String aStrArea;
- USHORT nAt = 0;
+ sal_uInt16 nAt = 0;
ScRange aRange;
ScAreaNameIterator aIter( pDoc );
while ( aIter.Next( aStrName, aRange ) )
@@ -269,7 +269,7 @@ void ScConsolidateDlg::FillAreaLists()
{
String aString;
- for ( USHORT i=0;
+ for ( sal_uInt16 i=0;
(i<nAreaDataCount) && (pAreaData[i].aStrName.Len()>0);
i++ )
{
@@ -295,7 +295,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
RefInputStart( pRefInputEdit );
String aStr;
- USHORT nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch
+ sal_uInt16 nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch
const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention();
if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
@@ -315,7 +315,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScConsolidateDlg::Close()
+sal_Bool ScConsolidateDlg::Close()
{
return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() );
}
@@ -327,7 +327,7 @@ void ScConsolidateDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if ( pRefInputEdit )
{
@@ -346,20 +346,20 @@ void ScConsolidateDlg::SetActive()
void ScConsolidateDlg::Deactivate()
{
- bDlgLostFocus = TRUE;
+ bDlgLostFocus = sal_True;
}
//----------------------------------------------------------------------------
-BOOL ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
+sal_Bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
{
if ( !pRangeUtil || !pDoc || !pViewData ||
((pEd != &aEdDataArea) && (pEd != &aEdDestArea)) )
- return FALSE;
+ return false;
SCTAB nTab = pViewData->GetTabNo();
- BOOL bEditOk = FALSE;
+ sal_Bool bEditOk = false;
String theCompleteStr;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -411,7 +411,7 @@ IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr )
IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG )
{
- USHORT nDataAreaCount = aLbConsAreas.GetEntryCount();
+ sal_uInt16 nDataAreaCount = aLbConsAreas.GetEntryCount();
if ( nDataAreaCount > 0 )
{
@@ -425,7 +425,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG )
ScConsolidateParam theOutParam( theConsData );
ScArea** ppDataAreas = new ScArea*[nDataAreaCount];
ScArea* pArea;
- USHORT i=0;
+ sal_uInt16 i=0;
for ( i=0; i<nDataAreaCount; i++ )
{
@@ -450,7 +450,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG )
ScConsolidateItem aOutItem( nWhichCons, &theOutParam );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_CONSOLIDATE,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -481,16 +481,16 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn )
{
String aNewEntry( aEdDataArea.GetText() );
ScArea** ppAreas = NULL;
- USHORT nAreaCount = 0;
+ sal_uInt16 nAreaCount = 0;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE, eConv ) )
+ if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, sal_True, eConv ) )
{
// IsAbsTabArea() legt ein Array von ScArea-Zeigern an,
// welche ebenfalls dynamisch erzeugt wurden.
// Diese Objekte muessen hier abgeraeumt werden.
- for ( USHORT i=0; i<nAreaCount; i++ )
+ for ( sal_uInt16 i=0; i<nAreaCount; i++ )
{
String aNewArea;
@@ -551,7 +551,7 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb )
else if ( (pLb == &aLbDataArea) || (pLb == &aLbDestArea) )
{
Edit* pEd = (pLb == &aLbDataArea) ? &aEdDataArea : &aEdDestArea;
- USHORT nSelPos = pLb->GetSelectEntryPos();
+ sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
if ( pRangeUtil
&& (nSelPos > 0)
@@ -610,7 +610,7 @@ IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd )
// auch noch in tpsubt bzw. ueberall, wo StarCalc-Funktionen
// auswaehlbar sind.
-ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos )
+ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos )
{
switch ( nPos )
{
@@ -633,7 +633,7 @@ ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos )
//----------------------------------------------------------------------------
-USHORT ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
+sal_uInt16 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
{
switch ( eFunc )
{
diff --git a/sc/source/ui/dbgui/consdlg.src b/sc/source/ui/dbgui/consdlg.src
index 9716b190c886..394dd80ac9b4 100644
--- a/sc/source/ui/dbgui/consdlg.src
+++ b/sc/source/ui/dbgui/consdlg.src
@@ -28,7 +28,7 @@
ModelessDialog RID_SCDLG_CONSOLIDATE
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_CONSOLIDATE ;
+ HelpId = CMD_SID_OPENDLG_CONSOLIDATE ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 280 , 154 ) ;
@@ -37,6 +37,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
Closeable = FALSE ;
ListBox LB_FUNC
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 212 , 90 ) ;
@@ -59,6 +60,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
Edit ED_DATA_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_CONSOLIDATE:ED_DATA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 106 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
@@ -66,6 +68,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
Edit ED_DEST_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_CONSOLIDATE:ED_DEST_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 135 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
@@ -73,6 +76,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ImageButton RB_DATA_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONSOLIDATE:RB_DATA_AREA";
Pos = MAP_APPFONT ( 206 , 105 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -80,6 +84,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ImageButton RB_DEST_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONSOLIDATE:RB_DEST_AREA";
Pos = MAP_APPFONT ( 206 , 134 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -87,6 +92,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ListBox LB_DATA_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_DATA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 106 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -95,6 +101,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
ListBox LB_DEST_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONSOLIDATE:LB_DEST_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 135 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -103,6 +110,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
MultiListBox LB_CONSAREAS
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_CONSOLIDATE:LB_CONSAREAS";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 46 ) ;
@@ -135,6 +143,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
CheckBox BTN_BYROW
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_BYROW";
Pos = MAP_APPFONT ( 12 , 165 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
Text [ en-US ] = "~Row labels" ;
@@ -142,6 +151,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
CheckBox BTN_BYCOL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_BYCOL";
Pos = MAP_APPFONT ( 12 , 179 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
TabStop = TRUE ;
@@ -167,6 +177,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
CheckBox BTN_REFS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONSOLIDATE:BTN_REFS";
Pos = MAP_APPFONT ( 121 , 165 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
Text [ en-US ] = "~Link to source data" ;
@@ -193,6 +204,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_CONSOLIDATE:BTN_MORE";
Pos = MAP_APPFONT ( 224 , 134 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -201,6 +213,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONSOLIDATE:BTN_REMOVE";
Pos = MAP_APPFONT ( 224 , 114 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -208,6 +221,7 @@ ModelessDialog RID_SCDLG_CONSOLIDATE
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONSOLIDATE:BTN_ADD";
Pos = MAP_APPFONT ( 224 , 96 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index f399c6b2488a..15a0eb4e10cd 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -82,7 +82,7 @@ struct Func_Select
ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) :
ScCsvControl( rParent ),
mpColorConfig( 0 ),
- mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ) ),
+ mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), true ) ),
maHeaderFont( GetFont() ),
maColStates( 1 ),
maTypeNames( 1 ),
@@ -252,7 +252,7 @@ void ScCsvGrid::InitFonts()
aDefSet.Put( aComplexItem );
// set Asian/Complex font size to height of character in Latin font
- ULONG nFontHt = static_cast< ULONG >( maMonoFont.GetSize().Height() );
+ sal_uLong nFontHt = static_cast< sal_uLong >( maMonoFont.GetSize().Height() );
aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CJK ) );
aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CTL ) );
@@ -903,8 +903,8 @@ void ScCsvGrid::KeyInput( const KeyEvent& rKEvt )
{
const KeyCode& rKCode = rKEvt.GetKeyCode();
sal_uInt16 nCode = rKCode.GetCode();
- bool bShift = rKCode.IsShift() == TRUE;
- bool bMod1 = rKCode.IsMod1() == TRUE;
+ bool bShift = rKCode.IsShift() == sal_True;
+ bool bMod1 = rKCode.IsMod1() == sal_True;
if( !rKCode.IsMod2() )
{
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 6f6a499b81cd..dbc21d51afb2 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -129,7 +129,7 @@ ScCsvRuler::~ScCsvRuler()
// common ruler handling ------------------------------------------------------
void ScCsvRuler::SetPosSizePixel(
- long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+ long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( nFlags & WINDOW_POSSIZE_HEIGHT )
nHeight = GetTextHeight() + mnSplitSize + 2;
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 2b7b56b116a9..63d11e1141ae 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -125,7 +125,7 @@ ScDataPilotDatabaseDlg::~ScDataPilotDatabaseDlg()
void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc )
{
- USHORT nSelect = aLbType.GetSelectEntryPos();
+ sal_uInt16 nSelect = aLbType.GetSelectEntryPos();
rDesc.aDBName = aLbDatabase.GetSelectEntry();
rDesc.aObject = aCbObject.GetText();
@@ -156,7 +156,7 @@ void ScDataPilotDatabaseDlg::FillObjects()
if (!aDatabaseName.Len())
return;
- USHORT nSelect = aLbType.GetSelectEntryPos();
+ sal_uInt16 nSelect = aLbType.GetSelectEntryPos();
if ( nSelect > DP_TYPELIST_QUERY )
return; // only tables and queries
diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx
index 507df18c5829..086d4778fba8 100644
--- a/sc/source/ui/dbgui/dapitype.cxx
+++ b/sc/source/ui/dbgui/dapitype.cxx
@@ -45,7 +45,7 @@ using ::rtl::OUString;
//-------------------------------------------------------------------------
-ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ) :
+ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DAPITYPE ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
@@ -96,7 +96,7 @@ bool ScDataPilotSourceTypeDlg::IsNamedRange() const
OUString ScDataPilotSourceTypeDlg::GetSelectedNamedRange() const
{
- USHORT nPos = aLbNamedRange.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbNamedRange.GetSelectEntryPos();
return aLbNamedRange.GetEntry(nPos);
}
diff --git a/sc/source/ui/dbgui/dapitype.src b/sc/source/ui/dbgui/dapitype.src
index fa49dfbb6bcf..283106c15e84 100644
--- a/sc/source/ui/dbgui/dapitype.src
+++ b/sc/source/ui/dbgui/dapitype.src
@@ -140,6 +140,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
ListBox LB_SERVICE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DAPISERVICE:LB_SERVICE";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 12 ) ;
Size = MAP_APPFONT ( 120 , 80 ) ;
@@ -154,6 +155,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_SOURCE
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_SOURCE";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 28 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -167,6 +169,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_NAME
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 44 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -180,6 +183,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_USER
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_USER";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 60 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -193,6 +197,7 @@ ModalDialog RID_SCDLG_DAPISERVICE
};
Edit ED_PASSWD
{
+ HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_PASSWD";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 76 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
@@ -248,6 +253,7 @@ ModalDialog RID_SCDLG_DAPIDATA
};
ListBox LB_DATABASE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DAPIDATA:LB_DATABASE";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 12 ) ;
Size = MAP_APPFONT ( 110 , 80 ) ;
@@ -263,6 +269,7 @@ ModalDialog RID_SCDLG_DAPIDATA
};
ComboBox CB_OBJECT
{
+ HelpID = "sc:ComboBox:RID_SCDLG_DAPIDATA:CB_OBJECT";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 28 ) ;
Size = MAP_APPFONT ( 110 , 80 ) ;
@@ -278,6 +285,7 @@ ModalDialog RID_SCDLG_DAPIDATA
};
ListBox LB_OBJTYPE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DAPIDATA:LB_OBJTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 44 ) ;
Size = MAP_APPFONT ( 110 , 80 ) ;
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 69672f9802d3..fcf29c814933 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -78,7 +78,7 @@ public:
: rEdAssign(rEd),
rBtnHeader(rHdr), rBtnSize(rSize), rBtnFormat(rFmt), rBtnStrip(rStrip),
rCurArea(rArea),
- bHeader(FALSE), bSize(FALSE), bFormat(FALSE), bDirty(FALSE) {}
+ bHeader(false), bSize(false), bFormat(false), bDirty(false) {}
void Save();
void Restore();
@@ -91,11 +91,11 @@ private:
ScRange& rCurArea;
String aStr;
ScRange aArea;
- BOOL bHeader:1;
- BOOL bSize:1;
- BOOL bFormat:1;
- BOOL bStrip:1;
- BOOL bDirty:1;
+ sal_Bool bHeader:1;
+ sal_Bool bSize:1;
+ sal_Bool bFormat:1;
+ sal_Bool bStrip:1;
+ sal_Bool bDirty:1;
};
@@ -110,7 +110,7 @@ void DBSaveData::Save()
bSize = rBtnSize.IsChecked();
bFormat = rBtnFormat.IsChecked();
bStrip = rBtnStrip.IsChecked();
- bDirty = TRUE;
+ bDirty = sal_True;
}
@@ -126,7 +126,7 @@ void DBSaveData::Restore()
rBtnSize.Check ( bSize );
rBtnFormat.Check ( bFormat );
rBtnStrip.Check ( bStrip );
- bDirty = FALSE;
+ bDirty = false;
}
}
@@ -170,7 +170,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
//
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ),
aLocalDbCol ( *(pDoc->GetDBCollection()) )
{
@@ -186,6 +186,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea );
Init();
FreeResource();
+ aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
}
@@ -209,7 +210,7 @@ ScDbNameDlg::~ScDbNameDlg()
void ScDbNameDlg::Init()
{
- aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen
+ aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
aBtnMore.AddWindow( &aFlOptions );
aBtnMore.AddWindow( &aBtnHeader );
@@ -252,7 +253,7 @@ void ScDbNameDlg::Init()
if ( pDBColl )
{
// Feststellen, ob definierter DB-Bereich markiert wurde:
- pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, TRUE );
+ pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True );
if ( pDBData )
{
String theDbName;
@@ -287,7 +288,7 @@ void ScDbNameDlg::Init()
aEdAssign.SetText( theAreaStr );
aEdName.GrabFocus();
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
NameModifyHdl( 0 );
}
@@ -335,7 +336,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
aFTSource.Enable();
aFTOperations.Enable();
aBtnAdd.Enable();
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
}
}
@@ -343,7 +344,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScDbNameDlg::Close()
+sal_Bool ScDbNameDlg::Close()
{
return DoClose( ScDbNameDlgWrapper::GetChildWindowId() );
}
@@ -365,9 +366,9 @@ void ScDbNameDlg::SetActive()
void ScDbNameDlg::UpdateNames()
{
- USHORT nNameCount = aLocalDbCol.GetCount();
+ sal_uInt16 nNameCount = aLocalDbCol.GetCount();
- aEdName.SetUpdateMode( FALSE );
+ aEdName.SetUpdateMode( false );
//-----------------------------------------------------------
aEdName.Clear();
aEdAssign.SetText( EMPTY_STRING );
@@ -377,7 +378,7 @@ void ScDbNameDlg::UpdateNames()
ScDBData* pDbData = NULL;
String aString;
- for ( USHORT i=0; i<nNameCount; i++ )
+ for ( sal_uInt16 i=0; i<nNameCount; i++ )
{
pDbData = (ScDBData*)(aLocalDbCol.At( i ));
if ( pDbData )
@@ -395,7 +396,7 @@ void ScDbNameDlg::UpdateNames()
aBtnRemove.Disable();
}
//-----------------------------------------------------------
- aEdName.SetUpdateMode( TRUE );
+ aEdName.SetUpdateMode( sal_True );
aEdName.Invalidate();
}
@@ -404,7 +405,7 @@ void ScDbNameDlg::UpdateNames()
void ScDbNameDlg::UpdateDBData( const String& rStrName )
{
String theArea;
- USHORT nAt;
+ sal_uInt16 nAt;
ScDBData* pData;
aLocalDbCol.SearchName( rStrName, nAt );
@@ -445,7 +446,7 @@ void ScDbNameDlg::UpdateDBData( const String& rStrName )
//------------------------------------------------------------------------
-BOOL ScDbNameDlg::IsRefInputMode() const
+sal_Bool ScDbNameDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -502,7 +503,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
ScAddress aEnd = theCurArea.aEnd;
ScDBData* pOldEntry = NULL;
- USHORT nFoundAt = 0;
+ sal_uInt16 nFoundAt = 0;
if ( aLocalDbCol.SearchName( aNewName, nFoundAt ) )
pOldEntry = aLocalDbCol[nFoundAt];
if (pOldEntry)
@@ -511,7 +512,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
pOldEntry->MoveTo( aStart.Tab(), aStart.Col(), aStart.Row(),
aEnd.Col(), aEnd.Row() );
- pOldEntry->SetByRow( TRUE );
+ pOldEntry->SetByRow( sal_True );
pOldEntry->SetHeader( aBtnHeader.IsChecked() );
pOldEntry->SetDoSize( aBtnDoSize.IsChecked() );
pOldEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
@@ -524,7 +525,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(),
aStart.Col(), aStart.Row(),
aEnd.Col(), aEnd.Row(),
- TRUE, aBtnHeader.IsChecked() );
+ sal_True, aBtnHeader.IsChecked() );
pNewEntry->SetDoSize( aBtnDoSize.IsChecked() );
pNewEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() );
pNewEntry->SetStripData( aBtnStripData.IsChecked() );
@@ -541,13 +542,13 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
aBtnAdd.Disable();
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
- aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen
- aBtnDoSize.Check( FALSE );
- aBtnKeepFmt.Check( FALSE );
- aBtnStripData.Check( FALSE );
+ aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
+ aBtnDoSize.Check( false );
+ aBtnKeepFmt.Check( false );
+ aBtnStripData.Check( false );
SetInfoStrings( NULL ); // leer
theCurArea = ScRange();
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
NameModifyHdl( 0 );
}
@@ -572,7 +573,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG )
{
- USHORT nRemoveAt = 0;
+ sal_uInt16 nRemoveAt = 0;
const String aStrEntry = aEdName.GetText();
if ( aLocalDbCol.SearchName( aStrEntry, nRemoveAt ) )
@@ -608,12 +609,12 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG )
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
theCurArea = ScRange();
- aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen
- aBtnDoSize.Check( FALSE );
- aBtnKeepFmt.Check( FALSE );
- aBtnStripData.Check( FALSE );
+ aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen
+ aBtnDoSize.Check( false );
+ aBtnKeepFmt.Check( false );
+ aBtnStripData.Check( false );
SetInfoStrings( NULL ); // leer
- bSaved=FALSE;
+ bSaved=false;
pSaveObj->Restore();
NameModifyHdl( 0 );
}
@@ -626,7 +627,7 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
{
String theName = aEdName.GetText();
- BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND
+ sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
!= aEdName.GetEntryPos( theName ));
if ( theName.Len() == 0 )
@@ -644,11 +645,11 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
aFTOperations.Disable();
aEdAssign .Disable();
aRbAssign .Disable();
- //bSaved=FALSE;
+ //bSaved=sal_False;
//pSaveObj->Restore();
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
- bRefInputMode = FALSE;
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
+ bRefInputMode = false;
}
else
{
@@ -659,7 +660,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
if(!bSaved)
{
- bSaved=TRUE;
+ bSaved=sal_True;
pSaveObj->Save();
}
UpdateDBData( theName );
@@ -669,7 +670,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
if ( aBtnAdd.GetText() != aStrAdd )
aBtnAdd.SetText( aStrAdd );
- bSaved=FALSE;
+ bSaved=false;
pSaveObj->Restore();
if ( aEdAssign.GetText().Len() > 0 )
@@ -701,7 +702,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
//SFX_APPWINDOW->Enable();
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
return 0;
}
diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx
index e665b215c0e9..82ccb987599e 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -197,7 +197,7 @@ ScDPNumGroupInfo ScDPNumGroupDlg::GetGroupInfo() const
{
ScDPNumGroupInfo aInfo;
aInfo.Enable = sal_True;
- aInfo.DateValues = sal_False;
+ aInfo.DateValues = false;
aInfo.AutoStart = maStartHelper.IsAuto();
aInfo.AutoEnd = maEndHelper.IsAuto();
@@ -239,21 +239,21 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent,
{
maLbUnits.SetHelpId( HID_SC_DPDATEGROUP_LB );
ResStringArray aArr( ScResId( STR_UNITS ) );
- for( USHORT nIdx = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIdx < nCount; ++nIdx )
+ for( sal_uInt16 nIdx = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIdx < nCount; ++nIdx )
maLbUnits.InsertEntry( aArr.GetString( nIdx ) );
FreeResource();
- maEdStart.SetShowDateCentury( TRUE );
- maEdEnd.SetShowDateCentury( TRUE );
+ maEdStart.SetShowDateCentury( sal_True );
+ maEdEnd.SetShowDateCentury( sal_True );
maStartHelper.SetValue( rInfo.AutoStart, rInfo.Start );
maEndHelper.SetValue( rInfo.AutoEnd, rInfo.End );
if( nDatePart == 0 )
nDatePart = com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS;
- for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
- maLbUnits.CheckEntryPos( static_cast< USHORT >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 );
+ for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
+ maLbUnits.CheckEntryPos( static_cast< sal_uInt16 >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 );
if( rInfo.DateValues )
{
@@ -317,8 +317,8 @@ sal_Int32 ScDPDateGroupDlg::GetDatePart() const
// return listbox contents for "units" mode
sal_Int32 nDatePart = 0;
- for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
- if( maLbUnits.IsChecked( static_cast< USHORT >( nIdx ) ) )
+ for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx )
+ if( maLbUnits.IsChecked( static_cast< sal_uInt16 >( nIdx ) ) )
nDatePart |= spnDateParts[ nIdx ];
return nDatePart;
}
diff --git a/sc/source/ui/dbgui/dpgroupdlg.src b/sc/source/ui/dbgui/dpgroupdlg.src
index 6e6ba170f1b1..4e73cfc185da 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.src
+++ b/sc/source/ui/dbgui/dpgroupdlg.src
@@ -46,6 +46,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_AUTOSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOSTART";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -53,6 +54,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_MANSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANSTART";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -60,6 +62,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
Edit ED_START
{
+ HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_START";
Pos = MAP_APPFONT ( 94 , 26 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -73,6 +76,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_AUTOEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOEND";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -80,6 +84,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
RadioButton RB_MANEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANEND";
Pos = MAP_APPFONT ( 12 , 67 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -87,6 +92,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
Edit ED_END
{
+ HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_END";
Pos = MAP_APPFONT ( 94 , 65 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -100,6 +106,7 @@ ModalDialog RID_SCDLG_DPNUMGROUP
};
Edit ED_BY
{
+ HelpID = "sc:Edit:RID_SCDLG_DPNUMGROUP:ED_BY";
Pos = MAP_APPFONT ( 94 , 92 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -146,6 +153,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_AUTOSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_AUTOSTART";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -153,6 +161,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_MANSTART
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_MANSTART";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -160,6 +169,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
DateField ED_START
{
+ HelpID = "sc:DateField:RID_SCDLG_DPDATEGROUP:ED_START";
Pos = MAP_APPFONT ( 94 , 26 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -173,6 +183,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_AUTOEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_AUTOEND";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -180,6 +191,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_MANEND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_MANEND";
Pos = MAP_APPFONT ( 12 , 67 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -187,6 +199,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
DateField ED_END
{
+ HelpID = "sc:DateField:RID_SCDLG_DPDATEGROUP:ED_END";
Pos = MAP_APPFONT ( 94 , 65 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
@@ -200,6 +213,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_NUMDAYS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_NUMDAYS";
Pos = MAP_APPFONT ( 12 , 94 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -207,6 +221,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
RadioButton RB_UNITS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPDATEGROUP:RB_UNITS";
Pos = MAP_APPFONT ( 12 , 110 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -214,6 +229,7 @@ ModalDialog RID_SCDLG_DPDATEGROUP
};
NumericField ED_NUMDAYS
{
+ HelpID = "sc:NumericField:RID_SCDLG_DPDATEGROUP:ED_NUMDAYS";
Pos = MAP_APPFONT ( 94, 92 ) ;
Size = MAP_APPFONT ( 35, 12 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 874308467850..7bd85a348dc9 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -29,14 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <vcl/virdev.hxx>
+#include "fieldwnd.hxx"
+
+#include <tools/debug.hxx>
#include <vcl/decoview.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/mnemonic.hxx>
#include <vcl/help.hxx>
-#include <tools/debug.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/virdev.hxx>
-#include "fieldwnd.hxx"
#include "pvlaydlg.hxx"
#include "dpuiglobal.hxx"
#include "AccessibleDataPilotControl.hxx"
@@ -231,6 +231,7 @@ void ScDPFieldControlBase::SetFieldText( const String& rText, size_t nIndex )
pAccessible = NULL;
}
}
+ return PIVOTFIELD_INVALID;
}
const String& ScDPFieldControlBase::GetFieldText( size_t nIndex ) const
@@ -304,10 +305,9 @@ void ScDPFieldControlBase::MouseButtonDown( const MouseEvent& rMEvt )
{
if( rMEvt.IsLeft() )
{
- size_t nIndex = 0;
- if( GetFieldIndex( rMEvt.GetPosPixel(), nIndex ) && IsExistingIndex( nIndex ) )
- {
- GrabFocusWithSel( nIndex );
+ --mnAutoScrollDelay;
+ return;
+ }
if( rMEvt.GetClicks() == 1 )
{
@@ -323,7 +323,9 @@ void ScDPFieldControlBase::MouseButtonDown( const MouseEvent& rMEvt )
void ScDPFieldControlBase::MouseButtonUp( const MouseEvent& rMEvt )
{
- if( rMEvt.IsLeft() )
+ if( eEndType != ENDTRACKING_DROP )
+ mnFirstVisIndex = mnOldFirstVisIndex;
+ if( eEndType != ENDTRACKING_SUSPEND )
{
if( rMEvt.GetClicks() == 1 )
{
@@ -334,29 +336,60 @@ void ScDPFieldControlBase::MouseButtonUp( const MouseEvent& rMEvt )
if( IsMouseCaptured() )
ReleaseMouse();
}
+ mnInsCursorIndex = PIVOTFIELD_INVALID;
+ Invalidate();
}
void ScDPFieldControlBase::MouseMove( const MouseEvent& rMEvt )
{
- if( IsMouseCaptured() )
+ // prepare a virtual device for buffered painting
+ VirtualDevice aVirDev;
+ // #i97623# VirtualDevice is always LTR on construction while other windows derive direction from parent
+ aVirDev.EnableRTL( IsRTLEnabled() );
+ aVirDev.SetMapMode( MAP_PIXEL );
+ aVirDev.SetOutputSizePixel( GetSizePixel() );
+ Font aFont = GetFont();
+ aFont.SetTransparent( true );
+ aVirDev.SetFont( aFont );
+
+ // draw the background and all fields
+ DrawBackground( aVirDev );
+ for( size_t nFieldIndex = mnFirstVisIndex, nEndIndex = mnFirstVisIndex + mnPageSize; nFieldIndex < nEndIndex; ++nFieldIndex )
+ DrawField( aVirDev, nFieldIndex );
+ DrawInsertionCursor( aVirDev );
+ DrawBitmap( Point( 0, 0 ), aVirDev.GetBitmap( Point( 0, 0 ), GetSizePixel() ) );
+
+ // draw field text focus
+ if( HasFocus() && (mnSelectIndex < maFields.size()) && (mnFirstVisIndex <= mnSelectIndex) && (mnSelectIndex < mnFirstVisIndex + mnPageSize) )
{
PointerStyle ePtr = mpDlg->NotifyMouseMove( OutputToScreenPixel( rMEvt.GetPosPixel() ) );
SetPointer( Pointer( ePtr ) );
}
- size_t nIndex = 0;
- if( GetFieldIndex( rMEvt.GetPosPixel(), nIndex ) && IsShortenedText( nIndex ) )
+
+ // update scrollbar
+ size_t nFieldCount = maFields.size();
+ /* Already show the scrollbar if window is full but no fields are hidden
+ (yet). This gives the user the hint that it is now possible to add more
+ fields to the window. */
+ mrScrollBar.Show( nFieldCount >= mnPageSize );
+ mrScrollBar.Enable( nFieldCount > mnPageSize );
+ if( mrScrollBar.IsVisible() )
{
- Point aPos = OutputToScreenPixel( rMEvt.GetPosPixel() );
- Rectangle aRect( aPos, GetSizePixel() );
- String aHelpText = GetFieldText(nIndex);
- Help::ShowQuickHelp( this, aRect, aHelpText );
+ mrScrollBar.SetRange( Range( 0, static_cast< long >( (nFieldCount - 1) / mnLineSize + 1 ) ) );
+ mrScrollBar.SetThumbPos( static_cast< long >( mnFirstVisIndex / mnLineSize ) );
}
+
+ /* Exclude empty fields from tab chain, but do not disable them. They need
+ to be enabled because they still act as target for field movement via
+ keyboard shortcuts. */
+ WinBits nMask = ~(WB_TABSTOP | WB_NOTABSTOP);
+ SetStyle( (GetStyle() & nMask) | (IsEmpty() ? WB_NOTABSTOP : WB_TABSTOP) );
}
void ScDPFieldControlBase::KeyInput( const KeyEvent& rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
bool bKeyEvaluated = false;
const FieldNames& rFields = GetFieldNames();
@@ -415,7 +448,7 @@ void ScDPFieldControlBase::GetFocus()
ScrollToEnd();
}
else // else change focus
- mpDlg->NotifyFieldFocus( GetFieldType(), TRUE );
+ mpDlg->NotifyFieldFocus( GetFieldType(), true );
AccessibleSetFocus(true);
}
@@ -424,7 +457,7 @@ void ScDPFieldControlBase::LoseFocus()
{
Control::LoseFocus();
Redraw();
- mpDlg->NotifyFieldFocus( GetFieldType(), FALSE );
+ mpDlg->NotifyFieldFocus( GetFieldType(), false );
AccessibleSetFocus(false);
}
@@ -779,7 +812,7 @@ void ScDPHorFieldControl::Redraw()
Point aPos0;
Size aSize( GetSizePixel() );
Font aFont( GetFont() ); // Font vom Window
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( true );
aVirDev.SetFont( aFont );
aVirDev.SetOutputSizePixel( aSize );
@@ -1095,6 +1128,11 @@ void ScDPRowFieldControl::Redraw()
bool bFocus = HasFocus() && (nField == GetSelectedField());
DrawField(aVirDev, Rectangle(aFldPt, aFldSize), *itr, bFocus);
}
+
+ // draw the button text
+ Point aLabelOffset( (maFieldSize.Width() - nLabelWidth) / 2, ::std::max< long >( (maFieldSize.Height() - rDev.GetTextHeight()) / 2, 3 ) );
+ rDev.SetTextColor( GetSettings().GetStyleSettings().GetButtonTextColor() );
+ rDev.DrawText( aFieldPos + aLabelOffset, aClippedText );
}
// Create a bitmap from the virtual device, and place that bitmap onto
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 82a8e8801b8b..03fd26ffd32e 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -115,14 +115,14 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pDoc ( NULL ),
nSrcTab ( 0 ),
nFieldCount ( 0 ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
pTimer ( NULL )
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
pEntryLists[i] = NULL;
for (SCSIZE i=0;i<MAXQUERY;i++)
{
- bRefreshExceptQuery[i]=FALSE;
+ bRefreshExceptQuery[i]=false;
}
aBtnMore.SetMoreText( String(ScResId( SCSTR_MOREBTN_MOREOPTIONS )) );
aBtnMore.SetLessText( String(ScResId( SCSTR_MOREBTN_FEWEROPTIONS )) );
@@ -133,6 +133,65 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pTimer = new Timer;
pTimer->SetTimeout( 50 ); // 50ms warten
pTimer->SetTimeoutHdl( LINK( this, ScFilterDlg, TimeOutHdl ) );
+
+ String sAccName (ScResId(RID_FILTER_OPERATOR));
+ String sIndexName(sAccName);
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbConnect1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbConnect2.SetAccessibleName(sIndexName);
+
+ sAccName = String(ScResId(RID_FILTER_FIELDNAME));
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbField1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbField2.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aLbField3.SetAccessibleName(sIndexName);
+
+
+ sAccName = String(ScResId(RID_FILTER_CONDITION));
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbCond1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbCond2.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aLbCond3.SetAccessibleName(sIndexName);
+
+ sAccName = String(ScResId(RID_FILTER_VALUE));
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aEdVal1.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aEdVal2.SetAccessibleName(sIndexName);
+ sIndexName = sAccName;
+ sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aEdVal3.SetAccessibleName(sIndexName);
+
+ aLbCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO));
+ aEdCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO));
+ aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+
+ aLbConnect1.SetAccessibleRelationLabeledBy(&aFtConnect);
+ aLbConnect2.SetAccessibleRelationLabeledBy(&aFtConnect);
+ aLbField1.SetAccessibleRelationLabeledBy(&aFtField);
+ aLbField2.SetAccessibleRelationLabeledBy(&aFtField);
+ aLbField3.SetAccessibleRelationLabeledBy(&aFtField);
+ aLbCond1.SetAccessibleRelationLabeledBy(&aFtCond);
+ aLbCond2.SetAccessibleRelationLabeledBy(&aFtCond);
+ aLbCond3.SetAccessibleRelationLabeledBy(&aFtCond);
+ aEdVal1.SetAccessibleRelationLabeledBy(&aFtVal);
+ aEdVal2.SetAccessibleRelationLabeledBy(&aFtVal);
+ aEdVal3.SetAccessibleRelationLabeledBy(&aFtVal);
}
@@ -140,7 +199,7 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
ScFilterDlg::~ScFilterDlg()
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
delete pEntryLists[i];
delete pOptionsMgr;
@@ -230,13 +289,13 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
for ( SCSIZE i=0; i<4; i++ )
{
String aValStr;
- USHORT nCondPos = 0;
- USHORT nFieldSelPos = 0;
+ sal_uInt16 nCondPos = 0;
+ sal_uInt16 nFieldSelPos = 0;
ScQueryEntry& rEntry = theQueryData.GetEntry(i);
if ( rEntry.bDoQuery )
{
- nCondPos = (USHORT)rEntry.eOp;
+ nCondPos = (sal_uInt16)rEntry.eOp;
nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
if ( rEntry.nVal == SC_EMPTYFIELDS && !rEntry.bQueryByString && *rEntry.pStr == EMPTY_STRING )
{
@@ -256,15 +315,15 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
nFieldSelPos = GetFieldSelPos( pViewData->GetCurX() );
rEntry.nField = nFieldSelPos ? (theQueryData.nCol1 +
static_cast<SCCOL>(nFieldSelPos) - 1) : static_cast<SCCOL>(0);
- rEntry.bDoQuery=TRUE;
- bRefreshExceptQuery[i]=TRUE;
+ rEntry.bDoQuery=sal_True;
+ bRefreshExceptQuery[i]=sal_True;
}
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
aValueEdArr[i]->SetText( aValStr );
aValueEdArr[i]->SetModifyHdl( LINK( this, ScFilterDlg, ValModifyHdl ) );
- UpdateValueList( static_cast<USHORT>(i+1) );
+ UpdateValueList( static_cast<sal_uInt16>(i+1) );
}
aScrollBar.SetEndScrollHdl( LINK( this, ScFilterDlg, ScrollHdl ) );
@@ -277,17 +336,17 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
(aLbField1.GetSelectEntryPos() != 0)
&& (aLbField2.GetSelectEntryPos() != 0)
- ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect )
+ ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect )
: aLbConnect2.SetNoSelection();
(aLbField2.GetSelectEntryPos() != 0)
&& (aLbField3.GetSelectEntryPos() != 0)
- ? aLbConnect3.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect )
+ ? aLbConnect3.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect )
: aLbConnect3.SetNoSelection();
(aLbField3.GetSelectEntryPos() != 0)
&& (aLbField4.GetSelectEntryPos() != 0)
- ? aLbConnect4.SelectEntryPos( (USHORT)theQueryData.GetEntry(3).eConnect )
+ ? aLbConnect4.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(3).eConnect )
: aLbConnect4.SetNoSelection();
if ( aLbField1.GetSelectEntryPos() == 0 )
{
@@ -333,15 +392,15 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
if(pDoc!=NULL &&
pDoc->GetChangeTrack()!=NULL) aBtnCopyResult.Disable();
// Modal-Modus einschalten
-// SetDispatcherLock( TRUE );
+// SetDispatcherLock( sal_True );
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
-// SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+// SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScFilterDlg::Close()
+sal_Bool ScFilterDlg::Close()
{
if (pViewData)
pViewData->GetDocShell()->CancelAutoDBRange();
@@ -404,7 +463,7 @@ void ScFilterDlg::FillFieldLists()
SCROW nFirstRow = theQueryData.nRow1;
SCCOL nMaxCol = theQueryData.nCol2;
SCCOL col = 0;
- USHORT i=1;
+ sal_uInt16 i=1;
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
@@ -428,13 +487,13 @@ void ScFilterDlg::FillFieldLists()
//----------------------------------------------------------------------------
-void ScFilterDlg::UpdateValueList( USHORT nList )
+void ScFilterDlg::UpdateValueList( sal_uInt16 nList )
{
if ( pDoc && nList>0 && nList<=4 )
{
ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
- USHORT nListPos = 0;
+ sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_uInt16 nListPos = 0;
String aCurValue = pValList->GetText();
pValList->Clear();
@@ -449,7 +508,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
if (!pEntryLists[nColumn])
{
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 nOffset = GetSliderPos();
SCTAB nTab = nSrcTab;
SCROW nFirstRow = theQueryData.nRow1;
SCROW nLastRow = theQueryData.bUseDynamicRange ? theQueryData.nDynamicEndRow : theQueryData.nRow2;
@@ -486,10 +545,10 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
}
TypedScStrCollection* pColl = pEntryLists[nColumn];
- USHORT nValueCount = pColl->GetCount();
+ sal_uInt16 nValueCount = pColl->GetCount();
if ( nValueCount > 0 )
{
- for ( USHORT i=0; i<nValueCount; i++ )
+ for ( sal_uInt16 i=0; i<nValueCount; i++ )
{
pValList->InsertEntry( (*pColl)[i]->GetString(), nListPos );
nListPos++;
@@ -503,30 +562,30 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
UpdateHdrInValueList( nList );
}
-void ScFilterDlg::UpdateHdrInValueList( USHORT nList )
+void ScFilterDlg::UpdateHdrInValueList( sal_uInt16 nList )
{
//! GetText / SetText ??
if ( pDoc && nList>0 && nList<=4 )
{
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
if ( nFieldSelPos )
{
SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
if ( pEntryLists[nColumn] )
{
- USHORT nPos = nHeaderPos[nColumn];
+ sal_uInt16 nPos = nHeaderPos[nColumn];
if ( nPos != USHRT_MAX )
{
ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nListPos = nPos + 2; // nach "leer" und "nicht leer"
+ sal_uInt16 nListPos = nPos + 2; // nach "leer" und "nicht leer"
TypedStrData* pHdrEntry = (*pEntryLists[nColumn])[nPos];
if ( pHdrEntry )
{
String aHdrStr = pHdrEntry->GetString();
- BOOL bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr );
- BOOL bInclude = !aBtnHeader.IsChecked();
+ sal_Bool bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr );
+ sal_Bool bInclude = !aBtnHeader.IsChecked();
if (bInclude) // Eintrag aufnehmen
{
@@ -555,7 +614,7 @@ void ScFilterDlg::UpdateHdrInValueList( USHORT nList )
//----------------------------------------------------------------------------
-void ScFilterDlg::ClearValueList( USHORT nList )
+void ScFilterDlg::ClearValueList( sal_uInt16 nList )
{
if ( nList>0 && nList<=4 )
{
@@ -570,10 +629,10 @@ void ScFilterDlg::ClearValueList( USHORT nList )
//----------------------------------------------------------------------------
-USHORT ScFilterDlg::GetFieldSelPos( SCCOL nField )
+sal_uInt16 ScFilterDlg::GetFieldSelPos( SCCOL nField )
{
if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
- return static_cast<USHORT>(nField - theQueryData.nCol1 + 1);
+ return static_cast<sal_uInt16>(nField - theQueryData.nCol1 + 1);
else
return 0;
}
@@ -584,7 +643,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
{
ScAddress theCopyPos;
ScQueryParam theParam( theQueryData );
- BOOL bCopyPosOk = FALSE;
+ sal_Bool bCopyPosOk = false;
if ( aBtnCopyResult.IsChecked() )
{
@@ -594,27 +653,27 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
if ( STRING_NOTFOUND != nColonPos )
theCopyStr.Erase( nColonPos );
- USHORT nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() );
bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) );
}
if ( aBtnCopyResult.IsChecked() && bCopyPosOk )
{
- theParam.bInplace = FALSE;
+ theParam.bInplace = false;
theParam.nDestTab = theCopyPos.Tab();
theParam.nDestCol = theCopyPos.Col();
theParam.nDestRow = theCopyPos.Row();
}
else
{
- theParam.bInplace = TRUE;
+ theParam.bInplace = sal_True;
theParam.nDestTab = 0;
theParam.nDestCol = 0;
theParam.nDestRow = 0;
}
theParam.bHasHeader = aBtnHeader.IsChecked();
- theParam.bByRow = TRUE;
+ theParam.bByRow = sal_True;
theParam.bDuplicate = !aBtnUnique.IsChecked();
theParam.bCaseSens = aBtnCase.IsChecked();
theParam.bRegExp = aBtnRegExp.IsChecked();
@@ -631,7 +690,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
//----------------------------------------------------------------------------
-BOOL ScFilterDlg::IsRefInputMode() const
+sal_Bool ScFilterDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -645,24 +704,24 @@ IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn )
{
if ( pBtn == &aBtnOk )
{
- BOOL bAreaInputOk = TRUE;
+ sal_Bool bAreaInputOk = sal_True;
if ( aBtnCopyResult.IsChecked() )
{
if ( !pOptionsMgr->VerifyPosStr( aEdCopyArea.GetText() ) )
{
if ( !aBtnMore.GetState() )
- aBtnMore.SetState( TRUE );
+ aBtnMore.SetState( sal_True );
ERRORBOX( STR_INVALID_TABREF );
aEdCopyArea.GrabFocus();
- bAreaInputOk = FALSE;
+ bAreaInputOk = false;
}
}
if ( bAreaInputOk )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_FILTER_OK,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -688,9 +747,9 @@ IMPL_LINK( ScFilterDlg, MoreClickHdl, MoreButton*, EMPTYARG )
else
{
pTimer->Stop();
- bRefInputMode = FALSE;
+ bRefInputMode = false;
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
return 0;
}
@@ -720,7 +779,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
* Behandlung der Enable/Disable-Logik,
* abhaengig davon, welche ListBox angefasst wurde:
*/
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 nOffset = GetSliderPos();
if ( pLb == &aLbConnect1 )
{
@@ -728,10 +787,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond1.Enable();
aEdVal1.Enable();
- USHORT nConnect1 = aLbConnect1.GetSelectEntryPos();
- USHORT nQE = nOffset;
+ sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos();
+ sal_uInt16 nQE = nOffset;
theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect1;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbConnect2 )
@@ -740,10 +799,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond2.Enable();
aEdVal2.Enable();
- USHORT nConnect2 = aLbConnect2.GetSelectEntryPos();
- USHORT nQE = 1+nOffset;
+ sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos();
+ sal_uInt16 nQE = 1+nOffset;
theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect2;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbConnect3 )
{
@@ -751,10 +810,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond3.Enable();
aEdVal3.Enable();
- USHORT nConnect3 = aLbConnect3.GetSelectEntryPos();
- USHORT nQE = 2+nOffset;
+ sal_uInt16 nConnect3 = aLbConnect3.GetSelectEntryPos();
+ sal_uInt16 nQE = 2+nOffset;
theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect3;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbConnect4 )
@@ -763,10 +822,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond4.Enable();
aEdVal4.Enable();
- USHORT nConnect4 = aLbConnect4.GetSelectEntryPos();
- USHORT nQE = 3+nOffset;
+ sal_uInt16 nConnect4 = aLbConnect4.GetSelectEntryPos();
+ sal_uInt16 nQE = 3+nOffset;
theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect4;
- bRefreshExceptQuery[nQE]=TRUE;
+ bRefreshExceptQuery[nQE]=sal_True;
}
else if ( pLb == &aLbField1 )
@@ -799,13 +858,13 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aEdVal2.Disable();
aEdVal3.Disable();
aEdVal4.Disable();
- for (USHORT i= nOffset; i< MAXQUERY; i++)
+ for (sal_uInt16 i= nOffset; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nOffset] =TRUE;
+ bRefreshExceptQuery[nOffset] =sal_True;
}
else
{
@@ -814,8 +873,8 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
{
aLbConnect2.Enable();
}
- theQueryData.GetEntry(nOffset).bDoQuery = TRUE;
- USHORT nField = pLb->GetSelectEntryPos();
+ theQueryData.GetEntry(nOffset).bDoQuery = sal_True;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
}
@@ -842,14 +901,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aEdVal3.Disable();
aEdVal4.Disable();
- USHORT nTemp=nOffset+1;
- for (USHORT i= nTemp; i< MAXQUERY; i++)
+ sal_uInt16 nTemp=nOffset+1;
+ for (sal_uInt16 i= nTemp; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nTemp]=TRUE;
+ bRefreshExceptQuery[nTemp]=sal_True;
}
else
{
@@ -858,9 +917,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
{
aLbConnect3.Enable();
}
- USHORT nField = pLb->GetSelectEntryPos();
- USHORT nQ=1+nOffset;
- theQueryData.GetEntry(nQ).bDoQuery = TRUE;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
+ sal_uInt16 nQ=1+nOffset;
+ theQueryData.GetEntry(nQ).bDoQuery = sal_True;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
}
@@ -879,14 +938,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbCond4.Disable();
aEdVal4.Disable();
- USHORT nTemp=nOffset+2;
- for (USHORT i= nTemp; i< MAXQUERY; i++)
+ sal_uInt16 nTemp=nOffset+2;
+ for (sal_uInt16 i= nTemp; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nTemp]=TRUE;
+ bRefreshExceptQuery[nTemp]=sal_True;
}
else
{
@@ -896,9 +955,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
aLbConnect4.Enable();
}
- USHORT nField = pLb->GetSelectEntryPos();
- USHORT nQ=2+nOffset;
- theQueryData.GetEntry(nQ).bDoQuery = TRUE;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
+ sal_uInt16 nQ=2+nOffset;
+ theQueryData.GetEntry(nQ).bDoQuery = sal_True;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
@@ -908,21 +967,21 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
if ( aLbField4.GetSelectEntryPos() == 0 )
{
ClearValueList( 4 );
- USHORT nTemp=nOffset+3;
- for (USHORT i= nTemp; i< MAXQUERY; i++)
+ sal_uInt16 nTemp=nOffset+3;
+ for (sal_uInt16 i= nTemp; i< MAXQUERY; i++)
{
- theQueryData.GetEntry(i).bDoQuery = FALSE;
- bRefreshExceptQuery[i]=FALSE;
+ theQueryData.GetEntry(i).bDoQuery = false;
+ bRefreshExceptQuery[i]=false;
theQueryData.GetEntry(i).nField = static_cast<SCCOL>(0);
}
- bRefreshExceptQuery[nTemp]=TRUE;
+ bRefreshExceptQuery[nTemp]=sal_True;
}
else
{
UpdateValueList( 4 );
- USHORT nField = pLb->GetSelectEntryPos();
- USHORT nQ=3+nOffset;
- theQueryData.GetEntry(nQ).bDoQuery = TRUE;
+ sal_uInt16 nField = pLb->GetSelectEntryPos();
+ sal_uInt16 nQ=3+nOffset;
+ theQueryData.GetEntry(nQ).bDoQuery = sal_True;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
@@ -933,17 +992,17 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
}
else if ( pLb == &aLbCond2)
{
- USHORT nQ=1+nOffset;
+ sal_uInt16 nQ=1+nOffset;
theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos();
}
else if ( pLb == &aLbCond3)
{
- USHORT nQ=2+nOffset;
+ sal_uInt16 nQ=2+nOffset;
theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos();
}
else
{
- USHORT nQ=3+nOffset;
+ sal_uInt16 nQ=3+nOffset;
theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos();
}
@@ -963,10 +1022,10 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox )
if ( pBox == &aBtnHeader ) // Feldlisten und Wertlisten
{
- USHORT nCurSel1 = aLbField1.GetSelectEntryPos();
- USHORT nCurSel2 = aLbField2.GetSelectEntryPos();
- USHORT nCurSel3 = aLbField3.GetSelectEntryPos();
- USHORT nCurSel4 = aLbField4.GetSelectEntryPos();
+ sal_uInt16 nCurSel1 = aLbField1.GetSelectEntryPos();
+ sal_uInt16 nCurSel2 = aLbField2.GetSelectEntryPos();
+ sal_uInt16 nCurSel3 = aLbField3.GetSelectEntryPos();
+ sal_uInt16 nCurSel4 = aLbField4.GetSelectEntryPos();
FillFieldLists();
aLbField1.SelectEntryPos( nCurSel1 );
aLbField2.SelectEntryPos( nCurSel2 );
@@ -981,7 +1040,7 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox )
if ( pBox == &aBtnCase ) // Wertlisten komplett
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
DELETEZ( pEntryLists[i] );
UpdateValueList( 1 ); // aktueller Text wird gemerkt
@@ -998,9 +1057,9 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox )
IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
{
- USHORT nOffset = GetSliderPos();
- USHORT i=0;
- USHORT nQE =i + nOffset;
+ sal_uInt16 nOffset = GetSliderPos();
+ sal_uInt16 i=0;
+ sal_uInt16 nQE =i + nOffset;
if ( pEd )
{
String aStrVal = pEd->GetText();
@@ -1037,7 +1096,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
pLbCond->Enable();
ScQueryEntry& rEntry = theQueryData.GetEntry( nQE );
- BOOL bDoThis = (pLbField->GetSelectEntryPos() != 0);
+ sal_Bool bDoThis = (pLbField->GetSelectEntryPos() != 0);
rEntry.bDoQuery = bDoThis;
if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] )
@@ -1046,22 +1105,22 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
{
rEntry.pStr->Erase();
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else if ( aStrVal == aStrNotEmpty )
{
rEntry.pStr->Erase();
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else
{
*rEntry.pStr = aStrVal;
rEntry.nVal = 0;
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
}
- USHORT nField = pLbField->GetSelectEntryPos();
+ sal_uInt16 nField = pLbField->GetSelectEntryPos();
rEntry.nField = nField ? (theQueryData.nCol1 +
static_cast<SCCOL>(nField) - 1) : static_cast<SCCOL>(0);
@@ -1083,31 +1142,31 @@ IMPL_LINK( ScFilterDlg, ScrollHdl, ScrollBar*, EMPTYARG )
void ScFilterDlg::SliderMoved()
{
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 nOffset = GetSliderPos();
RefreshEditRow( nOffset);
}
-USHORT ScFilterDlg::GetSliderPos()
+sal_uInt16 ScFilterDlg::GetSliderPos()
{
- return (USHORT) aScrollBar.GetThumbPos();
+ return (sal_uInt16) aScrollBar.GetThumbPos();
}
-void ScFilterDlg::RefreshEditRow( USHORT nOffset )
+void ScFilterDlg::RefreshEditRow( sal_uInt16 nOffset )
{
if (nOffset==0)
aConnLbArr[0]->Hide();
else
aConnLbArr[0]->Show();
- for ( USHORT i=0; i<4; i++ )
+ for ( sal_uInt16 i=0; i<4; i++ )
{
String aValStr;
- USHORT nCondPos = 0;
- USHORT nFieldSelPos = 0;
- USHORT nQE = i+nOffset;
+ sal_uInt16 nCondPos = 0;
+ sal_uInt16 nFieldSelPos = 0;
+ sal_uInt16 nQE = i+nOffset;
ScQueryEntry& rEntry = theQueryData.GetEntry( nQE);
if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] )
{
- nCondPos = (USHORT)rEntry.eOp;
+ nCondPos = (sal_uInt16)rEntry.eOp;
if(rEntry.bDoQuery)
nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
@@ -1137,9 +1196,9 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
aConnLbArr[i+1]->Enable();
else
aConnLbArr[i+1]->Disable();
- USHORT nQENext = nQE+1;
+ sal_uInt16 nQENext = nQE+1;
if(theQueryData.GetEntry(nQENext).bDoQuery || bRefreshExceptQuery[nQENext])
- aConnLbArr[i+1]->SelectEntryPos( (USHORT) theQueryData.GetEntry(nQENext).eConnect );
+ aConnLbArr[i+1]->SelectEntryPos( (sal_uInt16) theQueryData.GetEntry(nQENext).eConnect );
else
aConnLbArr[i+1]->SetNoSelection();
}
@@ -1152,7 +1211,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
aConnLbArr[i]->Disable();
if(rEntry.bDoQuery || bRefreshExceptQuery[nQE])
- aConnLbArr[i]->SelectEntryPos( (USHORT) rEntry.eConnect );
+ aConnLbArr[i]->SelectEntryPos( (sal_uInt16) rEntry.eConnect );
else
aConnLbArr[i]->SetNoSelection();
}
@@ -1183,7 +1242,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
aValueEdArr[i]->SetText( aValStr );
- UpdateValueList( static_cast<USHORT>(i+1) );
+ UpdateValueList( static_cast<sal_uInt16>(i+1) );
}
}
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index d6b331494667..d6f9d28b98ea 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -99,8 +99,8 @@ ScFilterOptionsMgr::ScFilterOptionsMgr(
ScFilterOptionsMgr::~ScFilterOptionsMgr()
{
- USHORT nEntries = rLbCopyPos.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = rLbCopyPos.GetEntryCount();
+ sal_uInt16 i;
for ( i=2; i<nEntries; i++ )
delete (String*)rLbCopyPos.GetEntryData( i );
@@ -162,13 +162,13 @@ void ScFilterOptionsMgr::Init()
String aRefStr;
while ( aIter.Next( aName, aRange ) )
{
- USHORT nInsert = rLbCopyPos.InsertEntry( aName );
+ sal_uInt16 nInsert = rLbCopyPos.InsertEntry( aName );
aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv );
rLbCopyPos.SetEntryData( nInsert, new String( aRefStr ) );
}
- rBtnDestPers.Check( TRUE ); // beim Aufruf immer an
+ rBtnDestPers.Check( sal_True ); // beim Aufruf immer an
rLbCopyPos.SelectEntryPos( 0 );
rEdCopyPos.SetText( EMPTY_STRING );
@@ -215,7 +215,7 @@ void ScFilterOptionsMgr::Init()
rQueryData.nDestTab
).Format( aString, SCA_ABS_3D, pDoc, eConv );
- rBtnCopyResult.Check( TRUE );
+ rBtnCopyResult.Check( sal_True );
rEdCopyPos.SetText( aString );
EdPosModifyHdl( &rEdCopyPos );
rLbCopyPos.Enable();
@@ -225,7 +225,7 @@ void ScFilterOptionsMgr::Init()
}
else
{
- rBtnCopyResult.Check( FALSE );
+ rBtnCopyResult.Check( false );
rEdCopyPos.SetText( EMPTY_STRING );
rLbCopyPos.Disable();
rEdCopyPos.Disable();
@@ -240,7 +240,7 @@ void ScFilterOptionsMgr::Init()
//----------------------------------------------------------------------------
-BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const
+sal_Bool ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const
{
String aPosStr( rPosStr );
xub_StrLen nColonPos = aPosStr.Search( ':' );
@@ -248,7 +248,7 @@ BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const
if ( STRING_NOTFOUND != nColonPos )
aPosStr.Erase( nColonPos );
- USHORT nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() );
return ( SCA_VALID == (nResult & SCA_VALID) );
}
@@ -264,7 +264,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbPosSelHdl, ListBox*, pLb )
if ( pLb == &rLbCopyPos )
{
String aString;
- USHORT nSelPos = rLbCopyPos.GetSelectEntryPos();
+ sal_uInt16 nSelPos = rLbCopyPos.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)rLbCopyPos.GetEntryData( nSelPos );
@@ -283,14 +283,14 @@ IMPL_LINK( ScFilterOptionsMgr, EdPosModifyHdl, Edit*, pEd )
if ( pEd == &rEdCopyPos )
{
String theCurPosStr = pEd->GetText();
- USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = rLbCopyPos.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = rLbCopyPos.GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 641ce7dc6374..56946006ce02 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -45,19 +45,43 @@ static const sal_Char pStrFix[] = "FIX";
ScImportOptions::ScImportOptions( const String& rStr )
{
- bFixedWidth = FALSE;
+ // Use the same string format as ScAsciiOptions,
+ // because the import options string is passed here when a CSV file is loaded and saved again.
+ // The old format is still supported because it might be used in macros.
+
+ bFixedWidth = false;
nFieldSepCode = 0;
- if ( rStr.GetTokenCount(',') >= 3 )
+ nTextSepCode = 0;
+ eCharSet = RTL_TEXTENCODING_DONTKNOW;
+ bSaveAsShown = sal_True; // "true" if not in string (after CSV import)
+ bQuoteAllText = false;
+ xub_StrLen nTokenCount = rStr.GetTokenCount(',');
+ if ( nTokenCount >= 3 )
{
+ // first 3 tokens: common
String aToken( rStr.GetToken( 0, ',' ) );
if( aToken.EqualsIgnoreCaseAscii( pStrFix ) )
- bFixedWidth = TRUE;
+ bFixedWidth = sal_True;
else
nFieldSepCode = (sal_Unicode) aToken.ToInt32();
nTextSepCode = (sal_Unicode) rStr.GetToken(1,',').ToInt32();
aStrFont = rStr.GetToken(2,',');
eCharSet = ScGlobal::GetCharsetValue(aStrFont);
- bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? TRUE : FALSE);
+
+ if ( nTokenCount == 4 )
+ {
+ // compatibility with old options string: "Save as shown" as 4th token, numeric
+ bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : false);
+ bQuoteAllText = sal_True; // use old default then
+ }
+ else
+ {
+ // look at the same positions as in ScAsciiOptions
+ if ( nTokenCount >= 7 )
+ bQuoteAllText = rStr.GetToken(6, ',').EqualsAscii("true");
+ if ( nTokenCount >= 9 )
+ bSaveAsShown = rStr.GetToken(8, ',').EqualsAscii("true");
+ }
}
}
@@ -75,8 +99,11 @@ String ScImportOptions::BuildString() const
aResult += String::CreateFromInt32(nTextSepCode);
aResult += ',';
aResult += aStrFont;
- aResult += ',';
- aResult += String::CreateFromInt32( bSaveAsShown ? 1 : 0 );
+ // use the same string format as ScAsciiOptions:
+ aResult.AppendAscii( ",1,,0," ); // first row, no column info, default language
+ aResult.AppendAscii(bQuoteAllText ? "true" : "false"); // same as "quoted field as text" in ScAsciiOptions
+ aResult.AppendAscii( ",true," ); // "detect special numbers"
+ aResult.AppendAscii(bSaveAsShown ? "true" : "false"); // "save as shown": not in ScAsciiOptions
return aResult;
}
diff --git a/sc/source/ui/dbgui/imoptdlg.src b/sc/source/ui/dbgui/imoptdlg.src
index b63d83210c00..8f6839533851 100644
--- a/sc/source/ui/dbgui/imoptdlg.src
+++ b/sc/source/ui/dbgui/imoptdlg.src
@@ -44,6 +44,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ComboBox ED_FIELDSEP
{
+ HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_FIELDSEP";
Pos = MAP_APPFONT ( 70 , 30 ) ;
Size = MAP_APPFONT ( 121 , 60 ) ;
DropDown = TRUE ;
@@ -56,6 +57,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ComboBox ED_TEXTSEP
{
+ HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_TEXTSEP";
Pos = MAP_APPFONT ( 70 , 46 ) ;
Size = MAP_APPFONT ( 121 , 60 ) ;
DropDown = TRUE ;
@@ -68,6 +70,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ListBox DDLB_FONT
{
+ HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:DDLB_FONT";
Border = TRUE;
Sort = TRUE;
DropDown = TRUE ;
@@ -76,6 +79,7 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
ListBox LB_FONT
{
+ HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:LB_FONT";
Border = TRUE;
Sort = TRUE;
DropDown = FALSE ;
@@ -90,7 +94,8 @@ ModalDialog RID_SCDLG_IMPORTOPT
};
CheckBox CB_FIXEDWIDTH
{
- Pos = MAP_APPFONT( 12, 80 );
+ HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH";
+ Pos = MAP_APPFONT( 12, 92 );
Size = MAP_APPFONT( 172, 10 );
Hide = TRUE;
Text [ en-US ] = "Fixed column ~width";
@@ -103,6 +108,14 @@ ModalDialog RID_SCDLG_IMPORTOPT
Hide = TRUE;
Text [ en-US ] = "Save cell content as ~shown";
};
+ CheckBox CB_QUOTEALL
+ {
+ HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL";
+ Pos = MAP_APPFONT( 20, 64 );
+ Size = MAP_APPFONT( 164, 10 );
+ Hide = TRUE;
+ Text [ en-US ] = "~Quote all text cells";
+ };
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 202 , 6 ) ;
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 55ce7b9499b7..5cdf37116f13 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -106,7 +106,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent,
nSrcTab ( nSourceTab ), // ist nicht im QueryParam
nFieldCount ( 0 )
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
pEntryLists[i] = NULL;
Init( rArgSet );
@@ -117,7 +117,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent,
ScPivotFilterDlg::~ScPivotFilterDlg()
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
delete pEntryLists[i];
if ( pOutItem )
@@ -223,12 +223,12 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
else if (rEntry.nVal == SC_NONEMPTYFIELDS)
aValStr = aStrNotEmpty;
}
- USHORT nCondPos = (USHORT)rEntry.eOp;
- USHORT nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
+ sal_uInt16 nCondPos = (sal_uInt16)rEntry.eOp;
+ sal_uInt16 nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
- UpdateValueList( static_cast<USHORT>(i+1) );
+ UpdateValueList( static_cast<sal_uInt16>(i+1) );
aValueEdArr[i]->SetText( aValStr );
if (aValStr == aStrEmpty || aValStr == aStrNotEmpty)
aCondLbArr[i]->Disable();
@@ -237,7 +237,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
{
aFieldLbArr[i]->SelectEntryPos( 0 ); // "keiner" selektieren
aCondLbArr [i]->SelectEntryPos( 0 ); // "=" selektieren
- UpdateValueList( static_cast<USHORT>(i) );
+ UpdateValueList( static_cast<sal_uInt16>(i) );
aValueEdArr[i]->SetText( EMPTY_STRING );
}
aValueEdArr[i]->SetModifyHdl( LINK( this, ScPivotFilterDlg, ValModifyHdl ) );
@@ -247,12 +247,12 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
(aLbField1.GetSelectEntryPos() != 0)
&& (aLbField2.GetSelectEntryPos() != 0)
- ? aLbConnect1.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect )
+ ? aLbConnect1.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect )
: aLbConnect1.SetNoSelection();
(aLbField2.GetSelectEntryPos() != 0)
&& (aLbField3.GetSelectEntryPos() != 0)
- ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect )
+ ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect )
: aLbConnect2.SetNoSelection();
if ( aLbField1.GetSelectEntryPos() == 0 )
@@ -303,7 +303,7 @@ void ScPivotFilterDlg::FillFieldLists()
SCROW nFirstRow = theQueryData.nRow1;
SCCOL nMaxCol = theQueryData.nCol2;
SCCOL col = 0;
- USHORT i=1;
+ sal_uInt16 i=1;
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
@@ -325,13 +325,13 @@ void ScPivotFilterDlg::FillFieldLists()
//------------------------------------------------------------------------
-void ScPivotFilterDlg::UpdateValueList( USHORT nList )
+void ScPivotFilterDlg::UpdateValueList( sal_uInt16 nList )
{
if ( pDoc && nList>0 && nList<=3 )
{
ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
- USHORT nListPos = 0;
+ sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_uInt16 nListPos = 0;
String aCurValue = pValList->GetText();
pValList->Clear();
@@ -359,10 +359,10 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
}
TypedScStrCollection* pColl = pEntryLists[nColumn];
- USHORT nValueCount = pColl->GetCount();
+ sal_uInt16 nValueCount = pColl->GetCount();
if ( nValueCount > 0 )
{
- for ( USHORT i=0; i<nValueCount; i++ )
+ for ( sal_uInt16 i=0; i<nValueCount; i++ )
{
pValList->InsertEntry( (*pColl)[i]->GetString(), nListPos );
nListPos++;
@@ -375,7 +375,7 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
//------------------------------------------------------------------------
-void ScPivotFilterDlg::ClearValueList( USHORT nList )
+void ScPivotFilterDlg::ClearValueList( sal_uInt16 nList )
{
if ( nList>0 && nList<=3 )
{
@@ -389,10 +389,10 @@ void ScPivotFilterDlg::ClearValueList( USHORT nList )
//------------------------------------------------------------------------
-USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
+sal_uInt16 ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
{
if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
- return static_cast<USHORT>(nField - theQueryData.nCol1 + 1);
+ return static_cast<sal_uInt16>(nField - theQueryData.nCol1 + 1);
else
return 0;
}
@@ -402,15 +402,15 @@ USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
{
ScQueryParam theParam( theQueryData );
- USHORT nConnect1 = aLbConnect1.GetSelectEntryPos();
- USHORT nConnect2 = aLbConnect2.GetSelectEntryPos();
+ sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos();
+ sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos();
for ( SCSIZE i=0; i<3; i++ )
{
- USHORT nField = aFieldLbArr[i]->GetSelectEntryPos();
+ sal_uInt16 nField = aFieldLbArr[i]->GetSelectEntryPos();
ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos();
- BOOL bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0);
+ sal_Bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0);
theParam.GetEntry(i).bDoQuery = bDoThis;
if ( bDoThis )
@@ -428,19 +428,19 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
{
*rEntry.pStr = EMPTY_STRING;
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else if ( aStrVal == aStrNotEmpty )
{
*rEntry.pStr = EMPTY_STRING;
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
}
else
{
*rEntry.pStr = aStrVal;
rEntry.nVal = 0;
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
}
rEntry.nField = nField ? (theQueryData.nCol1 +
@@ -456,7 +456,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
? (ScQueryConnect)nConnect2
: SC_AND;
- theParam.bInplace = FALSE;
+ theParam.bInplace = false;
theParam.nDestTab = 0; // Woher kommen diese Werte?
theParam.nDestCol = 0;
theParam.nDestRow = 0;
@@ -574,7 +574,7 @@ IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox )
if ( pBox == &aBtnCase ) // Wertlisten
{
- for (USHORT i=0; i<=MAXCOL; i++)
+ for (sal_uInt16 i=0; i<=MAXCOL; i++)
DELETEZ( pEntryLists[i] );
String aCurVal1 = aEdVal1.GetText();
diff --git a/sc/source/ui/dbgui/pivot.hrc b/sc/source/ui/dbgui/pivot.hrc
index 883be5e7f4c8..244be15649ec 100644
--- a/sc/source/ui/dbgui/pivot.hrc
+++ b/sc/source/ui/dbgui/pivot.hrc
@@ -34,8 +34,12 @@
#define BTN_OPTIONS 6
#define FL_LAYOUT 10
+#define FL_SELECT 90
+#define SCROLL_COL 91
#define WND_COL 11
+#define SCROLL_ROW 92
#define WND_ROW 12
+#define SCROLL_DATA 93
#define WND_DATA 13
#define WND_SELECT 14
#define WND_PAGE 18
diff --git a/sc/source/ui/dbgui/pivot.src b/sc/source/ui/dbgui/pivot.src
index 514a37153ab0..423c7df6e547 100644
--- a/sc/source/ui/dbgui/pivot.src
+++ b/sc/source/ui/dbgui/pivot.src
@@ -36,7 +36,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
SVLook = TRUE ;
Moveable = TRUE ;
Closeable = FALSE ;
- Text [ en-US ] = "DataPilot" ;
+ Text [ en-US ] = "Pivot Table" ;
FixedText FT_PAGE
{
@@ -44,6 +44,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text[ en-US ] = "Page Fields" ;
};
+ ScrollBar SCROLL_PAGE
+ {
+ Pos = MAP_APPFONT ( 198 , 14 ) ;
+ Size = MAP_APPFONT ( 8 , 24 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_PAGE
{
/* Size is calculated in the dialog code. */
@@ -57,6 +64,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Column Fields" ;
};
+ ScrollBar SCROLL_COL
+ {
+ Pos = MAP_APPFONT ( 198 , 42 ) ;
+ Size = MAP_APPFONT ( 8 , 24 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_COL
{
/* Size is calculated in the dialog code. */
@@ -70,6 +84,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Row\nFields" ;
};
+ ScrollBar SCROLL_ROW
+ {
+ Pos = MAP_APPFONT ( 42 , 70 ) ;
+ Size = MAP_APPFONT ( 8 , 96 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_ROW
{
/* Size is calculated in the dialog code. */
@@ -83,6 +104,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Data Fields" ;
};
+ ScrollBar SCROLL_DATA
+ {
+ Pos = MAP_APPFONT ( 198 , 70 ) ;
+ Size = MAP_APPFONT ( 8 , 96 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
Control WND_DATA
{
/* Size is calculated in the dialog code. */
@@ -114,6 +142,12 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
Size = MAP_APPFONT ( 282 , 8 ) ;
Text [ en-US ] = "Layout";
};
+ FixedLine FL_SELECT
+ {
+ Pos = MAP_APPFONT ( 212 , 3 ) ;
+ Size = MAP_APPFONT ( 74 , 8 ) ;
+ Text [ en-US ] = "Fields";
+ };
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 294 , 6 ) ;
@@ -172,6 +206,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
};
Edit ED_INAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_INAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 73 , 227 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
@@ -196,6 +231,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
};
ListBox LB_OUTAREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOT_LAYOUT:LB_OUTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 73 , 245 ) ;
Size = MAP_APPFONT ( 75 , 90 ) ;
@@ -205,6 +241,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
};
Edit ED_OUTAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_OUTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 152 , 245 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index f0da7090a2a4..403ae802fc1e 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -70,7 +70,7 @@ namespace {
@return true = The passed string list contains an empty string entry.
*/
template< typename ListBoxType >
-bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, USHORT nEmptyPos = LISTBOX_APPEND )
+bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_uInt16 nEmptyPos = LISTBOX_APPEND )
{
bool bEmpty = false;
const OUString* pStr = rStrings.getConstArray();
@@ -91,7 +91,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, U
}
template< typename ListBoxType >
-bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, USHORT nEmptyPos = LISTBOX_APPEND )
+bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND )
{
bool bEmpty = false;
vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
@@ -110,7 +110,7 @@ bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rM
}
/** This table represents the order of the strings in the resource string array. */
-static const USHORT spnFunctions[] =
+static const sal_uInt16 spnFunctions[] =
{
PIVOT_FUNC_SUM,
PIVOT_FUNC_COUNT,
@@ -125,12 +125,12 @@ static const USHORT spnFunctions[] =
PIVOT_FUNC_STD_VARP
};
-const USHORT SC_BASEITEM_PREV_POS = 0;
-const USHORT SC_BASEITEM_NEXT_POS = 1;
-const USHORT SC_BASEITEM_USER_POS = 2;
+const sal_uInt16 SC_BASEITEM_PREV_POS = 0;
+const sal_uInt16 SC_BASEITEM_NEXT_POS = 1;
+const sal_uInt16 SC_BASEITEM_USER_POS = 2;
-const USHORT SC_SORTNAME_POS = 0;
-const USHORT SC_SORTDATA_POS = 1;
+const sal_uInt16 SC_SORTNAME_POS = 0;
+const sal_uInt16 SC_SORTDATA_POS = 1;
const long SC_SHOW_DEFAULT = 10;
@@ -173,19 +173,19 @@ ScDPFunctionListBox::ScDPFunctionListBox( Window* pParent, const ResId& rResId )
FillFunctionNames();
}
-void ScDPFunctionListBox::SetSelection( USHORT nFuncMask )
+void ScDPFunctionListBox::SetSelection( sal_uInt16 nFuncMask )
{
if( (nFuncMask == PIVOT_FUNC_NONE) || (nFuncMask == PIVOT_FUNC_AUTO) )
SetNoSelection();
else
- for( USHORT nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry )
+ for( sal_uInt16 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry )
SelectEntryPos( nEntry, (nFuncMask & spnFunctions[ nEntry ]) != 0 );
}
-USHORT ScDPFunctionListBox::GetSelection() const
+sal_uInt16 ScDPFunctionListBox::GetSelection() const
{
- USHORT nFuncMask = PIVOT_FUNC_NONE;
- for( USHORT nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel )
+ sal_uInt16 nFuncMask = PIVOT_FUNC_NONE;
+ for( sal_uInt16 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel )
nFuncMask |= spnFunctions[ GetSelectEntryPos( nSel ) ];
return nFuncMask;
}
@@ -195,15 +195,15 @@ void ScDPFunctionListBox::FillFunctionNames()
DBG_ASSERT( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" );
Clear();
ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) );
- for( USHORT nIndex = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIndex < nCount; ++nIndex )
+ for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIndex < nCount; ++nIndex )
InsertEntry( aArr.GetString( nIndex ) );
}
// ============================================================================
ScDPFunctionDlg::ScDPFunctionDlg(
- Window* pParent, const ScDPLabelDataVec& rLabelVec,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) :
+ Window* pParent, const ScDPLabelDataVector& rLabelVec,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DPDATAFIELD ) ),
maFlFunc ( this, ScResId( FL_FUNC ) ),
maLbFunc ( this, ScResId( LB_FUNC ) ),
@@ -228,7 +228,7 @@ ScDPFunctionDlg::ScDPFunctionDlg(
Init( rLabelData, rFuncData );
}
-USHORT ScDPFunctionDlg::GetFuncMask() const
+sal_uInt16 ScDPFunctionDlg::GetFuncMask() const
{
return maLbFunc.GetSelection();
}
@@ -240,7 +240,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const
aRef.ReferenceType = maLbTypeWrp.GetControlValue();
aRef.ReferenceField = GetBaseFieldName(maLbBaseField.GetSelectEntry());
- USHORT nBaseItemPos = maLbBaseItem.GetSelectEntryPos();
+ sal_uInt16 nBaseItemPos = maLbBaseItem.GetSelectEntryPos();
switch( nBaseItemPos )
{
case SC_BASEITEM_PREV_POS:
@@ -260,10 +260,10 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const
return aRef;
}
-void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData )
+void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData )
{
// list box
- USHORT nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask;
+ sal_uInt16 nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask;
maLbFunc.SetSelection( nFuncMask );
// field name
@@ -325,8 +325,8 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData&
}
else
{
- USHORT nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS;
- USHORT nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos );
+ sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS;
+ sal_uInt16 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos );
if( nPos >= maLbBaseItem.GetEntryCount() )
nPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
maLbBaseItem.SelectEntryPos( nPos );
@@ -347,7 +347,7 @@ const OUString& ScDPFunctionDlg::GetBaseItemName(const OUString& rLayoutName) co
return itr == maBaseItemNameMap.end() ? rLayoutName : itr->second;
}
-sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, USHORT nStartPos ) const
+sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, sal_uInt16 nStartPos ) const
{
sal_uInt16 nPos = nStartPos;
bool bFound = false;
@@ -417,7 +417,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox )
}
// select base item
- USHORT nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
+ sal_uInt16 nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS;
maLbBaseItem.SelectEntryPos( nItemPos );
}
return 0;
@@ -432,7 +432,7 @@ IMPL_LINK( ScDPFunctionDlg, DblClickHdl, MultiListBox*, EMPTYARG )
// ============================================================================
ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields, bool bEnableLayout ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_PIVOTSUBT ) ),
maFlSubt ( this, ScResId( FL_FUNC ) ),
@@ -456,9 +456,9 @@ ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
Init( rLabelData, rFuncData );
}
-USHORT ScDPSubtotalDlg::GetFuncMask() const
+sal_uInt16 ScDPSubtotalDlg::GetFuncMask() const
{
- USHORT nFuncMask = PIVOT_FUNC_NONE;
+ sal_uInt16 nFuncMask = PIVOT_FUNC_NONE;
if( maRbAuto.IsChecked() )
nFuncMask = PIVOT_FUNC_AUTO;
@@ -479,7 +479,7 @@ void ScDPSubtotalDlg::FillLabelData( ScDPLabelData& rLabelData ) const
rLabelData.maShowInfo = maLabelData.maShowInfo;
}
-void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData )
+void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData )
{
// field name
maFtName.SetText(rLabelData.getDisplayName());
@@ -604,8 +604,8 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const
// *** HIDDEN ITEMS ***
rLabelData.maMembers = maLabelData.maMembers;
- ULONG nVisCount = maLbHide.GetEntryCount();
- for( USHORT nPos = 0; nPos < nVisCount; ++nPos )
+ sal_uLong nVisCount = maLbHide.GetEntryCount();
+ for( sal_uInt16 nPos = 0; nPos < nVisCount; ++nPos )
rLabelData.maMembers[nPos].mbVisible = !maLbHide.IsChecked(nPos);
// *** HIERARCHY ***
@@ -634,7 +634,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou
if( maLbSortBy.GetEntryCount() > SC_SORTDATA_POS )
maLbSortBy.SetSeparatorPos( SC_SORTDATA_POS - 1 );
- USHORT nSortPos = SC_SORTNAME_POS;
+ sal_uInt16 nSortPos = SC_SORTNAME_POS;
if( nSortMode == DataPilotFieldSortMode::DATA )
{
nSortPos = FindListBoxEntry( maLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS );
@@ -704,7 +704,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou
lclFillListBox( maLbHierarchy, maLabelData.maHiers );
sal_Int32 nHier = maLabelData.mnUsedHier;
if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0;
- maLbHierarchy.SelectEntryPos( static_cast< USHORT >( nHier ) );
+ maLbHierarchy.SelectEntryPos( static_cast< sal_uInt16 >( nHier ) );
maLbHierarchy.SetSelectHdl( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) );
}
else
@@ -720,7 +720,7 @@ void ScDPSubtotalOptDlg::InitHideListBox()
lclFillListBox( maLbHide, maLabelData.maMembers );
size_t n = maLabelData.maMembers.size();
for (size_t i = 0; i < n; ++i)
- maLbHide.CheckEntryPos(static_cast<USHORT>(i), !maLabelData.maMembers[i].mbVisible);
+ maLbHide.CheckEntryPos(static_cast<sal_uInt16>(i), !maLabelData.maMembers[i].mbVisible);
bool bEnable = maLbHide.GetEntryCount() > 0;
maFlHide.Enable( bEnable );
maLbHide.Enable( bEnable );
@@ -733,7 +733,7 @@ const OUString& ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) co
}
sal_uInt16 ScDPSubtotalOptDlg::FindListBoxEntry(
- const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) const
+ const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) const
{
sal_uInt16 nPos = nStartPos;
bool bFound = false;
@@ -786,7 +786,7 @@ IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox )
// ============================================================================
-ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient ) :
+ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DPSHOWDETAIL ) ),
maFtDims ( this, ScResId( FT_DIMS ) ),
maLbDims ( this, ScResId( LB_DIMS ) ),
@@ -802,7 +802,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR
long nDimCount = rDPObj.GetDimCount();
for (long nDim=0; nDim<nDimCount; nDim++)
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
sal_Int32 nDimFlags = 0;
String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
@@ -843,7 +843,7 @@ String ScDPShowDetailDlg::GetDimensionName() const
return aSelectedName;
long nDim = itr->second;
- BOOL bIsDataLayout = false;
+ sal_Bool bIsDataLayout = false;
return mrDPObj.GetDimName(nDim, bIsDataLayout);
}
diff --git a/sc/source/ui/dbgui/pvfundlg.src b/sc/source/ui/dbgui/pvfundlg.src
index ed00f6a65fa5..d5203f2a89ac 100644
--- a/sc/source/ui/dbgui/pvfundlg.src
+++ b/sc/source/ui/dbgui/pvfundlg.src
@@ -64,6 +64,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
MultiListBox LB_FUNC
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_DPDATAFIELD:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 140 , 65 ) ;
@@ -96,6 +97,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
ListBox LB_TYPE
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_TYPE";
Pos = MAP_APPFONT( 75, 110 );
Size = MAP_APPFONT( 77, 120 );
TabStop = TRUE;
@@ -122,6 +124,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
ListBox LB_BASEFIELD
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_BASEFIELD";
Pos = MAP_APPFONT( 75, 126 );
Size = MAP_APPFONT( 77, 120 );
TabStop = TRUE;
@@ -136,6 +139,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
ListBox LB_BASEITEM
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_BASEITEM";
Pos = MAP_APPFONT( 75, 142 );
Size = MAP_APPFONT( 77, 120 );
TabStop = TRUE;
@@ -168,6 +172,7 @@ ModalDialog RID_SCDLG_DPDATAFIELD
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_DPDATAFIELD:BTN_MORE";
Pos = MAP_APPFONT ( 164 , 79 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -191,6 +196,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
Hide = TRUE ;
RadioButton RB_NONE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_NONE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~None" ;
@@ -198,6 +204,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
RadioButton RB_AUTO
{
+ HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_AUTO";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~Automatic" ;
@@ -205,6 +212,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
RadioButton RB_USER
{
+ HelpID = "sc:RadioButton:RID_SCDLG_PIVOTSUBT:RB_USER";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~User-defined" ;
@@ -212,6 +220,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
MultiListBox LB_FUNC
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_PIVOTSUBT:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 140 , 65 ) ;
@@ -227,6 +236,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
CheckBox CB_SHOWALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTSUBT:CB_SHOWALL";
Pos = MAP_APPFONT ( 6 , 127 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "Show it~ems without data";
@@ -264,6 +274,7 @@ ModalDialog RID_SCDLG_PIVOTSUBT
};
PushButton BTN_OPTIONS
{
+ HelpID = "sc:PushButton:RID_SCDLG_PIVOTSUBT:BTN_OPTIONS";
Pos = MAP_APPFONT ( 164 , 135 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -290,6 +301,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_SORT_BY
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SORT_BY";
Pos = MAP_APPFONT( 12, 26 );
Size = MAP_APPFONT( 96, 120 );
TabStop = TRUE;
@@ -298,6 +310,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
RadioButton RB_SORT_ASC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_ASC";
Pos = MAP_APPFONT( 114, 14 );
Size = MAP_APPFONT( 84, 10 );
TabStop = TRUE;
@@ -305,6 +318,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
RadioButton RB_SORT_DESC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_DESC";
Pos = MAP_APPFONT( 114, 28 );
Size = MAP_APPFONT( 84, 10 );
TabStop = TRUE;
@@ -312,6 +326,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
RadioButton RB_SORT_MAN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DPSUBTOTAL_OPT:RB_SORT_MAN";
Pos = MAP_APPFONT( 114, 42 );
Size = MAP_APPFONT( 84, 10 );
TabStop = TRUE;
@@ -331,6 +346,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_LAYOUT
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_LAYOUT";
Pos = MAP_APPFONT( 84, 67 );
Size = MAP_APPFONT( 114, 120 );
TabStop = TRUE;
@@ -345,6 +361,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
CheckBox CB_LAYOUT_EMPTY
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DPSUBTOTAL_OPT:CB_LAYOUT_EMPTY";
Pos = MAP_APPFONT( 12, 85 );
Size = MAP_APPFONT( 186, 10 );
TabStop = TRUE;
@@ -358,6 +375,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
CheckBox CB_SHOW
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DPSUBTOTAL_OPT:CB_SHOW";
Pos = MAP_APPFONT( 12, 112 );
Size = MAP_APPFONT( 70, 10 );
TabStop = TRUE;
@@ -365,6 +383,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
NumericField NF_SHOW
{
+ HelpID = "sc:NumericField:RID_SCDLG_DPSUBTOTAL_OPT:NF_SHOW";
Pos = MAP_APPFONT( 84, 110 );
Size = MAP_APPFONT( 30, 12 );
TabStop = TRUE;
@@ -390,6 +409,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_SHOW_FROM
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SHOW_FROM";
Pos = MAP_APPFONT( 84, 126 );
Size = MAP_APPFONT( 114, 50 );
TabStop = TRUE;
@@ -409,6 +429,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_SHOW_USING
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_SHOW_USING";
Pos = MAP_APPFONT( 84, 142 );
Size = MAP_APPFONT( 114, 120 );
TabStop = TRUE;
@@ -436,6 +457,7 @@ ModalDialog RID_SCDLG_DPSUBTOTAL_OPT
};
ListBox LB_HIERARCHY
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSUBTOTAL_OPT:LB_HIERARCHY";
Pos = MAP_APPFONT( 84, 222 );
Size = MAP_APPFONT( 114, 120 );
TabStop = TRUE;
@@ -483,6 +505,7 @@ ModalDialog RID_SCDLG_DPSHOWDETAIL
};
ListBox LB_DIMS
{
+ HelpID = "sc:ListBox:RID_SCDLG_DPSHOWDETAIL:LB_DIMS";
Pos = MAP_APPFONT( 6, 30 );
Size = MAP_APPFONT( 132, 80 );
TabStop = TRUE;
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 71ba04990861..e805ecff55db 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -41,6 +41,11 @@
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortMode.hpp>
+#include <sfx2/dispatch.hxx>
+#include <vcl/mnemonic.hxx>
+#include <vcl/msgbox.hxx>
+
+#include "dbdocfun.hxx"
#include "uiitems.hxx"
#include "rangeutl.hxx"
#include "document.hxx"
@@ -75,15 +80,7 @@ namespace {
PointerStyle lclGetPointerForField( ScDPFieldType eType )
{
- switch( eType )
- {
- case TYPE_PAGE: return POINTER_PIVOT_FIELD;
- case TYPE_COL: return POINTER_PIVOT_COL;
- case TYPE_ROW: return POINTER_PIVOT_ROW;
- case TYPE_DATA: return POINTER_PIVOT_FIELD;
- case TYPE_SELECT: return POINTER_PIVOT_FIELD;
- }
- return POINTER_ARROW;
+ return MnemonicGenerator::EraseAllMnemonicChars( rFixedText.GetText() );
}
} // namespace
@@ -134,7 +131,7 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
aStrNewTable ( ScResId( SCSTR_NEWTABLE ) ),
- bIsDrag ( FALSE ),
+ bIsDrag ( false ),
pEditActive ( NULL ),
@@ -148,8 +145,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
GetViewData()->GetDocument() ),
bRefInputMode (false)
{
- xDlgDPObject->SetAlive( TRUE ); // needed to get structure information
- xDlgDPObject->FillOldParam( thePivotData, FALSE );
+ xDlgDPObject->SetAlive( true ); // needed to get structure information
+ xDlgDPObject->FillOldParam( thePivotData, false );
xDlgDPObject->FillLabelData( thePivotData );
Init(bNewOutput);
@@ -160,8 +157,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
ScDPLayoutDlg::~ScDPLayoutDlg()
{
- USHORT nEntries = aLbOutPos.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = aLbOutPos.GetEntryCount();
+ sal_uInt16 i;
for ( i=2; i<nEntries; i++ )
delete (String*)aLbOutPos.GetEntryData( i );
@@ -178,7 +175,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
aBtnOptions.SetClickHdl( LINK( this, ScDPLayoutDlg, ClickHdl ) );
aFuncNameArr.reserve( PIVOT_MAXFUNC );
- for ( USHORT i = 0; i < PIVOT_MAXFUNC; ++i )
+ for ( sal_uInt16 i = 0; i < PIVOT_MAXFUNC; ++i )
aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
aBtnMore.AddWindow( &aFlAreas );
@@ -218,12 +215,17 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
}
else
{
- /* Data is not reachable, so could be a remote database */
- aEdInPos.Disable();
- aRbInPos.Disable();
+ // data is not reachable, so could be a remote database
+ maEdInPos.Disable();
+ maRbInPos.Disable();
}
- InitFields();
+ // #i29203# align right border of page window with data window
+ long nPagePosX = maWndData.GetPosPixel().X() + maWndData.GetSizePixel().Width() - maWndPage.GetSizePixel().Width();
+ maWndPage.SetPosPixel( Point( nPagePosX, maWndPage.GetPosPixel().Y() ) );
+ maScrPage.SetPosPixel( Point( maScrData.GetPosPixel().X(), maScrPage.GetPosPixel().Y() ) );
+
+ InitFieldWindows();
aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
@@ -236,7 +238,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
aEdInPos.SetGetFocusHdl( aLink );
aEdOutPos.SetGetFocusHdl( aLink );
- if ( pViewData && pDoc )
+ if( mpViewData && mpDoc )
{
/*
* Aus den RangeNames des Dokumentes werden nun die
@@ -244,11 +246,11 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
* um sinnvolle Bereiche handelt
*/
- aLbOutPos.Clear();
- aLbOutPos.InsertEntry( aStrUndefined, 0 );
- aLbOutPos.InsertEntry( aStrNewTable, 1 );
+ maLbOutPos.Clear();
+ maLbOutPos.InsertEntry( String( ScResId( SCSTR_UNDEFINED ) ), 0 );
+ maLbOutPos.InsertEntry( String( ScResId( SCSTR_NEWTABLE ) ), 1 );
- ScAreaNameIterator aIter( pDoc );
+ ScAreaNameIterator aIter( mpDoc );
String aName;
ScRange aRange;
String aRefStr;
@@ -256,10 +258,10 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
{
if ( !aIter.WasDBName() ) // hier keine DB-Bereiche !
{
- USHORT nInsert = aLbOutPos.InsertEntry( aName );
+ sal_uInt16 nInsert = maLbOutPos.InsertEntry( aName );
- aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, pDoc->GetAddressConvention() );
- aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
+ aRange.aStart.Format( aRefStr, SCA_ABS_3D, mpDoc, mpDoc->GetAddressConvention() );
+ maLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
}
}
}
@@ -318,14 +320,12 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
//----------------------------------------------------------------------------
-BOOL ScDPLayoutDlg::Close()
+sal_Bool ScDPLayoutDlg::Close()
{
return DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::StateChanged( StateChangedType nStateChange )
+ScPivotLayoutDlg::~ScPivotLayoutDlg()
{
ScAnyRefDlg::StateChanged( nStateChange );
@@ -344,9 +344,7 @@ void ScDPLayoutDlg::StateChanged( StateChangedType nStateChange )
}
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::InitWndSelect( const vector<ScDPLabelDataRef>& rLabels )
+ScDPLabelData* ScPivotLayoutDlg::GetLabelData( SCCOL nCol, size_t* pnIndex )
{
size_t nLabelCount = rLabels.size();
if (nLabelCount > MAX_LABELS)
@@ -379,7 +377,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
for (; itr != itrEnd; ++itr)
{
SCCOL nCol = itr->nCol;
- USHORT nMask = itr->nFuncMask;
+ sal_uInt16 nMask = itr->nFuncMask;
if (nCol == PIVOT_DATA_FIELD)
continue;
@@ -397,7 +395,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
OUString aStr = pData->maLayoutName;
if (!aStr.getLength())
{
- USHORT nInitMask = pInitArr->back()->mnFuncMask;
+ sal_uInt16 nInitMask = pInitArr->back()->mnFuncMask;
aStr = GetFuncString(nInitMask, pData->mbIsValue);
aStr += pData->maName;
}
@@ -414,18 +412,16 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
//----------------------------------------------------------------------------
-void ScDPLayoutDlg::InitFocus()
+void ScPivotLayoutDlg::NotifyStartTracking( ScPivotFieldWindow& rSourceWindow )
{
- if( aWndSelect.IsEmpty() )
- {
- aBtnOk.GrabFocus();
- NotifyFieldFocus( TYPE_SELECT, FALSE );
- }
- else
- aWndSelect.GrabFocus();
+ mpTrackingWindow = &rSourceWindow;
+ mpDropWindow = 0;
+ rSourceWindow.NotifyStartTracking();
+ StartTracking( STARTTRACK_BUTTONREPEAT );
+ SetPointer( Pointer( rSourceWindow.GetDropPointerStyle() ) );
}
-void ScDPLayoutDlg::InitFields()
+void ScPivotLayoutDlg::NotifyDoubleClick( ScPivotFieldWindow& rSourceWindow )
{
InitWndSelect(thePivotData.maLabelArray);
InitFieldWindow(thePivotData.maPageFields, TYPE_PAGE);
@@ -434,7 +430,10 @@ void ScDPLayoutDlg::InitFields()
InitFieldWindow(thePivotData.maDataFields, TYPE_DATA);
}
-//----------------------------------------------------------------------------
+ ScDPLabelData* pLabelData = GetLabelData( pFuncData->mnCol );
+ DBG_ASSERT( pLabelData, "ScPivotLayoutDlg::NotifyDoubleClick - missing label data" );
+ if( !pLabelData )
+ return;
void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Point& rAtPos )
{
@@ -455,42 +454,19 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
if ( bAllowed && (!Contains( toArr, fData.mnCol, nAt )) )
{
- // ggF. in anderem Fenster entfernen
- if ( rmArr1 )
- {
- if ( Contains( rmArr1, fData.mnCol, nAt ) )
- {
- rmWnd1->DelField( nAt );
- Remove( rmArr1, nAt );
- }
- }
- if ( rmArr2 )
- {
- if ( Contains( rmArr2, fData.mnCol, nAt ) )
- {
- rmWnd2->DelField( nAt );
- Remove( rmArr2, nAt );
- }
- }
-
- ScDPLabelData& rData = aLabelDataArr[nFromIndex+nOffset];
- size_t nAddedAt = 0;
-
- if ( !bDataArr )
- {
- if ( toWnd->AddField( rData.getDisplayName(),
- DlgPos2WndPos( rAtPos, *toWnd ),
- nAddedAt ) )
- {
- Insert( toArr, fData, nAddedAt );
- toWnd->GrabFocus();
- }
- }
- else
+ // list of plain names of all data fields
+ ScDPNameVec aDataFieldNames;
+ maWndData.WriteFieldNames( aDataFieldNames );
+ // allow to modify layout options for row fields, if multiple data fields exist, or if it is not the last row field
+ bool bLayout = (rSourceWindow.GetType() == PIVOTFIELDTYPE_ROW) && ((aDataFieldNames.size() > 1) || (rSourceWindow.GetSelectedIndex() + 1 < rSourceWindow.GetFieldCount()));
+
+ ::std::auto_ptr< AbstractScDPSubtotalDlg > xDlg( pFactory->CreateScDPSubtotalDlg(
+ this, RID_SCDLG_PIVOTSUBT, *mxDlgDPObject, *pLabelData, *pFuncData, aDataFieldNames, bLayout ) );
+ if( xDlg->Execute() == RET_OK )
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -506,7 +482,6 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
toWnd->GrabFocus();
}
}
-
}
}
@@ -562,7 +537,7 @@ void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
{
ScDPLabelData* p = GetLabelData(aFuncData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = aFuncData.mnFuncMask;
+ sal_uInt16 nMask = aFuncData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -649,7 +624,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -669,13 +644,17 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
}
}
}
- else // -> eFromType == eToType
+ if( mpDropWindow )
+ mpDropWindow->NotifyTracking( rDialogPos - pTargetWindow->GetPosPixel() );
+
+ // end tracking: move or remove field
+ if( rTEvt.IsTrackingEnded() )
{
ScDPFieldControlBase* theWnd = GetFieldWindow(eFromType);
ScDPFuncDataVec* theArr = GetFieldDataArray(eFromType);
size_t nAt = 0;
Point aToPos;
- BOOL bDataArr = eFromType == TYPE_DATA;
+ sal_Bool bDataArr = eFromType == TYPE_DATA;
ScDPFuncData fData( *((*theArr)[nFromIndex]) );
@@ -705,7 +684,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -790,7 +769,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -814,7 +793,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
ScDPFuncDataVec* theArr = GetFieldDataArray(eFromType);
size_t nAt = 0;
Point aToPos;
- BOOL bDataArr = eFromType == TYPE_DATA;
+ sal_Bool bDataArr = eFromType == TYPE_DATA;
ScDPFuncData fData( *((*theArr)[nFromIndex]) );
@@ -841,7 +820,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
{
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
- USHORT nMask = fData.mnFuncMask;
+ sal_uInt16 nMask = fData.mnFuncMask;
if (!aStr.getLength())
{
aStr = GetFuncString(nMask);
@@ -856,12 +835,15 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
}
}
}
+ eTargetPointer = POINTER_ARROW;
+ if( mpTrackingWindow != mpDropWindow )
+ mpTrackingWindow->NotifyEndTracking( ENDTRACKING_CANCEL );
+ mpTrackingWindow = mpDropWindow = 0;
}
+ SetPointer( eTargetPointer );
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
+void ScPivotLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
{
ScDPFuncDataVec* pArr = GetFieldDataArray(eFromType);
@@ -877,13 +859,11 @@ void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
}
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
+sal_Bool ScPivotLayoutDlg::IsRefInputMode() const
{
if ( bIsDrag )
{
- bIsDrag = FALSE;
+ bIsDrag = false;
ScDPFieldType eDnDToType = TYPE_SELECT;
Point aPos = ScreenToOutputPixel( rAt );
@@ -927,59 +907,29 @@ void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt )
{
- PointerStyle ePtr = POINTER_ARROW;
-
- if ( bIsDrag )
+ if( mbRefInputMode )
{
- Point aPos = ScreenToOutputPixel( rAt );
- ScDPFieldType eCheckTarget = TYPE_SELECT;
+ if( mpActiveEdit )
+ mpActiveEdit->GrabFocus();
- if ( aRectPage.IsInside( aPos ) )
- eCheckTarget = TYPE_PAGE;
- else if ( aRectCol.IsInside( aPos ) )
- eCheckTarget = TYPE_COL;
- else if ( aRectRow.IsInside( aPos ) )
- eCheckTarget = TYPE_ROW;
- else if ( aRectData.IsInside( aPos ) )
- eCheckTarget = TYPE_DATA;
- else if ( eDnDFromType != TYPE_SELECT )
- ePtr = POINTER_PIVOT_DELETE;
- else if ( aRectSelect.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_SELECT );
- else
- ePtr = POINTER_NOTALLOWED;
-
- if ( eCheckTarget != TYPE_SELECT )
- {
- // check if the target orientation is allowed for this field
- ScDPFuncDataVec* fromArr = NULL;
- switch ( eDnDFromType )
- {
- case TYPE_PAGE: fromArr = &aPageArr; break;
- case TYPE_COL: fromArr = &aColArr; break;
- case TYPE_ROW: fromArr = &aRowArr; break;
- case TYPE_DATA: fromArr = &aDataArr; break;
- case TYPE_SELECT: fromArr = &aSelectArr; break;
- }
- ScDPFuncData fData( *((*fromArr)[nDnDFromIndex]) );
- if (IsOrientationAllowed( fData.mnCol, eCheckTarget ))
- ePtr = lclGetPointerForField( eCheckTarget );
- else
- ePtr = POINTER_NOTALLOWED;
- }
+ if( mpActiveEdit == &maEdInPos )
+ EdInModifyHdl( 0 );
+ else if( mpActiveEdit == &maEdOutPos )
+ EdOutModifyHdl( 0 );
+ }
+ else
+ {
+ GrabFocus();
}
- return ePtr;
+ RefInputDone();
}
//----------------------------------------------------------------------------
PointerStyle ScDPLayoutDlg::NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex )
{
- bIsDrag = TRUE;
- eDnDFromType = eType;
- nDnDFromIndex = nFieldIndex;
- return lclGetPointerForField( eType );
+ return DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
}
//----------------------------------------------------------------------------
@@ -988,9 +938,14 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
{
ScDPFuncDataVec* pArr = GetFieldDataArray(eType);
- if ( pArr )
+bool ScPivotLayoutDlg::IsInsertAllowed( const ScPivotFieldWindow& rSourceWindow, const ScPivotFieldWindow& rTargetWindow )
+{
+ if( rTargetWindow.GetType() != PIVOTFIELDTYPE_SELECT )
{
- if ( nFieldIndex >= pArr->size() )
+ const ScPivotFuncData* pSourceData = rSourceWindow.GetSelectedFuncData();
+ ScDPLabelData* pLabelData = pSourceData ? GetLabelData( pSourceData->mnCol ) : 0;
+ DBG_ASSERT( pLabelData, "ScPivotLayoutDlg::IsInsertAllowed - label data not found" );
+ if( pLabelData )
{
OSL_FAIL("invalid selection");
return;
@@ -1024,7 +979,7 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
if (!aLayoutName.getLength())
{
// No layout name exists. Use the stock name.
- USHORT nMask = (*aIt)->mnFuncMask;
+ sal_uInt16 nMask = (*aIt)->mnFuncMask;
OUString aFuncStr = GetFuncString(nMask);
aLayoutName = aFuncStr + pDFData->maName;
}
@@ -1077,25 +1032,25 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
// added to avoid warnings
}
}
+ return ScDPObject::IsOrientationAllowed( static_cast< sal_uInt16 >( eOrient ), pLabelData->mnFlags );
}
}
+ return false;
}
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bGotFocus )
+void ScPivotLayoutDlg::InitFieldWindows()
{
/* Enable Remove/Options buttons on GetFocus in field window.
Enable them also, if dialog is deactivated (click into document).
The !IsActive() condition handles the case that a LoseFocus event of a
field window would follow the Deactivate event of this dialog. */
- BOOL bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT);
+ sal_Bool bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT);
// The TestTool may set the focus into an empty field.
// Then the Remove/Options buttons must be disabled.
ScDPFieldControlBase* pWnd = GetFieldWindow(eType);
if ( bEnable && bGotFocus && pWnd && pWnd->IsEmpty() )
- bEnable = FALSE;
+ bEnable = false;
aBtnRemove.Enable( bEnable );
aBtnOptions.Enable( bEnable );
@@ -1114,22 +1069,14 @@ void ScDPLayoutDlg::NotifyMoveFieldToEnd( ScDPFieldType eToType )
MoveFieldToEnd(eLastActiveType, pWnd->GetSelectedField(), eToType);
if( pWnd->IsEmpty() )
- NotifyFieldFocus( eToType, TRUE );
+ NotifyFieldFocus( eToType, true );
else
pWnd->GrabFocus();
if( eLastActiveType == TYPE_SELECT )
aWndSelect.SelectNext();
}
else
- InitFocus();
-}
-
-//----------------------------------------------------------------------------
-
-void ScDPLayoutDlg::NotifyRemoveField( ScDPFieldType eType, size_t nFieldIndex )
-{
- if( eType != TYPE_SELECT )
- RemoveField( eType, nFieldIndex );
+ rFieldWindow.GrabFocus();
}
void ScDPLayoutDlg::Deactivate()
@@ -1138,15 +1085,15 @@ void ScDPLayoutDlg::Deactivate()
event from field window disables Remove/Options buttons. Re-enable them here by
simulating a GetFocus event. Event order of LoseFocus and Deactivate is not important.
The last event will enable the buttons in both cases (see NotifyFieldFocus). */
- NotifyFieldFocus( eLastActiveType, TRUE );
+ NotifyFieldFocus( eLastActiveType, true );
}
//----------------------------------------------------------------------------
-BOOL ScDPLayoutDlg::Contains( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt )
+bool ScPivotLayoutDlg::MoveField( ScPivotFieldWindow& rSourceWindow, ScPivotFieldWindow& rTargetWindow, size_t nInsertIndex, bool bMoveExisting )
{
if (!pArr || pArr->empty())
- return FALSE;
+ return false;
ScDPFuncDataVec::const_iterator itr, itrBeg = pArr->begin(), itrEnd = pArr->end();
for (itr = itrBeg; itr != itrEnd; ++itr)
@@ -1187,72 +1134,40 @@ void ScDPLayoutDlg::Insert( ScDPFuncDataVec* pArr, const ScDPFuncData& rFData, s
//----------------------------------------------------------------------------
-ScDPLabelData* ScDPLayoutDlg::GetLabelData( SCsCOL nCol, size_t* pnPos )
-{
- ScDPLabelData* pData = 0;
- for( ScDPLabelDataVec::iterator aIt = aLabelDataArr.begin(), aEnd = aLabelDataArr.end(); !pData && (aIt != aEnd); ++aIt )
- {
- if( aIt->mnCol == nCol )
- {
- pData = &*aIt;
- if( pnPos ) *pnPos = aIt - aLabelDataArr.begin();
- }
+ return true;
}
return pData;
}
//----------------------------------------------------------------------------
-String ScDPLayoutDlg::GetLabelString( SCsCOL nCol )
-{
- ScDPLabelData* pData = GetLabelData( nCol );
- DBG_ASSERT( pData, "LabelData not found" );
- if (pData)
- return pData->getDisplayName();
- return String();
-}
-
-//----------------------------------------------------------------------------
-
-bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType )
-{
- bool bAllowed = true;
- ScDPLabelData* pData = GetLabelData( nCol );
- DBG_ASSERT( pData, "LabelData not found" );
- if (pData)
- {
- sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation_HIDDEN;
- switch (eType)
- {
- case TYPE_PAGE: eOrient = sheet::DataPilotFieldOrientation_PAGE; break;
- case TYPE_COL: eOrient = sheet::DataPilotFieldOrientation_COLUMN; break;
- case TYPE_ROW: eOrient = sheet::DataPilotFieldOrientation_ROW; break;
- case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break;
- case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break;
- }
- bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags );
- }
- return bAllowed;
+ return false;
}
-//----------------------------------------------------------------------------
+// handlers -------------------------------------------------------------------
-String ScDPLayoutDlg::GetFuncString( USHORT& rFuncMask, BOOL bIsValue )
+IMPL_LINK( ScPivotLayoutDlg, ClickHdl, PushButton *, pBtn )
{
- String aStr;
-
- if ( rFuncMask == PIVOT_FUNC_NONE
- || rFuncMask == PIVOT_FUNC_AUTO )
+ if( mpFocusWindow )
{
- if ( bIsValue )
+ /* Raising sub dialogs (from the NotifyDoubleClick function) triggers
+ VCL child window focus events from this sub dialog which may
+ invalidate the member mpFocusWindow pointing to the target field
+ window. This would cause a crash with the following call to the
+ GrabFieldFocus function, if mpFocusWindow is used directly. */
+ ScPivotFieldWindow& rTargetWindow = *mpFocusWindow;
+
+ if( pBtn == &maBtnRemove )
{
- aStr = FSTR(PIVOTSTR_SUM);
- rFuncMask = PIVOT_FUNC_SUM;
+ rTargetWindow.RemoveSelectedField();
+ // focus back to field window
+ GrabFieldFocus( rTargetWindow );
}
- else
+ else if( pBtn == &maBtnOptions )
{
- aStr = FSTR(PIVOTSTR_COUNT);
- rFuncMask = PIVOT_FUNC_COUNT;
+ NotifyDoubleClick( rTargetWindow );
+ // focus back to field window
+ GrabFieldFocus( rTargetWindow );
}
}
else if ( rFuncMask == PIVOT_FUNC_SUM ) aStr = FSTR(PIVOTSTR_SUM);
@@ -1382,10 +1297,10 @@ bool ScDPLayoutDlg::GetPivotArrays(
return true;
}
-void ScDPLayoutDlg::UpdateSrcRange()
+IMPL_LINK( ScPivotLayoutDlg, OkHdl, OKButton *, EMPTYARG )
{
String aSrcStr = aEdInPos.GetText();
- USHORT nResult = ScRange().Parse(aSrcStr, pDoc, pDoc->GetAddressConvention());
+ sal_uInt16 nResult = ScRange().Parse(aSrcStr, pDoc, pDoc->GetAddressConvention());
DataSrcType eSrcType = SRC_INVALID;
ScRange aNewRange;
@@ -1450,7 +1365,7 @@ void ScDPLayoutDlg::UpdateSrcRange()
}
xDlgDPObject->SetSheetDesc(inSheet);
- xDlgDPObject->FillOldParam( thePivotData, FALSE );
+ xDlgDPObject->FillOldParam( thePivotData, false );
xDlgDPObject->FillLabelData(thePivotData);
aLabelDataArr.clear();
@@ -1568,27 +1483,17 @@ void ScDPLayoutDlg::GetOtherDataArrays(
//----------------------------------------------------------------------------
-void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
-{
- if ( !bRefInputMode || !pEditActive )
- return;
+ ScDPSaveData* pOldSaveData = mxDlgDPObject->GetSaveData();
- if ( rRef.aStart != rRef.aEnd )
- RefInputStart( pEditActive );
+ ScRange aOutRange( aAdrDest ); // bToNewTable is passed separately
- if ( pEditActive == &aEdInPos )
- {
- String aRefStr;
- rRef.Format( aRefStr, SCR_ABS_3D, pDocP, pDocP->GetAddressConvention() );
- pEditActive->SetRefString( aRefStr );
- }
- else if ( pEditActive == &aEdOutPos )
- {
- String aRefStr;
- rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
- pEditActive->SetRefString( aRefStr );
- }
-}
+ ScDPSaveData aSaveData;
+ aSaveData.SetIgnoreEmptyRows( maBtnIgnEmptyRows.IsChecked() );
+ aSaveData.SetRepeatIfEmpty( maBtnDetectCat.IsChecked() );
+ aSaveData.SetColumnGrand( maBtnTotalCol.IsChecked() );
+ aSaveData.SetRowGrand( maBtnTotalRow.IsChecked() );
+ aSaveData.SetFilterButton( maBtnFilter.IsChecked() );
+ aSaveData.SetDrillDown( maBtnDrillDown.IsChecked() );
//----------------------------------------------------------------------------
@@ -1641,8 +1546,8 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
{
String aOutPosStr( aEdOutPos.GetText() );
ScAddress aAdrDest;
- BOOL bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1);
- USHORT nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0;
+ sal_Bool bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1);
+ sal_uInt16 nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0;
if (!bToNewTable && (aOutPosStr.Len() == 0 || (nResult & SCA_VALID) != SCA_VALID))
{
@@ -1720,6 +1625,7 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
pDim->SetSubtotalName(*pSubtotalName);
}
}
+ }
bool bManualSort = ( aIt->maSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL );
@@ -1762,12 +1668,12 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
}
}
- USHORT nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE );
+ sal_uInt16 nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE );
ScPivotItem aOutItem( nWhichPivot, &aSaveData, &aOutRange, bToNewTable );
- bRefInputMode = FALSE; // to allow deselecting when switching sheets
+ bRefInputMode = false; // to allow deselecting when switching sheets
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
@@ -1811,29 +1717,25 @@ IMPL_LINK( ScDPLayoutDlg, CancelHdl, CancelButton *, EMPTYARG )
IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG )
{
- if ( aBtnMore.GetState() )
+ if ( maBtnMore.GetState() )
{
- bRefInputMode = TRUE;
- //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Enable();
- if ( aEdInPos.IsEnabled() )
+ mbRefInputMode = true;
+ if ( maEdInPos.IsEnabled() )
{
- aEdInPos.Enable();
- aEdInPos.GrabFocus();
- aEdInPos.Enable();
+ maEdInPos.Enable();
+ maEdInPos.GrabFocus();
+ maEdInPos.Enable();
}
else
{
- aEdOutPos.Enable();
- aEdOutPos.GrabFocus();
- aEdOutPos.Enable();
+ maEdOutPos.Enable();
+ maEdOutPos.GrabFocus();
+ maEdOutPos.Enable();
}
}
else
{
- bRefInputMode = FALSE;
- //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ mbRefInputMode = false;
}
return 0;
}
@@ -1842,59 +1744,73 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG )
IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, Edit *, EMPTYARG )
{
- String theCurPosStr = aEdOutPos.GetText();
- USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ String theCurPosStr = maEdOutPos.GetText();
+ sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, mpDoc, mpDoc->GetAddressConvention() );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
- String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbOutPos.GetEntryCount();
+ String* pStr = 0;
+ bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = maLbOutPos.GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
- pStr = (String*)aLbOutPos.GetEntryData( i );
+ pStr = (String*)maLbOutPos.GetEntryData( i );
bFound = (theCurPosStr == *pStr);
}
if ( bFound )
- aLbOutPos.SelectEntryPos( --i );
+ maLbOutPos.SelectEntryPos( --i );
else
- aLbOutPos.SelectEntryPos( 0 );
+ maLbOutPos.SelectEntryPos( 0 );
}
return 0;
}
IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG )
{
- UpdateSrcRange();
- return 0;
-}
+ String theCurPosStr = maEdInPos.GetText();
+ sal_uInt16 nResult = ScRange().Parse( theCurPosStr, mpDoc, mpDoc->GetAddressConvention() );
//----------------------------------------------------------------------------
-IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
-{
- String aString;
- USHORT nSelPos = aLbOutPos.GetSelectEntryPos();
+ // new range is identical to the current range
+ if( inSheet.aSourceRange == aNewRange )
+ return 0;
- if ( nSelPos > 1 )
- {
- aString = *(String*)aLbOutPos.GetEntryData( nSelPos );
- }
- else if ( nSelPos == aLbOutPos.GetEntryCount()-1 ) // auf neue Tabelle?
+ ScTabViewShell* pTabViewShell = mpViewData->GetViewShell();
+ inSheet.aSourceRange = aNewRange;
+ mxDlgDPObject->SetSheetDesc( inSheet );
+ mxDlgDPObject->FillOldParam( maPivotData );
+ mxDlgDPObject->FillLabelData( maPivotData );
+
+ // SetDialogDPObject does not take ownership but makes a copy internally
+ pTabViewShell->SetDialogDPObject( mxDlgDPObject.get() );
+
+ // re-initialize the field windows from the new data
+ InitFieldWindows();
+
+ return 0;
+}
+
+IMPL_LINK( ScPivotLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
+{
+ String aString;
+ sal_uInt16 nSelPos = maLbOutPos.GetSelectEntryPos();
+ if( nSelPos > 1 )
{
- aEdOutPos.Disable();
- aRbOutPos.Disable();
+ aString = *(String*)maLbOutPos.GetEntryData( nSelPos );
}
else
{
- aEdOutPos.Enable();
- aRbOutPos.Enable();
+ // do not allow to specify output position, if target is "new sheet"
+ bool bNewSheet = nSelPos == 1;
+ maEdOutPos.Enable( !bNewSheet );
+ maRbOutPos.Enable( !bNewSheet );
}
- aEdOutPos.SetText( aString );
+ maEdOutPos.SetText( aString );
return 0;
}
@@ -1906,6 +1822,8 @@ IMPL_LINK( ScDPLayoutDlg, GetFocusHdl, Control*, pCtrl )
else if ( pCtrl == &aEdOutPos )
pEditActive = &aEdOutPos;
+ mpActiveEdit = dynamic_cast< ::formula::RefEdit* >( pEvent->GetWindow() );
+ }
return 0;
}
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 4f0207fd948d..466642b8e087 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -52,7 +52,7 @@
//========================================================================
-ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit, BOOL bSheetProtected)
+ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit, sal_Bool bSheetProtected)
: ModalDialog ( pParent, ScResId( RID_SCDLG_NEWSCENARIO ) ),
aFlName ( this, ScResId( FL_NAME )),
@@ -86,14 +86,14 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
XColorTable* pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
if (pColorTable)
{
- aLbColor.SetUpdateMode( FALSE );
+ aLbColor.SetUpdateMode( false );
long nCount = pColorTable->Count();
for ( long n=0; n<nCount; n++ )
{
XColorEntry* pEntry = pColorTable->GetColor(n);
aLbColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- aLbColor.SetUpdateMode( TRUE );
+ aLbColor.SetUpdateMode( sal_True );
}
}
}
@@ -118,31 +118,36 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
aBtnOk .SetClickHdl( LINK( this, ScNewScenarioDlg, OkHdl ) );
aCbShowFrame.SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) );
+ aLbColor.SetAccessibleName(String(ScResId( STR_COLOR ) ));
+
FreeResource();
aLbColor.SelectEntry( Color( COL_LIGHTGRAY ) );
- aCbShowFrame.Check(TRUE);
- //aCbPrintFrame.Check(TRUE);
- aCbTwoWay.Check(TRUE);
- //aCbAttrib.Check(FALSE);
- //aCbValue.Check(FALSE);
- aCbCopyAll.Check(FALSE);
- aCbProtect.Check(TRUE);
+ aCbShowFrame.Check(sal_True);
+ //aCbPrintFrame.Check(sal_True);
+ aCbTwoWay.Check(sal_True);
+ //aCbAttrib.Check(sal_False);
+ //aCbValue.Check(sal_False);
+ aCbCopyAll.Check(false);
+ aCbProtect.Check(sal_True);
if (bIsEdit)
- aCbCopyAll.Enable(FALSE);
+ aCbCopyAll.Enable(false);
// If the Sheet is protected then we disable the Scenario Protect input
// and default it to true above. Note we are in 'Add' mode here as: if
// Sheet && scenario protection are true, then we cannot edit this dialog.
if (bSheetProtected)
- aCbProtect.Enable(FALSE);
+ aCbProtect.Enable(false);
//! die drei funktionieren noch nicht...
/*
- aCbPrintFrame.Enable(FALSE);
- aCbAttrib.Enable(FALSE);
- aCbValue.Enable(FALSE);
+ aCbPrintFrame.Enable(sal_False);
+ aCbAttrib.Enable(sal_False);
+ aCbValue.Enable(sal_False);
*/
+
+ aEdComment.SetAccessibleRelationMemberOf(&aFlComment);
+ aLbColor.SetAccessibleRelationLabeledBy(&aCbShowFrame);
}
//------------------------------------------------------------------------
@@ -154,7 +159,7 @@ ScNewScenarioDlg::~ScNewScenarioDlg()
//------------------------------------------------------------------------
void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const
+ Color& rColor, sal_uInt16& rFlags ) const
{
rComment = aEdComment.GetText();
rName = aEdName.GetText();
@@ -163,7 +168,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
rName = aDefScenarioName;
rColor = aLbColor.GetSelectEntryColor();
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
if (aCbShowFrame.IsChecked())
nBits |= SC_SCENARIO_SHOWFRAME;
/*
@@ -186,7 +191,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
}
void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
aEdComment.SetText(rComment);
aEdName.SetText(rName);
diff --git a/sc/source/ui/dbgui/scendlg.hrc b/sc/source/ui/dbgui/scendlg.hrc
index 8fbf9a2d5b54..92f16e01d362 100644
--- a/sc/source/ui/dbgui/scendlg.hrc
+++ b/sc/source/ui/dbgui/scendlg.hrc
@@ -55,3 +55,6 @@
#define STR_CREATEDBY 31
#define STR_ON 32
#define STR_EDIT 33
+//IAccessibility2 Implementation 2009-----
+#define STR_COLOR 34
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/dbgui/scendlg.src b/sc/source/ui/dbgui/scendlg.src
index 1ca084b28e11..17f55fcc274d 100644
--- a/sc/source/ui/dbgui/scendlg.src
+++ b/sc/source/ui/dbgui/scendlg.src
@@ -29,6 +29,7 @@
#include "scendlg.hrc"
ModalDialog RID_SCDLG_NEWSCENARIO
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_NEWSCENARIO";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 165 ) ;
@@ -55,6 +56,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
MultiLineEdit ED_COMMENT
{
+ HelpID = "sc:MultiLineEdit:RID_SCDLG_NEWSCENARIO:ED_COMMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 183 , 46 ) ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
Edit ED_NAME
{
+ HelpID = "sc:Edit:RID_SCDLG_NEWSCENARIO:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 183 , 12 ) ;
@@ -72,12 +75,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_SHOWFRAME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_SHOWFRAME";
Pos = MAP_APPFONT ( 12 , 107 ) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Text [ en-US ] = "~Display border";
};
ListBox LB_COLOR
{
+ HelpID = "sc:ListBox:RID_SCDLG_NEWSCENARIO:LB_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 125 , 105 ) ;
Size = MAP_APPFONT ( 70 , 86 ) ;
@@ -86,6 +91,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_PRINTFRAME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_PRINTFRAME";
Hide = TRUE ;
Pos = MAP_APPFONT ( 121 , 243 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
@@ -93,12 +99,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_TWOWAY
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_TWOWAY";
Pos = MAP_APPFONT ( 12 , 121 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "Copy ~back" ;
};
CheckBox CB_ATTRIB
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_ATTRIB";
Hide = TRUE ;
Pos = MAP_APPFONT ( 20 , 243 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
@@ -106,6 +114,7 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_VALUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_VALUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 230 , 243 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
@@ -113,12 +122,14 @@ ModalDialog RID_SCDLG_NEWSCENARIO
};
CheckBox CB_COPYALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_COPYALL";
Pos = MAP_APPFONT ( 12 , 135 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "Copy ~entire sheet" ;
};
CheckBox CB_PROTECT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NEWSCENARIO:CB_PROTECT";
Pos = MAP_APPFONT ( 12 , 149 ) ;
Size = MAP_APPFONT ( 183 , 10 ) ;
Text [ en-US ] = "~Prevent changes" ;
@@ -135,6 +146,10 @@ ModalDialog RID_SCDLG_NEWSCENARIO
{
Text [ en-US ] = "on" ;
};
+ String STR_COLOR
+ {
+ Text [ en-US ] = "Display border in" ;
+ };
FixedLine FL_NAME
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 640f9213a519..743fb1044a91 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -47,13 +47,8 @@
#include <com/sun/star/uno/Sequence.hxx>
#include "miscuno.hxx"
-
//! TODO make dynamic
-#ifdef WIN
-const SCSIZE ASCIIDLG_MAXROWS = 10000;
-#else
const SCSIZE ASCIIDLG_MAXROWS = MAXROWCOUNT;
-#endif
using namespace com::sun::star::uno;
@@ -280,7 +275,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
OUString sTextSeparators(mcTextSep);
bool bMergeDelimiters = false;
bool bFixedWidth = false;
- bool bQuotedFieldAsText = true;
+ bool bQuotedFieldAsText = false;
bool bDetectSpecialNum = false;
sal_Int32 nFromRow = 1;
sal_Int32 nCharSet = -1;
@@ -323,34 +318,45 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
maFieldSeparators = GetSeparators();
// Clipboard is always Unicode, else detect.
- bool bPreselectUnicode = !mbFileImport;
+ rtl_TextEncoding ePreselectUnicode = (mbFileImport ?
+ RTL_TEXTENCODING_DONTKNOW : RTL_TEXTENCODING_UNICODE);
// Sniff for Unicode / not
- if( !bPreselectUnicode && mpDatStream )
+ if( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW && mpDatStream )
{
Seek( 0 );
- mpDatStream->StartReadingUnicodeText();
- ULONG nUniPos = mpDatStream->Tell();
- if ( nUniPos > 0 )
- bPreselectUnicode = TRUE; // read 0xfeff/0xfffe
- else
+ mpDatStream->StartReadingUnicodeText( RTL_TEXTENCODING_DONTKNOW );
+ sal_uLong nUniPos = mpDatStream->Tell();
+ switch (nUniPos)
{
- UINT16 n;
- *mpDatStream >> n;
- // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with
- // control characters except CR,LF,TAB
- if ( (n & 0xff00) < 0x2000 )
- {
- switch ( n & 0xff00 )
+ case 2:
+ ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16
+ break;
+ case 3:
+ ePreselectUnicode = RTL_TEXTENCODING_UTF8; // UTF-8
+ break;
+ case 0:
{
- case 0x0900 :
- case 0x0a00 :
- case 0x0d00 :
- break;
- default:
- bPreselectUnicode = TRUE;
+ sal_uInt16 n;
+ *mpDatStream >> n;
+ // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with
+ // control characters except CR,LF,TAB
+ if ( (n & 0xff00) < 0x2000 )
+ {
+ switch ( n & 0xff00 )
+ {
+ case 0x0900 :
+ case 0x0a00 :
+ case 0x0d00 :
+ break;
+ default:
+ ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16
+ }
+ }
+ mpDatStream->Seek(0);
}
- }
- mpDatStream->Seek(0);
+ break;
+ default:
+ ; // nothing
}
mnStreamPos = mpDatStream->Tell();
}
@@ -376,15 +382,15 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
// *** text encoding ListBox ***
// all encodings allowed, including Unicode, but subsets are excluded
- aLbCharSet.FillFromTextEncodingTable( TRUE );
+ aLbCharSet.FillFromTextEncodingTable( sal_True );
// Insert one "SYSTEM" entry for compatibility in AsciiOptions and system
// independent document linkage.
aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser );
- aLbCharSet.SelectTextEncoding( bPreselectUnicode ?
- RTL_TEXTENCODING_UNICODE : gsl_getSystemTextEncoding() );
+ aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ?
+ gsl_getSystemTextEncoding() : ePreselectUnicode );
- if( nCharSet >= 0 )
- aLbCharSet.SelectEntryPos( static_cast<USHORT>(nCharSet) );
+ if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW )
+ aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) );
SetSelectedCharSet();
aLbCharSet.SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) );
@@ -418,6 +424,9 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
UpdateVertical();
maTableBox.Execute( CSVCMD_NEWCELLTEXTS );
+
+ aEdOther.SetAccessibleName(aCkbOther.GetText());
+ aEdOther.SetAccessibleRelationLabeledBy(&aCkbOther);
}
@@ -429,7 +438,7 @@ ScImportAsciiDlg::~ScImportAsciiDlg()
// ----------------------------------------------------------------------------
-bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText )
+bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText )
{
if (nLine >= ASCIIDLG_MAXROWS || !mpDatStream)
return false;
@@ -438,15 +447,14 @@ bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText )
bool bFixed = aRbFixed.IsChecked();
if (!mpRowPosArray)
- mpRowPosArray = new ULONG[ASCIIDLG_MAXROWS + 2];
+ mpRowPosArray = new sal_uLong[ASCIIDLG_MAXROWS + 2];
if (!mnRowPosCount) // complete re-fresh
{
memset( mpRowPosArray, 0, sizeof(mpRowPosArray[0]) * (ASCIIDLG_MAXROWS+2));
Seek(0);
- if ( mpDatStream->GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- mpDatStream->StartReadingUnicodeText();
+ mpDatStream->StartReadingUnicodeText( mpDatStream->GetStreamCharSet() );
mnStreamPos = mpDatStream->Tell();
mpRowPosArray[mnRowPosCount] = mnStreamPos;
@@ -576,7 +584,7 @@ String ScImportAsciiDlg::GetSeparators() const
void ScImportAsciiDlg::SetupSeparatorCtrls()
{
- BOOL bEnable = aRbSeparated.IsChecked();
+ sal_Bool bEnable = aRbSeparated.IsChecked();
aCkbTab.Enable( bEnable );
aCkbSemicolon.Enable( bEnable );
aCkbComma.Enable( bEnable );
@@ -696,7 +704,7 @@ IMPL_LINK( ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox*, EMPTYARG )
maPreviewLine[i].Erase();
maTableBox.Execute( CSVCMD_SETLINECOUNT, mnRowPosCount);
- bool bMergeSep = (aCkbAsOnce.IsChecked() == TRUE);
+ bool bMergeSep = (aCkbAsOnce.IsChecked() == sal_True);
maTableBox.SetUniStrings( maPreviewLine, maFieldSeparators, mcTextSep, bMergeSep);
return 0;
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index a6ee4ce71cb8..4fa3e6868875 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -51,7 +51,7 @@ public:
nIter ( 0 )
{}
- USHORT GetCode( const String& rDelimiter ) const;
+ sal_uInt16 GetCode( const String& rDelimiter ) const;
String GetDelimiter( sal_Unicode nCode ) const;
String FirstDel() { nIter = 0; return theDelTab.GetToken( nIter, cSep ); }
@@ -66,7 +66,7 @@ private:
//------------------------------------------------------------------------
-USHORT ScDelimiterTable::GetCode( const String& rDel ) const
+sal_uInt16 ScDelimiterTable::GetCode( const String& rDel ) const
{
sal_Unicode nCode = 0;
@@ -118,12 +118,12 @@ String ScDelimiterTable::GetDelimiter( sal_Unicode nCode ) const
ScImportOptionsDlg::ScImportOptionsDlg(
Window* pParent,
- BOOL bAscii,
+ sal_Bool bAscii,
const ScImportOptions* pOptions,
const String* pStrTitle,
- BOOL bMultiByte,
- BOOL bOnlyDbtoolsEncodings,
- BOOL bImport )
+ sal_Bool bMultiByte,
+ sal_Bool bOnlyDbtoolsEncodings,
+ sal_Bool bImport )
: ModalDialog ( pParent, ScResId( RID_SCDLG_IMPORTOPT ) ),
aFlFieldOpt ( this, ScResId( FL_FIELDOPT ) ),
@@ -133,11 +133,12 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aEdFieldSep ( this, ScResId( ED_FIELDSEP ) ),
aFtTextSep ( this, ScResId( FT_TEXTSEP ) ),
aEdTextSep ( this, ScResId( ED_TEXTSEP ) ),
+ aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ),
+ aCbShown ( this, ScResId( CB_SAVESHOWN ) ),
aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
- aCbShown ( this, ScResId( CB_SAVESHOWN ) )
+ aBtnHelp ( this, ScResId( BTN_HELP ) )
{
// im Ctor-Initializer nicht moeglich (MSC kann das nicht):
pFieldSepTab = new ScDelimiterTable( String(ScResId(SCSTR_FIELDSEP)) );
@@ -212,9 +213,11 @@ ScImportOptionsDlg::ScImportOptionsDlg(
SetSizePixel( aWinSize );
aCbFixed.Show();
aCbFixed.SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) );
- aCbFixed.Check( FALSE );
+ aCbFixed.Check( false );
aCbShown.Show();
- aCbShown.Check( TRUE );
+ aCbShown.Check( sal_True );
+ aCbQuoteAll.Show();
+ aCbQuoteAll.Check( false );
}
else
{
@@ -226,6 +229,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aEdTextSep.Hide();
aCbFixed.Hide();
aCbShown.Hide();
+ aCbQuoteAll.Hide();
aLbFont.GrabFocus();
aLbFont.SetDoubleClickHdl( LINK( this, ScImportOptionsDlg, DoubleClickHdl ) );
}
@@ -260,16 +264,17 @@ void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const
rOptions.nTextSepCode = GetCodeFromCombo( aEdTextSep );
rOptions.bFixedWidth = aCbFixed.IsChecked();
rOptions.bSaveAsShown = aCbShown.IsChecked();
+ rOptions.bQuoteAllText = aCbQuoteAll.IsChecked();
}
}
//------------------------------------------------------------------------
-USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
+sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
{
ScDelimiterTable* pTab;
String aStr( rEd.GetText() );
- USHORT nCode;
+ sal_uInt16 nCode;
if ( &rEd == &aEdTextSep )
pTab = pTextSepTab;
@@ -285,7 +290,7 @@ USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
nCode = pTab->GetCode( aStr );
if ( nCode == 0 )
- nCode = (USHORT)aStr.GetChar(0);
+ nCode = (sal_uInt16)aStr.GetChar(0);
}
return nCode;
@@ -297,12 +302,13 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox )
{
if( pCheckBox == &aCbFixed )
{
- BOOL bEnable = !aCbFixed.IsChecked();
+ sal_Bool bEnable = !aCbFixed.IsChecked();
aFtFieldSep.Enable( bEnable );
aEdFieldSep.Enable( bEnable );
aFtTextSep.Enable( bEnable );
aEdTextSep.Enable( bEnable );
aCbShown.Enable( bEnable );
+ aCbQuoteAll.Enable( bEnable );
}
return 0;
}
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index e7bfecfdea3d..e0fcb9936c96 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -71,8 +71,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
: ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_SPEC_FILTER ),
//
- aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aFtFilterArea ( this, ScResId( FT_CRITERIA_AREA ) ),
+ aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aEdFilterArea ( this, this, ScResId( ED_CRITERIA_AREA ) ),
aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ),
//
@@ -91,7 +91,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
pViewData ( NULL ),
pDoc ( NULL ),
pRefInputEdit ( NULL ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
pTimer ( NULL )
{
Init( rArgSet );
@@ -104,6 +104,11 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
pTimer->SetTimeout( 50 ); // 50ms warten
pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
pTimer->Start();
+
+ aLbCopyArea.SetAccessibleName(aBtnCopyResult.GetText());
+ aEdCopyArea.SetAccessibleName(aBtnCopyResult.GetText());
+ aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
}
@@ -111,8 +116,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
ScSpecialFilterDlg::~ScSpecialFilterDlg()
{
- USHORT nEntries = aLbFilterArea.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = aLbFilterArea.GetEntryCount();
+ sal_uInt16 i;
for ( i=1; i<nEntries; i++ )
delete (String*)aLbFilterArea.GetEntryData( i );
@@ -156,7 +161,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
if (!pRangeNames->empty())
{
ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end();
- USHORT nInsert = 0;
+ sal_uInt16 nInsert = 0;
for (; itr != itrEnd; ++itr)
{
if (!itr->HasType(RT_CRITERIA))
@@ -205,19 +210,19 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
aStrUndefined );
// Spezialfilter braucht immer Spaltenkoepfe
- aBtnHeader.Check(TRUE);
+ aBtnHeader.Check(true);
aBtnHeader.Disable();
// Modal-Modus einschalten
-// SetDispatcherLock( TRUE );
+// SetDispatcherLock( sal_True );
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScSpecialFilterDlg::Close()
+sal_Bool ScSpecialFilterDlg::Close()
{
if (pViewData)
pViewData->GetDocShell()->CancelAutoDBRange();
@@ -290,7 +295,7 @@ ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam,
//----------------------------------------------------------------------------
-BOOL ScSpecialFilterDlg::IsRefInputMode() const
+sal_Bool ScSpecialFilterDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -310,8 +315,8 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
String theAreaStr( aEdFilterArea.GetText() );
ScQueryParam theOutParam( theQueryData );
ScAddress theAdrCopy;
- BOOL bEditInputOk = TRUE;
- BOOL bQueryOk = FALSE;
+ sal_Bool bEditInputOk = sal_True;
+ sal_Bool bQueryOk = false;
ScRange theFilterArea;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -322,28 +327,28 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( STRING_NOTFOUND != nColonPos )
theCopyStr.Erase( nColonPos );
- USHORT nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
+ sal_uInt16 nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
if ( SCA_VALID != (nResult & SCA_VALID) )
{
if ( !aBtnMore.GetState() )
- aBtnMore.SetState( TRUE );
+ aBtnMore.SetState( sal_True );
ERRORBOX( STR_INVALID_TABREF );
aEdCopyArea.GrabFocus();
- bEditInputOk = FALSE;
+ bEditInputOk = false;
}
}
if ( bEditInputOk )
{
- USHORT nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
+ sal_uInt16 nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
if ( SCA_VALID != (nResult & SCA_VALID) )
{
ERRORBOX( STR_INVALID_TABREF );
aEdFilterArea.GrabFocus();
- bEditInputOk = FALSE;
+ bEditInputOk = false;
}
}
@@ -355,7 +360,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
* ein ScQueryParam zu erzeugen:
*/
- USHORT nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
+ sal_uInt16 nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
@@ -364,21 +369,21 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( aBtnCopyResult.IsChecked() )
{
- theOutParam.bInplace = FALSE;
+ theOutParam.bInplace = false;
theOutParam.nDestTab = theAdrCopy.Tab();
theOutParam.nDestCol = theAdrCopy.Col();
theOutParam.nDestRow = theAdrCopy.Row();
}
else
{
- theOutParam.bInplace = TRUE;
+ theOutParam.bInplace = sal_True;
theOutParam.nDestTab = 0;
theOutParam.nDestCol = 0;
theOutParam.nDestRow = 0;
}
theOutParam.bHasHeader = aBtnHeader.IsChecked();
- theOutParam.bByRow = TRUE;
+ theOutParam.bByRow = sal_True;
theOutParam.bCaseSens = aBtnCase.IsChecked();
theOutParam.bRegExp = aBtnRegExp.IsChecked();
theOutParam.bDuplicate = !aBtnUnique.IsChecked();
@@ -398,7 +403,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( bQueryOk && theOutParam.GetEntryCount() > MAXQUERY &&
theOutParam.GetEntry(MAXQUERY).bDoQuery )
{
- bQueryOk = FALSE; // zu viele
+ bQueryOk = false; // zu viele
//! andere Fehlermeldung ??
}
}
@@ -406,7 +411,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( bQueryOk )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_FILTER_OK,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -438,17 +443,17 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
if( aEdCopyArea.HasFocus() || aRbCopyArea.HasFocus() )
{
pRefInputEdit = &aEdCopyArea;
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
else if( aEdFilterArea.HasFocus() || aRbFilterArea.HasFocus() )
{
pRefInputEdit = &aEdFilterArea;
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
else if( bRefInputMode )
{
pRefInputEdit = NULL;
- bRefInputMode = FALSE;
+ bRefInputMode = false;
}
}
@@ -465,7 +470,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb )
if ( pLb == &aLbFilterArea )
{
String aString;
- USHORT nSelPos = aLbFilterArea.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbFilterArea.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)aLbFilterArea.GetEntryData( nSelPos );
@@ -486,14 +491,14 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd )
if ( pDoc && pViewData )
{
String theCurAreaStr = pEd->GetText();
- USHORT nResult = ScRange().Parse( theCurAreaStr, pDoc );
+ sal_uInt16 nResult = ScRange().Parse( theCurAreaStr, pDoc );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbFilterArea.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = aLbFilterArea.GetEntryCount();
for ( i=1; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index 1651a7ab1dda..57b75c8e2d7e 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -47,8 +47,8 @@ ScSortDlg::ScSortDlg( Window* pParent,
SfxTabDialog( pParent,
ScResId( RID_SCDLG_SORT ),
pArgSet ),
- bIsHeaders ( FALSE ),
- bIsByRows ( FALSE )
+ bIsHeaders ( false ),
+ bIsByRows ( false )
{
#if LAYOUT_SFX_TABDIALOG_BROKEN
@@ -56,9 +56,9 @@ ScSortDlg::ScSortDlg( Window* pParent,
AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 );
#else
String fields = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fields"));
- AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND);
+ AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, false, TAB_APPEND);
String options = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("options"));
- AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND);
+ AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, false, TAB_APPEND);
#endif
FreeResource();
}
diff --git a/sc/source/ui/dbgui/textimportoptions.src b/sc/source/ui/dbgui/textimportoptions.src
index a2d453555bb9..ea0b9390228b 100644
--- a/sc/source/ui/dbgui/textimportoptions.src
+++ b/sc/source/ui/dbgui/textimportoptions.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_TEXT_IMPORT_OPTIONS";
Text [ en-US ] = "Import Options" ;
Size = MAP_APPFONT ( 230 , 101 ) ;
Moveable = TRUE ;
@@ -64,6 +65,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
RadioButton RB_AUTOMATIC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_AUTOMATIC";
Pos = MAP_APPFONT( 12, 20 ) ;
Size = MAP_APPFONT( 159, 10 ) ;
TabStop = TRUE ;
@@ -73,6 +75,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
RadioButton RB_CUSTOM
{
+ HelpID = "sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_CUSTOM";
Pos = MAP_APPFONT( 12, 34 ) ;
Size = MAP_APPFONT( 159, 10 ) ;
TabStop = TRUE ;
@@ -82,6 +85,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
ListBox LB_CUSTOM_LANG
{
+ HelpID = "sc:ListBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:LB_CUSTOM_LANG";
Pos = MAP_APPFONT( 20, 50 ) ;
Size = MAP_APPFONT( 140, 120 ) ;
TabStop = TRUE ;
@@ -98,6 +102,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
CheckBox BTN_CONVERT_DATE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:BTN_CONVERT_DATE";
Pos = MAP_APPFONT( 12, 86 );
Size = MAP_APPFONT( 159, 10 );
TabStop = TRUE ;
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 44676b136e14..6974e7d2135a 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -61,7 +61,7 @@ using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-static USHORT pSortRanges[] =
+static sal_uInt16 pSortRanges[] =
{
SID_SORT,
SID_SORT,
@@ -81,7 +81,7 @@ static USHORT pSortRanges[] =
*
* Die Klasse SfxTabPage bietet mittlerweile ein Verfahren an:
*
- * virtual BOOL HasExchangeSupport() const; -> return TRUE;
+ * virtual sal_Bool HasExchangeSupport() const; -> return sal_True;
* virtual void ActivatePage(const SfxItemSet &);
* virtual int DeactivatePage(SfxItemSet * = 0);
*
@@ -125,8 +125,8 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent,
rArgSet.Get( nWhichSort )).
GetSortData() ),
nFieldCount ( 0 ),
- bHasHeader ( FALSE ),
- bSortByRows ( FALSE )
+ bHasHeader ( false ),
+ bSortByRows ( false )
{
Init();
FreeResource();
@@ -177,7 +177,7 @@ void ScTabPageSortFields::Init()
//------------------------------------------------------------------------
-USHORT* ScTabPageSortFields::GetRanges()
+sal_uInt16* ScTabPageSortFields::GetRanges()
{
return pSortRanges;
}
@@ -204,7 +204,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
if ( rSortData.bDoSort[0] )
{
- for ( USHORT i=0; i<3; i++ )
+ for ( sal_uInt16 i=0; i<3; i++ )
{
if ( rSortData.bDoSort[i] )
{
@@ -239,7 +239,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
else if( nCol > rSortData.nCol2 )
nCol = rSortData.nCol2;
- USHORT nSort1Pos = nCol - rSortData.nCol1+1;
+ sal_uInt16 nSort1Pos = nCol - rSortData.nCol1+1;
aLbSort1.SelectEntryPos( nSort1Pos );
aLbSort2.SelectEntryPos( 0 );
aLbSort3.SelectEntryPos( 0 );
@@ -260,20 +260,20 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
// -----------------------------------------------------------------------
-BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
{
ScSortParam theSortData = rSortData;
if (pDlg)
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET )
theSortData = ((const ScSortItem*)pItem)->GetSortData();
}
- USHORT nSort1Pos = aLbSort1.GetSelectEntryPos();
- USHORT nSort2Pos = aLbSort2.GetSelectEntryPos();
- USHORT nSort3Pos = aLbSort3.GetSelectEntryPos();
+ sal_uInt16 nSort1Pos = aLbSort1.GetSelectEntryPos();
+ sal_uInt16 nSort2Pos = aLbSort2.GetSelectEntryPos();
+ sal_uInt16 nSort3Pos = aLbSort3.GetSelectEntryPos();
DBG_ASSERT( (nSort1Pos <= SC_MAXFIELDS)
&& (nSort2Pos <= SC_MAXFIELDS)
@@ -318,12 +318,12 @@ BOOL ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
{
theSortData.bDoSort[0] =
theSortData.bDoSort[1] =
- theSortData.bDoSort[2] = FALSE;
+ theSortData.bDoSort[2] = false;
}
rArgSet.Put( ScSortItem( SCITEM_SORTDATA, NULL, &theSortData ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -337,9 +337,9 @@ void ScTabPageSortFields::ActivatePage()
if ( bHasHeader != pDlg->GetHeaders()
|| bSortByRows != pDlg->GetByRows() )
{
- USHORT nCurSel1 = aLbSort1.GetSelectEntryPos();
- USHORT nCurSel2 = aLbSort2.GetSelectEntryPos();
- USHORT nCurSel3 = aLbSort3.GetSelectEntryPos();
+ sal_uInt16 nCurSel1 = aLbSort1.GetSelectEntryPos();
+ sal_uInt16 nCurSel2 = aLbSort2.GetSelectEntryPos();
+ sal_uInt16 nCurSel3 = aLbSort3.GetSelectEntryPos();
bHasHeader = pDlg->GetHeaders();
bSortByRows = pDlg->GetByRows();
@@ -372,7 +372,7 @@ int ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP )
// -----------------------------------------------------------------------
-void ScTabPageSortFields::DisableField( USHORT nField )
+void ScTabPageSortFields::DisableField( sal_uInt16 nField )
{
nField--;
@@ -387,7 +387,7 @@ void ScTabPageSortFields::DisableField( USHORT nField )
// -----------------------------------------------------------------------
-void ScTabPageSortFields::EnableField( USHORT nField )
+void ScTabPageSortFields::EnableField( sal_uInt16 nField )
{
nField--;
@@ -420,7 +420,7 @@ void ScTabPageSortFields::FillFieldLists()
SCCOL nFirstSortCol = rSortData.nCol1;
SCROW nFirstSortRow = rSortData.nRow1;
SCTAB nTab = pViewData->GetTabNo();
- USHORT i = 1;
+ sal_uInt16 i = 1;
if ( bSortByRows )
{
@@ -473,17 +473,17 @@ void ScTabPageSortFields::FillFieldLists()
//------------------------------------------------------------------------
-USHORT ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField )
+sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField )
{
- USHORT nFieldPos = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nFieldPos = 0;
+ sal_Bool bFound = false;
- for ( USHORT n=1; n<nFieldCount && !bFound; n++ )
+ for ( sal_uInt16 n=1; n<nFieldCount && !bFound; n++ )
{
if ( nFieldArr[n] == nField )
{
nFieldPos = n;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -596,15 +596,22 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent,
Init();
FreeResource();
SetExchangeSupport();
+
+ aLbOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aLbOutPos.SetAccessibleName(aBtnCopyResult.GetText());
+ aEdOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdOutPos.SetAccessibleName(aBtnCopyResult.GetText());
+ aLbSortUser.SetAccessibleRelationLabeledBy(&aBtnSortUser);
+ aLbSortUser.SetAccessibleName(aBtnSortUser.GetText());
}
// -----------------------------------------------------------------------
ScTabPageSortOptions::~ScTabPageSortOptions()
{
- USHORT nEntries = aLbOutPos.GetEntryCount();
+ sal_uInt16 nEntries = aLbOutPos.GetEntryCount();
- for ( USHORT i=1; i<nEntries; i++ )
+ for ( sal_uInt16 i=1; i<nEntries; i++ )
delete (String*)aLbOutPos.GetEntryData( i );
delete pColRes;
@@ -655,7 +662,7 @@ void ScTabPageSortOptions::Init()
String aRefStr;
while ( aIter.Next( aName, aRange ) )
{
- USHORT nInsert = aLbOutPos.InsertEntry( aName );
+ sal_uInt16 nInsert = aLbOutPos.InsertEntry( aName );
aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv );
aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
@@ -698,13 +705,13 @@ void ScTabPageSortOptions::Init()
// get available languages
- aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE );
+ aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false );
aLbLanguage.InsertLanguage( LANGUAGE_SYSTEM );
}
//------------------------------------------------------------------------
-USHORT* ScTabPageSortOptions::GetRanges()
+sal_uInt16* ScTabPageSortOptions::GetRanges()
{
return pSortRanges;
}
@@ -727,13 +734,13 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
{
if ( rSortData.bUserDef )
{
- aBtnSortUser.Check( TRUE );
+ aBtnSortUser.Check( sal_True );
aLbSortUser.Enable();
aLbSortUser.SelectEntryPos( rSortData.nUserIndex );
}
else
{
- aBtnSortUser.Check( FALSE );
+ aBtnSortUser.Check( false );
aLbSortUser.Disable();
aLbSortUser.SelectEntryPos( 0 );
}
@@ -765,7 +772,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
if ( pDoc && !rSortData.bInplace )
{
String aStr;
- USHORT nFormat = (rSortData.nDestTab != pViewData->GetTabNo())
+ sal_uInt16 nFormat = (rSortData.nDestTab != pViewData->GetTabNo())
? SCR_ABS_3D
: SCR_ABS;
@@ -784,7 +791,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
}
else
{
- aBtnCopyResult.Check( FALSE );
+ aBtnCopyResult.Check( false );
aLbOutPos.Disable();
aEdOutPos.Disable();
aEdOutPos.SetText( EMPTY_STRING );
@@ -793,14 +800,14 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
// -----------------------------------------------------------------------
-BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
{
ScSortParam theSortData = rSortData;
if (pDlg)
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET )
theSortData = ((const ScSortItem*)pItem)->GetSortData();
}
@@ -828,7 +835,7 @@ BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
{
uno::Sequence<rtl::OUString> aAlgos = pColWrap->listCollatorAlgorithms(
theSortData.aCollatorLocale );
- USHORT nSel = aLbAlgorithm.GetSelectEntryPos();
+ sal_uInt16 nSel = aLbAlgorithm.GetSelectEntryPos();
if ( nSel < aAlgos.getLength() )
sAlg = aAlgos[nSel];
}
@@ -836,7 +843,7 @@ BOOL ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
rArgSet.Put( ScSortItem( SCITEM_SORTDATA, &theSortData ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -867,7 +874,7 @@ void ScTabPageSortOptions::ActivatePage()
int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
{
- BOOL bPosInputOk = TRUE;
+ sal_Bool bPosInputOk = sal_True;
if ( aBtnCopyResult.IsChecked() )
{
@@ -885,7 +892,7 @@ int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
thePos.SetTab( pViewData->GetTabNo() );
}
- USHORT nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() );
bPosInputOk = ( SCA_VALID == (nResult & SCA_VALID) );
@@ -928,9 +935,9 @@ void ScTabPageSortOptions::FillUserSortListBox()
aLbSortUser.Clear();
if ( pUserLists )
{
- USHORT nCount = pUserLists->GetCount();
+ sal_uInt16 nCount = pUserLists->GetCount();
if ( nCount > 0 )
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
aLbSortUser.InsertEntry( (*pUserLists)[i]->GetString() );
}
}
@@ -974,7 +981,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb )
if ( pLb == &aLbOutPos )
{
String aString;
- USHORT nSelPos = aLbOutPos.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbOutPos.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)aLbOutPos.GetEntryData( nSelPos );
@@ -1006,14 +1013,14 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd )
if ( pEd == &aEdOutPos )
{
String theCurPosStr = aEdOutPos.GetText();
- USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbOutPos.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = aLbOutPos.GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
@@ -1033,7 +1040,7 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd )
IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
{
- aLbAlgorithm.SetUpdateMode( FALSE );
+ aLbAlgorithm.SetUpdateMode( false );
aLbAlgorithm.Clear();
LanguageType eLang = aLbLanguage.GetSelectLanguage();
@@ -1042,8 +1049,8 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
// for LANGUAGE_SYSTEM no algorithm can be selected because
// it wouldn't necessarily exist for other languages
// -> leave list box empty if LANGUAGE_SYSTEM is selected
- aFtAlgorithm.Enable( FALSE ); // nothing to select
- aLbAlgorithm.Enable( FALSE ); // nothing to select
+ aFtAlgorithm.Enable( false ); // nothing to select
+ aLbAlgorithm.Enable( false ); // nothing to select
}
else
{
@@ -1063,7 +1070,7 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
aLbAlgorithm.Enable( nCount > 1 ); // enable only if there is a choice
}
- aLbAlgorithm.SetUpdateMode( TRUE );
+ aLbAlgorithm.SetUpdateMode( sal_True );
return 0;
}
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index abc491618d2e..d27dae46011e 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -46,7 +46,7 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pSubTotalsRanges[] =
+static sal_uInt16 pSubTotalsRanges[] =
{
SID_SUBTOTALS,
SID_SUBTOTALS,
@@ -56,7 +56,7 @@ static USHORT pSubTotalsRanges[] =
//========================================================================
// Zwischenergebnisgruppen-Tabpage:
-ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId,
+ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId,
const SfxItemSet& rArgSet )
: SfxTabPage ( pParent,
ScResId( nResId ),
@@ -91,15 +91,15 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId,
ScTpSubTotalGroup::~ScTpSubTotalGroup()
{
- USHORT nCount = (USHORT)aLbColumns.GetEntryCount();
+ sal_uInt16 nCount = (sal_uInt16)aLbColumns.GetEntryCount();
if ( nCount > 0 )
{
- USHORT* pData = NULL;
+ sal_uInt16* pData = NULL;
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
- pData = (USHORT*)(aLbColumns.GetEntryData( i ));
+ pData = (sal_uInt16*)(aLbColumns.GetEntryData( i ));
DBG_ASSERT( pData, "EntryData not found" );
delete pData;
@@ -130,32 +130,32 @@ void ScTpSubTotalGroup::Init()
//------------------------------------------------------------------------
-USHORT* ScTpSubTotalGroup::GetRanges()
+sal_uInt16* ScTpSubTotalGroup::GetRanges()
{
return pSubTotalsRanges;
}
// -----------------------------------------------------------------------
-BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo,
+sal_Bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
const SfxItemSet& rArgSet )
{
- USHORT nGroupIdx = 0;
+ sal_uInt16 nGroupIdx = 0;
DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
if ( (nGroupNo > 3) || (nGroupNo == 0) )
- return FALSE;
+ return false;
else
nGroupIdx = nGroupNo-1;
//----------------------------------------------------------
// first we have to clear the listboxes...
- for ( USHORT nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry )
+ for ( sal_uInt16 nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry )
{
- aLbColumns.CheckEntryPos( nLbEntry, FALSE );
- *((USHORT*)aLbColumns.GetEntryData( nLbEntry )) = 0;
+ aLbColumns.CheckEntryPos( nLbEntry, false );
+ *((sal_uInt16*)aLbColumns.GetEntryData( nLbEntry )) = 0;
}
aLbFunctions.SelectEntryPos( 0 );
@@ -172,10 +172,10 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo,
aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 );
- for ( USHORT i=0; i<nSubTotals; i++ )
+ for ( sal_uInt16 i=0; i<nSubTotals; i++ )
{
- USHORT nCheckPos = GetFieldSelPos( pSubTotals[i] );
- USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nCheckPos );
+ sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] );
+ sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nCheckPos );
aLbColumns.CheckEntryPos( nCheckPos );
*pFunction = FuncToLbPos( pFunctions[i] );
@@ -189,15 +189,15 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo,
aLbFunctions.SelectEntryPos( 0 );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
+sal_Bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
SfxItemSet& rArgSet )
{
- USHORT nGroupIdx = 0;
+ sal_uInt16 nGroupIdx = 0;
DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "Invalid group" );
DBG_ASSERT( (aLbGroup.GetEntryCount() > 0)
@@ -211,7 +211,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
|| (aLbColumns.GetEntryCount() == 0)
|| (aLbFunctions.GetEntryCount() == 0)
)
- return FALSE;
+ return false;
else
nGroupIdx = nGroupNo-1;
@@ -223,15 +223,15 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET )
theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData();
}
ScSubTotalFunc* pFunctions = NULL;
SCCOL* pSubTotals = NULL;
- USHORT nGroup = aLbGroup.GetSelectEntryPos();
- USHORT nEntryCount = (USHORT)aLbColumns.GetEntryCount();
- USHORT nCheckCount = aLbColumns.GetCheckedEntryCount();
+ sal_uInt16 nGroup = aLbGroup.GetSelectEntryPos();
+ sal_uInt16 nEntryCount = (sal_uInt16)aLbColumns.GetEntryCount();
+ sal_uInt16 nCheckCount = aLbColumns.GetCheckedEntryCount();
theSubTotalData.nCol1 = rSubTotalData.nCol1;
theSubTotalData.nRow1 = rSubTotalData.nRow1;
@@ -244,18 +244,18 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
if ( nEntryCount>0 && nCheckCount>0 && nGroup!=0 )
{
- USHORT nFunction = 0;
+ sal_uInt16 nFunction = 0;
pSubTotals = new SCCOL [nCheckCount];
pFunctions = new ScSubTotalFunc [nCheckCount];
- for ( USHORT i=0, nCheck=0; i<nEntryCount; i++ )
+ for ( sal_uInt16 i=0, nCheck=0; i<nEntryCount; i++ )
{
if ( aLbColumns.IsChecked( i ) )
{
DBG_ASSERT( nCheck <= nCheckCount,
"Range error :-(" );
- nFunction = *((USHORT*)aLbColumns.GetEntryData( i ));
+ nFunction = *((sal_uInt16*)aLbColumns.GetEntryData( i ));
pSubTotals[nCheck] = nFieldArr[i];
pFunctions[nCheck] = LbPosToFunc( nFunction );
nCheck++;
@@ -273,7 +273,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
if ( pSubTotals ) delete [] pSubTotals;
if ( pFunctions ) delete [] pFunctions;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -289,7 +289,7 @@ void ScTpSubTotalGroup::FillListBoxes()
SCTAB nTab = pViewData->GetTabNo();
SCCOL nMaxCol = rSubTotalData.nCol2;
SCCOL col;
- USHORT i=0;
+ sal_uInt16 i=0;
String aFieldName;
aLbGroup.Clear();
@@ -309,27 +309,27 @@ void ScTpSubTotalGroup::FillListBoxes()
nFieldArr[i] = col;
aLbGroup.InsertEntry( aFieldName, i+1 );
aLbColumns.InsertEntry( aFieldName, i );
- aLbColumns.SetEntryData( i, new USHORT(0) );
+ aLbColumns.SetEntryData( i, new sal_uInt16(0) );
i++;
}
// Nachtraegliche "Konstanteninitialisierung":
- (USHORT&)nFieldCount = i;
+ (sal_uInt16&)nFieldCount = i;
}
}
// -----------------------------------------------------------------------
-USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField )
+sal_uInt16 ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField )
{
- USHORT nFieldPos = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nFieldPos = 0;
+ sal_Bool bFound = false;
- for ( USHORT n=0; n<nFieldCount && !bFound; n++ )
+ for ( sal_uInt16 n=0; n<nFieldCount && !bFound; n++ )
{
if ( nFieldArr[n] == nField )
{
nFieldPos = n;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -338,7 +338,7 @@ USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField )
// -----------------------------------------------------------------------
-ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos )
+ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( sal_uInt16 nPos )
{
switch ( nPos )
{
@@ -362,7 +362,7 @@ ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos )
// -----------------------------------------------------------------------
-USHORT ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc )
+sal_uInt16 ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc )
{
switch ( eFunc )
{
@@ -393,9 +393,9 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb )
if ( (aLbColumns.GetEntryCount() > 0)
&& (aLbColumns.GetSelectionCount() > 0) )
{
- USHORT nFunction = aLbFunctions.GetSelectEntryPos();
- USHORT nColumn = aLbColumns.GetSelectEntryPos();
- USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nColumn );
+ sal_uInt16 nFunction = aLbFunctions.GetSelectEntryPos();
+ sal_uInt16 nColumn = aLbColumns.GetSelectEntryPos();
+ sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nColumn );
DBG_ASSERT( pFunction, "EntryData nicht gefunden!" );
if ( !pFunction )
@@ -408,7 +408,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb )
else if ( pLb == &aLbFunctions )
{
*pFunction = nFunction;
- aLbColumns.CheckEntryPos( nColumn, TRUE );
+ aLbColumns.CheckEntryPos( nColumn, true );
}
}
return 0;
@@ -424,7 +424,7 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, ListBox *, pLb )
if ( pEntry )
{
- aLbColumns.SelectEntryPos( (USHORT)aLbColumns.GetModel()->GetAbsPos( pEntry ) );
+ aLbColumns.SelectEntryPos( (sal_uInt16)aLbColumns.GetModel()->GetAbsPos( pEntry ) );
SelectHdl( pLb );
}
}
@@ -476,9 +476,9 @@ void ScTpSubTotalGroup3::Reset( const SfxItemSet& rArgSet ) { RESET(3); }
// -----------------------------------------------------------------------
#define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), rArgSet ))
-BOOL ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); }
-BOOL ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); }
-BOOL ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); }
+sal_Bool ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); }
+sal_Bool ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); }
+sal_Bool ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); }
#undef FILL
//========================================================================
@@ -509,6 +509,9 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( Window* pParent,
{
Init();
FreeResource();
+
+ aLbUserDef.SetAccessibleRelationLabeledBy(&aBtnUserDef);
+ aLbUserDef.SetAccessibleName(aBtnUserDef.GetText());
}
// -----------------------------------------------------------------------
@@ -556,13 +559,13 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ )
if ( rSubTotalData.bUserDef )
{
- aBtnUserDef.Check( TRUE );
+ aBtnUserDef.Check( sal_True );
aLbUserDef.Enable();
aLbUserDef.SelectEntryPos( rSubTotalData.nUserIndex );
}
else
{
- aBtnUserDef.Check( FALSE );
+ aBtnUserDef.Check( false );
aLbUserDef.Disable();
aLbUserDef.SelectEntryPos( 0 );
}
@@ -572,7 +575,7 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ )
// -----------------------------------------------------------------------
-BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
{
ScSubTotalParam theSubTotalData; // auslesen, wenn schon teilweise gefuellt
SfxTabDialog* pDlg = GetTabDialog();
@@ -580,12 +583,12 @@ BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
{
const SfxItemSet* pExample = pDlg->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET )
theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData();
}
theSubTotalData.bPagebreak = aBtnPagebreak.IsChecked();
- theSubTotalData.bReplace = TRUE;
+ theSubTotalData.bReplace = sal_True;
theSubTotalData.bCaseSens = aBtnCase.IsChecked();
theSubTotalData.bIncludePattern = aBtnFormats.IsChecked();
theSubTotalData.bDoSort = aBtnSort.IsChecked();
@@ -597,7 +600,7 @@ BOOL ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet )
rArgSet.Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -609,9 +612,9 @@ void ScTpSubTotalOptions::FillUserSortListBox()
aLbUserDef.Clear();
if ( pUserLists )
{
- USHORT nCount = pUserLists->GetCount();
+ sal_uInt16 nCount = pUserLists->GetCount();
if ( nCount > 0 )
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
aLbUserDef.InsertEntry( (*pUserLists)[i]->GetString() );
}
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index e643b3a85e7c..fdfe24ba26e0 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -60,7 +60,7 @@
// ============================================================================
-static USHORT pValueRanges[] =
+static sal_uInt16 pValueRanges[] =
{
FID_VALID_MODE, FID_VALID_ERRTEXT,
FID_VALID_LISTTYPE, FID_VALID_LISTTYPE,
@@ -160,7 +160,7 @@ void ScTPValidationValue::RefInputDonePostHdl()
}
-BOOL ScValidationDlg::Close()
+sal_Bool ScValidationDlg::Close()
{
if( m_bOwnRefHdlr )
if( SfxTabPage* pPage = GetTabPage( TP_VALIDATION_VALUES ) )
@@ -172,7 +172,7 @@ BOOL ScValidationDlg::Close()
ScValidationDlg::~ScValidationDlg()
{
if( m_bOwnRefHdlr )
- RemoveRefDlg( FALSE );
+ RemoveRefDlg( false );
}
@@ -181,9 +181,9 @@ ScValidationDlg::~ScValidationDlg()
namespace {
/** Converts the passed ScValidationMode to the position in the list box. */
-USHORT lclGetPosFromValMode( ScValidationMode eValMode )
+sal_uInt16 lclGetPosFromValMode( ScValidationMode eValMode )
{
- USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY;
+ sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
switch( eValMode )
{
case SC_VALID_ANY: nLbPos = SC_VALIDDLG_ALLOW_ANY; break;
@@ -200,7 +200,7 @@ USHORT lclGetPosFromValMode( ScValidationMode eValMode )
}
/** Converts the passed list box position to an ScValidationMode. */
-ScValidationMode lclGetValModeFromPos( USHORT nLbPos )
+ScValidationMode lclGetValModeFromPos( sal_uInt16 nLbPos )
{
ScValidationMode eValMode = SC_VALID_ANY;
switch( nLbPos )
@@ -219,9 +219,9 @@ ScValidationMode lclGetValModeFromPos( USHORT nLbPos )
}
/** Converts the passed ScConditionMode to the position in the list box. */
-USHORT lclGetPosFromCondMode( ScConditionMode eCondMode )
+sal_uInt16 lclGetPosFromCondMode( ScConditionMode eCondMode )
{
- USHORT nLbPos = SC_VALIDDLG_DATA_EQUAL;
+ sal_uInt16 nLbPos = SC_VALIDDLG_DATA_EQUAL;
switch( eCondMode )
{
case SC_COND_NONE: // may occur in old XML files after Excel import
@@ -239,7 +239,7 @@ USHORT lclGetPosFromCondMode( ScConditionMode eCondMode )
}
/** Converts the passed list box position to an ScConditionMode. */
-ScConditionMode lclGetCondModeFromPos( USHORT nLbPos )
+ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos )
{
ScConditionMode eCondMode = SC_COND_EQUAL;
switch( nLbPos )
@@ -374,7 +374,7 @@ SfxTabPage* ScTPValidationValue::Create( Window* pParent, const SfxItemSet& rArg
return( new ScTPValidationValue( pParent, rArgSet ) );
}
-USHORT* ScTPValidationValue::GetRanges()
+sal_uInt16* ScTPValidationValue::GetRanges()
{
return pValueRanges;
}
@@ -383,38 +383,38 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet )
{
const SfxPoolItem* pItem;
- USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY;
- if( rArgSet.GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
+ if( rArgSet.GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET )
nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >(
static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
maLbAllow.SelectEntryPos( nLbPos );
nLbPos = SC_VALIDDLG_DATA_EQUAL;
- if( rArgSet.GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( rArgSet.GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET )
nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >(
static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
maLbValue.SelectEntryPos( nLbPos );
// *** check boxes ***
- BOOL bCheck = TRUE;
- if( rArgSet.GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bCheck = sal_True;
+ if( rArgSet.GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET )
bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue();
maCbAllow.Check( bCheck );
sal_Int32 nListType = ValidListType::UNSORTED;
- if( rArgSet.GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( rArgSet.GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET )
nListType = static_cast< const SfxInt16Item* >( pItem )->GetValue();
maCbShow.Check( nListType != ValidListType::INVISIBLE );
maCbSort.Check( nListType == ValidListType::SORTEDASCENDING );
// *** formulas ***
String aFmlaStr;
- if ( rArgSet.GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET )
aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue();
SetFirstFormula( aFmlaStr );
aFmlaStr.Erase();
- if ( rArgSet.GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET )
aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue();
SetSecondFormula( aFmlaStr );
@@ -422,21 +422,21 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet )
CheckHdl( NULL );
}
-BOOL ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet )
{
sal_Int16 nListType = maCbShow.IsChecked() ?
(maCbSort.IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) :
ValidListType::INVISIBLE;
- rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<USHORT>(
+ rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) );
- rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>(
+ rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(
lclGetCondModeFromPos( maLbValue.GetSelectEntryPos() ) ) ) );
rArgSet.Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) );
rArgSet.Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) );
rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, maCbAllow.IsChecked() ) );
rArgSet.Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) );
- return TRUE;
+ return sal_True;
}
String ScTPValidationValue::GetFirstFormula() const
@@ -582,7 +582,7 @@ void ScTPValidationValue::TidyListBoxes()
IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, EMPTYARG)
{
- USHORT nPos=maLbAllow.GetSelectEntryPos();
+ sal_uInt16 nPos=maLbAllow.GetSelectEntryPos();
if ( nPos == SC_VALIDDLG_ALLOW_RANGE )
{
@@ -609,7 +609,7 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd )
IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG )
{
- USHORT nLbPos = maLbAllow.GetSelectEntryPos();
+ sal_uInt16 nLbPos = maLbAllow.GetSelectEntryPos();
bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY);
bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE);
bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST);
@@ -701,12 +701,12 @@ ScTPValidationHelp::~ScTPValidationHelp()
void ScTPValidationHelp::Init()
{
- aTsbHelp.EnableTriState( FALSE );
+ aTsbHelp.EnableTriState( false );
}
//------------------------------------------------------------------------
-USHORT* ScTPValidationHelp::GetRanges()
+sal_uInt16* ScTPValidationHelp::GetRanges()
{
return pValueRanges;
}
@@ -725,17 +725,17 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet )
{
const SfxPoolItem* pItem;
- if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET )
aTsbHelp.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK );
else
aTsbHelp.SetState( STATE_NOCHECK );
- if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdtTitle.SetText( EMPTY_STRING );
- if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aEdInputHelp.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdInputHelp.SetText( EMPTY_STRING );
@@ -743,13 +743,13 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet )
// -----------------------------------------------------------------------
-BOOL ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet )
{
rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, aTsbHelp.GetState() == STATE_CHECK ) );
rArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aEdtTitle.GetText() ) );
rArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aEdInputHelp.GetText() ) );
- return TRUE;
+ return sal_True;
}
//========================================================================
@@ -792,14 +792,14 @@ void ScTPValidationError::Init()
aBtnSearch.SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) );
aLbAction.SelectEntryPos( 0 );
- aTsbShow.EnableTriState( FALSE );
+ aTsbShow.EnableTriState( false );
SelectActionHdl( NULL );
}
//------------------------------------------------------------------------
-USHORT* ScTPValidationError::GetRanges()
+sal_uInt16* ScTPValidationError::GetRanges()
{
return pValueRanges;
}
@@ -818,22 +818,22 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet )
{
const SfxPoolItem* pItem;
- if ( rArgSet.GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET )
aTsbShow.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK );
else
aTsbShow.SetState( STATE_CHECK ); // check by default
- if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET )
aLbAction.SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() );
else
aLbAction.SelectEntryPos( 0 );
- if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdtTitle.SetText( EMPTY_STRING );
- if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aEdError.SetText( ((const SfxStringItem*)pItem)->GetValue() );
else
aEdError.SetText( EMPTY_STRING );
@@ -843,14 +843,14 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet )
// -----------------------------------------------------------------------
-BOOL ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
+sal_Bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
{
rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, aTsbShow.GetState() == STATE_CHECK ) );
rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, aLbAction.GetSelectEntryPos() ) );
rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aEdtTitle.GetText() ) );
rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aEdError.GetText() ) );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -858,7 +858,7 @@ BOOL ScTPValidationError::FillItemSet( SfxItemSet& rArgSet )
IMPL_LINK( ScTPValidationError, SelectActionHdl, ListBox*, EMPTYARG )
{
ScValidErrorStyle eStyle = (ScValidErrorStyle) aLbAction.GetSelectEntryPos();
- BOOL bMacro = ( eStyle == SC_VALERR_MACRO );
+ sal_Bool bMacro = ( eStyle == SC_VALERR_MACRO );
aBtnSearch.Enable( bMacro );
aFtError.Enable( !bMacro );
@@ -894,13 +894,13 @@ bool ScValidationDlg::EnterRefStatus()
if( !pTabViewShell ) return false;
- USHORT nId = SLOTID;
+ sal_uInt16 nId = SLOTID;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL;
- SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ SC_MOD()->SetRefDialog( nId, pWnd ? false : sal_True );
return true;
}
@@ -911,7 +911,7 @@ bool ScValidationDlg::LeaveRefStatus()
if( !pTabViewShell ) return false;
- USHORT nId = SLOTID;
+ sal_uInt16 nId = SLOTID;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
if ( pViewFrm->GetChildWindow( nId ) )
{
@@ -925,14 +925,14 @@ bool ScValidationDlg::SetupRefDlg()
if ( m_bOwnRefHdlr ) return false;
if( EnterRefMode() )
{
- SetModal( FALSE );
+ SetModal( false );
return m_bOwnRefHdlr = true && EnterRefStatus();
}
return false;
}
-bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ )
+bool ScValidationDlg::RemoveRefDlg( sal_Bool bRestoreModal /* = sal_True */ )
{
bool bVisLock = false;
bool bFreeWindowLock = false;
@@ -953,7 +953,7 @@ bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ )
m_bOwnRefHdlr = false;
if( bRestoreModal )
- SetModal( TRUE );
+ SetModal( sal_True );
}
if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) )
@@ -979,14 +979,14 @@ void ScTPValidationValue::OnClick( Button *pBtn )
SetupRefDlg();
}
-BOOL ScValidationDlg::IsChildFocus()
+sal_Bool ScValidationDlg::IsChildFocus()
{
if ( const Window *pWin = Application::GetFocusWindow() )
while( NULL != ( pWin = pWin->GetParent() ) )
if( pWin == this )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/dbgui/validate.src b/sc/source/ui/dbgui/validate.src
index 0e1ea8403132..62e7f597ca25 100644
--- a/sc/source/ui/dbgui/validate.src
+++ b/sc/source/ui/dbgui/validate.src
@@ -66,6 +66,7 @@ TabDialog TAB_DLG_VALIDATION
TabPage TP_VALIDATION_VALUES
{
+ HelpID = "sc:TabPage:TP_VALIDATION_VALUES";
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -78,6 +79,7 @@ TabPage TP_VALIDATION_VALUES
};
ListBox LB_ALLOW
{
+ HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_ALLOW";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 14 ) ;
Size = MAP_APPFONT ( 90 , 80 ) ;
@@ -103,6 +105,7 @@ TabPage TP_VALIDATION_VALUES
};
ListBox LB_VALUE
{
+ HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 56 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -129,6 +132,7 @@ TabPage TP_VALIDATION_VALUES
};
Edit EDT_MIN
{
+ HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MIN";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
@@ -136,6 +140,7 @@ TabPage TP_VALIDATION_VALUES
};
MultiLineEdit EDT_LIST
{
+ HelpID = "sc:MultiLineEdit:TP_VALIDATION_VALUES:EDT_LIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
Size = MAP_APPFONT ( 174 + OFFSET_X , 105 ) ;
@@ -150,6 +155,7 @@ TabPage TP_VALIDATION_VALUES
};
Edit EDT_MAX
{
+ HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MAX";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 - OFFSET_X , 90 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
@@ -185,6 +191,7 @@ TabPage TP_VALIDATION_VALUES
};
ImageButton RB_VALIDITY_REF
{
+ HelpID = "sc:ImageButton:TP_VALIDATION_VALUES:RB_VALIDITY_REF";
Pos = MAP_APPFONT ( 142 , 73 ) ;
Size = MAP_APPFONT ( 13 , 14 ) ;
TabStop = TRUE ;
@@ -194,12 +201,14 @@ TabPage TP_VALIDATION_VALUES
TabPage TP_VALIDATION_INPUTHELP
{
+ HelpID = "sc:TabPage:TP_VALIDATION_INPUTHELP";
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
Text = "Eingabehilfe" ;
TriStateBox TSB_HELP
{
+ HelpID = "sc:TriStateBox:TP_VALIDATION_INPUTHELP:TSB_HELP";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -225,6 +234,7 @@ TabPage TP_VALIDATION_INPUTHELP
};
Edit EDT_TITLE
{
+ HelpID = "sc:Edit:TP_VALIDATION_INPUTHELP:EDT_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 33 ) ;
Size = MAP_APPFONT ( 171 , 12 ) ;
@@ -232,6 +242,7 @@ TabPage TP_VALIDATION_INPUTHELP
};
MultiLineEdit EDT_INPUTHELP
{
+ HelpID = "sc:MultiLineEdit:TP_VALIDATION_INPUTHELP:EDT_INPUTHELP";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 51 ) ;
Size = MAP_APPFONT ( 171 , 128 ) ;
@@ -243,6 +254,7 @@ TabPage TP_VALIDATION_INPUTHELP
TabPage TP_VALIDATION_ERROR
{
+ HelpID = "sc:TabPage:TP_VALIDATION_ERROR";
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -254,6 +266,7 @@ TabPage TP_VALIDATION_ERROR
};
TriStateBox TSB_SHOW
{
+ HelpID = "sc:TriStateBox:TP_VALIDATION_ERROR:TSB_SHOW";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -261,6 +274,7 @@ TabPage TP_VALIDATION_ERROR
};
MultiLineEdit EDT_ERROR
{
+ HelpID = "sc:MultiLineEdit:TP_VALIDATION_ERROR:EDT_ERROR";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 69 ) ;
Size = MAP_APPFONT ( 171 , 110 ) ;
@@ -270,6 +284,7 @@ TabPage TP_VALIDATION_ERROR
};
Edit EDT_TITLE
{
+ HelpID = "sc:Edit:TP_VALIDATION_ERROR:EDT_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 51 ) ;
Size = MAP_APPFONT ( 171 , 12 ) ;
@@ -295,6 +310,7 @@ TabPage TP_VALIDATION_ERROR
};
ListBox LB_ACTION
{
+ HelpID = "sc:ListBox:TP_VALIDATION_ERROR:LB_ACTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 33 ) ;
Size = MAP_APPFONT ( 107 , 76 ) ;
@@ -311,6 +327,7 @@ TabPage TP_VALIDATION_ERROR
};
PushButton BTN_SEARCH
{
+ HelpID = "sc:PushButton:TP_VALIDATION_ERROR:BTN_SEARCH";
Pos = MAP_APPFONT ( 191 , 32 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index ddef0eb95bc5..1d51186f0c7a 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -77,7 +77,7 @@ TYPEINIT1(ScAreaLink,::sfx2::SvBaseLink);
ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile,
const String& rFilter, const String& rOpt,
const String& rArea, const ScRange& rDest,
- ULONG nRefresh ) :
+ sal_uLong nRefresh ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer ( nRefresh ),
pImpl ( new AreaLink_Impl() ),
@@ -86,9 +86,9 @@ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile,
aOptions (rOpt),
aSourceArea (rArea),
aDestArea (rDest),
- bAddUndo (TRUE),
- bInCreate (FALSE),
- bDoInsert (TRUE)
+ bAddUndo (sal_True),
+ bInCreate (false),
+ bDoInsert (sal_True)
{
DBG_ASSERT(pShell->ISA(ScDocShell), "ScAreaLink mit falscher ObjectShell");
pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell );
@@ -159,19 +159,19 @@ void ScAreaLink::Closed()
// Verknuepfung loeschen: Undo
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if (bAddUndo && bUndo)
{
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveAreaLink( pImpl->m_pDocSh,
aFileName, aFilterName, aOptions,
aSourceArea, aDestArea, GetRefreshDelay() ) );
- bAddUndo = FALSE; // nur einmal
+ bAddUndo = false; // nur einmal
}
SCTAB nDestTab = aDestArea.aStart.Tab();
if (pDoc->IsStreamValid(nDestTab))
- pDoc->SetStreamValid(nDestTab, FALSE);
+ pDoc->SetStreamValid(nDestTab, false);
SvBaseLink::Closed();
}
@@ -195,7 +195,7 @@ void ScAreaLink::SetSource(const String& rDoc, const String& rFlt, const String&
SetName( aNewLinkName );
}
-BOOL ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const String& rOpt,
+sal_Bool ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const String& rOpt,
const String& rSource, const ScRange& rDest ) const
{
return aFileName == rFile && aFilterName == rFilter && aOptions == rOpt &&
@@ -203,11 +203,11 @@ BOOL ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const Stri
}
// find a range with name >rAreaName< in >pSrcDoc<, return it in >rRange<
-BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName )
+sal_Bool ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName )
{
bool bFound = false;
ScRangeName* pNames = pSrcDoc->GetRangeName();
- USHORT nPos;
+ sal_uInt16 nPos;
if (pNames) // benannte Bereiche
{
const ScRangeData* p = pNames->findByName(rAreaName);
@@ -239,25 +239,25 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
// ausfuehren:
-BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
- const String& rNewArea, ULONG nNewRefresh )
+sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
+ const String& rNewArea, sal_uLong nNewRefresh )
{
// Dokument laden - wie TabLink
if (!rNewFile.Len() || !rNewFilter.Len())
- return FALSE;
+ return false;
String aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) );
- BOOL bNewUrlName = (aNewUrl != aFileName);
+ sal_Bool bNewUrlName = (aNewUrl != aFileName);
const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter);
if (!pFilter)
- return FALSE;
+ return false;
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
- pDoc->SetInLinkUpdate( TRUE );
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
+ pDoc->SetInLinkUpdate( sal_True );
// wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
if ( rNewFilter != aFilterName )
@@ -268,8 +268,9 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if ( aOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
- SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter);
+ SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, false, pFilter);
+ // aRef->DoClose() will be closed explicitly, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
SfxObjectShellRef aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
@@ -325,7 +326,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
}
//! check CanFitBlock only if bDoInsert is set?
- BOOL bCanDo = ValidColRow( aNewRange.aEnd.Col(), aNewRange.aEnd.Row() ) &&
+ sal_Bool bCanDo = ValidColRow( aNewRange.aEnd.Col(), aNewRange.aEnd.Row() ) &&
pDoc->CanFitBlock( aOldRange, aNewRange );
if (bCanDo)
{
@@ -351,16 +352,16 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
{
pUndoDoc->InitUndo( pDoc, 0, pDoc->GetTableCount()-1 );
pDoc->CopyToDocument( 0,0,0,MAXCOL,MAXROW,MAXTAB,
- IDF_FORMULA, FALSE, pUndoDoc ); // alle Formeln
+ IDF_FORMULA, false, pUndoDoc ); // alle Formeln
}
else
pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
- pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
}
else // ohne Einfuegen
{
pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
- pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
}
}
@@ -409,7 +410,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewTokenRange );
- pDoc->CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, FALSE );
+ pDoc->CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, false );
aNewTokenRange.aStart.SetRow( aNewTokenRange.aEnd.Row() + 2 );
}
}
@@ -426,7 +427,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
{
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nDestTab, nDestTab );
- pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, pRedoDoc );
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoUpdateAreaLink( pImpl->m_pDocSh,
@@ -469,7 +470,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
}
else
{
- // CanFitBlock FALSE -> Probleme mit zusammengefassten Zellen
+ // CanFitBlock sal_False -> Probleme mit zusammengefassten Zellen
// oder Tabellengrenze erreicht!
//! Zellschutz ???
@@ -484,7 +485,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
aRef->DoClose();
- pDoc->SetInLinkUpdate( FALSE );
+ pDoc->SetInLinkUpdate( false );
if (bCanDo)
{
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index cc00106a4a2e..bfb7c8f3c9a1 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -42,26 +42,26 @@ struct ScAutoStyleInitData
{
ScRange aRange;
String aStyle1;
- ULONG nTimeout;
+ sal_uLong nTimeout;
String aStyle2;
- ScAutoStyleInitData( const ScRange& rR, const String& rSt1, ULONG nT, const String& rSt2 ) :
+ ScAutoStyleInitData( const ScRange& rR, const String& rSt1, sal_uLong nT, const String& rSt2 ) :
aRange(rR), aStyle1(rSt1), nTimeout(nT), aStyle2(rSt2) {}
};
struct ScAutoStyleData
{
- ULONG nTimeout;
+ sal_uLong nTimeout;
ScRange aRange;
String aStyle;
- ScAutoStyleData( ULONG nT, const ScRange& rR, const String& rT ) :
+ ScAutoStyleData( sal_uLong nT, const ScRange& rR, const String& rT ) :
nTimeout(nT), aRange(rR), aStyle(rT) {}
};
-inline ULONG TimeNow() // Sekunden
+inline sal_uLong TimeNow() // Sekunden
{
- return (ULONG) time(0);
+ return (sal_uLong) time(0);
}
ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell) :
@@ -79,7 +79,7 @@ ScAutoStyleList::~ScAutoStyleList()
// initial short delay (asynchronous call)
void ScAutoStyleList::AddInitial( const ScRange& rRange, const String& rStyle1,
- ULONG nTimeout, const String& rStyle2 )
+ sal_uLong nTimeout, const String& rStyle2 )
{
aInitials.push_back(new ScAutoStyleInitData( rRange, rStyle1, nTimeout, rStyle2 ));
aInitTimer.Start();
@@ -103,10 +103,10 @@ IMPL_LINK( ScAutoStyleList, InitHdl, Timer*, EMPTYARG )
return 0;
}
-void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle )
+void ScAutoStyleList::AddEntry( sal_uLong nTimeout, const ScRange& rRange, const String& rStyle )
{
aTimer.Stop();
- ULONG nNow = TimeNow();
+ sal_uLong nNow = TimeNow();
aEntries.erase(std::remove_if(aEntries.begin(),aEntries.end(),
boost::bind(&ScAutoStyleData::aRange,_1) == rRange));
@@ -131,7 +131,7 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str
StartTimer(nNow);
}
-void ScAutoStyleList::AdjustEntries( ULONG nDiff ) // Millisekunden
+void ScAutoStyleList::AdjustEntries( sal_uLong nDiff ) // Millisekunden
{
boost::ptr_vector<ScAutoStyleData>::iterator iter;
for (iter = aEntries.begin(); iter != aEntries.end(); ++iter)
@@ -171,7 +171,7 @@ void ScAutoStyleList::ExecuteAllNow()
aEntries.clear();
}
-void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
+void ScAutoStyleList::StartTimer( sal_uLong nNow ) // Sekunden
{
// ersten Eintrag mit Timeout != 0 suchen
boost::ptr_vector<ScAutoStyleData>::iterator iter = std::find_if(aEntries.begin(),aEntries.end(),
@@ -188,7 +188,7 @@ void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
IMPL_LINK( ScAutoStyleList, TimerHdl, Timer*, EMPTYARG )
{
- ULONG nNow = TimeNow();
+ sal_uLong nNow = TimeNow();
AdjustEntries(aTimer.GetTimeout()); // eingestellte Wartezeit
ExecuteEntries();
StartTimer(nNow);
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 96228b2256f3..7ff1efa3cb78 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -61,14 +61,14 @@
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, sal_Bool /* bApi */ )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDBCollection* pUndoColl = NULL;
if (bUndo)
@@ -81,19 +81,19 @@ BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /
// #i55926# While loading XML, formula cells only have a single string token,
// so CompileDBFormula would never find any name (index) tokens, and would
// unnecessarily loop through all cells.
- BOOL bCompile = !pDoc->IsImportingXML();
+ sal_Bool bCompile = !pDoc->IsImportingXML();
if ( bCompile )
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- BOOL bOk = pDocColl->Insert( pNew );
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ sal_Bool bOk = pDocColl->Insert( pNew );
if ( bCompile )
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
if (!bOk)
{
delete pNew;
delete pUndoColl;
- return FALSE;
+ return false;
}
if (bUndo)
@@ -105,17 +105,17 @@ BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- return TRUE;
+ return sal_True;
}
-BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::DeleteDBRange( const String& rName, sal_Bool /* bApi */ )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pDocColl->SearchName( rName, nPos ))
{
ScDocShellModificator aModificator( rDocShell );
@@ -124,9 +124,9 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
if (bUndo)
pUndoColl = new ScDBCollection( *pDocColl );
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
pDocColl->AtFree( nPos );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
if (bUndo)
{
@@ -137,21 +137,21 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
-BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, sal_Bool /* bApi */ )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
- USHORT nPos = 0;
- USHORT nDummy = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nDummy = 0;
if ( pDocColl->SearchName( rOld, nPos ) &&
!pDocColl->SearchName( rNew, nDummy ) )
{
@@ -163,15 +163,15 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /*
ScDBCollection* pUndoColl = new ScDBCollection( *pDocColl );
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
pDocColl->AtFree( nPos );
- BOOL bInserted = pDocColl->Insert( pNewData );
+ sal_Bool bInserted = pDocColl->Insert( pNewData );
if (!bInserted) // Fehler -> alten Zustand wiederherstellen
{
delete pNewData;
pDoc->SetDBCollection( pUndoColl ); // gehoert dann dem Dokument
}
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
if (bInserted) // Einfuegen hat geklappt
{
@@ -186,21 +186,21 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /*
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
- bDone = TRUE;
+ bDone = sal_True;
}
}
return bDone;
}
-BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
+sal_Bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, sal_Bool /* bApi */ )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection* pDocColl = pDoc->GetDBCollection();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pDocColl->SearchName( rNewData.GetName(), nPos ))
{
ScDocShellModificator aModificator( rDocShell );
@@ -210,7 +210,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
ScRange aOldRange, aNewRange;
pData->GetArea(aOldRange);
rNewData.GetArea(aNewRange);
- BOOL bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
+ sal_Bool bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
ScDBCollection* pUndoColl = NULL;
if (bUndo)
@@ -228,7 +228,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
}
aModificator.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -236,45 +236,45 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
+sal_Bool ScDBDocFunc::RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi )
{
//! auch fuer ScDBFunc::RepeatDB benutzen!
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBCollection* pColl = pDoc->GetDBCollection();
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pColl && pColl->SearchName( rDBName, nIndex ) )
{
ScDBData* pDBData = (*pColl)[nIndex];
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
- BOOL bQuery = aQueryParam.GetEntry(0).bDoQuery;
+ sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery;
ScSortParam aSortParam;
pDBData->GetSortParam( aSortParam );
- BOOL bSort = aSortParam.bDoSort[0];
+ sal_Bool bSort = aSortParam.bDoSort[0];
ScSubTotalParam aSubTotalParam;
pDBData->GetSubTotalParam( aSubTotalParam );
- BOOL bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
+ sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
if ( bQuery || bSort || bSubTotal )
{
- BOOL bQuerySize = FALSE;
+ sal_Bool bQuerySize = false;
ScRange aOldQuery;
ScRange aNewQuery;
if (bQuery && !aQueryParam.bInplace)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest && pDest->IsDoSize())
{
pDest->GetArea( aOldQuery );
- bQuerySize = TRUE;
+ bQuerySize = sal_True;
}
}
@@ -307,22 +307,22 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0,
nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
pDoc->CopyToDocument( 0, static_cast<SCROW>(nOutStartRow),
nTab, MAXCOL, static_cast<SCROW>(nOutEndRow), nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
// Datenbereich sichern - incl. Filter-Ergebnis
- pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -337,23 +337,23 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
{
// Sortieren ohne SubTotals
- aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt
- DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi );
+ aSubTotalParam.bRemoveOnly = sal_True; // wird unten wieder zurueckgesetzt
+ DoSubTotals( nTab, aSubTotalParam, NULL, false, bApi );
}
if (bSort)
{
pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben
- Sort( nTab, aSortParam, FALSE, FALSE, bApi );
+ Sort( nTab, aSortParam, false, false, bApi );
}
if (bQuery)
{
pDBData->GetQueryParam( aQueryParam ); // Bereich kann sich geaendert haben
ScRange aAdvSource;
if (pDBData->GetAdvancedQuerySource(aAdvSource))
- Query( nTab, aQueryParam, &aAdvSource, FALSE, bApi );
+ Query( nTab, aQueryParam, &aAdvSource, false, bApi );
else
- Query( nTab, aQueryParam, NULL, FALSE, bApi );
+ Query( nTab, aQueryParam, NULL, false, bApi );
// bei nicht-inplace kann die Tabelle umgestellt worden sein
// if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -362,8 +362,8 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
if (bSubTotal)
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
- aSubTotalParam.bRemoveOnly = FALSE;
- DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi );
+ aSubTotalParam.bRemoveOnly = false;
+ DoSubTotals( nTab, aSubTotalParam, NULL, false, bApi );
}
if (bRecord)
@@ -379,7 +379,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
if (bQuerySize)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest)
{
pDest->GetArea( aNewQuery );
@@ -401,7 +401,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
- bDone = TRUE;
+ bDone = sal_True;
}
else if (!bApi) // "Keine Operationen auszufuehren"
rDocShell.ErrorMessage(STR_MSSG_REPEATDB_0);
@@ -412,14 +412,14 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
- BOOL bRecord, BOOL bPaint, BOOL bApi )
+sal_Bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nSrcTab = nTab;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
@@ -428,15 +428,15 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if (!pDBData)
{
OSL_FAIL( "Sort: keine DBData" );
- return FALSE;
+ return false;
}
ScDBData* pDestData = NULL;
ScRange aOldDest;
- BOOL bCopy = !rSortParam.bInplace;
+ sal_Bool bCopy = !rSortParam.bInplace;
if ( bCopy && rSortParam.nDestCol == rSortParam.nCol1 &&
rSortParam.nDestRow == rSortParam.nRow1 && rSortParam.nDestTab == nTab )
- bCopy = FALSE;
+ bCopy = false;
ScSortParam aLocalParam( rSortParam );
if ( bCopy )
{
@@ -445,12 +445,12 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
nTab = rSortParam.nDestTab;
pDestData = pDoc->GetDBAtCursor( rSortParam.nDestCol, rSortParam.nDestRow,
- rSortParam.nDestTab, TRUE );
+ rSortParam.nDestTab, sal_True );
if (pDestData)
pDestData->GetArea(aOldDest);
}
@@ -461,7 +461,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if ( aLocalParam.bIncludePattern && pDoc->HasAttrib(
@@ -472,7 +472,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
// Merge-Attribute wuerden beim Sortieren durcheinanderkommen
if (!bApi)
rDocShell.ErrorMessage(STR_SORT_ERR_MERGED);
- return FALSE;
+ return false;
}
@@ -480,11 +480,11 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bRepeatQuery = FALSE; // bestehenden Filter wiederholen?
+ sal_Bool bRepeatQuery = false; // bestehenden Filter wiederholen?
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
if ( aQueryParam.GetEntry(0).bDoQuery )
- bRepeatQuery = TRUE;
+ bRepeatQuery = sal_True;
if (bRepeatQuery && bCopy)
{
@@ -492,7 +492,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
aQueryParam.nDestCol != rSortParam.nDestCol ||
aQueryParam.nDestRow != rSortParam.nDestRow ||
aQueryParam.nDestTab != rSortParam.nDestTab ) // Query auf selben Zielbereich?
- bRepeatQuery = FALSE;
+ bRepeatQuery = false;
}
ScUndoSort* pUndoAction = 0;
@@ -503,7 +503,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
// Zeilenhoehen immer (wegen automatischer Anpassung)
//! auf ScBlockUndo umstellen
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
/* #i59745# Do not copy note captions to undo document. All existing
caption objects will be repositioned while sorting which is tracked
@@ -512,7 +512,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
existing captions) will be copied back into the source document. */
pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nTab,
aLocalParam.nCol2, aLocalParam.nRow2, nTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
const ScRange* pR = 0;
if (pDestData)
@@ -523,7 +523,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
caption objects are reinserted with drawing undo, and the cells
with the old notes (which still refer to the existing captions)
will be copied back into the source document. */
- pDoc->CopyToDocument( aOldDest, IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldDest, IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
pR = &aOldDest;
}
@@ -531,7 +531,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
//! auf ScBlockUndo umstellen
// if (bRepeatQuery)
pDoc->CopyToDocument( 0, aLocalParam.nRow1, nTab, MAXCOL, aLocalParam.nRow2, nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
ScDBCollection* pUndoDB = NULL;
ScDBCollection* pDocDB = pDoc->GetDBCollection();
@@ -555,21 +555,21 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
rSortParam.nCol2,rSortParam.nRow2,nSrcTab );
ScAddress aDest( rSortParam.nDestCol, rSortParam.nDestRow, rSortParam.nDestTab );
- rDocShell.GetDocFunc().MoveBlock( aSource, aDest, FALSE, FALSE, FALSE, TRUE );
+ rDocShell.GetDocFunc().MoveBlock( aSource, aDest, false, false, false, sal_True );
}
// don't call ScDocument::Sort with an empty SortParam (may be empty here if bCopy is set)
if ( aLocalParam.bDoSort[0] )
pDoc->Sort( nTab, aLocalParam, bRepeatQuery );
- BOOL bSave = TRUE;
+ sal_Bool bSave = sal_True;
if (bCopy)
{
ScSortParam aOldSortParam;
pDBData->GetSortParam( aOldSortParam );
if ( aOldSortParam.bDoSort[0] && aOldSortParam.bInplace ) // Inplace-Sortierung gemerkt?
{
- bSave = FALSE;
+ bSave = false;
aOldSortParam.nDestCol = rSortParam.nDestCol;
aOldSortParam.nDestRow = rSortParam.nDestRow;
aOldSortParam.nDestTab = rSortParam.nDestTab;
@@ -616,7 +616,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if (bPaint)
{
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
SCCOL nStartX = aLocalParam.nCol1;
SCROW nStartY = aLocalParam.nRow1;
SCCOL nEndX = aLocalParam.nCol2;
@@ -646,25 +646,25 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
- const ScRange* pAdvSource, BOOL bRecord, BOOL bApi )
+sal_Bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
+ const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rQueryParam.nCol1, rQueryParam.nRow1,
rQueryParam.nCol2, rQueryParam.nRow2 );
if (!pDBData)
{
OSL_FAIL( "Query: keine DBData" );
- return FALSE;
+ return false;
}
// Wechsel von Inplace auf nicht-Inplace, dann erst Inplace aufheben:
@@ -680,23 +680,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
SCSIZE nEC = aOldQuery.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
- aOldQuery.GetEntry(i).bDoQuery = FALSE;
- aOldQuery.bDuplicate = TRUE;
+ aOldQuery.GetEntry(i).bDoQuery = false;
+ aOldQuery.bDuplicate = sal_True;
Query( nTab, aOldQuery, NULL, bRecord, bApi );
}
}
ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich
- BOOL bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
+ sal_Bool bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
ScDBData* pDestData = NULL; // Bereich, in den kopiert wird
- BOOL bDoSize = FALSE; // Zielgroesse anpassen (einf./loeschen)
+ sal_Bool bDoSize = false; // Zielgroesse anpassen (einf./loeschen)
SCCOL nFormulaCols = 0; // nur bei bDoSize
- BOOL bKeepFmt = FALSE;
+ sal_Bool bKeepFmt = false;
ScRange aOldDest;
ScRange aDestTotal;
if ( bCopy && rQueryParam.nDestCol == rQueryParam.nCol1 &&
rQueryParam.nDestRow == rQueryParam.nRow1 && rQueryParam.nDestTab == nTab )
- bCopy = FALSE;
+ bCopy = false;
SCTAB nDestTab = nTab;
if ( bCopy )
{
@@ -706,7 +706,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
ScEditableTester aTester( pDoc, nDestTab, aLocalParam.nCol1,aLocalParam.nRow1,
@@ -715,11 +715,11 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
pDestData = pDoc->GetDBAtCursor( rQueryParam.nDestCol, rQueryParam.nDestRow,
- rQueryParam.nDestTab, TRUE );
+ rQueryParam.nDestTab, sal_True );
if (pDestData)
{
pDestData->GetArea( aOldDest );
@@ -747,7 +747,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_DOSUBTOTALS_2); // kann keine Zeilen einfuegen
- return FALSE;
+ return false;
}
}
}
@@ -756,14 +756,14 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bKeepSub = FALSE; // bestehende Teilergebnisse wiederholen?
+ sal_Bool bKeepSub = false; // bestehende Teilergebnisse wiederholen?
ScSubTotalParam aSubTotalParam;
if (rQueryParam.GetEntry(0).bDoQuery) // nicht beim Aufheben
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Teilergebnisse vorhanden?
if ( aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly )
- bKeepSub = TRUE;
+ bKeepSub = sal_True;
}
ScDocument* pUndoDoc = NULL;
@@ -775,23 +775,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bCopy)
{
- pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab, false, sal_True );
pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// Attribute sichern, falls beim Filtern mitkopiert
if (pDestData)
{
- pDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
pOld = &aOldDest;
}
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
pDoc->CopyToDocument( 0, rQueryParam.nRow1, nTab, MAXCOL, rQueryParam.nRow2, nTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
}
ScDBCollection* pDocDB = pDoc->GetDBCollection();
@@ -818,8 +818,8 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
aAttribRange.aEnd.SetCol( aAttribRange.aEnd.Col() + nFormulaCols );
pAttribDoc = new ScDocument( SCDOCMODE_UNDO );
- pAttribDoc->InitUndo( pDoc, nDestTab, nDestTab, FALSE, TRUE );
- pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, FALSE, pAttribDoc );
+ pAttribDoc->InitUndo( pDoc, nDestTab, nDestTab, false, sal_True );
+ pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, false, pAttribDoc );
}
if ( bDoSize )
@@ -843,7 +843,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
ScRange aNewDest( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab );
- pDoc->FitBlock( aDestTotal, aNewDest, FALSE ); // FALSE - nicht loeschen
+ pDoc->FitBlock( aDestTotal, aNewDest, false ); // sal_False - nicht loeschen
if ( nFormulaCols > 0 )
{
@@ -854,7 +854,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
aLocalParam.nCol2+nFormulaCols, aLocalParam.nRow2, nDestTab );
ScRange aOldForm = aNewForm;
aOldForm.aEnd.SetRow( aOldDest.aEnd.Row() );
- pDoc->FitBlock( aOldForm, aNewForm, FALSE );
+ pDoc->FitBlock( aOldForm, aNewForm, false );
ScMarkData aMark;
aMark.SelectOneTable(nDestTab);
@@ -873,7 +873,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
ScRange aHdrRange = aAttribRange;
aHdrRange.aEnd.SetRow( aHdrRange.aStart.Row() );
- pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, FALSE, pDoc );
+ pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, false, pDoc );
}
// Daten
@@ -902,7 +902,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
// speichern: Inplace immer, sonst je nach Einstellung
// alter Inplace-Filter ist ggf. schon aufgehoben
- BOOL bSave = rQueryParam.bInplace || rQueryParam.bDestPers;
+ sal_Bool bSave = rQueryParam.bInplace || rQueryParam.bDestPers;
if (bSave) // merken
{
pDBData->SetQueryParam( rQueryParam );
@@ -979,31 +979,31 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
PAINT_GRID | PAINT_LEFT );
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
- const ScSortParam* pForceNewSort, BOOL bRecord, BOOL bApi )
+sal_Bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
+ const ScSortParam* pForceNewSort, sal_Bool bRecord, sal_Bool bApi )
{
//! auch fuer ScDBFunc::DoSubTotals benutzen!
// dann bleibt aussen:
// - neuen Bereich (aus DBData) markieren
// - SelectionChanged (?)
- BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen
- BOOL bRet = FALSE;
+ sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen
+ sal_Bool bRet = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1,
rParam.nCol2, rParam.nRow2 );
if (!pDBData)
{
OSL_FAIL( "SubTotals: keine DBData" );
- return FALSE;
+ return false;
}
ScEditableTester aTester( pDoc, nTab, 0,rParam.nRow1+1, MAXCOL,MAXROW );
@@ -1011,7 +1011,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if (pDoc->HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab,
@@ -1019,10 +1019,10 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
{
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen
- return FALSE;
+ return false;
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if (rParam.bReplace)
if (pDoc->TestRemoveSubTotals( nTab, rParam ))
{
@@ -1046,7 +1046,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
if (bRecord) // alte Daten sichern
{
- BOOL bOldFilter = bDo && rParam.bDoSort;
+ sal_Bool bOldFilter = bDo && rParam.bDoSort;
SCTAB nTabCount = pDoc->GetTableCount();
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1061,20 +1061,20 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, bOldFilter );
// Datenbereich sichern - incl. Filter-Ergebnis
pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -1092,7 +1092,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
if (rParam.bReplace)
pDoc->RemoveSubTotals( nTab, aNewParam );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if (bDo)
{
// Sortieren
@@ -1106,7 +1106,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
ScSortParam aOldSort;
pDBData->GetSortParam( aOldSort );
ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort );
- Sort( nTab, aSortParam, FALSE, FALSE, bApi );
+ Sort( nTab, aSortParam, false, false, bApi );
}
pDoc->InitializeNoteCaptions(nTab);
@@ -1150,7 +1150,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
//==================================================================
-BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rExcept )
+sal_Bool lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rExcept )
{
ScCellIterator aIter( pDoc, rRange );
ScBaseCell* pCell = aIter.GetFirst();
@@ -1159,23 +1159,23 @@ BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rE
if ( !pCell->IsBlank() ) // real content?
{
if ( !rExcept.In( ScAddress( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ) ) )
- return FALSE; // cell found
+ return false; // cell found
}
pCell = aIter.GetNext();
}
- return TRUE; // nothing found - empty
+ return sal_True; // nothing found - empty
}
-BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
- BOOL bRecord, BOOL bApi, BOOL bAllowMove )
+sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
+ sal_Bool bRecord, sal_Bool bApi, sal_Bool bAllowMove )
{
ScDocShellModificator aModificator( rDocShell );
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bDone = FALSE;
- BOOL bUndoSelf = FALSE;
- USHORT nErrId = 0;
+ sal_Bool bDone = false;
+ sal_Bool bUndoSelf = false;
+ sal_uInt16 nErrId = 0;
ScDocument* pOldUndoDoc = NULL;
ScDocument* pNewUndoDoc = NULL;
@@ -1185,7 +1185,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( !rDocShell.IsEditable() || pDoc->GetChangeTrack() )
{
// not recorded -> disallow
@@ -1226,7 +1226,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
pOldUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pOldUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pOldUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL, false, pOldUndoDoc );
}
pDoc->DeleteAreaTab( aRange.aStart.Col(), aRange.aStart.Row(),
@@ -1242,7 +1242,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
rDocShell.PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), nTab,
aRange.aEnd.Col(), aRange.aEnd.Row(), nTab,
PAINT_GRID );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( pNewObj )
{
@@ -1254,7 +1254,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
SCTAB nTab = aRange.aStart.Tab();
pOldUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pOldUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pOldUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL, false, pOldUndoDoc );
}
if ( pNewObj == pOldObj )
@@ -1286,7 +1286,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( pDoc->GetDPCollection()->GetByName(pDestObj->GetName()) )
pDestObj->SetName( String() ); // ignore the invalid name, create a new name below
- pDestObj->SetAlive(TRUE);
+ pDestObj->SetAlive(sal_True);
if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) )
{
OSL_FAIL("cannot insert DPObject");
@@ -1321,7 +1321,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
aNewOut.aStart.SetRow( aOldRange.aStart.Row() );
aNewOut.aEnd.SetRow( aNewOut.aEnd.Row()+nDiff );
if( !ValidRow( aNewOut.aStart.Row() ) || !ValidRow( aNewOut.aEnd.Row() ) )
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
@@ -1329,7 +1329,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
// like with STR_PROTECTIONERR, use undo to reverse everything
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
- bUndoSelf = TRUE;
+ bUndoSelf = sal_True;
nErrId = STR_PIVOT_ERROR;
}
else
@@ -1343,7 +1343,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
// quick solution: proceed to end, use undo action
// to reverse everything:
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
- bUndoSelf = TRUE;
+ bUndoSelf = sal_True;
nErrId = aTester.GetMessageId();
}
}
@@ -1351,7 +1351,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
// test if new output area is empty except for old area
if ( !bApi )
{
- BOOL bEmpty;
+ sal_Bool bEmpty;
if ( pOldObj ) // OutRange of pOldObj (pDestObj) is still old area
bEmpty = lcl_EmptyExcept( pDoc, aNewOut, pOldObj->GetOutRange() );
else
@@ -1367,7 +1367,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
//! like above (not editable), use undo to reverse everything
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
- bUndoSelf = TRUE;
+ bUndoSelf = sal_True;
}
}
}
@@ -1377,13 +1377,13 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
SCTAB nTab = aNewOut.aStart.Tab();
pNewUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pNewUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( aNewOut, IDF_ALL, FALSE, pNewUndoDoc );
+ pDoc->CopyToDocument( aNewOut, IDF_ALL, false, pNewUndoDoc );
}
pDestObj->Output( aNewOut.aStart );
rDocShell.PostPaintGridAll(); //! only necessary parts
- bDone = TRUE;
+ bDone = sal_True;
}
}
// else nothing (no old, no new)
@@ -1404,7 +1404,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
pAction->Undo();
delete pAction;
- bDone = FALSE;
+ bDone = false;
}
else
rDocShell.GetUndoManager()->AddUndoAction( pAction );
@@ -1433,8 +1433,8 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
// Datenbank-Import...
void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
- const String& rTableName, const String& rStatement, BOOL bNative,
- BYTE nType, const ::com::sun::star::uno::Reference<
+ const String& rTableName, const String& rStatement, sal_Bool bNative,
+ sal_uInt8 nType, const ::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet >& xResultSet,
const SbaSelectionList* pSelection )
{
@@ -1444,13 +1444,13 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
ScDBCollection& rDBColl = *pDoc->GetDBCollection();
ScDBData* pData = NULL;
ScImportParam aImportParam;
- BOOL bFound = FALSE;
- USHORT nCount = rDBColl.GetCount();
- for (USHORT i=0; i<nCount && !bFound; i++)
+ sal_Bool bFound = false;
+ sal_uInt16 nCount = rDBColl.GetCount();
+ for (sal_uInt16 i=0; i<nCount && !bFound; i++)
{
pData = rDBColl[i];
if (pData->GetName() == rTarget)
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
{
@@ -1466,15 +1466,15 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
pData->GetImportParam( aImportParam );
- BOOL bSql = ( rStatement.Len() != 0 );
+ sal_Bool bSql = ( rStatement.Len() != 0 );
aImportParam.aDBName = rDBName;
aImportParam.bSql = bSql;
aImportParam.aStatement = bSql ? rStatement : rTableName;
aImportParam.bNative = bNative;
aImportParam.nType = nType;
- aImportParam.bImport = TRUE;
- BOOL bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, TRUE );
+ aImportParam.bImport = sal_True;
+ sal_Bool bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, sal_True );
// DB-Operationen wiederholen
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 92c411ea5638..fb5951338e37 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -119,15 +119,15 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
+sal_Bool ScDBDocFunc::DoImportUno( const ScAddress& rPos,
const uno::Sequence<beans::PropertyValue>& aArgs )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScImportParam aImParam;
aImParam.nCol1 = aImParam.nCol2 = rPos.Col();
aImParam.nRow1 = aImParam.nRow2 = rPos.Row();
- aImParam.bImport = TRUE;
+ aImParam.bImport = sal_True;
uno::Reference<sdbc::XResultSet> xResSet;
uno::Sequence<uno::Any> aSelection;
@@ -157,7 +157,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
if ( rProp.Value >>= nType )
{
aImParam.bSql = ( nType == sdb::CommandType::COMMAND );
- aImParam.nType = sal::static_int_cast<BYTE>( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable );
+ aImParam.nType = sal::static_int_cast<sal_uInt8>( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable );
// nType is ignored if bSql is set
}
}
@@ -180,10 +180,10 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
aList.Insert( (void*)(sal_IntPtr)nEntry, LIST_APPEND );
}
- BOOL bAddrInsert = FALSE; //!???
+ sal_Bool bAddrInsert = false; //!???
if ( bAddrInsert )
{
- bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, TRUE, bAddrInsert );
+ bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, sal_True, bAddrInsert );
}
else
{
@@ -204,7 +204,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
UpdateImport( sTarget, aImParam.aDBName, aTableName, aStatement,
aImParam.bNative, aImParam.nType, xResSet, &aList );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -212,16 +212,16 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
// -----------------------------------------------------------------
-BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
+sal_Bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
const uno::Reference< sdbc::XResultSet >& xResultSet,
- const SbaSelectionList* pSelection, BOOL bRecord, BOOL bAddrInsert )
+ const SbaSelectionList* pSelection, sal_Bool bRecord, sal_Bool bAddrInsert )
{
ScDocument* pDoc = rDocShell.GetDocument();
ScChangeTrack *pChangeTrack = NULL;
ScRange aChangedRange;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = 0;
if ( !bAddrInsert )
@@ -231,7 +231,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (!pDBData)
{
OSL_FAIL( "DoImport: no DBData" );
- return FALSE;
+ return false;
}
}
@@ -240,10 +240,10 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pWaitWin->EnterWait();
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
- BOOL bApi = FALSE; //! pass as argument
- BOOL bTruncated = FALSE; // for warning
- USHORT nErrStringId = 0;
+ sal_Bool bSuccess = false;
+ sal_Bool bApi = false; //! pass as argument
+ sal_Bool bTruncated = false; // for warning
+ sal_uInt16 nErrStringId = 0;
String aErrorMessage;
SCCOL nCol = rParam.nCol1;
@@ -252,16 +252,16 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
SCROW nEndRow = nRow;
long i;
- BOOL bDoSelection = FALSE;
- BOOL bRealSelection = FALSE; // TRUE if not everything is selected
- ULONG nListPos = 0;
- ULONG nRowsRead = 0;
- ULONG nListCount = 0;
+ sal_Bool bDoSelection = false;
+ sal_Bool bRealSelection = false; // sal_True if not everything is selected
+ sal_uLong nListPos = 0;
+ sal_uLong nRowsRead = 0;
+ sal_uLong nListCount = 0;
// -1 is special
if ( pSelection && pSelection->Count() && (long)pSelection->GetObject(0) != -1L )
{
- bDoSelection = TRUE;
+ bDoSelection = sal_True;
nListCount = pSelection->Count();
}
@@ -282,7 +282,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
uno::Reference<sdbc::XRowSet> xRowSet = uno::Reference<sdbc::XRowSet>(
xResultSet, uno::UNO_QUERY );
- sal_Bool bDispose = sal_False;
+ sal_Bool bDispose = false;
if ( !xRowSet.is() )
{
bDispose = sal_True;
@@ -375,32 +375,32 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
++nRow;
}
- BOOL bEnd = FALSE;
+ sal_Bool bEnd = false;
if ( !bDoSelection )
xRowSet->beforeFirst();
- USHORT nInserted = 0;
+ sal_uInt16 nInserted = 0;
while ( !bEnd )
{
// skip rows that are not selected
if ( !bDoSelection )
{
- if ( (bEnd = !xRowSet->next()) == FALSE )
+ if ( (bEnd = !xRowSet->next()) == false )
++nRowsRead;
}
else
{
if (nListPos < nListCount)
{
- ULONG nNextRow = (ULONG) pSelection->GetObject(nListPos);
+ sal_uLong nNextRow = (sal_uLong) pSelection->GetObject(nListPos);
if ( nRowsRead+1 < nNextRow )
- bRealSelection = TRUE;
+ bRealSelection = sal_True;
bEnd = !xRowSet->absolute(nRowsRead = nNextRow);
++nListPos;
}
else
{
bRealSelection = xRowSet->next();
- bEnd = TRUE; // more data available but not used
+ bEnd = sal_True; // more data available but not used
}
}
@@ -430,21 +430,21 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (!aProgress.SetStateText( 0, aText )) // stopped by user?
{
- bEnd = TRUE;
- bSuccess = FALSE;
+ bEnd = sal_True;
+ bSuccess = false;
nErrStringId = STR_DATABASE_ABORTED;
}
}
}
else // past the end of the spreadsheet
{
- bEnd = TRUE; // don't continue
- bTruncated = TRUE; // warning flag
+ bEnd = sal_True; // don't continue
+ bTruncated = sal_True; // warning flag
}
}
}
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
if ( bDispose )
@@ -466,8 +466,8 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// test for cell protection
//
- BOOL bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt();
- BOOL bMoveCells = !bAddrInsert && pDBData->IsDoSize();
+ sal_Bool bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt();
+ sal_Bool bMoveCells = !bAddrInsert && pDBData->IsDoSize();
SCCOL nFormulaCols = 0; // columns to be filled with formulas
if (bMoveCells && nEndCol == rParam.nCol2)
{
@@ -490,7 +490,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( !aTester.IsEditable() )
{
nErrStringId = aTester.GetMessageId();
- bSuccess = FALSE;
+ bSuccess = false;
}
else if ( (pChangeTrack = pDoc->GetChangeTrack()) != NULL )
aChangedRange = ScRange(rParam.nCol1, rParam.nRow1, nTab,
@@ -506,7 +506,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (!pDoc->CanFitBlock( aOld, aNew ))
{
nErrStringId = STR_MSSG_DOSUBTOTALS_2; // can't insert cells
- bSuccess = FALSE;
+ bSuccess = false;
}
}
@@ -526,7 +526,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, IDF_ATTRIB );
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nMinEndCol, rParam.nRow1, nTab,
- IDF_ATTRIB, FALSE, pImportDoc );
+ IDF_ATTRIB, false, pImportDoc );
SCROW nDataStartRow = rParam.nRow1+1;
for (SCCOL nCopyCol=rParam.nCol1; nCopyCol<=nMinEndCol; nCopyCol++)
@@ -546,7 +546,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (pDoc->IsTabProtected(nTab))
{
ScPatternAttr aPattern(pImportDoc->GetPool());
- aPattern.GetItemSet().Put( ScProtectionAttr( FALSE,FALSE,FALSE,FALSE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( false,false,false,false ) );
pImportDoc->ApplyPatternAreaTab( 0,0,MAXCOL,MAXROW, nTab, aPattern );
}
@@ -579,15 +579,15 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// nFormulaCols is set only if column count is unchanged
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- nCopyFlags, FALSE, pUndoDoc );
+ nCopyFlags, false, pUndoDoc );
if ( rParam.nCol2 > nEndCol )
pDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nUndoEndCol, nUndoEndRow, nTab,
- nCopyFlags, FALSE, pUndoDoc );
+ nCopyFlags, false, pUndoDoc );
if ( rParam.nRow2 > nEndRow )
pDoc->CopyToDocument( rParam.nCol1, nEndRow+1, nTab,
nUndoEndCol+nFormulaCols, nUndoEndRow, nTab,
- nCopyFlags, FALSE, pUndoDoc );
+ nCopyFlags, false, pUndoDoc );
}
//
@@ -607,7 +607,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
rParam.nCol2+nFormulaCols, rParam.nRow2, nTab );
ScRange aNew( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab );
- pDoc->FitBlock( aOld, aNew, FALSE ); // Formeln nicht loeschen
+ pDoc->FitBlock( aOld, aNew, false ); // Formeln nicht loeschen
}
else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder
pDoc->DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
@@ -617,12 +617,12 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE );
// remove each column from ImportDoc after copying to reduce memory usage
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // outside of the loop
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // outside of the loop
for (SCCOL nCopyCol = rParam.nCol1; nCopyCol <= nEndCol; nCopyCol++)
{
pImportDoc->CopyToDocument( nCopyCol, rParam.nRow1, nTab, nCopyCol, nEndRow, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
pImportDoc->DeleteAreaTab( nCopyCol, rParam.nRow1, nCopyCol, nEndRow, nTab, IDF_CONTENTS );
pImportDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 );
}
@@ -633,7 +633,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bKeepFormat) // formats for formulas
pImportDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ATTRIB, FALSE, pDoc );
+ IDF_ATTRIB, false, pDoc );
// fill formulas
ScMarkData aMark;
aMark.SelectOneTable(nTab);
@@ -656,8 +656,8 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if( !bAddrInsert ) // update database range
{
pDBData->SetImportParam( rParam );
- pDBData->SetHeader( TRUE );
- pDBData->SetByRow( TRUE );
+ pDBData->SetHeader( sal_True );
+ pDBData->SetByRow( sal_True );
pDBData->SetArea( nTab, rParam.nCol1,rParam.nRow1, nEndCol,nEndRow );
pDBData->SetImportSelection( bRealSelection );
pDoc->CompileDBFormula();
@@ -671,7 +671,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (nFormulaCols > 0) // include filled formulas for redo
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
+ IDF_ALL & ~IDF_NOTE, false, pRedoDoc );
ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 5ad00f2a8f55..ac589ccba498 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -131,7 +131,7 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction )
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
return 0;
}
@@ -153,17 +153,17 @@ void lcl_PaintAbove( ScDocShell& rDocShell, const ScRange& rRange )
//------------------------------------------------------------------------
-BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
+sal_Bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint )
{
ScDocument* pDoc = rDocShell.GetDocument();
if ( pDoc->IsImportingXML() )
{
// for XML import, all row heights are updated together after importing
- return FALSE;
+ return false;
}
if ( !pDoc->IsAdjustHeightEnabled() )
{
- return FALSE;
+ return false;
}
SCTAB nTab = rRange.aStart.Tab();
@@ -173,8 +173,8 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
ScSizeDeviceProvider aProv( &rDocShell );
Fraction aOne(1,1);
- BOOL bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
- aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, FALSE );
+ sal_Bool bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
+ aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, false );
if ( bPaint && bChanged )
rDocShell.PostPaint( 0, nStartRow, nTab, MAXCOL, MAXROW, nTab,
@@ -186,13 +186,13 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
//------------------------------------------------------------------------
-BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -200,7 +200,7 @@ BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -224,14 +224,14 @@ BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
@@ -241,7 +241,7 @@ BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -265,14 +265,14 @@ BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -280,7 +280,7 @@ BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -304,14 +304,14 @@ BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
@@ -321,7 +321,7 @@ BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -345,14 +345,14 @@ BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos)
+sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -360,7 +360,7 @@ BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos)
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -384,14 +384,14 @@ BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos)
return bDone;
}
-BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
+sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
{
ScDocShellModificator aModificator( rDocShell );
rDocShell.MakeDrawLayer();
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
Window* pWaitWin = rDocShell.GetActiveDialogParent();
@@ -399,8 +399,8 @@ BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
pWaitWin->EnterWait();
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bOverflow;
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow );
+ sal_Bool bOverflow;
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -426,20 +426,20 @@ BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
return bDone;
}
-BOOL ScDocFunc::DetectiveDelAll(SCTAB nTab)
+sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab)
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
if (bUndo)
pModel->BeginCalcUndo();
- BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE );
+ sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
pUndo = pModel->GetCalcUndo();
@@ -468,12 +468,12 @@ BOOL ScDocFunc::DetectiveDelAll(SCTAB nTab)
return bDone;
}
-BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
+sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScDetOpList* pList = pDoc->GetDetOpList();
if ( pList && pList->Count() )
{
@@ -490,8 +490,8 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
// Wiederholen
- USHORT nCount = pList->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pList->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScDetOpData* pData = (*pList)[i];
if (pData)
@@ -536,7 +536,7 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
}
}
rDocShell.SetDrawModified();
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
@@ -582,38 +582,38 @@ void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, vector<S
//------------------------------------------------------------------------
-BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
{
OSL_FAIL("ScDocFunc::DeleteContents ohne Markierung");
- return FALSE;
+ return false;
}
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScRange aMarkRange;
- BOOL bSimple = FALSE;
+ sal_Bool bSimple = false;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // fuer MarkToMulti
+ aMultiMark.SetMarking(false); // fuer MarkToMulti
ScDocument* pUndoDoc = NULL;
- BOOL bMulti = !bSimple && aMultiMark.IsMultiMarked();
+ sal_Bool bMulti = !bSimple && aMultiMark.IsMultiMarked();
if (!bSimple)
{
aMultiMark.MarkToMulti();
@@ -622,22 +622,22 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
ScRange aExtendedRange(aMarkRange);
if (!bSimple)
{
- if ( pDoc->ExtendMerge( aExtendedRange, TRUE ) )
- bMulti = FALSE;
+ if ( pDoc->ExtendMerge( aExtendedRange, sal_True ) )
+ bMulti = false;
}
// keine Objekte auf geschuetzten Tabellen
- BOOL bObjects = FALSE;
+ sal_Bool bObjects = false;
if ( nFlags & IDF_OBJECTS )
{
- bObjects = TRUE;
+ bObjects = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aMultiMark.GetTableSelect(nTab) && pDoc->IsTabProtected(nTab))
- bObjects = FALSE;
+ bObjects = false;
}
- USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted
+ sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted
if ( nFlags & IDF_ATTRIB )
rDocShell.UpdatePaintExt( nExtFlags, aMarkRange );
@@ -668,7 +668,7 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
// bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
// nur mit IDF_HARDATTR zu langsam ist:
- USHORT nUndoDocFlags = nFlags;
+ sal_uInt16 nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
@@ -703,31 +703,31 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScRange aMarkRange;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // for MarkToMulti
+ aMultiMark.SetMarking(false); // for MarkToMulti
aMultiMark.MarkToMulti();
aMultiMark.GetMultiMarkArea( aMarkRange );
@@ -745,7 +745,7 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pUndoDoc, &aMultiMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pUndoDoc, &aMultiMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTransliterate( &rDocShell, aMultiMark, pUndoDoc, nType ) );
@@ -758,31 +758,31 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi )
+sal_Bool ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
SCTAB* pTabs = NULL;
ScBaseCell** ppOldCells = NULL;
- BOOL* pHasFormat = NULL;
- ULONG* pOldFormats = NULL;
+ sal_Bool* pHasFormat = NULL;
+ sal_uLong* pOldFormats = NULL;
ScBaseCell* pDocCell = pDoc->GetCell( rPos );
- BOOL bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
+ sal_Bool bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
if (bUndo)
{
pTabs = new SCTAB[1];
@@ -790,18 +790,18 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO
ppOldCells = new ScBaseCell*[1];
ppOldCells[0] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0;
- pHasFormat = new BOOL[1];
- pOldFormats = new ULONG[1];
+ pHasFormat = new sal_Bool[1];
+ pOldFormats = new sal_uLong[1];
const SfxPoolItem* pItem;
const ScPatternAttr* pPattern = pDoc->GetPattern( rPos.Col(),rPos.Row(),rPos.Tab() );
if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState(
- ATTR_VALUE_FORMAT,FALSE,&pItem) )
+ ATTR_VALUE_FORMAT,false,&pItem) )
{
- pHasFormat[0] = TRUE;
+ pHasFormat[0] = sal_True;
pOldFormats[0] = ((const SfxUInt32Item*)pItem)->GetValue();
}
else
- pHasFormat[0] = FALSE;
+ pHasFormat[0] = false;
}
pDoc->SetString( rPos.Col(), rPos.Row(), rPos.Tab(), rText );
@@ -823,15 +823,15 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO
if (bApi)
NotifyInputHandler( rPos );
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi )
+sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
- BOOL bXMLLoading(pDoc->IsImportingXML());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bXMLLoading(pDoc->IsImportingXML());
// #i925#; it is not neccessary to test whether the cell is editable on loading a XML document
if (!bXMLLoading)
@@ -842,14 +842,14 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
pNewCell->Delete();
- return FALSE;
+ return false;
}
}
- BOOL bEditCell = ( pNewCell->GetCellType() == CELLTYPE_EDIT );
+ sal_Bool bEditCell = ( pNewCell->GetCellType() == CELLTYPE_EDIT );
ScBaseCell* pDocCell = pDoc->GetCell( rPos );
- BOOL bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
- BOOL bHeight = ( bEditDeleted || bEditCell ||
+ sal_Bool bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT);
+ sal_Bool bHeight = ( bEditDeleted || bEditCell ||
pDoc->HasAttrib( ScRange(rPos), HASATTR_NEEDHEIGHT ) );
ScBaseCell* pUndoCell = (bUndo && pDocCell) ? pDocCell->CloneWithoutNote( *pDoc, rPos ) : 0;
@@ -877,16 +877,16 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi
if (bApi && !bXMLLoading)
NotifyInputHandler( rPos );
- return TRUE;
+ return sal_True;
}
-void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
+void ScDocFunc::NotifyInputHandler( const ScAddress& rPos )
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh && pViewSh->GetViewData()->GetDocShell() == &rDocShell )
{
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
- if ( pInputHdl )
+ if ( pInputHdl && pInputHdl->GetCursorPos() == rPos )
{
sal_Bool bIsEditMode(pInputHdl->IsEditMode());
@@ -894,30 +894,30 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
// (the cell shows the same like the InputWindow)
if (bIsEditMode)
pInputHdl->SetModified();
- pViewSh->UpdateInputHandler(FALSE, !bIsEditMode);
+ pViewSh->UpdateInputHandler(false, !bIsEditMode);
}
}
}
struct ScMyRememberItem
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
SfxItemSet aItemSet;
- ScMyRememberItem(const SfxItemSet& rItemSet, USHORT nTempIndex) :
+ ScMyRememberItem(const SfxItemSet& rItemSet, sal_uInt16 nTempIndex) :
nIndex(nTempIndex), aItemSet(rItemSet) {}
};
typedef ::std::list<ScMyRememberItem*> ScMyRememberItemList;
-BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, BOOL bInterpret, BOOL bApi )
+sal_Bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, sal_Bool bInterpret, sal_Bool bApi )
{
// PutData ruft PutCell oder SetNormalString
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDocument* pDoc = rDocShell.GetDocument();
ScEditAttrTester aTester( &rEngine );
- BOOL bEditCell = aTester.NeedsObject();
+ sal_Bool bEditCell = aTester.NeedsObject();
if ( bEditCell )
{
// #i61702# With bLoseContent set, the content of rEngine isn't restored
@@ -927,7 +927,7 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
sal_Bool bUpdateMode(rEngine.GetUpdateMode());
if (bUpdateMode)
- rEngine.SetUpdateMode(sal_False);
+ rEngine.SetUpdateMode(false);
ScMyRememberItemList aRememberItems;
ScMyRememberItem* pRememberItem = NULL;
@@ -936,8 +936,8 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
// not only alignment, so the object doesn't contain the cell attributes as
// paragraph attributes. Before remove the attributes store they in a list to
// set they back to the EditEngine.
- USHORT nCount = rEngine.GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const SfxItemSet& rOld = rEngine.GetParaAttribs( i );
if ( rOld.Count() )
@@ -994,9 +994,9 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
if ( aPattern.GetItemSet().Count() > 0 )
{
ScMarkData aMark;
- aMark.SelectTable( rPos.Tab(), TRUE );
+ aMark.SelectTable( rPos.Tab(), sal_True );
aMark.SetMarkArea( ScRange( rPos ) );
- ApplyAttributes( aMark, aPattern, TRUE, bApi );
+ ApplyAttributes( aMark, aPattern, sal_True, bApi );
}
}
@@ -1015,7 +1015,7 @@ ScTokenArray* lcl_ScDocFunc_CreateTokenArrayXML( const String& rText, const Stri
ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
- const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
+ const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar, short* pRetFormatType )
{
ScDocument* pDoc = rDocShell.GetDocument();
ScBaseCell* pNewCell = NULL;
@@ -1049,7 +1049,12 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
sal_uInt32 nEnglish = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US);
double fVal;
if ( pFormatter->IsNumberFormat( rText, nEnglish, fVal ) )
+ {
pNewCell = new ScValueCell( fVal );
+ // return the format type from the English format, so a localized format can be created
+ if ( pRetFormatType )
+ *pRetFormatType = pFormatter->GetType( nEnglish );
+ }
else if ( rText.Len() )
pNewCell = ScBaseCell::CreateTextCell( rText, pDoc );
@@ -1061,8 +1066,8 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
}
-BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
- BOOL bInterpret, BOOL bEnglish, BOOL bApi,
+sal_Bool ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
+ sal_Bool bInterpret, sal_Bool bEnglish, sal_Bool bApi,
const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
// SetCellText ruft PutCell oder SetNormalString
@@ -1110,7 +1115,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
rDocShell.GetUndoManager()->AddUndoAction( new ScUndoShowHideNote( rDocShell, rPos, bShow ) );
if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), FALSE);
+ rDoc.SetStreamValid(rPos.Tab(), false);
rDocShell.SetDocumentModified();
@@ -1119,7 +1124,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
//------------------------------------------------------------------------
-bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bApi )
+bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -1141,7 +1146,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA
//! Undo !!!
if (pDoc->IsStreamValid(rPos.Tab()))
- pDoc->SetStreamValid(rPos.Tab(), FALSE);
+ pDoc->SetStreamValid(rPos.Tab(), false);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -1151,7 +1156,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA
//------------------------------------------------------------------------
-bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi )
+bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, sal_Bool bApi )
{
bool bDone = false;
@@ -1161,7 +1166,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
if (aTester.IsEditable())
{
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- SfxUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
ScNoteData aOldData;
ScPostIt* pOldNote = rDoc.ReleaseNote( rPos );
@@ -1198,7 +1203,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
rDocShell.PostPaintCell( rPos );
if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), FALSE);
+ rDoc.SetStreamValid(rPos.Tab(), false);
aModificator.SetDocumentModified();
bDone = true;
@@ -1213,23 +1218,23 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
//------------------------------------------------------------------------
-BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
if ( bRecord && !pDoc->IsUndoEnabled() )
- bRecord = FALSE;
+ bRecord = false;
- BOOL bImportingXML = pDoc->IsImportingXML();
+ sal_Bool bImportingXML = pDoc->IsImportingXML();
// Cell formats can still be set if the range isn't editable only because of matrix formulas.
// #i62483# When loading XML, the check can be skipped altogether.
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !bImportingXML && !pDoc->IsSelectionEditable( rMark, &bOnlyNotBecauseOfMatrix )
&& !bOnlyNotBecauseOfMatrix )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScDocShellModificator aModificator( rDocShell );
@@ -1237,7 +1242,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
//! Umrandung
ScRange aMultiRange;
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if ( bMulti )
rMark.GetMultiMarkArea( aMultiRange );
else
@@ -1258,7 +1263,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
}
// While loading XML it is not neccessary to ask HasAttrib. It needs too much time.
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if ( !bImportingXML )
rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content before the change
pDoc->ApplySelectionPattern( rPattern, rMark );
@@ -1272,38 +1277,38 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
if ( bRecord && !pDoc->IsUndoEnabled() )
- bRecord = FALSE;
+ bRecord = false;
- BOOL bImportingXML = pDoc->IsImportingXML();
+ sal_Bool bImportingXML = pDoc->IsImportingXML();
// Cell formats can still be set if the range isn't editable only because of matrix formulas.
// #i62483# When loading XML, the check can be skipped altogether.
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !bImportingXML && !pDoc->IsSelectionEditable( rMark, &bOnlyNotBecauseOfMatrix )
&& !bOnlyNotBecauseOfMatrix )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScStyleSheet* pStyleSheet = (ScStyleSheet*) pDoc->GetStyleSheetPool()->Find(
rStyleName, SFX_STYLE_FAMILY_PARA );
if (!pStyleSheet)
- return FALSE;
+ return false;
ScDocShellModificator aModificator( rDocShell );
ScRange aMultiRange;
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if ( bMulti )
rMark.GetMultiMarkArea( aMultiRange );
else
@@ -1332,7 +1337,7 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
pDoc->ApplySelectionStyle( (ScStyleSheet&)*pStyleSheet, rMark );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if (!AdjustRowHeight( aMultiRange ))
rDocShell.PostPaint( aMultiRange, PAINT_GRID, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
@@ -1340,13 +1345,13 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, InsCellCmd eCmd,
- BOOL bRecord, BOOL bApi, BOOL bPartOfPaste )
+sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, InsCellCmd eCmd,
+ sal_Bool bRecord, sal_Bool bApi, sal_Bool bPartOfPaste )
{
ScDocShellModificator aModificator( rDocShell );
@@ -1360,7 +1365,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) )
{
OSL_FAIL("invalid row in InsertCells");
- return FALSE;
+ return false;
}
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1369,8 +1374,8 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nPaintStartY = nStartRow;
SCCOL nPaintEndX = nEndCol;
SCROW nPaintEndY = nEndRow;
- USHORT nPaintFlags = PAINT_GRID;
- BOOL bSuccess;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
+ sal_Bool bSuccess;
SCTAB i;
ScTabViewShell* pViewSh = rDocShell.GetBestViewShell(); //preserve current cursor position
@@ -1383,7 +1388,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
}
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -1398,7 +1403,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
nCount++;
if( nCount == nEndTab+1 )
{
- aMark.SelectTable( i, TRUE );
+ aMark.SelectTable( i, sal_True );
break;
}
}
@@ -1410,7 +1415,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aMark.GetTableSelect( i ) )
{
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
- aFullMark.SelectTable( j, TRUE );
+ aFullMark.SelectTable( j, sal_True );
}
SCTAB nSelCount = aMark.GetSelectCount();
@@ -1450,7 +1455,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( eCmd == INS_CELLSRIGHT )
nMergeTestEndX = MAXCOL;
- BOOL bNeedRefresh = FALSE;
+ sal_Bool bNeedRefresh = false;
SCCOL nEditTestEndX = (eCmd==INS_INSCOLS) ? MAXCOL : nMergeTestEndX;
SCROW nEditTestEndY = (eCmd==INS_INSROWS) ? MAXROW : nMergeTestEndY;
@@ -1459,7 +1464,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
@@ -1469,7 +1474,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( bRecord )
{
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
// pRefUndoDoc is filled in InsertCol / InsertRow
@@ -1480,7 +1485,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
// #i8302 : we unmerge overwhelming ranges, before insertion all the actions are put in the same ListAction
// the patch comes from mloiseleur and maoyg
- BOOL bInsertMerge = FALSE;
+ sal_Bool bInsertMerge = false;
std::vector<ScRange> qIncreaseRange;
String aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTCELLS );
if (bRecord)
@@ -1493,7 +1498,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( pDoc->HasAttrib( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
if (eCmd==INS_CELLSRIGHT)
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
SCCOL nMergeStartX = nMergeTestStartX;
SCROW nMergeStartY = nMergeTestStartY;
@@ -1509,7 +1514,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
SCCOL nTestCol = -1;
@@ -1525,12 +1530,12 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem(ATTR_MERGE);
pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG);
- INT16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
+ sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER )
{
ScRange aRange( nTestCol, nTestRow1, i );
pDoc->ExtendOverlapped(aRange);
- pDoc->ExtendMerge(aRange, TRUE, TRUE);
+ pDoc->ExtendMerge(aRange, sal_True, sal_True);
if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
{
@@ -1538,12 +1543,12 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
ScRange aTestRange( nTestCol, nTestRow, i );
pDoc->ExtendOverlapped( aTestRange );
- pDoc->ExtendMerge( aTestRange, TRUE, TRUE);
+ pDoc->ExtendMerge( aTestRange, sal_True, sal_True);
ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i );
if( !aExtendRange.In( aMergeRange ) )
{
qIncreaseRange.push_back( aTestRange );
- bInsertMerge = TRUE;
+ bInsertMerge = sal_True;
}
}
}
@@ -1554,7 +1559,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
qIncreaseRange.push_back( aRange );
}
- bInsertMerge = TRUE;
+ bInsertMerge = sal_True;
}
}
}
@@ -1597,7 +1602,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aRange( *iIter );
if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
- UnmergeCells( aRange, TRUE, TRUE );
+ UnmergeCells( aRange, sal_True, sal_True );
}
}
}
@@ -1607,7 +1612,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
}
}
@@ -1639,7 +1644,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
break;
default:
OSL_FAIL("Falscher Code beim Einfuegen");
- bSuccess = FALSE;
+ bSuccess = false;
break;
}
@@ -1702,7 +1707,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row() );
aMergeOption.maTabs.insert(aRange.aStart.Tab());
- MergeCells(aMergeOption, FALSE, TRUE, TRUE);
+ MergeCells(aMergeOption, false, true, true);
}
qIncreaseRange.pop_back();
}
@@ -1715,14 +1720,14 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aMark.GetTableSelect( i ) )
{
if (bNeedRefresh)
- pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, TRUE );
+ pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, sal_True );
else
pDoc->RefreshAutoFilter( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i );
if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS )
pDoc->UpdatePageBreaks( i );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i );
SCTAB nScenarioCount = 0;
@@ -1730,7 +1735,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
nScenarioCount ++;
- BOOL bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) :
+ sal_Bool bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) :
AdjustRowHeight(ScRange(0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount ));
if (bAdjusted)
{
@@ -1753,20 +1758,19 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScCellMergeOption aMergeOption(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row() );
- MergeCells(aMergeOption, FALSE, TRUE, TRUE);
+ MergeCells(aMergeOption, false, true, true);
qIncreaseRange.pop_back();
}
if( pViewSh )
{
- pViewSh->MarkRange( rRange, FALSE );
+ pViewSh->MarkRange( rRange, false );
pViewSh->SetCursor( nCursorCol, nCursorRow );
}
}
rDocShell.GetUndoManager()->LeaveListAction();
- SfxUndoManager* pMgr = rDocShell.GetUndoManager();
- pMgr->RemoveLastUndoAction();
+ rDocShell.GetUndoManager()->RemoveLastUndoAction();
delete pRefUndoDoc;
delete pUndoData;
@@ -1780,8 +1784,8 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
return bSuccess;
}
-BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd,
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -1795,7 +1799,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) )
{
OSL_FAIL("invalid row in DeleteCells");
- return FALSE;
+ return false;
}
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1804,11 +1808,11 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nPaintStartY = nStartRow;
SCCOL nPaintEndX = nEndCol;
SCROW nPaintEndY = nEndRow;
- USHORT nPaintFlags = PAINT_GRID;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
SCTAB i;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -1823,7 +1827,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nCount++;
if( nCount == nEndTab+1 )
{
- aMark.SelectTable( i, TRUE );
+ aMark.SelectTable( i, sal_True );
break;
}
}
@@ -1835,7 +1839,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aMark.GetTableSelect( i ) )
{
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
- aFullMark.SelectTable( j, TRUE );
+ aFullMark.SelectTable( j, sal_True );
}
SCTAB nSelCount = aMark.GetSelectCount();
@@ -1880,7 +1884,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
// Test zusammengefasste
@@ -1889,12 +1893,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nMergeTestEndY = (eCmd==DEL_CELLSUP) ? MAXROW : nUndoEndY;
SCCOL nExtendStartCol = nUndoStartX;
SCROW nExtendStartRow = nUndoStartY;
- BOOL bNeedRefresh = FALSE;
+ sal_Bool bNeedRefresh = false;
//Issue 8302 want to be able to insert into the middle of merged cells
//the patch comes from maoyg
::std::vector<ScRange> qDecreaseRange;
- BOOL bDeletingMerge = FALSE;
+ sal_Bool bDeletingMerge = false;
String aUndo = ScGlobal::GetRscString( STR_UNDO_DELETECELLS );
if (bRecord)
rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo );
@@ -1918,7 +1922,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
nExtendStartCol = nMergeStartX;
@@ -1936,12 +1940,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem( ATTR_MERGE );
pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem( ATTR_MERGE_FLAG );
- INT16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
+ sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER )
{
ScRange aRange( nTestCol, nTestRow1, i );
pDoc->ExtendOverlapped( aRange );
- pDoc->ExtendMerge( aRange, TRUE, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True, sal_True );
if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
{
@@ -1949,12 +1953,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
ScRange aTestRange( nTestCol, nTestRow, i );
pDoc->ExtendOverlapped( aTestRange );
- pDoc->ExtendMerge( aTestRange, TRUE, TRUE);
+ pDoc->ExtendMerge( aTestRange, sal_True, sal_True);
ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i );
if( !aExtendRange.In( aMergeRange ) )
{
qDecreaseRange.push_back( aTestRange );
- bDeletingMerge = TRUE;
+ bDeletingMerge = sal_True;
}
}
}
@@ -1965,7 +1969,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
qDecreaseRange.push_back( aRange );
}
- bDeletingMerge = TRUE;
+ bDeletingMerge = sal_True;
}
}
}
@@ -1977,7 +1981,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
nStartRow = aExtendMergeRange.aStart.Row();
nEndRow = aExtendMergeRange.aEnd.Row();
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
if( eCmd == DEL_CELLSUP )
{
@@ -1997,7 +2001,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( eCmd == DEL_CELLSLEFT )
{
nEndRow = aExtendMergeRange.aEnd.Row();
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
}
else
{
@@ -2013,7 +2017,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aRange( *iIter );
if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
- UnmergeCells( aRange, TRUE, TRUE );
+ UnmergeCells( aRange, sal_True, sal_True );
}
}
}
@@ -2023,7 +2027,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0);
rDocShell.GetUndoManager()->LeaveListAction();
- return FALSE;
+ return false;
}
}
}
@@ -2055,26 +2059,26 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
pDoc->CopyToDocument( nUndoStartX, nUndoStartY, i, nUndoEndX, nUndoEndY, i+nScenarioCount,
- IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc );
}
}
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
pUndoData = new ScRefUndoData( pDoc );
pDoc->BeginDrawUndo();
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
for( i=0; i<nTabCount; i++ )
{
if( aMark.GetTableSelect( i ) )
rDocShell.UpdatePaintExt( nExtFlags, nStartCol, nStartRow, i, nEndCol, nEndRow, i );
}
- BOOL bUndoOutline = FALSE;
+ sal_Bool bUndoOutline = false;
switch (eCmd)
{
case DEL_CELLSUP:
@@ -2113,10 +2117,10 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
pRefUndoDoc->DeleteAreaTab(nUndoStartX,nUndoStartY,nUndoEndX,nUndoEndY, i, IDF_ALL);
// alle Tabellen anlegen, damit Formeln kopiert werden koennen:
- pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
+ pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
- // kopieren mit bColRowFlags=FALSE (#54194#)
- pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,FALSE,pUndoDoc,NULL,FALSE);
+ // kopieren mit bColRowFlags=sal_False (#54194#)
+ pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,false,pUndoDoc,NULL,false);
delete pRefUndoDoc;
SCTAB* pTabs = new SCTAB[nSelCount];
@@ -2192,7 +2196,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( !pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
{
ScCellMergeOption aMergeOption(aRange);
- MergeCells( aMergeOption, FALSE, TRUE, TRUE );
+ MergeCells( aMergeOption, false, true, true );
}
qDecreaseRange.pop_back();
}
@@ -2224,7 +2228,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
ScRange aMergedRange( nExtendStartCol, nExtendStartRow, i, nMergeTestEndX, nMergeTestEndY, i+nScenarioCount );
- pDoc->ExtendMerge( aMergedRange, TRUE );
+ pDoc->ExtendMerge( aMergedRange, sal_True );
}
}
}
@@ -2260,11 +2264,11 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi )
+sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -2281,21 +2285,21 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) || !ValidRow(nDestRow) )
{
OSL_FAIL("invalid row in MoveBlock");
- return FALSE;
+ return false;
}
// zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird!
- BOOL bScenariosAdded = FALSE;
+ sal_Bool bScenariosAdded = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nTabCount = pDoc->GetTableCount();
if ( nDestTab == nStartTab && !pDoc->IsScenario(nEndTab) )
while ( nEndTab+1 < nTabCount && pDoc->IsScenario(nEndTab+1) )
{
++nEndTab;
- bScenariosAdded = TRUE;
+ bScenariosAdded = sal_True;
}
SCTAB nSrcTabCount = nEndTab-nStartTab+1;
@@ -2306,7 +2310,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScMarkData aSourceMark;
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
- aSourceMark.SelectTable( nTab, TRUE ); // Source selektieren
+ aSourceMark.SelectTable( nTab, sal_True ); // Source selektieren
aSourceMark.SetMarkArea( rSource );
ScDocShellRef aDragShellRef;
@@ -2324,13 +2328,13 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCCOL nOldEndCol = nEndCol;
SCROW nOldEndRow = nEndRow;
- BOOL bClipOver = FALSE;
+ sal_Bool bClipOver = false;
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
SCCOL nTmpEndCol = nOldEndCol;
SCROW nTmpEndRow = nOldEndRow;
if (pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab ))
- bClipOver = TRUE;
+ bClipOver = sal_True;
if ( nTmpEndCol > nEndCol ) nEndCol = nTmpEndCol;
if ( nTmpEndRow > nEndRow ) nEndRow = nTmpEndRow;
}
@@ -2341,14 +2345,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCCOL nUndoEndCol = nDestCol + ( nEndCol-nStartCol ); // erweitert im Zielblock
SCROW nUndoEndRow = nDestRow + ( nEndRow-nStartRow );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// adjust sizes to include only non-filtered rows
SCCOL nClipX;
SCROW nClipY;
- pClipDoc->GetClipArea( nClipX, nClipY, FALSE );
+ pClipDoc->GetClipArea( nClipX, nClipY, false );
SCROW nUndoAdd = nUndoEndRow - nDestEndRow;
nDestEndRow = nDestRow + nClipY;
nUndoEndRow = nDestEndRow + nUndoAdd;
@@ -2359,7 +2363,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (!bApi)
rDocShell.ErrorMessage(STR_PASTE_FULL);
delete pClipDoc;
- return FALSE;
+ return false;
}
// Test auf Zellschutz
@@ -2376,7 +2380,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
delete pClipDoc;
- return FALSE;
+ return false;
}
// Test auf zusammengefasste - beim Verschieben erst nach dem Loeschen
@@ -2388,14 +2392,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
delete pClipDoc;
- return FALSE;
+ return false;
}
// Are there borders in the cells? (for painting)
- USHORT nSourceExt = 0;
+ sal_uInt16 nSourceExt = 0;
rDocShell.UpdatePaintExt( nSourceExt, nStartCol,nStartRow,nStartTab, nEndCol,nEndRow,nEndTab );
- USHORT nDestExt = 0;
+ sal_uInt16 nDestExt = 0;
rDocShell.UpdatePaintExt( nDestExt, nDestCol,nDestRow,nDestTab, nDestEndCol,nDestEndRow,nDestEndTab );
//
@@ -2407,9 +2411,9 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScRefUndoData* pUndoData = NULL;
if (bRecord)
{
- BOOL bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
- BOOL bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL );
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_Bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
+ sal_Bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL );
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab, bWholeCols, bWholeRows );
@@ -2417,30 +2421,30 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (bCut)
{
pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
- nUndoFlags, FALSE, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
}
if ( nDestTab != nStartTab )
pUndoDoc->AddUndoTab( nDestTab, nDestEndTab, bWholeCols, bWholeRows );
pDoc->CopyToDocument( nDestCol, nDestRow, nDestTab,
nDestEndCol, nDestEndRow, nDestEndTab,
- nUndoFlags, FALSE, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
pUndoData = new ScRefUndoData( pDoc );
pDoc->BeginDrawUndo();
}
- BOOL bSourceHeight = FALSE; // Hoehen angepasst?
+ sal_Bool bSourceHeight = false; // Hoehen angepasst?
if (bCut)
{
ScMarkData aDelMark; // only for tables
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
pDoc->DeleteAreaTab( nStartCol,nStartRow, nOldEndCol,nOldEndRow, nTab, IDF_ALL );
- aDelMark.SelectTable( nTab, TRUE );
+ aDelMark.SelectTable( nTab, sal_True );
}
pDoc->DeleteObjectsInArea( nStartCol,nStartRow, nOldEndCol,nOldEndRow, aDelMark );
@@ -2456,7 +2460,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
SCCOL nTmpEndCol = nEndCol;
SCROW nTmpEndRow = nEndRow;
- pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, sal_True );
}
// Fehlermeldung erst nach dem Wiederherstellen des Inhalts
@@ -2467,17 +2471,17 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
delete pRefUndoDoc;
delete pUndoData;
delete pClipDoc;
- return FALSE;
+ return false;
}
- bSourceHeight = AdjustRowHeight( rSource, FALSE );
+ bSourceHeight = AdjustRowHeight( rSource, false );
}
ScRange aPasteDest( nDestCol, nDestRow, nDestTab, nDestEndCol, nDestEndRow, nDestEndTab );
ScMarkData aDestMark;
for (nTab=nDestTab; nTab<=nDestEndTab; nTab++)
- aDestMark.SelectTable( nTab, TRUE ); // Destination selektieren
+ aDestMark.SelectTable( nTab, sal_True ); // Destination selektieren
aDestMark.SetMarkArea( aPasteDest );
/* Do not copy cell notes and drawing objects here. While pasting, the
@@ -2486,16 +2490,16 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
positions (e.g. if source and destination range overlaps). Cell notes
and drawing objects are pasted below after doing all adjusting. */
pDoc->CopyFromClip( aPasteDest, aDestMark, IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS),
- pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pRefUndoDoc, pClipDoc, sal_True, false, bIncludeFiltered );
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- UnmergeCells( aPasteDest, FALSE, TRUE );
+ UnmergeCells( aPasteDest, false, sal_True );
VirtualDevice aVirtDev;
- BOOL bDestHeight = AdjustRowHeight(
+ sal_Bool bDestHeight = AdjustRowHeight(
ScRange( 0,nDestRow,nDestTab, MAXCOL,nDestEndRow,nDestEndTab ),
- FALSE );
+ false );
/* Paste cell notes and drawing objects after adjusting formula references
and row heights. There are no cell notes or drawing objects, if the
@@ -2506,19 +2510,19 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
touch existing cells. */
if ( pClipDoc->GetDrawLayer() )
pDoc->CopyFromClip( aPasteDest, aDestMark, IDF_NOTE | IDF_ADDNOTES | IDF_OBJECTS,
- pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pRefUndoDoc, pClipDoc, sal_True, false, bIncludeFiltered );
if (bRecord)
{
if (pRefUndoDoc)
{
// alle Tabellen anlegen, damit Formeln kopiert werden koennen:
- pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
+ pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
pRefUndoDoc->DeleteArea( nDestCol, nDestRow, nDestEndCol, nDestEndRow, aSourceMark, IDF_ALL );
- // kopieren mit bColRowFlags=FALSE (#54194#)
+ // kopieren mit bColRowFlags=sal_False (#54194#)
pRefUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB,
- IDF_FORMULA, FALSE, pUndoDoc, NULL, FALSE );
+ IDF_FORMULA, false, pUndoDoc, NULL, false );
delete pRefUndoDoc;
}
@@ -2536,7 +2540,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
SCCOL nTmpEndCol = nDestEndCol;
SCROW nTmpEndRow = nDestEndRow;
- pDoc->ExtendMerge( nDestCol, nDestRow, nTmpEndCol, nTmpEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nDestCol, nDestRow, nTmpEndCol, nTmpEndRow, nTab, sal_True );
if (nTmpEndCol > nDestPaintEndCol) nDestPaintEndCol = nTmpEndCol;
if (nTmpEndRow > nDestPaintEndRow) nDestPaintEndRow = nTmpEndRow;
}
@@ -2553,7 +2557,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCROW nPaintStartY = nDestRow;
SCCOL nPaintEndX = nDestPaintEndCol;
SCROW nPaintEndY = nDestPaintEndRow;
- USHORT nFlags = PAINT_GRID;
+ sal_uInt16 nFlags = PAINT_GRID;
if ( nStartRow==0 && nEndRow==MAXROW ) // Breiten mitkopiert?
{
@@ -2615,7 +2619,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
delete pClipDoc;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -2643,7 +2647,6 @@ script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule )
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sSource )
{
- SFX_APP()->EnterBasicCall();
SfxObjectShell& rDocSh = *rDoc.GetDocumentShell();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
@@ -2687,12 +2690,10 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
}
}
- SFX_APP()->LeaveBasicCall();
}
void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
{
- SFX_APP()->EnterBasicCall();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
@@ -2714,13 +2715,12 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
xVBAModuleInfo->removeModuleInfo( sModuleName );
}
- SFX_APP()->LeaveBasicCall();
}
-BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
WaitObject aWait( rDocShell.GetActiveDialogParent() );
ScDocShellModificator aModificator( rDocShell );
@@ -2730,20 +2730,20 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
// Strange loop, also basic is loaded too early ( InsertTable )
// is called via the xml import for sheets in described in odf
- BOOL bInsertDocModule = false;
+ sal_Bool bInsertDocModule = false;
if( !rDocShell.GetDocument()->IsImportingXML() )
{
bInsertDocModule = pDoc ? pDoc->IsInVBAMode() : false;
}
if ( bInsertDocModule || ( bRecord && !pDoc->IsUndoEnabled() ) )
- bRecord = FALSE;
+ bRecord = false;
if (bRecord)
pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage
SCTAB nTabCount = pDoc->GetTableCount();
- BOOL bAppend = ( nTab >= nTabCount );
+ sal_Bool bAppend = ( nTab >= nTabCount );
if ( bAppend )
nTab = nTabCount; // wichtig fuer Undo
@@ -2765,7 +2765,7 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
rDocShell.PostPaintExtras();
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(STR_TABINSERT_ERROR);
@@ -2773,20 +2773,20 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
return bSuccess;
}
-BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
+sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi */ )
{
WaitObject aWait( rDocShell.GetActiveDialogParent() );
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
+ sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( bVbaEnabled )
- bRecord = FALSE;
- BOOL bWasLinked = pDoc->IsLinked(nTab);
+ bRecord = false;
+ sal_Bool bWasLinked = pDoc->IsLinked(nTab);
ScDocument* pUndoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
if (bRecord)
@@ -2794,13 +2794,13 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
SCTAB nCount = pDoc->GetTableCount();
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); // nur nTab mit Flags
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); // nur nTab mit Flags
pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen
- pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pUndoDoc );
+ pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
String aOldName;
pDoc->GetName( nTab, aOldName );
- pUndoDoc->RenameTab( nTab, aOldName, FALSE );
+ pUndoDoc->RenameTab( nTab, aOldName, false );
if (bWasLinked)
pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab),
pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab),
@@ -2809,13 +2809,13 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
if ( pDoc->IsScenario(nTab) )
{
- pUndoDoc->SetScenario( nTab, TRUE );
+ pUndoDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pDoc->IsActiveScenario( nTab );
pUndoDoc->SetActiveScenario( nTab, bActive );
}
pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) );
@@ -2829,7 +2829,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
}
String sCodeName;
- BOOL bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
+ sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
if (pDoc->DeleteTab( nTab, pUndoDoc ))
{
if (bRecord)
@@ -2865,7 +2865,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else
{
@@ -2875,18 +2875,18 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
return bSuccess;
}
-BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
+sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsVisible( nTab ) == bVisible )
- return TRUE; // nichts zu tun - ok
+ return sal_True; // nichts zu tun - ok
if ( !pDoc->IsDocEditable() )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScDocShellModificator aModificator( rDocShell );
@@ -2895,7 +2895,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
{
// nicht alle Tabellen ausblenden
- USHORT nVisCount = 0;
+ sal_uInt16 nVisCount = 0;
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
if (pDoc->IsVisible(i))
@@ -2905,7 +2905,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
- return FALSE;
+ return false;
}
}
@@ -2921,15 +2921,15 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ )
+sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsLayoutRTL( nTab ) == bRTL )
- return TRUE; // nothing to do - ok
+ return sal_True; // nothing to do - ok
//! protection (sheet or document?)
@@ -2952,24 +2952,24 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ )
pBindings->Invalidate( SID_ATTR_SIZE );
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( !pDoc->IsDocEditable() )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR);
- return FALSE;
+ return false;
}
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
String sOldName;
pDoc->GetName(nTab, sOldName);
if (pDoc->RenameTab( nTab, rName ))
@@ -2983,7 +2983,7 @@ BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
return bSuccess;
}
@@ -3039,7 +3039,7 @@ bool ScDocFunc::SetTabBgColor(
return false;
}
- USHORT nTab;
+ sal_uInt16 nTab;
Color aNewTabBgColor;
bool bSuccess = true;
size_t nTabProtectCount = 0;
@@ -3093,9 +3093,9 @@ bool ScDocFunc::SetTabBgColor(
//! - Optimale Hoehe fuer Edit-Zellen ist unterschiedlich zwischen Drucker und Bildschirm
//! - Optimale Breite braucht Selektion, um evtl. nur selektierte Zellen zu beruecksichtigen
-USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BOOL bFormula )
+sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, sal_Bool bFormula )
{
- USHORT nTwips = 0;
+ sal_uInt16 nTwips = 0;
ScSizeDeviceProvider aProv(&rDocShell);
OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode
@@ -3110,30 +3110,32 @@ USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BO
return nTwips;
}
-BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab,
- ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab,
+ ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bApi )
{
+ ScDocShellModificator aModificator( rDocShell );
+
if (!nRangeCnt)
- return TRUE;
+ return sal_True;
ScDocument* pDoc = rDocShell.GetDocument();
if ( bRecord && !pDoc->IsUndoEnabled() )
- bRecord = FALSE;
+ bRecord = false;
// import into read-only document is possible
if ( !pDoc->IsChangeReadOnlyEnabled() && !rDocShell.IsEditable() )
{
if (!bApi)
rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
- return FALSE;
+ return false;
}
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
SCCOLROW nStart = pRanges[0];
SCCOLROW nEnd = pRanges[2*nRangeCnt-1];
- BOOL bFormula = FALSE;
+ sal_Bool bFormula = false;
if ( eMode == SC_SIZE_OPTIMAL )
{
//! Option "Formeln anzeigen" - woher nehmen?
@@ -3150,13 +3152,13 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bWidth)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, IDF_NONE, false, pUndoDoc );
}
pUndoRanges = new SCCOLROW[ 2*nRangeCnt ];
@@ -3167,8 +3169,8 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pUndoTab = new ScOutlineTable( *pTable );
}
- BOOL bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
- BOOL bOutline = FALSE;
+ sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
+ sal_Bool bOutline = false;
pDoc->InitializeNoteCaptions(nTab);
for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
@@ -3180,14 +3182,14 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
{
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
{
- BOOL bAll = ( eMode==SC_SIZE_OPTIMAL );
+ sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL );
if (!bAll)
{
// fuer alle eingeblendeten CR_MANUALSIZE loeschen,
// dann SetOptimalHeight mit bShrink = FALSE
for (SCROW nRow=nStartNo; nRow<=nEndNo; nRow++)
{
- BYTE nOld = pDoc->GetRowFlags(nRow,nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab);
SCROW nLastRow = -1;
bool bHidden = pDoc->RowHidden(nRow, nTab, NULL, &nLastRow);
if ( !bHidden && ( nOld & CR_MANUALSIZE ) )
@@ -3201,9 +3203,9 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, bAll );
if (bAll)
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
- // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt
+ // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt
// (an bei Extra-Height, sonst aus).
}
else if ( eMode==SC_SIZE_DIRECT || eMode==SC_SIZE_ORIGINAL )
@@ -3211,14 +3213,14 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
if (nSizeTwips)
{
pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips );
- pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually
+ pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually
}
if ( eMode != SC_SIZE_ORIGINAL )
pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 );
}
else if ( eMode==SC_SIZE_SHOW )
{
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
}
}
else // Spaltenbreiten
@@ -3227,7 +3229,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
{
if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) )
{
- USHORT nThisSize = nSizeTwips;
+ sal_uInt16 nThisSize = nSizeTwips;
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
nThisSize = nSizeTwips +
@@ -3274,26 +3276,27 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pDoc->UpdatePageBreaks( nTab );
rDocShell.PostPaint(0,0,nTab,MAXCOL,MAXROW,nTab,PAINT_ALL);
+ aModificator.SetDocumentModified();
return bSuccess;
}
-BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL /* bApi */ )
+sal_Bool ScDocFunc::InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nTab = rPos.Tab();
SfxBindings* pBindings = rDocShell.GetViewBindings();
SCCOLROW nPos = bColumn ? static_cast<SCCOLROW>(rPos.Col()) :
static_cast<SCCOLROW>(rPos.Row());
if (nPos == 0)
- return FALSE; // erste Spalte / Zeile
+ return false; // erste Spalte / Zeile
ScBreakType nBreak = bColumn ?
pDoc->HasColBreak(static_cast<SCCOL>(nPos), nTab) :
@@ -3303,7 +3306,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
if (bRecord)
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, TRUE ) );
+ new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, sal_True ) );
if (bColumn)
pDoc->SetColBreak(static_cast<SCCOL>(nPos), nTab, false, true);
@@ -3314,7 +3317,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
pDoc->UpdatePageBreaks( nTab );
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
if (bColumn)
{
@@ -3340,17 +3343,17 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
if (bSetModified)
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL /* bApi */ )
+sal_Bool ScDocFunc::RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCTAB nTab = rPos.Tab();
SfxBindings* pBindings = rDocShell.GetViewBindings();
@@ -3368,7 +3371,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
if (bRecord)
rDocShell.GetUndoManager()->AddUndoAction(
- new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, FALSE ) );
+ new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, false ) );
if (bColumn)
pDoc->RemoveColBreak(static_cast<SCCOL>(nPos), nTab, false, true);
@@ -3378,7 +3381,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
pDoc->UpdatePageBreaks( nTab );
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
if (bColumn)
{
@@ -3404,7 +3407,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
if (bSetModified)
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -3434,7 +3437,7 @@ void ScDocFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
aModificator.SetDocumentModified();
}
-BOOL ScDocFunc::Protect( SCTAB nTab, const String& rPassword, BOOL /*bApi*/ )
+sal_Bool ScDocFunc::Protect( SCTAB nTab, const String& rPassword, sal_Bool /*bApi*/ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (nTab == TABLEID_DOC)
@@ -3488,7 +3491,7 @@ BOOL ScDocFunc::Protect( SCTAB nTab, const String& rPassword, BOOL /*bApi*/ )
return true;
}
-BOOL ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi )
+sal_Bool ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
@@ -3563,18 +3566,18 @@ BOOL ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi )
+sal_Bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
// #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached
@@ -3583,7 +3586,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
ScRange aMarkRange;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // for MarkToMulti
+ aMultiMark.SetMarking(false); // for MarkToMulti
aMultiMark.MarkToMulti();
aMultiMark.GetMultiMarkArea( aMarkRange );
@@ -3594,7 +3597,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( aMarkRange, IDF_ATTRIB, TRUE, pUndoDoc, (ScMarkData*)&aMultiMark );
+ pDoc->CopyToDocument( aMarkRange, IDF_ATTRIB, sal_True, pUndoDoc, (ScMarkData*)&aMultiMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoClearItems( &rDocShell, aMultiMark, pUndoDoc, pWhich ) );
@@ -3607,21 +3610,21 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
//! Bindings-Invalidate etc.?
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi )
+sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScEditableTester aTester( pDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScRange aMarkRange;
@@ -3641,7 +3644,7 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pUndoDoc, (ScMarkData*)&rMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, (ScMarkData*)&rMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoIndent( &rDocShell, rMark, pUndoDoc, bIncrement ) );
@@ -3667,15 +3670,15 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp
pBindings->Invalidate( SID_ALIGN_ANY_JUSTIFIED );
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
- USHORT nFormatNo, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_uInt16 nFormatNo, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3685,14 +3688,14 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
aMark = *pTabMark;
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat();
@@ -3701,7 +3704,7 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
{
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bSize = (*pAutoFormat)[nFormatNo]->GetIncludeWidthHeight();
+ sal_Bool bSize = (*pAutoFormat)[nFormatNo]->GetIncludeWidthHeight();
SCTAB nTabCount = pDoc->GetTableCount();
ScDocument* pUndoDoc = NULL;
@@ -3716,13 +3719,13 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aCopyRange = rRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aStart.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pUndoDoc, &aMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc, &aMark );
if (bSize)
{
pDoc->CopyToDocument( nStartCol,0,0, nEndCol,MAXROW,nTabCount-1,
- IDF_NONE, FALSE, pUndoDoc, &aMark );
+ IDF_NONE, false, pUndoDoc, &aMark );
pDoc->CopyToDocument( 0,nStartRow,0, MAXCOL,nEndRow,nTabCount-1,
- IDF_NONE, FALSE, pUndoDoc, &aMark );
+ IDF_NONE, false, pUndoDoc, &aMark );
}
pDoc->BeginDrawUndo();
}
@@ -3737,8 +3740,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aMark.GetTableSelect(nTab))
{
- SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, FALSE, TRUE);
- SetWidthOrHeight( FALSE,1,nRows, nTab, SC_SIZE_VISOPT, 0, FALSE, FALSE);
+ SetWidthOrHeight( sal_True, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, sal_True);
+ SetWidthOrHeight( false,1,nRows, nTab, SC_SIZE_VISOPT, 0, false, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP );
}
@@ -3748,8 +3751,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aMark.GetTableSelect(nTab))
{
- BOOL bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab,
- nEndCol, nEndRow, nTab), FALSE );
+ sal_Bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab,
+ nEndCol, nEndRow, nTab), false );
if (bAdj)
rDocShell.PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT );
@@ -3775,13 +3778,13 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
//------------------------------------------------------------------------
-BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
- const ScTokenArray* pTokenArray, const String& rString, BOOL bApi, BOOL bEnglish,
+sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTokenArray* pTokenArray, const String& rString, sal_Bool bApi, sal_Bool bEnglish,
const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3790,7 +3793,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nEndTab = rRange.aEnd.Tab();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScMarkData aMark;
if (pTabMark)
@@ -3798,7 +3801,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -3813,7 +3816,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
}
// use TokenArray if given, string (and flags) otherwise
@@ -3854,7 +3857,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
rDocShell.PostPaint( nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab, PAINT_GRID );
aModificator.SetDocumentModified();
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -3864,12 +3867,12 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
//------------------------------------------------------------------------
-BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
- const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3879,7 +3882,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -3887,7 +3890,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -3900,7 +3903,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTabOp( &rDocShell,
@@ -3915,7 +3918,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->InsertTableOp(rParam, nStartCol, nStartRow, nEndCol, nEndRow, aMark);
rDocShell.PostPaintGridAll();
aModificator.SetDocumentModified();
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -3937,12 +3940,12 @@ inline ScDirection DirFromFillDir( FillDir eDir )
return DIR_LEFT;
}
-BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -3952,7 +3955,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -3960,7 +3963,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -4007,7 +4010,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aCopyRange = aDestArea;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, FALSE, pUndoDoc, &aMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
@@ -4026,7 +4029,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
rDocShell.PostPaintGridAll();
aModificator.SetDocumentModified();
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -4034,14 +4037,14 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
return bSuccess;
}
-BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
+sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
- BOOL bRecord, BOOL bApi )
+ sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -4051,7 +4054,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -4059,7 +4062,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
@@ -4113,7 +4116,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->CopyToDocument(
aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0,
aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1,
- IDF_AUTOFILL, FALSE, pUndoDoc, &aMark );
+ IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
if (aDestArea.aStart.Col() <= aDestArea.aEnd.Col() &&
@@ -4143,7 +4146,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->GetRangeName()->GetSharedMaxIndex()+1 ) );
}
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -4151,15 +4154,15 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
return bSuccess;
}
-BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi )
{
double fStep = 1.0;
double fMax = MAXDOUBLE;
return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, bRecord, bApi );
}
-BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, sal_Bool bRecord, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -4172,7 +4175,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
SCTAB nEndTab = rRange.aEnd.Tab();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -4180,7 +4183,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
else
{
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
}
ScRange aSourceArea = rRange;
@@ -4193,7 +4196,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aDestArea.aEnd.SetRow( sal::static_int_cast<SCROW>( aSourceArea.aEnd.Row() + nCount ) );
break;
case FILL_TO_TOP:
- if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Row() ))
+ if (nCount > sal::static_int_cast<sal_uLong>( aSourceArea.aStart.Row() ))
{
OSL_FAIL("FillAuto: Row < 0");
nCount = aSourceArea.aStart.Row();
@@ -4204,7 +4207,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aDestArea.aEnd.SetCol( sal::static_int_cast<SCCOL>( aSourceArea.aEnd.Col() + nCount ) );
break;
case FILL_TO_LEFT:
- if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Col() ))
+ if (nCount > sal::static_int_cast<sal_uLong>( aSourceArea.aStart.Col() ))
{
OSL_FAIL("FillAuto: Col < 0");
nCount = aSourceArea.aStart.Col();
@@ -4225,7 +4228,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if ( pDoc->HasSelectedBlockMatrixFragment( nStartCol, nStartRow,
@@ -4233,7 +4236,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
{
if (!bApi)
rDocShell.ErrorMessage(STR_MATRIXFRAGMENTERR);
- return FALSE;
+ return false;
}
WaitObject aWait( rDocShell.GetActiveDialogParent() );
@@ -4254,7 +4257,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
pDoc->CopyToDocument(
aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0,
aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1,
- IDF_AUTOFILL, FALSE, pUndoDoc, &aMark );
+ IDF_AUTOFILL, false, pUndoDoc, &aMark );
}
pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
@@ -4275,12 +4278,12 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aModificator.SetDocumentModified();
rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren)
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents, sal_Bool bRecord, sal_Bool bApi )
{
using ::std::set;
@@ -4293,7 +4296,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
if ((nStartCol == nEndCol && nStartRow == nEndRow) || rOption.maTabs.empty())
{
// Nothing to do. Bail out quick.
- return TRUE;
+ return true;
}
ScDocument* pDoc = rDocShell.GetDocument();
@@ -4301,7 +4304,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
SCTAB nTab1 = *itrBeg, nTab2 = *rOption.maTabs.rbegin();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
for (set<SCTAB>::const_iterator itr = itrBeg; itr != itrEnd; ++itr)
{
@@ -4310,7 +4313,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
{
if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
if ( pDoc->HasAttrib( nStartCol, nStartRow, *itr, nEndCol, nEndRow, *itr,
@@ -4319,7 +4322,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
// "Zusammenfassen nicht verschachteln !"
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_MERGECELLS_0);
- return FALSE;
+ return false;
}
}
@@ -4349,7 +4352,7 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
}
// note captions are collected by drawing undo
pDoc->CopyToDocument( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
}
if( bHasNotes )
pDoc->BeginDrawUndo();
@@ -4394,10 +4397,10 @@ BOOL ScDocFunc::MergeCells( const ScCellMergeOption& rOption, BOOL bContents, BO
pBindings->Invalidate( FID_MERGE_TOGGLE );
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScDocFunc::UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
ScCellMergeOption aOption(rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row());
SCTAB nTab1 = rRange.aStart.Tab(), nTab2 = rRange.aEnd.Tab();
@@ -4407,7 +4410,7 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi )
return UnmergeCells(aOption, bRecord, bApi);
}
-bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BOOL bApi )
+bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord, sal_Bool bApi )
{
using ::std::set;
@@ -4419,7 +4422,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocument* pUndoDoc = NULL;
bool bBeep = false;
@@ -4446,7 +4449,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo(pDoc, *rOption.maTabs.begin(), *rOption.maTabs.rbegin());
}
- pDoc->CopyToDocument(aExtended, IDF_ATTRIB, FALSE, pUndoDoc);
+ pDoc->CopyToDocument(aExtended, IDF_ATTRIB, false, pUndoDoc);
}
const SfxPoolItem& rDefAttr = pDoc->GetPool()->GetDefaultItem( ATTR_MERGE );
@@ -4460,7 +4463,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
aExtended.aEnd.Col(), aExtended.aEnd.Row(), nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( aRefresh, TRUE, FALSE );
+ pDoc->ExtendMerge( aRefresh, sal_True, false );
if ( !AdjustRowHeight( aExtended ) )
rDocShell.PostPaint( aExtended, PAINT_GRID );
@@ -4475,7 +4478,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BO
}
aModificator.SetDocumentModified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -4491,7 +4494,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
DBG_ASSERT( pNewRanges, "pNewRanges is 0" );
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
@@ -4505,13 +4508,13 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
// #i55926# While loading XML, formula cells only have a single string token,
// so CompileNameFormula would never find any name (index) tokens, and would
// unnecessarily loop through all cells.
- BOOL bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 );
+ sal_Bool bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 );
if ( bCompile )
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
pDoc->SetRangeName( pNewRanges ); // takes ownership
if ( bCompile )
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
if (bModifyDoc)
{
@@ -4527,7 +4530,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
void ScDocFunc::CreateOneName( ScRangeName& rList,
SCCOL nPosX, SCROW nPosY, SCTAB nTab,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL& rCancel, BOOL bApi )
+ sal_Bool& rCancel, sal_Bool bApi )
{
if (rCancel)
return;
@@ -4552,7 +4555,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
if (aOldStr != aContent)
{
if (bApi)
- bInsert = TRUE; // per API nicht nachfragen
+ bInsert = sal_True; // per API nicht nachfragen
else
{
String aTemplate = ScGlobal::GetRscString( STR_CREATENAME_REPLACE );
@@ -4570,7 +4573,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
bInsert = true;
}
else if ( nResult == RET_CANCEL )
- rCancel = TRUE;
+ rCancel = sal_True;
}
}
}
@@ -4591,14 +4594,14 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
}
}
-BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
+sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi )
{
if (!nFlags)
- return FALSE; // war nix
+ return false; // war nix
ScDocShellModificator aModificator( rDocShell );
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
@@ -4606,26 +4609,26 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
SCTAB nTab = rRange.aStart.Tab();
DBG_ASSERT(rRange.aEnd.Tab() == nTab, "CreateNames: mehrere Tabellen geht nicht");
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
if ( nFlags & ( NAME_TOP | NAME_BOTTOM ) )
if ( nStartRow == nEndRow )
- bValid = FALSE;
+ bValid = false;
if ( nFlags & ( NAME_LEFT | NAME_RIGHT ) )
if ( nStartCol == nEndCol )
- bValid = FALSE;
+ bValid = false;
if (bValid)
{
ScDocument* pDoc = rDocShell.GetDocument();
ScRangeName* pNames = pDoc->GetRangeName();
if (!pNames)
- return FALSE; // soll nicht sein
+ return false; // soll nicht sein
ScRangeName aNewRanges( *pNames );
- BOOL bTop = ( ( nFlags & NAME_TOP ) != 0 );
- BOOL bLeft = ( ( nFlags & NAME_LEFT ) != 0 );
- BOOL bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 );
- BOOL bRight = ( ( nFlags & NAME_RIGHT ) != 0 );
+ sal_Bool bTop = ( ( nFlags & NAME_TOP ) != 0 );
+ sal_Bool bLeft = ( ( nFlags & NAME_LEFT ) != 0 );
+ sal_Bool bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 );
+ sal_Bool bRight = ( ( nFlags & NAME_RIGHT ) != 0 );
SCCOL nContX1 = nStartCol;
SCROW nContY1 = nStartRow;
@@ -4641,7 +4644,7 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
if ( bRight )
--nContX2;
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = false;
SCCOL i;
SCROW j;
@@ -4678,19 +4681,19 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
+sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = rDocShell.GetDocument();
- const BOOL bRecord = pDoc->IsUndoEnabled();
+ const sal_Bool bRecord = pDoc->IsUndoEnabled();
SCTAB nTab = rStartPos.Tab();
ScDocument* pUndoDoc = NULL;
ScRangeName* pList = pDoc->GetRangeName();
- USHORT nValidCount = 0;
+ sal_uInt16 nValidCount = 0;
ScRangeName::iterator itrBeg = pList->begin(), itrEnd = pList->end();
for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr)
{
@@ -4714,13 +4717,13 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
pDoc->BeginDrawUndo(); // wegen Hoehenanpassung
}
ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ];
- USHORT j = 0;
+ sal_uInt16 j = 0;
for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr)
{
ScRangeData& r = *itr;
@@ -4758,7 +4761,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nTab, nTab );
pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- IDF_ALL, FALSE, pRedoDoc );
+ IDF_ALL, false, pRedoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoListNames( &rDocShell,
@@ -4770,7 +4773,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PAINT_GRID );
aModificator.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
}
else if (!bApi)
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -4780,16 +4783,16 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi )
+sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi )
{
ScDocument* pDoc = rDocShell.GetDocument();
SCCOL nStartCol = rOldRange.aStart.Col();
SCROW nStartRow = rOldRange.aStart.Row();
SCTAB nTab = rOldRange.aStart.Tab();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
String aFormula;
pDoc->GetFormula( nStartCol, nStartRow, nTab, aFormula );
@@ -4804,17 +4807,17 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
ScMarkData aMark;
aMark.SetMarkArea( rOldRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
ScRange aNewRange( rOldRange.aStart, rNewEnd );
- if ( DeleteContents( aMark, IDF_CONTENTS, TRUE, bApi ) )
+ if ( DeleteContents( aMark, IDF_CONTENTS, sal_True, bApi ) )
{
// GRAM_PODF_A1 for API compatibility.
- bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, false, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
if (!bRet)
{
// versuchen, alten Zustand wiederherzustellen
- EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, false, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -4827,15 +4830,15 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
//------------------------------------------------------------------------
-BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
+sal_Bool ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- const ScRange& rDestRange, ULONG nRefresh,
- BOOL bFitBlock, BOOL bApi )
+ const ScRange& rDestRange, sal_uLong nRefresh,
+ sal_Bool bFitBlock, sal_Bool bApi )
{
//! auch fuer ScViewFunc::InsertAreaLink benutzen!
ScDocument* pDoc = rDocShell.GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
@@ -4843,9 +4846,9 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
// remove them first (file format specifies only one link definition
// for a cell)
- USHORT nLinkCount = pLinkManager->GetLinks().Count();
- USHORT nRemoved = 0;
- USHORT nLinkPos = 0;
+ sal_uInt16 nLinkCount = pLinkManager->GetLinks().Count();
+ sal_uInt16 nRemoved = 0;
+ sal_uInt16 nLinkPos = 0;
while (nLinkPos<nLinkCount)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[nLinkPos];
@@ -4878,7 +4881,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
String aFilterName = rFilter;
String aNewOptions = rOptions;
if (!aFilterName.Len())
- ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, TRUE, !bApi );
+ ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, sal_True, !bApi );
// remove application prefix from filter name here, so the filter options
// aren't reset when the filter name is changed in ScAreaLink::DataChanged
@@ -4900,10 +4903,12 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
}
// Update hat sein eigenes Undo
-
- pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
- pLink->Update(); // kein SetInCreate -> Update ausfuehren
- pLink->SetDoInsert(TRUE); // Default = TRUE
+ if (pDoc->IsExecuteLinkEnabled())
+ {
+ pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
+ pLink->Update(); // kein SetInCreate -> Update ausfuehren
+ }
+ pLink->SetDoInsert(sal_True); // Default = sal_True
SfxBindings* pBindings = rDocShell.GetViewBindings();
if (pBindings)
@@ -4911,7 +4916,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 221b5d8a439c..6ad8123c3659 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -78,7 +78,6 @@
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <basic/sbstar.hxx>
#include <basic/basmgr.hxx>
-#include <vbahelper/vbaaccesshelper.hxx>
#include "scabstdlg.hxx"
#include <sot/formats.hxx>
@@ -268,7 +267,7 @@ sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates )
{
SCTAB nTableCount = aDocument.GetTableCount();
SCTAB nTable = 0;
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
while ( nTable < nTableCount && !bFound )
{
ScCellIterator aCellIter( &aDocument, 0,0, nTable, MAXCOL,MAXROW, nTable );
@@ -287,17 +286,17 @@ sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates )
void ScDocShell::BeforeXMLLoading()
{
- aDocument.DisableIdle( TRUE );
+ aDocument.DisableIdle( sal_True );
// prevent unnecessary broadcasts and updates
DBG_ASSERT(pModificator == NULL, "The Modificator should not exist");
pModificator = new ScDocShellModificator( *this );
- aDocument.SetImportingXML( TRUE );
+ aDocument.SetImportingXML( sal_True );
aDocument.EnableExecuteLink( false ); // #i101304# to be safe, prevent nested loading from external references
- aDocument.EnableUndo( FALSE );
+ aDocument.EnableUndo( false );
// prevent unnecessary broadcasts and "half way listeners"
- aDocument.SetInsertingFromOtherDoc( TRUE );
+ aDocument.SetInsertingFromOtherDoc( sal_True );
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
ScColumn::bDoubleAlloc = sal_True;
@@ -309,7 +308,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
{
UpdateLinks();
// don't prevent establishing of listeners anymore
- aDocument.SetInsertingFromOtherDoc( FALSE );
+ aDocument.SetInsertingFromOtherDoc( false );
if ( bRet )
{
ScChartListenerCollection* pChartListener = aDocument.GetChartListenerCollection();
@@ -336,12 +335,12 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) )
{
rtl::OUStringBuffer aDocURLBuffer;
- BOOL bQuote = TRUE; // Dokumentenname ist immer quoted
+ sal_Bool bQuote = sal_True; // Dokumentenname ist immer quoted
++pNameBuffer;
while ( bQuote && *pNameBuffer )
{
if ( *pNameBuffer == '\'' && *(pNameBuffer-1) != '\\' )
- bQuote = FALSE;
+ bQuote = false;
else if( !(*pNameBuffer == '\\' && *(pNameBuffer+1) == '\'') )
aDocURLBuffer.append(*pNameBuffer); // falls escaped Quote: nur Quote in den Namen
++pNameBuffer;
@@ -357,7 +356,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
!aINetURLObject.HasError()) // the docname should be a valid URL
{
aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) );
- aDocument.RenameTab(i, aName, TRUE, TRUE);
+ aDocument.RenameTab(i, aName, sal_True, sal_True);
}
// else; nothing has to happen, because it is a user given name
}
@@ -383,15 +382,15 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
}
}
}
- ScColumn::bDoubleAlloc = sal_False;
+ ScColumn::bDoubleAlloc = false;
}
else
- aDocument.SetInsertingFromOtherDoc( FALSE );
+ aDocument.SetInsertingFromOtherDoc( false );
- aDocument.SetImportingXML( FALSE );
+ aDocument.SetImportingXML( false );
aDocument.EnableExecuteLink( true );
- aDocument.EnableUndo( TRUE );
- bIsEmpty = FALSE;
+ aDocument.EnableUndo( sal_True );
+ bIsEmpty = false;
if (pModificator)
{
@@ -403,7 +402,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
OSL_FAIL("The Modificator should exist");
}
- aDocument.DisableIdle( FALSE );
+ aDocument.DisableIdle( false );
}
namespace {
@@ -427,7 +426,7 @@ private:
}
-BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
+sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
{
LoadMediumGuard aLoadGuard(&aDocument);
@@ -440,21 +439,21 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
// #i62677# BeforeXMLLoading is also called from ScXMLImport::startDocument when invoked
// from an external component. The XMLFromWrapper flag is only set here, when called
// through ScDocShell.
- aDocument.SetXMLFromWrapper( TRUE );
+ aDocument.SetXMLFromWrapper( sal_True );
ScXMLImportWrapper aImport( aDocument, pLoadMedium, xStor );
- sal_Bool bRet(sal_False);
+ sal_Bool bRet(false);
ErrCode nError = ERRCODE_NONE;
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
- bRet = aImport.Import(sal_False, nError);
+ bRet = aImport.Import(false, nError);
else
bRet = aImport.Import(sal_True, nError);
if ( nError )
pLoadMedium->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- aDocument.SetXMLFromWrapper( FALSE );
+ aDocument.SetXMLFromWrapper( false );
AfterXMLLoading(bRet);
//! row heights...
@@ -462,25 +461,25 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
return bRet;
}
-BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
+sal_Bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::SaveXML" );
- aDocument.DisableIdle( TRUE );
+ aDocument.DisableIdle( sal_True );
ScXMLImportWrapper aImport( aDocument, pSaveMedium, xStor );
- sal_Bool bRet(sal_False);
+ sal_Bool bRet(false);
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
- bRet = aImport.Export(sal_False);
+ bRet = aImport.Export(false);
else
bRet = aImport.Export(sal_True);
- aDocument.DisableIdle( FALSE );
+ aDocument.DisableIdle( false );
return bRet;
}
-BOOL ScDocShell::Load( SfxMedium& rMedium )
+sal_Bool ScDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" );
LoadMediumGuard aLoadGuard(&aDocument);
@@ -492,12 +491,12 @@ BOOL ScDocShell::Load( SfxMedium& rMedium )
GetUndoManager()->Clear();
- BOOL bRet = SfxObjectShell::Load( rMedium );
+ sal_Bool bRet = SfxObjectShell::Load( rMedium );
if( bRet )
{
if (GetMedium())
{
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
}
@@ -525,7 +524,7 @@ BOOL ScDocShell::Load( SfxMedium& rMedium )
if ( bRet )
aDocument.InvalidateTableArea();
- bIsEmpty = FALSE;
+ bIsEmpty = false;
FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
return bRet;
}
@@ -548,7 +547,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxEventHint ) )
{
- ULONG nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId();
+ sal_uLong nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId();
switch ( nEventId )
{
case SFX_EVENT_ACTIVATEDOC:
@@ -587,6 +586,13 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
xVbaEvents->processVbaEvent( WORKBOOK_AFTERSAVE, aArgs );
}
break;
+ case SFX_EVENT_CLOSEDOC:
+ {
+ // #163655# prevent event processing after model is disposed
+ aDocument.SetVbaEventProcessor( uno::Reference< script::vba::XVBAEventProcessor >() );
+ uno::Reference< lang::XEventListener >( xVbaEvents, uno::UNO_QUERY_THROW )->disposing( lang::EventObject() );
+ }
+ break;
}
}
}
@@ -596,7 +602,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
{
- ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nSlot = ((const SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case SFX_HINT_TITLECHANGED:
@@ -620,7 +626,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScRange aRange = rStlHint.GetRange();
String aName1 = rStlHint.GetStyle1();
String aName2 = rStlHint.GetStyle2();
- UINT32 nTimeout = rStlHint.GetTimeout();
+ sal_uInt32 nTimeout = rStlHint.GetTimeout();
if (!pAutoStyleList)
pAutoStyleList = new ScAutoStyleList(this);
@@ -628,7 +634,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxEventHint ) )
{
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch ( nEventId )
{
case SFX_EVENT_LOADFINISHED:
@@ -636,7 +642,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// the readonly documents should not be opened in shared mode
if ( HasSharedXMLFlagSet() && !SC_MOD()->IsInSharedDocLoading() && !IsReadOnly() )
{
- if ( SwitchToShared( sal_True, sal_False ) )
+ if ( SwitchToShared( sal_True, false ) )
{
ScViewData* pViewData = GetViewData();
ScTabView* pTabView = ( pViewData ? dynamic_cast< ScTabView* >( pViewData->GetView() ) : NULL );
@@ -652,25 +658,6 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
SetReadOnlyUI( sal_True );
}
}
-
- // VBA specific initialization
- if( aDocument.IsInVBAMode() ) try
- {
- uno::Reference< frame::XModel > xModel( GetModel(), uno::UNO_SET_THROW );
-
- // create VBAGlobals object if not yet done (this also creates the "ThisExcelDoc" symbol)
- uno::Reference< lang::XMultiServiceFactory > xFactory( xModel, uno::UNO_QUERY_THROW );
- xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
-
- // create the VBA document event processor
- uno::Sequence< uno::Any > aArgs( 1 );
- aArgs[ 0 ] <<= xModel;
- xVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( this, "com.sun.star.script.vba.VBASpreadsheetEventProcessor" , aArgs ), uno::UNO_QUERY );
- aDocument.SetVbaEventProcessor( xVbaEvents );
- }
- catch( uno::Exception& )
- {
- }
}
break;
case SFX_EVENT_VIEWCREATED:
@@ -684,7 +671,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) );
aBox.SetDefaultCheckBoxText();
aBox.Execute();
- BOOL bChecked = aBox.GetCheckBoxState();
+ sal_Bool bChecked = aBox.GetCheckBoxState();
if ( bChecked )
{
aAppOptions.SetShowSharedDocumentWarning( !bChecked );
@@ -841,8 +828,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScChangeViewSettings* pChangeViewSet = aDocument.GetChangeViewSettings();
if ( pChangeViewSet && pChangeViewSet->ShowChanges() )
{
- pChangeViewSet->SetShowChanges( FALSE );
- pChangeViewSet->SetShowAccepted( FALSE );
+ pChangeViewSet->SetShowChanges( false );
+ pChangeViewSet->SetShowAccepted( false );
aDocument.SetChangeViewSettings( *pChangeViewSet );
bChangedViewSettings = true;
}
@@ -853,7 +840,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
aValues[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName"));
aValues[0].Value <<= ::rtl::OUString( GetMedium()->GetFilter()->GetFilterName() );
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false);
if ( pPasswordItem && pPasswordItem->GetValue().Len() )
{
aValues.realloc( 2 );
@@ -867,8 +854,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( bChangedViewSettings )
{
- pChangeViewSet->SetShowChanges( TRUE );
- pChangeViewSet->SetShowAccepted( TRUE );
+ pChangeViewSet->SetShowChanges( sal_True );
+ pChangeViewSet->SetShowAccepted( sal_True );
aDocument.SetChangeViewSettings( *pChangeViewSet );
}
}
@@ -963,7 +950,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
// Inhalte fuer Organizer laden
-BOOL ScDocShell::LoadFrom( SfxMedium& rMedium )
+sal_Bool ScDocShell::LoadFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::LoadFrom" );
LoadMediumGuard aLoadGuard(&aDocument);
@@ -971,11 +958,11 @@ BOOL ScDocShell::LoadFrom( SfxMedium& rMedium )
WaitObject aWait( GetActiveDialogParent() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if (GetMedium())
{
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
}
@@ -1018,13 +1005,13 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa
rDateConvert = static_cast<bool>(aTokens[1].toInt32());
}
-BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertFrom" );
LoadMediumGuard aLoadGuard(&aDocument);
- BOOL bRet = FALSE; // FALSE heisst Benutzerabbruch !!
+ sal_Bool bRet = false; // sal_False heisst Benutzerabbruch !!
// bei Fehler: Fehler am Stream setzen!!
ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
@@ -1032,12 +1019,12 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
GetUndoManager()->Clear();
// ob nach dem Import optimale Spaltenbreiten gesetzt werden sollen
- BOOL bSetColWidths = FALSE;
- BOOL bSetSimpleTextColWidths = FALSE;
+ sal_Bool bSetColWidths = false;
+ sal_Bool bSetSimpleTextColWidths = false;
ScColWidthParam aColWidthParam[MAXCOLCOUNT];
ScRange aColWidthRange;
// ob nach dem Import optimale Zeilenhoehen gesetzt werden sollen
- BOOL bSetRowHeights = FALSE;
+ sal_Bool bSetRowHeights = false;
vector<ScDocRowHeightUpdater::TabRanges> aRecalcRowRangesArray;
@@ -1048,7 +1035,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
// Datei uebertragen wird.
rMedium.GetPhysicalName(); //! CreateFileStream direkt rufen, wenn verfuegbar
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
const SfxFilter* pFilter = rMedium.GetFilter();
@@ -1058,10 +1045,10 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
aConvFilterName=aFltName; //@ #BugId 54198
- BOOL bCalc3 = ( aFltName.EqualsAscii(pFilterSc30) );
- BOOL bCalc4 = ( aFltName.EqualsAscii(pFilterSc40) );
+ sal_Bool bCalc3 = ( aFltName.EqualsAscii(pFilterSc30) );
+ sal_Bool bCalc4 = ( aFltName.EqualsAscii(pFilterSc40) );
if (!bCalc3 && !bCalc4)
- aDocument.SetInsertingFromOtherDoc( TRUE );
+ aDocument.SetInsertingFromOtherDoc( sal_True );
if (aFltName.EqualsAscii(pFilterXML))
bRet = LoadXML( &rMedium, NULL );
@@ -1077,7 +1064,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if (aFltName.EqualsAscii(pFilterLotus))
@@ -1086,7 +1073,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -1098,22 +1085,22 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_437 );
}
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = sal_True;
FltError eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &aDocument,
ScGlobal::GetCharsetValue(sItStr));
- ScColumn::bDoubleAlloc = FALSE;
+ ScColumn::bDoubleAlloc = false;
if (eError != eERR_OK)
{
if (!GetError())
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
- bSetColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bRet = sal_True;
+ bSetColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else if ( aFltName.EqualsAscii(pFilterExcel4) || aFltName.EqualsAscii(pFilterExcel5) ||
aFltName.EqualsAscii(pFilterExcel95) || aFltName.EqualsAscii(pFilterExcel97) ||
@@ -1131,9 +1118,9 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
MakeDrawLayer(); //! im Filter
CalcOutputFactor(); // prepare update of row height
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = true;
FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat );
- ScColumn::bDoubleAlloc = FALSE;
+ ScColumn::bDoubleAlloc = false;
aDocument.UpdateFontCharSet();
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
aDocument.UpdateChartListenerCollection(); //! fuer alle Importe?
@@ -1145,7 +1132,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
if (!GetError())
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
- bRet = TRUE;
+ bRet = sal_True;
}
else if (eError != eERR_OK)
{
@@ -1153,20 +1140,20 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
}
else
- bRet = TRUE;
+ bRet = true;
}
else if (aFltName.EqualsAscii(pFilterAscii))
{
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
ScAsciiOptions aOptions;
- BOOL bOptInit = FALSE;
+ sal_Bool bOptInit = false;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
aOptions.ReadFromString( ((const SfxStringItem*)pItem)->GetValue() );
- bOptInit = TRUE;
+ bOptInit = sal_True;
}
if ( !bOptInit )
@@ -1180,7 +1167,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
FltError eError = eERR_OK;
- BOOL bOverflow = FALSE;
+ sal_Bool bOverflow = false;
if( ! rMedium.IsStorage() )
{
@@ -1214,8 +1201,8 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!GetError())
SetError(SCWARN_IMPORT_RANGE_OVERFLOW, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
}
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
+ bSetColWidths = sal_True;
+ bSetSimpleTextColWidths = sal_True;
}
else if (aFltName.EqualsAscii(pFilterDBase))
{
@@ -1223,7 +1210,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -1237,7 +1224,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
ScDocRowHeightUpdater::TabRanges aRecalcRanges(0);
- ULONG eError = DBaseImport( rMedium.GetPhysicalName(),
+ sal_uLong eError = DBaseImport( rMedium.GetPhysicalName(),
ScGlobal::GetCharsetValue(sItStr), aColWidthParam, *aRecalcRanges.mpRanges );
aRecalcRowRangesArray.push_back(aRecalcRanges);
@@ -1248,11 +1235,11 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
bRet = ( eError == SCWARN_IMPORT_RANGE_OVERFLOW );
}
else
- bRet = TRUE;
+ bRet = sal_True;
aColWidthRange.aStart.SetRow( 1 ); // Spaltenheader nicht
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
+ bSetColWidths = true;
+ bSetSimpleTextColWidths = true;
}
else if (aFltName.EqualsAscii(pFilterDif))
{
@@ -1264,7 +1251,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -1285,14 +1272,14 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bSetColWidths = sal_True;
+ bSetSimpleTextColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else if (aFltName.EqualsAscii(pFilterSylk))
{
@@ -1318,29 +1305,29 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if ( eError != eERR_OK && !GetError() )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
- bSetColWidths = TRUE;
- bSetSimpleTextColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bSetColWidths = sal_True;
+ bSetSimpleTextColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else if (aFltName.EqualsAscii(pFilterQPro6))
{
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = sal_True;
FltError eError = ScFormatFilter::Get().ScImportQuattroPro( rMedium, &aDocument);
- ScColumn::bDoubleAlloc = FALSE;
+ ScColumn::bDoubleAlloc = false;
if (eError != eERR_OK)
{
if (!GetError())
SetError( eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
// TODO: Filter should set column widths. Not doing it here, it may
// result in very narrow or wide columns, depending on content.
// Setting row heights makes cells with font size attribution or
// wrapping enabled look nicer..
- bSetRowHeights = TRUE;
+ bSetRowHeights = sal_True;
}
else if (aFltName.EqualsAscii(pFilterRtf))
{
@@ -1359,14 +1346,14 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
aDocument.StartAllListeners();
aDocument.SetDirty();
- bSetColWidths = TRUE;
- bSetRowHeights = TRUE;
+ bSetColWidths = sal_True;
+ bSetRowHeights = sal_True;
}
else
{
@@ -1380,7 +1367,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if (aFltName.EqualsAscii(pFilterHtml) || aFltName.EqualsAscii(pFilterHtmlWebQ))
{
FltError eError = SCERR_IMPORT_UNKNOWN;
- BOOL bWebQuery = aFltName.EqualsAscii(pFilterHtmlWebQ);
+ sal_Bool bWebQuery = aFltName.EqualsAscii(pFilterHtmlWebQ);
if( !rMedium.IsStorage() )
{
SvStream* pInStream = rMedium.GetInStream();
@@ -1391,7 +1378,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
String aFilterOption = (static_cast<const SfxStringItem*>(pItem))->GetValue();
lcl_parseHtmlFilterOption(aFilterOption, eLang, bDateConvert);
@@ -1410,10 +1397,10 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
aDocument.StartAllListeners();
aDocument.SetDirty();
}
@@ -1433,7 +1420,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
if (!bCalc3)
- aDocument.SetInsertingFromOtherDoc( FALSE );
+ aDocument.SetInsertingFromOtherDoc( false );
}
else
{
@@ -1469,11 +1456,11 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!bSetSimpleTextColWidths)
aColWidthParam[nCol].mbSimpleText = false;
- USHORT nWidth = aDocument.GetOptimalColWidth(
- nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoom, aZoom, FALSE, &aMark,
+ sal_uInt16 nWidth = aDocument.GetOptimalColWidth(
+ nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoom, aZoom, false, &aMark,
&aColWidthParam[nCol] );
aDocument.SetColWidth( nCol, nTab,
- nWidth + (USHORT)ScGlobal::nLastColWidthExtra );
+ nWidth + (sal_uInt16)ScGlobal::nLastColWidthExtra );
}
}
}
@@ -1500,7 +1487,7 @@ BOOL ScDocShell::ConvertFrom( SfxMedium& rMedium )
if ( bRet )
aDocument.InvalidateTableArea();
- bIsEmpty = FALSE;
+ bIsEmpty = false;
return bRet;
}
@@ -1544,7 +1531,7 @@ ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()
}
-BOOL ScDocShell::Save()
+sal_Bool ScDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Save" );
@@ -1553,14 +1540,14 @@ BOOL ScDocShell::Save()
PrepareSaveGuard aPrepareGuard( *this);
// wait cursor is handled with progress bar
- BOOL bRet = SfxObjectShell::Save();
+ sal_Bool bRet = SfxObjectShell::Save();
if( bRet )
bRet = SaveXML( GetMedium(), NULL );
return bRet;
}
-BOOL ScDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool ScDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::SaveAs" );
@@ -1582,7 +1569,7 @@ BOOL ScDocShell::SaveAs( SfxMedium& rMedium )
PrepareSaveGuard aPrepareGuard( *this);
// wait cursor is handled with progress bar
- BOOL bRet = SfxObjectShell::SaveAs( rMedium );
+ sal_Bool bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
bRet = SaveXML( &rMedium, NULL );
@@ -1590,7 +1577,7 @@ BOOL ScDocShell::SaveAs( SfxMedium& rMedium )
}
-BOOL ScDocShell::IsInformationLost()
+sal_Bool ScDocShell::IsInformationLost()
{
//!!! bei Gelegenheit ein korrekte eigene Behandlung einbauen
@@ -1599,7 +1586,7 @@ BOOL ScDocShell::IsInformationLost()
// Xcl-like column width measured in characters of standard font.
-xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth )
+xub_StrLen lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth )
{
double f = nWidth;
f *= 1328.0 / 25.0;
@@ -1612,7 +1599,7 @@ xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth )
void lcl_ScDocShell_GetFixedWidthString( String& rStr, const ScDocument& rDoc,
- SCTAB nTab, SCCOL nCol, BOOL bValue, SvxCellHorJustify eHorJust )
+ SCTAB nTab, SCCOL nCol, sal_Bool bValue, SvxCellHorJustify eHorJust )
{
xub_StrLen nLen = lcl_ScDocShell_GetColWidthInChars(
rDoc.GetColWidth( nCol, nTab ) );
@@ -1655,7 +1642,7 @@ void lcl_ScDocShell_WriteEmptyFixedWidthString( SvStream& rStream,
const ScDocument& rDoc, SCTAB nTab, SCCOL nCol )
{
String aString;
- lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, FALSE,
+ lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, false,
SVX_HOR_JUSTIFY_STANDARD );
rStream.WriteUnicodeOrByteText( aString );
}
@@ -1666,23 +1653,26 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
sal_Unicode cDelim = rAsciiOpt.nFieldSepCode;
sal_Unicode cStrDelim = rAsciiOpt.nTextSepCode;
CharSet eCharSet = rAsciiOpt.eCharSet;
- BOOL bFixedWidth = rAsciiOpt.bFixedWidth;
- BOOL bSaveAsShown = rAsciiOpt.bSaveAsShown;
+ sal_Bool bFixedWidth = rAsciiOpt.bFixedWidth;
+ sal_Bool bSaveAsShown = rAsciiOpt.bSaveAsShown;
CharSet eOldCharSet = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eCharSet );
- USHORT nOldNumberFormatInt = rStream.GetNumberFormatInt();
+ sal_uInt16 nOldNumberFormatInt = rStream.GetNumberFormatInt();
ByteString aStrDelimEncoded; // only used if not Unicode
UniString aStrDelimDecoded; // only used if context encoding
- BOOL bContextOrNotAsciiEncoding;
+ ByteString aDelimEncoded;
+ UniString aDelimDecoded;
+ sal_Bool bContextOrNotAsciiEncoding;
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
rStream.StartWritingUnicodeText();
- bContextOrNotAsciiEncoding = FALSE;
+ bContextOrNotAsciiEncoding = false;
}
else
{
aStrDelimEncoded = ByteString( cStrDelim, eCharSet );
+ aDelimEncoded = ByteString( cDelim, eCharSet );
rtl_TextEncodingInfo aInfo;
aInfo.StructSize = sizeof(aInfo);
if ( rtl_getTextEncodingInfo( eCharSet, &aInfo ) )
@@ -1691,10 +1681,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
(((aInfo.Flags & RTL_TEXTENCODING_INFO_CONTEXT) != 0) ||
((aInfo.Flags & RTL_TEXTENCODING_INFO_ASCII) == 0));
if ( bContextOrNotAsciiEncoding )
+ {
aStrDelimDecoded = String( aStrDelimEncoded, eCharSet );
+ aDelimDecoded = String( aDelimEncoded, eCharSet );
+ }
}
else
- bContextOrNotAsciiEncoding = FALSE;
+ bContextOrNotAsciiEncoding = false;
}
SCCOL nStartCol = 0;
@@ -1712,8 +1705,8 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
const ScViewOptions& rOpt = (pViewSh)
? pViewSh->GetViewData()->GetOptions()
: aDocument.GetViewOptions();
- BOOL bShowFormulas = rOpt.GetOption( VOPT_FORMULAS );
- BOOL bTabProtect = aDocument.IsTabProtected( nTab );
+ sal_Bool bShowFormulas = rOpt.GetOption( VOPT_FORMULAS );
+ sal_Bool bTabProtect = aDocument.IsTabProtected( nTab );
SCCOL nCol;
SCROW nRow;
@@ -1728,10 +1721,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
ScBaseCell* pCell;
while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != NULL )
{
- BOOL bProgress = FALSE; // only upon line change
+ sal_Bool bProgress = false; // only upon line change
if ( nNextRow < nRow )
{ // empty rows or/and empty columns up to end of row
- bProgress = TRUE;
+ bProgress = sal_True;
for ( nEmptyCol = nNextCol; nEmptyCol < nEndCol; nEmptyCol++ )
{ // remaining columns of last row
if ( bFixedWidth )
@@ -1777,7 +1770,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
if ( nCol == nEndCol )
{
- bProgress = TRUE;
+ bProgress = sal_True;
nNextCol = nStartCol;
nNextRow = nRow + 1;
}
@@ -1795,26 +1788,26 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
pProtAttr->GetHideFormula() ) )
eType = CELLTYPE_NONE; // hide
}
- BOOL bString;
+ sal_Bool bString;
switch ( eType )
{
case CELLTYPE_NOTE:
case CELLTYPE_NONE:
aString.Erase();
- bString = FALSE;
+ bString = false;
break;
case CELLTYPE_FORMULA :
{
- USHORT nErrCode;
+ sal_uInt16 nErrCode;
if ( bShowFormulas )
{
((ScFormulaCell*)pCell)->GetFormula( aString );
- bString = TRUE;
+ bString = sal_True;
}
else if ( ( nErrCode = ((ScFormulaCell*)pCell)->GetErrCode() ) != 0 )
{
aString = ScGlobal::GetErrorString( nErrCode );
- bString = TRUE;
+ bString = sal_True;
}
else if ( ((ScFormulaCell*)pCell)->IsValue() )
{
@@ -1829,7 +1822,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
else
{
ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter );
- bString = FALSE;
+ bString = false;
}
}
else
@@ -1843,7 +1836,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
((ScFormulaCell*)pCell)->GetString( aString );
- bString = TRUE;
+ bString = sal_True;
}
}
break;
@@ -1857,7 +1850,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
((ScStringCell*)pCell)->GetString( aString );
- bString = TRUE;
+ bString = sal_True;
break;
case CELLTYPE_EDIT :
{
@@ -1866,7 +1859,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
EditEngine& rEngine = aDocument.GetEditEngine();
rEngine.SetText( *pObj);
aString = rEngine.GetText(); // including LF
- bString = TRUE;
+ bString = sal_True;
}
break;
case CELLTYPE_VALUE :
@@ -1882,14 +1875,14 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
else
{
ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter );
- bString = FALSE;
+ bString = false;
}
}
break;
default:
OSL_FAIL( "ScDocShell::AsciiSave: unknown CellType" );
aString.Erase();
- bString = FALSE;
+ bString = false;
}
if ( bFixedWidth )
@@ -1919,14 +1912,21 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( eCharSet == RTL_TEXTENCODING_UNICODE )
{
xub_StrLen nPos = aString.Search( cStrDelim );
+ // #i116636# quotes are needed if text delimiter (quote), field delimiter, or LF is in the cell text
+ bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
+ ( nPos != STRING_NOTFOUND ) ||
+ ( aString.Search( cDelim ) != STRING_NOTFOUND ) ||
+ ( aString.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
aString.Insert( cStrDelim, nPos );
nPos = aString.Search( cStrDelim, nPos+2 );
}
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
rStream.WriteUnicodeText( aString );
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
}
else
{
@@ -1952,6 +1952,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
UniString aStrDec( aStrEnc, eCharSet );
// search on re-decoded string
xub_StrLen nPos = aStrDec.Search( aStrDelimDecoded );
+ bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
+ ( nPos != STRING_NOTFOUND ) ||
+ ( aStrDec.Search( aDelimDecoded ) != STRING_NOTFOUND ) ||
+ ( aStrDec.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
aStrDec.Insert( aStrDelimDecoded, nPos );
@@ -1959,15 +1963,21 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
nPos+1+aStrDelimDecoded.Len() );
}
// write byte re-encoded
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
rStream.WriteUnicodeOrByteText( aStrDec, eCharSet );
- rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
+ if ( bNeedQuotes )
+ rStream.WriteUniOrByteChar( cStrDelim, eCharSet );
}
else
{
ByteString aStrEnc( aString, eCharSet );
// search on encoded string
xub_StrLen nPos = aStrEnc.Search( aStrDelimEncoded );
+ bool bNeedQuotes = rAsciiOpt.bQuoteAllText ||
+ ( nPos != STRING_NOTFOUND ) ||
+ ( aStrEnc.Search( aDelimEncoded ) != STRING_NOTFOUND ) ||
+ ( aStrEnc.Search( sal_Char(_LF) ) != STRING_NOTFOUND );
while ( nPos != STRING_NOTFOUND )
{
aStrEnc.Insert( aStrDelimEncoded, nPos );
@@ -1975,11 +1985,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
nPos+1+aStrDelimEncoded.Len() );
}
// write byte encoded
- rStream.Write( aStrDelimEncoded.GetBuffer(),
- aStrDelimEncoded.Len() );
+ if ( bNeedQuotes )
+ rStream.Write( aStrDelimEncoded.GetBuffer(),
+ aStrDelimEncoded.Len() );
rStream.Write( aStrEnc.GetBuffer(), aStrEnc.Len() );
- rStream.Write( aStrDelimEncoded.GetBuffer(),
- aStrDelimEncoded.Len() );
+ if ( bNeedQuotes )
+ rStream.Write( aStrDelimEncoded.GetBuffer(),
+ aStrDelimEncoded.Len() );
}
}
}
@@ -2033,7 +2045,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
rStream.SetNumberFormatInt( nOldNumberFormatInt );
}
-BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
+sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertTo" );
@@ -2049,7 +2061,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
DBG_ASSERT( rMed.GetFilter(), "Filter == 0" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
String aFltName = rMed.GetFilter()->GetFilterName();
if (aFltName.EqualsAscii(pFilterXML))
@@ -2123,7 +2135,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2140,7 +2152,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject aWait( GetActiveDialogParent() );
ScImportOptions aOptions( sItStr );
AsciiSave( *pStream, aOptions );
- bRet = TRUE;
+ bRet = sal_True;
if (aDocument.GetTableCount() > 1)
if (!rMed.GetError())
@@ -2153,7 +2165,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sCharSet = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2169,9 +2181,9 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject aWait( GetActiveDialogParent() );
// HACK damit Sba geoffnetes TempFile ueberschreiben kann
rMed.CloseOutStream();
- BOOL bHasMemo = FALSE;
+ sal_Bool bHasMemo = false;
- ULONG eError = DBaseExport( rMed.GetPhysicalName(),
+ sal_uLong eError = DBaseExport( rMed.GetPhysicalName(),
ScGlobal::GetCharsetValue(sCharSet), bHasMemo );
if ( eError != eERR_OK && (eError & ERRCODE_WARNING_MASK) )
@@ -2191,7 +2203,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
if ( bHasMemo )
{
SfxStringItem* pNameItem =
@@ -2199,9 +2211,9 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
INetURLObject aDbtFile( pNameItem->GetValue(), INET_PROT_FILE );
aDbtFile.setExtension( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("dbt")) );
if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
- bRet = FALSE;
+ bRet = false;
if ( bRet && !MoveFile( aTmpFile, aDbtFile ) )
- bRet = FALSE;
+ bRet = false;
if ( !bRet )
{
KillFile( aTmpFile );
@@ -2220,7 +2232,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
{
sItStr = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2236,7 +2248,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject aWait( GetActiveDialogParent() );
ScFormatFilter::Get().ScExportDif( *pStream, &aDocument, ScAddress(0,0,0),
ScGlobal::GetCharsetValue(sItStr) );
- bRet = TRUE;
+ bRet = sal_True;
if (aDocument.GetTableCount() > 1)
if (!rMed.GetError())
@@ -2256,7 +2268,7 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
ScRange aRange( 0,0,0, nEndCol,nEndRow,0 );
ScImportExport aImExport( &aDocument, aRange );
- aImExport.SetFormulas( TRUE );
+ aImExport.SetFormulas( sal_True );
bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SOT_FORMATSTR_ID_SYLK );
}
}
@@ -2285,15 +2297,15 @@ BOOL ScDocShell::ConvertTo( SfxMedium &rMed )
}
-BOOL ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
+sal_Bool ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
return SfxObjectShell::SaveCompleted( xStor );
}
-BOOL ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
+sal_Bool ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
{
- BOOL bRet = SfxObjectShell::DoSaveCompleted( pNewStor );
+ sal_Bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor );
// SC_HINT_DOC_SAVED fuer Wechsel ReadOnly -> Read/Write
Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) );
@@ -2301,7 +2313,7 @@ BOOL ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
}
-sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
+sal_Bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId )
{
// #i112634# ask VBA event handlers whether to save or print the document
@@ -2331,7 +2343,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
}
catch( util::VetoException& )
{
- bSlotExecutable = sal_False;
+ bSlotExecutable = false;
}
catch( uno::Exception& )
{
@@ -2340,7 +2352,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
}
-USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 ScDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
if(SC_MOD()->GetCurRefDlgId()>0)
{
@@ -2356,12 +2368,12 @@ USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
}
}
- return FALSE;
+ return false;
}
if ( aDocument.IsInLinkUpdate() || aDocument.IsInInterpreter() )
{
ErrorMessage(STR_CLOSE_ERROR_LINK);
- return FALSE;
+ return false;
}
DoEnterHandler();
@@ -2378,7 +2390,7 @@ USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
catch( util::VetoException& )
{
// if event processor throws VetoException, macro has vetoed close
- return sal_False;
+ return false;
}
catch( uno::Exception& )
{
@@ -2386,9 +2398,9 @@ USHORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
}
// end handler code
- USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if (nRet == TRUE) // TRUE = schliessen
- aDocument.DisableIdle(TRUE); // nicht mehr drin rumpfuschen !!!
+ sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
+ if (nRet == sal_True) // sal_True = schliessen
+ aDocument.DisableIdle(sal_True); // nicht mehr drin rumpfuschen !!!
return nRet;
}
@@ -2442,9 +2454,9 @@ String ScDocShell::GetDifFilterName()
return String::CreateFromAscii(pFilterDif);
}
-BOOL ScDocShell::HasAutomaticTableName( const String& rFilter )
+sal_Bool ScDocShell::HasAutomaticTableName( const String& rFilter )
{
- // TRUE for those filters that keep the default table name
+ // sal_True for those filters that keep the default table name
// (which is language specific)
return rFilter.EqualsAscii( pFilterAscii )
@@ -2465,15 +2477,15 @@ BOOL ScDocShell::HasAutomaticTableName( const String& rFilter )
aDdeTextFmt(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TEXT"))), \
nPrtToScreenFactor( 1.0 ), \
pImpl ( new DocShell_Impl ), \
- bHeaderOn ( TRUE ), \
- bFooterOn ( TRUE ), \
- bNoInformLost ( TRUE ), \
- bIsEmpty ( TRUE ), \
- bIsInUndo ( FALSE ), \
- bDocumentModifiedPending( FALSE ), \
+ bHeaderOn ( sal_True ), \
+ bFooterOn ( sal_True ), \
+ bNoInformLost ( sal_True ), \
+ bIsEmpty ( sal_True ), \
+ bIsInUndo ( false ), \
+ bDocumentModifiedPending( false ), \
nDocumentLock ( 0 ), \
nCanUpdate (com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG), \
- bUpdateEnabled ( TRUE ), \
+ bUpdateEnabled ( sal_True ), \
pOldAutoDBRange ( NULL ), \
pDocHelper ( NULL ), \
pAutoStyleList ( NULL ), \
@@ -2588,7 +2600,7 @@ SfxUndoManager* ScDocShell::GetUndoManager()
return aDocument.GetUndoManager();
}
-void ScDocShell::SetModified( BOOL bModified )
+void ScDocShell::SetModified( sal_Bool bModified )
{
if ( SfxObjectShell::IsEnableSetModified() )
{
@@ -2598,7 +2610,7 @@ void ScDocShell::SetModified( BOOL bModified )
}
-void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
+void ScDocShell::SetDocumentModified( sal_Bool bIsModified /* = sal_True */ )
{
// BroadcastUno muss auch mit pPaintLockData sofort passieren
//! auch bei SetDrawModified, wenn Drawing angebunden ist
@@ -2607,6 +2619,7 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( pPaintLockData && bIsModified )
{
//! BCA_BRDCST_ALWAYS etc. also needed here?
+ aDocument.InvalidateTableArea(); // #i105279# needed here
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
pPaintLockData->SetModified(); // spaeter...
@@ -2618,16 +2631,16 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( bIsModified )
{
if ( aDocument.IsAutoCalcShellDisabled() )
- SetDocumentModifiedPending( TRUE );
+ SetDocumentModifiedPending( sal_True );
else
{
- SetDocumentModifiedPending( FALSE );
+ SetDocumentModifiedPending( false );
aDocument.InvalidateStyleSheetUsage();
aDocument.InvalidateTableArea();
aDocument.InvalidateLastTableOpParams();
aDocument.Broadcast( SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS, NULL );
if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() )
- aDocument.CalcFormulaTree( TRUE );
+ aDocument.CalcFormulaTree( sal_True );
PostDataChanged();
// Detective AutoUpdate:
@@ -2639,9 +2652,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( pList && ( aDocument.IsDetectiveDirty() || pList->HasAddError() ) &&
pList->Count() && !IsInUndo() && SC_MOD()->GetAppOptions().GetDetectiveAuto() )
{
- GetDocFunc().DetectiveRefresh(TRUE); // TRUE = caused by automatic update
+ GetDocFunc().DetectiveRefresh(sal_True); // sal_True = caused by automatic update
}
- aDocument.SetDetectiveDirty(FALSE); // always reset, also if not refreshed
+ aDocument.SetDetectiveDirty(false); // always reset, also if not refreshed
}
// notify UNO objects after BCA_BRDCST_ALWAYS etc.
@@ -2653,9 +2666,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
// (Drawing muss auch beim normalen SetDocumentModified upgedated werden,
// z.B. bei Tabelle loeschen etc.)
-void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
+void ScDocShell::SetDrawModified( sal_Bool bIsModified /* = sal_True */ )
{
- BOOL bUpdate = ( bIsModified != IsModified() );
+ sal_Bool bUpdate = ( bIsModified != IsModified() );
SetModified( bIsModified );
@@ -2690,7 +2703,7 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
}
}
-void ScDocShell::SetInUndo(BOOL bSet)
+void ScDocShell::SetInUndo(sal_Bool bSet)
{
bIsInUndo = bSet;
}
@@ -2705,8 +2718,8 @@ void ScDocShell::GetDocStat( ScDocStat& rDocStat )
if ( pPrinter )
for ( SCTAB i=0; i<rDocStat.nTableCount; i++ )
- rDocStat.nPageCount = sal::static_int_cast<USHORT>( rDocStat.nPageCount +
- (USHORT) ScPrintFunc( this, pPrinter, i ).GetTotalPages() );
+ rDocStat.nPageCount = sal::static_int_cast<sal_uInt16>( rDocStat.nPageCount +
+ (sal_uInt16) ScPrintFunc( this, pPrinter, i ).GetTotalPages() );
}
@@ -2879,7 +2892,7 @@ void ScDocShell::UseSheetSaveEntries()
for (nTab = 0; nTab < nTabCount; ++nTab)
if (aDocument.IsStreamValid(nTab))
- aDocument.SetStreamValid(nTab, FALSE);
+ aDocument.SetStreamValid(nTab, false);
}
}
}
@@ -2894,8 +2907,8 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& rDS )
ScDocument* pDoc = rDocShell.GetDocument();
bAutoCalcShellDisabled = pDoc->IsAutoCalcShellDisabled();
bIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->SetAutoCalcShellDisabled( TRUE );
- pDoc->DisableIdle( TRUE );
+ pDoc->SetAutoCalcShellDisabled( sal_True );
+ pDoc->DisableIdle( sal_True );
}
@@ -2915,7 +2928,7 @@ void ScDocShellModificator::SetDocumentModified()
if ( !pDoc->IsImportingXML() )
{
// AutoCalcShellDisabled temporaer restaurieren
- BOOL bDisabled = pDoc->IsAutoCalcShellDisabled();
+ sal_Bool bDisabled = pDoc->IsAutoCalcShellDisabled();
pDoc->SetAutoCalcShellDisabled( bAutoCalcShellDisabled );
rDocShell.SetDocumentModified();
pDoc->SetAutoCalcShellDisabled( bDisabled );
@@ -2936,7 +2949,7 @@ sal_Bool ScDocShell::AcceptStateUpdate() const
if( SC_MOD()->Find1RefWindow( SFX_APP()->GetTopWindow() ) )
return sal_True;
- return sal_False;
+ return false;
}
@@ -2965,7 +2978,7 @@ void ScDocShell::SetChangeRecording( bool bActivate )
{
aDocument.StartChangeTracking();
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
aDocument.SetChangeViewSettings(aChangeViewSet);
}
else
@@ -2980,7 +2993,7 @@ void ScDocShell::SetChangeRecording( bool bActivate )
// Slots invalidieren
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
- pBindings->InvalidateAll(FALSE);
+ pBindings->InvalidateAll(false);
}
}
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index d4d581dc7783..52d99479f27d 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -68,22 +68,22 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-BOOL ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
+sal_Bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::InitNew" );
- BOOL bRet = SfxObjectShell::InitNew( xStor );
+ sal_Bool bRet = SfxObjectShell::InitNew( xStor );
aDocument.MakeTable(0);
// zusaetzliche Tabellen werden von der ersten View angelegt,
- // wenn bIsEmpty dann noch TRUE ist
+ // wenn bIsEmpty dann noch sal_True ist
if( bRet )
{
Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ),
(long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) );
// hier muss auch der Start angepasst werden
- SetVisAreaOrSize( Rectangle( Point(), aSize ), TRUE );
+ SetVisAreaOrSize( Rectangle( Point(), aSize ), sal_True );
}
aDocument.SetDrawDefaults(); // drawing layer defaults that are set only in InitNew
@@ -104,13 +104,13 @@ BOOL ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
//------------------------------------------------------------------
-BOOL ScDocShell::IsEmpty() const
+sal_Bool ScDocShell::IsEmpty() const
{
return bIsEmpty;
}
-void ScDocShell::SetEmpty(BOOL bSet)
+void ScDocShell::SetEmpty(sal_Bool bSet)
{
bIsEmpty = bSet;
}
@@ -151,7 +151,7 @@ void ScDocShell::InitItems()
!aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning() )
{
// get settings from SvxAsianConfig
- SvxAsianConfig aAsian( sal_False );
+ SvxAsianConfig aAsian( false );
if ( !aDocument.GetForbiddenCharacters().is() )
{
@@ -179,7 +179,7 @@ void ScDocShell::InitItems()
if ( !aDocument.IsValidAsianCompression() )
{
// set compression mode from configuration if not already set (e.g. XML import)
- aDocument.SetAsianCompression( sal::static_int_cast<BYTE>( aAsian.GetCharDistanceCompression() ) );
+ aDocument.SetAsianCompression( sal::static_int_cast<sal_uInt8>( aAsian.GetCharDistanceCompression() ) );
}
if ( !aDocument.IsValidAsianKerning() )
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index a9e79b46e86f..87ae56cceb38 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -111,8 +111,8 @@ void ScDocShell::PostDataChanged()
}
void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart,
- USHORT nExtFlags )
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart,
+ sal_uInt16 nExtFlags )
{
if (!ValidCol(nStartCol)) nStartCol = MAXCOL;
if (!ValidRow(nStartRow)) nStartRow = MAXROW;
@@ -123,7 +123,7 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
{
// #i54081# PAINT_EXTRAS still has to be brodcast because it changes the
// current sheet if it's invalid. All other flags added to pPaintLockData.
- USHORT nLockPart = nPart & ~PAINT_EXTRAS;
+ sal_uInt16 nLockPart = nPart & ~PAINT_EXTRAS;
if ( nLockPart )
{
//! nExtFlags ???
@@ -173,7 +173,7 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
aDocument.ResetChanged( ScRange(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) );
}
-void ScDocShell::PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags )
+void ScDocShell::PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags )
{
PostPaint( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -200,7 +200,7 @@ void ScDocShell::PostPaintExtras()
PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS );
}
-void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange )
+void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange )
{
if ( ( rExtFlags & SC_PF_LINES ) == 0 && aDocument.HasAttrib( rRange, HASATTR_PAINTEXT ) )
{
@@ -224,7 +224,7 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange )
}
}
-void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab )
{
UpdatePaintExt( rExtFlags, ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ) );
@@ -232,14 +232,14 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStar
//------------------------------------------------------------------
-void ScDocShell::LockPaint_Impl(BOOL bDoc)
+void ScDocShell::LockPaint_Impl(sal_Bool bDoc)
{
if ( !pPaintLockData )
pPaintLockData = new ScPaintLockData(0); //! Modus...
pPaintLockData->IncLevel(bDoc);
}
-void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
+void ScDocShell::UnlockPaint_Impl(sal_Bool bDoc)
{
if ( pPaintLockData )
{
@@ -255,7 +255,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
ScRangeListRef xRangeList = pPaint->GetRangeList();
if (xRangeList)
{
- USHORT nParts = pPaint->GetParts();
+ sal_uInt16 nParts = pPaint->GetParts();
for ( size_t i = 0, nCount = xRangeList->size(); i < nCount; i++ )
{
//! nExtFlags ???
@@ -278,7 +278,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
}
}
-void ScDocShell::LockDocument_Impl(USHORT nNew)
+void ScDocShell::LockDocument_Impl(sal_uInt16 nNew)
{
if (!nDocumentLock)
{
@@ -289,7 +289,7 @@ void ScDocShell::LockDocument_Impl(USHORT nNew)
nDocumentLock = nNew;
}
-void ScDocShell::UnlockDocument_Impl(USHORT nNew)
+void ScDocShell::UnlockDocument_Impl(sal_uInt16 nNew)
{
nDocumentLock = nNew;
if (!nDocumentLock)
@@ -300,41 +300,41 @@ void ScDocShell::UnlockDocument_Impl(USHORT nNew)
}
}
-USHORT ScDocShell::GetLockCount() const
+sal_uInt16 ScDocShell::GetLockCount() const
{
return nDocumentLock;
}
-void ScDocShell::SetLockCount(USHORT nNew)
+void ScDocShell::SetLockCount(sal_uInt16 nNew)
{
if (nNew) // setzen
{
if ( !pPaintLockData )
pPaintLockData = new ScPaintLockData(0); //! Modus...
- pPaintLockData->SetLevel(nNew-1, TRUE);
+ pPaintLockData->SetLevel(nNew-1, sal_True);
LockDocument_Impl(nNew);
}
else if (pPaintLockData) // loeschen
{
- pPaintLockData->SetLevel(0, TRUE); // bei Unlock sofort ausfuehren
- UnlockPaint_Impl(TRUE); // jetzt
+ pPaintLockData->SetLevel(0, sal_True); // bei Unlock sofort ausfuehren
+ UnlockPaint_Impl(sal_True); // jetzt
UnlockDocument_Impl(0);
}
}
void ScDocShell::LockPaint()
{
- LockPaint_Impl(FALSE);
+ LockPaint_Impl(false);
}
void ScDocShell::UnlockPaint()
{
- UnlockPaint_Impl(FALSE);
+ UnlockPaint_Impl(false);
}
void ScDocShell::LockDocument()
{
- LockPaint_Impl(TRUE);
+ LockPaint_Impl(sal_True);
LockDocument_Impl(nDocumentLock + 1);
}
@@ -342,7 +342,7 @@ void ScDocShell::UnlockDocument()
{
if (nDocumentLock)
{
- UnlockPaint_Impl(TRUE);
+ UnlockPaint_Impl(sal_True);
UnlockDocument_Impl(nDocumentLock - 1);
}
else
@@ -353,7 +353,7 @@ void ScDocShell::UnlockDocument()
//------------------------------------------------------------------
-void ScDocShell::SetInplace( BOOL bInplace )
+void ScDocShell::SetInplace( sal_Bool bInplace )
{
if (bIsInplace != bInplace)
{
@@ -370,7 +370,7 @@ void ScDocShell::CalcOutputFactor()
return;
}
- BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if (bTextWysiwyg)
{
nPrtToScreenFactor = 1.0;
@@ -423,8 +423,8 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
{
// Einstellungen aus dem SpellCheckCfg kommen in Doc- und ViewOptions
- USHORT nDefLang, nCjkLang, nCtlLang;
- BOOL bAutoSpell;
+ sal_uInt16 nDefLang, nCjkLang, nCtlLang;
+ sal_Bool bAutoSpell;
ScModule::GetSpellSettings( nDefLang, nCjkLang, nCtlLang, bAutoSpell );
ScModule* pScMod = SC_MOD();
@@ -433,7 +433,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
aDocOpt.SetAutoSpell( bAutoSpell );
// zweistellige Jahreszahleneingabe aus Extras->Optionen->Allgemein->Sonstiges
- aDocOpt.SetYear2000( sal::static_int_cast<USHORT>( ::utl::MiscCfg().GetYear2000() ) );
+ aDocOpt.SetYear2000( sal::static_int_cast<sal_uInt16>( ::utl::MiscCfg().GetYear2000() ) );
if (bForLoading)
{
@@ -458,7 +458,7 @@ Printer* ScDocShell::GetDocumentPrinter() // fuer OLE
return aDocument.GetPrinter();
}
-SfxPrinter* ScDocShell::GetPrinter(BOOL bCreateIfNotExist)
+SfxPrinter* ScDocShell::GetPrinter(sal_Bool bCreateIfNotExist)
{
return aDocument.GetPrinter(bCreateIfNotExist);
}
@@ -467,7 +467,7 @@ void ScDocShell::UpdateFontList()
{
delete pImpl->pFontList;
// pImpl->pFontList = new FontList( GetPrinter(), Application::GetDefaultDevice() );
- pImpl->pFontList = new FontList( GetRefDevice(), NULL, FALSE ); // FALSE or TRUE???
+ pImpl->pFontList = new FontList( GetRefDevice(), NULL, false ); // sal_False or sal_True???
SvxFontListItem aFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
@@ -479,9 +479,9 @@ OutputDevice* ScDocShell::GetRefDevice()
return aDocument.GetRefDevice();
}
-USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
+sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags )
{
- SfxPrinter *pOld = aDocument.GetPrinter( FALSE );
+ SfxPrinter *pOld = aDocument.GetPrinter( false );
if ( pOld && pOld->IsPrinting() )
return SFX_PRINTERROR_BUSY;
@@ -552,8 +552,8 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
if (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION)
{
const SvxPageItem& rOldItem = (const SvxPageItem&)rSet.Get(ATTR_PAGE);
- BOOL bWasLand = rOldItem.IsLandscape();
- BOOL bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
+ sal_Bool bWasLand = rOldItem.IsLandscape();
+ sal_Bool bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
if (bNewLand != bWasLand)
{
SvxPageItem aNewItem( rOldItem );
@@ -660,13 +660,13 @@ void ScDocShell::SetChangeComment( ScChangeAction* pAction, const String& rComme
ScChangeTrack* pTrack = GetDocument()->GetChangeTrack();
if (pTrack)
{
- ULONG nNumber = pAction->GetActionNumber();
+ sal_uLong nNumber = pAction->GetActionNumber();
pTrack->NotifyModified( SC_CTM_CHANGE, nNumber, nNumber );
}
}
}
-void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext)
+void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,sal_Bool bPrevNext)
{
if (!pAction) return; // ohne Aktion ist nichts..
@@ -676,7 +676,7 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pP
DateTime aDT = pAction->GetDateTime();
String aDate = ScGlobal::pLocaleData->getDate( aDT );
aDate += ' ';
- aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE );
+ aDate += ScGlobal::pLocaleData->getTime( aDT, false, false );
SfxItemSet aSet( GetPool(),
SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
@@ -728,7 +728,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
if (pOtherMed)
aOtherFile = pOtherMed->GetName();
}
- BOOL bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() );
+ sal_Bool bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() );
if ( !bSameDoc )
{
// create change actions from comparing with the name of the user
@@ -764,7 +764,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
//
//---------------------------------------------------------------------
-inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL bIgnore100Sec )
+inline sal_Bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, sal_Bool bIgnore100Sec )
{
return pA && pB &&
pA->GetActionNumber() == pB->GetActionNumber() &&
@@ -776,14 +776,14 @@ inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL
// State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde
}
-bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, BOOL bIgnore100Sec )
+bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, sal_Bool bIgnore100Sec )
{
if ( !pDoc || !pAction || !pSearchDoc || !pFirstSearchAction || !pLastSearchAction )
{
return false;
}
- ULONG nLastSearchAction = pLastSearchAction->GetActionNumber();
+ sal_uLong nLastSearchAction = pLastSearchAction->GetActionNumber();
const ScChangeAction* pA = pFirstSearchAction;
while ( pA && pA->GetActionNumber() <= nLastSearchAction )
{
@@ -795,9 +795,9 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument
pAction->GetBigRange() == pA->GetBigRange() )
{
String aActionDesc;
- pAction->GetDescription( aActionDesc, pDoc, TRUE );
+ pAction->GetDescription( aActionDesc, pDoc, sal_True );
String aADesc;
- pA->GetDescription( aADesc, pSearchDoc, TRUE );
+ pA->GetDescription( aADesc, pSearchDoc, sal_True );
if ( aActionDesc.Equals( aADesc ) )
{
OSL_FAIL( "lcl_FindAction(): found equal action!" );
@@ -810,9 +810,9 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument
return false;
}
-void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheckDuplicates, ULONG nOffset, ScChangeActionMergeMap* pMergeMap, bool bInverseMap )
+void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheckDuplicates, sal_uLong nOffset, ScChangeActionMergeMap* pMergeMap, bool bInverseMap )
{
- ScTabViewShell* pViewSh = GetBestViewShell( FALSE ); //! Funktionen an die DocShell
+ ScTabViewShell* pViewSh = GetBestViewShell( false ); //! Funktionen an die DocShell
if (!pViewSh)
return;
@@ -830,17 +830,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
// visuelles RedLining einschalten
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
// include 100th seconds in compare?
- BOOL bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() ||
+ sal_Bool bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() ||
!pThisTrack->IsTime100thSeconds();
// gemeinsame Ausgangsposition suchen
- ULONG nFirstNewNumber = 0;
+ sal_uLong nFirstNewNumber = 0;
const ScChangeAction* pSourceAction = pSourceTrack->GetFirst();
const ScChangeAction* pThisAction = pThisTrack->GetFirst();
// skip identical actions
@@ -863,7 +863,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
const ScChangeAction* pLastSearchAction = pThisTrack->GetLast();
// MergeChangeData aus den folgenden Aktionen erzeugen
- ULONG nNewActionCount = 0;
+ sal_uLong nNewActionCount = 0;
const ScChangeAction* pCount = pSourceAction;
while ( pCount )
{
@@ -879,7 +879,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")),
nNewActionCount );
- ULONG nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
+ sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
// UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand
pSourceTrack->MergePrepare( (ScChangeAction*) pFirstMergeAction, bShared );
@@ -905,7 +905,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
const ScChangeActionDel* pDel = (const ScChangeActionDel*) pThisAction;
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
{ // deleted Table enthaelt deleted Cols, die nicht
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
pSourceTrack->AppendDeleteRange(
pDel->GetOverAllRange().MakeRange(), NULL, nStart, nEnd );
}
@@ -930,9 +930,9 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
LockPaint(); // #i73877# no repainting after each action
// MergeChangeData in das aktuelle Dokument uebernehmen
- BOOL bHasRejected = FALSE;
+ sal_Bool bHasRejected = false;
String aOldUser = pThisTrack->GetUser();
- pThisTrack->SetUseFixDateTime( TRUE );
+ pThisTrack->SetUseFixDateTime( sal_True );
ScMarkData& rMarkData = pViewSh->GetViewData()->GetMarkData();
ScMarkData aOldMarkData( rMarkData );
pSourceAction = pFirstMergeAction;
@@ -981,10 +981,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pThisTrack->SetUser( pSourceAction->GetUser() );
pThisTrack->SetFixDateTimeUTC( pSourceAction->GetDateTimeUTC() );
- ULONG nOldActionMax = pThisTrack->GetActionMax();
+ sal_uLong nOldActionMax = pThisTrack->GetActionMax();
bool bExecute = true;
- ULONG nReject = pSourceAction->GetRejectAction();
+ sal_uLong nReject = pSourceAction->GetRejectAction();
if ( nReject )
{
if ( bShared )
@@ -997,7 +997,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pOldAction && pOldAction->IsVirgin() )
{
pThisTrack->Reject( pOldAction );
- bHasRejected = TRUE;
+ bHasRejected = sal_True;
bExecute = false;
}
}
@@ -1012,7 +1012,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
//! oder Reject-Aenderung normal ausfuehren
pThisTrack->Reject(pOldAction);
- bHasRejected = TRUE; // fuer Paint
+ bHasRejected = sal_True; // fuer Paint
}
bExecute = false;
}
@@ -1034,7 +1034,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScAddress aPos = aSourceRange.aStart;
String aValue;
((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue );
- BYTE eMatrix = MM_NONE;
+ sal_uInt8 eMatrix = MM_NONE;
const ScBaseCell* pCell = ((const ScChangeActionContent*)pSourceAction)->GetNewCell();
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
eMatrix = ((const ScFormulaCell*)pCell)->GetMatrixFlag();
@@ -1053,7 +1053,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
aValue.Erase( 0, 1 );
aValue.Erase( aValue.Len()-1, 1 );
GetDocFunc().EnterMatrix( aSourceRange,
- NULL, NULL, aValue, FALSE, FALSE,
+ NULL, NULL, aValue, false, false,
EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
}
break;
@@ -1072,17 +1072,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
String aName;
aDocument.CreateValidTabName( aName );
- GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, TRUE, FALSE );
+ GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, sal_True, false );
}
break;
case SC_CAT_INSERT_ROWS:
- GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, TRUE, FALSE );
+ GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, sal_True, false );
break;
case SC_CAT_INSERT_COLS:
- GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, TRUE, FALSE );
+ GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, sal_True, false );
break;
case SC_CAT_DELETE_TABS :
- GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), TRUE, FALSE );
+ GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), sal_True, false );
break;
case SC_CAT_DELETE_ROWS:
{
@@ -1090,7 +1090,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pDel->IsTopDelete() )
{
aSourceRange = pDel->GetOverAllRange().MakeRange();
- GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELROWS, TRUE, FALSE );
+ GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELROWS, sal_True, false );
// #i101099# [Collaboration] Changes are not correctly shown
if ( bShared )
@@ -1110,7 +1110,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
{ // deleted Table enthaelt deleted Cols, die nicht
aSourceRange = pDel->GetOverAllRange().MakeRange();
- GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELCOLS, TRUE, FALSE );
+ GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELCOLS, sal_True, false );
}
}
break;
@@ -1119,7 +1119,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
const ScChangeActionMove* pMove = (const ScChangeActionMove*) pSourceAction;
ScRange aFromRange( pMove->GetFromRange().MakeRange() );
GetDocFunc().MoveBlock( aFromRange,
- aSourceRange.aStart, TRUE, TRUE, FALSE, FALSE );
+ aSourceRange.aStart, sal_True, sal_True, false, false );
}
break;
default:
@@ -1159,10 +1159,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScChangeAction* pAct = pThisTrack->GetLast();
if ( pAct && pAct->GetActionNumber() > nOldActionMax )
{
- ULONG nActionMax = pAct->GetActionNumber();
- ULONG nActionCount = nActionMax - nOldActionMax;
- ULONG nAction = nActionMax - nActionCount + 1;
- ULONG nSourceAction = pSourceAction->GetActionNumber() - nActionCount + 1;
+ sal_uLong nActionMax = pAct->GetActionNumber();
+ sal_uLong nActionCount = nActionMax - nOldActionMax;
+ sal_uLong nAction = nActionMax - nActionCount + 1;
+ sal_uLong nSourceAction = pSourceAction->GetActionNumber() - nActionCount + 1;
while ( nAction <= nActionMax )
{
if ( bInverseMap )
@@ -1184,7 +1184,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
rMarkData = aOldMarkData;
pThisTrack->SetUser(aOldUser);
- pThisTrack->SetUseFixDateTime( FALSE );
+ pThisTrack->SetUseFixDateTime( false );
pSourceTrack->Clear(); //! der ist jetzt verhunzt
@@ -1216,11 +1216,11 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// reset show changes
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges( FALSE );
+ aChangeViewSet.SetShowChanges( false );
aDocument.SetChangeViewSettings( aChangeViewSet );
// find first merge action in this document
- BOOL bIgnore100Sec = !pThisTrack->IsTime100thSeconds() || !pSharedTrack->IsTime100thSeconds();
+ sal_Bool bIgnore100Sec = !pThisTrack->IsTime100thSeconds() || !pSharedTrack->IsTime100thSeconds();
ScChangeAction* pThisAction = pThisTrack->GetFirst();
ScChangeAction* pSharedAction = pSharedTrack->GetFirst();
while ( lcl_Equal( pThisAction, pSharedAction, bIgnore100Sec ) )
@@ -1234,8 +1234,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
if ( pThisAction )
{
// merge own changes into shared document
- ULONG nActStartShared = pSharedAction->GetActionNumber();
- ULONG nActEndShared = pSharedTrack->GetActionMax();
+ sal_uLong nActStartShared = pSharedAction->GetActionNumber();
+ sal_uLong nActEndShared = pSharedTrack->GetActionMax();
ScDocument* pTmpDoc = new ScDocument;
for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex )
{
@@ -1247,8 +1247,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
ScChangeActionMergeMap aOwnInverseMergeMap;
pSharedDocShell->MergeDocument( *pTmpDoc, true, true, 0, &aOwnInverseMergeMap, true );
delete pTmpDoc;
- ULONG nActStartOwn = nActEndShared + 1;
- ULONG nActEndOwn = pSharedTrack->GetActionMax();
+ sal_uLong nActStartOwn = nActEndShared + 1;
+ sal_uLong nActEndOwn = pSharedTrack->GetActionMax();
// find conflicts
ScConflictsList aConflictsList;
@@ -1291,7 +1291,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
pThisTrack->Clone( pTmpDoc );
// undo own changes since last save in own document
- ULONG nStartShared = pThisAction->GetActionNumber();
+ sal_uLong nStartShared = pThisAction->GetActionNumber();
ScChangeAction* pAction = pThisTrack->GetLast();
while ( pAction && pAction->GetActionNumber() >= nStartShared )
{
@@ -1305,7 +1305,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
// merge shared changes into own document
ScChangeActionMergeMap aSharedMergeMap;
MergeDocument( rSharedDoc, true, true, 0, &aSharedMergeMap );
- ULONG nEndShared = pThisTrack->GetActionMax();
+ sal_uLong nEndShared = pThisTrack->GetActionMax();
// resolve conflicts for shared non-content actions
if ( !aConflictsList.empty() )
@@ -1323,18 +1323,18 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
nEndShared = pThisTrack->GetActionMax();
// only show changes from shared document
- aChangeViewSet.SetShowChanges( TRUE );
- aChangeViewSet.SetShowAccepted( TRUE );
+ aChangeViewSet.SetShowChanges( sal_True );
+ aChangeViewSet.SetShowAccepted( sal_True );
aChangeViewSet.SetHasActionRange( true );
aChangeViewSet.SetTheActionRange( nStartShared, nEndShared );
aDocument.SetChangeViewSettings( aChangeViewSet );
// merge own changes back into own document
- ULONG nStartOwn = nEndShared + 1;
+ sal_uLong nStartOwn = nEndShared + 1;
ScChangeActionMergeMap aOwnMergeMap;
MergeDocument( *pTmpDoc, true, true, nEndShared - nStartShared + 1, &aOwnMergeMap );
delete pTmpDoc;
- ULONG nEndOwn = pThisTrack->GetActionMax();
+ sal_uLong nEndOwn = pThisTrack->GetActionMax();
// resolve conflicts for shared content actions and own actions
if ( !aConflictsList.empty() )
@@ -1362,13 +1362,13 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
else
{
// merge shared changes into own document
- ULONG nStartShared = pThisTrack->GetActionMax() + 1;
+ sal_uLong nStartShared = pThisTrack->GetActionMax() + 1;
MergeDocument( rSharedDoc, true, true );
- ULONG nEndShared = pThisTrack->GetActionMax();
+ sal_uLong nEndShared = pThisTrack->GetActionMax();
// only show changes from shared document
- aChangeViewSet.SetShowChanges( TRUE );
- aChangeViewSet.SetShowAccepted( TRUE );
+ aChangeViewSet.SetShowChanges( sal_True );
+ aChangeViewSet.SetShowAccepted( sal_True );
aChangeViewSet.SetHasActionRange( true );
aChangeViewSet.SetTheActionRange( nStartShared, nEndShared );
aDocument.SetChangeViewSettings( aChangeViewSet );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index fbf4ab710e73..b4ee37a9e7b7 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -42,7 +42,7 @@ using namespace ::com::sun::star;
#include "scitems.hxx"
#include <sfx2/fcontnr.hxx>
#include <editeng/eeitem.hxx>
-
+#include <sfx2/objface.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/docfile.hxx>
@@ -54,7 +54,6 @@ using namespace ::com::sun::star;
#include <svtools/sfxecode.hxx>
#include <svx/ofaitem.hxx>
#include <sot/formats.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
@@ -104,6 +103,7 @@ using namespace ::com::sun::star;
#include "chgviset.hxx"
#include "reffact.hxx"
#include "chartlis.hxx"
+#include "chartpos.hxx"
#include "waitoff.hxx"
#include "tablink.hxx" // ScDocumentLoader statics
#include "drwlayer.hxx"
@@ -133,7 +133,7 @@ using namespace ::com::sun::star;
Get(ATTR_PAGE_SHARED)).GetValue()
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
#define SC_PREVIEW_SIZE_X 10000
#define SC_PREVIEW_SIZE_Y 12400
@@ -149,9 +149,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
const SfxItemSet* pReqArgs = rReq.GetArgs();
SfxBindings* pBindings = GetViewBindings();
- BOOL bUndo (aDocument.IsUndoEnabled());
+ sal_Bool bUndo (aDocument.IsUndoEnabled());
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_SC_SETTEXT:
@@ -206,18 +206,18 @@ void ScDocShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
String sSbaData, sTarget;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
sSbaData = ((const SfxStringItem*)pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
sTarget = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bIsNewArea = TRUE; // Default TRUE (keine Nachfrage)
- if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bIsNewArea = sal_True; // Default sal_True (keine Nachfrage)
+ if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET )
bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue();
::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet > xResultSet;
- if ( pReqArgs->GetItemState( FN_PARAM_3, FALSE, &pItem ) == SFX_ITEM_SET && pItem )
+ if ( pReqArgs->GetItemState( FN_PARAM_3, false, &pItem ) == SFX_ITEM_SET && pItem )
xResultSet.set(((const SfxUsrAnyItem*)pItem)->GetValue(),::com::sun::star::uno::UNO_QUERY);
String sDBName = sSbaData.GetToken(0,cSbaSep); // Datenbankname
@@ -225,7 +225,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
String sTabFlag = sSbaData.GetToken(2,cSbaSep);
String sDBSql = sSbaData.GetToken(3,cSbaSep); // SQL im Klartext
- BYTE nType = ScDbTable; // "0" oder "1"
+ sal_uInt8 nType = ScDbTable; // "0" oder "1"
if ( sTabFlag.EqualsAscii("0") ) // "0" = Query, "1" = Table (Default)
nType = ScDbQuery;
@@ -243,17 +243,17 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
// bei Bedarf neuen Datenbankbereich anlegen
- BOOL bMakeArea = FALSE;
+ sal_Bool bMakeArea = false;
if (bIsNewArea)
{
ScDBCollection* pDBColl = aDocument.GetDBCollection();
- USHORT nDummy;
+ sal_uInt16 nDummy;
if ( !pDBColl || !pDBColl->SearchName( sTarget, nDummy ) )
{
ScAddress aPos;
if ( aPos.Parse( sTarget, &aDocument, aDocument.GetAddressConvention() ) & SCA_VALID )
{
- bMakeArea = TRUE;
+ bMakeArea = sal_True;
if (bUndo)
{
String aStrImport = ScGlobal::GetRscString( STR_UNDO_IMPORTDATA );
@@ -268,7 +268,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
// nachfragen, bevor alter DB-Bereich ueberschrieben wird
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if (!bIsNewArea)
{
String aTemplate = ScGlobal::GetRscString( STR_IMPORT_REPLACE );
@@ -283,7 +283,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (bDo)
{
ScDBDocFunc(*this).UpdateImport( sTarget, sDBName,
- sDBTable, sDBSql, TRUE, nType, xResultSet,
+ sDBTable, sDBSql, sal_True, nType, xResultSet,
pSelectionList );
rReq.Done();
@@ -312,13 +312,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScRange aSingleRange;
ScRangeListRef aRangeListRef;
- BOOL bMultiRange = FALSE;
+ sal_Bool bMultiRange = false;
- BOOL bColHeaders = TRUE;
- BOOL bRowHeaders = TRUE;
- BOOL bColInit = FALSE;
- BOOL bRowInit = FALSE;
- BOOL bAddRange = (nSlot == SID_CHART_ADDSOURCE);
+ sal_Bool bColHeaders = sal_True;
+ sal_Bool bRowHeaders = sal_True;
+ sal_Bool bColInit = false;
+ sal_Bool bRowInit = false;
+ sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
if( IS_AVAILABLE( SID_CHART_NAME, &pItem ) )
aChartName = ((const SfxStringItem*)pItem)->GetValue();
@@ -329,25 +329,25 @@ void ScDocShell::Execute( SfxRequest& rReq )
if( IS_AVAILABLE( FN_PARAM_1, &pItem ) )
{
bColHeaders = ((const SfxBoolItem*)pItem)->GetValue();
- bColInit = TRUE;
+ bColInit = sal_True;
}
if( IS_AVAILABLE( FN_PARAM_2, &pItem ) )
{
bRowHeaders = ((const SfxBoolItem*)pItem)->GetValue();
- bRowInit = TRUE;
+ bRowInit = sal_True;
}
ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0);
- BOOL bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0;
+ sal_Bool bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0;
if (!bValid)
{
aRangeListRef = new ScRangeList;
aRangeListRef->Parse( aRangeName, pDoc );
if ( !aRangeListRef->empty() )
{
- bMultiRange = TRUE;
+ bMultiRange = true;
aSingleRange = *aRangeListRef->front(); // fuer Header
- bValid = TRUE;
+ bValid = true;
}
else
aRangeListRef.Clear();
@@ -369,22 +369,14 @@ void ScDocShell::Execute( SfxRequest& rReq )
aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
// Dialog fuer Spalten/Zeilenkoepfe
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if ( !bAddRange && ( !bColInit || !bRowInit ) )
{
- // Spalten/Zeilenkoepfe testen wie in chartarr
+ ScChartPositioner aChartPositioner( &aDocument, nTab, nCol1,nRow1, nCol2,nRow2 );
if (!bColInit)
- {
- for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++)
- if (aDocument.HasValueData( i, nRow1, nTab ))
- bColHeaders = FALSE;
- }
+ bColHeaders = aChartPositioner.HasColHeaders();
if (!bRowInit)
- {
- for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++)
- if (aDocument.HasValueData( nCol1, i, nTab ))
- bRowHeaders = FALSE;
- }
+ bRowHeaders = aChartPositioner.HasRowHeaders();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -400,7 +392,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
rReq.AppendItem(SfxBoolItem(FN_PARAM_2, bRowHeaders));
}
else
- bOk = FALSE;
+ bOk = false;
delete pDlg;
}
@@ -445,9 +437,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
case FID_AUTO_CALC:
{
- BOOL bNewVal;
+ sal_Bool bNewVal;
const SfxPoolItem* pItem;
- if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
+ if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) )
bNewVal = ((const SfxBoolItem*)pItem)->GetValue();
else
bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue
@@ -475,7 +467,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScLkUpdMode nSet=pDoc->GetLinkMode();
- USHORT nDlgRet=RET_NO;
+ sal_uInt16 nDlgRet=RET_NO;
if(nSet==LM_UNKNOWN)
{
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
@@ -518,7 +510,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
// wird nach dem Laden aufgerufen, wenn DB-Bereiche mit
// weggelassenen Daten enthalten sind
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDBCollection* pDBColl = aDocument.GetDBCollection();
if ((nCanUpdate != com::sun::star::document::UpdateDocMode::NO_UPDATE) &&
@@ -533,7 +525,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) );
if (aBox.Execute() == RET_YES)
{
- for (USHORT i=0; i<pDBColl->GetCount(); i++)
+ for (sal_uInt16 i=0; i<pDBColl->GetCount(); i++)
{
ScDBData* pDBData = (*pDBColl)[i];
if ( pDBData->IsStripData() &&
@@ -547,7 +539,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
- BOOL bContinue = pViewSh->ImportData( aImportParam );
+ sal_Bool bContinue = pViewSh->ImportData( aImportParam );
pDBData->SetImportParam( aImportParam );
// markieren (Groesse kann sich geaendert haben)
@@ -568,7 +560,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
}
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -609,19 +601,19 @@ void ScDocShell::Execute( SfxRequest& rReq )
if(pDoc!=NULL)
{
// get argument (recorded macro)
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, sal_False );
- BOOL bDo = TRUE;
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, false );
+ sal_Bool bDo = sal_True;
// xmlsec05/06:
// getting real parent window when called from Security-Options TP
Window* pParent = NULL;
const SfxPoolItem* pParentItem;
- if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
// desired state
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- BOOL bActivateTracking = (pChangeTrack == 0); // toggle
+ sal_Bool bActivateTracking = (pChangeTrack == 0); // toggle
if ( pItem )
bActivateTracking = pItem->GetValue(); // from argument
@@ -651,7 +643,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
pDoc->StartChangeTracking();
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
pDoc->SetChangeViewSettings(aChangeViewSet);
}
@@ -661,7 +653,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
// Slots invalidieren
if (pBindings)
- pBindings->InvalidateAll(FALSE);
+ pBindings->InvalidateAll(false);
if ( !pItem )
rReq.AppendItem( SfxBoolItem( FID_CHG_RECORD, bActivateTracking ) );
rReq.Done();
@@ -676,7 +668,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
Window* pParent = NULL;
const SfxPoolItem* pParentItem;
- if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, false, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
if ( ExecuteChangeProtectionDialog( pParent ) )
{
@@ -691,7 +683,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_DOCUMENT_MERGE:
case SID_DOCUMENT_COMPARE:
{
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if ( pChangeTrack && !pImpl->bIgnoreLostRedliningWarning )
{
@@ -701,12 +693,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
WinBits(WB_YES_NO | WB_DEF_NO),
ScGlobal::GetRscString( STR_END_REDLINING ) );
if( aBox.Execute() == RET_YES )
- bDo = ExecuteChangeProtectionDialog( NULL, TRUE );
+ bDo = ExecuteChangeProtectionDialog( NULL, sal_True );
else
- bDo = FALSE;
+ bDo = false;
}
else // merge might reject some actions
- bDo = ExecuteChangeProtectionDialog( NULL, TRUE );
+ bDo = ExecuteChangeProtectionDialog( NULL, sal_True );
}
if ( !bDo )
{
@@ -717,25 +709,25 @@ void ScDocShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
SfxMedium* pMed = NULL;
if ( pReqArgs &&
- pReqArgs->GetItemState( SID_FILE_NAME, TRUE, &pItem ) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState( SID_FILE_NAME, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxStringItem) )
{
String aFileName = ((const SfxStringItem*)pItem)->GetValue();
String aFilterName;
- if ( pReqArgs->GetItemState( SID_FILTER_NAME, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pReqArgs->GetItemState( SID_FILTER_NAME, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxStringItem) )
{
aFilterName = ((const SfxStringItem*)pItem)->GetValue();
}
String aOptions;
- if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxStringItem) )
{
aOptions = ((const SfxStringItem*)pItem)->GetValue();
}
short nVersion = 0;
- if ( pReqArgs->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pReqArgs->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA(SfxInt16Item) )
{
nVersion = ((const SfxInt16Item*)pItem)->GetValue();
@@ -743,7 +735,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
// kein Filter angegeben -> Detection
if ( !aFilterName.Len() )
- ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, TRUE, FALSE );
+ ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, sal_True, false );
// filter name from dialog contains application prefix,
// GetFilter needs name without the prefix.
@@ -755,7 +747,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
if ( nVersion != 0 )
pSet->Put( SfxInt16Item( SID_VERSION, nVersion ) );
- pMed = new SfxMedium( aFileName, STREAM_STD_READ, FALSE, pFilter, pSet );
+ pMed = new SfxMedium( aFileName, STREAM_STD_READ, false, pFilter, pSet );
}
else
{
@@ -774,17 +766,18 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, pMed->GetName() );
+ // pOtherDocSh->DoClose() will be called explicitly later, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pOtherDocSh = new ScDocShell;
- SfxObjectShellRef aDocShTablesRef = pOtherDocSh;
+ SfxObjectShellLock aDocShTablesRef = pOtherDocSh;
pOtherDocSh->DoLoad( pMed );
- ULONG nErr = pOtherDocSh->GetErrorCode();
+ sal_uLong nErr = pOtherDocSh->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // auch Warnings
if ( !pOtherDocSh->GetError() ) // nur Errors
{
- BOOL bHadTrack = ( aDocument.GetChangeTrack() != NULL );
- ULONG nStart = 0;
+ sal_Bool bHadTrack = ( aDocument.GetChangeTrack() != NULL );
+ sal_uLong nStart = 0;
if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack )
{
nStart = pChangeTrack->GetActionMax() + 1;
@@ -802,7 +795,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if ( pViewFrm )
{
- pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), TRUE ); //@51669
+ pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), sal_True ); //@51669
}
if ( pBindings )
{
@@ -819,19 +812,19 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !pOldSet || !pOldSet->ShowChanges() )
{
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges(TRUE);
+ aChangeViewSet.SetShowChanges(sal_True);
aDocument.SetChangeViewSettings(aChangeViewSet);
}
}
else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack )
{
- ULONG nEnd = pChangeTrack->GetActionMax();
+ sal_uLong nEnd = pChangeTrack->GetActionMax();
if ( nEnd >= nStart )
{
// only show changes from merged document
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges( TRUE );
- aChangeViewSet.SetShowAccepted( TRUE );
+ aChangeViewSet.SetShowChanges( sal_True );
+ aChangeViewSet.SetShowAccepted( sal_True );
aChangeViewSet.SetHasActionRange( true );
aChangeViewSet.SetTheActionRange( nStart, nEnd );
aDocument.SetChangeViewSettings( aChangeViewSet );
@@ -851,7 +844,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (pReqArgs)
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
{
if ( pItem->ISA(SfxStringItem) )
{
@@ -879,7 +872,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_EDIT_SCENARIO:
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
{
if ( pItem->ISA(SfxStringItem) )
{
@@ -891,7 +884,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
aDocument.GetScenarioData( nTab, aComment, aColor, nFlags );
// Determine if the Sheet that the Scenario was created on
@@ -903,12 +896,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
nActualTab--;
}
while(aDocument.IsScenario(nActualTab));
- BOOL bSheetProtected = aDocument.IsTabProtected(nActualTab);
+ sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, TRUE,bSheetProtected);
+ AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, true,bSheetProtected);
DBG_ASSERT(pNewDlg, "Dialog create fail!");
pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags );
if ( pNewDlg->Execute() == RET_OK )
@@ -928,11 +921,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_ATTR_YEAR2000 :
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
{
if ( pItem->ISA(SfxUInt16Item) )
{
- UINT16 nY2k = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nY2k = ((SfxUInt16Item*)pItem)->GetValue();
// immer an den DocOptions setzen, damit das auch fuer SO50
// gespeichert wird (und alle Abfragen bisher auch darauf laufen).
// SetDocOptions propagiert das an den NumberFormatter
@@ -1075,7 +1068,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
xCloseable->close( sal_True );
- if ( !SwitchToShared( sal_False, sal_True ) )
+ if ( !SwitchToShared( false, sal_True ) )
{
// TODO/LATER: what should be done in case the switch has failed?
// for example in case the user has cancelled the saveAs operation
@@ -1159,15 +1152,15 @@ void UpdateAcceptChangesDialog()
//------------------------------------------------------------------
-BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected )
+sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if ( pChangeTrack )
{
- BOOL bProtected = pChangeTrack->IsProtected();
+ sal_Bool bProtected = pChangeTrack->IsProtected();
if ( bJustQueryIfProtected && !bProtected )
- return TRUE;
+ return sal_True;
String aTitle( ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) );
String aText( ScResId( SCSTR_PASSWORD ) );
@@ -1177,7 +1170,7 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer
_pParent ? _pParent : GetActiveDialogParent(), &aText );
pDlg->SetText( aTitle );
pDlg->SetMinLen( 1 );
- pDlg->SetHelpId( SID_CHG_PROTECT );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(SID_CHG_PROTECT)->GetCommand() );
pDlg->SetEditHelpId( HID_CHG_PROTECT );
if ( !bProtected )
pDlg->ShowExtras( SHOWEXTRAS_CONFIRM );
@@ -1192,7 +1185,7 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer
if ( SvPasswordHelper::CompareHashPassword(pChangeTrack->GetProtection(), aPassword) )
{
if ( bJustQueryIfProtected )
- bDone = TRUE;
+ bDone = sal_True;
else
pChangeTrack->SetProtection(
com::sun::star::uno::Sequence< sal_Int8 > (0) );
@@ -1213,21 +1206,21 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer
if ( bProtected != pChangeTrack->IsProtected() )
{
UpdateAcceptChangesDialog();
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
else if ( bJustQueryIfProtected )
- bDone = TRUE;
+ bDone = sal_True;
return bDone;
}
//------------------------------------------------------------------
-void ScDocShell::DoRecalc( BOOL bApi )
+void ScDocShell::DoRecalc( sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScTabViewShell* pSh = GetBestViewShell();
if ( pSh )
{
@@ -1235,7 +1228,7 @@ void ScDocShell::DoRecalc( BOOL bApi )
if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi )
{
pHdl->FormulaPreview(); // Teilergebnis als QuickHelp
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -1248,7 +1241,7 @@ void ScDocShell::DoRecalc( BOOL bApi )
WaitObject aWaitObj( GetActiveDialogParent() );
aDocument.CalcFormulaTree();
if ( pSh )
- pSh->UpdateCharts(TRUE);
+ pSh->UpdateCharts(sal_True);
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
@@ -1264,7 +1257,7 @@ void ScDocShell::DoRecalc( BOOL bApi )
}
}
-void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
+void ScDocShell::DoHardRecalc( sal_Bool /* bApi */ )
{
WaitObject aWaitObj( GetActiveDialogParent() );
ScTabViewShell* pSh = GetBestViewShell();
@@ -1276,7 +1269,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
aDocument.CalcAll();
GetDocFunc().DetectiveRefresh(); // erzeugt eigenes Undo
if ( pSh )
- pSh->UpdateCharts(TRUE);
+ pSh->UpdateCharts(sal_True);
// set notification flags for "calculate" event (used in SFX_HINT_DATACHANGED broadcast)
// (might check for the presence of any formulas on each sheet)
@@ -1295,7 +1288,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
// (somewhat consistent with charts)
for (nTab=0; nTab<nTabCount; nTab++)
if (aDocument.IsStreamValid(nTab))
- aDocument.SetStreamValid(nTab, FALSE);
+ aDocument.SetStreamValid(nTab, false);
PostPaintGridAll();
}
@@ -1329,7 +1322,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const String& rStyle )
void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
- USHORT nId = rHint.GetHint();
+ sal_uInt16 nId = rHint.GetHint();
const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet();
if (!pStyle)
return;
@@ -1342,7 +1335,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
String aNewName = pStyle->GetName();
String aOldName = aNewName;
- BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
+ sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
@@ -1380,7 +1373,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
String aNewName = pStyle->GetName();
String aOldName = aNewName;
- BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended);
+ sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended);
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
if ( aNewName != aOldName )
@@ -1398,9 +1391,9 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
// wie in printfun.cxx
#define ZOOM_MIN 10
-void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
+void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages )
{
- BOOL bUndo(aDocument.IsUndoEnabled());
+ sal_Bool bUndo(aDocument.IsUndoEnabled());
String aStyleName = aDocument.GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
@@ -1412,8 +1405,8 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
SfxItemSet& rSet = pStyleSheet->GetItemSet();
if (bUndo)
{
- USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
- USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
+ sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
+ sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
GetUndoManager()->AddUndoAction( new ScUndoPrintZoom(
this, nTab, nOldScale, nOldPages, nScale, nPages ) );
}
@@ -1431,9 +1424,9 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
}
}
-BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
+sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange )
{
- BOOL bChange = FALSE;
+ sal_Bool bChange = false;
SCTAB nTab = rRange.aStart.Tab();
String aStyleName = aDocument.GetPageStyle( nTab );
@@ -1443,15 +1436,15 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
if ( pStyleSheet )
{
SfxItemSet& rSet = pStyleSheet->GetItemSet();
- BOOL bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue();
- USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
- USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
+ sal_Bool bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue();
+ sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue();
+ sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
const ScRange* pRepeatCol = aDocument.GetRepeatColRange( nTab );
const ScRange* pRepeatRow = aDocument.GetRepeatRowRange( nTab );
// benoetigte Skalierung fuer Selektion ausrechnen
- USHORT nNewScale = nOldScale;
+ sal_uInt16 nNewScale = nOldScale;
long nBlkTwipsX = 0;
if (bHeaders)
@@ -1501,7 +1494,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
if ( nNeeded < ZOOM_MIN )
nNeeded = ZOOM_MIN; // Begrenzung
if ( nNeeded < (long) nNewScale )
- nNewScale = (USHORT) nNeeded;
+ nNewScale = (sal_uInt16) nNeeded;
bChange = ( nNewScale != nOldScale || nOldPages != 0 );
if ( bChange )
@@ -1510,11 +1503,11 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
return bChange;
}
-void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi )
+void ScDocShell::PageStyleModified( const String& rStyleName, sal_Bool bApi )
{
ScDocShellModificator aModificator( *this );
- BOOL bWarn = FALSE;
+ sal_Bool bWarn = false;
SCTAB nTabCount = aDocument.GetTableCount();
SCTAB nUseTab = MAXTAB+1;
@@ -1528,7 +1521,7 @@ void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi )
{
ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen
if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs
- bWarn = TRUE;
+ bWarn = sal_True;
if (bWarn && !bApi)
{
@@ -1566,7 +1559,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
}
else if ( pReqArgs == NULL )
{
- BOOL bUndo(aDocument.IsUndoEnabled());
+ sal_Bool bUndo(aDocument.IsUndoEnabled());
String aOldName = aDocument.GetPageStyle( nCurTab );
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet
@@ -1622,7 +1615,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
aOldData, aNewData ) );
}
- PageStyleModified( aNewName, FALSE );
+ PageStyleModified( aNewName, false );
rReq.Done();
}
delete pDlg;
@@ -1658,9 +1651,9 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
SvxPageUsage( ((const SvxPageItem&)
rStyleSet.Get( ATTR_PAGE )).
GetPageUsage() );
- BOOL bShareHeader = IS_SHARE_HEADER(rStyleSet);
- BOOL bShareFooter = IS_SHARE_FOOTER(rStyleSet);
- USHORT nResId = 0;
+ sal_Bool bShareHeader = IS_SHARE_HEADER(rStyleSet);
+ sal_Bool bShareFooter = IS_SHARE_FOOTER(rStyleSet);
+ sal_uInt16 nResId = 0;
switch ( eUsage )
{
@@ -1772,7 +1765,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
SCTAB nCurTab )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -1817,7 +1810,7 @@ void lcl_GetPrintData( ScDocShell* pDocShell /*in*/,
// get settings from print options sub-dialog
const SfxItemSet& rOptionSet = pPrinter->GetOptions();
const SfxPoolItem* pItem;
- rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET );
+ rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, false, &pItem ) == SFX_ITEM_SET );
if ( rbHasOptions )
{
rOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
@@ -1955,7 +1948,7 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
aPageArr, aPageRanges, &pMarkedRange );
- BOOL bFound = FALSE; // erste Seite gefunden
+ sal_Bool bFound = false; // erste Seite gefunden
long nTabStart = 0;
SCTAB nTabCount = aDocument.GetTableCount();
for ( SCTAB nTab=0; nTab<nTabCount && !bFound; nTab++ )
@@ -1963,17 +1956,17 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( nTab ) )
{
long nNext = nTabStart + aPageArr[nTab];
- BOOL bSelected = FALSE;
+ sal_Bool bSelected = false;
for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert
if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert?
- bSelected = TRUE;
+ bSelected = true;
if (bSelected)
{
ScPrintFunc aPrintFunc( this, pPrinter, nTab );
aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle
- bFound = TRUE;
+ bFound = true;
}
nTabStart = nNext;
}
@@ -1982,9 +1975,9 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
delete pMarkedRange;
}
-BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
+sal_Bool lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if (pDrawLayer)
{
@@ -2007,10 +2000,10 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
{
Rectangle aObjRect = pObject->GetLogicRect();
if ( aObjRect.IsOver( aMMRect ) )
- bFound = TRUE;
+ bFound = true;
}
else
- bFound = TRUE;
+ bFound = true;
}
pObject = aIter.Next();
@@ -2022,7 +2015,7 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
}
void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
- ScMarkData* pMarkData, Window* pDialogParent, BOOL bForceSelected, BOOL bIsAPI )
+ ScMarkData* pMarkData, Window* pDialogParent, sal_Bool bForceSelected, sal_Bool bIsAPI )
{
SfxPrinter* pPrinter = GetPrinter();
if ( !pPrinter )
@@ -2042,14 +2035,14 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
aPageArr, aPageRanges, &pMarkedRange );
- USHORT nCollateCopies = 1;
+ sal_uInt16 nCollateCopies = 1;
if ( pPrintDialog && pPrintDialog->IsCollateEnabled() && pPrintDialog->IsCollateChecked() )
nCollateCopies = pPrintDialog->GetCopyCount();
// test if printed range contains transparent objects
- BOOL bHasTransp = FALSE;
- BOOL bAnyPrintRanges = aDocument.HasPrintRange();
+ sal_Bool bHasTransp = false;
+ sal_Bool bAnyPrintRanges = aDocument.HasPrintRange();
ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
SCTAB nTabCount = aDocument.GetTableCount();
for ( SCTAB nTab=0; nTab<nTabCount && !bHasTransp; nTab++ )
@@ -2069,8 +2062,8 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, pMarkedRange );
else if ( aDocument.GetPrintRangeCount(nTab) )
{
- USHORT nRangeCount = aDocument.GetPrintRangeCount(nTab);
- for (USHORT i=0; i<nRangeCount; i++)
+ sal_uInt16 nRangeCount = aDocument.GetPrintRangeCount(nTab);
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
bHasTransp = bHasTransp ||
lcl_HasTransparent( &aDocument, nTab, aDocument.GetPrintRange( nTab, i ) );
}
@@ -2081,11 +2074,11 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
}
}
- BOOL bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp );
+ sal_Bool bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp );
if ( bContinue )
{
- for ( USHORT n=0; n<nCollateCopies; n++ )
+ for ( sal_uInt16 n=0; n<nCollateCopies; n++ )
{
long nTabStart = 0;
long nDisplayStart = 0;
@@ -2105,12 +2098,12 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
{
pDrawView = new FmFormView( pModel, pPrinter );
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetPrintPreview( true );
}
ScPrintFunc aPrintFunc( this, pPrinter, nTab, nAttrPage, nTotalPages, pMarkedRange, &aOptions );
aPrintFunc.SetDrawView( pDrawView );
- aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, TRUE, &rProgress, NULL );
+ aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, true, &rProgress, NULL );
nTabStart += aPageArr[nTab];
if ( aDocument.NeedPageResetAfterTab(nTab) )
@@ -2159,13 +2152,13 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
void ScDocShell::GetState( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
{
case FID_AUTO_CALC:
- if ( (BOOL) aDocument.GetHardRecalcState() )
+ if ( (sal_Bool) aDocument.GetHardRecalcState() )
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem( nWhich, aDocument.GetAutoCalc() ) );
@@ -2249,14 +2242,14 @@ void ScDocShell::GetSbxState( SfxItemSet &rSet )
pVisibleSh->GetState( rSet );
}
-void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect )
+void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uInt16 nAspect )
{
SCTAB nVisTab = aDocument.GetVisibleTab();
if (!aDocument.HasTable(nVisTab))
return;
- ULONG nOldLayoutMode = pDev->GetLayoutMode();
+ sal_uLong nOldLayoutMode = pDev->GetLayoutMode();
pDev->SetLayoutMode( TEXT_LAYOUT_DEFAULT ); // even if it's the same, to get the metafile action
if ( nAspect == ASPECT_THUMBNAIL )
@@ -2266,7 +2259,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT
aTmpData.SetTabNo(nVisTab);
aDocument.SnapVisArea( aBoundRect );
aTmpData.SetScreen( aBoundRect );
- ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE );
+ ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True );
}
else
{
@@ -2275,13 +2268,13 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT
aTmpData.SetTabNo(nVisTab);
aDocument.SnapVisArea( aBoundRect );
aTmpData.SetScreen( aBoundRect );
- ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE );
+ ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True );
}
pDev->SetLayoutMode( nOldLayoutMode );
}
-Rectangle ScDocShell::GetVisArea( USHORT nAspect ) const
+Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
SfxObjectCreateMode eShellMode = GetCreateMode();
if ( eShellMode == SFX_CREATE_MODE_ORGANIZER )
@@ -2294,7 +2287,7 @@ Rectangle ScDocShell::GetVisArea( USHORT nAspect ) const
if( nAspect == ASPECT_THUMBNAIL )
{
Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X,SC_PREVIEW_SIZE_Y );
- BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
+ sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
if ( bNegativePage )
ScDrawLayer::MirrorRectRTL( aArea );
aDocument.SnapVisArea( aArea );
@@ -2332,8 +2325,8 @@ Rectangle ScDocShell::GetVisArea( USHORT nAspect ) const
void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
SCTAB nCurTab,
- BOOL& rbHeader,
- BOOL& rbFooter )
+ sal_Bool& rbHeader,
+ sal_Bool& rbFooter )
{
if ( !pStyleSet )
{
@@ -2347,7 +2340,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
if ( pStyleSheet )
pStyleSet = &pStyleSheet->GetItemSet();
else
- rbHeader = rbFooter = FALSE;
+ rbHeader = rbFooter = false;
}
DBG_ASSERT( pStyleSet, "PageStyle-Set not found! :-(" );
@@ -2385,7 +2378,7 @@ long ScDocShell::DdeGetData( const String& rItem,
return 0; // ungueltiger Bereich
if( aDdeTextFmt.GetChar(0) == 'F' )
- aObj.SetFormulas( TRUE );
+ aObj.SetFormulas( sal_True );
if( aDdeTextFmt.EqualsAscii( "SYLK" ) ||
aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{
@@ -2432,7 +2425,7 @@ long ScDocShell::DdeSetData( const String& rItem,
}
ScImportExport aObj( &aDocument, rItem );
if( aDdeTextFmt.GetChar(0) == 'F' )
- aObj.SetFormulas( TRUE );
+ aObj.SetFormulas( sal_True );
if( aDdeTextFmt.EqualsAscii( "SYLK" ) ||
aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{
@@ -2510,7 +2503,7 @@ SCTAB ScDocShell::GetCurTab()
return pViewData ? pViewData->GetTabNo() : static_cast<SCTAB>(0);
}
-ScTabViewShell* ScDocShell::GetBestViewShell( BOOL bOnlyVisible )
+ScTabViewShell* ScDocShell::GetBestViewShell( sal_Bool bOnlyVisible )
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
// falsches Doc?
@@ -2542,11 +2535,11 @@ SfxBindings* ScDocShell::GetViewBindings()
//------------------------------------------------------------------
-ScDocShell* ScDocShell::GetShellByNum( USHORT nDocNo ) // static
+ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static
{
ScDocShell* pFound = NULL;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
- USHORT nShellCnt = 0;
+ sal_uInt16 nShellCnt = 0;
while ( pShell && !pFound )
{
@@ -2572,7 +2565,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
if ( ERRCODE_NONE == _pFileDlg->GetError() )
{
- USHORT nSlot = pImpl->pRequest->GetSlot();
+ sal_uInt16 nSlot = pImpl->pRequest->GetSlot();
SfxMedium* pMed = pImpl->pDocInserter->CreateMedium();
// #i87094# If a .odt was selected pMed is NULL.
if (pMed)
@@ -2590,7 +2583,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
const SfxPoolItem* pItem = NULL;
SfxItemSet* pSet = pMed->GetItemSet();
if ( pSet &&
- pSet->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET &&
+ pSet->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxInt16Item ) )
{
pImpl->pRequest->AppendItem( *pItem );
@@ -2616,7 +2609,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable )
aDocument.StartChangeTracking();
// hide accept or reject changes dialog
- USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
if ( pViewFrame && pViewFrame->HasChildWindow( nId ) )
{
@@ -2634,7 +2627,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable )
}
ScChangeViewSettings aChangeViewSet;
- aChangeViewSet.SetShowChanges( FALSE );
+ aChangeViewSet.SetShowChanges( false );
aDocument.SetChangeViewSettings( aChangeViewSet );
}
@@ -2655,7 +2648,7 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument()
if ( GetMedium() )
{
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false);
if ( pPasswordItem && pPasswordItem->GetValue().Len() )
{
aArgs.realloc( 2 );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 4d09ec0c9438..4fafac178e2f 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -90,13 +90,13 @@ using ::std::vector;
// former viewfunc/dbfunc methods
//
-void ScDocShell::ErrorMessage( USHORT nGlobStrId )
+void ScDocShell::ErrorMessage( sal_uInt16 nGlobStrId )
{
//! StopMarking an der (aktiven) View?
Window* pParent = GetActiveDialogParent();
ScWaitCursorOff aWaitOff( pParent );
- BOOL bFocus = pParent && pParent->HasFocus();
+ sal_Bool bFocus = pParent && pParent->HasFocus();
if(nGlobStrId==STR_PROTECTIONERR)
{
@@ -112,7 +112,7 @@ void ScDocShell::ErrorMessage( USHORT nGlobStrId )
pParent->GrabFocus();
}
-BOOL ScDocShell::IsEditable() const
+sal_Bool ScDocShell::IsEditable() const
{
// import into read-only document is possible - must be extended if other filters use api
// #i108547# MSOOXML filter uses "IsChangeReadOnlyEnabled" property
@@ -139,12 +139,12 @@ ScDBData* lcl_GetDBNearCursor( ScDBCollection* pColl, SCCOL nCol, SCROW nRow, SC
ScDBData* pNoNameData = NULL;
ScDBData* pNearData = NULL;
- USHORT nCount = pColl->GetCount();
+ sal_uInt16 nCount = pColl->GetCount();
String aNoName = ScGlobal::GetRscString( STR_DB_NONAME );
SCTAB nAreaTab;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ScDBData* pDB = (*pColl)[i];
pDB->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow );
@@ -188,11 +188,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
if (!pData)
pData = lcl_GetDBNearCursor( aDocument.GetDBCollection(), nCol, nRow, nTab );
- BOOL bSelected = ( eSel == SC_DBSEL_FORCE_MARK ||
+ sal_Bool bSelected = ( eSel == SC_DBSEL_FORCE_MARK ||
(rMarked.aStart != rMarked.aEnd && eSel != SC_DBSEL_ROW_DOWN) );
bool bOnlyDown = (!bSelected && eSel == SC_DBSEL_ROW_DOWN && rMarked.aStart.Row() == rMarked.aEnd.Row());
- BOOL bUseThis = FALSE;
+ sal_Bool bUseThis = false;
if (pData)
{
// Bereich nehmen, wenn nichts anderes markiert
@@ -203,11 +203,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCCOL nOldCol2;
SCROW nOldRow2;
pData->GetArea( nDummy, nOldCol1,nOldRow1, nOldCol2,nOldRow2 );
- BOOL bIsNoName = ( pData->GetName() == ScGlobal::GetRscString( STR_DB_NONAME ) );
+ sal_Bool bIsNoName = ( pData->GetName() == ScGlobal::GetRscString( STR_DB_NONAME ) );
if (!bSelected)
{
- bUseThis = TRUE;
+ bUseThis = sal_True;
if ( bIsNoName && eMode == SC_DB_MAKE )
{
// If nothing marked or only one row marked, adapt
@@ -224,9 +224,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nEndCol = nStartCol;
nEndRow = nStartRow;
}
- aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
+ aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown );
if ( nOldCol1 != nStartCol || nOldCol2 != nEndCol || nOldRow1 != nStartRow )
- bUseThis = FALSE; // passt gar nicht
+ bUseThis = false; // passt gar nicht
else if ( nOldRow2 != nEndRow )
{
// Bereich auf neue End-Zeile erweitern
@@ -238,15 +238,15 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
{
if ( nOldCol1 == nStartCol && nOldRow1 == nStartRow &&
nOldCol2 == nEndCol && nOldRow2 == nEndRow ) // genau markiert?
- bUseThis = TRUE;
+ bUseThis = sal_True;
else
- bUseThis = FALSE; // immer Markierung nehmen (Bug 11964)
+ bUseThis = false; // immer Markierung nehmen (Bug 11964)
}
// fuer Import nie "unbenannt" nehmen
if ( bUseThis && eMode == SC_DB_IMPORT && bIsNoName )
- bUseThis = FALSE;
+ bUseThis = false;
}
if ( bUseThis )
@@ -277,13 +277,13 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nEndCol = nStartCol;
nEndRow = nStartRow;
}
- aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
+ aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown );
}
- BOOL bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
+ sal_Bool bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
ScDBData* pNoNameData;
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDBCollection* pColl = aDocument.GetDBCollection();
if ( eMode != SC_DB_IMPORT &&
pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -310,9 +310,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
pNoNameData->SetSubTotalParam( ScSubTotalParam() );
pNoNameData->SetArea( nTab, nStartCol,nStartRow, nEndCol,nEndRow ); // neu setzen
- pNoNameData->SetByRow( TRUE );
+ pNoNameData->SetByRow( sal_True );
pNoNameData->SetHeader( bHasHeader );
- pNoNameData->SetAutoFilter( FALSE );
+ pNoNameData->SetAutoFilter( false );
}
else
{
@@ -321,12 +321,12 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
String aNewName;
if (eMode==SC_DB_IMPORT)
{
- aDocument.CompileDBFormula( TRUE ); // CreateFormulaString
+ aDocument.CompileDBFormula( sal_True ); // CreateFormulaString
pUndoColl = new ScDBCollection( *pColl ); // Undo fuer Import1-Bereich
String aImport = ScGlobal::GetRscString( STR_DBNAME_IMPORT );
long nCount = 0;
- USHORT nDummy;
+ sal_uInt16 nDummy;
do
{
++nCount;
@@ -339,12 +339,12 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
aNewName = ScGlobal::GetRscString( STR_DB_NONAME );
pNoNameData = new ScDBData( aNewName, nTab,
nStartCol,nStartRow, nEndCol,nEndRow,
- TRUE, bHasHeader );
+ sal_True, bHasHeader );
pColl->Insert( pNoNameData );
if ( pUndoColl )
{
- aDocument.CompileDBFormula( FALSE ); // CompileFormulaString
+ aDocument.CompileDBFormula( false ); // CompileFormulaString
ScDBCollection* pRedoColl = new ScDBCollection( *pColl );
GetUndoManager()->AddUndoAction( new ScUndoDBData( this, pUndoColl, pRedoColl ) );
@@ -374,7 +374,7 @@ void ScDocShell::CancelAutoDBRange()
// called when dialog is cancelled
if ( pOldAutoDBRange )
{
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDBCollection* pColl = aDocument.GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
{
@@ -408,12 +408,12 @@ void ScDocShell::CancelAutoDBRange()
// Hoehen anpassen
//! mit docfunc zusammenfassen
-BOOL ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
+sal_Bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
{
ScSizeDeviceProvider aProv(this);
Fraction aZoom(1,1);
- BOOL bChange = aDocument.SetOptimalHeight( nStartRow,nEndRow, nTab, 0, aProv.GetDevice(),
- aProv.GetPPTX(),aProv.GetPPTY(), aZoom,aZoom, FALSE );
+ sal_Bool bChange = aDocument.SetOptimalHeight( nStartRow,nEndRow, nTab, 0, aProv.GetDevice(),
+ aProv.GetPPTX(),aProv.GetPPTY(), aZoom,aZoom, false );
if (bChange)
PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID|PAINT_LEFT );
@@ -431,8 +431,8 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark )
void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
{
- BOOL bIsUndoEnabled = aDocument.IsUndoEnabled();
- aDocument.EnableUndo( FALSE );
+ sal_Bool bIsUndoEnabled = aDocument.IsUndoEnabled();
+ aDocument.EnableUndo( false );
aDocument.LockStreamValid( true ); // ignore draw page size (but not formula results)
if ( bBefore ) // check all sheets up to nUpdateTab
{
@@ -444,7 +444,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
SCTAB nTab;
for (nTab=0; nTab<=nUpdateTab; ++nTab)
if ( aDocument.IsPendingRowHeights( nTab ) )
- aUpdateSheets.SelectTable( nTab, TRUE );
+ aUpdateSheets.SelectTable( nTab, sal_True );
if (aUpdateSheets.GetSelectCount())
UpdateAllRowHeights(&aUpdateSheets); // update with a single progress bar
@@ -453,7 +453,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
if ( aUpdateSheets.GetTableSelect( nTab ) )
{
aDocument.UpdatePageBreaks( nTab );
- aDocument.SetPendingRowHeights( nTab, FALSE );
+ aDocument.SetPendingRowHeights( nTab, false );
}
}
else // only nUpdateTab
@@ -462,7 +462,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
{
AdjustRowHeight( 0, MAXROW, nUpdateTab );
aDocument.UpdatePageBreaks( nUpdateTab );
- aDocument.SetPendingRowHeights( nUpdateTab, FALSE );
+ aDocument.SetPendingRowHeights( nUpdateTab, false );
}
}
aDocument.LockStreamValid( false );
@@ -479,8 +479,8 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
// DataPilotUpdate doesn't modify the collection order like PivotUpdate did,
// so a simple loop can be used.
- USHORT nCount = pColl->GetCount();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pColl->GetCount();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDPObject* pOld = (*pColl)[i];
if ( pOld )
@@ -490,7 +490,7 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
{
ScDPObject* pNew = new ScDPObject( *pOld );
ScDBDocFunc aFunc( *this );
- aFunc.DataPilotUpdate( pOld, pNew, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pOld, pNew, sal_True, false );
delete pNew; // DataPilotUpdate copies settings from "new" object
}
}
@@ -501,14 +501,14 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
{
String aName;
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart,
pArea->nColEnd, pArea->nRowEnd );
if (pData)
{
pData->GetName( aName );
if ( aName != ScGlobal::GetRscString( STR_DB_NONAME ) )
- bOk = TRUE;
+ bOk = sal_True;
}
if (!bOk)
@@ -517,14 +517,14 @@ String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
return aName;
}
-void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
+void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bRecord )
{
ScConsData aData;
- USHORT nPos;
+ sal_uInt16 nPos;
SCCOL nColSize = 0;
SCROW nRowSize = 0;
- BOOL bErr = FALSE;
+ sal_Bool bErr = false;
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
ScArea* pArea = rParam.ppDataAreas[nPos];
@@ -534,7 +534,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
// Test, ob Quelldaten verschoben wuerden
if (rParam.bReferenceData)
if (pArea->nTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow)
- bErr = TRUE;
+ bErr = sal_True;
}
if (bErr)
@@ -551,7 +551,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
ScDocShellModificator aModificator( *this );
ScRange aOldDest;
- ScDBData* pDestData = aDocument.GetDBAtCursor( rParam.nCol, rParam.nRow, rParam.nTab, TRUE );
+ ScDBData* pDestData = aDocument.GetDBAtCursor( rParam.nCol, rParam.nRow, rParam.nTab, sal_True );
if (pDestData)
pDestData->GetArea(aOldDest);
@@ -594,28 +594,28 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
ScOutlineTable* pUndoTab = pTable ? new ScOutlineTable( *pTable ) : NULL;
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, FALSE, TRUE );
+ pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, false, sal_True );
// Zeilenstatus
aDocument.CopyToDocument( 0,0,nDestTab, MAXCOL,MAXROW,nDestTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
// alle Formeln
aDocument.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// komplette Ausgangszeilen
aDocument.CopyToDocument( 0,aDestArea.nRowStart,nDestTab,
MAXCOL,aDestArea.nRowEnd,nDestTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- TRUE, nInsertCount, pUndoTab, pUndoData ) );
+ sal_True, nInsertCount, pUndoTab, pUndoData ) );
}
else
{
@@ -624,15 +624,15 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
aDocument.CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, aDestArea.nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, aDestArea.nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- FALSE, 0, NULL, pUndoData ) );
+ false, 0, NULL, pUndoData ) );
}
}
@@ -650,7 +650,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
SCROW nPaintStartRow = rParam.nRow;
SCCOL nPaintEndCol = nPaintStartCol + nColSize - 1;
SCROW nPaintEndRow = nPaintStartRow + nRowSize - 1;
- USHORT nPaintFlags = PAINT_GRID;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
if (rParam.bByCol)
++nPaintEndRow;
if (rParam.bByRow)
@@ -674,7 +674,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
aModificator.SetDocumentModified();
}
-void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
+void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord )
{
if (!aDocument.IsScenario(nTab))
{
@@ -712,22 +712,22 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
pUndoDoc->InitUndo( &aDocument, nTab,nEndTab ); // auch alle Szenarien
// angezeigte Tabelle:
aDocument.CopyToDocument( nStartCol,nStartRow,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL,TRUE, pUndoDoc, &aScenMark );
+ nEndCol,nEndRow,nTab, IDF_ALL,sal_True, pUndoDoc, &aScenMark );
// Szenarien
for (SCTAB i=nTab+1; i<=nEndTab; i++)
{
- pUndoDoc->SetScenario( i, TRUE );
+ pUndoDoc->SetScenario( i, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
aDocument.GetScenarioData( i, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
- BOOL bActive = aDocument.IsActiveScenario( i );
+ sal_Bool bActive = aDocument.IsActiveScenario( i );
pUndoDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
aDocument.CopyToDocument( 0,0,i, MAXCOL,MAXROW,i,
- IDF_ALL,FALSE, pUndoDoc );
+ IDF_ALL,false, pUndoDoc );
}
GetUndoManager()->AddUndoAction(
@@ -766,14 +766,14 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
}
void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
// Undo
String aOldName;
aDocument.GetName( nTab, aOldName );
String aOldComment;
Color aOldColor;
- USHORT nOldFlags;
+ sal_uInt16 nOldFlags;
aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
GetUndoManager()->AddUndoAction(
new ScUndoScenarioFlags( this, nTab,
@@ -796,8 +796,8 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
}
SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags,
- ScMarkData& rMark, BOOL bRecord )
+ const Color& rColor, sal_uInt16 nFlags,
+ ScMarkData& rMark, sal_Bool bRecord )
{
rMark.MarkToMulti();
if (rMark.IsMultiMarked())
@@ -806,7 +806,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
while (aDocument.IsScenario(nNewTab))
++nNewTab;
- BOOL bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
+ sal_Bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
const ScMarkData* pCopyMark = NULL;
if (!bCopyAll)
pCopyMark = &rMark;
@@ -825,8 +825,8 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
rName, rComment, rColor, nFlags, rMark ));
}
- aDocument.RenameTab( nNewTab, rName, FALSE ); // ohne Formel-Update
- aDocument.SetScenario( nNewTab, TRUE );
+ aDocument.RenameTab( nNewTab, rName, false ); // ohne Formel-Update
+ aDocument.SetScenario( nNewTab, sal_True );
aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags );
ScMarkData aDestMark = rMark;
@@ -835,19 +835,19 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
//! auf Filter / Buttons / Merging testen !
ScPatternAttr aProtPattern( aDocument.GetPool() );
- aProtPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aProtPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
aDocument.ApplyPatternAreaTab( 0,0, MAXCOL,MAXROW, nNewTab, aProtPattern );
ScPatternAttr aPattern( aDocument.GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
aDocument.ApplySelectionPattern( aPattern, aDestMark );
if (!bCopyAll)
- aDocument.SetVisible( nNewTab, FALSE );
+ aDocument.SetVisible( nNewTab, false );
// dies ist dann das aktive Szenario
- aDocument.CopyScenario( nNewTab, nTab, TRUE ); // TRUE - nicht aus Szenario kopieren
+ aDocument.CopyScenario( nNewTab, nTab, sal_True ); // sal_True - nicht aus Szenario kopieren
if (nFlags & SC_SCENARIO_SHOWFRAME)
PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); // Rahmen painten
@@ -862,13 +862,13 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
return nTab;
}
-ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bNotifyAndPaint )
+sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bNotifyAndPaint )
{
ScDocument* pSrcDoc = rSrcDocShell.GetDocument();
- ULONG nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
+ sal_uLong nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
bInsertNew ); // no insert
// TransferTab doesn't copy drawing objects with bInsertNew=FALSE
@@ -879,15 +879,15 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pSrcDoc->GetScenarioData( nSrcPos, aComment,aColor, nFlags);
- aDocument.SetScenario(nDestPos,TRUE);
+ aDocument.SetScenario(nDestPos,true);
aDocument.SetScenarioData(nDestPos,aComment,aColor,nFlags);
- BOOL bActive = pSrcDoc->IsActiveScenario(nSrcPos);
+ sal_Bool bActive = pSrcDoc->IsActiveScenario(nSrcPos);
aDocument.SetActiveScenario(nDestPos, bActive );
- BOOL bVisible=pSrcDoc->IsVisible(nSrcPos);
+ sal_Bool bVisible=pSrcDoc->IsVisible(nSrcPos);
aDocument.SetVisible(nDestPos,bVisible );
}
@@ -903,7 +903,7 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
return nErrVal;
}
-BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord )
+sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, sal_Bool bRecord )
{
ScDocShellModificator aModificator( *this );
@@ -922,7 +922,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if (!aDocument.CopyTab( nSrcTab, nDestTab ))
{
//! EndDrawUndo?
- return FALSE;
+ return false;
}
else
{
@@ -941,7 +941,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
new ScUndoCopyTab(this, pSrcList.release(), pDestList.release()));
}
- BOOL bVbaEnabled = aDocument.IsInVBAMode();
+ sal_Bool bVbaEnabled = aDocument.IsInVBAMode();
if ( bVbaEnabled )
{
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
@@ -978,7 +978,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
else
{
if ( aDocument.GetChangeTrack() )
- return FALSE;
+ return false;
if ( nSrcTab<nDestTab && nDestTab!=SC_TAB_APPEND )
nDestTab--;
@@ -986,11 +986,11 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if ( nSrcTab == nDestTab )
{
//! allow only for api calls?
- return TRUE; // nothing to do, but valid
+ return sal_True; // nothing to do, but valid
}
if (!aDocument.MoveTab( nSrcTab, nDestTab ))
- return FALSE;
+ return false;
else if (bRecord)
{
auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
@@ -1007,7 +1007,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
@@ -1015,7 +1015,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
{
ScDBDocFunc aFunc(*this);
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScDBData* pDBData = static_cast<ScDBData*>(pRefreshTimer);
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
@@ -1024,11 +1024,11 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
ScRange aRange;
pDBData->GetArea( aRange );
Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
- bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, true, false ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)
{
- aFunc.RepeatDB( pDBData->GetName(), TRUE, TRUE );
+ aFunc.RepeatDB( pDBData->GetName(), sal_True, sal_True );
RefreshPivotTables(aRange);
}
}
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 88ea2135f9f6..07bc6e4c5d35 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -103,7 +103,7 @@ void ScDocShell::SetVisArea( const Rectangle & rVisArea )
{
// with the SnapVisArea call in SetVisAreaOrSize, it's safe to always
// use both the size and position of the VisArea
- SetVisAreaOrSize( rVisArea, TRUE );
+ SetVisAreaOrSize( rVisArea, sal_True );
}
void lcl_SetTopRight( Rectangle& rRect, const Point& rPos )
@@ -115,9 +115,9 @@ void lcl_SetTopRight( Rectangle& rRect, const Point& rPos )
rRect.Bottom() = rPos.Y() + aSize.Height() - 1;
}
-void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart )
+void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifyStart )
{
- BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
+ sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
Rectangle aArea = rVisArea;
if (bModifyStart)
@@ -200,12 +200,12 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart
}
}
-BOOL ScDocShell::IsOle()
+sal_Bool ScDocShell::IsOle()
{
return (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
}
-void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
+void ScDocShell::UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize )
{
// wenn's gar nicht Ole ist, kann man sich die Berechnungen sparen
// (VisArea wird dann beim Save wieder zurueckgesetzt)
@@ -218,7 +218,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
Rectangle aOldArea = SfxObjectShell::GetVisArea();
Rectangle aNewArea = aOldArea;
- BOOL bEmbedded = aDocument.IsEmbedded();
+ sal_Bool bEmbedded = aDocument.IsEmbedded();
if (bEmbedded)
aNewArea = aDocument.GetEmbeddedRect();
else
@@ -227,7 +227,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
if ( nTab != aDocument.GetVisibleTab() )
aDocument.SetVisibleTab( nTab );
- BOOL bNegativePage = aDocument.IsNegativePage( nTab );
+ sal_Bool bNegativePage = aDocument.IsNegativePage( nTab );
SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT);
SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM);
Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab );
@@ -240,7 +240,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
}
if (aNewArea != aOldArea)
- SetVisAreaOrSize( aNewArea, TRUE ); // hier muss auch der Start angepasst werden
+ SetVisAreaOrSize( aNewArea, true ); // hier muss auch der Start angepasst werden
}
//
@@ -266,14 +266,14 @@ void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
SfxItemSet& rStyleSet = pStyle->GetItemSet();
const SfxPoolItem* pItem;
- if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,FALSE,&pItem) == SFX_ITEM_SET)
+ if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,false,&pItem) == SFX_ITEM_SET)
{
SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet();
SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges());
pDestSet->Put(rSrcSet);
rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET,pDestSet));
}
- if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,FALSE,&pItem) == SFX_ITEM_SET)
+ if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,false,&pItem) == SFX_ITEM_SET)
{
SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet();
SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges());
@@ -301,7 +301,7 @@ void ScDocShell::LoadStyles( SfxObjectShell &rSource )
PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_LEFT );
}
-void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles )
+void ScDocShell::LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles )
{
// similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
@@ -315,12 +315,12 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
( bPageStyles ? SFX_STYLE_FAMILY_ALL : SFX_STYLE_FAMILY_PARA ) :
SFX_STYLE_FAMILY_PAGE;
SfxStyleSheetIterator aIter( pSourcePool, eFamily );
- USHORT nSourceCount = aIter.Count();
+ sal_uInt16 nSourceCount = aIter.Count();
if ( nSourceCount == 0 )
return; // no source styles
ScStylePair* pStyles = new ScStylePair[ nSourceCount ];
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
// first create all new styles
@@ -351,7 +351,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
// then copy contents (after inserting all styles, for parent etc.)
- for ( USHORT i = 0; i < nFound; ++i )
+ for ( sal_uInt16 i = 0; i < nFound; ++i )
{
pStyles[i].pDest->GetItemSet().PutExtended(
pStyles[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT);
@@ -368,11 +368,11 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
}
-BOOL ScDocShell::Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3,
- USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted )
+sal_Bool ScDocShell::Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3,
+ sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted )
{
- BOOL bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3,
+ sal_Bool bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3,
nIdx1, nIdx2, nIdx3, rIdxDeleted );
if (bRet)
lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
@@ -396,8 +396,8 @@ void ScDocShell::UpdateLinks()
// nicht mehr benutzte Links raus
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT k=nCount; k>0; )
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 k=nCount; k>0; )
{
--k;
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[k];
@@ -412,7 +412,7 @@ void ScDocShell::UpdateLinks()
}
else // nicht mehr benutzt -> loeschen
{
- pTabLink->SetAddUndo(TRUE);
+ pTabLink->SetAddUndo(sal_True);
pLinkManager->Remove(k);
}
}
@@ -428,8 +428,8 @@ void ScDocShell::UpdateLinks()
String aDocName = aDocument.GetLinkDoc(i);
String aFltName = aDocument.GetLinkFlt(i);
String aOptions = aDocument.GetLinkOpt(i);
- ULONG nRefresh = aDocument.GetLinkRefreshDelay(i);
- BOOL bThere = FALSE;
+ sal_uLong nRefresh = aDocument.GetLinkRefreshDelay(i);
+ sal_Bool bThere = false;
for (SCTAB j=0; j<i && !bThere; j++) // im Dokument mehrfach?
if (aDocument.IsLinked(j)
&& aDocument.GetLinkDoc(j) == aDocName
@@ -438,7 +438,7 @@ void ScDocShell::UpdateLinks()
// Ignore refresh delay in compare, it should be the
// same for identical links and we don't want dupes
// if it ain't.
- bThere = TRUE;
+ bThere = sal_True;
if (!bThere) // schon als Filter eingetragen?
{
@@ -446,36 +446,36 @@ void ScDocShell::UpdateLinks()
if (!aNames.Insert(pData))
{
delete pData;
- bThere = TRUE;
+ bThere = sal_True;
}
}
if (!bThere)
{
ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
}
}
}
-BOOL ScDocShell::ReloadTabLinks()
+sal_Bool ScDocShell::ReloadTabLinks()
{
sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager();
- BOOL bAny = FALSE;
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++ )
+ sal_Bool bAny = false;
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++ )
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScTableLink))
{
ScTableLink* pTabLink = (ScTableLink*)pBase;
- pTabLink->SetPaint(FALSE); // Paint nur einmal am Ende
+ pTabLink->SetPaint(false); // Paint nur einmal am Ende
pTabLink->Update();
- pTabLink->SetPaint(TRUE);
- bAny = TRUE;
+ pTabLink->SetPaint(true);
+ bAny = true;
}
}
@@ -488,7 +488,7 @@ BOOL ScDocShell::ReloadTabLinks()
SetDocumentModified();
}
- return TRUE; //! Fehler erkennen
+ return sal_True; //! Fehler erkennen
}
void ScDocShell::CheckConfigOptions()
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index db1bcaf82251..1d7ec23e50e9 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -115,7 +115,7 @@ using ::std::vector;
namespace
{
- ULONG lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet)
+ sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet)
{
INetURLObject aURL;
aURL.SetSmartProtocol( INET_PROT_FILE );
@@ -171,13 +171,13 @@ namespace
// -----------------------------------------------------------------------
// MoveFile/KillFile/IsDocument: similar to SfxContentHelper
-BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& rDestObj )
+sal_Bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& rDestObj )
{
sal_Bool bMoveData = sal_True;
- sal_Bool bRet = sal_True, bKillSource = sal_False;
+ sal_Bool bRet = sal_True, bKillSource = false;
if ( rSourceObj.GetProtocol() != rDestObj.GetProtocol() )
{
- bMoveData = sal_False;
+ bMoveData = false;
bKillSource = sal_True;
}
String aName = rDestObj.getName();
@@ -205,7 +205,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject&
catch( uno::Exception& )
{
// ucb may throw different exceptions on failure now
- bRet = sal_False;
+ bRet = false;
}
if ( bKillSource )
@@ -215,7 +215,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject&
}
-BOOL ScDocShell::KillFile( const INetURLObject& rURL )
+sal_Bool ScDocShell::KillFile( const INetURLObject& rURL )
{
sal_Bool bRet = sal_True;
try
@@ -228,15 +228,15 @@ BOOL ScDocShell::KillFile( const INetURLObject& rURL )
catch( uno::Exception& )
{
// ucb may throw different exceptions on failure now
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
-BOOL ScDocShell::IsDocument( const INetURLObject& rURL )
+sal_Bool ScDocShell::IsDocument( const INetURLObject& rURL )
{
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
try
{
::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE),
@@ -273,11 +273,11 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
continue;
LanguageType eLang = pOldEntry->GetLanguage();
- BOOL bThousand, bNegRed;
- USHORT nPrecision, nLeading;
+ sal_Bool bThousand, bNegRed;
+ sal_uInt16 nPrecision, nLeading;
pOldEntry->GetFormatSpecialInfo(bThousand, bNegRed, nPrecision, nLeading);
- nPrecision = static_cast<USHORT>(rScales[i]);
+ nPrecision = static_cast<sal_uInt16>(rScales[i]);
String aNewPicture;
pFormatter->GenerateFormat(aNewPicture, nOldFormat, eLang,
bThousand, bNegRed, nPrecision, nLeading);
@@ -301,12 +301,12 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
}
}
-ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
+sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc )
{
ScColumn::DoubleAllocSwitch aAllocSwitch(true);
- ULONG nErr = eERR_OK;
+ sal_uLong nErr = eERR_OK;
long i;
try
@@ -314,7 +314,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
String aTabName;
uno::Reference<sdbc::XDriverManager> xDrvMan;
uno::Reference<sdbc::XConnection> xConnection;
- ULONG nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
+ sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);
@@ -351,7 +351,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
xRowProp->setPropertyValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny );
- aAny <<= sal_False;
+ aAny <<= false;
xRowProp->setPropertyValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_PROPCHANGE_NOTIFY)), aAny );
@@ -429,7 +429,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
lcl_setScalesToColumns(aDocument, aScales);
SCROW nRow = 1; // 0 is column titles
- BOOL bEnd = FALSE;
+ sal_Bool bEnd = false;
while ( !bEnd && xRowSet->next() )
{
bool bSimpleRow = true;
@@ -440,7 +440,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
{
ScDatabaseDocUtil::StrData aStrData;
ScDatabaseDocUtil::PutData( &aDocument, nCol, nRow, 0,
- xRow, i+1, pTypeArr[i], FALSE,
+ xRow, i+1, pTypeArr[i], false,
&aStrData );
if (aStrData.mnStrLength > aColWidthParam[nCol].mnMaxTextLen)
@@ -463,7 +463,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
}
else // past the end of the spreadsheet
{
- bEnd = TRUE; // don't continue
+ bEnd = sal_True; // don't continue
nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning message
}
@@ -497,15 +497,15 @@ inline sal_Bool IsAsciiAlpha( sal_Unicode c )
}
void lcl_GetColumnTypes( ScDocShell& rDocShell,
- const ScRange& rDataRange, BOOL bHasFieldNames,
+ const ScRange& rDataRange, sal_Bool bHasFieldNames,
rtl::OUString* pColNames, sal_Int32* pColTypes,
sal_Int32* pColLengths, sal_Int32* pColScales,
- BOOL& bHasMemo, CharSet eCharSet )
+ sal_Bool& bHasMemo, CharSet eCharSet )
{
// updating of column titles didn't work in 5.2 and isn't always wanted
// (saving normally shouldn't modify the document)
//! read flag from configuration
- BOOL bUpdateTitles = FALSE;
+ sal_Bool bUpdateTitles = false;
ScDocument* pDoc = rDocShell.GetDocument();
SvNumberFormatter* pNumFmt = pDoc->GetFormatTable();
@@ -522,8 +522,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
SCROW nFirstDataRow = ( bHasFieldNames ? nFirstRow + 1 : nFirstRow );
for ( SCCOL nCol = nFirstCol; nCol <= nLastCol; nCol++ )
{
- BOOL bTypeDefined = FALSE;
- BOOL bPrecDefined = FALSE;
+ sal_Bool bTypeDefined = false;
+ sal_Bool bPrecDefined = false;
sal_Int32 nFieldLen = 0;
sal_Int32 nPrecision = 0;
sal_Int32 nDbType = sdbc::DataType::SQLNULL;
@@ -545,26 +545,26 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
case 'L' :
nDbType = sdbc::DataType::BIT;
nFieldLen = 1;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
break;
case 'D' :
nDbType = sdbc::DataType::DATE;
nFieldLen = 8;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
break;
case 'M' :
nDbType = sdbc::DataType::LONGVARCHAR;
nFieldLen = 10;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
- bHasMemo = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
+ bHasMemo = sal_True;
break;
case 'C' :
nDbType = sdbc::DataType::VARCHAR;
- bTypeDefined = TRUE;
- bPrecDefined = TRUE;
+ bTypeDefined = sal_True;
+ bPrecDefined = sal_True;
break;
case 'N' :
nDbType = sdbc::DataType::DECIMAL;
@@ -579,7 +579,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
if ( CharClass::isAsciiNumeric(aTmp) )
{
nPrecision = aTmp.ToInt32();
- bPrecDefined = TRUE;
+ bPrecDefined = sal_True;
}
}
}
@@ -609,7 +609,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
StrData* pStrData = new StrData( aFieldName );
if ( !aFieldNamesCollection.Insert( pStrData ) )
{ // doppelter Feldname, numerisch erweitern
- USHORT nSub = 1;
+ sal_uInt16 nSub = 1;
String aFixPart( aFieldName );
do
{
@@ -665,8 +665,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
}
}
}
- BOOL bSdbLenAdjusted = FALSE;
- BOOL bSdbLenBad = FALSE;
+ sal_Bool bSdbLenAdjusted = false;
+ sal_Bool bSdbLenBad = false;
// Feldlaenge
if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen )
{ // maximale Feldbreite bestimmen
@@ -708,9 +708,9 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
//! CAVEAT! There is no way to define a numeric field with a length
//! of 1 and no decimals!
if ( nFieldLen == 1 && nPrecision == 0 )
- bSdbLenBad = TRUE;
+ bSdbLenBad = sal_True;
nFieldLen = SvDbaseConverter::ConvertPrecisionToOdbc( nFieldLen, nPrecision );
- bSdbLenAdjusted = TRUE;
+ bSdbLenAdjusted = sal_True;
}
if ( nFieldLen > 254 )
{
@@ -718,7 +718,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
{ // zu lang fuer normales Textfeld => Memofeld
nDbType = sdbc::DataType::LONGVARCHAR;
nFieldLen = 10;
- bHasMemo = TRUE;
+ bHasMemo = sal_True;
}
else
nFieldLen = 254; // dumm gelaufen..
@@ -790,13 +790,13 @@ inline void lcl_getLongVarCharString( String& rString, ScBaseCell* pCell,
}
-ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BOOL& bHasMemo )
+sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, sal_Bool& bHasMemo )
{
// remove the file so the dBase driver doesn't find an invalid file
INetURLObject aDeleteObj( rFullFileName, INET_PROT_FILE );
KillFile( aDeleteObj );
- ULONG nErr = eERR_OK;
+ sal_uLong nErr = eERR_OK;
uno::Any aAny;
SCCOL nFirstCol, nLastCol;
@@ -812,11 +812,11 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
nLastRow - nFirstRow );
SvNumberFormatter* pNumFmt = aDocument.GetFormatTable();
- BOOL bHasFieldNames = TRUE;
+ sal_Bool bHasFieldNames = sal_True;
for ( SCCOL nDocCol = nFirstCol; nDocCol <= nLastCol && bHasFieldNames; nDocCol++ )
{ // nur Strings in erster Zeile => sind Feldnamen
if ( !aDocument.HasStringData( nDocCol, nFirstRow, nTab ) )
- bHasFieldNames = FALSE;
+ bHasFieldNames = false;
}
long nColCount = nLastCol - nFirstCol + 1;
@@ -840,7 +840,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
{
uno::Reference<sdbc::XDriverManager> xDrvMan;
uno::Reference<sdbc::XConnection> xConnection;
- ULONG nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
+ sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);
@@ -1004,7 +1004,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
{
aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
// zwischen 0 Wert und 0 kein Wert unterscheiden
- BOOL bIsNull = (fVal == 0.0);
+ sal_Bool bIsNull = (fVal == 0.0);
if ( bIsNull )
bIsNull = !aDocument.HasValueData( nDocCol, nDocRow, nTab );
if ( bIsNull )
diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index 24cae921fddf..4e5535f92677 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.cxx
@@ -39,15 +39,15 @@
//------------------------------------------------------------------
ScEditableTester::ScEditableTester() :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
}
ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow );
}
@@ -55,29 +55,29 @@ ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab,
ScEditableTester::ScEditableTester( ScDocument* pDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestSelectedBlock( pDoc, nStartCol, nStartRow, nEndCol, nEndRow, rMark );
}
ScEditableTester::ScEditableTester( ScDocument* pDoc, const ScRange& rRange ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestRange( pDoc, rRange );
}
ScEditableTester::ScEditableTester( ScDocument* pDoc, const ScMarkData& rMark ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestSelection( pDoc, rMark );
}
ScEditableTester::ScEditableTester( ScViewFunc* pView ) :
- bIsEditable( TRUE ),
- bOnlyMatrix( TRUE )
+ bIsEditable( sal_True ),
+ bOnlyMatrix( sal_True )
{
TestView( pView );
}
@@ -89,12 +89,12 @@ void ScEditableTester::TestBlock( ScDocument* pDoc, SCTAB nTab,
{
if ( bIsEditable || bOnlyMatrix )
{
- BOOL bThisMatrix;
+ sal_Bool bThisMatrix;
if ( !pDoc->IsBlockEditable( nTab, nStartCol, nStartRow, nEndCol, nEndRow, &bThisMatrix ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( !bThisMatrix )
- bOnlyMatrix = FALSE;
+ bOnlyMatrix = false;
}
}
}
@@ -125,12 +125,12 @@ void ScEditableTester::TestSelection( ScDocument* pDoc, const ScMarkData& rMark
{
if ( bIsEditable || bOnlyMatrix )
{
- BOOL bThisMatrix;
+ sal_Bool bThisMatrix;
if ( !pDoc->IsSelectionEditable( rMark, &bThisMatrix ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( !bThisMatrix )
- bOnlyMatrix = FALSE;
+ bOnlyMatrix = false;
}
}
}
@@ -139,19 +139,19 @@ void ScEditableTester::TestView( ScViewFunc* pView )
{
if ( bIsEditable || bOnlyMatrix )
{
- BOOL bThisMatrix;
+ sal_Bool bThisMatrix;
if ( !pView->SelectionEditable( &bThisMatrix ) )
{
- bIsEditable = FALSE;
+ bIsEditable = false;
if ( !bThisMatrix )
- bOnlyMatrix = FALSE;
+ bOnlyMatrix = false;
}
}
}
//------------------------------------------------------------------
-USHORT ScEditableTester::GetMessageId() const
+sal_uInt16 ScEditableTester::GetMessageId() const
{
if (bIsEditable)
return 0;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 2c2bb32e3ef9..f9de3e8c0c48 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1288,7 +1288,7 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell)
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nError = pFCell->GetErrCode();
+ sal_uInt16 nError = pFCell->GetErrCode();
if (nError)
return new FormulaErrorToken( nError);
else if (pFCell->IsValue())
@@ -1391,7 +1391,7 @@ static ScTokenArray* lcl_convertToTokenArray(const ScDocument* pSrcDoc, ScRange&
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nError = pFCell->GetErrCode();
+ sal_uInt16 nError = pFCell->GetErrCode();
if (nError)
xMat->PutDouble( CreateDoubleError( nError), nC, nR);
else if (pFCell->IsValue())
@@ -2162,7 +2162,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri
pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions));
// make medium hidden to prevent assertion from progress bar
- pSet->Put( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_HIDDEN, sal_True ) );
auto_ptr<SfxMedium> pMedium(new SfxMedium(aFile, STREAM_STD_READ, false, pFilter, pSet));
if (pMedium->GetError() != ERRCODE_NONE)
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 8b08e80d21ae..133cb368e117 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -113,9 +113,9 @@ enum SylkVersion
ScImportExport::ScImportExport( ScDocument* p )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( TRUE ), bSingle( TRUE ), bUndo( FALSE ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( sal_True ), bSingle( sal_True ), bUndo( false ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -128,9 +128,9 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
aRange( rPt ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( false ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -138,15 +138,15 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
// ctor with a range is only used for export
-//! ctor with a string (and bSingle=TRUE) is also used for DdeSetData
+//! ctor with a string (and bSingle=sal_True) is also used for DdeSetData
ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
aRange( r ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( FALSE ), bSingle( FALSE ), bUndo( BOOL( pDocSh != NULL ) ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( false ), bSingle( false ), bUndo( sal_Bool( pDocSh != NULL ) ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -161,9 +161,9 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
ScImportExport::ScImportExport( ScDocument* p, const String& rPos )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
- bFormulas( FALSE ), bIncludeFiltered( TRUE ),
- bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ),
- bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
+ bFormulas( false ), bIncludeFiltered( sal_True ),
+ bAll( false ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ),
+ bOverflow( false ), mbApi( true ), mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -187,12 +187,12 @@ ScImportExport::ScImportExport( ScDocument* p, const String& rPos )
formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
// Bereich?
if( aRange.Parse( aPos, pDoc, eConv ) & SCA_VALID )
- bSingle = FALSE;
+ bSingle = false;
// Zelle?
else if( aRange.aStart.Parse( aPos, pDoc, eConv ) & SCA_VALID )
aRange.aEnd = aRange.aStart;
else
- bAll = TRUE;
+ bAll = sal_True;
}
@@ -217,9 +217,9 @@ void ScImportExport::SetExtOptions( const ScAsciiOptions& rOpt )
}
-BOOL ScImportExport::IsFormatSupported( ULONG nFormat )
+sal_Bool ScImportExport::IsFormatSupported( sal_uLong nFormat )
{
- return BOOL( nFormat == FORMAT_STRING
+ return sal_Bool( nFormat == FORMAT_STRING
|| nFormat == SOT_FORMATSTR_ID_SYLK
|| nFormat == SOT_FORMATSTR_ID_LINK
|| nFormat == SOT_FORMATSTR_ID_HTML
@@ -233,7 +233,7 @@ BOOL ScImportExport::IsFormatSupported( ULONG nFormat )
// Vorbereitung fuer Undo: Undo-Dokument erzeugen
-BOOL ScImportExport::StartPaste()
+sal_Bool ScImportExport::StartPaste()
{
if ( !bAll )
{
@@ -243,16 +243,16 @@ BOOL ScImportExport::StartPaste()
InfoBox aInfoBox(Application::GetDefDialogParent(),
ScGlobal::GetRscString( aTester.GetMessageId() ) );
aInfoBox.Execute();
- return FALSE;
+ return false;
}
}
if( bUndo && pDocSh && pDoc->IsUndoEnabled())
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc );
}
- return TRUE;
+ return sal_True;
}
// Nachbereitung Insert: Undo/Redo-Aktionen erzeugen, Invalidate/Repaint
@@ -260,14 +260,14 @@ BOOL ScImportExport::StartPaste()
void ScImportExport::EndPaste()
{
- BOOL bHeight = pDocSh && pDocSh->AdjustRowHeight(
+ sal_Bool bHeight = pDocSh && pDocSh->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row(), aRange.aStart.Tab() );
if( pUndoDoc && pDoc->IsUndoEnabled() )
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SelectOneTable( aRange.aStart.Tab() );
pDocSh->GetUndoManager()->AddUndoAction(
@@ -291,14 +291,14 @@ void ScImportExport::EndPaste()
/////////////////////////////////////////////////////////////////////////////
-BOOL ScImportExport::ImportData( const String& /* rMimeType */,
+sal_Bool ScImportExport::ImportData( const String& /* rMimeType */,
const ::com::sun::star::uno::Any & /* rValue */ )
{
DBG_ASSERT( !this, "Implementation is missing" );
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ExportData( const String& rMimeType,
+sal_Bool ScImportExport::ExportData( const String& rMimeType,
::com::sun::star::uno::Any & rValue )
{
SvMemoryStream aStrm;
@@ -306,17 +306,17 @@ BOOL ScImportExport::ExportData( const String& rMimeType,
if( ExportStream( aStrm, String(),
SotExchange::GetFormatIdFromMimeType( rMimeType ) ))
{
- aStrm << (BYTE) 0;
+ aStrm << (sal_uInt8) 0;
rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
(sal_Int8*)aStrm.GetData(),
aStrm.Seek( STREAM_SEEK_TO_END ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt )
+sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong nFmt )
{
switch ( nFmt )
{
@@ -341,14 +341,14 @@ BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt )
}
-BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt )
+sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt )
{
DBG_ASSERT( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" );
if ( nFmt != FORMAT_STRING )
{
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
ByteString aTmp;
- BOOL bOk = ExportByteString( aTmp, eEnc, nFmt );
+ sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt );
rText = UniString( aTmp, eEnc );
return bOk;
}
@@ -364,16 +364,16 @@ BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt )
aStrm.Seek( STREAM_SEEK_TO_END );
rText = rtl::OUString( (const sal_Unicode*) aStrm.GetData() );
- return TRUE;
+ return sal_True;
}
rText = rtl::OUString();
- return FALSE;
+ return false;
// ExportStream must handle RTL_TEXTENCODING_UNICODE
}
-BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, ULONG nFmt )
+sal_Bool ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt )
{
DBG_ASSERT( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" );
if ( eEnc == RTL_TEXTENCODING_UNICODE )
@@ -391,74 +391,74 @@ BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc,
aStrm << (sal_Char) 0;
aStrm.Seek( STREAM_SEEK_TO_END );
// Sicherheits-Check:
- if( aStrm.Tell() <= (ULONG) STRING_MAXLEN )
+ if( aStrm.Tell() <= (sal_uLong) STRING_MAXLEN )
{
rText = (const sal_Char*) aStrm.GetData();
- return TRUE;
+ return sal_True;
}
}
rText.Erase();
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, ULONG nFmt )
+sal_Bool ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt )
{
if( nFmt == FORMAT_STRING )
{
if( ExtText2Doc( rStrm ) ) // pExtOptions auswerten
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_SYLK )
{
if( Sylk2Doc( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_DIF )
{
if( Dif2Doc( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == FORMAT_RTF )
{
if( RTF2Doc( rStrm, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_LINK )
- return TRUE; // Link-Import?
+ return sal_True; // Link-Import?
if ( nFmt == SOT_FORMATSTR_ID_HTML )
{
if( HTML2Doc( rStrm, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE )
{
MSE40HTMLClipFormatObj aMSE40ClpObj; // needed to skip the header data
SvStream* pHTML = aMSE40ClpObj.IsValid( rStrm );
if ( pHTML && HTML2Doc( *pHTML, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULONG nFmt )
+sal_Bool ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt )
{
if( nFmt == FORMAT_STRING )
{
if( Doc2Text( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_SYLK )
{
if( Doc2Sylk( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_DIF )
{
if( Doc2Dif( rStrm ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == SOT_FORMATSTR_ID_LINK && !bAll )
{
@@ -476,7 +476,7 @@ BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULON
if( aDocName.Len() )
{
String aRefName;
- USHORT nFlags = SCA_VALID | SCA_TAB_3D;
+ sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D;
if( bSingle )
aRange.aStart.Format( aRefName, nFlags, pDoc, pDoc->GetAddressConvention() );
else
@@ -487,32 +487,32 @@ BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULON
}
String aAppName = Application::GetAppName();
- WriteUnicodeOrByteString( rStrm, aAppName, TRUE );
- WriteUnicodeOrByteString( rStrm, aDocName, TRUE );
- WriteUnicodeOrByteString( rStrm, aRefName, TRUE );
+ WriteUnicodeOrByteString( rStrm, aAppName, sal_True );
+ WriteUnicodeOrByteString( rStrm, aDocName, sal_True );
+ WriteUnicodeOrByteString( rStrm, aRefName, sal_True );
if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
rStrm << sal_Unicode(0);
else
rStrm << sal_Char(0);
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
}
if( nFmt == SOT_FORMATSTR_ID_HTML )
{
if( Doc2HTML( rStrm, rBaseURL ) )
- return TRUE;
+ return sal_True;
}
if( nFmt == FORMAT_RTF )
{
if( Doc2RTF( rStrm ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero )
+void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, sal_Bool bZero )
{
rtl_TextEncoding eEnc = rStrm.GetStreamCharSet();
if ( eEnc == RTL_TEXTENCODING_UNICODE )
@@ -575,10 +575,10 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
sal_Unicode cStr, DoubledQuoteMode eMode )
{
p++; //! jump over opening quote
- BOOL bCont;
+ sal_Bool bCont;
do
{
- bCont = FALSE;
+ bCont = false;
const sal_Unicode* p0 = p;
for( ;; )
{
@@ -596,7 +596,7 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
break;
case DQM_ESCAPE :
p++; // one for us (breaking for-loop)
- bCont = TRUE; // and more
+ bCont = sal_True; // and more
break;
case DQM_CONCAT :
if ( p0+1 < p )
@@ -770,18 +770,17 @@ inline void lcl_WriteSimpleString( SvStream& rStrm, const String& rString )
//////////////////////////////////////////////////////////////////////////////
-BOOL ScImportExport::Text2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::Text2Doc( SvStream& rStrm )
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SCCOL nStartCol = aRange.aStart.Col();
SCROW nStartRow = aRange.aStart.Row();
SCCOL nEndCol = aRange.aEnd.Col();
SCROW nEndRow = aRange.aEnd.Row();
- ULONG nOldPos = rStrm.Tell();
- if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- rStrm.StartReadingUnicodeText();
- BOOL bData = BOOL( !bSingle );
+ sal_uLong nOldPos = rStrm.Tell();
+ rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() );
+ sal_Bool bData = sal_Bool( !bSingle );
if( !bSingle)
bOk = StartPaste();
@@ -829,7 +828,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
pDoc->SetString( nCol, nRow, aRange.aStart.Tab(), aCell );
}
else // zuviele Spalten/Zeilen
- bOverflow = TRUE; // beim Import Warnung ausgeben
+ bOverflow = sal_True; // beim Import Warnung ausgeben
++nCol;
}
++nRow;
@@ -840,7 +839,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
aRange.aEnd.SetCol( nEndCol );
aRange.aEnd.SetRow( nEndRow );
bOk = StartPaste();
- bData = TRUE;
+ bData = sal_True;
}
else
break;
@@ -856,7 +855,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
static bool lcl_PutString(
- ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, BYTE nColFormat,
+ ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, sal_uInt8 nColFormat,
SvNumberFormatter* pFormatter, bool bDetectNumFormat,
::utl::TransliterationWrapper& rTransliteration, CalendarWrapper& rCalendar,
::utl::TransliterationWrapper* pSecondTransliteration, CalendarWrapper* pSecondCalendar )
@@ -900,12 +899,12 @@ static bool lcl_PutString(
}
else if ( nColFormat != SC_COL_STANDARD ) // Datumsformate
{
- const USHORT nMaxNumberParts = 7; // Y-M-D h:m:s.t
+ const sal_uInt16 nMaxNumberParts = 7; // Y-M-D h:m:s.t
xub_StrLen nLen = rStr.Len();
xub_StrLen nStart[nMaxNumberParts];
xub_StrLen nEnd[nMaxNumberParts];
- USHORT nDP, nMP, nYP;
+ sal_uInt16 nDP, nMP, nYP;
switch ( nColFormat )
{
case SC_COL_YMD: nDP = 2; nMP = 1; nYP = 0; break;
@@ -914,28 +913,28 @@ static bool lcl_PutString(
default: nDP = 0; nMP = 1; nYP = 2; break;
}
- USHORT nFound = 0;
- BOOL bInNum = FALSE;
+ sal_uInt16 nFound = 0;
+ sal_Bool bInNum = false;
for ( xub_StrLen nPos=0; nPos<nLen && (bInNum ||
nFound<nMaxNumberParts); nPos++ )
{
if (bInNum && nFound == 3 && nColFormat == SC_COL_YMD &&
nPos <= nStart[nFound]+2 && rStr.GetChar(nPos) == 'T')
- bInNum = FALSE; // ISO-8601: YYYY-MM-DDThh:mm...
+ bInNum = false; // ISO-8601: YYYY-MM-DDThh:mm...
else if ((((!bInNum && nFound==nMP) || (bInNum && nFound==nMP+1))
&& ScGlobal::pCharClass->isLetterNumeric( rStr, nPos))
|| ScGlobal::pCharClass->isDigit( rStr, nPos))
{
if (!bInNum)
{
- bInNum = TRUE;
+ bInNum = sal_True;
nStart[nFound] = nPos;
++nFound;
}
nEnd[nFound-1] = nPos;
}
else
- bInNum = FALSE;
+ bInNum = false;
}
if ( nFound == 1 )
@@ -952,13 +951,13 @@ static bool lcl_PutString(
// 8 digits: 4 for year, 2 each for day and month
// 5 or 7 digits: first field is shortened by 1
- BOOL bLongYear = ( nDateLen >= 7 );
- BOOL bShortFirst = ( nDateLen == 5 || nDateLen == 7 );
+ sal_Bool bLongYear = ( nDateLen >= 7 );
+ sal_Bool bShortFirst = ( nDateLen == 5 || nDateLen == 7 );
- USHORT nFieldStart = nDateStart;
- for (USHORT nPos=0; nPos<3; nPos++)
+ sal_uInt16 nFieldStart = nDateStart;
+ for (sal_uInt16 nPos=0; nPos<3; nPos++)
{
- USHORT nFieldEnd = nFieldStart + 1; // default: 2 digits
+ sal_uInt16 nFieldEnd = nFieldStart + 1; // default: 2 digits
if ( bLongYear && nPos == nYP )
nFieldEnd += 2; // 2 extra digits for long year
if ( bShortFirst && nPos == 0 )
@@ -975,9 +974,9 @@ static bool lcl_PutString(
if ( nFound >= 3 )
{
using namespace ::com::sun::star;
- BOOL bSecondCal = FALSE;
- USHORT nDay = (USHORT) rStr.Copy( nStart[nDP], nEnd[nDP]+1-nStart[nDP] ).ToInt32();
- USHORT nYear = (USHORT) rStr.Copy( nStart[nYP], nEnd[nYP]+1-nStart[nYP] ).ToInt32();
+ sal_Bool bSecondCal = false;
+ sal_uInt16 nDay = (sal_uInt16) rStr.Copy( nStart[nDP], nEnd[nDP]+1-nStart[nDP] ).ToInt32();
+ sal_uInt16 nYear = (sal_uInt16) rStr.Copy( nStart[nYP], nEnd[nYP]+1-nStart[nYP] ).ToInt32();
String aMStr = rStr.Copy( nStart[nMP], nEnd[nMP]+1-nStart[nMP] );
sal_Int16 nMonth = (sal_Int16) aMStr.ToInt32();
if (!nMonth)
@@ -1013,14 +1012,14 @@ static bool lcl_PutString(
pSecondTransliteration->isEqual( aMStr, xMonths[i].AbbrevName ) )
{
nMonth = sal::static_int_cast<sal_Int16>( i+1 );
- bSecondCal = TRUE;
+ bSecondCal = sal_True;
}
else if ( i == 8 && pSecondTransliteration->isEqual(
aMStr, aSepShortened ) )
{ // correct English abbreviation is SEPT,
// but data mostly contains SEP only
nMonth = sal::static_int_cast<sal_Int16>( i+1 );
- bSecondCal = TRUE;
+ bSecondCal = sal_True;
}
}
}
@@ -1076,12 +1075,12 @@ static bool lcl_PutString(
LanguageType eDocLang = eLatin; //! which language for date formats?
short nType = (nFound > 3 ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE);
- ULONG nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang );
+ sal_uLong nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang );
// maybe there is a special format including seconds or milliseconds
if (nFound > 5)
nFormat = pDocFormatter->GetStandardFormat( fDays, nFormat, nType, eDocLang);
- pDoc->PutCell( nCol, nRow, nTab, new ScValueCell(fDays), nFormat, FALSE );
+ pDoc->PutCell( nCol, nRow, nTab, new ScValueCell(fDays), nFormat, false );
return bMultiLine; // success
}
@@ -1128,18 +1127,17 @@ String lcl_GetFixed( const String& rLine, xub_StrLen nStart, xub_StrLen nNext, b
return rLine.Copy(nStart, nSpace-nStart);
}
-BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
{
if (!pExtOptions)
return Text2Doc( rStrm );
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( STREAM_SEEK_TO_END );
::std::auto_ptr<ScProgress> xProgress( new ScProgress( pDocSh,
ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos ));
rStrm.Seek( nOldPos );
- if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- rStrm.StartReadingUnicodeText();
+ rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() );
ScColumn::DoubleAllocSwitch aAllocSwitch(true);
@@ -1148,13 +1146,13 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
SCROW nStartRow = aRange.aStart.Row();
SCTAB nTab = aRange.aStart.Tab();
- BOOL bFixed = pExtOptions->IsFixedLen();
+ sal_Bool bFixed = pExtOptions->IsFixedLen();
const String& rSeps = pExtOptions->GetFieldSeps();
const sal_Unicode* pSeps = rSeps.GetBuffer();
- BOOL bMerge = pExtOptions->IsMergeSeps();
- USHORT nInfoCount = pExtOptions->GetInfoCount();
+ sal_Bool bMerge = pExtOptions->IsMergeSeps();
+ sal_uInt16 nInfoCount = pExtOptions->GetInfoCount();
const xub_StrLen* pColStart = pExtOptions->GetColStart();
- const BYTE* pColFormat = pExtOptions->GetColFormat();
+ const sal_uInt8* pColFormat = pExtOptions->GetColFormat();
long nSkipLines = pExtOptions->GetStartRow();
LanguageType eDocLang = pExtOptions->GetLanguage();
@@ -1181,7 +1179,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
}
String aLine, aCell;
- USHORT i;
+ sal_uInt16 i;
SCROW nRow = nStartRow;
while(--nSkipLines>0)
@@ -1203,7 +1201,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
bool bQuotedAsText = pExtOptions && pExtOptions->IsQuotedAsText();
- ULONG nOriginalStreamPos = rStrm.Tell();
+ sal_uLong nOriginalStreamPos = rStrm.Tell();
do
{
@@ -1224,11 +1222,11 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
// SC_COL_SKIP.
for ( i=0; i<nInfoCount && nCol <= MAXCOL+1; i++ )
{
- BYTE nFmt = pColFormat[i];
+ sal_uInt8 nFmt = pColFormat[i];
if (nFmt != SC_COL_SKIP) // sonst auch nCol nicht hochzaehlen
{
if (nCol > MAXCOL)
- bOverflow = TRUE; // display warning on import
+ bOverflow = sal_True; // display warning on import
else if (!bDetermineRange)
{
xub_StrLen nStart = pColStart[i];
@@ -1250,7 +1248,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
else // Nach Trennzeichen suchen
{
SCCOL nSourceCol = 0;
- USHORT nInfoStart = 0;
+ sal_uInt16 nInfoStart = 0;
const sal_Unicode* p = aLine.GetBuffer();
// Yes, the check is nCol<=MAXCOL+1, +1 because it is only an
// overflow if there is really data following to be put behind
@@ -1261,7 +1259,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
bool bIsQuoted = false;
p = ScImportExport::ScanNextFieldFromString( p, aCell, cStr, pSeps, bMerge, bIsQuoted );
- BYTE nFmt = SC_COL_STANDARD;
+ sal_uInt8 nFmt = SC_COL_STANDARD;
for ( i=nInfoStart; i<nInfoCount; i++ )
{
if ( pColStart[i] == nSourceCol + 1 ) // pColStart ist 1-basiert
@@ -1274,7 +1272,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if ( nFmt != SC_COL_SKIP )
{
if (nCol > MAXCOL)
- bOverflow = TRUE; // display warning on import
+ bOverflow = sal_True; // display warning on import
else if (!bDetermineRange)
{
if (bIsQuoted && bQuotedAsText)
@@ -1303,7 +1301,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
++nRow;
if ( nRow > MAXROW )
{
- bOverflow = TRUE; // display warning on import
+ bOverflow = sal_True; // display warning on import
break; // for
}
}
@@ -1326,7 +1324,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
{
delete pEnglishTransliteration;
delete pEnglishCalendar;
- return FALSE;
+ return false;
}
}
@@ -1335,7 +1333,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if (!StartPaste())
{
EndPaste();
- return FALSE;
+ return false;
}
}
@@ -1351,7 +1349,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if (bRangeIsDetermined)
EndPaste();
- return TRUE;
+ return sal_True;
}
@@ -1424,7 +1422,7 @@ bool hasLineBreaksOrSeps( const String& rStr, sal_Unicode cSep )
}
-BOOL ScImportExport::Doc2Text( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2Text( SvStream& rStrm )
{
SCCOL nCol;
SCROW nRow;
@@ -1520,14 +1518,14 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm )
}
}
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm )
{
- BOOL bOk = TRUE;
- BOOL bMyDoc = FALSE;
+ sal_Bool bOk = sal_True;
+ sal_Bool bMyDoc = false;
SylkVersion eVersion = SYLK_OTHER;
// US-English separators for StringToDouble
@@ -1538,8 +1536,8 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
SCROW nStartRow = aRange.aStart.Row();
SCCOL nEndCol = aRange.aEnd.Col();
SCROW nEndRow = aRange.aEnd.Row();
- ULONG nOldPos = rStrm.Tell();
- BOOL bData = BOOL( !bSingle );
+ sal_uLong nOldPos = rStrm.Tell();
+ sal_Bool bData = sal_Bool( !bSingle );
SvULongs aFormats;
if( !bSingle)
@@ -1567,7 +1565,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
if( cTag == 'C' ) // Content
{
if( *p++ != ';' )
- return FALSE;
+ return false;
while( *p )
{
sal_Unicode ch = *p++;
@@ -1601,15 +1599,15 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
nEndCol = nCol;
break;
}
- BOOL bText;
+ sal_Bool bText;
if( *p == '"' )
{
- bText = TRUE;
+ bText = sal_True;
aText.Erase();
p = lcl_ScanSylkString( p, aText, eVersion);
}
else
- bText = FALSE;
+ bText = false;
const sal_Unicode* q = p;
while( *q && *q != ';' )
q++;
@@ -1619,7 +1617,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
{
pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(),
ScBaseCell::CreateTextCell( aText, pDoc),
- (BOOL) TRUE);
+ (sal_Bool) sal_True);
}
else
{
@@ -1663,7 +1661,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
if ( ch == 'M' )
{
ScMarkData aMark;
- aMark.SelectTable( aPos.Tab(), TRUE );
+ aMark.SelectTable( aPos.Tab(), sal_True );
pDoc->InsertMatrixFormula( nCol, nRow, nRefCol,
nRefRow, aMark, EMPTY_STRING, pCode );
}
@@ -1686,7 +1684,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
else if( cTag == 'F' ) // Format
{
if( *p++ != ';' )
- return FALSE;
+ return false;
sal_Int32 nFormat = -1;
while( *p )
{
@@ -1728,7 +1726,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
}
if ( 0 <= nFormat && nFormat < aFormats.Count() )
{
- ULONG nKey = aFormats[(USHORT)nFormat];
+ sal_uLong nKey = aFormats[(sal_uInt16)nFormat];
pDoc->ApplyAttr( nCol, nRow, aRange.aStart.Tab(),
SfxUInt32Item( ATTR_VALUE_FORMAT, nKey ) );
}
@@ -1775,7 +1773,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
aRange.aEnd.SetCol( nEndCol );
aRange.aEnd.SetRow( nEndRow );
bOk = StartPaste();
- bData = TRUE;
+ bData = sal_True;
}
else
break;
@@ -1786,7 +1784,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
}
-BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2Sylk( SvStream& rStrm )
{
SCCOL nCol;
SCROW nRow;
@@ -1806,7 +1804,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
{
String aBufStr;
double nVal;
- BOOL bForm = FALSE;
+ sal_Bool bForm = false;
SCROW r = nRow - nStartRow + 1;
SCCOL c = nCol - nStartCol + 1;
ScBaseCell* pCell;
@@ -1827,7 +1825,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
aValStr = ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic,
- rtl_math_DecimalPlaces_Max, '.', TRUE );
+ rtl_math_DecimalPlaces_Max, '.', sal_True );
aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" ));
aBufStr += String::CreateFromInt32( c );
@@ -1926,35 +1924,35 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
}
lcl_WriteSimpleString( rStrm, String( 'E' ) );
WriteUnicodeOrByteEndl( rStrm );
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
+sal_Bool ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
{
// CharSet is ignored in ScExportHTML, read from Load/Save HTML options
ScFormatFilter::Get().ScExportHTML( rStrm, rBaseURL, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW, bAll,
aStreamPath, aNonConvertibleChars );
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Doc2RTF( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2RTF( SvStream& rStrm )
{
// CharSet is ignored in ScExportRTF
ScFormatFilter::Get().ScExportRTF( rStrm, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW );
- return BOOL( rStrm.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStrm.GetError() == SVSTREAM_OK );
}
-BOOL ScImportExport::Doc2Dif( SvStream& rStrm )
+sal_Bool ScImportExport::Doc2Dif( SvStream& rStrm )
{
// for DIF in the clipboard, IBM_850 is always used
ScFormatFilter::Get().ScExportDif( rStrm, pDoc, aRange, RTL_TEXTENCODING_IBM_850 );
- return TRUE;
+ return sal_True;
}
-BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
+sal_Bool ScImportExport::Dif2Doc( SvStream& rStrm )
{
SCTAB nTab = aRange.aStart.Tab();
ScDocument* pImportDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1973,12 +1971,12 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
nEndRow = aRange.aStart.Row();
aRange.aEnd = ScAddress( nEndCol, nEndRow, nTab );
- BOOL bOk = StartPaste();
+ sal_Bool bOk = StartPaste();
if (bOk)
{
- USHORT nFlags = IDF_ALL & ~IDF_STYLES;
+ sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
- pImportDoc->CopyToDocument( aRange, nFlags, FALSE, pDoc );
+ pImportDoc->CopyToDocument( aRange, nFlags, false, pDoc );
EndPaste();
}
@@ -1988,7 +1986,7 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
}
-BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
+sal_Bool ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
{
ScEEAbsImport *pImp = ScFormatFilter::Get().CreateRTFImport( pDoc, aRange );
if (!pImp)
@@ -1996,10 +1994,10 @@ BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
pImp->Read( rStrm, rBaseURL );
aRange = pImp->GetRange();
- BOOL bOk = StartPaste();
+ sal_Bool bOk = StartPaste();
if (bOk)
{
- USHORT nFlags = IDF_ALL & ~IDF_STYLES;
+ sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
pImp->WriteToDocument();
EndPaste();
@@ -2009,15 +2007,15 @@ BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
}
-BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
+sal_Bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
{
- ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, TRUE);
+ ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, sal_True);
if (!pImp)
return false;
pImp->Read( rStrm, rBaseURL );
aRange = pImp->GetRange();
- BOOL bOk = StartPaste();
+ sal_Bool bOk = StartPaste();
if (bOk)
{
// ScHTMLImport may call ScDocument::InitDrawLayer, resulting in
@@ -2025,7 +2023,7 @@ BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
if (pDocSh)
pDocSh->MakeDrawLayer();
- USHORT nFlags = IDF_ALL & ~IDF_STYLES;
+ sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
if (pExtOptions)
@@ -2058,21 +2056,21 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) RETURN_ERROR
virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) RETURN_ERROR
virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&,
- const CharSet, UINT32 ) RETURN_ERROR
+ const CharSet, sal_uInt32 ) RETURN_ERROR
virtual FltError ScImportRTF( SvStream&, const String&, ScDocument*, ScRange& ) RETURN_ERROR
- virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, BOOL, SvNumberFormatter*, bool ) RETURN_ERROR
+ virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, sal_Bool, SvNumberFormatter*, bool ) RETURN_ERROR
virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) { return NULL; }
- virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, BOOL ) { return NULL; }
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, sal_Bool ) { return NULL; }
virtual String GetHTMLRangeNameList( ScDocument*, const String& ) { return String(); }
#if ENABLE_LOTUS123_EXPORT
virtual FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet ) RETURN_ERROR
#endif
virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, CharSet ) RETURN_ERROR
- virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, UINT32 ) RETURN_ERROR
- virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, UINT32 ) RETURN_ERROR
- virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, BOOL,
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, sal_uInt32 ) RETURN_ERROR
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, sal_uInt32 ) RETURN_ERROR
+ virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, sal_Bool,
const String&, String& ) RETURN_ERROR
virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const CharSet ) RETURN_ERROR
};
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index dfbe7ed24fe0..6d35207b78ce 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -65,11 +65,11 @@ void lcl_InvalidateOutliner( SfxBindings* pBindings )
//! PaintWidthHeight zur DocShell verschieben?
void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab,
- BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd )
+ sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd )
{
ScDocument* pDoc = rDocShell.GetDocument();
- USHORT nParts = PAINT_GRID;
+ sal_uInt16 nParts = PAINT_GRID;
SCCOL nStartCol = 0;
SCROW nStartRow = 0;
SCCOL nEndCol = MAXCOL; // fuer Test auf Merge
@@ -97,9 +97,9 @@ void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab,
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
@@ -107,19 +107,19 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
SCTAB nTab = rRange.aStart.Tab();
ScDocument* pDoc = rDocShell.GetDocument();
- ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab, TRUE );
+ ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab, sal_True );
ScOutlineTable* pUndoTab = NULL;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if (bRecord)
pUndoTab = new ScOutlineTable( *pTable );
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
- BOOL bRes;
- BOOL bSize = FALSE;
+ sal_Bool bRes;
+ sal_Bool bSize = false;
if ( bColumns )
bRes = pArray->Insert( nStartCol, nEndCol, bSize );
else
@@ -132,13 +132,13 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoMakeOutline( &rDocShell,
nStartCol,nStartRow,nTab,nEndCol,nEndRow,nTab,
- pUndoTab, bColumns, TRUE ) );
+ pUndoTab, bColumns, sal_True ) );
}
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
- USHORT nParts = 0; // Datenbereich nicht geaendert
+ sal_uInt16 nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
else
@@ -149,7 +149,7 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else
{
@@ -161,9 +161,9 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
return bSuccess;
}
-BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -174,7 +174,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
{
@@ -184,8 +184,8 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
- BOOL bRes;
- BOOL bSize = FALSE;
+ sal_Bool bRes;
+ sal_Bool bSize = false;
if ( bColumns )
bRes = pArray->Remove( nStartCol, nEndCol, bSize );
else
@@ -198,13 +198,13 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoMakeOutline( &rDocShell,
nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- pUndoTab, bColumns, FALSE ) );
+ pUndoTab, bColumns, false ) );
}
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
- USHORT nParts = 0; // Datenbereich nicht geaendert
+ sal_uInt16 nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
else
@@ -214,7 +214,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts );
rDocShell.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
// es wird nicht wieder eingeblendet -> kein UpdatePageBreaks
@@ -229,13 +229,13 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
return bDone;
}
-BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = false;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
{
@@ -250,9 +250,9 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
SCROW nEndRow = nRow2;
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pUndoDoc );
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
@@ -263,20 +263,20 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
pUndoDoc, pUndoTab ) );
}
- SelectLevel( nTab, TRUE, pTable->GetColArray()->GetDepth(), FALSE, FALSE, bApi );
- SelectLevel( nTab, FALSE, pTable->GetRowArray()->GetDepth(), FALSE, FALSE, bApi );
+ SelectLevel( nTab, sal_True, pTable->GetColArray()->GetDepth(), false, false, bApi );
+ SelectLevel( nTab, false, pTable->GetRowArray()->GetDepth(), false, false, bApi );
pDoc->SetOutlineTable( nTab, NULL );
pDoc->UpdatePageBreaks( nTab );
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
else if (!bApi)
Sound::Beep();
@@ -286,7 +286,7 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -297,7 +297,7 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
ScDocument* pUndoDoc = NULL;
@@ -318,14 +318,14 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
SCROW nOutEndRow = nRow2;
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
// einblenden
- SelectLevel( nTab, TRUE, pTable->GetColArray()->GetDepth(), FALSE, FALSE, bApi );
- SelectLevel( nTab, FALSE, pTable->GetRowArray()->GetDepth(), FALSE, FALSE, bApi );
+ SelectLevel( nTab, sal_True, pTable->GetColArray()->GetDepth(), false, false, bApi );
+ SelectLevel( nTab, false, pTable->GetRowArray()->GetDepth(), false, false, bApi );
pDoc->SetOutlineTable( nTab, NULL );
}
@@ -341,30 +341,30 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
}
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
- BOOL bRecord, BOOL bPaint, BOOL /* bApi */ )
+sal_Bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); // ist schon da
if (!pTable)
- return FALSE;
+ return false;
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
if (!pArray)
- return FALSE;
+ return false;
SCCOLROW nStart, nEnd;
pArray->GetRange( nStart, nEnd );
@@ -375,15 +375,15 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bColumns)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
@@ -398,21 +398,21 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
ScOutlineEntry* pEntry;
while ((pEntry=aIter.GetNext()) != NULL)
{
- USHORT nThisLevel = aIter.LastLevel();
- BOOL bShow = (nThisLevel < nLevel);
+ sal_uInt16 nThisLevel = aIter.LastLevel();
+ sal_Bool bShow = (nThisLevel < nLevel);
if (bShow) // einblenden
{
- pEntry->SetHidden( FALSE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( false );
+ pEntry->SetVisible( sal_True );
}
else if ( nThisLevel == nLevel ) // ausblenden
{
- pEntry->SetHidden( TRUE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( sal_True );
+ pEntry->SetVisible( sal_True );
}
else // verdeckt
{
- pEntry->SetVisible( FALSE );
+ pEntry->SetVisible( false );
}
SCCOLROW nThisStart = pEntry->GetStart();
@@ -436,14 +436,14 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -454,7 +454,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
@@ -471,14 +471,14 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
{
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineBlock( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- pUndoDoc, pUndoTab, TRUE ) );
+ pUndoDoc, pUndoTab, sal_True ) );
}
// Spalten
@@ -493,14 +493,14 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( nStart>=nStartCol && nEnd<=nEndCol )
{
- pEntry->SetHidden( FALSE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( false );
+ pEntry->SetVisible( sal_True );
if (nStart<nMin) nMin=nStart;
if (nEnd>nMax) nMax=nEnd;
}
}
for ( i=nMin; i<=nMax; i++ )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, sal_True );
// Zeilen
@@ -515,22 +515,22 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( nStart>=nStartRow && nEnd<=nEndRow )
{
- pEntry->SetHidden( FALSE );
- pEntry->SetVisible( TRUE );
+ pEntry->SetHidden( false );
+ pEntry->SetVisible( sal_True );
if (nStart<nMin) nMin=nStart;
if (nEnd>nMax) nMax=nEnd;
}
}
for ( i=nMin; i<=nMax; i++ )
if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
- pDoc->ShowRow( i, nTab, TRUE );
+ pDoc->ShowRow( i, nTab, sal_True );
pDoc->SetDrawPageSize(nTab);
pDoc->UpdatePageBreaks( nTab );
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP );
rDocShell.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
}
@@ -541,9 +541,9 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
return bDone;
}
-BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi )
+sal_Bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -554,18 +554,18 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
if (pTable)
{
ScOutlineEntry* pEntry;
- USHORT nColLevel;
- USHORT nRowLevel;
- USHORT nCount;
+ sal_uInt16 nColLevel;
+ sal_uInt16 nRowLevel;
+ sal_uInt16 nCount;
SCCOLROW nStart;
SCCOLROW nEnd;
- USHORT i;
+ sal_uInt16 i;
SCCOLROW nEffStartCol = nStartCol;
SCCOLROW nEffEndCol = nEndCol;
@@ -582,16 +582,16 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
{
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
pDoc->CopyToDocument( static_cast<SCCOL>(nEffStartCol), 0, nTab,
static_cast<SCCOL>(nEffEndCol), MAXROW, nTab, IDF_NONE,
- FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineBlock( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- pUndoDoc, pUndoTab, FALSE ) );
+ pUndoDoc, pUndoTab, false ) );
}
// Spalten
@@ -604,7 +604,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( static_cast<SCCOLROW>(nStartCol)<=nEnd && static_cast<SCCOLROW>(nEndCol)>=nStart )
- HideOutline( nTab, TRUE, nColLevel, i, FALSE, FALSE, bApi );
+ HideOutline( nTab, sal_True, nColLevel, i, false, false, bApi );
}
// Zeilen
@@ -617,7 +617,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
nEnd = pEntry->GetEnd();
if ( nStartRow<=nEnd && nEndRow>=nStart )
- HideOutline( nTab, FALSE, nRowLevel, i, FALSE, FALSE, bApi );
+ HideOutline( nTab, false, nRowLevel, i, false, false, bApi );
}
pDoc->UpdatePageBreaks( nTab );
@@ -625,7 +625,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP );
rDocShell.SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
}
@@ -638,12 +638,12 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
//------------------------------------------------------------------------
-BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL /* bApi */ )
+sal_Bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
@@ -656,35 +656,35 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bColumns)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDoOutline( &rDocShell,
nStart, nEnd, nTab, pUndoDoc, //! start und end berechnen
- bColumns, nLevel, nEntry, TRUE ) );
+ bColumns, nLevel, nEntry, sal_True ) );
}
//! HideCursor();
pDoc->InitializeNoteCaptions(nTab);
- pEntry->SetHidden(FALSE);
+ pEntry->SetHidden(false);
SCCOLROW i;
for ( i = nStart; i <= nEnd; i++ )
{
if ( bColumns )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, sal_True );
else
if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
- pDoc->ShowRow( i, nTab, TRUE );
+ pDoc->ShowRow( i, nTab, sal_True );
}
ScSubOutlineIterator aIter( pArray, nLevel, nEntry );
@@ -697,14 +697,14 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
for ( i = nSubStart; i <= nSubEnd; i++ )
{
if ( bColumns )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, FALSE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, false );
else
- pDoc->ShowRow( i, nTab, FALSE );
+ pDoc->ShowRow( i, nTab, false );
}
}
}
- pArray->SetVisibleBelow( nLevel, nEntry, TRUE, TRUE );
+ pArray->SetVisibleBelow( nLevel, nEntry, sal_True, sal_True );
pDoc->SetDrawPageSize(nTab);
pDoc->InvalidatePageBreaks(nTab);
@@ -721,15 +721,15 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE; //! immer ???
+ return sal_True; //! immer ???
}
-BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL /* bApi */ )
+sal_Bool ScOutlineDocFunc::HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ )
{
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
@@ -742,37 +742,37 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bColumns)
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
pUndoDoc );
}
else
{
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDoOutline( &rDocShell,
nStart, nEnd, nTab, pUndoDoc,
- bColumns, nLevel, nEntry, FALSE ) );
+ bColumns, nLevel, nEntry, false ) );
}
//! HideCursor();
pDoc->InitializeNoteCaptions(nTab);
- pEntry->SetHidden(TRUE);
+ pEntry->SetHidden(true);
SCCOLROW i;
for ( i = nStart; i <= nEnd; i++ )
{
if ( bColumns )
- pDoc->ShowCol( static_cast<SCCOL>(i), nTab, FALSE );
+ pDoc->ShowCol( static_cast<SCCOL>(i), nTab, false );
else
- pDoc->ShowRow( i, nTab, FALSE );
+ pDoc->ShowRow( i, nTab, false );
}
- pArray->SetVisibleBelow( nLevel, nEntry, FALSE );
+ pArray->SetVisibleBelow( nLevel, nEntry, false );
pDoc->SetDrawPageSize(nTab);
pDoc->InvalidatePageBreaks(nTab);
@@ -789,7 +789,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE; //! immer ???
+ return sal_True; //! immer ???
}
diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx
index e87c2322a228..b3ec3e31d010 100644
--- a/sc/source/ui/docshell/pagedata.cxx
+++ b/sc/source/ui/docshell/pagedata.cxx
@@ -43,7 +43,7 @@ ScPrintRangeData::ScPrintRangeData()
nPagesX = nPagesY = 0;
pPageEndX = NULL;
pPageEndY = NULL;
- bTopDown = bAutomatic = TRUE;
+ bTopDown = bAutomatic = sal_True;
nFirstPage = 1;
}
@@ -109,18 +109,18 @@ ScPrintRangeData& ScPageBreakData::GetData(size_t nPos)
return pData[nPos];
}
-BOOL ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const
+sal_Bool ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const
{
if ( nUsed != rOther.nUsed )
- return FALSE;
+ return false;
- for (USHORT i=0; i<nUsed; i++)
+ for (sal_uInt16 i=0; i<nUsed; i++)
if ( pData[i].GetPrintRange() != rOther.pData[i].GetPrintRange() )
- return FALSE;
+ return false;
//! ScPrintRangeData komplett vergleichen ??
- return TRUE;
+ return sal_True;
}
void ScPageBreakData::AddPages()
@@ -128,7 +128,7 @@ void ScPageBreakData::AddPages()
if ( nUsed > 1 )
{
long nPage = pData[0].GetFirstPage();
- for (USHORT i=0; sal::static_int_cast<size_t>(i+1)<nUsed; i++)
+ for (sal_uInt16 i=0; sal::static_int_cast<size_t>(i+1)<nUsed; i++)
{
nPage += ((long)pData[i].GetPagesX())*pData[i].GetPagesY();
pData[i+1].SetFirstPage( nPage );
diff --git a/sc/source/ui/docshell/pntlock.cxx b/sc/source/ui/docshell/pntlock.cxx
index 0450f7c67a0d..2ca47820eb6d 100644
--- a/sc/source/ui/docshell/pntlock.cxx
+++ b/sc/source/ui/docshell/pntlock.cxx
@@ -35,12 +35,12 @@
//------------------------------------------------------------------------
-ScPaintLockData::ScPaintLockData(USHORT nNewMode) :
+ScPaintLockData::ScPaintLockData(sal_uInt16 nNewMode) :
nMode( nNewMode ),
nLevel( 0 ),
nDocLevel( 0 ),
nParts( 0 ),
- bModified( FALSE )
+ bModified( false )
{
}
@@ -48,7 +48,7 @@ ScPaintLockData::~ScPaintLockData()
{
}
-void ScPaintLockData::AddRange( const ScRange& rRange, USHORT nP )
+void ScPaintLockData::AddRange( const ScRange& rRange, sal_uInt16 nP )
{
if (!xRangeList.Is())
xRangeList = new ScRangeList;
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index d96f9101b858..6bd9f6d629bf 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -46,7 +46,7 @@ using namespace formula;
// -----------------------------------------------------------------------
-BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName )
+sal_Bool lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName )
{
if (pDocSh)
{
@@ -58,11 +58,11 @@ BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& r
if (pData)
{
if ( pData->IsValidReference( rRange ) )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
ScServerObjectSvtListenerForwarder::ScServerObjectSvtListenerForwarder(
@@ -84,7 +84,7 @@ void ScServerObjectSvtListenerForwarder::Notify( SvtBroadcaster& /* rBC */, cons
ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) :
aForwarder( this ),
pDocSh( pShell ),
- bRefreshListener( FALSE )
+ bRefreshListener( false )
{
// parse item string
@@ -148,12 +148,12 @@ void ScServerObject::EndListeningAll()
SfxListener::EndListeningAll();
}
-BOOL ScServerObject::GetData(
+sal_Bool ScServerObject::GetData(
::com::sun::star::uno::Any & rData /*out param*/,
- const String & rMimeType, BOOL /* bSynchron */ )
+ const String & rMimeType, sal_Bool /* bSynchron */ )
{
if (!pDocSh)
- return FALSE;
+ return false;
// named ranges may have changed -> update aRange
if ( aItemStr.Len() )
@@ -162,7 +162,7 @@ BOOL ScServerObject::GetData(
if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange )
{
aRange = aNew;
- bRefreshListener = TRUE;
+ bRefreshListener = sal_True;
}
}
@@ -174,7 +174,7 @@ BOOL ScServerObject::GetData(
pDocSh->GetDocument()->StartListeningArea( aRange, &aForwarder );
StartListening(*pDocSh);
StartListening(*SFX_APP());
- bRefreshListener = FALSE;
+ bRefreshListener = false;
}
String aDdeTextFmt = pDocSh->GetDdeTextFmt();
@@ -184,7 +184,7 @@ BOOL ScServerObject::GetData(
{
ScImportExport aObj( pDoc, aRange );
if( aDdeTextFmt.GetChar(0) == 'F' )
- aObj.SetFormulas( TRUE );
+ aObj.SetFormulas( sal_True );
if( aDdeTextFmt.EqualsAscii( "SYLK" ) ||
aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{
@@ -214,7 +214,7 @@ BOOL ScServerObject::GetData(
void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- BOOL bDataChanged = FALSE;
+ sal_Bool bDataChanged = false;
// DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor
if ( &rBC == pDocSh )
@@ -235,7 +235,7 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// check if named range was modified
ScRange aNew;
if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange )
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -244,25 +244,25 @@ void ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const ScHint* pScHint = PTR_CAST( ScHint, &rHint );
if( pScHint && (pScHint->GetId() & (SC_HINT_DATACHANGED | SC_HINT_DYING)) )
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
else if (rHint.ISA(ScAreaChangedHint)) // position of broadcaster changed
{
ScRange aNewRange = ((const ScAreaChangedHint&)rHint).GetRange();
if ( aRange != aNewRange )
{
- bRefreshListener = TRUE;
- bDataChanged = TRUE;
+ bRefreshListener = sal_True;
+ bDataChanged = sal_True;
}
}
else if (rHint.ISA(SfxSimpleHint))
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if (nId == SFX_HINT_DYING)
{
// If the range is being deleted, listening must be restarted
// after the deletion is complete (done in GetData)
- bRefreshListener = TRUE;
- bDataChanged = TRUE;
+ bRefreshListener = sal_True;
+ bDataChanged = sal_True;
}
}
}
diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx
index 3171fa8164ae..19dc2843470e 100644
--- a/sc/source/ui/docshell/sizedev.cxx
+++ b/sc/source/ui/docshell/sizedev.cxx
@@ -43,11 +43,11 @@
ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
{
- BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
if ( bTextWysiwyg )
{
pDevice = pDocSh->GetPrinter();
- bOwner = FALSE;
+ bOwner = false;
aOldMapMode = pDevice->GetMapMode();
pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode
@@ -57,7 +57,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
{
pDevice = new VirtualDevice;
pDevice->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- bOwner = TRUE;
+ bOwner = sal_True;
}
Point aLogic = pDevice->LogicToPixel( Point(1000,1000), MAP_TWIP );
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index aad15c30feb7..b962bcfd37e1 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -79,34 +79,34 @@ TYPEINIT1(ScTableLink, ::sfx2::SvBaseLink);
ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile,
const String& rFilter, const String& rOpt,
- ULONG nRefresh ):
+ sal_uLong nRefresh ):
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer( nRefresh ),
pImpl( new TableLink_Impl ),
aFileName(rFile),
aFilterName(rFilter),
aOptions(rOpt),
- bInCreate( FALSE ),
- bInEdit( FALSE ),
- bAddUndo( TRUE ),
- bDoPaint( TRUE )
+ bInCreate( false ),
+ bInEdit( false ),
+ bAddUndo( sal_True ),
+ bDoPaint( sal_True )
{
pImpl->m_pDocSh = pDocSh;
}
ScTableLink::ScTableLink(SfxObjectShell* pShell, const String& rFile,
const String& rFilter, const String& rOpt,
- ULONG nRefresh ):
+ sal_uLong nRefresh ):
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
ScRefreshTimer( nRefresh ),
pImpl( new TableLink_Impl ),
aFileName(rFile),
aFilterName(rFilter),
aOptions(rOpt),
- bInCreate( FALSE ),
- bInEdit( FALSE ),
- bAddUndo( TRUE ),
- bDoPaint( TRUE )
+ bInCreate( false ),
+ bInEdit( false ),
+ bAddUndo( sal_True ),
+ bDoPaint( sal_True )
{
pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell );
SetRefreshHandler( LINK( this, ScTableLink, RefreshHdl ) );
@@ -137,7 +137,7 @@ void ScTableLink::Edit( Window* pParent, const Link& rEndEditHdl )
if (pParent)
Application::SetDefDialogParent(pParent);
- bInEdit = TRUE;
+ bInEdit = sal_True;
SvBaseLink::Edit( pParent, LINK( this, ScTableLink, TableEndEditHdl ) );
}
@@ -164,14 +164,14 @@ void ScTableLink::Closed()
{
// Verknuepfung loeschen: Undo
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if (bAddUndo && bUndo)
{
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveLink( pImpl->m_pDocSh, aFileName ) );
- bAddUndo = FALSE; // nur einmal
+ bAddUndo = false; // nur einmal
}
// Verbindung wird im dtor aufgehoben
@@ -179,30 +179,30 @@ void ScTableLink::Closed()
SvBaseLink::Closed();
}
-BOOL ScTableLink::IsUsed() const
+sal_Bool ScTableLink::IsUsed() const
{
return pImpl->m_pDocSh->GetDocument()->HasLink( aFileName, aFilterName, aOptions );
}
-BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
- const String* pNewOptions, ULONG nNewRefresh )
+sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
+ const String* pNewOptions, sal_uLong nNewRefresh )
{
// Dokument laden
if (!rNewFile.Len() || !rNewFilter.Len())
- return FALSE;
+ return false;
String aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) );
- BOOL bNewUrlName = (aNewUrl != aFileName);
+ sal_Bool bNewUrlName = (aNewUrl != aFileName);
const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter);
if (!pFilter)
- return FALSE;
+ return false;
ScDocument* pDoc = pImpl->m_pDocSh->GetDocument();
- pDoc->SetInLinkUpdate( TRUE );
+ pDoc->SetInLinkUpdate( sal_True );
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
// wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
if ( rNewFilter != aFilterName )
@@ -215,13 +215,14 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if ( aOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
- SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter, pSet);
+ SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, false, pFilter, pSet);
if ( bInEdit ) // only if using the edit dialog,
- pMed->UseInteractionHandler( TRUE ); // enable the filter options dialog
+ pMed->UseInteractionHandler( sal_True ); // enable the filter options dialog
+ // aRef->DoClose() will be called explicitly, but it is still more safe to use SfxObjectShellLock here
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
- SfxObjectShellRef aRef = pSrcShell;
+ SfxObjectShellLock aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
// Optionen koennten gesetzt worden sein
@@ -232,7 +233,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
// Undo...
ScDocument* pUndoDoc = NULL;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
if (bAddUndo && bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -240,18 +241,18 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
ScDocShellModificator aModificator( *pImpl->m_pDocSh );
- BOOL bNotFound = FALSE;
+ sal_Bool bNotFound = false;
ScDocument* pSrcDoc = pSrcShell->GetDocument();
// from text filters that don't set the table name,
// use the one table regardless of link table name
- BOOL bAutoTab = (pSrcDoc->GetTableCount() == 1) &&
+ sal_Bool bAutoTab = (pSrcDoc->GetTableCount() == 1) &&
ScDocShell::HasAutomaticTableName( rNewFilter );
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
{
- BYTE nMode = pDoc->GetLinkMode(nTab);
+ sal_uInt8 nMode = pDoc->GetLinkMode(nTab);
if (nMode && pDoc->GetLinkDoc(nTab)==aFileName)
{
String aTabName = pDoc->GetLinkTab(nTab);
@@ -261,12 +262,12 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if (bAddUndo && bUndo)
{
if (bFirst)
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
else
- pUndoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE );
- bFirst = FALSE;
+ pUndoDoc->AddUndoTab( nTab, nTab, sal_True, sal_True );
+ bFirst = false;
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
- pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pUndoDoc);
+ pDoc->CopyToDocument(aRange, IDF_ALL, false, pUndoDoc);
pUndoDoc->TransferDrawPage( pDoc, nTab, nTab );
pUndoDoc->SetLink( nTab, nMode, aFileName, aFilterName,
aOptions, aTabName, GetRefreshDelay() );
@@ -283,7 +284,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
{
pDoc->RenameTab( nTab,
ScGlobal::GetDocTabName( aNewUrl, aTabName ),
- FALSE, TRUE ); // kein RefUpdate, kein ValidTabName
+ false, sal_True ); // kein RefUpdate, kein ValidTabName
}
}
@@ -304,7 +305,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
}
if (bFound)
- pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, FALSE, // nicht neu einfuegen
+ pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, false, // nicht neu einfuegen
(nMode == SC_LINK_VALUE) ); // nur Werte?
else
{
@@ -382,7 +383,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
pDoc->SetString( 1,2,nTab, aTabName );
}
- bNotFound = TRUE;
+ bNotFound = sal_True;
}
if ( bNewUrlName || rNewFilter != aFilterName ||
@@ -426,7 +427,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
//! Fehler ausgeben ?
}
- pDoc->SetInLinkUpdate( FALSE );
+ pDoc->SetInLinkUpdate( false );
// notify Uno objects (for XRefreshListener)
//! also notify Uno objects if file name was changed!
@@ -434,7 +435,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
aHint.SetSheetLink( aFileName );
pDoc->BroadcastUno( aHint );
- return TRUE;
+ return sal_True;
}
IMPL_LINK( ScTableLink, RefreshHdl, ScTableLink*, EMPTYARG )
@@ -447,7 +448,7 @@ IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink )
{
if ( pImpl->m_aEndEditLink.IsSet() )
pImpl->m_aEndEditLink.Call( pLink );
- bInEdit = FALSE;
+ bInEdit = false;
Application::SetDefDialogParent( pImpl->m_pOldParent );
return 0;
}
@@ -458,15 +459,15 @@ String ScDocumentLoader::GetOptions( SfxMedium& rMedium )
{
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
return ((const SfxStringItem*)pItem)->GetValue();
return EMPTY_STRING;
}
-BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
+sal_Bool ScDocumentLoader::GetFilterName( const String& rFileName,
String& rFilter, String& rOptions,
- BOOL bWithContent, BOOL bWithInteraction )
+ sal_Bool bWithContent, sal_Bool bWithInteraction )
{
TypeId aScType = TYPE(ScDocShell);
SfxObjectShell* pDocSh = SfxObjectShell::GetFirst( &aScType );
@@ -479,7 +480,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
{
rFilter = pMed->GetFilter()->GetFilterName();
rOptions = GetOptions(*pMed);
- return TRUE;
+ return sal_True;
}
}
pDocSh = SfxObjectShell::GetNext( *pDocSh, &aScType );
@@ -488,16 +489,16 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
INetURLObject aUrl( rFileName );
INetProtocol eProt = aUrl.GetProtocol();
if ( eProt == INET_PROT_NOT_VALID ) // invalid URL?
- return FALSE; // abort without creating a medium
+ return false; // abort without creating a medium
// Filter-Detection
const SfxFilter* pSfxFilter = NULL;
- SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE );
+ SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, false );
if ( pMedium->GetError() == ERRCODE_NONE )
{
if ( bWithInteraction )
- pMedium->UseInteractionHandler(TRUE); // #i73992# no longer called from GuessFilter
+ pMedium->UseInteractionHandler(sal_True); // #i73992# no longer called from GuessFilter
SfxFilterMatcher aMatcher( String::CreateFromAscii("scalc") );
if( bWithContent )
@@ -506,7 +507,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter );
}
- BOOL bOK = FALSE;
+ sal_Bool bOK = false;
if ( pMedium->GetError() == ERRCODE_NONE )
{
if ( pSfxFilter )
@@ -531,12 +532,12 @@ void ScDocumentLoader::RemoveAppPrefix( String& rFilterName )
ScDocumentLoader::ScDocumentLoader( const String& rFileName,
String& rFilterName, String& rOptions,
- UINT32 nRekCnt, BOOL bWithInteraction ) :
+ sal_uInt32 nRekCnt, sal_Bool bWithInteraction ) :
pDocShell(0),
pMedium(0)
{
if ( !rFilterName.Len() )
- GetFilterName( rFileName, rFilterName, rOptions, TRUE, bWithInteraction );
+ GetFilterName( rFileName, rFilterName, rOptions, sal_True, bWithInteraction );
const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( rFilterName );
@@ -545,12 +546,12 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
if ( rOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) );
- pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE, pFilter, pSet );
+ pMedium = new SfxMedium( rFileName, STREAM_STD_READ, false, pFilter, pSet );
if ( pMedium->GetError() != ERRCODE_NONE )
return ;
if ( bWithInteraction )
- pMedium->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMedium->UseInteractionHandler( sal_True ); // to enable the filter options dialog
pDocShell = new ScDocShell( SFX_CREATE_MODE_INTERNAL );
aRef = pDocShell;
@@ -600,12 +601,12 @@ ScDocument* ScDocumentLoader::GetDocument()
return pDocShell ? pDocShell->GetDocument() : 0;
}
-BOOL ScDocumentLoader::IsError() const
+sal_Bool ScDocumentLoader::IsError() const
{
if ( pDocShell && pMedium )
return pMedium->GetError() != ERRCODE_NONE;
else
- return TRUE;
+ return sal_True;
}
String ScDocumentLoader::GetTitle() const
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 32a45998827e..0c9dcef4606f 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -86,9 +86,9 @@ ScDocStatPage::~ScDocStatPage()
//------------------------------------------------------------------------
-BOOL ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
+sal_Bool ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
{
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 4e6ac3ad6b8b..cd2ad601a465 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -90,7 +90,7 @@ SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) )
void ScDrawShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -111,13 +111,13 @@ void lcl_setModified( SfxObjectShell* pShell )
void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
Window* pWin = pViewData->GetActiveWin();
ScDrawView* pView = pViewData->GetScDrawView();
SdrModel* pDoc = pViewData->GetDocument()->GetDrawLayer();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
SdrObject* pSingleSelectedObj = NULL;
if ( nMarkCount > 0 )
pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -134,7 +134,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
case SID_TEXT_STANDARD: // Harte Textattributierung loeschen
{
SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- pView->SetAttributes(aEmptyAttr, TRUE);
+ pView->SetAttributes(aEmptyAttr, sal_True);
}
break;
@@ -186,9 +186,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
}
if( pView->AreObjectsMarked() )
- pView->SetAttrToMarked( *rReq.GetArgs(), FALSE );
+ pView->SetAttrToMarked( *rReq.GetArgs(), false );
else
- pView->SetDefaultAttr( *rReq.GetArgs(), FALSE);
+ pView->SetDefaultAttr( *rReq.GetArgs(), false);
pView->InvalidateAttribs();
}
break;
@@ -257,7 +257,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
{
SfxAbstractTabDialog *pDlg = pFact->CreateCaptionDialog( pWin, pView );
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
aCombSet.Put( aNewAttr );
aCombSet.Put( aNewGeoAttr );
@@ -307,7 +307,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
{
SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
if ( pInfo->GetMacro().getLength() > 0 )
{
SvxMacroTableDtor aTab;
@@ -334,7 +334,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
{
rtl::OUString sMacro;
SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT );
@@ -344,10 +344,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
if ( pObj->IsGroupObject() )
{
SdrObjList* pOL = pObj->GetSubList();
- ULONG nObj = pOL->GetObjCount();
- for ( ULONG index=0; index<nObj; ++index )
+ sal_uLong nObj = pOL->GetObjCount();
+ for ( sal_uLong index=0; index<nObj; ++index )
{
- pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), TRUE );
+ pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), sal_True );
pInfo->SetMacro( sMacro );
}
}
@@ -361,10 +361,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
delete pItemSet;
}
-void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
+void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
ScDrawView* pView = pViewData->GetScDrawView();
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
const SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -373,7 +373,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
SfxItemSet aNewAttr( pView->GetDefaultAttr() );
if( bHasMarked )
- pView->MergeAttrFromMarked( aNewAttr, FALSE );
+ pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
@@ -389,9 +389,9 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
if ( pDlg->Execute() == RET_OK )
{
if( bHasMarked )
- pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
pView->InvalidateAttribs();
rReq.Done();
@@ -400,14 +400,14 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
delete pDlg;
}
-void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
+void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
ScDrawView* pView = pViewData->GetScDrawView();
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SfxItemSet aNewAttr( pView->GetDefaultAttr() );
if( bHasMarked )
- pView->MergeAttrFromMarked( aNewAttr, FALSE );
+ pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -431,9 +431,9 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
if ( pDlg->Execute() == RET_OK )
{
if( bHasMarked )
- pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
pView->InvalidateAttribs();
rReq.Done();
@@ -442,26 +442,26 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
delete pDlg;
}
-void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT /* nTabPage */ )
+void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 /* nTabPage */ )
{
ScDrawView* pView = pViewData->GetScDrawView();
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
if( bHasMarked )
- pView->MergeAttrFromMarked( aNewAttr, FALSE );
+ pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if ( RET_OK == nResult )
{
if ( bHasMarked )
pView->SetAttributes( *pDlg->GetOutputItemSet() );
else
- pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE );
+ pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
pView->InvalidateAttribs();
rReq.Done();
@@ -473,7 +473,7 @@ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk
{
if ( pObj )
{
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
pInfo->SetHlink( rHlnk );
lcl_setModified( GetObjectShell() );
}
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 033b93fcdd4e..4e1539fc38ff 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -58,7 +58,7 @@
#include <svx/svdoole2.hxx>
#include <svx/svdocapt.hxx>
-USHORT ScGetFontWorkId(); // in drtxtob
+sal_uInt16 ScGetFontWorkId(); // in drtxtob
using namespace com::sun::star;
@@ -69,7 +69,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) :
pViewData( pData )
{
SetPool( &pViewData->GetScDrawView()->GetModel()->GetItemPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -92,14 +92,14 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles
rSet.Put( SfxBoolItem( SID_OBJECT_MIRROR, eMode == SDRDRAG_MIRROR ) );
rSet.Put( SfxBoolItem( SID_BEZIER_EDIT, !pView->IsFrameDragSingles() ) );
- USHORT nFWId = ScGetFontWorkId();
+ sal_uInt16 nFWId = ScGetFontWorkId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
rSet.Put(SfxBoolItem(SID_FONTWORK, pViewFrm->HasChildWindow(nFWId)));
// Notes always default to Page anchor.
bool bDisableAnchor = false;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount == 1 )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -116,18 +116,18 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles
switch( pView->GetAnchorType() )
{
case SCA_PAGE:
- rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, TRUE ) );
- rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, sal_True ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
break;
case SCA_CELL:
- rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, sal_True ) );
break;
default:
- rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
+ rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
break;
}
}
@@ -139,14 +139,14 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
// call IsMirrorAllowed first to make sure ForcePossibilities (and thus CheckMarked)
// is called before GetMarkCount, so the nMarkCount value is valid for the rest of this method.
- if (!pView->IsMirrorAllowed(TRUE,TRUE))
+ if (!pView->IsMirrorAllowed(sal_True,sal_True))
{
rSet.DisableItem( SID_MIRROR_HORIZONTAL );
rSet.DisableItem( SID_MIRROR_VERTICAL );
}
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount <= 1 || !pView->IsGroupPossible() )
rSet.DisableItem( SID_GROUP );
@@ -195,7 +195,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
}
}
- BOOL bCanRename = FALSE;
+ sal_Bool bCanRename = false;
if ( nMarkCount > 1 )
{
// no hypelink options for a selected group
@@ -214,10 +214,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
}
SdrLayerID nLayerID = pObj->GetLayer();
if ( nLayerID != SC_LAYER_INTERN )
- bCanRename = TRUE; // #i51351# anything except internal objects can be renamed
+ bCanRename = sal_True; // #i51351# anything except internal objects can be renamed
// #91929#; don't show original size entry if not possible
- UINT16 nObjType = pObj->GetObjIdentifier();
+ sal_uInt16 nObjType = pObj->GetObjIdentifier();
if ( nObjType == OBJ_OLE2 )
{
SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
@@ -270,7 +270,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
pView->GetAttributes( aAttrs );
if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE )
{
- BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
}
}
@@ -289,17 +289,17 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
Window* pWindow = pViewData->GetActiveWin();
ScDrawView* pDrView = pViewData->GetScDrawView();
Point aPos = pWindow->PixelToLogic(aMousePos);
- BOOL bHasMarked = pDrView->AreObjectsMarked();
+ sal_Bool bHasMarked = pDrView->AreObjectsMarked();
if( bHasMarked )
{
- rSet.Put( pDrView->GetAttrFromMarked(FALSE) );
+ rSet.Put( pDrView->GetAttrFromMarked(false) );
// Wenn die View selektierte Objekte besitzt, muessen entspr. Items
// von SFX_ITEM_DEFAULT (_ON) auf SFX_ITEM_DISABLED geaendert werden
SfxWhichIter aIter( rSet, XATTR_LINE_FIRST, XATTR_FILL_LAST );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( SFX_ITEM_DEFAULT == rSet.GetItemState( nWhich ) )
@@ -322,7 +322,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
// #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by
// SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE.
- BOOL bActionItem = FALSE;
+ sal_Bool bActionItem = false;
if ( pDrView->IsAction() ) // action rectangle
{
Rectangle aRect;
@@ -333,7 +333,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
- bActionItem = TRUE;
+ bActionItem = sal_True;
}
}
if ( !bActionItem )
@@ -362,7 +362,7 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet)
// Dialoge fuer Draw-Attribute disablen, wenn noetig
ScDrawView* pDrView = pViewData->GetScDrawView();
- SfxItemSet aViewSet = pDrView->GetAttrFromMarked(FALSE);
+ SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false);
if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SFX_ITEM_DEFAULT )
{
@@ -374,18 +374,18 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet)
rSet.DisableItem( SID_ATTRIBUTES_AREA );
}
-BOOL ScDrawShell::AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark)
+sal_Bool ScDrawShell::AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark)
{
- BOOL bResult=TRUE;
- ULONG nCount = rMark.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_Bool bResult=sal_True;
+ sal_uLong nCount = rMark.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
if ( !pObj->ISA(SdrUnoObj) )
{
if(nLayerNo!=pObj->GetLayer())
{
- bResult=FALSE;
+ bResult=false;
break;
}
}
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx
index 49c8ed0652a6..75b1747dc3be 100644
--- a/sc/source/ui/drawfunc/drawsh4.cxx
+++ b/sc/source/ui/drawfunc/drawsh4.cxx
@@ -56,7 +56,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
SvxFontWorkDialog* pDlg = NULL;
ScDrawView* pDrView = pViewData->GetScDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( pViewFrm->HasChildWindow(nId) )
@@ -69,7 +69,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
if ( pDlg )
- pDlg->SetActive(FALSE);
+ pDlg->SetActive(false);
rSet.DisableItem(XATTR_FORMTXTSTYLE);
rSet.DisableItem(XATTR_FORMTXTADJUST);
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index c471aad6f85e..ea0830b65d7e 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -82,7 +82,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
{
ScDrawView* pView = pViewData->GetScDrawView();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
// Hyperlink
@@ -160,14 +160,14 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_HYPERLINK_SETLINK:
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
const String& rName = pHyper->GetName();
@@ -175,7 +175,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
const String& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( eMode == HLINK_FIELD || eMode == HLINK_BUTTON )
{
ScDrawView* pView = pViewData->GetScDrawView();
@@ -232,20 +232,20 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
//! Undo ???
pViewData->GetDocShell()->SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
else
{
SetHlinkForObject( pObj, rURL );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
if (!bDone)
pViewData->GetViewShell()->
- InsertURL( rName, rURL, rTarget, (USHORT) eMode );
+ InsertURL( rName, rURL, rTarget, (sal_uInt16) eMode );
// InsertURL an der ViewShell schaltet bei "Text" die DrawShell ab !!!
}
@@ -256,7 +256,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
}
}
-USHORT ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2
+sal_uInt16 ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2
//------------------------------------------------------------------
@@ -270,7 +270,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
ScTabView* pTabView = pViewData->GetView();
ScDrawView* pView = pTabView->GetScDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
//!!!
// wer weiss, wie lange das funktioniert? (->vom Abreisscontrol funktioniert es)
@@ -291,7 +291,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate(SID_OBJECT_HELL);
// leave draw shell if nothing selected (layer may be locked)
if ( pView->GetMarkedObjectList().GetMarkCount() == 0 )
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_FRAME_TO_TOP:
@@ -362,13 +362,13 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_DELETE_CONTENTS:
pView->DeleteMarked();
if (!pTabView->IsDrawSelMode())
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_CUT:
pView->DoCut();
if (!pTabView->IsDrawSelMode())
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_COPY:
@@ -423,7 +423,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate( SID_OBJECT_MIRROR );
if (eMode == SDRDRAG_ROTATE && !pView->IsFrameDragSingles())
{
- pView->SetFrameDragSingles( TRUE );
+ pView->SetFrameDragSingles( sal_True );
rBindings.Invalidate( SID_BEZIER_EDIT );
}
}
@@ -440,14 +440,14 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate( SID_OBJECT_MIRROR );
if (eMode == SDRDRAG_MIRROR && !pView->IsFrameDragSingles())
{
- pView->SetFrameDragSingles( TRUE );
+ pView->SetFrameDragSingles( sal_True );
rBindings.Invalidate( SID_BEZIER_EDIT );
}
}
break;
case SID_BEZIER_EDIT:
{
- BOOL bOld = pView->IsFrameDragSingles();
+ sal_Bool bOld = pView->IsFrameDragSingles();
pView->SetFrameDragSingles( !bOld );
rBindings.Invalidate( SID_BEZIER_EDIT );
if (bOld && pView->GetDragMode() != SDRDRAG_MOVE)
@@ -461,7 +461,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_FONTWORK:
{
- USHORT nId = ScGetFontWorkId();
+ sal_uInt16 nId = ScGetFontWorkId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( rReq.GetArgs() )
@@ -483,11 +483,11 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_ENABLE_HYPHENATION:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, false);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
- BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
}
@@ -555,7 +555,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
}
// ChartListenerCollectionNeedsUpdate is needed for Navigator update
- pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE );
+ pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True );
pDocSh->SetDrawModified();
}
@@ -594,7 +594,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
pSelected->SetDescription(aDescription);
// ChartListenerCollectionNeedsUpdate is needed for Navigator update
- pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE );
+ pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True );
pDocSh->SetDrawModified();
}
@@ -680,12 +680,12 @@ void ScDrawShell::ExecFormText(SfxRequest& rReq)
pDrView->ScEndTextEdit();
if ( SFX_ITEM_SET ==
- rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem)
+ rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem)
&& XFTFORM_NONE !=
((const XFormTextStdFormItem*) pItem)->GetValue() )
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)
(pViewFrm->
@@ -713,7 +713,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq )
}
else
{
- BOOL bLock = FALSE;
+ sal_Bool bLock = false;
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
@@ -721,7 +721,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq )
ScDrawView* pDrawView = pViewData->GetScDrawView();
if ( pDrawView && pDrawView->AreObjectsMarked() )
{
- BOOL bOnlyHardAttr = TRUE;
+ sal_Bool bOnlyHardAttr = sal_True;
SfxItemSet* pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) );
pView->SetDrawBrushSet( pItemSet, bLock );
}
@@ -731,8 +731,8 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq )
void ScDrawShell::StateFormatPaintbrush( SfxItemSet& rSet )
{
ScDrawView* pDrawView = pViewData->GetScDrawView();
- BOOL bSelection = pDrawView && pDrawView->AreObjectsMarked();
- BOOL bHasPaintBrush = pViewData->GetView()->HasPaintBrush();
+ sal_Bool bSelection = pDrawView && pDrawView->AreObjectsMarked();
+ sal_Bool bHasPaintBrush = pViewData->GetView()->HasPaintBrush();
if ( !bHasPaintBrush && !bSelection )
rSet.DisableItem( SID_FORMATPAINTBRUSH );
diff --git a/sc/source/ui/drawfunc/drformsh.src b/sc/source/ui/drawfunc/drformsh.src
index a69aadb2d43c..638d9a5676ad 100644
--- a/sc/source/ui/drawfunc/drformsh.src
+++ b/sc/source/ui/drawfunc/drformsh.src
@@ -35,19 +35,19 @@
ToolBoxItem\
{\
Identifier = SID_FRAME_TO_TOP ; \
- HelpID = SID_FRAME_TO_TOP ; \
+ HelpID = CMD_SID_FRAME_TO_TOP ; \
};\
ToolBoxItem\
{\
Identifier = SID_FRAME_TO_BOTTOM ; \
- HelpID = SID_FRAME_TO_BOTTOM ; \
+ HelpID = CMD_SID_FRAME_TO_BOTTOM ; \
};
#define MN_RENAME_OBJECT \
MenuItem\
{\
Identifier = SID_RENAME_OBJECT ; \
- HelpId = SID_RENAME_OBJECT ; \
+ HelpId = CMD_SID_RENAME_OBJECT ; \
Text [ en-US ] = "Name...";\
};
@@ -56,7 +56,7 @@
MenuItem\
{\
Identifier = SID_TITLE_DESCRIPTION_OBJECT; \
- HelpId = SID_TITLE_DESCRIPTION_OBJECT; \
+ HelpId = CMD_SID_TITLE_DESCRIPTION_OBJECT; \
Text [ en-US ] = "Description...";\
};
@@ -117,14 +117,14 @@
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_PAGE ; \
- HelpId = SID_ANCHOR_PAGE ; \
+ HelpId = CMD_SID_ANCHOR_PAGE ; \
Text [ en-US ] = "To P~age" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_CELL ; \
- HelpId = SID_ANCHOR_CELL ; \
+ HelpId = CMD_SID_ANCHOR_CELL ; \
Text [ en-US ] = "To ~Cell" ; \
};\
};\
@@ -135,7 +135,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN ; \
- HelpId = SID_OBJECT_ALIGN ; \
+ HelpId = CMD_SID_OBJECT_ALIGN ; \
Text [ en-US ] = "A~lignment" ; \
SubMenu = Menu\
{\
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 3325cdcbbde5..9237d0e1f66a 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -110,7 +110,7 @@ TYPEINIT1( ScDrawTextObjectBar, SfxShell );
void ScDrawTextObjectBar::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -123,12 +123,12 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) :
SfxShell(pData->GetViewShell()),
pViewData(pData),
pClipEvtLstnr(NULL),
- bPastePossible(FALSE)
+ bPastePossible(false)
{
SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() );
// UndoManager wird beim Umschalten in den Edit-Modus umgesetzt...
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -143,7 +143,7 @@ ScDrawTextObjectBar::~ScDrawTextObjectBar()
{
if ( pClipEvtLstnr )
{
- pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), FALSE );
+ pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), false );
// The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -172,7 +172,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
}
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_COPY:
@@ -189,10 +189,10 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -214,8 +214,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_SELECTALL:
{
- ULONG nCount = pOutliner->GetParagraphCount();
- ESelection aSel( 0,0,(USHORT)nCount,0 );
+ sal_uLong nCount = pOutliner->GetParagraphCount();
+ ESelection aSel( 0,0,(sal_uInt16)nCount,0 );
pOutView->SetSelection( aSel );
}
break;
@@ -231,13 +231,13 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
@@ -270,7 +270,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
const String& rName = pHyper->GetName();
@@ -278,7 +278,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
const String& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pOutView && ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) )
{
const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection();
@@ -315,7 +315,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
pOutView->SetSelection( aSel );
}
- bDone = TRUE;
+ bDone = sal_True;
}
if (!bDone)
@@ -356,7 +356,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_THES:
{
String aReplaceText;
- SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, false );
if (pItem2)
aReplaceText = pItem2->GetValue();
if (aReplaceText.Len() > 0)
@@ -376,13 +376,13 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
{
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
- BOOL bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK);
- BOOL bDisableFontWork = FALSE;
+ sal_Bool bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK);
+ sal_Bool bDisableFontWork = false;
if (IsNoteEdit())
{
// #i21255# notes now support rich text formatting (#i74140# but not fontwork)
- bDisableFontWork = TRUE;
+ bDisableFontWork = sal_True;
}
if ( bDisableFontWork )
@@ -397,7 +397,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if ( pOutView )
{
- BOOL bField = FALSE;
+ sal_Bool bField = false;
const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection();
if (pFieldItem)
{
@@ -408,7 +408,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
aHLinkItem.SetName( pURLField->GetRepresentation() );
aHLinkItem.SetURL( pURLField->GetURL() );
aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() );
- bField = TRUE;
+ bField = sal_True;
}
}
if (!bField)
@@ -457,7 +457,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
pView->GetAttributes( aAttrs );
if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE )
{
- BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
}
}
@@ -479,7 +479,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable thesaurus main menu and context menu entry if there is nothing to look up
- BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
+ sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
if (!bIsLookUpWord || !bCanDoThesaurus)
rSet.DisableItem( SID_THES );
if (!bCanDoThesaurus)
@@ -516,7 +516,7 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScDrawTextObjectBar, ClipboardChanged ) );
pClipEvtLstnr->acquire();
Window* pWin = pViewData->GetActiveWin();
- pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
@@ -524,7 +524,7 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
}
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -568,7 +568,7 @@ void ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq )
SdrView* pView = pViewData->GetScDrawView();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxItemSet aSet( pView->GetDefaultAttr() );
@@ -615,41 +615,41 @@ void lcl_RemoveFields( OutlinerView& rOutView )
aSel.Adjust();
xub_StrLen nNewEnd = aSel.nEndPos;
- BOOL bUpdate = pOutliner->GetUpdateMode();
- BOOL bChanged = FALSE;
+ sal_Bool bUpdate = pOutliner->GetUpdateMode();
+ sal_Bool bChanged = false;
//! GetPortions and GetAttribs should be const!
EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine();
- ULONG nParCount = pOutliner->GetParagraphCount();
- for (ULONG nPar=0; nPar<nParCount; nPar++)
+ sal_uLong nParCount = pOutliner->GetParagraphCount();
+ for (sal_uLong nPar=0; nPar<nParCount; nPar++)
if ( nPar >= aSel.nStartPara && nPar <= aSel.nEndPara )
{
SvUShorts aPortions;
- rEditEng.GetPortions( (USHORT)nPar, aPortions );
+ rEditEng.GetPortions( (sal_uInt16)nPar, aPortions );
//! GetPortions should use xub_StrLen instead of USHORT
- for ( USHORT nPos = aPortions.Count(); nPos; )
+ for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
{
--nPos;
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
// fields are single characters
if ( nEnd == nStart+1 &&
( nPar > aSel.nStartPara || nStart >= aSel.nStartPos ) &&
( nPar < aSel.nEndPara || nEnd <= aSel.nEndPos ) )
{
- ESelection aFieldSel( (USHORT)nPar, nStart, (USHORT)nPar, nEnd );
+ ESelection aFieldSel( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd );
SfxItemSet aSet = rEditEng.GetAttribs( aFieldSel );
if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_ON )
{
if (!bChanged)
{
if (bUpdate)
- pOutliner->SetUpdateMode( FALSE );
+ pOutliner->SetUpdateMode( false );
String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
pOutliner->GetUndoManager().EnterListAction( aName, aName );
- bChanged = TRUE;
+ bChanged = sal_True;
}
String aFieldText = rEditEng.GetText( aFieldSel );
@@ -667,7 +667,7 @@ void lcl_RemoveFields( OutlinerView& rOutView )
if (bUpdate && bChanged)
{
pOutliner->GetUndoManager().LeaveListAction();
- pOutliner->SetUpdateMode( TRUE );
+ pOutliner->SetUpdateMode( sal_True );
}
if ( aOldSel.IsEqual( aSel ) ) // aSel is adjusted
@@ -681,15 +681,15 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
{
SdrView* pView = pViewData->GetScDrawView();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
- BOOL bArgsInReq = ( pArgs != NULL );
+ sal_Bool bArgsInReq = ( pArgs != NULL );
if ( !bArgsInReq )
{
SfxItemSet aEditAttr(pView->GetModel()->GetItemPool());
pView->GetAttributes(aEditAttr);
SfxItemSet aNewAttr( *aEditAttr.GetPool(), aEditAttr.GetRanges() );
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
switch ( nSlot )
{
@@ -701,7 +701,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
pOutView->Paint( Rectangle() );
SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END );
- pView->SetAttributes( aEmptyAttr, TRUE );
+ pView->SetAttributes( aEmptyAttr, sal_True );
if ( pOutView )
{
@@ -711,7 +711,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
rReq.Done( aEmptyAttr );
pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
- bDone = FALSE; // bereits hier passiert
+ bDone = false; // bereits hier passiert
}
break;
@@ -855,13 +855,13 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
// font items from toolbox controller have to be applied for the right script type
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScript = pView->GetScriptType();
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
- USHORT nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) );
pView->SetAttributes( aSetItem.GetItemSet() );
@@ -884,8 +884,8 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
}
SvtLanguageOptions aLangOpt;
- BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
- BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
+ sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
+ sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
SdrView* pView = pViewData->GetScDrawView();
SfxItemSet aAttrSet(pView->GetModel()->GetItemPool());
@@ -897,10 +897,10 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
// choose font info according to selection script type
- USHORT nScript = pView->GetScriptType();
+ sal_uInt16 nScript = pView->GetScriptType();
// #i55929# input-language-dependent script type (depends on input language if nothing selected)
- USHORT nInputScript = nScript;
+ sal_uInt16 nInputScript = nScript;
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if (pOutView && !pOutView->GetSelection().HasRange())
{
@@ -925,16 +925,16 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
switch( eAdj )
{
case SVX_ADJUST_LEFT:
- rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, sal_True ) );
break;
case SVX_ADJUST_CENTER:
- rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, sal_True ) );
break;
case SVX_ADJUST_RIGHT:
- rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, sal_True ) );
break;
case SVX_ADJUST_BLOCK:
- rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, sal_True ) );
break;
default:
{
@@ -949,19 +949,19 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
// Zeilenabstand
- USHORT nLineSpace = (USHORT)
+ sal_uInt16 nLineSpace = (sal_uInt16)
((const SvxLineSpacingItem&)aAttrSet.
Get( EE_PARA_SBL )).GetPropLineSpace();
switch( nLineSpace )
{
case 100:
- rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, sal_True ) );
break;
case 150:
- rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, sal_True ) );
break;
case 200:
- rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, sal_True ) );
break;
}
@@ -970,13 +970,13 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
- rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) );
else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
- rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, TRUE ) );
+ rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
// Unterstreichung
- SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, TRUE );
+ SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, sal_True );
if ( eState == SFX_ITEM_DONTCARE )
{
rDestSet.InvalidateItem( SID_ULINE_VAL_NONE );
@@ -988,7 +988,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
{
FontUnderline eUnderline = ((const SvxUnderlineItem&)
aAttrSet.Get(EE_CHAR_UNDERLINE)).GetLineStyle();
- USHORT nId = SID_ULINE_VAL_NONE;
+ sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
@@ -997,18 +997,18 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
default:
break;
}
- rDestSet.Put( SfxBoolItem( nId, TRUE ) );
+ rDestSet.Put( SfxBoolItem( nId, sal_True ) );
}
// horizontal / vertical
- BOOL bLeftToRight = TRUE;
+ sal_Bool bLeftToRight = sal_True;
SdrOutliner* pOutl = pView->GetTextEditOutliner();
if( pOutl )
{
if( pOutl->IsVertical() )
- bLeftToRight = FALSE;
+ bLeftToRight = false;
}
else
bLeftToRight = ( (const SvxWritingModeItem&) aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB;
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index e3ab9efcd409..7dfafc870102 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -56,7 +56,7 @@
#include "scabstdlg.hxx"
//------------------------------------------------------------------------
-BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
+sal_Bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
SfxItemSet& rOutSet )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -65,7 +65,7 @@ BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( pViewData->GetDialogParent(), &rArgs,
pViewData->GetSfxDocShell(),RID_SCDLG_CHAR );
DBG_ASSERT(pDlg, "Dialog create fail!");
- BOOL bRet = ( pDlg->Execute() == RET_OK );
+ sal_Bool bRet = ( pDlg->Execute() == RET_OK );
if ( bRet )
{
@@ -78,7 +78,7 @@ BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
return bRet;
}
-BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
+sal_Bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
SfxItemSet& rOutSet )
{
SfxItemPool* pArgPool = rArgs.GetPool();
@@ -96,7 +96,7 @@ BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
// Muss natuerlich noch geaendert werden
// aNewAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) );
- aNewAttr.Put( SvxHyphenZoneItem( sal_False, SID_ATTR_PARA_HYPHENZONE ) );
+ aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) );
aNewAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, SID_ATTR_PARA_PAGEBREAK ) );
aNewAttr.Put( SvxFmtSplitItem( sal_True, SID_ATTR_PARA_SPLIT) );
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
@@ -107,7 +107,7 @@ BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr, RID_SCDLG_PARAGRAPH);
DBG_ASSERT(pDlg, "Dialog create fail!");
- BOOL bRet = ( pDlg->Execute() == RET_OK );
+ sal_Bool bRet = ( pDlg->Execute() == RET_OK );
if ( bRet )
{
@@ -132,7 +132,7 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ )
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
//! test if outliner view is still valid
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index fe38c247518b..d85ac90fa677 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -58,12 +58,12 @@
//------------------------------------------------------------------------
-USHORT ScGetFontWorkId()
+sal_uInt16 ScGetFontWorkId()
{
return SvxFontWorkChildWindow::GetChildWindowId();
}
-BOOL ScDrawTextObjectBar::IsNoteEdit()
+sal_Bool ScDrawTextObjectBar::IsNoteEdit()
{
return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetSdrView()->GetTextEditObject() );
}
@@ -75,7 +75,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
ScTabView* pTabView = pViewData->GetView();
ScDrawView* pView = pTabView->GetScDrawView();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_COPY:
@@ -85,7 +85,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_CUT:
pView->DoCut();
if (!pTabView->IsDrawSelMode())
- pViewData->GetViewShell()->SetDrawShell( FALSE );
+ pViewData->GetViewShell()->SetDrawShell( false );
break;
case SID_PASTE:
@@ -119,11 +119,11 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_ENABLE_HYPHENATION:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, false);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
- BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
}
@@ -140,7 +140,7 @@ void ScDrawTextObjectBar::GetGlobalClipState( SfxItemSet& rSet )
//! move paste etc. to view shell?
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -153,12 +153,12 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
ScTabView* pTabView = pViewData->GetView();
ScDrawView* pView = pTabView->GetScDrawView();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_FONTWORK:
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( rReq.GetArgs() )
@@ -181,7 +181,7 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
EE_PARA_JUST, EE_PARA_JUST,
0 );
- BOOL bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT );
+ sal_Bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT );
aAttr.Put( SvxFrameDirectionItem(
bLeft ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP,
EE_PARA_WRITINGDIR ) );
@@ -212,12 +212,12 @@ void ScDrawTextObjectBar::ExecFormText(SfxRequest& rReq)
pDrView->ScEndTextEdit();
if ( SFX_ITEM_SET ==
- rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem)
+ rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem)
&& XFTFORM_NONE !=
((const XFormTextStdFormItem*) pItem)->GetValue() )
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)
(pViewFrm->
@@ -239,7 +239,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
SvxFontWorkDialog* pDlg = NULL;
ScDrawView* pDrView = pViewData->GetView()->GetScDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if ( pViewFrm->HasChildWindow(nId) )
@@ -252,7 +252,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
if ( pDlg )
- pDlg->SetActive(FALSE);
+ pDlg->SetActive(false);
rSet.DisableItem(XATTR_FORMTXTSTYLE);
rSet.DisableItem(XATTR_FORMTXTADJUST);
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
index 865d1eb5196b..9906919f0f3f 100644
--- a/sc/source/ui/drawfunc/fuconarc.cxx
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -66,19 +66,19 @@ FuConstArc::~FuConstArc()
|*
\************************************************************************/
-BOOL FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown( rMEvt );
+ sal_Bool bReturn = FuConstruct::MouseButtonDown( rMEvt );
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pWindow->CaptureMouse();
pView->BegCreateObj( aPnt );
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -89,7 +89,7 @@ BOOL FuConstArc::MouseButtonDown( const MouseEvent& rMEvt )
|*
\************************************************************************/
-BOOL FuConstArc::MouseMove( const MouseEvent& rMEvt )
+sal_Bool FuConstArc::MouseMove( const MouseEvent& rMEvt )
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -100,17 +100,17 @@ BOOL FuConstArc::MouseMove( const MouseEvent& rMEvt )
|*
\************************************************************************/
-BOOL FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
pView->EndCreateObj( SDRCREATE_NEXTPOINT );
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -119,14 +119,14 @@ BOOL FuConstArc::MouseButtonUp( const MouseEvent& rMEvt )
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstArc::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstArc::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -163,7 +163,7 @@ void FuConstArc::Activate()
break;
}
- pView->SetCurrentObj( sal::static_int_cast<UINT16>( aObjKind ) );
+ pView->SetCurrentObj( sal::static_int_cast<sal_uInt16>( aObjKind ) );
aOldPointer = pWindow->GetPointer();
pViewShell->SetActivePointer( aNewPointer );
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 974c7f0d6ba8..c2704f8c32c6 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -76,12 +76,12 @@ FuConstCustomShape::~FuConstCustomShape()
|*
\************************************************************************/
-BOOL FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -92,14 +92,14 @@ BOOL FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
if ( pObj )
{
SetAttributes( pObj );
- sal_Bool bForceNoFillStyle = sal_False;
+ sal_Bool bForceNoFillStyle = false;
if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() )
bForceNoFillStyle = sal_True;
if ( bForceNoFillStyle )
pObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -110,7 +110,7 @@ BOOL FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstCustomShape::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstCustomShape::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -121,18 +121,18 @@ BOOL FuConstCustomShape::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pView->EndCreateObj(SDRCREATE_FORCEEND);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -141,14 +141,14 @@ BOOL FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstCustomShape::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstCustomShape::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -215,7 +215,7 @@ SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, c
void FuConstCustomShape::SetAttributes( SdrObject* pObj )
{
- sal_Bool bAttributesAppliedFromGallery = sal_False;
+ sal_Bool bAttributesAppliedFromGallery = false;
if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
{
@@ -271,7 +271,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
- pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) );
+ pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &aCustomShape );
}
}
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
index 822780dafd26..46bacf8ef245 100644
--- a/sc/source/ui/drawfunc/fuconpol.cxx
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -74,12 +74,12 @@ FuConstPolygon::~FuConstPolygon()
|*
\************************************************************************/
-BOOL FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
SdrViewEvent aVEvt;
(void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
@@ -87,15 +87,15 @@ BOOL FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
// Texteingabe hier nicht zulassen
aVEvt.eEvent = SDREVENT_BEGDRAGOBJ;
- pView->EnableExtendedMouseEventDispatcher(FALSE);
+ pView->EnableExtendedMouseEventDispatcher(false);
}
else
{
- pView->EnableExtendedMouseEventDispatcher(TRUE);
+ pView->EnableExtendedMouseEventDispatcher(sal_True);
}
if ( pView->MouseButtonDown(rMEvt, pWindow) )
- bReturn = TRUE;
+ bReturn = sal_True;
return bReturn;
}
@@ -106,10 +106,10 @@ BOOL FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
pView->MouseMove(rMEvt, pWindow);
- BOOL bReturn = FuConstruct::MouseMove(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseMove(rMEvt);
return bReturn;
}
@@ -119,13 +119,13 @@ BOOL FuConstPolygon::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
- BOOL bSimple = FALSE;
+ sal_Bool bReturn = false;
+ sal_Bool bSimple = false;
SdrViewEvent aVEvt;
(void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt);
@@ -134,11 +134,11 @@ BOOL FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
if (aVEvt.eEvent == SDREVENT_ENDCREATE)
{
- bReturn = TRUE;
- bSimple = TRUE; // Doppelklick nicht weiterreichen
+ bReturn = sal_True;
+ bSimple = sal_True; // Doppelklick nicht weiterreichen
}
- BOOL bParent;
+ sal_Bool bParent;
if (bSimple)
bParent = FuConstruct::SimpleMouseButtonUp(rMEvt);
else
@@ -151,14 +151,14 @@ BOOL FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -171,7 +171,7 @@ BOOL FuConstPolygon::KeyInput(const KeyEvent& rKEvt)
void FuConstPolygon::Activate()
{
- pView->EnableExtendedMouseEventDispatcher(TRUE);
+ pView->EnableExtendedMouseEventDispatcher(sal_True);
SdrObjKind eKind;
@@ -222,7 +222,7 @@ void FuConstPolygon::Activate()
break;
}
- pView->SetCurrentObj(sal::static_int_cast<UINT16>(eKind));
+ pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(eKind));
pView->SetEditMode(SDREDITMODE_CREATE);
@@ -243,7 +243,7 @@ void FuConstPolygon::Deactivate()
{
pView->SetEditMode(SDREDITMODE_EDIT);
- pView->EnableExtendedMouseEventDispatcher(FALSE);
+ pView->EnableExtendedMouseEventDispatcher(false);
FuConstruct::Deactivate();
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index e9f3e7031db4..d6f623ad8367 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -74,12 +74,12 @@ FuConstRectangle::~FuConstRectangle()
|*
\************************************************************************/
-BOOL FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
@@ -107,7 +107,7 @@ BOOL FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -118,12 +118,12 @@ BOOL FuConstRectangle::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
@@ -143,11 +143,11 @@ BOOL FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
((SdrTextObj*)pObj)->ForceOutlinerParaObject();
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if( pOPO && !pOPO->IsVertical() )
- pOPO->SetVertical( TRUE );
+ pOPO->SetVertical( sal_True );
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -156,14 +156,14 @@ BOOL FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstRectangle::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstRectangle::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -206,7 +206,7 @@ void FuConstRectangle::Activate()
break;
}
- pView->SetCurrentObj(sal::static_int_cast<UINT16>(aObjKind));
+ pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(aObjKind));
aOldPointer = pWindow->GetPointer();
pViewShell->SetActivePointer( aNewPointer );
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index 2784102537ea..f4db6ebfb742 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -70,7 +70,7 @@ FuConstruct::~FuConstruct()
{
}
-BYTE FuConstruct::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuConstruct::Command(const CommandEvent& rCEvt)
{
// special code for non-VCL OS2/UNX removed
@@ -83,18 +83,18 @@ BYTE FuConstruct::Command(const CommandEvent& rCEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
if ( pView->IsAction() )
{
if ( rMEvt.IsRight() )
pView->BckAction();
- return TRUE;
+ return sal_True;
}
aDragTimer.Start();
@@ -110,16 +110,16 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) )
{
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, 1);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pView->AreObjectsMarked() )
{
pView->UnmarkAll();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
- bIsInDragMode = FALSE;
+ bIsInDragMode = false;
return bReturn;
}
@@ -130,7 +130,7 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseMove(const MouseEvent& rMEvt)
{
FuDraw::MouseMove(rMEvt);
@@ -168,7 +168,7 @@ BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
pViewShell->SetActivePointer( aNewPointer );
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -177,16 +177,16 @@ BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = SimpleMouseButtonUp( rMEvt );
+ sal_Bool bReturn = SimpleMouseButtonUp( rMEvt );
// Doppelklick auf Textobjekt? (->fusel)
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( pView->AreObjectsMarked() )
@@ -201,8 +201,8 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) )
{
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- BOOL bVertical = ( pOPO && pOPO->IsVertical() );
- USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
+ sal_Bool bVertical = ( pOPO && pOPO->IsVertical() );
+ sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
pViewShell->GetViewData()->GetDispatcher().
Execute(nTextSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
@@ -215,7 +215,7 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
Point aMousePixel = rMEvt.GetPosPixel();
pText->SetInEditMode( pObj, &aMousePixel );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -228,9 +228,9 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
// SimpleMouseButtonUp - ohne Test auf Doppelklick
-BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
if (aDragTimer.IsActive() )
{
@@ -245,7 +245,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
else if ( pView->IsMarkObj() )
pView->EndMarkObj();
- else bReturn = FALSE;
+ else bReturn = false;
if ( !pView->IsAction() )
{
@@ -253,7 +253,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 )
{
- pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+ pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher();
if ( pView->AreObjectsMarked() )
@@ -270,14 +270,14 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstruct::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -286,7 +286,7 @@ BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
{
pView->BrkAction();
pWindow->ReleaseMouse();
- bReturn = TRUE;
+ bReturn = sal_True;
}
else // Zeichenmodus beenden
{
@@ -297,7 +297,7 @@ BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
case KEY_DELETE:
pView->DeleteMarked();
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index aa7a0b730eed..3bd7175a5bdd 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -44,8 +44,8 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDr
SdrModel* pDoc, SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
{
- SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, FALSE );
- SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, FALSE );
+ SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, false );
+ SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, false );
if( pInventorItem )
nInventor = pInventorItem->GetValue();
if( pIdentifierItem )
@@ -68,19 +68,19 @@ FuConstUnoControl::~FuConstUnoControl()
|*
\************************************************************************/
-BOOL FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !pView->IsAction() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pWindow->CaptureMouse();
pView->BegCreateObj(aPnt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -91,7 +91,7 @@ BOOL FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -102,18 +102,18 @@ BOOL FuConstUnoControl::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
pView->EndCreateObj(SDRCREATE_FORCEEND);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
}
@@ -122,14 +122,14 @@ BOOL FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuConstUnoControl::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstUnoControl::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 456a3bde9432..df8725cbded0 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -91,12 +91,12 @@ void FuDraw::DoModifiers(const MouseEvent& rMEvt)
// Control = Snap (Toggle)
// Alt = zentrisch
- BOOL bShift = rMEvt.IsShift();
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bShift = rMEvt.IsShift();
+ sal_Bool bAlt = rMEvt.IsMod2();
bool bOrtho = bShift;
- BOOL bAngleSnap = bShift;
- BOOL bCenter = bAlt;
+ sal_Bool bAngleSnap = bShift;
+ sal_Bool bCenter = bAlt;
// #i33136#
if(doConstructOrthogonal())
@@ -121,12 +121,12 @@ void FuDraw::ResetModifiers()
ScViewData* pViewData = pViewShell->GetViewData();
const ScViewOptions& rOpt = pViewData->GetOptions();
const ScGridOptions& rGrid = rOpt.GetGridOptions();
- BOOL bGridOpt = rGrid.GetUseGridSnap();
+ sal_Bool bGridOpt = rGrid.GetUseGridSnap();
if (pView->IsOrtho())
- pView->SetOrtho(FALSE);
+ pView->SetOrtho(false);
if (pView->IsAngleSnapEnabled())
- pView->SetAngleSnapEnabled(FALSE);
+ pView->SetAngleSnapEnabled(false);
if (pView->IsGridSnap() != bGridOpt)
pView->SetGridSnap(bGridOpt);
@@ -134,9 +134,9 @@ void FuDraw::ResetModifiers()
pView->SetSnapEnabled(bGridOpt);
if (pView->IsCreate1stPointAsCenter())
- pView->SetCreate1stPointAsCenter(FALSE);
+ pView->SetCreate1stPointAsCenter(false);
if (pView->IsResizeAtCenter())
- pView->SetResizeAtCenter(FALSE);
+ pView->SetResizeAtCenter(false);
}
/*************************************************************************
@@ -145,13 +145,13 @@ void FuDraw::ResetModifiers()
|*
\************************************************************************/
-BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
DoModifiers( rMEvt );
- return FALSE;
+ return false;
}
/*************************************************************************
@@ -160,14 +160,14 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseMove(const MouseEvent& rMEvt)
{
// evaluate modifiers only if in a drawing layer action
// (don't interfere with keyboard shortcut handling)
if (pView->IsAction())
DoModifiers( rMEvt );
- return FALSE;
+ return false;
}
/*************************************************************************
@@ -176,35 +176,35 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
ResetModifiers();
- return FALSE;
+ return false;
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey )
+sal_Bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pObj && pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) )
{
// start text edit - like FuSelection::MouseButtonUp,
// but with bCursorToEnd instead of mouse position
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- BOOL bVertical = ( pOPO && pOPO->IsVertical() );
- USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
+ sal_Bool bVertical = ( pOPO && pOPO->IsVertical() );
+ sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
// don't switch shells if text shell is already active
FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr();
@@ -219,17 +219,17 @@ BOOL lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEven
if ( pPoor && pPoor->GetSlotID() == nTextSlotId ) // no RTTI
{
FuText* pText = (FuText*)pPoor;
- pText->SetInEditMode( pObj, NULL, TRUE, pInitialKey );
+ pText->SetInEditMode( pObj, NULL, sal_True, pInitialKey );
//! set cursor to end of text
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
-BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuDraw::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
ScViewData& rViewData = *pViewShell->GetViewData();
switch ( rKEvt.GetKeyCode().GetCode() )
@@ -239,13 +239,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// in normale Draw-Shell, wenn Objekt selektiert, sonst Zeichnen aus
rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pViewShell->IsDrawSelMode() )
{
pView->UnmarkAll();
rViewData.GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( pView->AreObjectsMarked() )
{
@@ -258,15 +258,15 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
// Beim Bezier-Editieren ist jetzt wieder das Objekt selektiert
if (!pView->AreObjectsMarked())
- pViewShell->SetDrawShell( FALSE );
+ pViewShell->SetDrawShell( false );
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
case KEY_DELETE: //! ueber Accelerator
pView->DeleteMarked();
- bReturn = TRUE;
+ bReturn = sal_True;
break;
case KEY_RETURN:
@@ -278,17 +278,17 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
{
- BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle )
{
pViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -305,7 +305,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -335,7 +335,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
if(pView->AreObjectsMarked())
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
// handle Mod1 and Mod2 to get travelling running on different systems
@@ -358,7 +358,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
}
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -377,13 +377,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// mark last object
pView->UnmarkAllObj();
- pView->MarkNextObj(FALSE);
+ pView->MarkNextObj(false);
// II
if(pView->AreObjectsMarked())
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -402,13 +402,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// mark first object
pView->UnmarkAllObj();
- pView->MarkNextObj(TRUE);
+ pView->MarkNextObj(sal_True);
// II
if(pView->AreObjectsMarked())
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -437,7 +437,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
long nX = 0;
long nY = 0;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
if (nCode == KEY_UP)
{
@@ -464,7 +464,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
nY = 0;
}
- BOOL bReadOnly = rViewData.GetDocShell()->IsReadOnly();
+ sal_Bool bReadOnly = rViewData.GetDocShell()->IsReadOnly();
if(!rKEvt.GetKeyCode().IsMod1() && !bReadOnly)
{
@@ -532,7 +532,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
// II
pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
@@ -551,13 +551,13 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
if(pView->IsDragObj())
{
bool bWasNoSnap = rDragStat.IsNoSnap();
- BOOL bWasSnapEnabled = pView->IsSnapEnabled();
+ sal_Bool bWasSnapEnabled = pView->IsSnapEnabled();
// switch snapping off
if(!bWasNoSnap)
- ((SdrDragStat&)rDragStat).SetNoSnap(TRUE);
+ ((SdrDragStat&)rDragStat).SetNoSnap(sal_True);
if(bWasSnapEnabled)
- pView->SetSnapEnabled(FALSE);
+ pView->SetSnapEnabled(false);
pView->MovAction(aEndPoint);
pView->EndDragObj();
@@ -573,7 +573,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200));
pView->MakeVisible(aVisRect, *pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -640,7 +640,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -664,7 +664,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
// start text edit for suitable object, pass key event to OutlinerView
if ( lcl_KeyEditMode( pObj, pViewShell, &rKEvt ) )
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
@@ -728,7 +728,7 @@ void FuDraw::Deactivate()
|*
\************************************************************************/
-BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
+sal_Bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
{
SdrViewEvent aVEvt;
MouseEvent aMEvt( rPosPixel, 1, 0, MOUSE_LEFT );
@@ -738,13 +738,13 @@ BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow )
{
if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) && ScDrawLayer::GetHitIMapObject(
aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), *pWindow ) )
- return TRUE;
+ return sal_True;
if ( aVEvt.eEvent == SDREVENT_EXECUTEURL )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void FuDraw::ForcePointer(const MouseEvent* pMEvt)
@@ -752,7 +752,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if ( !pView->IsAction() )
{
Point aPosPixel = pWindow->GetPointerPosPixel();
- BOOL bAlt = pMEvt && pMEvt->IsMod2();
+ sal_Bool bAlt = pMEvt && pMEvt->IsMod2();
Point aPnt = pWindow->PixelToLogic( aPosPixel );
SdrHdl* pHdl = pView->PickHandle(aPnt);
SdrObject* pObj;
@@ -804,9 +804,9 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
}
}
-BOOL FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
+sal_Bool FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
{
- BOOL bIsSizingOrMoving = FALSE;
+ sal_Bool bIsSizingOrMoving = false;
if ( rMEvt.IsLeft() )
{
const SdrMarkList& rNoteMarkList = pView->GetMarkedObjectList();
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 2ae18fd3d7e8..33eb9f8882ad 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -61,7 +61,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r
return;
Size aPageSize = rPage;
- BOOL bNegative = aPageSize.Width() < 0;
+ sal_Bool bNegative = aPageSize.Width() < 0;
if ( bNegative )
{
// make everything positive temporarily
@@ -103,7 +103,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r
//------------------------------------------------------------------------
void lcl_InsertGraphic( const Graphic& rGraphic,
- const String& rFileName, const String& rFilterName, BOOL bAsLink, BOOL bApi,
+ const String& rFileName, const String& rFilterName, sal_Bool bAsLink, sal_Bool bApi,
ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView )
{
// set the size so the graphic has its original pixel size
@@ -148,7 +148,7 @@ void lcl_InsertGraphic( const Graphic& rGraphic,
pObj->SetName(aName);
// don't select if from (dispatch) API, to allow subsequent cell operations
- ULONG nInsOptions = bApi ? SDRINSERT_DONTMARK : 0;
+ sal_uLong nInsOptions = bApi ? SDRINSERT_DONTMARK : 0;
pView->InsertObjectAtView( pObj, *pPV, nInsOptions );
// SetGraphicLink has to be used after inserting the object,
@@ -211,23 +211,23 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
const SfxItemSet* pReqArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState( SID_INSERT_GRAPHIC, TRUE, &pItem ) == SFX_ITEM_SET )
+ pReqArgs->GetItemState( SID_INSERT_GRAPHIC, sal_True, &pItem ) == SFX_ITEM_SET )
{
String aFileName = ((const SfxStringItem*)pItem)->GetValue();
String aFilterName;
- if ( pReqArgs->GetItemState( FN_PARAM_FILTER, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_FILTER, sal_True, &pItem ) == SFX_ITEM_SET )
aFilterName = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bAsLink = FALSE;
- if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bAsLink = false;
+ if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
bAsLink = ((const SfxBoolItem*)pItem)->GetValue();
Graphic aGraphic;
int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, GraphicFilter::GetGraphicFilter() );
if ( nError == GRFILTER_OK )
{
- lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, TRUE, pViewSh, pWindow, pView );
+ lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_True, pViewSh, pWindow, pView );
}
}
else
@@ -242,17 +242,17 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
{
String aFileName = aDlg.GetPath();
String aFilterName = aDlg.GetCurrentFilter();
- BOOL bAsLink = aDlg.IsAsLink();
+ sal_Bool bAsLink = aDlg.IsAsLink();
// really store as link only?
if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
{
SvxLinkWarningDialog aWarnDlg(pWin,aFileName);
if( aWarnDlg.Execute() != RET_OK )
- bAsLink = sal_False; // don't store as link
+ bAsLink = false; // don't store as link
}
- lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, FALSE, pViewSh, pWindow, pView );
+ lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, false, pViewSh, pWindow, pView );
// append items for recording
rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) );
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 0efb433c071c..3efae6b07752 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -55,7 +55,8 @@
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdundo.hxx>
-
+#include <sfx2/msgpool.hxx>
+#include <scmod.hxx>
// BM/IHA --
#include <cppuhelper/component_context.hxx>
@@ -98,7 +99,7 @@ extern SdrObject* pSkipPaintObj; // output.cxx - dieses Objekt nicht
//------------------------------------------------------------------------
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScViewData* pViewData,
const rtl::OUString& rRangeParam )
@@ -118,7 +119,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
ScMarkData& rMark = pViewData->GetMarkData();
if ( !rMark.IsMarked() )
- pViewData->GetView()->MarkDataArea( TRUE );
+ pViewData->GetView()->MarkDataArea( sal_True );
if ( pViewData->GetSimpleArea( nCol1,nRow1,nTab1, nCol2,nRow2,nTab2 ) == SC_MARK_SIMPLE )
{
@@ -228,7 +229,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
uno::Reference < embed::XEmbeddedObject > xObj;
uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
- BOOL bIsFromFile = FALSE;
+ sal_Bool bIsFromFile = false;
::rtl::OUString aName;
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
@@ -236,8 +237,8 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
uno::Reference< io::XInputStream > xIconMetaFile;
- USHORT nSlot = rReq.GetSlot();
- SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False );
+ sal_uInt16 nSlot = rReq.GetSlot();
+ SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, false );
if ( nSlot == SID_INSERT_OBJECT && pNameItem )
{
SvGlobalName aClassName = pNameItem->GetValue();
@@ -262,12 +263,11 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
aServerLst.Remove( ScDocShell::Factory().GetClassId() ); // Starcalc nicht anzeigen
//TODO/LATER: currently no inserting of ClassId into SfxRequest!
case SID_INSERT_PLUGIN :
- case SID_INSERT_APPLET :
case SID_INSERT_FLOATINGFRAME :
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractInsertObjectDialog* pDlg =
- pFact->CreateInsertObjectDialog( pViewShell->GetWindow(), nSlot,
+ pFact->CreateInsertObjectDialog( pViewShell->GetWindow(), SC_MOD()->GetSlotPool()->GetSlot(nSlot)->GetCommandString(),
xStorage, &aServerLst );
if ( pDlg )
{
@@ -428,7 +428,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie
if (bIsFromFile)
{
// Objekt ist selektiert, also Draw-Shell aktivieren
- pViewShell->SetDrawShell( TRUE );
+ pViewShell->SetDrawShell( true );
}
else
{
@@ -517,7 +517,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
bool bAutomaticMark = false;
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
{
- pViewSh->GetViewData()->GetView()->MarkDataArea( TRUE );
+ pViewSh->GetViewData()->GetView()->MarkDataArea( sal_True );
bAutomaticMark = true;
}
@@ -525,7 +525,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
aMultiMark.MarkToMulti();
ScRangeList aRanges;
- aMultiMark.FillRangeListWithMarks( &aRanges, FALSE );
+ aMultiMark.FillRangeListWithMarks( &aRanges, false );
String aStr;
ScDocument* pDocument = pViewSh->GetViewData()->GetDocument();
aRanges.Format( aStr, SCR_ABS_3D, pDocument, pDocument->GetAddressConvention() );
@@ -568,7 +568,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
ScRangeListRef aDummy;
Rectangle aMarkDest;
SCTAB nMarkTab;
- BOOL bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab );
+ sal_Bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab );
// Objekt-Groesse
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
@@ -576,17 +576,17 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
- BOOL bSizeCh = FALSE;
+ sal_Bool bSizeCh = false;
if (bDrawRect && !aMarkDest.IsEmpty())
{
aSize = aMarkDest.GetSize();
- bSizeCh = TRUE;
+ bSizeCh = sal_True;
}
if (aSize.Height() <= 0 || aSize.Width() <= 0)
{
aSize.Width() = 5000;
aSize.Height() = 5000;
- bSizeCh = TRUE;
+ bSizeCh = sal_True;
}
if (bSizeCh)
{
@@ -599,12 +599,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
ScViewData* pData = pViewSh->GetViewData();
ScDocShell* pScDocSh = pData->GetDocShell();
ScDocument* pScDoc = pScDocSh->GetDocument();
- BOOL bUndo (pScDoc->IsUndoEnabled());
+ sal_Bool bUndo (pScDoc->IsUndoEnabled());
if( pReqArgs )
{
const SfxPoolItem* pItem;
- UINT16 nToTable = 0;
+ sal_uInt16 nToTable = 0;
if( IS_AVAILABLE( FN_PARAM_4, &pItem ) )
{
@@ -616,15 +616,15 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
// -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle
if ( ((const SfxBoolItem*)pItem)->GetValue() )
- nToTable = static_cast<UINT16>(pScDoc->GetTableCount());
+ nToTable = static_cast<sal_uInt16>(pScDoc->GetTableCount());
else
- nToTable = static_cast<UINT16>(pData->GetTabNo());
+ nToTable = static_cast<sal_uInt16>(pData->GetTabNo());
}
}
else
{
if (bDrawRect)
- nToTable = static_cast<UINT16>(nMarkTab);
+ nToTable = static_cast<sal_uInt16>(nMarkTab);
rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) );
}
@@ -639,7 +639,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
if ( pScDoc->InsertTab( nNewTab, aTabName ) )
{
- BOOL bAppend = TRUE;
+ sal_Bool bAppend = sal_True;
if (bUndo)
{
@@ -649,7 +649,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
}
pScDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ) );
- pViewSh->SetTabNo( nNewTab, TRUE );
+ pViewSh->SetTabNo( nNewTab, sal_True );
pScDocSh->PostPaintExtras(); //! erst hinterher ???
}
else
@@ -659,7 +659,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
}
else if ( nToTable != pData->GetTabNo() )
{
- pViewSh->SetTabNo( nToTable, TRUE );
+ pViewSh->SetTabNo( nToTable, sal_True );
}
}
@@ -790,7 +790,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
bAddUndo = false; // don't create the undo action for inserting
// leave the draw shell
- pViewShell->SetDrawShell( FALSE );
+ pViewShell->SetDrawShell( false );
}
else
{
diff --git a/sc/source/ui/drawfunc/fumark.cxx b/sc/source/ui/drawfunc/fumark.cxx
index 199331bd6e48..b46e43d93125 100644
--- a/sc/source/ui/drawfunc/fumark.cxx
+++ b/sc/source/ui/drawfunc/fumark.cxx
@@ -52,8 +52,8 @@
FuMarkRect::FuMarkRect(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq) :
FuPoor(pViewSh, pWin, pViewP, pDoc, rReq),
- bVisible(FALSE),
- bStartDrag(FALSE)
+ bVisible(false),
+ bStartDrag(false)
{
}
@@ -73,18 +73,18 @@ FuMarkRect::~FuMarkRect()
|*
\************************************************************************/
-BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
pWindow->CaptureMouse();
pView->UnmarkAll(); // der Einheitlichkeit halber und wegen #50558#
- bStartDrag = TRUE;
+ bStartDrag = sal_True;
aBeginPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
aZoomRect = Rectangle( aBeginPos, Size() );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -93,7 +93,7 @@ BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuMarkRect::MouseMove(const MouseEvent& rMEvt)
{
if ( bStartDrag )
{
@@ -107,7 +107,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
aZoomRect = aRect;
aZoomRect.Justify();
pViewShell->DrawMarkRect(aZoomRect);
- bVisible = TRUE;
+ bVisible = sal_True;
}
ForcePointer(&rMEvt);
@@ -121,7 +121,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
@@ -130,12 +130,12 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
{
// Hide ZoomRect
pViewShell->DrawMarkRect(aZoomRect);
- bVisible = FALSE;
+ bVisible = false;
}
Size aZoomSizePixel = pWindow->LogicToPixel(aZoomRect).GetSize();
- USHORT nMinMove = pView->GetMinMoveDistancePixel();
+ sal_uInt16 nMinMove = pView->GetMinMoveDistancePixel();
if ( aZoomSizePixel.Width() < nMinMove || aZoomSizePixel.Height() < nMinMove )
{
// Klick auf der Stelle
@@ -143,7 +143,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
aZoomRect.SetSize(Size()); // dann ganz leer
}
- bStartDrag = FALSE;
+ bStartDrag = false;
pWindow->ReleaseMouse();
pViewShell->GetViewData()->GetDispatcher().
@@ -155,11 +155,11 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
// Chart-Dialog starten:
-// USHORT nId = ScChartDlgWrapper::GetChildWindowId();
+// sal_uInt16 nId = ScChartDlgWrapper::GetChildWindowId();
// SfxChildWindow* pWnd = pViewShell->GetViewFrame()->GetChildWindow( nId );
-// SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+// SC_MOD()->SetRefDialog( nId, pWnd ? sal_False : sal_True );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -168,7 +168,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BYTE FuMarkRect::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuMarkRect::Command(const CommandEvent& rCEvt)
{
if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
{
@@ -184,14 +184,14 @@ BYTE FuMarkRect::Command(const CommandEvent& rCEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuMarkRect::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -199,7 +199,7 @@ BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt)
// beenden
pViewShell->GetViewData()->GetDispatcher().
Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
@@ -247,7 +247,7 @@ void FuMarkRect::Activate()
ScMarkData& rMark = pViewData->GetMarkData();
if ( !rMark.IsMultiMarked() && !rMark.IsMarked() )
- pViewShell->MarkDataArea( TRUE );
+ pViewShell->MarkDataArea( sal_True );
pViewData->GetMultiArea( aSourceRange ); // Mehrfachselektion erlaubt
@@ -270,8 +270,8 @@ void FuMarkRect::Deactivate()
{
// Hide ZoomRect
pViewShell->DrawMarkRect(aZoomRect);
- bVisible = FALSE;
- bStartDrag = FALSE;
+ bVisible = false;
+ bStartDrag = false;
}
}
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 232a619589e2..014a10e19405 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -56,7 +56,7 @@ FuPoor::FuPoor(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
pDrDoc(pDoc),
aSfxRequest(rReq),
pDialog(NULL),
- bIsInDragMode(FALSE),
+ bIsInDragMode(false),
// remember MouseButton state
mnCode(0)
{
@@ -179,21 +179,21 @@ IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, EMPTYARG )
IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
// moved from inline to *.cxx
-BOOL FuPoor::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuPoor::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- return FALSE;
+ return false;
}
// moved from inline to *.cxx
-BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- return FALSE;
+ return false;
}
/*************************************************************************
@@ -208,25 +208,25 @@ BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuPoor::KeyInput(const KeyEvent& /* rKEvt */)
+sal_Bool FuPoor::KeyInput(const KeyEvent& /* rKEvt */)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
return(bReturn);
}
-BYTE FuPoor::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuPoor::Command(const CommandEvent& rCEvt)
{
if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
{
//!!! sollte Joe eigentlich machen:
// nur, wenn im Outliner was selektiert ist, darf
- // Command TRUE zurueckliefern:
+ // Command sal_True zurueckliefern:
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
@@ -307,7 +307,7 @@ IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG )
if ( pHdl==NULL && pView->IsMarkedHit(aMDPos) )
{
pWindow->ReleaseMouse();
- bIsInDragMode = TRUE;
+ bIsInDragMode = sal_True;
// pView->BeginDrag(pWindow, aMDPos);
pViewShell->GetScDrawView()->BeginDrag(pWindow, aMDPos);
@@ -317,24 +317,24 @@ IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG )
// Detektiv-Linie
-BOOL FuPoor::IsDetectiveHit( const Point& rLogicPos )
+sal_Bool FuPoor::IsDetectiveHit( const Point& rLogicPos )
{
SdrPageView* pPV = pView->GetSdrPageView();
if (!pPV)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
{
- USHORT nHitLog = (USHORT) pWindow->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
Size(pView->GetHitTolerancePixel(),0)).Width();
if(SdrObjectPrimitiveHit(*pObject, rLogicPos, nHitLog, *pPV, 0, false))
{
- bFound = TRUE;
+ bFound = sal_True;
}
}
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index d7e95b311fd6..ceca9c45bd9d 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -57,6 +57,9 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
+#include "charthelper.hxx"
+#include "docuno.hxx"
+#include "docsh.hxx"
// -----------------------------------------------------------------------
@@ -81,7 +84,7 @@ using namespace com::sun::star;
FuSelection::FuSelection(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq ) :
FuDraw(pViewSh, pWin, pViewP, pDoc, rReq),
- bVCAction(FALSE)
+ bVCAction(false)
{
}
@@ -95,7 +98,7 @@ FuSelection::~FuSelection()
{
}
-BYTE FuSelection::Command(const CommandEvent& rCEvt)
+sal_uInt8 FuSelection::Command(const CommandEvent& rCEvt)
{
// special code for non-VCL OS2/UNX removed
@@ -108,7 +111,7 @@ BYTE FuSelection::Command(const CommandEvent& rCEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
@@ -117,13 +120,13 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
if ( bSelectionOnly )
pView->BckAction();
- return TRUE;
+ return sal_True;
}
- bVCAction = FALSE;
- bIsInDragMode = FALSE; // irgendwo muss es ja zurueckgesetzt werden (#50033#)
+ bVCAction = false;
+ bIsInDragMode = false; // irgendwo muss es ja zurueckgesetzt werden (#50033#)
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
@@ -163,16 +166,16 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
aDragTimer.Start();
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
{
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) )
{
pView->BegMacroObj(aMDPos, pObj, pPV, pWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -202,7 +205,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pObj = pHit;
}
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
// For interoperability favour links over macros if both are defined
if ( pInfo->GetHlink().getLength() > 0 )
{
@@ -232,7 +235,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pObjSh->CallXScript( pInfo->GetMacro(),
*pInArgs, aRet, aOutArgsIndex, aOutArgs, true, &aCaller );
pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
- return TRUE; // kein CaptureMouse etc.
+ return sal_True; // kein CaptureMouse etc.
}
}
}
@@ -266,13 +269,13 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
ScGlobal::OpenURL( sURL, sTarget );
pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
- return TRUE; // kein CaptureMouse etc.
+ return sal_True; // kein CaptureMouse etc.
}
// Is another object being edited in this view?
// (Editing is ended in MarkListHasChanged - test before UnmarkAll)
SfxInPlaceClient* pClient = pViewShell->GetIPClient();
- BOOL bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
// Markieren
@@ -287,7 +290,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pView->UnlockInternalLayer();
// try to select the clicked object
- if ( pView->MarkObj( aMDPos, -2, FALSE, rMEvt.IsMod1() ) )
+ if ( pView->MarkObj( aMDPos, -2, false, rMEvt.IsMod1() ) )
{
//*********************************************************
//Objekt verschieben
@@ -303,11 +306,11 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
pHdl=pView->PickHandle(aMDPos);
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else // Objekt am Rand getroffen
if (pViewShell->IsDrawSelMode())
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -319,7 +322,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
//Objekt selektieren
//********************************************************
pView->BegMarkObj(aMDPos);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -343,9 +346,9 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuDraw::MouseMove(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive() )
{
@@ -363,14 +366,14 @@ BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
ForceScroll(aPix);
pView->MovAction(aPnt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
// Ein VCControl ist aktiv
// Event an den Manager weiterleiten
if( bVCAction )
{
- bReturn = TRUE;
+ bReturn = true;
}
ForcePointer(&rMEvt);
@@ -384,13 +387,13 @@ BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FuDraw::MouseButtonUp(rMEvt);
- BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt);
+ sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
if (aDragTimer.IsActive() )
{
@@ -399,6 +402,14 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ bool bCopy = false;
+ ScViewData* pViewData = ( pViewShell ? pViewShell->GetViewData() : NULL );
+ ScDocument* pDocument = ( pViewData ? pViewData->GetDocument() : NULL );
+ SdrPageView* pPageView = ( pView ? pView->GetSdrPageView() : NULL );
+ SdrPage* pPage = ( pPageView ? pPageView->GetPage() : NULL );
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ ScRangeListVector aProtectedChartRangesVector;
+
if ( rMEvt.IsLeft() )
{
if ( pView->IsDragObj() )
@@ -406,6 +417,29 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/******************************************************************
* Objekt wurde verschoben
******************************************************************/
+ if ( rMEvt.IsMod1() )
+ {
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+ if ( pView && pDocument )
+ {
+ const SdrMarkList& rSdrMarkList = pView->GetMarkedObjectList();
+ sal_uLong nMarkCount = rSdrMarkList.GetMarkCount();
+ for ( sal_uLong i = 0; i < nMarkCount; ++i )
+ {
+ SdrMark* pMark = rSdrMarkList.GetMark( i );
+ SdrObject* pObj = ( pMark ? pMark->GetMarkedSdrObj() : NULL );
+ if ( pObj )
+ {
+ ScChartHelper::AddRangesIfProtectedChart( aProtectedChartRangesVector, pDocument, pObj );
+ }
+ }
+ }
+ bCopy = true;
+ }
+
pView->EndDragObj( rMEvt.IsMod1() );
pView->ForceMarkedToAnotherPage();
@@ -418,7 +452,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
FuText* pText = static_cast<FuText*>(pPoor);
pText->StopDragMode(pObj );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if (pView->IsAction() )
{
@@ -427,16 +461,16 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pView->EndAction();
if ( pView->AreObjectsMarked() )
{
- bReturn = TRUE;
+ bReturn = sal_True;
/* if multi-selection contains a note caption object, remove
all other objects from selection. */
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
+ sal_uLong nCount = rMarkList.GetMarkCount();
if( nCount > 1 )
{
bool bFound = false;
- for( ULONG nIdx = 0; !bFound && (nIdx < nCount); ++nIdx )
+ for( sal_uLong nIdx = 0; !bFound && (nIdx < nCount); ++nIdx )
{
SdrObject* pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj();
bFound = ScDrawLayer::IsNoteCaption( pObj );
@@ -465,7 +499,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pIPClient->DeactivateObject();
}
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks == 2 && rMEvt.IsLeft() )
{
if ( pView->AreObjectsMarked() )
@@ -483,7 +517,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt );
if ( eHit != SDRHIT_NONE && aVEvt.pObj == pObj )
{
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
//
// OLE: aktivieren
@@ -508,8 +542,8 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
else if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) && !pObj->ISA(SdrMediaObj) )
{
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- BOOL bVertical = ( pOPO && pOPO->IsVertical() );
- USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
+ sal_Bool bVertical = ( pOPO && pOPO->IsVertical() );
+ sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT;
pViewShell->GetViewData()->GetDispatcher().
Execute(nTextSlotId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
@@ -522,21 +556,21 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Point aMousePixel = rMEvt.GetPosPixel();
pText->SetInEditMode( pObj, &aMousePixel );
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
}
else if ( TestDetective( pView->GetSdrPageView(), aPnt ) )
- bReturn = TRUE;
+ bReturn = sal_True;
}
// Ein VCControl ist aktiv
// Event an den Manager weiterleiten
if( bVCAction )
{
- bVCAction = FALSE;
- bReturn = TRUE;
+ bVCAction = false;
+ bReturn = true;
}
ForcePointer(&rMEvt);
@@ -550,6 +584,18 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
pViewShell->GetViewData()->GetDispatcher().
Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
+ if ( bCopy && pViewData && pDocument && pPage )
+ {
+ ScDocShell* pDocShell = pViewData->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ if ( pModelObj )
+ {
+ SCTAB nTab = pViewData->GetTabNo();
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab,
+ aProtectedChartRangesVector, aExcludedChartNames );
+ }
+ }
+
return (bReturn);
}
@@ -557,14 +603,14 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuSelection::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if (!bReturn)
{
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
index 8e884ee45a61..4978b3c7c709 100644
--- a/sc/source/ui/drawfunc/fusel2.cxx
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -64,19 +64,19 @@ inline long Diff( const Point& rP1, const Point& rP2 )
return nX+nY;
}
-BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
+sal_Bool FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
{
if (!pPV)
- return FALSE;
+ return false;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
{
- USHORT nHitLog = (USHORT) pWindow->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
Size(pView->GetHitTolerancePixel(),0)).Width();
if (SdrObjectPrimitiveHit(*pObject, rPos, nHitLog, *pPV, 0, false))
{
@@ -94,11 +94,11 @@ BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow );
SCsCOL nCurX = (SCsCOL) pViewData->GetCurX();
SCsROW nCurY = (SCsROW) pViewData->GetCurY();
- BOOL bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) );
+ sal_Bool bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) );
if ( nCurX == nStartCol && nCurY == nStartRow )
- bStart = FALSE;
+ bStart = false;
else if ( nCurX == nEndCol && nCurY == nEndRow )
- bStart = TRUE;
+ bStart = sal_True;
SCsCOL nDifX;
SCsROW nDifY;
@@ -112,9 +112,9 @@ BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
nDifX = nEndCol - nCurX;
nDifY = nEndRow - nCurY;
}
- pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, FALSE );
+ pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, false );
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -149,7 +149,7 @@ bool FuSelection::IsNoteCaptionClicked( const Point& rPos ) const
bool bProtectDoc = rDoc.IsTabProtected( nTab ) || (pDocSh && pDocSh->IsReadOnly());
// search the last object (on top) in the object list
- SdrObjListIter aIter( *pPageView->GetObjList(), IM_DEEPNOGROUPS, TRUE );
+ SdrObjListIter aIter( *pPageView->GetObjList(), IM_DEEPNOGROUPS, sal_True );
for( SdrObject* pObj = aIter.Next(); pObj; pObj = aIter.Next() )
{
if( pObj->GetLogicRect().IsInside( rPos ) )
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 5d5f9befd329..7e926e0b1ae4 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -132,13 +132,13 @@ FuText::~FuText()
|*
\************************************************************************/
-BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
if ( pView->MouseButtonDown(rMEvt, pWindow) )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
if ( pView->IsTextEdit() )
{
@@ -153,13 +153,13 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
SdrHdl* pHdl = pView->PickHandle(aMDPos);
- ULONG nHdlNum = pView->GetHdlNum(pHdl);
+ sal_uLong nHdlNum = pView->GetHdlNum(pHdl);
if (pHdl != NULL)
{
if (pView->HasMarkablePoints() && pView->IsPointMarkable(*pHdl))
{
- BOOL bPointMarked=pView->IsPointMarked(*pHdl);
+ sal_Bool bPointMarked=pView->IsPointMarked(*pHdl);
if ( rMEvt.IsShift() )
{
@@ -199,8 +199,8 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
// vertical flag:
// deduced from slot ids only if text object has no content
- USHORT nSlotID = aSfxRequest.GetSlot();
- BOOL bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
+ sal_uInt16 nSlotID = aSfxRequest.GetSlot();
+ sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if ( pOPO )
bVertical = pOPO->IsVertical(); // content wins
@@ -214,7 +214,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
OutlinerView* pOLV = pView->GetTextEditOutlinerView();
if ( pOLV->MouseButtonDown(rMEvt) )
- return (TRUE); // Event an den Outliner
+ return (sal_True); // Event an den Outliner
}
}
else
@@ -245,7 +245,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- BOOL bMacro = FALSE;
+ sal_Bool bMacro = false;
// if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV))
if (bMacro && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) )
@@ -257,7 +257,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
if (pView->IsEditMode())
{
- BOOL bPointMode=pView->HasMarkablePoints();
+ sal_Bool bPointMode=pView->HasMarkablePoints();
if (!rMEvt.IsShift())
{
@@ -277,7 +277,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
pHdl=pView->GetHdl(nHdlNum);
}
- if ( pView->MarkObj(aMDPos, -2, FALSE, rMEvt.IsMod1()) )
+ if ( pView->MarkObj(aMDPos, -2, false, rMEvt.IsMod1()) )
{
aDragTimer.Start();
@@ -334,7 +334,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow ));
// return (bReturn);
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -343,9 +343,9 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuText::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
// pViewShell->SetActivePointer(aNewPointer);
@@ -362,7 +362,7 @@ BOOL FuText::MouseMove(const MouseEvent& rMEvt)
}
if ( pView->MouseMove(rMEvt, pWindow) )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
if ( pView->IsAction() )
{
@@ -382,12 +382,12 @@ BOOL FuText::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if (aDragTimer.IsActive() )
{
@@ -399,7 +399,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
if ( pView->MouseButtonUp(rMEvt, pWindow) )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
if ( pView->IsDragObj() )
{
@@ -433,20 +433,20 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aItemSet( pDrDoc->GetItemPool(),
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( false ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( false ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aItemSet.Put( SdrTextAniCountItem( 1 ) );
aItemSet.Put( SdrTextAniAmountItem(
- (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) );
+ (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aItemSet);
}
}
// init object different when vertical writing
sal_uInt16 nSlotID(aSfxRequest.GetSlot());
- BOOL bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID);
+ sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID);
if(bVertical)
{
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -458,10 +458,10 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
SdrTextObj* pText = (SdrTextObj*)pObj;
SfxItemSet aSet(pDrDoc->GetItemPool());
- pText->SetVerticalWriting(TRUE);
+ pText->SetVerticalWriting(sal_True);
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(false));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -477,7 +477,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
if ( !pView->AreObjectsMarked() )
{
- pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+ pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher();
if ( pView->AreObjectsMarked() )
@@ -497,7 +497,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 )
{
- pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1());
+ pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher();
if ( pView->AreObjectsMarked() )
@@ -527,18 +527,18 @@ void FuText::ForcePointer(const MouseEvent* /* pMEvt */)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* FALSE.
|*
\************************************************************************/
-BOOL FuText::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuText::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( pView->KeyInput(rKEvt, pWindow) )
{
- bReturn = TRUE;
+ bReturn = sal_True;
lcl_InvalidateAttribs( pViewShell->GetViewFrame()->GetBindings() );
}
else
@@ -572,7 +572,7 @@ void FuText::Activate()
/**********************************************************************
* Kein Textobjekt im EditMode, daher CreateMode setzen
**********************************************************************/
- USHORT nObj = OBJ_TEXT;
+ sal_uInt16 nObj = OBJ_TEXT;
pView->SetCurrentObj(nObj);
@@ -626,7 +626,7 @@ void FuText::SelectionHasChanged()
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_TEXT ||
nSdrObjKind == OBJ_TITLETEXT ||
@@ -643,9 +643,9 @@ void FuText::SelectionHasChanged()
/**********************************************************************
* Kein Textobjekt im EditMode, daher CreateMode setzen
**********************************************************************/
- USHORT nObj = OBJ_TEXT;
- UINT16 nIdent;
- UINT32 nInvent;
+ sal_uInt16 nObj = OBJ_TEXT;
+ sal_uInt16 nIdent;
+ sal_uInt32 nInvent;
pView->TakeCurrentObj(nIdent, nInvent);
pView->SetCurrentObj(nObj);
@@ -661,7 +661,7 @@ void FuText::SelectionHasChanged()
\************************************************************************/
void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
- BOOL bCursorToEnd, const KeyEvent* pInitialKey)
+ sal_Bool bCursorToEnd, const KeyEvent* pInitialKey)
{
/* It is possible to pass a special (unselected) object in pObj, e.g. the
caption object of a cell note. If pObj is 0, then the selected object
@@ -683,7 +683,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
if ( pObj )
{
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_TEXT ||
nSdrObjKind == OBJ_TITLETEXT ||
@@ -700,8 +700,8 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
// vertical flag:
// deduced from slot ids only if text object has no content
- USHORT nSlotID = aSfxRequest.GetSlot();
- BOOL bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
+ sal_uInt16 nSlotID = aSfxRequest.GetSlot();
+ sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if ( pOPO )
bVertical = pOPO->IsVertical(); // content wins
@@ -777,8 +777,8 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
{
SfxItemSet aSet(pDrDoc->GetItemPool());
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(false));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -789,12 +789,12 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
{
SfxItemSet aSet(pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( false ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( false ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
- aSet.Put( SdrTextAniAmountItem( (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) );
+ aSet.Put( SdrTextAniAmountItem( (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aSet);
}
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index c1a4e2ce6f22..e43c1ce44344 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -60,10 +60,6 @@
#define _COLDLG_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 09a4240c0678..096a7b602744 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -59,10 +59,10 @@
// Editieren von Notiz-Legendenobjekten muss immer ueber StopEditMode beendet werden,
// damit die Aenderungen ins Dokument uebernommen werden!
// (Fontwork-Execute in drawsh und drtxtob passiert nicht fuer Legendenobjekte)
-// bTextDirection=TRUE means that this function is called from SID_TEXTDIRECTION_XXX(drtxtob.cxx).
+// bTextDirection=sal_True means that this function is called from SID_TEXTDIRECTION_XXX(drtxtob.cxx).
// ------------------------------------------------------------------------------------
-void FuText::StopEditMode(BOOL /*bTextDirection*/)
+void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
{
SdrObject* pObject = pView->GetTextEditObject();
if( !pObject ) return;
@@ -86,7 +86,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
}
ScDocShell* pDocShell = rViewData.GetDocShell();
- SfxUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
bool bNewNote = false;
if( pNote && pUndoMgr )
{
@@ -188,7 +188,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
// invalidate stream positions only for the affected sheet
rDoc.LockStreamValid(false);
if (rDoc.IsStreamValid(aNotePos.Tab()))
- rDoc.SetStreamValid(aNotePos.Tab(), FALSE);
+ rDoc.SetStreamValid(aNotePos.Tab(), false);
}
}
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 101ce8578f05..4d950a69c783 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -96,14 +96,14 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet )
{
ScDrawView* pView = GetViewData()->GetScDrawView();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = false;
if( rMarkList.GetMarkCount() == 1 )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj && pObj->ISA( SdrGrafObj ) && ( ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) )
- bEnable = TRUE;
+ bEnable = sal_True;
}
if( !bEnable )
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index 542573e39fa9..6fcdedf3b7fd 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -75,7 +75,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
if( pView )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -118,7 +118,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) )
pItem = NULL;
if( pItem )
diff --git a/sc/source/ui/drawfunc/objdraw.src b/sc/source/ui/drawfunc/objdraw.src
index c7749d7adf27..586aaf822e92 100644
--- a/sc/source/ui/drawfunc/objdraw.src
+++ b/sc/source/ui/drawfunc/objdraw.src
@@ -35,7 +35,7 @@
MenuItem\
{\
Identifier = SID_TEXT_STANDARD ; \
- HelpID = SID_TEXT_STANDARD ; \
+ HelpID = CMD_SID_TEXT_STANDARD ; \
Text [ en-US ] = "~Default" ; \
Text [ x-comment ] = " ";\
};
@@ -46,7 +46,7 @@
MenuItem\
{\
Identifier = RID_MN_FORMAT_STYLE ; \
- HelpID = RID_MN_FORMAT_STYLE ; \
+ HelpID = HID_MN_FORMAT_STYLE ; \
Text [ en-US ] = "~Style" ; \
SubMenu = Menu\
{\
@@ -87,14 +87,14 @@
MenuItem\
{\
Identifier = SID_SET_SUPER_SCRIPT ; \
- HelpID = SID_SET_SUPER_SCRIPT ; \
+ HelpID = CMD_SID_SET_SUPER_SCRIPT ; \
Text [ en-US ] = "~Superscript" ; \
Text [ x-comment ] = " ";\
};\
MenuItem\
{\
Identifier = SID_SET_SUB_SCRIPT ; \
- HelpID = SID_SET_SUB_SCRIPT ; \
+ HelpID = CMD_SID_SET_SUB_SCRIPT ; \
Text [ en-US ] = "S~ubscript" ; \
Text [ x-comment ] = " ";\
};\
@@ -105,7 +105,7 @@
MenuItem\
{\
Identifier = RID_MN_FORMAT_ALGN ; \
- HelpID = RID_MN_FORMAT_ALGN ; \
+ HelpID = HID_MN_FORMAT_ALGN ; \
Text [ en-US ] = "~Alignment" ; \
RadioCheck = TRUE ; \
SubMenu = Menu\
@@ -115,7 +115,7 @@
MenuItem\
{\
Identifier = SID_ALIGNLEFT ; \
- HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_LEFT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Left" ;\
Text [ x-comment ] = " "; \
@@ -123,21 +123,21 @@
MenuItem\
{\
Identifier = SID_ALIGNRIGHT ; \
- HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_RIGHT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Right" ;\
};\
MenuItem\
{\
Identifier = SID_ALIGNCENTERHOR ; \
- HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_CENTER ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Centered" ;\
};\
MenuItem\
{\
Identifier = SID_ALIGNBLOCK ; \
- HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ HelpID = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Justified" ; \
Text [ x-comment ] = " ";\
@@ -149,7 +149,7 @@
MenuItem\
{\
Identifier = RID_MN_FORMAT_LINESPACE ; \
- HelpID = RID_MN_FORMAT_LINESPACE ; \
+ HelpID = HID_MN_FORMAT_LINESPACE ; \
Text [ en-US ] = "~Line Spacing" ; \
_MenuItemFlags = MIB_RADIOCHECK ; \
SubMenu = Menu\
@@ -190,7 +190,7 @@
MenuItem\
{\
Identifier = SID_DRAW_HLINK_EDIT ; \
- HelpID = SID_DRAW_HLINK_EDIT ; \
+ HelpID = CMD_SID_DRAW_HLINK_EDIT ; \
Text [ en-US ] = "~Hyperlink..." ; \
};
@@ -198,7 +198,7 @@
MenuItem\
{\
Identifier = SID_DRAW_HLINK_DELETE ; \
- HelpID = SID_DRAW_HLINK_DELETE ; \
+ HelpID = CMD_SID_DRAW_HLINK_DELETE ; \
Text [ en-US ] = "~Remove Hyperlink" ; \
};
@@ -206,7 +206,7 @@
MenuItem\
{\
Identifier = SID_DRAWTEXT_ATTR_DLG ; \
- HelpID = SID_DRAWTEXT_ATTR_DLG ; \
+ HelpID = CMD_SID_DRAWTEXT_ATTR_DLG ; \
Text [ en-US ] = "Te~xt..." ; \
Text [ x-comment ] = " ";\
};
@@ -215,7 +215,7 @@
MenuItem\
{\
Identifier = SID_ASSIGNMACRO ; \
- HelpID = SID_ASSIGNMACRO ; \
+ HelpID = CMD_SID_ASSIGNMACRO ; \
Text [ en-US ] = "Assig~n Macro..." ; \
Text [ x-comment ] = " ";\
};
@@ -233,7 +233,7 @@
MenuItem\
{\
Identifier = SID_RENAME_OBJECT ; \
- HelpId = SID_RENAME_OBJECT ; \
+ HelpId = CMD_SID_RENAME_OBJECT ; \
Text [ en-US ] = "Name...";\
};
@@ -242,7 +242,7 @@
MenuItem\
{\
Identifier = SID_TITLE_DESCRIPTION_OBJECT; \
- HelpId = SID_TITLE_DESCRIPTION_OBJECT; \
+ HelpId = CMD_SID_TITLE_DESCRIPTION_OBJECT; \
Text [ en-US ] = "Description...";\
};
@@ -259,14 +259,14 @@
MenuItem\
{\
Identifier = SID_MIRROR_VERTICAL ; \
- HelpId = SID_MIRROR_VERTICAL ; \
+ HelpId = CMD_SID_MIRROR_VERTICAL ; \
Text [ en-US ] = "~Vertically" ; \
Text [ x-comment ] = " ";\
};\
MenuItem\
{\
Identifier = SID_MIRROR_HORIZONTAL ; \
- HelpId = SID_MIRROR_HORIZONTAL ; \
+ HelpId = CMD_SID_MIRROR_HORIZONTAL ; \
Text [ en-US ] = "~Horizontal" ; \
Text [ x-comment ] = " ";\
};\
@@ -335,7 +335,7 @@
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_PAGE ; \
- HelpId = SID_ANCHOR_PAGE ; \
+ HelpId = CMD_SID_ANCHOR_PAGE ; \
Text [ en-US ] = "To P~age" ; \
Text [ x-comment ] = " ";\
};\
@@ -343,7 +343,7 @@
{\
RadioCheck = TRUE ; \
Identifier = SID_ANCHOR_CELL ; \
- HelpId = SID_ANCHOR_CELL ; \
+ HelpId = CMD_SID_ANCHOR_CELL ; \
Text [ en-US ] = "To ~Cell" ; \
Text [ x-comment ] = " ";\
};\
@@ -356,7 +356,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN ; \
- HelpId = SID_OBJECT_ALIGN ; \
+ HelpId = CMD_SID_OBJECT_ALIGN ; \
Text [ en-US ] = "A~lignment" ; \
SubMenu = Menu\
{\
@@ -406,150 +406,6 @@ String RID_DRAW_OBJECTBAR
Text [ en-US ] = "Drawing Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_DRAW_OBJECTBAR
-{
- HelpId = HID_SC_TOOLBOX_DRAW ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDIT ;
- HelpID = SID_BEZIER_EDIT ;
-
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- // Linien
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE ;
- HelpId = SID_ATTRIBUTES_LINE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINEEND_STYLE ;
- HelpID = SID_ATTR_LINEEND_STYLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINE_STYLE ;
- HelpId = SID_ATTR_LINE_STYLE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINE_WIDTH ;
- HelpId = SID_ATTR_LINE_WIDTH ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_LINE_COLOR ;
- HelpId = SID_ATTR_LINE_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA ;
- HelpId = SID_ATTRIBUTES_AREA ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_FILL_STYLE ;
- HelpId = SID_ATTR_FILL_STYLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- // Rest
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ROTATE ;
- HelpId = SID_OBJECT_ROTATE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ANCHOR_TOGGLE ;
- HelpId = SID_ANCHOR_TOGGLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_TOP ;
- HelpId = SID_FRAME_TO_TOP ;
- };
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_BOTTOM ;
- HelpId = SID_FRAME_TO_BOTTOM ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HEAVEN ;
- HelpID = SID_OBJECT_HEAVEN ;
-
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HELL ;
- HelpID = SID_OBJECT_HELL ;
-
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
-
- ToolBoxItem
- {
- Identifier = SID_GRID_VISIBLE;
- HelpID = SID_GRID_VISIBLE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_GRID_USE;
- HelpID = SID_GRID_USE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_HELPLINES_MOVE;
- HelpID = SID_HELPLINES_MOVE;
- Hide = TRUE;
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ALIGN ;
- HelpId = SID_OBJECT_ALIGN ;
- };
- };
- Scroll = TRUE ;
-};
//
// Text-Toolbox
//
@@ -558,504 +414,6 @@ String RID_TEXT_TOOLBOX
Text [ en-US ] = "Text Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_TEXT_TOOLBOX
-{
- HelpId = HID_SC_TOOLBOX_DRTEXT ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONT ;
- HelpId = SID_ATTR_CHAR_FONT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
- HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_WEIGHT ;
- HelpId = SID_ATTR_CHAR_WEIGHT ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_POSTURE ;
- HelpId = SID_ATTR_CHAR_POSTURE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_UNDERLINE ;
- HelpId = SID_ATTR_CHAR_UNDERLINE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ULINE_VAL_DOUBLE;
- HelpId = SID_ULINE_VAL_DOUBLE;
- AutoCheck = TRUE ;
- Hide=TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_COLOR ;
- HelpId = SID_ATTR_CHAR_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_10 ;
- HelpId = SID_ATTR_PARA_LINESPACE_10 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_15 ;
- HelpId = SID_ATTR_PARA_LINESPACE_15 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_20 ;
- HelpId = SID_ATTR_PARA_LINESPACE_20 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ALIGNLEFT ;
- HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNCENTERHOR ;
- HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNRIGHT ;
- HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNBLOCK ;
- HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;
- HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;
- HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_CHAR_DLG ;
- HelpID = SID_CHAR_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_PARA_DLG ;
- HelpID = SID_PARA_DLG ;
- };
- };
- ItemList[ ar ] =
- {
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONT ;
- HelpId = SID_ATTR_CHAR_FONT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
- HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_WEIGHT ;
- HelpId = SID_ATTR_CHAR_WEIGHT ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_POSTURE ;
- HelpId = SID_ATTR_CHAR_POSTURE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_UNDERLINE ;
- HelpId = SID_ATTR_CHAR_UNDERLINE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ULINE_VAL_DOUBLE;
- HelpId = SID_ULINE_VAL_DOUBLE;
- AutoCheck = TRUE ;
- Hide=TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_COLOR ;
- HelpId = SID_ATTR_CHAR_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_10 ;
- HelpId = SID_ATTR_PARA_LINESPACE_10 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_15 ;
- HelpId = SID_ATTR_PARA_LINESPACE_15 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_20 ;
- HelpId = SID_ATTR_PARA_LINESPACE_20 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ALIGNRIGHT ;
- HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNCENTERHOR ;
- HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNLEFT ;
- HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNBLOCK ;
- HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;
- HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;
- HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_CHAR_DLG ;
- HelpID = SID_CHAR_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_PARA_DLG ;
- HelpID = SID_PARA_DLG ;
- };
- };
- ItemList[ he ] =
- {
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONT ;
- HelpId = SID_ATTR_CHAR_FONT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_FONTHEIGHT ;
- HelpId = SID_ATTR_CHAR_FONTHEIGHT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_WEIGHT ;
- HelpId = SID_ATTR_CHAR_WEIGHT ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_POSTURE ;
- HelpId = SID_ATTR_CHAR_POSTURE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_UNDERLINE ;
- HelpId = SID_ATTR_CHAR_UNDERLINE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ULINE_VAL_DOUBLE;
- HelpId = SID_ULINE_VAL_DOUBLE;
- AutoCheck = TRUE ;
- Hide=TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_CHAR_COLOR ;
- HelpId = SID_ATTR_CHAR_COLOR ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_10 ;
- HelpId = SID_ATTR_PARA_LINESPACE_10 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_15 ;
- HelpId = SID_ATTR_PARA_LINESPACE_15 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LINESPACE_20 ;
- HelpId = SID_ATTR_PARA_LINESPACE_20 ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ALIGNRIGHT ;
- HelpId = SID_ATTR_PARA_ADJUST_RIGHT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNCENTERHOR ;
- HelpId = SID_ATTR_PARA_ADJUST_CENTER ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNLEFT ;
- HelpId = SID_ATTR_PARA_ADJUST_LEFT ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_ALIGNBLOCK ;
- HelpId = SID_ATTR_PARA_ADJUST_BLOCK ;
- RadioCheck = TRUE ;
- AutoCheck = TRUE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;
- HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;
- HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_CHAR_DLG ;
- HelpID = SID_CHAR_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_PARA_DLG ;
- HelpID = SID_PARA_DLG ;
- };
- };
-};
//
// Graphics toolbox
//
@@ -1063,182 +421,6 @@ String RID_GRAPHIC_OBJECTBAR
{
Text [ en-US ] = "Graphics Object Bar";
};
-ToolBox RID_GRAPHIC_OBJECTBAR
-{
- HelpId = HID_SC_TOOLBOX_GRAPHIC ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_GRFFILTER;
- HelpID = SID_GRFFILTER;
- DropDown = TRUE ;
- Checkable = FALSE ;
- RadioCheck = FALSE ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_MODE;
- HelpID = SID_ATTR_GRAF_MODE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_RED;
- HelpID = SID_ATTR_GRAF_RED;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GREEN;
- HelpID = SID_ATTR_GRAF_GREEN;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_BLUE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_LUMINANCE;
- HelpID = SID_ATTR_GRAF_LUMINANCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CONTRAST;
- HelpID = SID_ATTR_GRAF_CONTRAST;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GAMMA;
- HelpID = SID_ATTR_GRAF_GAMMA;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_TRANSPARENCE;
- HelpID = SID_ATTR_GRAF_TRANSPARENCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- // #i25616#
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE;
- HelpID = SID_ATTRIBUTES_LINE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA;
- HelpID = SID_ATTRIBUTES_AREA;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_FILL_SHADOW;
- HelpID = SID_ATTR_FILL_SHADOW;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CROP;
- HelpID = SID_ATTR_GRAF_CROP;
- };
-
- // copied from the "normal" drawing toolbar:
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_ANCHOR_TOGGLE ;
- HelpId = SID_ANCHOR_TOGGLE ;
- };
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_TOP ;
- HelpId = SID_FRAME_TO_TOP ;
- };
- ToolBoxItem
- {
- Identifier = SID_FRAME_TO_BOTTOM ;
- HelpId = SID_FRAME_TO_BOTTOM ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HEAVEN ;
- HelpID = SID_OBJECT_HEAVEN ;
-
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HELL ;
- HelpID = SID_OBJECT_HELL ;
-
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
-
- ToolBoxItem
- {
- Identifier = SID_GRID_VISIBLE;
- HelpID = SID_GRID_VISIBLE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_GRID_USE;
- HelpID = SID_GRID_USE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_HELPLINES_MOVE;
- HelpID = SID_HELPLINES_MOVE;
- Hide = TRUE;
- };
-
- //---------------------------------------------
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- //---------------------------------------------
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ALIGN ;
- HelpId = SID_OBJECT_ALIGN ;
- };
- };
-};
//
// Popup-Menues ---------------------------------------------------------------------
//
@@ -1404,36 +586,6 @@ Menu RID_POPUP_MEDIA
};
};
-ToolBox RID_MEDIA_OBJECTBAR
-{
- //HelpId = HID_SC_TOOLBOX_MEDIA ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- Customize = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_AVMEDIA_TOOLBOX;
- HelpID = SID_AVMEDIA_TOOLBOX;
- DropDown = FALSE ;
- Checkable = FALSE ;
- RadioCheck = FALSE ;
- };
- };
-};
-
//
// Ole-Objekt
//
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 4b6bfee38d46..e923f66b31d0 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -73,7 +73,7 @@ SFX_IMPL_DOCKINGWINDOW( ScFunctionChildWindow, FID_FUNCTION_BOX )
#************************************************************************/
ScFunctionChildWindow::ScFunctionChildWindow( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( pParentP, nId )
@@ -122,13 +122,13 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
eSfxNewAlignment=GetAlignment();
eSfxOldAlignment=eSfxNewAlignment;
- aFiFuncDesc.SetUpdateMode(TRUE);
+ aFiFuncDesc.SetUpdateMode(sal_True);
pAllFuncList=&aFuncList;
aDDFuncList.Disable();
aDDFuncList.Hide();
nArgs=0;
nDockMode=0;
- bSizeFlag=FALSE;
+ bSizeFlag=false;
aCatBox.SetDropDownLineCount(9);
Font aFont=aFiFuncDesc.GetFont();
aFont.SetColor(Color(COL_BLACK));
@@ -147,7 +147,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
Link a3Link=LINK( this, ScFunctionDockWin, SetSplitHdl);
aPrivatSplit.SetCtrModifiedHdl(a3Link);
- StartListening( *pBindingsP, TRUE );
+ StartListening( *pBindingsP, sal_True );
Point aTopLeft=aCatBox.GetPosPixel();
String aString=String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ww"));
@@ -161,7 +161,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
GetOutputSizePixel().Height()-2*aTxtSize.Height());
aPrivatSplit.SetYRange(aYRange);
SelHdl(&aCatBox);
- bInit=TRUE;
+ bInit=sal_True;
}
/*************************************************************************
@@ -204,7 +204,7 @@ void ScFunctionDockWin::InitLRUList()
pFuncMgr->fillLastRecentlyUsedFunctions(aLRUList);
- USHORT nSelPos = aCatBox.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos();
if(nSelPos == 0)
UpdateFunctionList();
@@ -250,7 +250,7 @@ void ScFunctionDockWin::UpdateLRUList()
void ScFunctionDockWin::SetSize()
{
- USHORT nSelEntry=0;
+ sal_uInt16 nSelEntry=0;
SfxChildAlignment aChildAlign=eSfxOldAlignment;//GetAlignment();
short nNewDockMode;
switch(aChildAlign)
@@ -328,9 +328,9 @@ void ScFunctionDockWin::SetSize()
void ScFunctionDockWin::SetLeftRightSize()
{
- if(bSizeFlag==FALSE)
+ if(bSizeFlag==false)
{
- bSizeFlag=TRUE;
+ bSizeFlag=sal_True;
Size aDiffSize=GetSizePixel();
Size aNewSize=GetOutputSizePixel();
@@ -355,7 +355,7 @@ void ScFunctionDockWin::SetLeftRightSize()
aOldSize=aNewSize;
aNewSize.Width()+=aDiffSize.Width();
aNewSize.Height()+=aDiffSize.Height();
- bSizeFlag=FALSE;
+ bSizeFlag=false;
}
}
@@ -376,9 +376,9 @@ void ScFunctionDockWin::SetLeftRightSize()
void ScFunctionDockWin::SetTopBottonSize()
{
- if(bSizeFlag==FALSE)
+ if(bSizeFlag==false)
{
- bSizeFlag=TRUE;
+ bSizeFlag=sal_True;
Size aDiffSize=GetSizePixel();
Size aNewSize=GetOutputSizePixel();
aDiffSize.Width()-=aNewSize.Width();
@@ -389,7 +389,7 @@ void ScFunctionDockWin::SetTopBottonSize()
aNewSize.Width()+=aDiffSize.Width();
aNewSize.Height()+=aDiffSize.Height();
- bSizeFlag=FALSE;
+ bSizeFlag=false;
}
}
@@ -410,7 +410,7 @@ void ScFunctionDockWin::SetTopBottonSize()
void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
{
- if((ULONG)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
+ if((sal_uLong)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
Size aCDSize=aCatBox.GetSizePixel();
Size aFLSize=aFuncList.GetSizePixel();
@@ -448,7 +448,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
{
- if((ULONG)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
+ if((sal_uLong)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
Size aFLSize=aFuncList.GetSizePixel();
Size aSplitterSize=aPrivatSplit.GetSizePixel();
@@ -497,7 +497,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
void ScFunctionDockWin::SetMyWidthToBo(Size &aNewSize)
{
- if((ULONG)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
+ if((sal_uLong)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth;
Size aCDSize=aCatBox.GetSizePixel();
Size aDdFLSize=aDDFuncList.GetSizePixel();
@@ -538,7 +538,7 @@ void ScFunctionDockWin::SetMyWidthToBo(Size &aNewSize)
void ScFunctionDockWin::SetMyHeightToBo(Size &aNewSize)
{
- if((ULONG)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
+ if((sal_uLong)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight;
Size aFDSize=aFiFuncDesc.GetSizePixel();
@@ -621,8 +621,8 @@ void ScFunctionDockWin::SetDescription()
void ScFunctionDockWin::Resizing( Size& rNewSize )
{
- if((ULONG)rNewSize.Width()<nMinWidth) rNewSize.Width()=nMinWidth;
- if((ULONG)rNewSize.Height()<nMinHeight) rNewSize.Height()=nMinHeight;
+ if((sal_uLong)rNewSize.Width()<nMinWidth) rNewSize.Width()=nMinWidth;
+ if((sal_uLong)rNewSize.Height()<nMinHeight) rNewSize.Height()=nMinHeight;
}
@@ -640,9 +640,9 @@ void ScFunctionDockWin::Resizing( Size& rNewSize )
#*
#************************************************************************/
-BOOL ScFunctionDockWin::Close()
+sal_Bool ScFunctionDockWin::Close()
{
- SfxBoolItem aItem( FID_FUNCTION_BOX, FALSE );
+ SfxBoolItem aItem( FID_FUNCTION_BOX, false );
GetBindings().GetDispatcher()->Execute( FID_FUNCTION_BOX,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
@@ -650,7 +650,7 @@ BOOL ScFunctionDockWin::Close()
SfxDockingWindow::Close();
- return( TRUE );
+ return( sal_True );
}
@@ -680,7 +680,7 @@ SfxChildAlignment ScFunctionDockWin::CheckAlignment(SfxChildAlignment /* abla */
}
else
{
- bInit=FALSE;
+ bInit=false;
eSfxOldAlignment=aChildAlign;
eSfxNewAlignment=aChildAlign;
}
@@ -779,12 +779,12 @@ void ScFunctionDockWin::Resize()
void ScFunctionDockWin::UpdateFunctionList()
{
- USHORT nSelPos = aCatBox.GetSelectEntryPos();
- USHORT nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos();
+ sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
? (nSelPos-1) : 0;
pAllFuncList->Clear();
- pAllFuncList->SetUpdateMode( FALSE );
+ pAllFuncList->SetUpdateMode( false );
if ( nSelPos > 0 )
{
@@ -812,7 +812,7 @@ void ScFunctionDockWin::UpdateFunctionList()
//------------------------------------------------------
- pAllFuncList->SetUpdateMode( TRUE );
+ pAllFuncList->SetUpdateMode( sal_True );
if ( pAllFuncList->GetEntryCount() > 0 )
{
@@ -841,7 +841,7 @@ void ScFunctionDockWin::UpdateFunctionList()
#*
#************************************************************************/
-void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
+void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
{
String aFirstArgStr;
String aParaStr;
@@ -883,8 +883,8 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
if ( nArgs != VAR_ARGS )
{ // no VarArgs or Fix plus VarArgs, but not VarArgs only
String aArgSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "; " ));
- USHORT nFix = ( nArgs < VAR_ARGS ? nArgs : nArgs - VAR_ARGS + 1 );
- for ( USHORT nArg = 1;
+ sal_uInt16 nFix = ( nArgs < VAR_ARGS ? nArgs : nArgs - VAR_ARGS + 1 );
+ for ( sal_uInt16 nArg = 1;
nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ )
{
if (!pDesc->pDefArgFlags[nArg].bSuppress)
@@ -912,7 +912,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
if(nArgs>0)
{
pHdl->InsertFunction(aString);
- pEdView->InsertText(aArgStr,TRUE);
+ pEdView->InsertText(aArgStr,sal_True);
ESelection aESel=pEdView->GetSelection();
aESel.nEndPos=aESel.nStartPos+aFirstArgStr.Len();
pEdView->SetSelection(aESel);
@@ -921,7 +921,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ???
else
{
aString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" ));
- pEdView->InsertText(aString,FALSE);
+ pEdView->InsertText(aString,false);
pHdl->DataChanged();
}
}
@@ -994,7 +994,7 @@ IMPL_LINK( ScFunctionDockWin, SetSelectionHdl, void*, pCtrl )
if ((ImageButton *)pCtrl == &aInsertButton ||
(ListBox *)pCtrl == &aFuncList)
{
- DoEnter(TRUE); // Uebernimmt die Eingabe
+ DoEnter(sal_True); // Uebernimmt die Eingabe
}
//...
@@ -1091,10 +1091,10 @@ void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo)
if ( aStr.Len())
{
aSplitterInitPos=aPrivatSplit.GetPosPixel();
- aSplitterInitPos.Y()=(USHORT) aStr.ToInt32();
+ aSplitterInitPos.Y()=(sal_uInt16) aStr.ToInt32();
xub_StrLen n1 = aStr.Search(';');
aStr.Erase(0, n1+1);
- USHORT nSelPos=sal::static_int_cast<USHORT>( aStr.ToInt32() );
+ sal_uInt16 nSelPos=sal::static_int_cast<sal_uInt16>( aStr.ToInt32() );
aCatBox.SelectEntryPos(nSelPos);
SelHdl(&aCatBox);
diff --git a/sc/source/ui/formdlg/dwfunctr.src b/sc/source/ui/formdlg/dwfunctr.src
index 46061a512955..dc50a2b41486 100644
--- a/sc/source/ui/formdlg/dwfunctr.src
+++ b/sc/source/ui/formdlg/dwfunctr.src
@@ -46,6 +46,7 @@ DockingWindow FID_FUNCTION_BOX
HelpId = HID_FUNCTION_BOX ;
ListBox CB_CAT
{
+ HelpID = "sc:ListBox:FID_FUNCTION_BOX:CB_CAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 4 ) ;
Size = MAP_APPFONT ( 56 , 80 ) ;
@@ -73,6 +74,7 @@ DockingWindow FID_FUNCTION_BOX
};
ListBox DDLB_FUNC
{
+ HelpID = "sc:ListBox:FID_FUNCTION_BOX:DDLB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 103 , 4 ) ;
Size = MAP_APPFONT ( 56 , 80 ) ;
@@ -83,6 +85,7 @@ DockingWindow FID_FUNCTION_BOX
};
ListBox LB_FUNC
{
+ HelpID = "sc:ListBox:FID_FUNCTION_BOX:LB_FUNC";
Border = TRUE ;
Pos = MAP_APPFONT ( 3 , 19 ) ;
Size = MAP_APPFONT ( 72 , 90 ) ;
@@ -104,6 +107,7 @@ DockingWindow FID_FUNCTION_BOX
};
ImageButton IMB_INSERT
{
+ HelpID = "sc:ImageButton:FID_FUNCTION_BOX:IMB_INSERT";
Pos = MAP_APPFONT ( 3 , 4 ) ;
Size = MAP_APPFONT ( 13 , 13 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index d2da590cdc07..14a4e0023efa 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -107,7 +107,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
{
pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() );
if( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(true);
}
}
}
@@ -127,10 +127,10 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
if ( pInputHdl )
pInputHdl->NotifyChange( NULL );
- m_aHelper.enableInput( FALSE );
+ m_aHelper.enableInput( false );
m_aHelper.EnableSpreadsheets();
m_aHelper.Init();
- m_aHelper.SetDispatcherLock( TRUE );
+ m_aHelper.SetDispatcherLock( sal_True );
notifyChange();
fill();
@@ -160,26 +160,26 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
String aFormula;
pDoc->GetFormula( nCol, nRow, nTab, aFormula );
- BOOL bEdit = ( aFormula.Len() > 1 );
- BOOL bMatrix = FALSE;
+ sal_Bool bEdit = ( aFormula.Len() > 1 );
+ sal_Bool bMatrix = false;
if ( bEdit )
{
bMatrix = CheckMatrix(aFormula);
xub_StrLen nFStart = 0;
xub_StrLen nFEnd = 0;
- if ( GetFormulaHelper().GetNextFunc( aFormula, FALSE, nFStart, &nFEnd) )
+ if ( GetFormulaHelper().GetNextFunc( aFormula, false, nFStart, &nFEnd) )
{
pScMod->InputReplaceSelection( aFormula );
pScMod->InputSetSelection( nFStart, nFEnd );
xub_StrLen PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
- eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,TRUE,TRUE);
+ eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_True,sal_True);
pData->SetFStart( nFStart );
}
else
- bEdit = FALSE;
+ bEdit = false;
}
if ( !bEdit )
@@ -192,12 +192,12 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
pScMod->InputSetSelection( 1, aNewFormula.Len()+1 );
xub_StrLen PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
- SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,FALSE,FALSE);
+ SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,false,false);
pData->SetFStart( 1 ); // hinter dem "="
}
- pData->SetMode( (USHORT) eMode );
+ pData->SetMode( (sal_uInt16) eMode );
String rStrExp = GetMeText();
pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp );
@@ -279,9 +279,9 @@ ScFormulaDlg::~ScFormulaDlg()
delete pCell;
}
-BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
+sal_Bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
{
- BOOL bAlive = FALSE;
+ sal_Bool bAlive = false;
// gehoert der InputHandler zu irgendeiner ViewShell ?
@@ -290,7 +290,7 @@ BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
while ( pSh && !bAlive )
{
if (((ScTabViewShell*)pSh)->GetInputHandler() == pHdl)
- bAlive = TRUE;
+ bAlive = sal_True;
pSh = SfxViewShell::GetNext( *pSh, &aScType );
}
@@ -320,10 +320,10 @@ ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell,PtrTabVi
}
-BOOL ScFormulaDlg::Close()
+sal_Bool ScFormulaDlg::Close()
{
- DoEnter(FALSE);
- return TRUE;
+ DoEnter(false);
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -331,7 +331,7 @@ BOOL ScFormulaDlg::Close()
// --------------------------------------------------------------------------
bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
{
- BOOL bResult = TRUE;
+ sal_Bool bResult = sal_True;
::std::auto_ptr<ScFormulaCell> pFCell( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) );
@@ -339,7 +339,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
// wenn ein Name eigentlich als Bereich in die Gesamt-Formel
// eingefuegt wird, bei der Einzeldarstellung aber als
// single-Zellbezug interpretiert wird
- BOOL bColRowName = pCell->HasColRowName();
+ sal_Bool bColRowName = pCell->HasColRowName();
if ( bColRowName )
{
// ColRowName im RPN-Code?
@@ -352,10 +352,10 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced ) );
}
else
- bColRowName = FALSE;
+ bColRowName = false;
}
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
if ( nErrCode == 0 )
{
SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable());
@@ -363,7 +363,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
if ( pFCell->IsValue() )
{
double n = pFCell->GetValue();
- ULONG nFormat = aFormatter.GetStandardFormat( n, 0,
+ sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0,
pFCell->GetFormatType(), ScGlobal::eLnge );
aFormatter.GetOutputString( n, nFormat,
rStrResult, &pColor );
@@ -373,7 +373,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
String aStr;
pFCell->GetString( aStr );
- ULONG nFormat = aFormatter.GetStandardFormat(
+ sal_uLong nFormat = aFormatter.GetStandardFormat(
pFCell->GetFormatType(), ScGlobal::eLnge);
aFormatter.GetOutputString( aStr, nFormat,
rStrResult, &pColor );
@@ -405,7 +405,7 @@ void ScFormulaDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* p
m_aHelper.RefInputStart( aPair.second, aPair.first);
RefInputStartAfter( aPair.second, aPair.first );
}
-void ScFormulaDlg::RefInputDone( BOOL bForced )
+void ScFormulaDlg::RefInputDone( sal_Bool bForced )
{
m_aHelper.RefInputDone( bForced );
RefInputDoneAfter( bForced );
@@ -417,7 +417,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
if ( pFunc && pFunc->getSuppressedArgumentCount() > 0 )
{
Selection theSel;
- BOOL bRefNull = UpdateParaWin(theSel);
+ sal_Bool bRefNull = UpdateParaWin(theSel);
if ( rRef.aStart != rRef.aEnd && bRefNull )
{
@@ -425,7 +425,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
}
String aRefStr;
- BOOL bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() );
+ sal_Bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() );
if ( bOtherDoc )
{
// Referenz auf anderes Dokument - wie inputhdl.cxx
@@ -472,21 +472,21 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
}
}
-BOOL ScFormulaDlg::IsRefInputMode() const
+sal_Bool ScFormulaDlg::IsRefInputMode() const
{
const IFunctionDescription* pDesc = getCurrentFunctionDescription();
- BOOL bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL);
+ sal_Bool bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL);
return bRef;
}
-BOOL ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const
+sal_Bool ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const
{
// not allowed: different from this doc, and no name
// pDocSh is always a ScDocShell
if ( pDocSh && ((ScDocShell*)pDocSh)->GetDocument() != pDoc && !pDocSh->HasName() )
- return FALSE;
+ return false;
- return TRUE; // everything else is allowed
+ return sal_True; // everything else is allowed
}
void ScFormulaDlg::SetActive()
@@ -508,7 +508,7 @@ void ScFormulaDlg::SaveLRUEntry(const ScFuncDesc* pFuncDescP)
}
}
-void ScFormulaDlg::doClose(BOOL /*_bOk*/)
+void ScFormulaDlg::doClose(sal_Bool /*_bOk*/)
{
m_aHelper.DoClose( ScFormulaDlgWrapper::GetChildWindowId() );
}
@@ -525,7 +525,7 @@ void ScFormulaDlg::ShowReference(const String& _sFormula)
{
m_aHelper.ShowReference(_sFormula);
}
-void ScFormulaDlg::HideReference( BOOL bDoneRefMode )
+void ScFormulaDlg::HideReference( sal_Bool bDoneRefMode )
{
m_aHelper.HideReference(bDoneRefMode);
}
@@ -537,10 +537,10 @@ void ScFormulaDlg::AddRefEntry( )
{
}
-BOOL ScFormulaDlg::IsTableLocked( ) const
+sal_Bool ScFormulaDlg::IsTableLocked( ) const
{
// per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden
- return FALSE;
+ return false;
}
void ScFormulaDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton)
{
@@ -550,7 +550,7 @@ void ScFormulaDlg::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB
{
m_aHelper.ReleaseFocus(pEdit,pButton);
}
-void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked)
+void ScFormulaDlg::dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked)
{
SfxBoolItem aRetItem( SID_DLG_RETOK, _bOK );
SfxBoolItem aMatItem( SID_DLG_MATRIX, _bMartixChecked );
@@ -559,9 +559,9 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked)
// Wenn durch Dokument-Umschalterei die Eingabezeile weg war/ist,
// ist der String leer. Dann nicht die alte Formel loeschen.
if ( !aStrItem.GetValue().Len() )
- aRetItem.SetValue( FALSE ); // FALSE = Cancel
+ aRetItem.SetValue( false ); // sal_False = Cancel
- m_aHelper.SetDispatcherLock( FALSE ); // Modal-Modus ausschalten
+ m_aHelper.SetDispatcherLock( false ); // Modal-Modus ausschalten
clear();
@@ -569,7 +569,7 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked)
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aRetItem, &aStrItem, &aMatItem, 0L );
}
-void ScFormulaDlg::setDispatcherLock( BOOL bLock )
+void ScFormulaDlg::setDispatcherLock( sal_Bool bLock )
{
m_aHelper.SetDispatcherLock( bLock );
}
diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx
index 3639f2a6b4e6..65df2a6f86c9 100644
--- a/sc/source/ui/formdlg/privsplt.cxx
+++ b/sc/source/ui/formdlg/privsplt.cxx
@@ -64,7 +64,7 @@ ScPrivatSplit::ScPrivatSplit( Window* pParent, const ResId& rResId,
aWinPointer=GetPointer();
- aMovingFlag=FALSE;
+ aMovingFlag=false;
if(eScSplit==SC_SPLIT_HORZ)
{
aWinPointer=Pointer(POINTER_HSPLIT);
@@ -350,7 +350,7 @@ void ScPrivatSplit::MoveSplitTo(Point aPos)
}
-void ScPrivatSplit::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground )
+void ScPrivatSplit::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -389,17 +389,17 @@ void ScPrivatSplit::StateChanged( StateChangedType nType )
if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, false, false );
Invalidate();
}
if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( false, sal_True, false );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( false, false, sal_True );
Invalidate();
}
@@ -413,7 +413,7 @@ void ScPrivatSplit::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
else
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index eaa68f0e6aa2..43d3c1aba20d 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -150,7 +150,7 @@ public:
virtual void UpdateData() { }
virtual void SetDoUpdate(sal_Bool /* bValue */) { }
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
DECL_LINK( NotifyHdl, EENotify* );
protected:
@@ -267,7 +267,7 @@ public:
virtual void UpdateData() { }
virtual void SetDoUpdate(sal_Bool /* bValue */) { }
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
private:
ScPreviewViewForwarder* mpViewForwarder;
ScPreviewShell* mpViewShell;
@@ -300,7 +300,7 @@ public:
virtual void UpdateData() { }
virtual void SetDoUpdate(sal_Bool /* bValue */) { }
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
private:
ScPreviewViewForwarder* mpViewForwarder;
ScPreviewShell* mpViewShell;
@@ -349,7 +349,7 @@ public:
virtual void UpdateData() {}
virtual void SetDoUpdate( sal_Bool /* bValue */ ) {}
- virtual sal_Bool IsDirty() const { return sal_False; }
+ virtual sal_Bool IsDirty() const { return false; }
};
diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx
index d23f1d5ceebf..afd90f5305f3 100644
--- a/sc/source/ui/inc/IAnyRefDialog.hxx
+++ b/sc/source/ui/inc/IAnyRefDialog.hxx
@@ -46,11 +46,11 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0;
- virtual void RefInputDone( BOOL bForced = FALSE ) = 0;
- virtual BOOL IsTableLocked() const = 0;
- virtual BOOL IsRefInputMode() const = 0;
+ virtual void RefInputDone( sal_Bool bForced = false ) = 0;
+ virtual sal_Bool IsTableLocked() const = 0;
+ virtual sal_Bool IsRefInputMode() const = 0;
- virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const = 0;
+ virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const = 0;
virtual void AddRefEntry() = 0;
virtual void SetActive() = 0;
virtual void ViewShellChanged( ScTabViewShell* pScViewShell ) = 0;
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index aeff805d72ca..f984c2347fe5 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -107,10 +107,10 @@ public:
SCTAB nTable;
SCCOL nCol;
SCROW nRow;
- ULONG nActionNo;
- ULONG nInfo;
- BOOL bIsRejectable;
- BOOL bIsAcceptable;
+ sal_uLong nActionNo;
+ sal_uLong nInfo;
+ sal_Bool bIsRejectable;
+ sal_Bool bIsAcceptable;
};
typedef long LExpNum;
@@ -153,15 +153,15 @@ private:
String aStrChildContent;
String aStrChildOrgContent;
String aStrEmpty;
- ULONG nAcceptCount;
- ULONG nRejectCount;
- BOOL bAcceptEnableFlag;
- BOOL bRejectEnableFlag;
- BOOL bNeedsUpdate;
- BOOL bIgnoreMsg;
- BOOL bNoSelection;
- BOOL bHasFilterEntry;
- BOOL bUseColor;
+ sal_uLong nAcceptCount;
+ sal_uLong nRejectCount;
+ sal_Bool bAcceptEnableFlag;
+ sal_Bool bRejectEnableFlag;
+ sal_Bool bNeedsUpdate;
+ sal_Bool bIgnoreMsg;
+ sal_Bool bNoSelection;
+ sal_Bool bHasFilterEntry;
+ sal_Bool bUseColor;
//ScChgTrackExps aExpandArray;
void Init();
@@ -190,51 +190,51 @@ private:
protected:
virtual void Resize();
- virtual BOOL Close();
+ virtual sal_Bool Close();
void RejectFiltered();
void AcceptFiltered();
- BOOL IsValidAction(const ScChangeAction* pScChangeAction);
+ sal_Bool IsValidAction(const ScChangeAction* pScChangeAction);
String* MakeTypeString(ScChangeActionType eType);
SvLBoxEntry* InsertChangeAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState,
- SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE,
- BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND);
+ SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=false,
+ sal_Bool bDisabled=false,sal_uLong nPos=LIST_APPEND);
SvLBoxEntry* InsertFilteredAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState,
- SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE,
- BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND);
+ SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=false,
+ sal_Bool bDisabled=false,sal_uLong nPos=LIST_APPEND);
SvLBoxEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
- SvLBoxEntry* pParent,ULONG nSpecial);
+ SvLBoxEntry* pParent,sal_uLong nSpecial);
void GetDependents( const ScChangeAction* pScChangeAction,
ScChangeActionTable& aActionTable,
SvLBoxEntry* pEntry);
- BOOL InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
+ sal_Bool InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
- BOOL InsertAcceptedORejected(SvLBoxEntry* pParent);
+ sal_Bool InsertAcceptedORejected(SvLBoxEntry* pParent);
- BOOL InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable,
+ sal_Bool InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable,
SvLBoxEntry* pParent);
- BOOL InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
+ sal_Bool InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
- void AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, ULONG nEndAction,
- ULONG nPos=LIST_APPEND);
+ void AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction,
+ sal_uLong nPos=LIST_APPEND);
- void RemoveEntrys(ULONG nStartAction,ULONG nEndAction);
- void UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction);
+ void RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction);
+ void UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
void UpdateView();
void ClearView();
- BOOL Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
- SvLBoxEntry* pEntry, BOOL bFilter=FALSE);
+ sal_Bool Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
+ SvLBoxEntry* pEntry, sal_Bool bFilter=false);
public:
ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index fa49f6dea5cf..c1c2ec29029c 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -63,7 +63,7 @@ class ScFormulaReferenceHelper
SfxBindings* m_pBindings;
::std::auto_ptr<Accelerator>
pAccel; // fuer Enter/Escape
- BOOL* pHiddenMarks; // Merkfeld fuer versteckte Controls
+ sal_Bool* pHiddenMarks; // Merkfeld fuer versteckte Controls
SCTAB nRefTab; // used for ShowReference
String sOldDialogText; // Originaltitel des Dialogfensters
@@ -72,9 +72,9 @@ class ScFormulaReferenceHelper
Size aOldEditSize; // Originalgroesse des Eingabefeldes
Point aOldButtonPos; // Originalpositiuon des Buttons
- BOOL bEnableColorRef;
- BOOL bHighLightRef;
- BOOL bAccInserted;
+ sal_Bool bEnableColorRef;
+ sal_Bool bHighLightRef;
+ sal_Bool bAccInserted;
DECL_LINK( AccelSelectHdl, Accelerator* );
@@ -89,25 +89,25 @@ public:
void ShowReference( const XubString& rStr );
void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- void HideReference( BOOL bDoneRefMode = TRUE );
+ void HideReference( sal_Bool bDoneRefMode = sal_True );
void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- void RefInputDone( BOOL bForced = FALSE );
+ void RefInputDone( sal_Bool bForced = false );
void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
inline void SetWindow(Window* _pWindow) { m_pWindow = _pWindow; }
- BOOL DoClose( USHORT nId );
- void SetDispatcherLock( BOOL bLock );
- void EnableSpreadsheets( BOOL bFlag = TRUE, BOOL bChilds = TRUE );
+ sal_Bool DoClose( sal_uInt16 nId );
+ void SetDispatcherLock( sal_Bool bLock );
+ void EnableSpreadsheets( sal_Bool bFlag = sal_True, sal_Bool bChilds = sal_True );
void ViewShellChanged( ScTabViewShell* pScViewShell );
- static void enableInput(BOOL _bInput);
+ static void enableInput(sal_Bool _bInput);
protected:
Window * GetWindow(){ return m_pWindow; }
public:
bool CanInputStart( const formula::RefEdit *pEdit ){ return !!pEdit; }
- bool CanInputDone( BOOL bForced ){ return pRefEdit && (bForced || !pRefBtn); }
+ bool CanInputDone( sal_Bool bForced ){ return pRefEdit && (bForced || !pRefBtn); }
};
//============================================================================
@@ -138,15 +138,15 @@ private:
protected:
- virtual BOOL DoClose( USHORT nId );
+ virtual sal_Bool DoClose( sal_uInt16 nId );
- void SetDispatcherLock( BOOL bLock );
+ void SetDispatcherLock( sal_Bool bLock );
//Overwrite TWindow will implemented by ScRefHdlrImplBase
//virtual long PreNotify( NotifyEvent& rNEvt );
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
void ShowSimpleReference( const XubString& rStr );
void ShowFormulaReference( const XubString& rStr );
@@ -154,18 +154,18 @@ protected:
public:
ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId*/, bool bBindRef );
+ Window* pParent, sal_uInt16 nResId*/, bool bBindRef );
virtual ~ScRefHandler();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
virtual void AddRefEntry();
- virtual BOOL IsRefInputMode() const;
- virtual BOOL IsTableLocked() const;
- virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const;
+ virtual sal_Bool IsRefInputMode() const;
+ virtual sal_Bool IsTableLocked() const;
+ virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const;
virtual void ShowReference( const XubString& rStr );
- virtual void HideReference( BOOL bDoneRefMode = TRUE );
+ virtual void HideReference( sal_Bool bDoneRefMode = sal_True );
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
@@ -175,7 +175,7 @@ public:
//SfxBindings& GetBindings();
virtual void SetActive() = 0;
-// virtual BOOL Close();
+// virtual sal_Bool Close();
//Overwrite TWindow will implemented by ScRefHdlrImplBase
//virtual void StateChanged( StateChangedType nStateChange );
@@ -183,7 +183,7 @@ public:
bool EnterRefMode();
bool LeaveRefMode();
inline bool CanInputStart( const formula::RefEdit *pEdit );
- inline bool CanInputDone( BOOL bForced );
+ inline bool CanInputDone( sal_Bool bForced );
};
//============================================================================
@@ -212,12 +212,12 @@ private:
template<class TWindow, bool bBindRef>
template<class TBindings, class TChildWindow, class TParentWindow, class TResId>
ScRefHdlrImplBase<TWindow, bBindRef>::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW,
- TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<USHORT>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+ TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<sal_uInt16>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
template<class TWindow, bool bBindRef >
template<class TParentWindow, class TResId, class TArg>
ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ )
-:TWindow( pParent, ScResId(static_cast<USHORT>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+:TWindow( pParent, ScResId(static_cast<sal_uInt16>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
template<class TWindow, bool bBindRef >
ScRefHdlrImplBase<TWindow,bBindRef>::~ScRefHdlrImplBase(){}
@@ -231,12 +231,12 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase<TBase, bBindRef >
template<class T1, class T2, class T3, class T4>
ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4 )
{
- SC_MOD()->RegisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ SC_MOD()->RegisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this );
}
~ScRefHdlrImpl()
{
- SC_MOD()->UnregisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ SC_MOD()->UnregisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this );
}
};
//============================================================================
@@ -252,7 +252,7 @@ inline bool ScRefHandler::CanInputStart( const formula::RefEdit *pEdit )
return m_aHelper.CanInputStart( pEdit );
}
-inline bool ScRefHandler::CanInputDone( BOOL bForced )
+inline bool ScRefHandler::CanInputDone( sal_Bool bForced )
{
return m_aHelper.CanInputDone( bForced );
}
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index c1ba5b4726a0..c1a7eeb9aa65 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -45,7 +45,7 @@ private:
String aOptions;
String aSourceArea;
ScRange aDestArea;
- ULONG nRefresh;
+ sal_uLong nRefresh;
public:
ScAreaLinkSaver( const ScAreaLink& rSource );
@@ -54,8 +54,8 @@ public:
virtual ScDataObject* Clone() const;
- BOOL IsEqual( const ScAreaLink& rCompare ) const;
- BOOL IsEqualSource( const ScAreaLink& rCompare ) const;
+ sal_Bool IsEqual( const ScAreaLink& rCompare ) const;
+ sal_Bool IsEqualSource( const ScAreaLink& rCompare ) const;
void WriteToLink( ScAreaLink& rLink ) const;
void InsertNewLink( ScDocument* pDoc ) const;
@@ -71,9 +71,9 @@ public:
virtual ScDataObject* Clone() const;
- ScAreaLinkSaver* operator[](USHORT nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
+ ScAreaLinkSaver* operator[](sal_uInt16 nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
- BOOL IsEqual( const ScDocument* pDoc ) const;
+ sal_Bool IsEqual( const ScDocument* pDoc ) const;
void Restore( ScDocument* pDoc ) const;
// returns NULL if empty
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index ed579ea065b7..fafd293a2a4b 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -52,25 +52,25 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
virtual void AddRefEntry();
- virtual BOOL IsTableLocked() const;
+ virtual sal_Bool IsTableLocked() const;
virtual void SetActive();
virtual void Deactivate();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
- ListBox aLbPrintArea;
FixedLine aFlPrintArea;
+ ListBox aLbPrintArea;
formula::RefEdit aEdPrintArea;
formula::RefButton aRbPrintArea;
- ListBox aLbRepeatRow;
FixedLine aFlRepeatRow;
+ ListBox aLbRepeatRow;
formula::RefEdit aEdRepeatRow;
formula::RefButton aRbRepeatRow;
- ListBox aLbRepeatCol;
FixedLine aFlRepeatCol;
+ ListBox aLbRepeatCol;
formula::RefEdit aEdRepeatCol;
formula::RefButton aRbRepeatCol;
@@ -78,7 +78,7 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
formula::RefEdit* pRefInputEdit;
ScDocument* pDoc;
ScViewData* pViewData;
@@ -87,9 +87,9 @@ private:
#ifdef _AREASDLG_CXX
private:
void Impl_Reset();
- BOOL Impl_CheckRefStrings();
+ sal_Bool Impl_CheckRefStrings();
void Impl_FillLists();
- BOOL Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
+ sal_Bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
// Handler:
DECL_LINK( Impl_SelectHdl, ListBox* );
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx
index 7581f7f8d072..7fb3c937538d 100644
--- a/sc/source/ui/inc/asciiopt.hxx
+++ b/sc/source/ui/inc/asciiopt.hxx
@@ -48,19 +48,19 @@
class SC_DLLPUBLIC ScAsciiOptions
{
private:
- BOOL bFixedLen;
+ sal_Bool bFixedLen;
String aFieldSeps;
- BOOL bMergeFieldSeps;
+ sal_Bool bMergeFieldSeps;
bool bQuotedFieldAsText;
bool bDetectSpecialNumber;
sal_Unicode cTextSep;
CharSet eCharSet;
LanguageType eLang;
- BOOL bCharSetSystem;
+ sal_Bool bCharSetSystem;
long nStartRow;
- USHORT nInfoCount;
+ sal_uInt16 nInfoCount;
xub_StrLen* pColStart; //! TODO replace with vector
- BYTE* pColFormat; //! TODO replace with vector
+ sal_uInt8* pColFormat; //! TODO replace with vector
public:
ScAsciiOptions();
@@ -71,7 +71,7 @@ public:
ScAsciiOptions& operator=( const ScAsciiOptions& rCpy );
- BOOL operator==( const ScAsciiOptions& rCmp ) const;
+ sal_Bool operator==( const ScAsciiOptions& rCmp ) const;
void ReadFromString( const String& rString );
String WriteToString() const;
@@ -79,31 +79,31 @@ public:
void InterpretColumnList( const String& rString );
CharSet GetCharSet() const { return eCharSet; }
- BOOL GetCharSetSystem() const { return bCharSetSystem; }
+ sal_Bool GetCharSetSystem() const { return bCharSetSystem; }
const String& GetFieldSeps() const { return aFieldSeps; }
- BOOL IsMergeSeps() const { return bMergeFieldSeps; }
+ sal_Bool IsMergeSeps() const { return bMergeFieldSeps; }
bool IsQuotedAsText() const { return bQuotedFieldAsText; }
bool IsDetectSpecialNumber() const { return bDetectSpecialNumber; }
sal_Unicode GetTextSep() const { return cTextSep; }
- BOOL IsFixedLen() const { return bFixedLen; }
- USHORT GetInfoCount() const { return nInfoCount; }
+ sal_Bool IsFixedLen() const { return bFixedLen; }
+ sal_uInt16 GetInfoCount() const { return nInfoCount; }
const xub_StrLen* GetColStart() const { return pColStart; }
- const BYTE* GetColFormat() const { return pColFormat; }
+ const sal_uInt8* GetColFormat() const { return pColFormat; }
long GetStartRow() const { return nStartRow; }
LanguageType GetLanguage() const { return eLang; }
void SetCharSet( CharSet eNew ) { eCharSet = eNew; }
- void SetCharSetSystem( BOOL bSet ) { bCharSetSystem = bSet; }
- void SetFixedLen( BOOL bSet ) { bFixedLen = bSet; }
+ void SetCharSetSystem( sal_Bool bSet ) { bCharSetSystem = bSet; }
+ void SetFixedLen( sal_Bool bSet ) { bFixedLen = bSet; }
void SetFieldSeps( const String& rStr ) { aFieldSeps = rStr; }
- void SetMergeSeps( BOOL bSet ) { bMergeFieldSeps = bSet; }
+ void SetMergeSeps( sal_Bool bSet ) { bMergeFieldSeps = bSet; }
void SetQuotedAsText(bool bSet) { bQuotedFieldAsText = bSet; }
void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; }
void SetTextSep( sal_Unicode c ) { cTextSep = c; }
void SetStartRow( long nRow) { nStartRow= nRow; }
void SetLanguage(LanguageType e) { eLang = e; }
- void SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat );
+ void SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat );
void SetColumnInfo( const ScCsvExpDataVec& rDataVec );
};
diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx
index 07a2ed16726e..8f1bae4260ff 100644
--- a/sc/source/ui/inc/attrdlg.hxx
+++ b/sc/source/ui/inc/attrdlg.hxx
@@ -55,7 +55,7 @@ public:
~ScAttrDlg();
protected:
- virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
private:
DECL_LINK( OkHandler, void* ); // fuer DoppelClick-Beenden in TabPages
diff --git a/sc/source/ui/inc/auditsh.hxx b/sc/source/ui/inc/auditsh.hxx
index 20d9702aeefa..0d11a49f517d 100644
--- a/sc/source/ui/inc/auditsh.hxx
+++ b/sc/source/ui/inc/auditsh.hxx
@@ -40,7 +40,7 @@ class ScAuditingShell : public SfxShell
{
private:
ScViewData* pViewData;
- USHORT nFunction;
+ sal_uInt16 nFunction;
public:
TYPEINFO();
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index d8952ee2cbf6..408e5a892107 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -71,7 +71,7 @@ private:
VirtualDevice aVD;
SvtScriptedTextHelper aScriptedText;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBreakIter;
- BOOL bFitWidth;
+ sal_Bool bFitWidth;
svx::frame::Array maArray; /// Implementation to draw the frame borders.
bool mbRTL;
Size aPrvSize;
@@ -90,7 +90,7 @@ private:
//-------------------------------------------
SC_DLLPRIVATE void Init ();
SC_DLLPRIVATE void DoPaint ( const Rectangle& rRect );
- SC_DLLPRIVATE void CalcCellArray ( BOOL bFitWidth );
+ SC_DLLPRIVATE void CalcCellArray ( sal_Bool bFitWidth );
SC_DLLPRIVATE void CalcLineMap ();
SC_DLLPRIVATE void PaintCells ();
@@ -98,7 +98,7 @@ private:
conjunction with class svx::frame::Array (svx/framelinkarray.hxx), which
expects size_t coordinates. */
- SC_DLLPRIVATE USHORT GetFormatIndex( size_t nCol, size_t nRow ) const;
+ SC_DLLPRIVATE sal_uInt16 GetFormatIndex( size_t nCol, size_t nRow ) const;
SC_DLLPRIVATE const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const;
SC_DLLPRIVATE const SvxLineItem& GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const;
@@ -106,26 +106,26 @@ private:
SC_DLLPRIVATE void DrawStrings();
SC_DLLPRIVATE void DrawBackground();
- SC_DLLPRIVATE void MakeFonts ( USHORT nIndex,
+ SC_DLLPRIVATE void MakeFonts ( sal_uInt16 nIndex,
Font& rFont,
Font& rCJKFont,
Font& rCTLFont );
- SC_DLLPRIVATE String MakeNumberString( String cellString, BOOL bAddDec );
+ SC_DLLPRIVATE String MakeNumberString( String cellString, sal_Bool bAddDec );
SC_DLLPRIVATE void DrawFrameLine ( const SvxBorderLine& rLineD,
Point from,
Point to,
- BOOL bHorizontal,
+ sal_Bool bHorizontal,
const SvxBorderLine& rLineLT,
const SvxBorderLine& rLineL,
const SvxBorderLine& rLineLB,
const SvxBorderLine& rLineRT,
const SvxBorderLine& rLineR,
const SvxBorderLine& rLineRB );
- SC_DLLPRIVATE void CheckPriority ( USHORT nCurLine,
+ SC_DLLPRIVATE void CheckPriority ( sal_uInt16 nCurLine,
AutoFmtLine eLine,
SvxBorderLine& rLine );
- SC_DLLPRIVATE void GetLines ( USHORT nIndex, AutoFmtLine eLine,
+ SC_DLLPRIVATE void GetLines ( sal_uInt16 nIndex, AutoFmtLine eLine,
SvxBorderLine& rLineD,
SvxBorderLine& rLineLT,
SvxBorderLine& rLineL,
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
index 3dcf57fbf39c..c45be3bb0a78 100644
--- a/sc/source/ui/inc/autostyl.hxx
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -47,13 +47,13 @@ private:
ScDocShell* pDocSh;
Timer aTimer;
Timer aInitTimer;
- ULONG nTimerStart;
+ sal_uLong nTimerStart;
boost::ptr_vector<ScAutoStyleData> aEntries;
boost::ptr_vector<ScAutoStyleInitData> aInitials;
void ExecuteEntries();
- void AdjustEntries(ULONG nDiff);
- void StartTimer(ULONG nNow);
+ void AdjustEntries(sal_uLong nDiff);
+ void StartTimer(sal_uLong nNow);
DECL_LINK( TimerHdl, Timer* );
DECL_LINK( InitHdl, Timer* );
@@ -62,8 +62,8 @@ public:
~ScAutoStyleList();
void AddInitial( const ScRange& rRange, const String& rStyle1,
- ULONG nTimeout, const String& rStyle2 );
- void AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle );
+ sal_uLong nTimeout, const String& rStyle2 );
+ void AddEntry( sal_uLong nTimeout, const ScRange& rRange, const String& rStyle );
void ExecuteAllNow();
};
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
index b74fec6276ae..dc588ebb02f8 100644
--- a/sc/source/ui/inc/cbutton.hxx
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -49,16 +49,16 @@ public:
void Draw( const Point& rAt,
const Size& rSize,
- BOOL bState,
- BOOL bBtnIn = FALSE );
+ sal_Bool bState,
+ sal_Bool bBtnIn = false );
void Draw( const Point& rAt,
- BOOL bState,
- BOOL bBtnIn = FALSE )
+ sal_Bool bState,
+ sal_Bool bBtnIn = false )
{ Draw( rAt, aBtnSize, bState, bBtnIn ); }
- void Draw( BOOL bState,
- BOOL bBtnIn = FALSE )
+ void Draw( sal_Bool bState,
+ sal_Bool bBtnIn = false )
{ Draw( aBtnPos, aBtnSize, bState, bBtnIn ); }
void SetOptSizePixel();
@@ -71,7 +71,7 @@ public:
private:
void ImpDrawArrow( const Rectangle& rRect,
- BOOL bState );
+ sal_Bool bState );
protected:
OutputDevice* pOut;
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index f942f2c49699..6bbdd8ab6e27 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -59,12 +59,12 @@ class ScCellShell: public ScFormatShell
{
private:
CellShell_Impl* pImpl;
- BOOL bPastePossible;
+ sal_Bool bPastePossible;
void GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats );
void ExecuteExternalSource(
const String& _rFile, const String& _rFilter, const String& _rOptions,
- const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest );
+ const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest );
void ExecuteDataPilotDialog();
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
index b4e1ba481ca0..fdc4b191972a 100644
--- a/sc/source/ui/inc/colrowba.hxx
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -51,24 +51,24 @@ public:
~ScColBar();
virtual SCCOLROW GetPos();
- virtual USHORT GetEntrySize( SCCOLROW nEntryNo );
+ virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo );
virtual String GetEntryText( SCCOLROW nEntryNo );
- virtual BOOL IsLayoutRTL(); // only for columns
+ virtual sal_Bool IsLayoutRTL(); // only for columns
- virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize );
+ virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize );
virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd );
- virtual void SetMarking( BOOL bSet );
+ virtual void SetMarking( sal_Bool bSet );
virtual void SelectWindow();
- virtual BOOL IsDisabled();
- virtual BOOL ResizeAllowed();
+ virtual sal_Bool IsDisabled();
+ virtual sal_Bool ResizeAllowed();
virtual void DrawInvert( long nDragPos );
virtual String GetDragHelp( long nVal );
- BOOL UseNumericHeader() const;
+ sal_Bool UseNumericHeader() const;
};
@@ -85,19 +85,19 @@ public:
~ScRowBar();
virtual SCCOLROW GetPos();
- virtual USHORT GetEntrySize( SCCOLROW nEntryNo );
+ virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo );
virtual String GetEntryText( SCCOLROW nEntryNo );
- virtual BOOL IsMirrored(); // only for columns
+ virtual sal_Bool IsMirrored(); // only for columns
virtual SCROW GetHiddenCount( SCROW nEntryNo ); // only for columns
- virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize );
+ virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize );
virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd );
- virtual void SetMarking( BOOL bSet );
+ virtual void SetMarking( sal_Bool bSet );
virtual void SelectWindow();
- virtual BOOL IsDisabled();
- virtual BOOL ResizeAllowed();
+ virtual sal_Bool IsDisabled();
+ virtual sal_Bool ResizeAllowed();
virtual void DrawInvert( long nDragPos );
diff --git a/sc/source/ui/inc/condfrmt.hrc b/sc/source/ui/inc/condfrmt.hrc
index 223e2f8d3918..e1013438d219 100644
--- a/sc/source/ui/inc/condfrmt.hrc
+++ b/sc/source/ui/inc/condfrmt.hrc
@@ -63,6 +63,12 @@
#define FL_SEP1 41
#define FL_SEP2 42
+//IAccessibility2 Implementation 2009-----
+#define LABEL_FORMARTTING_CONDITIONS 5043
+#define LABEL_CONDITIONS 5044
+#define LABEL_CONDITION_VALUE 5045
+//-----IAccessibility2 Implementation 2009
+
#define BTN_OK 31
#define BTN_CANCEL 32
#define BTN_HELP 33
diff --git a/sc/source/ui/inc/condfrmt.hxx b/sc/source/ui/inc/condfrmt.hxx
index 1cb7b8cc83b0..85d7b6e225da 100644
--- a/sc/source/ui/inc/condfrmt.hxx
+++ b/sc/source/ui/inc/condfrmt.hxx
@@ -54,9 +54,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
virtual void AddRefEntry();
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
CheckBox aCbxCond1;
@@ -70,8 +70,6 @@ private:
FixedText aFtCond1Template;
ListBox aLbCond1Template;
PushButton aBtnNew1;
- FixedLine aFlSep1;
-
CheckBox aCbxCond2;
ListBox aLbCond21;
ListBox aLbCond22;
@@ -83,8 +81,6 @@ private:
FixedText aFtCond2Template;
ListBox aLbCond2Template;
PushButton aBtnNew2;
- FixedLine aFlSep2;
-
CheckBox aCbxCond3;
ListBox aLbCond31;
ListBox aLbCond32;
@@ -124,9 +120,10 @@ private:
Size aCond3Size1;
Size aCond3Size2;
Size aCond3Size3;
-
+ FixedLine aFlSep2;
+ FixedLine aFlSep1;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
ScDocument* pDoc;
#ifdef _CONDFRMT_CXX
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
index d7ba96ab526a..5dcdd07d62fe 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -50,7 +50,7 @@ enum ScConflictAction
SC_CONFLICT_ACTION_KEEP_OTHER
};
-typedef ::std::vector< ULONG > ScChangeActionList;
+typedef ::std::vector< sal_uLong > ScChangeActionList;
//=============================================================================
@@ -63,8 +63,8 @@ struct ScConflictsListEntry
ScChangeActionList maSharedActions;
ScChangeActionList maOwnActions;
- bool HasSharedAction( ULONG nSharedAction ) const;
- bool HasOwnAction( ULONG nOwnAction ) const;
+ bool HasSharedAction( sal_uLong nSharedAction ) const;
+ bool HasOwnAction( sal_uLong nOwnAction ) const;
};
@@ -83,10 +83,10 @@ private:
static void Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap );
public:
- static bool HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction );
+ static bool HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction );
- static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction );
- static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction );
+ static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, sal_uLong nSharedAction );
+ static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction );
static void TransformConflictsList( ScConflictsList& rConflictsList,
ScChangeActionMergeMap* pSharedMap, ScChangeActionMergeMap* pOwnMap );
@@ -101,19 +101,19 @@ class ScConflictsFinder
{
private:
ScChangeTrack* mpTrack;
- ULONG mnStartShared;
- ULONG mnEndShared;
- ULONG mnStartOwn;
- ULONG mnEndOwn;
+ sal_uLong mnStartShared;
+ sal_uLong mnEndShared;
+ sal_uLong mnStartOwn;
+ sal_uLong mnEndOwn;
ScConflictsList& mrConflictsList;
static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 );
ScConflictsListEntry* GetIntersectingEntry( const ScChangeAction* pAction ) const;
- ScConflictsListEntry* GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions );
+ ScConflictsListEntry* GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions );
public:
- ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared,
- ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList );
+ ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared,
+ sal_uLong nStartOwn, sal_uLong nEndOwn, ScConflictsList& rConflictsList );
virtual ~ScConflictsFinder();
bool Find();
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index d90a871e8c36..fa4fe9e41651 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -53,10 +53,10 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const { return TRUE; }
+ virtual sal_Bool IsRefInputMode() const { return sal_True; }
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
protected:
virtual void Deactivate();
@@ -100,17 +100,17 @@ private:
ScDocument* pDoc;
ScRangeUtil* pRangeUtil;
ScAreaData* pAreaData;
- USHORT nAreaDataCount;
- USHORT nWhichCons;
+ sal_uInt16 nAreaDataCount;
+ sal_uInt16 nWhichCons;
formula::RefEdit* pRefInputEdit;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
#ifdef _CONSDLG_CXX
private:
void Init ();
void FillAreaLists ();
- BOOL VerifyEdit ( formula::RefEdit* pEd );
+ sal_Bool VerifyEdit ( formula::RefEdit* pEd );
DECL_LINK( OkHdl, void* );
DECL_LINK( ClickHdl, PushButton* );
@@ -118,8 +118,8 @@ private:
DECL_LINK( ModifyHdl, formula::RefEdit* );
DECL_LINK( SelectHdl, ListBox* );
- ScSubTotalFunc LbPosToFunc( USHORT nPos );
- USHORT FuncToLbPos( ScSubTotalFunc eFunc );
+ ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
+ sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
#endif // _CONSDLG_CXX
};
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 03924cc998cf..1de37c004126 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -51,7 +51,7 @@ class ScAreaLink;
#define SC_CONTENT_DRAWING 8
#define SC_CONTENT_COUNT 9
-const ULONG SC_CONTENT_NOCHILD = ~0UL;
+const sal_uLong SC_CONTENT_NOCHILD = ~0UL;
//
// TreeListBox fuer Inhalte
@@ -62,24 +62,24 @@ class ScContentTree : public SvTreeListBox
ScNavigatorDlg* pParentWindow;
ImageList aEntryImages;
SvLBoxEntry* pRootNodes[SC_CONTENT_COUNT];
- USHORT nRootType; // als Root eingestellt
+ sal_uInt16 nRootType; // als Root eingestellt
String aManualDoc; // im Navigator umgeschaltet (Title)
- BOOL bHiddenDoc; // verstecktes aktiv?
+ sal_Bool bHiddenDoc; // verstecktes aktiv?
String aHiddenName; // URL zum Laden
String aHiddenTitle; // fuer Anzeige
ScDocument* pHiddenDocument; // temporaer
- USHORT pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge
+ sal_uInt16 pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge
- static BOOL bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
+ static sal_Bool bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
ScDocShell* GetManualOrCurrent();
- void InitRoot(USHORT nType);
- void ClearType(USHORT nType);
+ void InitRoot(sal_uInt16 nType);
+ void ClearType(sal_uInt16 nType);
void ClearAll();
- void InsertContent( USHORT nType, const String& rValue );
- void GetDrawNames( USHORT nType );
+ void InsertContent( sal_uInt16 nType, const String& rValue );
+ void GetDrawNames( sal_uInt16 nType );
void GetTableNames();
void GetAreaNames();
@@ -90,24 +90,24 @@ class ScContentTree : public SvTreeListBox
void GetDrawingNames();
void GetNoteStrings();
- static bool IsPartOfType( USHORT nContentType, USHORT nObjIdentifier );
+ static bool IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier );
- BOOL DrawNamesChanged( USHORT nType );
- BOOL NoteStringsChanged();
+ sal_Bool DrawNamesChanged( sal_uInt16 nType );
+ sal_Bool NoteStringsChanged();
- ScAddress GetNotePos( ULONG nIndex );
- const ScAreaLink* GetLink( ULONG nIndex );
+ ScAddress GetNotePos( sal_uLong nIndex );
+ const ScAreaLink* GetLink( sal_uLong nIndex );
/** Returns the indexes of the specified listbox entry.
@param rnRootIndex Root index of specified entry is returned.
@param rnChildIndex Index of the entry inside its root is returned (or SC_CONTENT_NOCHILD if entry is root).
@param pEntry The entry to examine. */
- void GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const;
+ void GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const;
/** Returns the child index of the specified listbox entry.
@param pEntry The entry to examine or NULL for the selected entry.
@return Index of the entry inside its root or SC_CONTENT_NOCHILD if entry is root. */
- ULONG GetChildIndex( SvLBoxEntry* pEntry ) const;
+ sal_uLong GetChildIndex( SvLBoxEntry* pEntry ) const;
void DoDrag();
@@ -117,8 +117,8 @@ class ScContentTree : public SvTreeListBox
DECL_STATIC_LINK( ScContentTree, ExecDragHdl, void* );
protected:
-// virtual BOOL Drop( const DropEvent& rEvt );
-// virtual BOOL QueryDrop( DropEvent& rEvt );
+// virtual sal_Bool Drop( const DropEvent& rEvt );
+// virtual sal_Bool QueryDrop( DropEvent& rEvt );
using SvTreeListBox::ExecuteDrop;
@@ -137,18 +137,18 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
- void InitWindowBits( BOOL bButtons );
+ void InitWindowBits( sal_Bool bButtons );
- void Refresh( USHORT nType = 0 );
+ void Refresh( sal_uInt16 nType = 0 );
void ToggleRoot();
- void SetRootType( USHORT nNew );
- USHORT GetRootType() const { return nRootType; }
+ void SetRootType( sal_uInt16 nNew );
+ sal_uInt16 GetRootType() const { return nRootType; }
void ActiveDocChanged();
void ResetManualDoc();
void SetManualDoc(const String& rName);
- BOOL LoadFile(const String& rUrl);
+ sal_Bool LoadFile(const String& rUrl);
void SelectDoc(const String& rName);
const String& GetHiddenTitle() const { return aHiddenTitle; }
@@ -158,7 +158,7 @@ public:
/** Stores the current listbox state in the navigator settings. */
void StoreSettings() const;
- static BOOL IsInDrag() { return bIsInDrag; }
+ static sal_Bool IsInDrag() { return bIsInDrag; }
};
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
index fcf692500351..87662e0f3da1 100644
--- a/sc/source/ui/inc/corodlg.hxx
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -42,8 +42,8 @@ class ScColRowLabelDlg : public ModalDialog
{
public:
ScColRowLabelDlg( Window* pParent,
- BOOL bCol = FALSE,
- BOOL bRow = FALSE )
+ sal_Bool bCol = false,
+ sal_Bool bRow = false )
: ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ),
aFlColRow ( this, ScResId(6) ),
aBtnRow ( this, ScResId(2) ),
@@ -57,8 +57,8 @@ public:
aBtnRow.Check( bRow );
}
- BOOL IsCol() { return aBtnCol.IsChecked(); }
- BOOL IsRow() { return aBtnRow.IsChecked(); }
+ sal_Bool IsCol() { return aBtnCol.IsChecked(); }
+ sal_Bool IsRow() { return aBtnRow.IsChecked(); }
private:
FixedLine aFlColRow;
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
index 544926756286..648544ee117f 100644
--- a/sc/source/ui/inc/crdlg.hxx
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include "scui_def.hxx"
@@ -43,7 +43,7 @@ public:
ScColOrRowDlg( Window* pParent,
const String& rStrTitle,
const String& rStrLabel,
- BOOL bColDefault = TRUE );
+ sal_Bool bColDefault = sal_True );
~ScColOrRowDlg();
private:
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index 8a8540bbd5d8..7c5c58b9bc5d 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -51,9 +51,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlAssign;
@@ -84,15 +84,15 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
#ifdef _CRNRDLG_CXX
private:
void Init ();
void UpdateNames ();
- void UpdateRangeData ( const ScRange& rRange, BOOL bColName );
- void SetColRowData( const ScRange& rLabelRange,BOOL bRef=FALSE);
- void AdjustColRowData( const ScRange& rDataRange,BOOL bRef=FALSE);
+ void UpdateRangeData ( const ScRange& rRange, sal_Bool bColName );
+ void SetColRowData( const ScRange& rLabelRange,sal_Bool bRef=false);
+ void AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef=false);
DECL_LINK( CancelBtnHdl, void * );
DECL_LINK( OkBtnHdl, void * );
DECL_LINK( AddBtnHdl, void * );
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 3d2d01da8b0f..c0c1f99cc5da 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -78,7 +78,7 @@ public:
virtual void SetPosSizePixel(
long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
/** Apply current layout data to the ruler. */
void ApplyLayout( const ScCsvLayoutData& rOldData );
@@ -90,7 +90,7 @@ private:
SC_DLLPRIVATE void InitSizeData();
/** Moves cursor to a new position.
- @param bScroll TRUE = The method may scroll the ruler. */
+ @param bScroll sal_True = The method may scroll the ruler. */
SC_DLLPRIVATE void MoveCursor( sal_Int32 nPos, bool bScroll = true );
/** Moves cursor to the given direction. */
SC_DLLPRIVATE void MoveCursorRel( ScMoveMode eDir );
@@ -151,7 +151,7 @@ private:
/** Moves tracking to a new position. */
SC_DLLPRIVATE void MoveMouseTracking( sal_Int32 nPos );
/** Applies tracking action for the current tracking position.
- @param bApply TRUE = apply action, FALSE = cancel action. */
+ @param bApply sal_True = apply action, sal_False = cancel action. */
SC_DLLPRIVATE void EndMouseTracking( bool bApply );
// painting ---------------------------------------------------------------
diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx
index 6c3ba731a342..54eefe20f520 100644
--- a/sc/source/ui/inc/dapitype.hxx
+++ b/sc/source/ui/inc/dapitype.hxx
@@ -52,7 +52,7 @@ private:
HelpButton aBtnHelp;
public:
- ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal );
+ ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal );
~ScDataPilotSourceTypeDlg();
bool IsDatabase() const;
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index b9a338ff0289..5742e7ac8550 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -81,7 +81,7 @@ private:
SCROW nStartRow;
SCROW nEndRow;
SCTAB nTab;
- BOOL bNoSelection;
+ sal_Bool bNoSelection;
FixedText** pFixedTexts;
Edit** pEdits;
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
index aad57b0502f1..132eb9a3750b 100644
--- a/sc/source/ui/inc/dbdocfun.hxx
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -82,42 +82,42 @@ public:
void UpdateImport( const String& rTarget, const String& rDBName,
const String& rTableName, const String& rStatement,
- BOOL bNative, BYTE nType,
+ sal_Bool bNative, sal_uInt8 nType,
const ::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet >& xResultSet,
const SbaSelectionList* pSelection );
- BOOL DoImport( SCTAB nTab, const ScImportParam& rParam,
+ sal_Bool DoImport( SCTAB nTab, const ScImportParam& rParam,
const ::com::sun::star::uno::Reference<
::com::sun::star::sdbc::XResultSet >& xResultSet,
- const SbaSelectionList* pSelection, BOOL bRecord,
- BOOL bAddrInsert = FALSE );
+ const SbaSelectionList* pSelection, sal_Bool bRecord,
+ sal_Bool bAddrInsert = false );
- BOOL DoImportUno( const ScAddress& rPos,
+ sal_Bool DoImportUno( const ScAddress& rPos,
const com::sun::star::uno::Sequence<
com::sun::star::beans::PropertyValue>& aArgs );
static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame );
- BOOL Sort( SCTAB nTab, const ScSortParam& rSortParam,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool Sort( SCTAB nTab, const ScSortParam& rSortParam,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- SC_DLLPUBLIC BOOL Query( SCTAB nTab, const ScQueryParam& rQueryParam,
- const ScRange* pAdvSource, BOOL bRecord, BOOL bApi );
+ SC_DLLPUBLIC sal_Bool Query( SCTAB nTab, const ScQueryParam& rQueryParam,
+ const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi );
- BOOL DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
+ sal_Bool DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
const ScSortParam* pForceNewSort,
- BOOL bRecord, BOOL bApi );
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL AddDBRange( const String& rName, const ScRange& rRange, BOOL bApi );
- BOOL DeleteDBRange( const String& rName, BOOL bApi );
- BOOL RenameDBRange( const String& rOld, const String& rNew, BOOL bApi );
- BOOL ModifyDBData( const ScDBData& rNewData, BOOL bApi ); // Name unveraendert
+ sal_Bool AddDBRange( const String& rName, const ScRange& rRange, sal_Bool bApi );
+ sal_Bool DeleteDBRange( const String& rName, sal_Bool bApi );
+ sal_Bool RenameDBRange( const String& rOld, const String& rNew, sal_Bool bApi );
+ sal_Bool ModifyDBData( const ScDBData& rNewData, sal_Bool bApi ); // Name unveraendert
- BOOL RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi );
+ sal_Bool RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi );
- BOOL DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
- BOOL bRecord, BOOL bApi, BOOL bAllowMove = FALSE );
+ sal_Bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
+ sal_Bool bRecord, sal_Bool bApi, sal_Bool bAllowMove = false );
};
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 6c04731e341f..823b4509fcc5 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -58,37 +58,37 @@ public:
// nur UISort wiederholt bei Bedarf die Teilergebnisse
void UISort( const ScSortParam& rSortParam,
- BOOL bRecord = TRUE );
+ sal_Bool bRecord = sal_True );
void Sort( const ScSortParam& rSortParam,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam,
- const ScRange* pAdvSource, BOOL bRecord );
- void DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord = TRUE,
+ const ScRange* pAdvSource, sal_Bool bRecord );
+ void DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord = sal_True,
const ScSortParam* pForceNewSort = NULL );
void ToggleAutoFilter();
void HideAutoFilter();
- void RepeatDB( BOOL bRecord = TRUE );
+ void RepeatDB( sal_Bool bRecord = sal_True );
- BOOL ImportData( const ScImportParam& rParam, BOOL bRecord = TRUE );
+ sal_Bool ImportData( const ScImportParam& rParam, sal_Bool bRecord = sal_True );
void GotoDBArea( const String& rDBName );
// DB-Bereich vom Cursor
- ScDBData* GetDBData( BOOL bMarkArea = TRUE, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP, bool bShrinkToData = false, bool bExpandRows = false );
+ ScDBData* GetDBData( sal_Bool bMarkArea = true, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP, bool bShrinkToData = false, bool bExpandRows = false );
void NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& rDelAreaList );
- void Consolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
+ void Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True );
- bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable,
- const ScDPObject& rSource, BOOL bApi = FALSE );
+ bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable,
+ const ScDPObject& rSource, sal_Bool bApi = false );
void DeletePivotTable();
void RecalcPivotTable();
- BOOL HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
- BOOL HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
+ sal_Bool HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
+ sal_Bool HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
void GroupDataPilot();
void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts );
void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo );
@@ -96,35 +96,35 @@ public:
void DataPilotInput( const ScAddress& rPos, const String& rString );
bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL );
- BOOL DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
+ sal_Bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
- BOOL HasSelectionForDrillDown( USHORT& rOrientation );
- void SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName = NULL );
+ sal_Bool HasSelectionForDrillDown( sal_uInt16& rOrientation );
+ void SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName = NULL );
void ShowDataPilotSourceData( ScDPObject& rDPObj,
const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters );
- void MakeOutline( BOOL bColumns, BOOL bRecord = TRUE );
- void RemoveOutline( BOOL bColumns, BOOL bRecord = TRUE );
- void RemoveAllOutlines( BOOL bRecord = TRUE );
- void TestRemoveOutline( BOOL& rCol, BOOL& rRow );
+ void MakeOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True );
+ void RemoveOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True );
+ void RemoveAllOutlines( sal_Bool bRecord = sal_True );
+ void TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow );
- void AutoOutline( BOOL bRecord = TRUE );
+ void AutoOutline( sal_Bool bRecord = sal_True );
- void SelectLevel( BOOL bColumns, USHORT nLevel,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
- void ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
- void HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ void SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
+ void ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
+ void HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
- void ShowMarkedOutlines( BOOL bRecord = TRUE );
- void HideMarkedOutlines( BOOL bRecord = TRUE );
- BOOL OutlinePossible(BOOL bHide);
+ void ShowMarkedOutlines( sal_Bool bRecord = sal_True );
+ void HideMarkedOutlines( sal_Bool bRecord = sal_True );
+ sal_Bool OutlinePossible(sal_Bool bHide);
- void UpdateCharts(BOOL bAllCharts = FALSE); // Default: am Cursor
+ void UpdateCharts(sal_Bool bAllCharts = false); // Default: am Cursor
- static USHORT DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts );
+ static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts );
};
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index cd7f757f3937..a2df8f728379 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -53,9 +53,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlName;
@@ -80,7 +80,7 @@ private:
PushButton aBtnRemove;
MoreButton aBtnMore;
- BOOL bSaved;
+ sal_Bool bSaved;
const String aStrAdd; // "Hinzufuegen"
@@ -93,7 +93,7 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- BOOL bRefInputMode;
+ sal_Bool bRefInputMode;
ScAddress::Details aAddrDetails;
ScDBCollection aLocalDbCol;
diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx
index e1bbcc0f9b59..59cb84e5f3a7 100644
--- a/sc/source/ui/inc/delcldlg.hxx
+++ b/sc/source/ui/inc/delcldlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
@@ -53,7 +53,7 @@ private:
public:
- ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove = FALSE );
+ ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove = false );
~ScDeleteCellDlg();
DelCellCmd GetDelCellCmd() const;
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index 15050229b507..d7a203f75dea 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include "global.hxx"
//------------------------------------------------------------------------
@@ -52,21 +52,21 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- BOOL bObjectsDisabled;
+ sal_Bool bObjectsDisabled;
- static BOOL bPreviousAllCheck;
- static USHORT nPreviousChecks;
+ static sal_Bool bPreviousAllCheck;
+ static sal_uInt16 nPreviousChecks;
- void DisableChecks( BOOL bDelAllChecked = TRUE );
+ void DisableChecks( sal_Bool bDelAllChecked = sal_True );
DECL_LINK( DelAllHdl, void * );
public:
ScDeleteContentsDlg( Window* pParent,
- USHORT nCheckDefaults = 0 );
+ sal_uInt16 nCheckDefaults = 0 );
~ScDeleteContentsDlg();
void DisableObjects();
- USHORT GetDelContentsCmdBits() const;
+ sal_uInt16 GetDelContentsCmdBits() const;
};
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 8fb4fcd83e76..0719b640072b 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -59,11 +59,11 @@ class ScDocFunc
private:
ScDocShell& rDocShell;
- BOOL AdjustRowHeight( const ScRange& rRange, BOOL bPaint = TRUE );
+ sal_Bool AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint = true );
void CreateOneName( ScRangeName& rList,
SCCOL nPosX, SCROW nPosY, SCTAB nTab,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL& rCancel, BOOL bApi );
+ sal_Bool& rCancel, sal_Bool bApi );
void NotifyInputHandler( const ScAddress& rPos );
public:
@@ -72,29 +72,29 @@ public:
DECL_LINK( NotifyDrawUndo, SdrUndoAction* );
- BOOL DetectiveAddPred(const ScAddress& rPos);
- BOOL DetectiveDelPred(const ScAddress& rPos);
- BOOL DetectiveAddSucc(const ScAddress& rPos);
- BOOL DetectiveDelSucc(const ScAddress& rPos);
- BOOL DetectiveAddError(const ScAddress& rPos);
- BOOL DetectiveMarkInvalid(SCTAB nTab);
- BOOL DetectiveDelAll(SCTAB nTab);
- BOOL DetectiveRefresh(BOOL bAutomatic = FALSE);
+ sal_Bool DetectiveAddPred(const ScAddress& rPos);
+ sal_Bool DetectiveDelPred(const ScAddress& rPos);
+ sal_Bool DetectiveAddSucc(const ScAddress& rPos);
+ sal_Bool DetectiveDelSucc(const ScAddress& rPos);
+ sal_Bool DetectiveAddError(const ScAddress& rPos);
+ sal_Bool DetectiveMarkInvalid(SCTAB nTab);
+ sal_Bool DetectiveDelAll(SCTAB nTab);
+ sal_Bool DetectiveRefresh(sal_Bool bAutomatic = false);
void DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens);
void DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens);
- BOOL DeleteContents( const ScMarkData& rMark, USHORT nFlags,
- BOOL bRecord, BOOL bApi );
+ sal_Bool DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
- BOOL bRecord, BOOL bApi );
+ sal_Bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi );
- BOOL PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi );
- BOOL PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
- BOOL bInterpret, BOOL bApi );
- BOOL SetCellText( const ScAddress& rPos, const String& rText,
- BOOL bInterpret, BOOL bEnglish, BOOL bApi,
+ sal_Bool SetNormalString( const ScAddress& rPos, const String& rText, sal_Bool bApi );
+ sal_Bool PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi );
+ sal_Bool PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
+ sal_Bool bInterpret, sal_Bool bApi );
+ sal_Bool SetCellText( const ScAddress& rPos, const String& rText,
+ sal_Bool bInterpret, sal_Bool bEnglish, sal_Bool bApi,
const String& rFormulaNmsp,
const formula::FormulaGrammar::Grammar eGrammar );
@@ -105,91 +105,91 @@ public:
bool ShowNote( const ScAddress& rPos, bool bShow = true );
inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); }
- bool SetNoteText( const ScAddress& rPos, const String& rNoteText, BOOL bApi );
- bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi );
+ bool SetNoteText( const ScAddress& rPos, const String& rNoteText, sal_Bool bApi );
+ bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, sal_Bool bApi );
- BOOL ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
- BOOL bRecord, BOOL bApi );
- BOOL ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
- BOOL bRecord, BOOL bApi );
+ sal_Bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
+ sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL InsertCells( const ScRange& rRange,const ScMarkData* pTabMark,
- InsCellCmd eCmd, BOOL bRecord, BOOL bApi,
- BOOL bPartOfPaste = FALSE );
- BOOL DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
- DelCellCmd eCmd, BOOL bRecord, BOOL bApi );
+ sal_Bool InsertCells( const ScRange& rRange,const ScMarkData* pTabMark,
+ InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bApi,
+ sal_Bool bPartOfPaste = false );
+ sal_Bool DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
+ DelCellCmd eCmd, sal_Bool bRecord, sal_Bool bApi );
- BOOL MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- BOOL InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
- BOOL RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
- BOOL DeleteTable( SCTAB nTab, BOOL bRecord, BOOL bApi );
+ sal_Bool InsertTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool RenameTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi );
bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
- BOOL SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi );
+ sal_Bool SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi );
- BOOL SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi );
+ sal_Bool SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool bApi );
- SC_DLLPUBLIC BOOL SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
- SCTAB nTab, ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bApi );
+ SC_DLLPUBLIC sal_Bool SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ SCTAB nTab, ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bApi );
- BOOL InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL bApi );
- BOOL RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
- BOOL bRecord, BOOL bSetModified, BOOL bApi );
+ sal_Bool InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi );
+ sal_Bool RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos,
+ sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi );
void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
- BOOL Protect( SCTAB nTab, const String& rPassword, BOOL bApi );
- BOOL Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi );
+ sal_Bool Protect( SCTAB nTab, const String& rPassword, sal_Bool bApi );
+ sal_Bool Unprotect( SCTAB nTab, const String& rPassword, sal_Bool bApi );
- BOOL ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi );
- BOOL ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi );
- BOOL AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
- USHORT nFormatNo, BOOL bRecord, BOOL bApi );
+ sal_Bool ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi );
+ sal_Bool ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi );
+ sal_Bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_uInt16 nFormatNo, sal_Bool bRecord, sal_Bool bApi );
- BOOL EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_Bool EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
const ScTokenArray* pTokenArray,
- const String& rString, BOOL bApi, BOOL bEnglish,
+ const String& rString, sal_Bool bApi, sal_Bool bEnglish,
const String& rFormulaNmsp,
const formula::FormulaGrammar::Grammar );
- BOOL TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
- const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi );
+ sal_Bool TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi );
- BOOL FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, BOOL bRecord, BOOL bApi );
- BOOL FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
+ sal_Bool FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
- BOOL bRecord, BOOL bApi );
+ sal_Bool bRecord, sal_Bool bApi );
// FillAuto: rRange wird von Source-Range auf Dest-Range angepasst
- SC_DLLPUBLIC BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi );
+ SC_DLLPUBLIC sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, sal_Bool bRecord, sal_Bool bApi );
- BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi );
+ sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi );
- BOOL ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi );
+ sal_Bool ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi );
- BOOL MergeCells( const ScCellMergeOption& rOption, BOOL bContents,
- BOOL bRecord, BOOL bApi );
- BOOL UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi );
- bool UnmergeCells( const ScCellMergeOption& rOption, BOOL bRecord, BOOL bApi );
+ sal_Bool MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents,
+ sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
+ bool UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord, sal_Bool bApi );
bool SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true ); // takes ownership of pNewRanges
bool ModifyRangeNames( const ScRangeName& rNewRanges );
- BOOL CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi );
- BOOL InsertNameList( const ScAddress& rStartPos, BOOL bApi );
+ sal_Bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi );
+ sal_Bool InsertNameList( const ScAddress& rStartPos, sal_Bool bApi );
- BOOL InsertAreaLink( const String& rFile, const String& rFilter,
+ sal_Bool InsertAreaLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- const ScRange& rDestRange, ULONG nRefresh,
- BOOL bFitBlock, BOOL bApi );
+ const ScRange& rDestRange, sal_uLong nRefresh,
+ sal_Bool bFitBlock, sal_Bool bApi );
};
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index a88cbf575376..4f3cefbd68a6 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -50,7 +50,6 @@
class ScEditEngineDefaulter;
class FontList;
-class PrintDialog;
class SfxStyleSheetBasePool;
class SfxStyleSheetHint;
struct ChartSelectionInfo;
@@ -79,7 +78,7 @@ struct ScColWidthParam;
namespace sfx2 { class FileDialogHelper; }
struct DocShell_Impl;
-typedef ::boost::unordered_map< ULONG, ULONG > ScChangeActionMergeMap;
+typedef ::boost::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap;
//==================================================================
@@ -107,16 +106,16 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
//SfxObjectCreateMode eShellMode;
- BOOL bIsInplace; // wird von der View gesetzt
- BOOL bHeaderOn;
- BOOL bFooterOn;
- BOOL bNoInformLost;
- BOOL bIsEmpty;
- BOOL bIsInUndo;
- BOOL bDocumentModifiedPending;
- USHORT nDocumentLock;
+ sal_Bool bIsInplace; // wird von der View gesetzt
+ sal_Bool bHeaderOn;
+ sal_Bool bFooterOn;
+ sal_Bool bNoInformLost;
+ sal_Bool bIsEmpty;
+ sal_Bool bIsInUndo;
+ sal_Bool bDocumentModifiedPending;
+ sal_uInt16 nDocumentLock;
sal_Int16 nCanUpdate; // stores the UpdateDocMode from loading a document till update links
- BOOL bUpdateEnabled;
+ sal_Bool bUpdateEnabled;
ScDBData* pOldAutoDBRange;
@@ -150,23 +149,23 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
ScDocShell & mrDocShell;
};
- SC_DLLPRIVATE BOOL LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
- SC_DLLPRIVATE BOOL SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ SC_DLLPRIVATE sal_Bool LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ SC_DLLPRIVATE sal_Bool SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
SC_DLLPRIVATE SCTAB GetSaveTab();
- SC_DLLPRIVATE ULONG DBaseImport( const String& rFullFileName, CharSet eCharSet,
+ SC_DLLPRIVATE sal_uLong DBaseImport( const String& rFullFileName, CharSet eCharSet,
ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc );
- SC_DLLPRIVATE ULONG DBaseExport( const String& rFullFileName, CharSet eCharSet,
- BOOL& bHasMemo );
+ SC_DLLPRIVATE sal_uLong DBaseExport( const String& rFullFileName, CharSet eCharSet,
+ sal_Bool& bHasMemo );
- SC_DLLPRIVATE static BOOL MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
- SC_DLLPRIVATE static BOOL KillFile( const INetURLObject& rURL );
- SC_DLLPRIVATE static BOOL IsDocument( const INetURLObject& rURL );
+ SC_DLLPRIVATE static sal_Bool MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
+ SC_DLLPRIVATE static sal_Bool KillFile( const INetURLObject& rURL );
+ SC_DLLPRIVATE static sal_Bool IsDocument( const INetURLObject& rURL );
- SC_DLLPRIVATE void LockPaint_Impl(BOOL bDoc);
- SC_DLLPRIVATE void UnlockPaint_Impl(BOOL bDoc);
- SC_DLLPRIVATE void LockDocument_Impl(USHORT nNew);
- SC_DLLPRIVATE void UnlockDocument_Impl(USHORT nNew);
+ SC_DLLPRIVATE void LockPaint_Impl(sal_Bool bDoc);
+ SC_DLLPRIVATE void UnlockPaint_Impl(sal_Bool bDoc);
+ SC_DLLPRIVATE void LockDocument_Impl(sal_uInt16 nNew);
+ SC_DLLPRIVATE void UnlockDocument_Impl(sal_uInt16 nNew);
SC_DLLPRIVATE void EnableSharedSettings( bool bEnable );
SC_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > LoadSharedDocument();
@@ -188,14 +187,15 @@ public:
~ScDocShell();
using SotObject::GetInterface;
- using SfxShell::Activate; // with BOOL bMDI
- using SfxShell::Deactivate; // with BOOL bMDI
+ using SfxShell::Activate; // with sal_Bool bMDI
+ using SfxShell::Deactivate; // with sal_Bool bMDI
using SfxObjectShell::Print; // print styles
virtual void Activate();
virtual void Deactivate();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
virtual void FillClass( SvGlobalName * pClassName,
sal_uInt32 * pFormat,
@@ -203,40 +203,40 @@ public:
String * pFullTypeName,
String * pShortTypeName,
sal_Int32 nFileFormat,
- sal_Bool bTemplate = sal_False ) const;
-
- virtual BOOL InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
- virtual BOOL Load( SfxMedium& rMedium );
- virtual BOOL LoadFrom( SfxMedium& rMedium );
- virtual BOOL ConvertFrom( SfxMedium &rMedium );
- virtual BOOL Save();
- virtual BOOL SaveAs( SfxMedium& rMedium );
- virtual BOOL ConvertTo( SfxMedium &rMedium );
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ sal_Bool bTemplate = false ) const;
+
+ virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ virtual sal_Bool Load( SfxMedium& rMedium );
+ virtual sal_Bool LoadFrom( SfxMedium& rMedium );
+ virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveAs( SfxMedium& rMedium );
+ virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = false );
virtual void PrepareReload();
- virtual BOOL IsInformationLost();
+ virtual sal_Bool IsInformationLost();
virtual void LoadStyles( SfxObjectShell &rSource );
- virtual BOOL Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3,
- USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted );
+ virtual sal_Bool Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3,
+ sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted );
- virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
- virtual BOOL DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
- virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
+ virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
+ virtual sal_Bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
+ virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId );
virtual void Draw( OutputDevice *, const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT );
+ sal_uInt16 nAspect = ASPECT_CONTENT );
virtual void SetVisArea( const Rectangle & rVisArea );
using SfxObjectShell::GetVisArea;
- virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const;
virtual Printer* GetDocumentPrinter();
- virtual void SetModified( BOOL = TRUE );
+ virtual void SetModified( sal_Bool = sal_True );
- void SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart );
+ void SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifyStart );
virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( Window *pParent,
const SfxItemSet &rSet );
@@ -246,8 +246,8 @@ public:
ScDocument* GetDocument() { return &aDocument; }
ScDocFunc& GetDocFunc() { return *pDocFunc; }
- SfxPrinter* GetPrinter( BOOL bCreateIfNotExist = TRUE );
- USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL );
+ SfxPrinter* GetPrinter( sal_Bool bCreateIfNotExist = sal_True );
+ sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL );
void UpdateFontList();
@@ -266,63 +266,56 @@ public:
void GetStatePageStyle( SfxViewShell& rCaller, SfxItemSet& rSet, SCTAB nCurTab );
void CompareDocument( ScDocument& rOtherDoc );
- void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, ULONG nOffset = 0, ScChangeActionMergeMap* pMergeMap = NULL, bool bInverseMap = false );
+ void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, sal_uLong nOffset = 0, ScChangeActionMergeMap* pMergeMap = NULL, bool bInverseMap = false );
bool MergeSharedDocument( ScDocShell* pSharedDocShell );
ScChangeAction* GetChangeAction( const ScAddress& rPos );
void SetChangeComment( ScChangeAction* pAction, const String& rComment );
- void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext=TRUE );
+ void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,sal_Bool bPrevNext=sal_True );
/// Protect/unprotect ChangeTrack and return <TRUE/> if
/// protection was successfully changed.
- /// If bJustQueryIfProtected==TRUE protection is not
+ /// If bJustQueryIfProtected==sal_True protection is not
/// changed and <TRUE/> is returned if not protected or
/// password was entered correctly.
- BOOL ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected = FALSE );
+ sal_Bool ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected = false );
- void SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages );
- BOOL AdjustPrintZoom( const ScRange& rRange );
+ void SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages );
+ sal_Bool AdjustPrintZoom( const ScRange& rRange );
- void LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles );
+ void LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles );
- void PageStyleModified( const String& rStyleName, BOOL bApi );
+ void PageStyleModified( const String& rStyleName, sal_Bool bApi );
void NotifyStyle( const SfxStyleSheetHint& rHint );
void DoAutoStyle( const ScRange& rRange, const String& rStyle );
Window* GetActiveDialogParent();
- void ErrorMessage( USHORT nGlobStrId );
- BOOL IsEditable() const;
+ void ErrorMessage( sal_uInt16 nGlobStrId );
+ sal_Bool IsEditable() const;
- BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
+ sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
void RefreshPivotTables( const ScRange& rSource );
- void DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
- void UseScenario( SCTAB nTab, const String& rName, BOOL bRecord = TRUE );
+ void DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True );
+ void UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord = sal_True );
SCTAB MakeScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags,
- ScMarkData& rMark, BOOL bRecord = TRUE );
+ const Color& rColor, sal_uInt16 nFlags,
+ ScMarkData& rMark, sal_Bool bRecord = sal_True );
void ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
- ULONG TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bNotifyAndPaint );
+ const Color& rColor, sal_uInt16 nFlags );
+ sal_uLong TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bNotifyAndPaint );
- BOOL MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord );
+ sal_Bool MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, sal_Bool bRecord );
- void DoRecalc( BOOL bApi );
- void DoHardRecalc( BOOL bApi );
+ void DoRecalc( sal_Bool bApi );
+ void DoHardRecalc( sal_Bool bApi );
- bool CheckPrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData,
- bool bForceSelected, bool bIsAPI );
- void PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData );
- void Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
- ScMarkData* pMarkData, Window* pDialogParent,
- BOOL bForceSelected, BOOL bIsAPI );
-
- void UpdateOle( const ScViewData* pViewData, BOOL bSnapSize = FALSE );
- BOOL IsOle();
+ void UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize = false);
+ sal_Bool IsOle();
void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel );
@@ -331,35 +324,37 @@ public:
virtual void ReconnectDdeLink(SfxObjectShell& rServer);
void UpdateLinks(); // Link-Eintraege aktuallisieren
- BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
+ sal_Bool ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
virtual void CheckConfigOptions();
void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart,
- USHORT nExtFlags = 0 );
- void PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags = 0 );
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart,
+ sal_uInt16 nExtFlags = 0 );
+ void PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags = 0 );
void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
void PostPaintCell( const ScAddress& rPos );
void PostPaintGridAll();
void PostPaintExtras();
+ bool IsPaintLocked() const { return pPaintLockData != NULL; }
+
void PostDataChanged();
- void UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+ void UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab );
- void UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange );
+ void UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange );
- void SetDocumentModified( BOOL bIsModified = TRUE );
- void SetDrawModified( BOOL bIsModified = TRUE );
+ void SetDocumentModified( sal_Bool bIsModified = sal_True );
+ void SetDrawModified( sal_Bool bIsModified = sal_True );
void LockPaint();
void UnlockPaint();
- USHORT GetLockCount() const;
- void SetLockCount(USHORT nNew);
+ sal_uInt16 GetLockCount() const;
+ void SetLockCount(sal_uInt16 nNew);
void LockDocument();
void UnlockDocument();
@@ -368,19 +363,19 @@ public:
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
- void SetInplace( BOOL bInplace );
- BOOL IsEmpty() const;
- void SetEmpty(BOOL bSet);
+ void SetInplace( sal_Bool bInplace );
+ sal_Bool IsEmpty() const;
+ void SetEmpty(sal_Bool bSet);
- BOOL IsInUndo() const { return bIsInUndo; }
- void SetInUndo(BOOL bSet);
+ sal_Bool IsInUndo() const { return bIsInUndo; }
+ void SetInUndo(sal_Bool bSet);
void CalcOutputFactor();
double GetOutputFactor() const;
void GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
SCTAB nCurTab,
- BOOL& rbHeader,
- BOOL& rbFooter );
+ sal_Bool& rbHeader,
+ sal_Bool& rbFooter );
virtual long DdeGetData( const String& rItem, const String& rMimeType,
::com::sun::star::uno::Any & rValue );
@@ -392,17 +387,17 @@ public:
SfxBindings* GetViewBindings();
- ScTabViewShell* GetBestViewShell( BOOL bOnlyVisible = TRUE );
+ ScTabViewShell* GetBestViewShell( sal_Bool bOnlyVisible = sal_True );
ScSbxDocHelper* GetDocHelperObject() { return pDocHelper; }
- void SetDocumentModifiedPending( BOOL bVal )
+ void SetDocumentModifiedPending( sal_Bool bVal )
{ bDocumentModifiedPending = bVal; }
- BOOL IsDocumentModifiedPending() const
+ sal_Bool IsDocumentModifiedPending() const
{ return bDocumentModifiedPending; }
- BOOL IsUpdateEnabled() const
+ sal_Bool IsUpdateEnabled() const
{ return bUpdateEnabled; }
- void SetUpdateEnabled(BOOL bValue)
+ void SetUpdateEnabled(sal_Bool bValue)
{ bUpdateEnabled = bValue; }
OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
@@ -410,7 +405,7 @@ public:
static ScViewData* GetViewData();
static SCTAB GetCurTab();
- static ScDocShell* GetShellByNum( USHORT nDocNo );
+ static ScDocShell* GetShellByNum( sal_uInt16 nDocNo );
static String GetOwnFilterName();
static String GetHtmlFilterName();
static String GetWebQueryFilterName();
@@ -418,7 +413,7 @@ public:
static String GetLotusFilterName();
static String GetDBaseFilterName();
static String GetDifFilterName();
- static BOOL HasAutomaticTableName( const String& rFilter );
+ static sal_Bool HasAutomaticTableName( const String& rFilter );
DECL_LINK( RefreshDBDataHdl, ScRefreshTimer* );
@@ -462,8 +457,8 @@ class SC_DLLPUBLIC ScDocShellModificator
{
ScDocShell& rDocShell;
ScRefreshTimerProtector aProtector;
- BOOL bAutoCalcShellDisabled;
- BOOL bIdleDisabled;
+ sal_Bool bAutoCalcShellDisabled;
+ sal_Bool bIdleDisabled;
// not implemented
ScDocShellModificator( const ScDocShellModificator& );
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 489e6b23e05d..ec868b9e8ba0 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -115,7 +115,7 @@ public:
virtual void execute() = 0;
};
- explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel = 0);
+ explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel = 0);
virtual ~ScMenuFloatingWindow();
virtual void MouseMove(const MouseEvent& rMEvt);
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index e0a9ee9674eb..17296dcbce10 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -77,13 +77,13 @@ public:
void StateFormatPaintbrush(SfxItemSet& rSet);
void ExecuteMacroAssign( SdrObject* pObj, Window* pWin );
- void ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
- void ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
- void ExecuteTextAttrDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+ void ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
+ void ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
+ void ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
ScDrawView* GetDrawView();
- BOOL AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark);
+ sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark);
};
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index b49cd1488453..ca3eb42e208a 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -49,7 +49,7 @@ class ScDrawView: public FmFormView
Fraction aScaleY;
SdrDropMarkerOverlay* pDropMarker;
SdrObject* pDropMarkObj;
- BOOL bInConstruct;
+ sal_Bool bInConstruct;
void Construct();
void UpdateBrowser();
@@ -77,12 +77,12 @@ public:
void MarkDropObj( SdrObject* pObj );
- void SetMarkedToLayer( BYTE nLayerNo );
+ void SetMarkedToLayer( sal_uInt8 nLayerNo );
void InvalidateAttribs();
void InvalidateDrawTextAttrs();
- BOOL BeginDrag( Window* pWindow, const Point& rStartPos );
+ sal_Bool BeginDrag( Window* pWindow, const Point& rStartPos );
void DoCut();
void DoCopy();
@@ -102,16 +102,16 @@ public:
void UpdateIMap( SdrObject* pObj );
- USHORT GetPopupMenuId();
+ sal_uInt16 GetPopupMenuId();
void UpdateUserViewOptions();
void SetMarkedOriginalSize();
- BOOL SelectObject( const String& rName );
+ sal_Bool SelectObject( const String& rName );
bool HasMarkedControl() const;
bool HasMarkedInternal() const;
- bool InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0);
+ bool InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, sal_uLong nOptions=0);
/** Returns the selected object, if it is the caption object of a cell note.
@param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
index 4baea1857e55..ae6be419b942 100644
--- a/sc/source/ui/inc/drtxtob.hxx
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -35,7 +35,7 @@
#include "shellids.hxx"
-USHORT ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId()
+sal_uInt16 ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId()
class ScViewData;
class TransferableDataHelper;
@@ -45,7 +45,7 @@ class ScDrawTextObjectBar : public SfxShell
{
ScViewData* pViewData;
TransferableClipboardListener* pClipEvtLstnr;
- BOOL bPastePossible;
+ sal_Bool bPastePossible;
DECL_LINK( ClipboardChanged, TransferableDataHelper* );
@@ -67,8 +67,8 @@ public:
void GetAttrState( SfxItemSet& rSet );
void ExecuteToggle( SfxRequest &rReq );
- BOOL ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
- BOOL ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
+ sal_Bool ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
+ sal_Bool ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
void ExecuteExtra( SfxRequest &rReq );
void ExecFormText(SfxRequest& rReq); // StarFontWork
@@ -78,7 +78,7 @@ private:
void ExecuteGlobal( SfxRequest &rReq ); // von Execute gerufen fuer ganze Objekte
void GetGlobalClipState( SfxItemSet& rSet );
void ExecutePasteContents( SfxRequest &rReq );
- BOOL IsNoteEdit();
+ sal_Bool IsNoteEdit();
};
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index 7690f860be41..c1194f9bd5cc 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -35,6 +35,8 @@
#include <sfx2/objsh.hxx>
#include "global.hxx"
+#include "charthelper.hxx"
+#include "rangelst.hxx"
class SdrModel;
@@ -57,17 +59,19 @@ private:
// extracted from model in ctor:
Size aSrcSize;
INetBookmark* pBookmark;
- BOOL bGraphic;
- BOOL bGrIsBit;
- BOOL bOleObj;
+ sal_Bool bGraphic;
+ sal_Bool bGrIsBit;
+ sal_Bool bOleObj;
// source information for drag&drop:
// (view is needed to handle drawing obejcts)
SdrView* pDragSourceView;
- USHORT nDragSourceFlags;
- BOOL bDragWasInternal;
+ sal_uInt16 nDragSourceFlags;
+ sal_Bool bDragWasInternal;
sal_uInt32 nSourceDocID;
+ ScRangeListVector m_aProtectedChartRangesVector;
+
void InitDocShell();
SdrOle2Obj* GetSingleObject();
@@ -89,11 +93,11 @@ public:
void SetDrawPersist( const SfxObjectShellRef& rRef );
void SetDragSource( ScDrawView* pView );
void SetDragSourceObj( SdrObject* pObj, SCTAB nTab );
- void SetDragSourceFlags( USHORT nFlags );
+ void SetDragSourceFlags( sal_uInt16 nFlags );
void SetDragWasInternal();
SdrView* GetDragSourceView() { return pDragSourceView; }
- USHORT GetDragSourceFlags() const { return nDragSourceFlags; }
+ sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; }
void SetSourceDocID( sal_uInt32 nVal )
{ nSourceDocID = nVal; }
@@ -102,6 +106,8 @@ public:
static ScDrawTransferObj* GetOwnClipboard( Window* pUIWin );
virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ const ScRangeListVector& GetProtectedChartRangesVector() const { return m_aProtectedChartRangesVector; }
};
#endif
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index 1bb4206f3990..85387e5c11ae 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -52,7 +52,7 @@
class ScFunctionChildWindow : public SfxChildWindow
{
public:
- ScFunctionChildWindow( Window*, USHORT, SfxBindings*,
+ ScFunctionChildWindow( Window*, sal_uInt16, SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(ScFunctionChildWindow);
@@ -79,17 +79,17 @@ private:
SfxChildAlignment eSfxOldAlignment;
ImageButton aInsertButton;
FixedText aFiFuncDesc;
- USHORT nLeftSlot;
- USHORT nRightSlot;
- ULONG nMinWidth;
- ULONG nMinHeight;
+ sal_uInt16 nLeftSlot;
+ sal_uInt16 nRightSlot;
+ sal_uLong nMinWidth;
+ sal_uLong nMinHeight;
Size aOldSize;
- BOOL bSizeFlag;
- BOOL bInit;
+ sal_Bool bSizeFlag;
+ sal_Bool bInit;
short nDockMode;
Point aSplitterInitPos;
const ScFuncDesc* pFuncDesc;
- USHORT nArgs;
+ sal_uInt16 nArgs;
String** pArgArr;
@@ -97,7 +97,7 @@ private:
void UpdateFunctionList();
void UpdateLRUList();
- void DoEnter(BOOL bOk); //@@ ???
+ void DoEnter(sal_Bool bOk); //@@ ???
void SetDescription();
void SetLeftRightSize();
void SetTopBottonSize();
@@ -114,7 +114,7 @@ private:
protected:
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void Resizing( Size& rSize );
virtual void SetSize();
@@ -136,7 +136,7 @@ public:
using SfxDockingWindow::Notify;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- void SetSlotIDs( USHORT nLeft, USHORT nRight )
+ void SetSlotIDs( sal_uInt16 nLeft, sal_uInt16 nRight )
{ nLeftSlot = nLeft; nRightSlot = nRight; }
void InitLRUList();
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
index a0519be1b788..7e0e0472da65 100644
--- a/sc/source/ui/inc/editable.hxx
+++ b/sc/source/ui/inc/editable.hxx
@@ -40,8 +40,8 @@ class ScRange;
class ScEditableTester
{
- BOOL bIsEditable;
- BOOL bOnlyMatrix;
+ sal_Bool bIsEditable;
+ sal_Bool bOnlyMatrix;
public:
// no test in ctor
@@ -78,9 +78,9 @@ public:
void TestSelection( ScDocument* pDoc, const ScMarkData& rMark );
void TestView( ScViewFunc* pView );
- BOOL IsEditable() const { return bIsEditable; }
- BOOL IsFormatEditable() const { return bIsEditable || bOnlyMatrix; }
- USHORT GetMessageId() const;
+ sal_Bool IsEditable() const { return bIsEditable; }
+ sal_Bool IsFormatEditable() const { return bIsEditable || bOnlyMatrix; }
+ sal_uInt16 GetMessageId() const;
};
#endif
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
index 5e915aa2a89e..bd6b75ae2ede 100644
--- a/sc/source/ui/inc/editsh.hxx
+++ b/sc/source/ui/inc/editsh.hxx
@@ -49,8 +49,8 @@ private:
EditView* pEditView;
ScViewData* pViewData;
TransferableClipboardListener* pClipEvtLstnr;
- BOOL bPastePossible;
- BOOL bIsInsertMode;
+ sal_Bool bPastePossible;
+ sal_Bool bIsInsertMode;
const SvxURLField* GetURLField();
ScInputHandler* GetMyInputHdl();
@@ -78,7 +78,7 @@ public:
void ExecuteUndo(SfxRequest& rReq);
void GetUndoState(SfxItemSet &rSet);
- String GetSelectionText( BOOL bWholeWord );
+ String GetSelectionText( sal_Bool bWholeWord );
};
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 78358557444c..e9aaee89604a 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -29,6 +29,7 @@
#ifndef SC_FIELDWND_HXX
#define SC_FIELDWND_HXX
+#include <utility>
#include <vector>
#include "address.hxx"
#include "dpglobal.hxx"
@@ -40,19 +41,33 @@
class ScDPLayoutDlg;
class ScAccessibleDataPilotControl;
-//===================================================================
+const size_t PIVOTFIELD_INVALID = static_cast< size_t >( -1 );
-/** Type of content area. */
-enum ScDPFieldType
+// ============================================================================
+
+/** Type of the pivot table field window. */
+enum ScPivotFieldType
+{
+ PIVOTFIELDTYPE_PAGE, /// Window for all page fields.
+ PIVOTFIELDTYPE_COL, /// Window for all column fields.
+ PIVOTFIELDTYPE_ROW, /// Window for all row fields.
+ PIVOTFIELDTYPE_DATA, /// Window for all data fields.
+ PIVOTFIELDTYPE_SELECT /// Selection window with all fields.
+};
+
+/** Type of an end tracking event. */
+enum ScPivotFieldEndTracking
{
- TYPE_PAGE, /// Area for all page fields.
- TYPE_ROW, /// Area for all row fields.
- TYPE_COL, /// Area for all column fields.
- TYPE_DATA, /// Area for all data fields.
- TYPE_SELECT /// Selection area with all fields.
+ ENDTRACKING_SUSPEND, /// Stop tracking in this window, but tracking still active (in another window).
+ ENDTRACKING_CANCEL, /// Tracking has been cancelled.
+ ENDTRACKING_DROP /// Tracking has ended, a field has been dropped.
};
-//-------------------------------------------------------------------
+// ============================================================================
+
+typedef ::std::pair< const ScPivotFuncData*, size_t > ScPivotFuncDataEntry;
+
+// ============================================================================
/**
* Represents a field area in the DataPilot layout dialog. This base class
diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx
index ddd5621c558f..abecfa27c75a 100644
--- a/sc/source/ui/inc/filldlg.hxx
+++ b/sc/source/ui/inc/filldlg.hxx
@@ -53,7 +53,7 @@ public:
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir );
+ sal_uInt16 nPossDir );
~ScFillSeriesDlg();
FillDir GetFillDir() const { return theFillDir; }
@@ -65,9 +65,18 @@ public:
String GetStartStr() const { return aEdStartVal.GetText(); }
- void SetEdStartValEnabled(BOOL bFlag=FALSE);
+ void SetEdStartValEnabled(sal_Bool bFlag=false);
private:
+ FixedText aFtStartVal;
+ Edit aEdStartVal;
+ String aStartStrVal;
+
+ FixedText aFtEndVal;
+ Edit aEdEndVal;
+
+ FixedText aFtIncrement;
+ Edit aEdIncrement;
FixedLine aFlDirection;
RadioButton aBtnDown;
RadioButton aBtnRight;
@@ -87,17 +96,7 @@ private:
RadioButton aBtnDayOfWeek;
RadioButton aBtnMonth;
RadioButton aBtnYear;
-
- BOOL bStartValFlag;
- FixedText aFtStartVal;
- Edit aEdStartVal;
- String aStartStrVal;
-
- FixedText aFtEndVal;
- Edit aEdEndVal;
-
- FixedText aFtIncrement;
- Edit aEdIncrement;
+ sal_Bool bStartValFlag;
OKButton aBtnOk;
CancelButton aBtnCancel;
@@ -117,10 +116,10 @@ private:
#ifdef _FILLDLG_CXX
private:
- void Init( USHORT nPossDir );
- BOOL CheckStartVal();
- BOOL CheckIncrementVal();
- BOOL CheckEndVal();
+ void Init( sal_uInt16 nPossDir );
+ sal_Bool CheckStartVal();
+ sal_Bool CheckIncrementVal();
+ sal_Bool CheckEndVal();
DECL_LINK( OKHdl, void * );
DECL_LINK( DisableHdl, Button * );
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 44ea68f8e9c9..47a9dc414824 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -94,13 +94,13 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
void SliderMoved();
- USHORT GetSliderPos();
- void RefreshEditRow( USHORT nOffset );
+ sal_uInt16 GetSliderPos();
+ void RefreshEditRow( sal_uInt16 nOffset );
private:
FixedLine aFlCriteria;
@@ -148,7 +148,7 @@ private:
ScFilterOptionsMgr* pOptionsMgr;
- const USHORT nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
@@ -160,12 +160,12 @@ private:
ListBox* aCondLbArr[4];
ListBox* aConnLbArr[4];
bool mbHasDates[MAXQUERY];
- BOOL bRefreshExceptQuery[MAXQUERY];
- USHORT nFieldCount;
- BOOL bRefInputMode;
+ sal_Bool bRefreshExceptQuery[MAXQUERY];
+ sal_uInt16 nFieldCount;
+ sal_Bool bRefInputMode;
TypedScStrCollection* pEntryLists[MAXCOLCOUNT];
- USHORT nHeaderPos[MAXCOLCOUNT];
+ sal_uInt16 nHeaderPos[MAXCOLCOUNT];
// Hack: RefInput-Kontrolle
Timer* pTimer;
@@ -175,10 +175,10 @@ private:
void Init ( const SfxItemSet& rArgSet );
void FillFieldLists ();
void FillAreaList ();
- void UpdateValueList ( USHORT nList );
- void UpdateHdrInValueList( USHORT nList );
- void ClearValueList ( USHORT nList );
- USHORT GetFieldSelPos ( SCCOL nField );
+ void UpdateValueList ( sal_uInt16 nList );
+ void UpdateHdrInValueList( sal_uInt16 nList );
+ void ClearValueList ( sal_uInt16 nList );
+ sal_uInt16 GetFieldSelPos ( SCCOL nField );
ScQueryItem* GetOutputItem ();
// Handler:
@@ -205,14 +205,14 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
- ListBox aLbFilterArea;
FixedText aFtFilterArea;
+ ListBox aLbFilterArea;
formula::RefEdit aEdFilterArea;
formula::RefButton aRbFilterArea;
@@ -227,14 +227,14 @@ private:
ScFilterOptionsMgr* pOptionsMgr;
- const USHORT nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
ScDocument* pDoc;
formula::RefEdit* pRefInputEdit;
- BOOL bRefInputMode;
+ sal_Bool bRefInputMode;
// Hack: RefInput-Kontrolle
Timer* pTimer;
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index 18164f1b7d35..5ba7345cd314 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -72,7 +72,7 @@ public:
const String& refStrUndefined );
~ScFilterOptionsMgr();
- BOOL VerifyPosStr ( const String& rPosStr ) const;
+ sal_Bool VerifyPosStr ( const String& rPosStr ) const;
private:
Dialog* pDlg;
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index ea8298bea0ef..306aaa565d8d 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -82,11 +82,11 @@ public:
virtual void notifyChange();
virtual void fill();
virtual bool calculateValue(const String& _sExpression,String& _rResult);
- virtual void doClose(BOOL _bOk);
+ virtual void doClose(sal_Bool _bOk);
virtual void insertEntryToLRUList(const formula::IFunctionDescription* pDesc);
virtual void showReference(const String& _sFormula);
- virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked);
- virtual void setDispatcherLock( BOOL bLock );
+ virtual void dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked);
+ virtual void setDispatcherLock( sal_Bool bLock );
virtual void setReferenceInput(const formula::FormEditData* _pData);
virtual void deleteFormData();
virtual void clear();
@@ -103,31 +103,31 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const;
virtual ::com::sun::star::table::CellAddress getReferencePosition() const;
- virtual BOOL Close();
+ virtual sal_Bool Close();
// sc::IAnyRefDialog
virtual void ShowReference(const String& _sRef);
- virtual void HideReference( BOOL bDoneRefMode = TRUE );
+ virtual void HideReference( sal_Bool bDoneRefMode = sal_True );
virtual void SetReference( const ScRange& rRef, ScDocument* pD );
virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- virtual void RefInputDone( BOOL bForced = FALSE );
- virtual BOOL IsTableLocked() const;
- virtual BOOL IsRefInputMode() const;
+ virtual void RefInputDone( sal_Bool bForced = false );
+ virtual sal_Bool IsTableLocked() const;
+ virtual sal_Bool IsRefInputMode() const;
- virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const;
+ virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const;
virtual void AddRefEntry();
virtual void SetActive();
virtual void ViewShellChanged( ScTabViewShell* pScViewShell );
protected:
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- ULONG FindFocusWin(Window *pWin);
+ sal_uLong FindFocusWin(Window *pWin);
void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
void HighlightFunctionParas(const String& aFormula);
- BOOL IsInputHdl(ScInputHandler* pHdl);
+ sal_Bool IsInputHdl(ScInputHandler* pHdl);
ScInputHandler* GetNextInputHandler(ScDocShell* pDocShell,PtrTabViewShell* ppViewSh);
};
diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx
index ea7a67d5d356..232d5c0e1b79 100644
--- a/sc/source/ui/inc/fuconarc.hxx
+++ b/sc/source/ui/inc/fuconarc.hxx
@@ -45,10 +45,10 @@ class FuConstArc : public FuConstruct
virtual ~FuConstArc();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx
index 6afa6be65021..6fb89242cbc0 100644
--- a/sc/source/ui/inc/fuconcustomshape.hxx
+++ b/sc/source/ui/inc/fuconcustomshape.hxx
@@ -43,10 +43,10 @@ public:
virtual ~FuConstCustomShape();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx
index 894dcd4193eb..0104388ac03a 100644
--- a/sc/source/ui/inc/fuconpol.hxx
+++ b/sc/source/ui/inc/fuconpol.hxx
@@ -47,10 +47,10 @@ class FuConstPolygon : public FuConstruct
virtual ~FuConstPolygon();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx
index dede18b8b03f..5c0cf72735c7 100644
--- a/sc/source/ui/inc/fuconrec.hxx
+++ b/sc/source/ui/inc/fuconrec.hxx
@@ -45,10 +45,10 @@ class FuConstRectangle : public FuConstruct
virtual ~FuConstRectangle();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconstr.hxx b/sc/source/ui/inc/fuconstr.hxx
index 66c55a981caf..5468e2f60f6a 100644
--- a/sc/source/ui/inc/fuconstr.hxx
+++ b/sc/source/ui/inc/fuconstr.hxx
@@ -51,13 +51,13 @@ class FuConstruct : public FuDraw
virtual ~FuConstruct();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
- BOOL SimpleMouseButtonUp(const MouseEvent& rMEvt);
+ sal_Bool SimpleMouseButtonUp(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
index 44ce6876a4bc..efb19ccf39e7 100644
--- a/sc/source/ui/inc/fuconuno.hxx
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -41,8 +41,8 @@
class FuConstUnoControl : public FuConstruct
{
protected:
- UINT32 nInventor;
- UINT16 nIdentifier;
+ sal_uInt32 nInventor;
+ sal_uInt16 nIdentifier;
public:
FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
@@ -50,10 +50,10 @@ public:
virtual ~FuConstUnoControl();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx
index a88580144301..c2820c5c0569 100644
--- a/sc/source/ui/inc/fudraw.hxx
+++ b/sc/source/ui/inc/fudraw.hxx
@@ -49,7 +49,7 @@ class FuDraw : public FuPoor
SdrModel* pDoc, SfxRequest& rReq);
virtual ~FuDraw();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -59,14 +59,14 @@ class FuDraw : public FuPoor
virtual void ForcePointer(const MouseEvent* pMEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
// II
virtual void SelectionHasChanged();
- BOOL IsSizingOrMovingNote( const MouseEvent& rMEvt ) const;
+ sal_Bool IsSizingOrMovingNote( const MouseEvent& rMEvt ) const;
private:
void DoModifiers(const MouseEvent& rMEvt);
diff --git a/sc/source/ui/inc/fuedipo.hxx b/sc/source/ui/inc/fuedipo.hxx
index 3b27834f7a56..892fd748fbb8 100644
--- a/sc/source/ui/inc/fuedipo.hxx
+++ b/sc/source/ui/inc/fuedipo.hxx
@@ -46,10 +46,10 @@ class FuEditPoints : public FuDraw
virtual ~FuEditPoints();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sc/source/ui/inc/fumark.hxx b/sc/source/ui/inc/fumark.hxx
index 61d287ea30f4..58f22302ea24 100644
--- a/sc/source/ui/inc/fumark.hxx
+++ b/sc/source/ui/inc/fumark.hxx
@@ -44,8 +44,8 @@ class FuMarkRect : public FuPoor
protected:
Point aBeginPos;
Rectangle aZoomRect;
- BOOL bVisible;
- BOOL bStartDrag;
+ sal_Bool bVisible;
+ sal_Bool bStartDrag;
ScRangeListRef aSourceRange;
public:
@@ -53,7 +53,7 @@ class FuMarkRect : public FuPoor
SdrModel* pDoc, SfxRequest& rReq);
virtual ~FuMarkRect();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -63,10 +63,10 @@ class FuMarkRect : public FuPoor
virtual void ForcePointer(const MouseEvent* pMEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
};
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
index 799f5e260645..ca24748cc5a7 100644
--- a/sc/source/ui/inc/funcpage.hxx
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -103,15 +103,15 @@ public:
ScFuncPage( Window* pParent);
- void SetCategory(USHORT nCat);
- void SetFunction(USHORT nFunc);
+ void SetCategory(sal_uInt16 nCat);
+ void SetFunction(sal_uInt16 nFunc);
void SetFocus();
- USHORT GetCategory();
- USHORT GetFunction();
- USHORT GetFunctionEntryCount();
+ sal_uInt16 GetCategory();
+ sal_uInt16 GetFunction();
+ sal_uInt16 GetFunctionEntryCount();
- USHORT GetFuncPos(const ScFuncDesc*);
- const ScFuncDesc* GetFuncDesc( USHORT nPos ) const;
+ sal_uInt16 GetFuncPos(const ScFuncDesc*);
+ const ScFuncDesc* GetFuncDesc( sal_uInt16 nPos ) const;
String GetSelFunctionName() const;
void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; }
diff --git a/sc/source/ui/inc/funcutl.hxx b/sc/source/ui/inc/funcutl.hxx
index afa8e1f5c853..d7878714e4f2 100644
--- a/sc/source/ui/inc/funcutl.hxx
+++ b/sc/source/ui/inc/funcutl.hxx
@@ -64,7 +64,7 @@ private:
MultiLineEdit* pMEdit;
Link aSelChangedLink;
Selection aOldSel;
- BOOL bMouseFlag;
+ sal_Bool bMouseFlag;
DECL_LINK( ChangedHdl, ScEditBox* );
protected:
@@ -99,7 +99,7 @@ public:
ArgEdit( Window* pParent, const ResId& rResId );
void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
- ScrollBar& rArgSlider, USHORT nArgCount );
+ ScrollBar& rArgSlider, sal_uInt16 nArgCount );
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
@@ -108,7 +108,7 @@ private:
ArgEdit* pEdPrev;
ArgEdit* pEdNext;
ScrollBar* pSlider;
- USHORT nArgs;
+ sal_uInt16 nArgs;
};
diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx
index 237432e763f2..5638b3bc6f68 100644
--- a/sc/source/ui/inc/fupoor.hxx
+++ b/sc/source/ui/inc/fupoor.hxx
@@ -71,7 +71,7 @@ protected:
Timer aDragTimer; // fuer Drag&Drop
DECL_LINK( DragTimerHdl, Timer * );
DECL_LINK( DragHdl, void * );
- BOOL bIsInDragMode;
+ sal_Bool bIsInDragMode;
Point aMDPos; // Position von MouseButtonDown
// member to hold state of the mouse buttons for creation
@@ -95,16 +95,16 @@ public:
virtual void DoPaste();
// Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent&) { return FALSE; }
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent&) { return false; }
// moved from inline to *.cxx
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; }
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; }
// moved from inline to *.cxx
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; }
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; }
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -114,9 +114,9 @@ public:
void SetWindow(Window* pWin) { pWindow = pWin; }
- USHORT GetSlotID() const { return( aSfxRequest.GetSlot() ); }
+ sal_uInt16 GetSlotID() const { return( aSfxRequest.GetSlot() ); }
- BOOL IsDetectiveHit( const Point& rLogicPos );
+ sal_Bool IsDetectiveHit( const Point& rLogicPos );
void StopDragTimer();
diff --git a/sc/source/ui/inc/fusel.hxx b/sc/source/ui/inc/fusel.hxx
index 7f0783537624..d13ddc3e9558 100644
--- a/sc/source/ui/inc/fusel.hxx
+++ b/sc/source/ui/inc/fusel.hxx
@@ -50,11 +50,11 @@ public:
virtual ~FuSelection();
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BYTE Command(const CommandEvent& rCEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_uInt8 Command(const CommandEvent& rCEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -64,10 +64,10 @@ public:
protected:
// Outliner* pOutliner;
// OutlinerView* pOutlinerView;
- BOOL bVCAction;
+ sal_Bool bVCAction;
private:
- BOOL TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2
+ sal_Bool TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2
bool IsNoteCaptionMarked() const;
bool IsNoteCaptionClicked( const Point& rPos ) const;
diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx
index 2af36d3aa5de..f3150424ba50 100644
--- a/sc/source/ui/inc/futext.hxx
+++ b/sc/source/ui/inc/futext.hxx
@@ -43,7 +43,7 @@ class SdrOutliner;
class FuText : public FuConstruct
{
protected:
-// USHORT nOldObjectBar;
+// sal_uInt16 nOldObjectBar;
SdrTextObj* pTextObj;
public:
@@ -52,10 +52,10 @@ public:
virtual ~FuText();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -65,8 +65,8 @@ public:
virtual void SelectionHasChanged();
void SetInEditMode( SdrObject* pObj = NULL, const Point* pMousePixel = NULL,
- BOOL bCursorToEnd = FALSE, const KeyEvent* pInitialKey = NULL );
- void StopEditMode(BOOL bTextDirection = FALSE);
+ sal_Bool bCursorToEnd = false, const KeyEvent* pInitialKey = NULL );
+ void StopEditMode(sal_Bool bTextDirection = false);
void StopDragMode(SdrObject* pObject);
// Create default drawing objects via keyboard
diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx
index d8cd2d16b7b4..86cae4fdfab8 100644
--- a/sc/source/ui/inc/gridmerg.hxx
+++ b/sc/source/ui/inc/gridmerg.hxx
@@ -44,8 +44,8 @@ private:
long nVarStart;
long nVarDiff;
long nCount;
- BOOL bVertical;
- BOOL bOptimize;
+ sal_Bool bVertical;
+ sal_Bool bOptimize;
void AddLine( long nStart, long nEnd, long nPos );
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 46d3f6cdee91..a3762b40d421 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -147,61 +147,61 @@ private:
::std::auto_ptr<ScDPFieldPopupWindow> mpDPFieldPopup;
::std::auto_ptr<ScDPFieldButton> mpFilterButton;
- USHORT nCursorHideCount;
+ sal_uInt16 nCursorHideCount;
- BOOL bMarking;
+ sal_Bool bMarking;
- USHORT nButtonDown;
- BOOL bEEMouse; // Edit-Engine hat Maus
- BYTE nMouseStatus;
- BYTE nNestedButtonState; // track nested button up/down calls
+ sal_uInt16 nButtonDown;
+ sal_Bool bEEMouse; // Edit-Engine hat Maus
+ sal_uInt8 nMouseStatus;
+ sal_uInt8 nNestedButtonState; // track nested button up/down calls
- BOOL bDPMouse; // DataPilot-D&D (neue Pivottabellen)
+ sal_Bool bDPMouse; // DataPilot-D&D (neue Pivottabellen)
long nDPField;
ScDPObject* pDragDPObj; //! name?
- BOOL bRFMouse; // RangeFinder-Drag
- BOOL bRFSize;
- USHORT nRFIndex;
+ sal_Bool bRFMouse; // RangeFinder-Drag
+ sal_Bool bRFSize;
+ sal_uInt16 nRFIndex;
SCsCOL nRFAddX;
SCsROW nRFAddY;
- USHORT nPagebreakMouse; // Pagebreak-Modus Drag
+ sal_uInt16 nPagebreakMouse; // Pagebreak-Modus Drag
SCCOLROW nPagebreakBreak;
SCCOLROW nPagebreakPrev;
ScRange aPagebreakSource;
ScRange aPagebreakDrag;
- BOOL bPagebreakDrawn;
+ sal_Bool bPagebreakDrawn;
- BYTE nPageScript;
+ sal_uInt8 nPageScript;
long nLastClickX;
long nLastClickY;
- BOOL bDragRect;
+ sal_Bool bDragRect;
SCCOL nDragStartX;
SCROW nDragStartY;
SCCOL nDragEndX;
SCROW nDragEndY;
InsCellCmd meDragInsertMode;
- USHORT nCurrentPointer;
+ sal_uInt16 nCurrentPointer;
- BOOL bIsInScroll;
- BOOL bIsInPaint;
+ sal_Bool bIsInScroll;
+ sal_Bool bIsInPaint;
ScDDComboBoxButton aComboButton;
Point aCurMousePos;
- USHORT nPaintCount;
+ sal_uInt16 nPaintCount;
Rectangle aRepaintPixel;
- BOOL bNeedsRepaint;
+ sal_Bool bNeedsRepaint;
- BOOL bAutoMarkVisible;
+ sal_Bool bAutoMarkVisible;
ScAddress aAutoMarkPos;
- BOOL bListValButton;
+ sal_Bool bListValButton;
ScAddress aListValPos;
Rectangle aInvertRect;
@@ -209,15 +209,15 @@ private:
DECL_LINK( PopupModeEndHdl, FloatingWindow* );
DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
- BOOL TestMouse( const MouseEvent& rMEvt, BOOL bAction );
+ sal_Bool TestMouse( const MouseEvent& rMEvt, sal_Bool bAction );
- BOOL DoPageFieldSelection( SCCOL nCol, SCROW nRow );
+ sal_Bool DoPageFieldSelection( SCCOL nCol, SCROW nRow );
bool DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
void DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
void DPMouseMove( const MouseEvent& rMEvt );
void DPMouseButtonUp( const MouseEvent& rMEvt );
- void DPTestMouse( const MouseEvent& rMEvt, BOOL bMove );
+ void DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove );
/**
* Check if the mouse click is on a field popup button.
@@ -229,24 +229,24 @@ private:
void DPLaunchFieldPopupMenu(
const Point& rScrPos, const Size& rScrSize, const ScAddress& rPos, ScDPObject* pDPObj);
- void RFMouseMove( const MouseEvent& rMEvt, BOOL bUp );
+ void RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp );
- void PagebreakMove( const MouseEvent& rMEvt, BOOL bUp );
+ void PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp );
- void UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect );
+ void UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect );
- BOOL IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
- void ExecFilter( ULONG nSel, SCCOL nCol, SCROW nRow,
+ sal_Bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ void ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow,
const String& aValue, bool bCheckForDates );
- void FilterSelect( ULONG nSel );
+ void FilterSelect( sal_uLong nSel );
void ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr );
- void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr );
+ void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr );
- BOOL HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
+ sal_Bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
- BOOL DropScroll( const Point& rMousePos );
+ sal_Bool DropScroll( const Point& rMousePos );
sal_Int8 AcceptPrivateDrop( const AcceptDropEvent& rEvt );
sal_Int8 ExecutePrivateDrop( const ExecuteDropEvent& rEvt );
@@ -255,33 +255,33 @@ private:
void HandleMouseButtonDown( const MouseEvent& rMEvt );
- BOOL DrawMouseButtonDown(const MouseEvent& rMEvt);
- BOOL DrawMouseButtonUp(const MouseEvent& rMEvt);
- BOOL DrawMouseMove(const MouseEvent& rMEvt);
- BOOL DrawKeyInput(const KeyEvent& rKEvt);
- BOOL DrawCommand(const CommandEvent& rCEvt);
- BOOL DrawHasMarkedObj();
+ sal_Bool DrawMouseButtonDown(const MouseEvent& rMEvt);
+ sal_Bool DrawMouseButtonUp(const MouseEvent& rMEvt);
+ sal_Bool DrawMouseMove(const MouseEvent& rMEvt);
+ sal_Bool DrawKeyInput(const KeyEvent& rKEvt);
+ sal_Bool DrawCommand(const CommandEvent& rCEvt);
+ sal_Bool DrawHasMarkedObj();
void DrawEndAction();
void DrawMarkDropObj( SdrObject* pObj );
SdrObject* GetEditObject();
- BOOL IsMyModel(SdrEditView* pSdrView);
+ sal_Bool IsMyModel(SdrEditView* pSdrView);
- void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer );
+ void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer );
void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev );
void DrawAfterScroll(/*BOOL bVal*/);
Rectangle GetListValButtonRect( const ScAddress& rButtonPos );
void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, OutputDevice* pContentDev );
- BOOL GetEditUrl( const Point& rPos,
+ sal_Bool GetEditUrl( const Point& rPos,
String* pName=0, String* pUrl=0, String* pTarget=0 );
- BOOL GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
+ sal_Bool GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
String* pName=0, String* pUrl=0, String* pTarget=0 );
- BOOL HitRangeFinder( const Point& rMouse, BOOL& rCorner, USHORT* pIndex = NULL,
+ sal_Bool HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, sal_uInt16* pIndex = NULL,
SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
- USHORT HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
+ sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
void PasteSelection( const Point& rPosPixel );
@@ -340,7 +340,7 @@ public:
void UpdateFormulas();
- void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect );
+ void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect );
void DoScenarioMenue( const ScRange& rScenRange );
void LaunchPageFieldMenu( SCCOL nCol, SCROW nRow );
@@ -356,27 +356,27 @@ public:
ScUpdateMode eMode = SC_UPDATE_ALL );
void InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bTestMerge = FALSE, BOOL bRepeat = FALSE );
+ sal_Bool bTestMerge = false, sal_Bool bRepeat = false );
void CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
void HideCursor();
void ShowCursor();
- void UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange);
+ void UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange);
- void UpdateListValPos( BOOL bVisible, const ScAddress& rPos );
+ void UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos );
- BOOL ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard );
+ sal_Bool ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard );
void HideNoteMarker();
- MapMode GetDrawMapMode( BOOL bForce = FALSE );
+ MapMode GetDrawMapMode( sal_Bool bForce = false );
void ContinueDrag();
void StopMarking();
void UpdateInputContext();
- void CheckInverted() { if (nPaintCount) bNeedsRepaint = TRUE; }
+ void CheckInverted() { if (nPaintCount) bNeedsRepaint = sal_True; }
void DoInvertRect( const Rectangle& rPixel );
diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx
index 557044f16a3e..1510d1cf6154 100644
--- a/sc/source/ui/inc/groupdlg.hxx
+++ b/sc/source/ui/inc/groupdlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
//------------------------------------------------------------------------
@@ -40,12 +40,12 @@ class ScGroupDlg : public ModalDialog
{
public:
ScGroupDlg( Window* pParent,
- USHORT nResId,
- BOOL bUnGroup = FALSE,
- BOOL bRows = TRUE );
+ sal_uInt16 nResId,
+ sal_Bool bUnGroup = false,
+ sal_Bool bRows = sal_True );
~ScGroupDlg();
- BOOL GetColsChecked() const;
+ sal_Bool GetColsChecked() const;
private:
FixedLine aFlFrame;
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index c4cc590fc7ed..da614f7fa762 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -51,10 +51,10 @@ private:
SelectionEngine* pSelEngine;
Font aNormFont;
Font aBoldFont;
- BOOL bBoldSet;
+ sal_Bool bBoldSet;
- USHORT nFlags;
- BOOL bVertical; // Vertikal = Zeilenheader
+ sal_uInt16 nFlags;
+ sal_Bool bVertical; // Vertikal = Zeilenheader
long nWidth;
long nSmallWidth;
@@ -64,18 +64,18 @@ private:
SCCOLROW nMarkStart;
SCCOLROW nMarkEnd;
- BOOL bMarkRange;
+ sal_Bool bMarkRange;
- BOOL bDragging; // Groessen aendern
+ sal_Bool bDragging; // Groessen aendern
SCCOLROW nDragNo;
long nDragStart;
long nDragPos;
- BOOL bDragMoved;
+ sal_Bool bDragMoved;
- BOOL bIgnoreMove;
+ sal_Bool bIgnoreMove;
long GetScrPos( SCCOLROW nEntryNo );
- SCCOLROW GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder );
+ SCCOLROW GetMousePos( const MouseEvent& rMEvt, sal_Bool& rBorder );
bool IsSelectionAllowed(SCCOLROW nPos) const;
void ShowDragHelp();
@@ -98,20 +98,20 @@ protected:
// neue Methoden
virtual SCCOLROW GetPos() = 0; // aktuelle Position (Scrolling)
- virtual USHORT GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel)
+ virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel)
virtual String GetEntryText( SCCOLROW nEntryNo ) = 0;
virtual SCCOLROW GetHiddenCount( SCCOLROW nEntryNo );
- virtual BOOL IsLayoutRTL();
- virtual BOOL IsMirrored();
+ virtual sal_Bool IsLayoutRTL();
+ virtual sal_Bool IsMirrored();
- virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewWidth ) = 0;
+ virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewWidth ) = 0;
virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) = 0;
- virtual void SetMarking( BOOL bSet );
+ virtual void SetMarking( sal_Bool bSet );
virtual void SelectWindow();
- virtual BOOL IsDisabled();
- virtual BOOL ResizeAllowed();
+ virtual sal_Bool IsDisabled();
+ virtual sal_Bool ResizeAllowed();
virtual String GetDragHelp( long nVal );
virtual void DrawInvert( long nDragPos );
@@ -119,14 +119,14 @@ protected:
public:
ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine,
- SCCOLROW nNewSize, USHORT nNewFlags );
+ SCCOLROW nNewSize, sal_uInt16 nNewFlags );
~ScHeaderControl();
- void SetIgnoreMove(BOOL bSet) { bIgnoreMove = bSet; }
+ void SetIgnoreMove(sal_Bool bSet) { bIgnoreMove = bSet; }
void StopMarking();
- void SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd );
+ void SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd );
long GetWidth() const { return nWidth; }
long GetSmallWidth() const { return nSmallWidth; }
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index 335fe9618b50..0f63f2e7bae9 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -46,11 +46,11 @@ public:
Window* pParent,
const SfxItemSet& rCoreSet,
const String& rPageStyle,
- USHORT nResId = RID_SCDLG_HFEDIT );
+ sal_uInt16 nResId = RID_SCDLG_HFEDIT );
~ScHFEditDlg();
- virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage );
};
diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx
index 090905c481e8..d3b6b24513a0 100644
--- a/sc/source/ui/inc/highred.hxx
+++ b/sc/source/ui/inc/highred.hxx
@@ -95,7 +95,7 @@ private:
protected:
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
public:
ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
@@ -105,8 +105,8 @@ public:
virtual void SetActive();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL Close();
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool Close();
+ virtual sal_Bool IsRefInputMode() const;
};
diff --git a/sc/source/ui/inc/hiranges.hxx b/sc/source/ui/inc/hiranges.hxx
index a79bfad079c4..e14c74938bdd 100644
--- a/sc/source/ui/inc/hiranges.hxx
+++ b/sc/source/ui/inc/hiranges.hxx
@@ -52,9 +52,9 @@ public:
ScHighlightRanges();
~ScHighlightRanges();
- ULONG Count() const { return aEntries.Count(); }
+ sal_uLong Count() const { return aEntries.Count(); }
void Insert( ScHighlightEntry* pNew ) { aEntries.Insert(pNew, LIST_APPEND); }
- ScHighlightEntry* GetObject( ULONG nIndex ) const
+ ScHighlightEntry* GetObject( sal_uLong nIndex ) const
{ return (ScHighlightEntry*)aEntries.GetObject(nIndex); }
};
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
index 49f574bbf055..016b0e863304 100644
--- a/sc/source/ui/inc/imoptdlg.hxx
+++ b/sc/source/ui/inc/imoptdlg.hxx
@@ -33,7 +33,7 @@
#include <vcl/fixed.hxx>
#include <vcl/combobox.hxx>
#include <vcl/lstbox.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svx/txencbox.hxx>
#include "scdllapi.h"
#include "global.hxx"
@@ -45,19 +45,19 @@ class SC_DLLPUBLIC ScImportOptions
public:
ScImportOptions()
: nFieldSepCode(0), nTextSepCode(0),
- eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(FALSE),
- bSaveAsShown(FALSE)
+ eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(false),
+ bSaveAsShown(false), bQuoteAllText(false)
{}
ScImportOptions( const String& rStr );
ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr )
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr),
- bFixedWidth(FALSE), bSaveAsShown(FALSE)
+ bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false)
{ eCharSet = ScGlobal::GetCharsetValue(aStrFont); }
ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc )
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep),
- bFixedWidth(FALSE), bSaveAsShown(FALSE)
+ bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false)
{ SetTextEncoding( nEnc ); }
ScImportOptions( const ScImportOptions& rCpy )
@@ -66,7 +66,8 @@ public:
aStrFont (rCpy.aStrFont),
eCharSet (rCpy.eCharSet),
bFixedWidth (rCpy.bFixedWidth),
- bSaveAsShown (rCpy.bSaveAsShown)
+ bSaveAsShown (rCpy.bSaveAsShown),
+ bQuoteAllText (rCpy.bQuoteAllText)
{}
ScImportOptions& operator=( const ScImportOptions& rCpy )
@@ -77,10 +78,11 @@ public:
eCharSet = rCpy.eCharSet;
bFixedWidth = rCpy.bFixedWidth;
bSaveAsShown = rCpy.bSaveAsShown;
+ bQuoteAllText = rCpy.bQuoteAllText;
return *this;
}
- BOOL operator==( const ScImportOptions& rCmp )
+ sal_Bool operator==( const ScImportOptions& rCmp )
{
return
nFieldSepCode == rCmp.nFieldSepCode
@@ -88,7 +90,8 @@ public:
&& eCharSet == rCmp.eCharSet
&& aStrFont == rCmp.aStrFont
&& bFixedWidth == rCmp.bFixedWidth
- && bSaveAsShown == rCmp.bSaveAsShown;
+ && bSaveAsShown == rCmp.bSaveAsShown
+ && bQuoteAllText == rCmp.bQuoteAllText;
}
String BuildString() const;
@@ -98,8 +101,9 @@ public:
sal_Unicode nTextSepCode;
String aStrFont;
CharSet eCharSet;
- BOOL bFixedWidth;
- BOOL bSaveAsShown;
+ sal_Bool bFixedWidth;
+ sal_Bool bSaveAsShown;
+ sal_Bool bQuoteAllText;
};
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 343e952abb3e..a4c28b1150e7 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -63,33 +63,33 @@ class SC_DLLPUBLIC ScImportExport
ScRange aRange;
String aStreamPath;
String aNonConvertibleChars;
- ULONG nSizeLimit;
+ sal_uLong nSizeLimit;
sal_Unicode cSep; // Separator
sal_Unicode cStr; // String Delimiter
- BOOL bFormulas; // Formeln im Text?
- BOOL bIncludeFiltered; // include filtered rows? (default true)
- BOOL bAll; // keine Selektion
- BOOL bSingle; // Einfachselektion
- BOOL bUndo; // Mit Undo?
- BOOL bOverflow; // zuviele Zeilen/Spalten
+ sal_Bool bFormulas; // Formeln im Text?
+ sal_Bool bIncludeFiltered; // include filtered rows? (default true)
+ sal_Bool bAll; // keine Selektion
+ sal_Bool bSingle; // Einfachselektion
+ sal_Bool bUndo; // Mit Undo?
+ sal_Bool bOverflow; // zuviele Zeilen/Spalten
bool mbApi;
ScExportTextOptions mExportTextOptions;
ScAsciiOptions* pExtOptions; // erweiterte Optionen
- BOOL StartPaste(); // Protect-Check, Undo einrichten
+ sal_Bool StartPaste(); // Protect-Check, Undo einrichten
void EndPaste(); // Undo/Redo-Aktionen, Repaint
- BOOL Doc2Text( SvStream& );
- BOOL Text2Doc( SvStream& );
- BOOL Doc2Sylk( SvStream& );
- BOOL Sylk2Doc( SvStream& );
- BOOL Doc2HTML( SvStream&, const String& );
- BOOL Doc2RTF( SvStream& );
- BOOL Doc2Dif( SvStream& );
- BOOL Dif2Doc( SvStream& );
- BOOL ExtText2Doc( SvStream& ); // mit pExtOptions
- BOOL RTF2Doc( SvStream&, const String& rBaseURL );
- BOOL HTML2Doc( SvStream&, const String& rBaseURL );
+ sal_Bool Doc2Text( SvStream& );
+ sal_Bool Text2Doc( SvStream& );
+ sal_Bool Doc2Sylk( SvStream& );
+ sal_Bool Sylk2Doc( SvStream& );
+ sal_Bool Doc2HTML( SvStream&, const String& );
+ sal_Bool Doc2RTF( SvStream& );
+ sal_Bool Doc2Dif( SvStream& );
+ sal_Bool Dif2Doc( SvStream& );
+ sal_Bool ExtText2Doc( SvStream& ); // mit pExtOptions
+ sal_Bool RTF2Doc( SvStream&, const String& rBaseURL );
+ sal_Bool HTML2Doc( SvStream&, const String& rBaseURL );
public:
ScImportExport( ScDocument* ); // Gesamtdokument
@@ -100,22 +100,22 @@ public:
void SetExtOptions( const ScAsciiOptions& rOpt );
- BOOL IsDoubleRef() const { return BOOL( !( bAll || bSingle ) ); }
- BOOL IsSingleRef() const { return bSingle; }
- BOOL IsNoRef() const { return bAll; }
- BOOL IsRef() const { return BOOL( !bAll ); }
+ sal_Bool IsDoubleRef() const { return sal_Bool( !( bAll || bSingle ) ); }
+ sal_Bool IsSingleRef() const { return bSingle; }
+ sal_Bool IsNoRef() const { return bAll; }
+ sal_Bool IsRef() const { return sal_Bool( !bAll ); }
const ScRange& GetRange() const { return aRange; }
- BOOL IsUndo() const { return bUndo; }
- void SetUndo( BOOL b ) { bUndo = b; }
+ sal_Bool IsUndo() const { return bUndo; }
+ void SetUndo( sal_Bool b ) { bUndo = b; }
- static BOOL IsFormatSupported( ULONG nFormat );
+ static sal_Bool IsFormatSupported( sal_uLong nFormat );
static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p,
String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted );
- static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero = FALSE );
+ static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, sal_Bool bZero = false );
static void WriteUnicodeOrByteEndl( SvStream& rStrm );
- static inline BOOL IsEndianSwap( const SvStream& rStrm );
+ static inline sal_Bool IsEndianSwap( const SvStream& rStrm );
//! only if stream is only used in own (!) memory
static inline void SetNoEndianSwap( SvStream& rStrm );
@@ -124,29 +124,29 @@ public:
void SetSeparator( sal_Unicode c ) { cSep = c; }
sal_Unicode GetDelimiter() const { return cStr; }
void SetDelimiter( sal_Unicode c ) { cStr = c; }
- BOOL IsFormulas() const { return bFormulas; }
- void SetFormulas( BOOL b ) { bFormulas = b; }
- BOOL IsIncludeFiltered() const { return bIncludeFiltered; }
- void SetIncludeFiltered( BOOL b ) { bIncludeFiltered = b; }
+ sal_Bool IsFormulas() const { return bFormulas; }
+ void SetFormulas( sal_Bool b ) { bFormulas = b; }
+ sal_Bool IsIncludeFiltered() const { return bIncludeFiltered; }
+ void SetIncludeFiltered( sal_Bool b ) { bIncludeFiltered = b; }
- void SetSizeLimit( ULONG nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii
+ void SetSizeLimit( sal_uLong nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii
void SetStreamPath( const String& rPath ) { aStreamPath = rPath; }
const String& GetStreamPath() const { return aStreamPath; }
- BOOL ImportString( const ::rtl::OUString&, ULONG=FORMAT_STRING );
- BOOL ExportString( ::rtl::OUString&, ULONG=FORMAT_STRING );
- BOOL ExportByteString( ByteString&, rtl_TextEncoding, ULONG=FORMAT_STRING );
+ sal_Bool ImportString( const ::rtl::OUString&, sal_uLong=FORMAT_STRING );
+ sal_Bool ExportString( ::rtl::OUString&, sal_uLong=FORMAT_STRING );
+ sal_Bool ExportByteString( ByteString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING );
- BOOL ImportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING );
- BOOL ExportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING );
+ sal_Bool ImportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING );
+ sal_Bool ExportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING );
- BOOL ImportData( const String& rMimeType,
+ sal_Bool ImportData( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue );
- BOOL ExportData( const String& rMimeType,
+ sal_Bool ExportData( const String& rMimeType,
::com::sun::star::uno::Any & rValue );
- BOOL IsOverflow() const { return bOverflow; } // nach dem Importieren
+ sal_Bool IsOverflow() const { return bOverflow; } // nach dem Importieren
const String& GetNonConvertibleChars() const { return aNonConvertibleChars; }
@@ -157,7 +157,7 @@ public:
};
-inline BOOL ScImportExport::IsEndianSwap( const SvStream& rStrm )
+inline sal_Bool ScImportExport::IsEndianSwap( const SvStream& rStrm )
{
#ifdef OSL_BIGENDIAN
return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN;
@@ -185,7 +185,7 @@ public:
rStr.getLength() * sizeof(sal_Unicode), STREAM_READ)
{
SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
- SetEndianSwap( FALSE );
+ SetEndianSwap( false );
}
};
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index b6fb5eead65a..76c4daca74cc 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -70,38 +70,38 @@ private:
TypedScStrCollection* pFormulaData;
TypedScStrCollection* pFormulaDataPara;
Window* pTipVisibleParent;
- ULONG nTipVisible;
+ sal_uLong nTipVisible;
Window* pTipVisibleSecParent;
- ULONG nTipVisibleSec;
+ sal_uLong nTipVisibleSec;
String aManualTip;
String aAutoSearch;
- USHORT nAutoPos;
- BOOL bUseTab; // Blaettern moeglich
+ sal_uInt16 nAutoPos;
+ sal_Bool bUseTab; // Blaettern moeglich
- BOOL bTextValid; // Text noch nicht in Edit-Engine
+ sal_Bool bTextValid; // Text noch nicht in Edit-Engine
String aCurrentText;
String aFormText; // fuer Funktions-Autopilot
xub_StrLen nFormSelStart; // Selektion fuer Funktions-Autopilot
xub_StrLen nFormSelEnd;
- USHORT nAutoPar; // autom.parentheses than can be overwritten
+ sal_uInt16 nAutoPar; // autom.parentheses than can be overwritten
ScAddress aCursorPos;
ScInputMode eMode;
- BOOL bModified;
- BOOL bSelIsRef;
- BOOL bFormulaMode;
- BOOL bInRangeUpdate;
- BOOL bParenthesisShown;
- BOOL bCreatingFuncView;
- BOOL bInEnterHandler;
- BOOL bCommandErrorShown;
- BOOL bInOwnChange;
-
- BOOL bProtected;
- BOOL bCellHasPercentFormat;
- ULONG nValidation;
+ sal_Bool bModified;
+ sal_Bool bSelIsRef;
+ sal_Bool bFormulaMode;
+ sal_Bool bInRangeUpdate;
+ sal_Bool bParenthesisShown;
+ sal_Bool bCreatingFuncView;
+ sal_Bool bInEnterHandler;
+ sal_Bool bCommandErrorShown;
+ sal_Bool bInOwnChange;
+
+ sal_Bool bProtected;
+ sal_Bool bCellHasPercentFormat;
+ sal_uLong nValidation;
SvxCellHorJustify eAttrAdjust;
Fraction aScaleX; // fuer Ref-MapMode
@@ -112,15 +112,15 @@ private:
const ScPatternAttr* pLastPattern;
SfxItemSet* pEditDefaults;
- BOOL bLastIsSymbol;
+ sal_Bool bLastIsSymbol;
ScInputHdlState* pLastState;
Timer* pDelayTimer;
ScRangeFindList* pRangeFindList;
- static BOOL bAutoComplete; // aus App-Optionen
- static BOOL bOptLoaded;
+ static sal_Bool bAutoComplete; // aus App-Optionen
+ static sal_Bool bOptLoaded;
#ifdef _INPUTHDL_CXX
private:
@@ -141,11 +141,11 @@ private:
DECL_LINK( DelayTimer, Timer* );
void GetColData();
void UseColData();
- void NextAutoEntry( BOOL bBack );
+ void NextAutoEntry( sal_Bool bBack );
void UpdateAdjust( sal_Unicode cTyped );
void GetFormulaData();
void UseFormulaData();
- void NextFormulaEntry( BOOL bBack );
+ void NextFormulaEntry( sal_Bool bBack );
void PasteFunctionData();
void PasteManualTip();
EditView* GetFuncEditView();
@@ -156,7 +156,7 @@ private:
void UpdateAutoCorrFlag();
void ResetAutoPar();
void AutoParAdded();
- BOOL CursorAtClosingPar();
+ sal_Bool CursorAtClosingPar();
void SkipClosingPar();
DECL_LINK( ModifyHdl, void* );
DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* );
@@ -168,36 +168,38 @@ public:
virtual ~ScInputHandler();
void SetMode( ScInputMode eNewMode );
- BOOL IsInputMode() const { return (eMode != SC_INPUT_NONE); }
- BOOL IsEditMode() const { return (eMode != SC_INPUT_NONE &&
+ sal_Bool IsInputMode() const { return (eMode != SC_INPUT_NONE); }
+ sal_Bool IsEditMode() const { return (eMode != SC_INPUT_NONE &&
eMode != SC_INPUT_TYPE); }
- BOOL IsTopMode() const { return (eMode == SC_INPUT_TOP); }
+ sal_Bool IsTopMode() const { return (eMode == SC_INPUT_TOP); }
const String& GetEditString();
const String& GetFormString() const { return aFormText; }
- BOOL GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
+ const ScAddress& GetCursorPos() const { return aCursorPos; }
- BOOL KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit = FALSE );
- void EnterHandler( BYTE nBlockMode = 0 );
+ sal_Bool GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
+
+ sal_Bool KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit = false );
+ void EnterHandler( sal_uInt8 nBlockMode = 0 );
void CancelHandler();
void SetReference( const ScRange& rRef, ScDocument* pDoc );
void AddRefEntry();
- BOOL InputCommand( const CommandEvent& rCEvt, BOOL bForce );
+ sal_Bool InputCommand( const CommandEvent& rCEvt, sal_Bool bForce );
- void InsertFunction( const String& rFuncName, BOOL bAddPar = TRUE );
+ void InsertFunction( const String& rFuncName, sal_Bool bAddPar = sal_True );
void ClearText();
void InputSelection( EditView* pView );
- void InputChanged( EditView* pView, BOOL bFromNotify = FALSE );
+ void InputChanged( EditView* pView, sal_Bool bFromNotify = false );
void ViewShellGone(ScTabViewShell* pViewSh);
void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;}
- void NotifyChange( const ScInputHdlState* pState, BOOL bForce = FALSE,
+ void NotifyChange( const ScInputHdlState* pState, sal_Bool bForce = false,
ScTabViewShell* pSourceSh = NULL,
- BOOL bStopEditing = TRUE);
+ sal_Bool bStopEditing = sal_True);
void UpdateCellAdjust( SvxCellHorJustify eJust );
void ResetDelayTimer(); //BugId 54702
@@ -215,21 +217,21 @@ public:
EditView* GetTableView() { return pTableView; }
EditView* GetTopView() { return pTopView; }
- BOOL DataChanging( sal_Unicode cTyped = 0, BOOL bFromCommand = FALSE );
- void DataChanged( BOOL bFromTopNotify = FALSE );
+ sal_Bool DataChanging( sal_Unicode cTyped = 0, sal_Bool bFromCommand = false );
+ void DataChanged( sal_Bool bFromTopNotify = false );
- BOOL TakesReturn() const { return ( nTipVisible != 0 ); }
+ sal_Bool TakesReturn() const { return ( nTipVisible != 0 ); }
- void SetModified() { bModified = TRUE; }
+ void SetModified() { bModified = sal_True; }
- BOOL GetSelIsRef() const { return bSelIsRef; }
- void SetSelIsRef(BOOL bSet) { bSelIsRef = bSet; }
+ sal_Bool GetSelIsRef() const { return bSelIsRef; }
+ void SetSelIsRef(sal_Bool bSet) { bSelIsRef = bSet; }
void ShowRefFrame();
ScRangeFindList* GetRangeFindList() { return pRangeFindList; }
- void UpdateRange( USHORT nIndex, const ScRange& rNew );
+ void UpdateRange( sal_uInt16 nIndex, const ScRange& rNew );
// Kommunikation mit Funktionsautopilot
void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd );
@@ -237,19 +239,19 @@ public:
void InputReplaceSelection ( const String& rStr );
String InputGetFormulaStr ();
- BOOL IsFormulaMode() const { return bFormulaMode; }
+ sal_Bool IsFormulaMode() const { return bFormulaMode; }
ScInputWindow* GetInputWindow() { return pInputWin; }
void SetInputWindow( ScInputWindow* pNew ) { pInputWin = pNew; }
- void StopInputWinEngine( BOOL bAll );
+ void StopInputWinEngine( sal_Bool bAll );
- BOOL IsInEnterHandler() const { return bInEnterHandler; }
- BOOL IsInOwnChange() const { return bInOwnChange; }
+ sal_Bool IsInEnterHandler() const { return bInEnterHandler; }
+ sal_Bool IsInOwnChange() const { return bInOwnChange; }
- BOOL IsModalMode( SfxObjectShell* pDocSh );
+ sal_Bool IsModalMode( SfxObjectShell* pDocSh );
void ForgetLastPattern();
- void UpdateSpellSettings( BOOL bFromStartTab = FALSE );
+ void UpdateSpellSettings( sal_Bool bFromStartTab = false );
void FormulaPreview();
@@ -258,7 +260,7 @@ public:
// eigentlich private, fuer SID_INPUT_SUM public
void InitRangeFinder( const String& rFormula );
- static void SetAutoComplete(BOOL bSet) { bAutoComplete = bSet; }
+ static void SetAutoComplete(sal_Bool bSet) { bAutoComplete = bSet; }
};
//========================================================================
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 46dbe9eb920a..27bc405f24c5 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -56,18 +56,18 @@ public:
void SetTextString( const String& rString );
const String& GetTextString() const;
- BOOL IsInputActive();
+ sal_Bool IsInputActive();
EditView* GetEditView();
// fuer FunktionsAutopiloten
void MakeDialogEditView();
void StartEditEngine();
- void StopEditEngine( BOOL bAll );
+ void StopEditEngine( sal_Bool bAll );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void SetFormulaMode( BOOL bSet );
+ void SetFormulaMode( sal_Bool bSet );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
@@ -104,13 +104,13 @@ private:
ScEditEngineDefaulter* pEditEngine; // erst bei Bedarf angelegt
EditView* pEditView;
AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies
- BOOL bIsRTL;
- BOOL bIsInsertMode;
- BOOL bFormulaMode;
+ sal_Bool bIsRTL;
+ sal_Bool bIsInsertMode;
+ sal_Bool bFormulaMode;
// #102710#; this flag should be true if a key input or a command is handled
// it prevents the call of InputChanged in the ModifyHandler of the EditEngine
- BOOL bInputMode;
+ sal_Bool bInputMode;
};
//========================================================================
@@ -120,16 +120,16 @@ class ScPosWnd : public ComboBox, public SfxListener // Positionsanzeige
private:
String aPosStr;
Accelerator* pAccel;
- ULONG nTipVisible;
- BOOL bFormulaMode;
- BOOL bTopHadFocus;
+ sal_uLong nTipVisible;
+ sal_Bool bFormulaMode;
+ sal_Bool bTopHadFocus;
public:
ScPosWnd( Window* pParent );
virtual ~ScPosWnd();
void SetPos( const String& rPosStr ); // angezeigter Text
- void SetFormulaMode( BOOL bSet );
+ void SetFormulaMode( sal_Bool bSet );
protected:
virtual void Select();
@@ -159,17 +159,17 @@ public:
virtual void Resize();
virtual void Select();
- void SetFuncString( const String& rString, BOOL bDoEdit = TRUE );
+ void SetFuncString( const String& rString, sal_Bool bDoEdit = sal_True );
void SetPosString( const String& rStr );
void SetTextString( const String& rString );
void SetOkCancelMode();
void SetSumAssignMode();
- void EnableButtons( BOOL bEnable = TRUE );
+ void EnableButtons( sal_Bool bEnable = sal_True );
- void SetFormulaMode( BOOL bSet );
+ void SetFormulaMode( sal_Bool bSet );
- BOOL IsInputActive();
+ sal_Bool IsInputActive();
EditView* GetEditView();
void TextGrabFocus();
@@ -181,7 +181,7 @@ public:
// Fuer FunktionsAutopiloten
void MakeDialogEditView();
- void StopEditEngine( BOOL bAll );
+ void StopEditEngine( sal_Bool bAll );
void SetInputHandler( ScInputHandler* pNew );
@@ -206,7 +206,7 @@ private:
String aTextCancel;
String aTextSum;
String aTextEqual;
- BOOL bIsOkCancelMode;
+ sal_Bool bIsOkCancelMode;
};
//==================================================================
@@ -215,7 +215,7 @@ class ScInputWindowWrapper : public SfxChildWindow
{
public:
ScInputWindowWrapper( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo );
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index 7c3965ef981c..41608bccdf83 100644
--- a/sc/source/ui/inc/inscldlg.hxx
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -30,7 +30,7 @@
#define SC_INSCLDLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
@@ -51,7 +51,7 @@ private:
HelpButton aBtnHelp;
public:
- ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove = FALSE );
+ ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = false );
~ScInsertCellDlg();
InsCellCmd GetInsCellCmd() const;
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 5888c1e72209..0b893ed0f7cc 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -30,7 +30,7 @@
#define SC_INSCODLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include "global.hxx"
@@ -41,20 +41,20 @@ class ScInsertContentsDlg : public ModalDialog
{
public:
ScInsertContentsDlg( Window* pParent,
- USHORT nCheckDefaults = 0,
+ sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL );
~ScInsertContentsDlg();
- USHORT GetInsContentsCmdBits() const;
- USHORT GetFormulaCmdBits() const;
- BOOL IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
- BOOL IsTranspose() const {return aBtnTranspose.IsChecked();}
- BOOL IsLink() const {return aBtnLink.IsChecked();}
+ sal_uInt16 GetInsContentsCmdBits() const;
+ sal_uInt16 GetFormulaCmdBits() const;
+ sal_Bool IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
+ sal_Bool IsTranspose() const {return aBtnTranspose.IsChecked();}
+ sal_Bool IsLink() const {return aBtnLink.IsChecked();}
InsCellCmd GetMoveMode();
- void SetOtherDoc( BOOL bSet );
- void SetFillMode( BOOL bSet );
- void SetChangeTrack( BOOL bSet );
+ void SetOtherDoc( sal_Bool bSet );
+ void SetFillMode( sal_Bool bSet );
+ void SetChangeTrack( sal_Bool bSet );
void SetCellShiftDisabled( int nDisable );
private:
@@ -91,19 +91,19 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- BOOL bOtherDoc;
- BOOL bFillMode;
- BOOL bChangeTrack;
- BOOL bMoveDownDisabled;
- BOOL bMoveRightDisabled;
+ sal_Bool bOtherDoc;
+ sal_Bool bFillMode;
+ sal_Bool bChangeTrack;
+ sal_Bool bMoveDownDisabled;
+ sal_Bool bMoveRightDisabled;
- static BOOL bPreviousAllCheck;
- static USHORT nPreviousChecks;
- static USHORT nPreviousChecks2;
- static USHORT nPreviousFormulaChecks;
- static USHORT nPreviousMoveMode; // enum InsCellCmd
+ static sal_Bool bPreviousAllCheck;
+ static sal_uInt16 nPreviousChecks;
+ static sal_uInt16 nPreviousChecks2;
+ static sal_uInt16 nPreviousFormulaChecks;
+ static sal_uInt16 nPreviousMoveMode; // enum InsCellCmd
- void DisableChecks( BOOL bInsAllChecked = TRUE );
+ void DisableChecks( sal_Bool bInsAllChecked = sal_True );
void TestModes();
// Handler
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index d0ae51329feb..718e6d107b9b 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -62,19 +62,20 @@ public:
virtual short Execute(); // ueberladen, um Dialog-Parent zu setzen
- BOOL GetTablesFromFile() { return aBtnFromFile.IsChecked(); }
- BOOL GetTablesAsLink() { return aBtnLink.IsChecked(); }
+ sal_Bool GetTablesFromFile() { return aBtnFromFile.IsChecked(); }
+ sal_Bool GetTablesAsLink() { return aBtnLink.IsChecked(); }
- const String* GetFirstTable( USHORT* pN = NULL );
- const String* GetNextTable( USHORT* pN = NULL );
+ const String* GetFirstTable( sal_uInt16* pN = NULL );
+ const String* GetNextTable( sal_uInt16* pN = NULL );
ScDocShell* GetDocShellTables() { return pDocShTables; }
- BOOL IsTableBefore() { return aBtnBefore.IsChecked(); }
+ sal_Bool IsTableBefore() { return aBtnBefore.IsChecked(); }
SCTAB GetTableCount() { return nTableCount;}
private:
+ FixedLine aFlPos;
RadioButton aBtnBefore;
RadioButton aBtnBehind;
- FixedLine aFlPos;
+ FixedLine aFlTable;
RadioButton aBtnNew;
RadioButton aBtnFromFile;
FixedText aFtCount;
@@ -85,7 +86,6 @@ private:
ScExpandedFixedText aFtPath;
PushButton aBtnBrowse;
CheckBox aBtnLink;
- FixedLine aFlTable;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
@@ -98,7 +98,7 @@ private:
SfxObjectShellRef aDocShTablesRef;
bool bMustClose;
- USHORT nSelTabIndex; // fuer GetFirstTable() / GetNextTable()
+ sal_uInt16 nSelTabIndex; // fuer GetFirstTable() / GetNextTable()
String aStrCurSelTable;
SCTAB nTableCount;
diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx
index f6e8946737d8..2f1c50828324 100644
--- a/sc/source/ui/inc/lbseldlg.hxx
+++ b/sc/source/ui/inc/lbseldlg.hxx
@@ -53,7 +53,7 @@ private:
public:
ScSelEntryDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList );
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 8c37f0a5685d..2a5ab6a18ccb 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -85,7 +85,7 @@ public:
void InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh );
+ sal_uLong nRefresh );
virtual short Execute(); // overwritten to set dialog parent
@@ -93,7 +93,7 @@ public:
String GetFilter(); // may be empty
String GetOptions(); // filter options
String GetSource(); // separated by ";"
- ULONG GetRefresh(); // 0 if disabled
+ sal_uLong GetRefresh(); // 0 if disabled
};
#endif
diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx
index 76b5036b4000..25f182e74872 100644
--- a/sc/source/ui/inc/msgpool.hxx
+++ b/sc/source/ui/inc/msgpool.hxx
@@ -69,7 +69,7 @@ protected:
virtual ~ScMessagePool();
public:
- virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
+ virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const;
};
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
index 1dedf6ae258d..c6e0e1b117e2 100644
--- a/sc/source/ui/inc/mtrindlg.hxx
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -31,7 +31,7 @@
#include <vcl/dialog.hxx>
#include <vcl/field.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
@@ -41,11 +41,11 @@ class ScMetricInputDlg : public ModalDialog
{
public:
ScMetricInputDlg( Window* pParent,
- USHORT nResId, // Ableitung fuer jeden Dialog!
+ sal_uInt16 nResId, // Ableitung fuer jeden Dialog!
long nCurrent,
long nDefault,
FieldUnit eFUnit = FUNIT_MM,
- USHORT nDecimals = 2,
+ sal_uInt16 nDecimals = 2,
long nMaximum = 1000,
long nMinimum = 0,
long nFirst = 1,
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index e850d9bff41c..d563650fca05 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -32,7 +32,7 @@
#include "address.hxx"
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
@@ -48,14 +48,14 @@ public:
ScMoveTableDlg( Window* pParent, const String& rDefault );
~ScMoveTableDlg();
- USHORT GetSelectedDocument () const;
+ sal_uInt16 GetSelectedDocument () const;
SCTAB GetSelectedTable () const;
bool GetCopyTable () const;
bool GetRenameTable () const;
void GetTabNameString( String& rString ) const;
void SetForceCopyTable ();
- void EnableCopyTable (BOOL bFlag=TRUE);
- void EnableRenameTable (BOOL bFlag=TRUE);
+ void EnableCopyTable (sal_Bool bFlag=true);
+ void EnableRenameTable (sal_Bool bFlag=true);
private:
void ResetRenameInput();
@@ -85,7 +85,7 @@ private:
const String& mrDefaultName;
- USHORT nDocument;
+ sal_uInt16 nDocument;
SCTAB nTable;
bool bCopyTable:1;
bool bRenameTable:1;
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index 852a3ce9c85c..1f494d685cb3 100644
--- a/sc/source/ui/inc/namecrea.hxx
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -30,7 +30,7 @@
#define SC_NAMECREA_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include "scui_def.hxx"
@@ -46,9 +46,9 @@ protected:
CancelButton aCancelButton;
HelpButton aHelpButton;
public:
- ScNameCreateDlg( Window * pParent, USHORT nFlags );
+ ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags );
- USHORT GetFlags() const;
+ sal_uInt16 GetFlags() const;
};
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index f86dcc8d6bb9..2939c3caab0b 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -64,7 +64,7 @@ private:
PushButton aBtnAdd;
PushButton aBtnRemove;
MoreButton aBtnMore;
- BOOL bSaved;
+ sal_Bool bSaved;
const String aStrAdd; // "Hinzufuegen"
const String aStrModify; // "Aendern"
@@ -95,7 +95,7 @@ private:
protected:
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
public:
@@ -105,10 +105,10 @@ public:
~ScNameDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
index 3c3547666f8f..c90c20904ffe 100644
--- a/sc/source/ui/inc/namepast.hxx
+++ b/sc/source/ui/inc/namepast.hxx
@@ -30,7 +30,7 @@
#define SC_NAMEPAST_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
@@ -51,7 +51,7 @@ protected:
HelpButton aHelpButton;
PushButton aInsListButton;
public:
- ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList=TRUE );
+ ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList=sal_True );
String GetSelectedName() const;
};
diff --git a/sc/source/ui/inc/navcitem.hxx b/sc/source/ui/inc/navcitem.hxx
index 90bef19cc410..7f03633061d2 100644
--- a/sc/source/ui/inc/navcitem.hxx
+++ b/sc/source/ui/inc/navcitem.hxx
@@ -40,11 +40,11 @@ class ScNavigatorDlg;
class ScNavigatorControllerItem : public SfxControllerItem
{
public:
- ScNavigatorControllerItem( USHORT nId,
+ ScNavigatorControllerItem( sal_uInt16 nId,
ScNavigatorDlg& rDlg,
SfxBindings& rBindings );
protected:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pItem );
private:
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 7d3559e3de9b..1e5fa665ad1b 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -94,7 +94,7 @@ private:
private:
const ScenarioEntry* GetSelectedEntry() const;
- void ExecuteScenarioSlot( USHORT nSlotId );
+ void ExecuteScenarioSlot( sal_uInt16 nSlotId );
void SelectScenario();
void EditScenario();
void DeleteScenario( bool bQueryBox );
@@ -151,7 +151,7 @@ protected:
private:
ScNavigatorDlg& rDlg;
SCCOL nCol;
- USHORT nKeyGroup;
+ sal_uInt16 nKeyGroup;
void EvalText ();
void ExecuteCol ();
@@ -210,7 +210,7 @@ public:
CommandToolBox( ScNavigatorDlg* pParent, const ResId& rResId );
~CommandToolBox();
- void Select( USHORT nId );
+ void Select( sal_uInt16 nId );
void UpdateButtons();
void InitImageList();
@@ -272,11 +272,11 @@ private:
long nListModeHeight;
long nInitListHeight;
NavListMode eListMode;
- USHORT nDropMode;
+ sal_uInt16 nDropMode;
SCCOL nCurCol;
SCROW nCurRow;
SCTAB nCurTab;
- BOOL bFirstBig;
+ sal_Bool bFirstBig;
ScNavigatorControllerItem** ppBoundItems;
@@ -296,7 +296,7 @@ private:
ScTabViewShell* GetTabViewShell() const;
ScNavigatorSettings* GetNavigatorSettings();
- BOOL GetViewData();
+ sal_Bool GetViewData();
void UpdateColumn ( const SCCOL* pCol = NULL );
void UpdateRow ( const SCROW* pRow = NULL );
@@ -305,12 +305,12 @@ private:
void GetDocNames(const String* pSelEntry = NULL);
- void SetListMode ( NavListMode eMode, BOOL bSetSize = TRUE );
- void ShowList ( BOOL bShow, BOOL bSetSize );
- void ShowScenarios ( BOOL bShow, BOOL bSetSize );
+ void SetListMode ( NavListMode eMode, sal_Bool bSetSize = sal_True );
+ void ShowList ( sal_Bool bShow, sal_Bool bSetSize );
+ void ShowScenarios ( sal_Bool bShow, sal_Bool bSetSize );
- void SetDropMode(USHORT nNew);
- USHORT GetDropMode() const { return nDropMode; }
+ void SetDropMode(sal_uInt16 nNew);
+ sal_uInt16 GetDropMode() const { return nDropMode; }
const String& GetStrDragMode() const { return aStrDragMode; }
const String& GetStrDisplay() const { return aStrDisplay; }
@@ -348,7 +348,7 @@ class ScNavigatorDialogWrapper: public SfxChildWindowContext
{
public:
ScNavigatorDialogWrapper( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo );
diff --git a/sc/source/ui/inc/navsett.hxx b/sc/source/ui/inc/navsett.hxx
index 3666a6be981a..6e4e85a10c39 100644
--- a/sc/source/ui/inc/navsett.hxx
+++ b/sc/source/ui/inc/navsett.hxx
@@ -38,21 +38,21 @@
class ScNavigatorSettings
{
private:
- ::std::vector< BOOL > maExpandedVec; /// Array of Booleans for expand state.
- USHORT mnRootSelected; /// Index of selected root entry.
- ULONG mnChildSelected; /// Index of selected child entry.
+ ::std::vector< sal_Bool > maExpandedVec; /// Array of Booleans for expand state.
+ sal_uInt16 mnRootSelected; /// Index of selected root entry.
+ sal_uLong mnChildSelected; /// Index of selected child entry.
public:
ScNavigatorSettings();
- inline void SetExpanded( USHORT nIndex, BOOL bExpand ) { maExpandedVec[ nIndex ] = bExpand; }
- inline BOOL IsExpanded( USHORT nIndex ) const { return maExpandedVec[ nIndex ]; }
+ inline void SetExpanded( sal_uInt16 nIndex, sal_Bool bExpand ) { maExpandedVec[ nIndex ] = bExpand; }
+ inline sal_Bool IsExpanded( sal_uInt16 nIndex ) const { return maExpandedVec[ nIndex ]; }
- inline void SetRootSelected( USHORT nIndex ) { mnRootSelected = nIndex; }
- inline USHORT GetRootSelected() const { return mnRootSelected; }
+ inline void SetRootSelected( sal_uInt16 nIndex ) { mnRootSelected = nIndex; }
+ inline sal_uInt16 GetRootSelected() const { return mnRootSelected; }
- inline void SetChildSelected( ULONG nIndex ) { mnChildSelected = nIndex; }
- inline ULONG GetChildSelected() const { return mnChildSelected; }
+ inline void SetChildSelected( sal_uLong nIndex ) { mnChildSelected = nIndex; }
+ inline sal_uLong GetChildSelected() const { return mnChildSelected; }
};
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 03626bfeafb7..01eeec8dbcd5 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -50,27 +50,27 @@ private:
Rectangle aVisRect;
Timer aTimer;
MapMode aMapMode;
- BOOL bLeft;
- BOOL bByKeyboard;
+ sal_Bool bLeft;
+ sal_Bool bByKeyboard;
Rectangle aRect;
SdrModel* pModel;
SdrObject* pObject;
- BOOL bVisible;
+ sal_Bool bVisible;
DECL_LINK( TimeHdl, Timer* );
public:
ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal,
ScDocument* pD, ScAddress aPos, const String& rUser,
- const MapMode& rMap, BOOL bLeftEdge, BOOL bForce, BOOL bKeyboard );
+ const MapMode& rMap, sal_Bool bLeftEdge, sal_Bool bForce, sal_Bool bKeyboard );
~ScNoteMarker();
void Draw();
void InvalidateWin();
ScAddress GetDocPos() const { return aDocPos; }
- BOOL IsByKeyboard() const { return bByKeyboard; }
+ sal_Bool IsByKeyboard() const { return bByKeyboard; }
};
diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx
index 809db33df06d..2f0b00c3e580 100644
--- a/sc/source/ui/inc/olinefun.hxx
+++ b/sc/source/ui/inc/olinefun.hxx
@@ -46,21 +46,21 @@ public:
ScOutlineDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
~ScOutlineDocFunc() {}
- BOOL MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi );
- BOOL RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi );
- BOOL RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi );
- BOOL AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+ sal_Bool MakeOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool RemoveOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool AutoOutline( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
- BOOL SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- BOOL ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi );
- BOOL HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+ sal_Bool ShowMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
+ sal_Bool HideMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi );
- BOOL ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
- BOOL HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
- BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
+ sal_Bool HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
+ sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
};
diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx
index 266e67dd0999..e1dee0826d34 100644
--- a/sc/source/ui/inc/olinewin.hxx
+++ b/sc/source/ui/inc/olinewin.hxx
@@ -209,7 +209,7 @@ private:
long nLevelStart, long nEntryStart,
long nLevelEnd, long nEntryEnd );
/** Draws the specified image unpressed. */
- void DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId );
+ void DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId );
/** Draws a pressed or unpressed border. */
void DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed );
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index f6c3a2212ca9..116097c30532 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -69,7 +69,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
#endif
diff --git a/sc/source/ui/inc/optload.hxx b/sc/source/ui/inc/optload.hxx
index 26ffb04cb3be..14e1c4661903 100644
--- a/sc/source/ui/inc/optload.hxx
+++ b/sc/source/ui/inc/optload.hxx
@@ -58,7 +58,7 @@ public:
void SetDocument(ScDocument*);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index f81fbf05cd1f..c7a06213c067 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -63,7 +63,7 @@ protected:
struct ScOptConditionRow
{
String aLeftStr;
- USHORT nOperator;
+ sal_uInt16 nOperator;
String aRightStr;
ScOptConditionRow() : nOperator(0) {}
@@ -74,9 +74,9 @@ struct ScOptConditionRow
class ScOptSolverSave
{
String maObjective;
- BOOL mbMax;
- BOOL mbMin;
- BOOL mbValue;
+ sal_Bool mbMax;
+ sal_Bool mbMin;
+ sal_Bool mbValue;
String maTarget;
String maVariable;
std::vector<ScOptConditionRow> maConditions;
@@ -84,16 +84,16 @@ class ScOptSolverSave
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
public:
- ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue,
+ ScOptSolverSave( const String& rObjective, sal_Bool bMax, sal_Bool bMin, sal_Bool bValue,
const String& rTarget, const String& rVariable,
const std::vector<ScOptConditionRow>& rConditions,
const String& rEngine,
const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties );
const String& GetObjective() const { return maObjective; }
- BOOL GetMax() const { return mbMax; }
- BOOL GetMin() const { return mbMin; }
- BOOL GetValue() const { return mbValue; }
+ sal_Bool GetMax() const { return mbMax; }
+ sal_Bool GetMin() const { return mbMin; }
+ sal_Bool GetValue() const { return mbValue; }
const String& GetTarget() const { return maTarget; }
const String& GetVariable() const { return maVariable; }
const std::vector<ScOptConditionRow>& GetConditions() const { return maConditions; }
@@ -110,9 +110,9 @@ public:
~ScOptSolverDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedText maFtObjectiveCell;
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 4f9d493aac14..b109d2951eb0 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -106,7 +106,7 @@ private:
ScOutputType eType; // Bildschirm/Drucker ...
double nPPTX; // Pixel per Twips
double nPPTY;
-// USHORT nZoom; // Zoom-Faktor (Prozent) - fuer GetFont
+// sal_uInt16 nZoom; // Zoom-Faktor (Prozent) - fuer GetFont
Fraction aZoomX;
Fraction aZoomY;
@@ -117,61 +117,61 @@ private:
// #114135#
FmFormView* pDrawView; // SdrView to paint to
- BOOL bEditMode; // InPlace editierte Zelle - nicht ausgeben
+ sal_Bool bEditMode; // InPlace editierte Zelle - nicht ausgeben
SCCOL nEditCol;
SCROW nEditRow;
- BOOL bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!)
- BOOL bSingleGrid; // beim Gitter bChanged auswerten
+ sal_Bool bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!)
+ sal_Bool bSingleGrid; // beim Gitter bChanged auswerten
- BOOL bPagebreakMode; // Seitenumbruch-Vorschau
- BOOL bSolidBackground; // weiss statt transparent
+ sal_Bool bPagebreakMode; // Seitenumbruch-Vorschau
+ sal_Bool bSolidBackground; // weiss statt transparent
- BOOL bUseStyleColor;
- BOOL bForceAutoColor;
+ sal_Bool bUseStyleColor;
+ sal_Bool bForceAutoColor;
- BOOL bSyntaxMode; // Syntax-Highlighting
+ sal_Bool bSyntaxMode; // Syntax-Highlighting
Color* pValueColor;
Color* pTextColor;
Color* pFormulaColor;
Color aGridColor;
- BOOL bShowNullValues;
- BOOL bShowFormulas;
- BOOL bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen
- BOOL bMarkClipped;
+ sal_Bool bShowNullValues;
+ sal_Bool bShowFormulas;
+ sal_Bool bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen
+ sal_Bool bMarkClipped;
- BOOL bSnapPixel;
+ sal_Bool bSnapPixel;
- BOOL bAnyRotated; // intern
- BOOL bAnyClipped; // intern
- BOOL bTabProtected;
- BYTE nTabTextDirection; // EEHorizontalTextDirection values
- BOOL bLayoutRTL;
+ sal_Bool bAnyRotated; // intern
+ sal_Bool bAnyClipped; // intern
+ sal_Bool bTabProtected;
+ sal_uInt8 nTabTextDirection; // EEHorizontalTextDirection values
+ sal_Bool bLayoutRTL;
// #i74769# use SdrPaintWindow direct, remember it during BeginDrawLayers/EndDrawLayers
SdrPaintWindow* mpTargetPaintWindow;
// private methods
- BOOL GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
- SCCOL& rOverX, SCROW& rOverY, BOOL bVisRowChanged );
- BOOL IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
+ sal_Bool GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
+ SCCOL& rOverX, SCROW& rOverY, sal_Bool bVisRowChanged );
+ sal_Bool IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
void GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell );
- BOOL IsAvailable( SCCOL nX, SCROW nY );
+ sal_Bool IsAvailable( SCCOL nX, SCROW nY );
void GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
SCCOL nCellX, SCROW nCellY, long nNeeded,
const ScPatternAttr& rPattern,
- USHORT nHorJustify, bool bCellIsValue,
+ sal_uInt16 nHorJustify, bool bCellIsValue,
bool bBreak, bool bOverwrite,
OutputAreaParam& rParam );
void ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect,
long nLeftM, long nTopM, long nRightM, long nBottomM,
- BOOL bWidth, USHORT nOrient, long nAttrRotate, BOOL bPixelToLogic,
+ sal_Bool bWidth, sal_uInt16 nOrient, long nAttrRotate, sal_Bool bPixelToLogic,
long& rEngineWidth, long& rEngineHeight, long& rNeededPixel,
bool& rLeftClip, bool& rRightClip );
@@ -203,37 +203,37 @@ public:
// #114135#
void SetDrawView( FmFormView* pNew ) { pDrawView = pNew; }
- void SetSolidBackground( BOOL bSet ) { bSolidBackground = bSet; }
- void SetUseStyleColor( BOOL bSet ) { bUseStyleColor = bSet; }
+ void SetSolidBackground( sal_Bool bSet ) { bSolidBackground = bSet; }
+ void SetUseStyleColor( sal_Bool bSet ) { bUseStyleColor = bSet; }
void SetEditCell( SCCOL nCol, SCROW nRow );
- void SetSyntaxMode( BOOL bNewMode );
- void SetMetaFileMode( BOOL bNewMode );
- void SetSingleGrid( BOOL bNewMode );
+ void SetSyntaxMode( sal_Bool bNewMode );
+ void SetMetaFileMode( sal_Bool bNewMode );
+ void SetSingleGrid( sal_Bool bNewMode );
void SetGridColor( const Color& rColor );
- void SetMarkClipped( BOOL bSet );
- void SetShowNullValues ( BOOL bSet = TRUE );
- void SetShowFormulas ( BOOL bSet = TRUE );
- void SetShowSpellErrors( BOOL bSet = TRUE );
+ void SetMarkClipped( sal_Bool bSet );
+ void SetShowNullValues ( sal_Bool bSet = sal_True );
+ void SetShowFormulas ( sal_Bool bSet = sal_True );
+ void SetShowSpellErrors( sal_Bool bSet = sal_True );
void SetMirrorWidth( long nNew );
long GetScrW() const { return nScrW; }
long GetScrH() const { return nScrH; }
- void SetSnapPixel( BOOL bSet = TRUE );
+ void SetSnapPixel( sal_Bool bSet = sal_True );
- void DrawGrid( BOOL bGrid, BOOL bPage );
- void DrawStrings( BOOL bPixelToLogic = FALSE );
+ void DrawGrid( sal_Bool bGrid, sal_Bool bPage );
+ void DrawStrings( sal_Bool bPixelToLogic = false );
void DrawDocumentBackground();
void DrawBackground();
void DrawShadow();
- void DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom);
+ void DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom);
void DrawFrame();
// with logic MapMode set!
- void DrawEdit(BOOL bPixelToLogic);
+ void DrawEdit(sal_Bool bPixelToLogic);
void FindRotated();
- void DrawRotated(BOOL bPixelToLogic); // logisch
+ void DrawRotated(sal_Bool bPixelToLogic); // logisch
void DrawClear();
@@ -246,17 +246,17 @@ public:
void DrawingSingle(const sal_uInt16 nLayer);
void DrawSelectiveObjects(const sal_uInt16 nLayer);
- BOOL SetChangedClip(); // FALSE = nix
+ sal_Bool SetChangedClip(); // sal_False = nix
PolyPolygon GetChangedArea();
void FindChanged();
void SetPagebreakMode( ScPageBreakData* pPageData );
void DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, BOOL bHandle );
+ const Color& rColor, sal_Bool bHandle );
void DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, USHORT nType );
+ const Color& rColor, sal_uInt16 nType );
void DrawChangeTrack();
void DrawClipMarks();
diff --git a/sc/source/ui/inc/pagedata.hxx b/sc/source/ui/inc/pagedata.hxx
index 31ce7a5db38c..f0114ddb2101 100644
--- a/sc/source/ui/inc/pagedata.hxx
+++ b/sc/source/ui/inc/pagedata.hxx
@@ -45,8 +45,8 @@ private:
size_t nPagesY;
SCROW* pPageEndY;
long nFirstPage;
- BOOL bTopDown;
- BOOL bAutomatic;
+ sal_Bool bTopDown;
+ sal_Bool bAutomatic;
public:
ScPrintRangeData();
@@ -65,10 +65,10 @@ public:
void SetFirstPage( long nNew ) { nFirstPage = nNew; }
long GetFirstPage() const { return nFirstPage; }
- void SetTopDown( BOOL bSet ) { bTopDown = bSet; }
- BOOL IsTopDown() const { return bTopDown; }
- void SetAutomatic( BOOL bSet ) { bAutomatic = bSet; }
- BOOL IsAutomatic() const { return bAutomatic; }
+ void SetTopDown( sal_Bool bSet ) { bTopDown = bSet; }
+ sal_Bool IsTopDown() const { return bTopDown; }
+ void SetAutomatic( sal_Bool bSet ) { bAutomatic = bSet; }
+ sal_Bool IsAutomatic() const { return bAutomatic; }
};
class ScPageBreakData
@@ -85,7 +85,7 @@ public:
size_t GetCount() const { return nUsed; }
ScPrintRangeData& GetData(size_t i);
- BOOL IsEqual( const ScPageBreakData& rOther ) const;
+ sal_Bool IsEqual( const ScPageBreakData& rOther ) const;
void AddPages();
};
diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx
index 36fac42a01ca..bacbc2c35078 100644
--- a/sc/source/ui/inc/parawin.hxx
+++ b/sc/source/ui/inc/parawin.hxx
@@ -61,10 +61,10 @@ private:
Link aFxLink;
Link aArgModifiedLink;
- ::std::vector<USHORT> aVisibleArgMapping;
+ ::std::vector<sal_uInt16> aVisibleArgMapping;
const ScFuncDesc* pFuncDesc;
ScAnyRefDlg* pMyParent;
- USHORT nArgs; // unsuppressed arguments
+ sal_uInt16 nArgs; // unsuppressed arguments
Font aFntBold;
Font aFntLight;
@@ -89,10 +89,10 @@ private:
ArgEdit aEdArg4;
formula::RefButton aRefBtn4;
ScrollBar aSlider;
- BOOL bRefMode;
+ sal_Bool bRefMode;
- USHORT nEdFocus;
- USHORT nActiveLine;
+ sal_uInt16 nEdFocus;
+ sal_uInt16 nActiveLine;
ArgInput aArgInput[4];
String aDefaultString;
@@ -109,7 +109,7 @@ protected:
virtual void ArgumentModified();
virtual void FxClick();
- void InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx,
+ void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx,
ArgEdit& rEdArg, formula::RefButton& rRefBtn);
void DelParaArray();
@@ -117,40 +117,40 @@ protected:
void SetArgumentText(const String& aText);
- void SetArgName (USHORT no,const String &aArg);
- void SetArgNameFont (USHORT no,const Font&);
- void SetArgVal (USHORT no,const String &aArg);
+ void SetArgName (sal_uInt16 no,const String &aArg);
+ void SetArgNameFont (sal_uInt16 no,const Font&);
+ void SetArgVal (sal_uInt16 no,const String &aArg);
- void HideParaLine(USHORT no);
- void ShowParaLine(USHORT no);
- void UpdateArgDesc( USHORT nArg );
- void UpdateArgInput( USHORT nOffset, USHORT i );
+ void HideParaLine(sal_uInt16 no);
+ void ShowParaLine(sal_uInt16 no);
+ void UpdateArgDesc( sal_uInt16 nArg );
+ void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i );
public:
ScParaWin(ScAnyRefDlg* pParent,Point aPos);
~ScParaWin();
void SetFunctionDesc(const ScFuncDesc* pFDesc);
- void SetArgumentOffset(USHORT nOffset);
+ void SetArgumentOffset(sal_uInt16 nOffset);
void SetEditDesc(const String& aText);
void UpdateParas();
void ClearAll();
- BOOL IsRefMode() {return bRefMode;}
- void SetRefMode(BOOL bFlag) {bRefMode=bFlag;}
+ sal_Bool IsRefMode() {return bRefMode;}
+ void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;}
- USHORT GetActiveLine();
- void SetActiveLine(USHORT no);
+ sal_uInt16 GetActiveLine();
+ void SetActiveLine(sal_uInt16 no);
formula::RefEdit* GetActiveEdit();
String GetActiveArgName();
- String GetArgument(USHORT no);
- void SetArgument(USHORT no, const String& aString);
+ String GetArgument(sal_uInt16 no);
+ void SetArgument(sal_uInt16 no, const String& aString);
void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont);
- void SetEdFocus(USHORT nEditLine); //Sichtbare Editzeilen
- USHORT GetSliderPos();
- void SetSliderPos(USHORT nSliderPos);
+ void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen
+ sal_uInt16 GetSliderPos();
+ void SetSliderPos(sal_uInt16 nSliderPos);
void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; }
const Link& GetScrollHdl() const { return aScrollLink; }
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
index 6a57c9229eea..bb68e07b3891 100644
--- a/sc/source/ui/inc/pfiltdlg.hxx
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -97,14 +97,14 @@ private:
const String aStrRow;
const String aStrColumn;
- const USHORT nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
ScDocument* pDoc;
SCTAB nSrcTab;
- USHORT nFieldCount;
+ sal_uInt16 nFieldCount;
ComboBox* aValueEdArr[3];
ListBox* aFieldLbArr[3];
ListBox* aCondLbArr[3];
@@ -115,9 +115,9 @@ private:
private:
void Init ( const SfxItemSet& rArgSet );
void FillFieldLists ();
- void UpdateValueList ( USHORT nList );
- void ClearValueList ( USHORT nList );
- USHORT GetFieldSelPos ( SCCOL nField );
+ void UpdateValueList ( sal_uInt16 nList );
+ void ClearValueList ( sal_uInt16 nList );
+ sal_uInt16 GetFieldSelPos ( SCCOL nField );
// Handler:
DECL_LINK( LbSelectHdl, ListBox* );
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx
index 9ab60717c635..b64e9753e43d 100644
--- a/sc/source/ui/inc/pfuncache.hxx
+++ b/sc/source/ui/inc/pfuncache.hxx
@@ -67,7 +67,7 @@ public:
void SetRanges(const ScRangeList& rNew) { aRanges = rNew; }
void SetOptions(const ScPrintOptions& rNew) { aOptions = rNew; }
- BOOL operator==(const ScPrintSelectionStatus& rOther) const
+ sal_Bool operator==(const ScPrintSelectionStatus& rOther) const
{ return eMode == rOther.eMode && aRanges == rOther.aRanges && aOptions == rOther.aOptions; }
ScPrintSelectionMode GetMode() const { return eMode; }
@@ -110,7 +110,7 @@ public:
const ScPrintSelectionStatus& rStatus );
~ScPrintFuncCache();
- BOOL IsSameSelection( const ScPrintSelectionStatus& rStatus ) const;
+ sal_Bool IsSameSelection( const ScPrintSelectionStatus& rStatus ) const;
void InitLocations( const ScMarkData& rMark, OutputDevice* pDev );
bool FindLocation( const ScAddress& rCell, ScPrintPageLocation& rLocation ) const;
diff --git a/sc/source/ui/inc/pntlock.hxx b/sc/source/ui/inc/pntlock.hxx
index 1633a160632d..d88d89d745d7 100644
--- a/sc/source/ui/inc/pntlock.hxx
+++ b/sc/source/ui/inc/pntlock.hxx
@@ -35,32 +35,32 @@ class ScPaintLockData
{
private:
ScRangeListRef xRangeList;
- USHORT nMode;
- USHORT nLevel;
- USHORT nDocLevel;
- USHORT nParts;
- BOOL bModified;
+ sal_uInt16 nMode;
+ sal_uInt16 nLevel;
+ sal_uInt16 nDocLevel;
+ sal_uInt16 nParts;
+ sal_Bool bModified;
public:
- ScPaintLockData(USHORT nNewMode);
+ ScPaintLockData(sal_uInt16 nNewMode);
~ScPaintLockData();
- void AddRange( const ScRange& rRange, USHORT nP );
+ void AddRange( const ScRange& rRange, sal_uInt16 nP );
- void SetModified() { bModified = TRUE; }
+ void SetModified() { bModified = sal_True; }
void IncLevel(sal_Bool bDoc)
{ if (bDoc) ++nDocLevel; else ++nLevel; }
void DecLevel(sal_Bool bDoc)
{ if (bDoc) --nDocLevel; else --nLevel; }
const ScRangeListRef& GetRangeList() const { return xRangeList; }
- USHORT GetParts() const { return nParts; }
- USHORT GetLevel(sal_Bool bDoc) const
+ sal_uInt16 GetParts() const { return nParts; }
+ sal_uInt16 GetLevel(sal_Bool bDoc) const
{ return bDoc ? nDocLevel : nLevel; }
- BOOL GetModified() const { return bModified; }
+ sal_Bool GetModified() const { return bModified; }
// fuer Wiederherstellen nach Reset
- void SetLevel(USHORT nNew, sal_Bool bDoc)
+ void SetLevel(sal_uInt16 nNew, sal_Bool bDoc)
{ if (bDoc) nDocLevel = nNew; else nLevel = nNew; }
};
diff --git a/sc/source/ui/inc/popmenu.hxx b/sc/source/ui/inc/popmenu.hxx
index ee5bb314f213..a7ee2d7bfd3e 100644
--- a/sc/source/ui/inc/popmenu.hxx
+++ b/sc/source/ui/inc/popmenu.hxx
@@ -35,15 +35,15 @@
class SC_DLLPUBLIC ScPopupMenu : public PopupMenu
{
private:
- USHORT nSel;
- BOOL bHit;
+ sal_uInt16 nSel;
+ sal_Bool bHit;
protected:
virtual void Select();
public:
- ScPopupMenu() : nSel(0),bHit(FALSE) {}
- ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(FALSE) {}
- USHORT GetSelected() const { return nSel; }
- BOOL WasHit() const { return bHit; }
+ ScPopupMenu() : nSel(0),bHit(false) {}
+ ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(false) {}
+ sal_uInt16 GetSelected() const { return nSel; }
+ sal_Bool WasHit() const { return bHit; }
};
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 870441a574c0..6988259526d0 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -41,11 +41,11 @@ class ScPreview : public Window
private:
// eingestellt:
long nPageNo; // Seite im Dokument
- USHORT nZoom; // eingestellter Zoom
+ sal_uInt16 nZoom; // eingestellter Zoom
Point aOffset; // positiv
// berechnet:
- BOOL bValid; // folgende Werte gueltig
+ sal_Bool bValid; // folgende Werte gueltig
SCTAB nTabCount;
SCTAB nTabsTested; // fuer wieviele Tabellen ist nPages gueltig?
long nPages[MAXTABCOUNT];
@@ -58,8 +58,8 @@ private:
Time aTime;
long nTotalPages;
Size aPageSize; // fuer GetOptimalZoom
- BOOL bStateValid;
- BOOL bLocationValid;
+ sal_Bool bStateValid;
+ sal_Bool bLocationValid;
ScPrintState aState;
ScPreviewLocationData* pLocationData; // stores table layout for accessibility API
FmFormView* pDrawView;
@@ -67,26 +67,26 @@ private:
SCTAB nCurTab;
// intern:
- BOOL bInPaint;
- BOOL bInGetState;
+ sal_Bool bInPaint;
+ sal_Bool bInGetState;
ScDocShell* pDocShell;
ScPreviewShell* pViewShell;
- BOOL bLeftRulerMove;
- BOOL bRightRulerMove;
- BOOL bTopRulerMove;
- BOOL bBottomRulerMove;
- BOOL bHeaderRulerMove;
- BOOL bFooterRulerMove;
-
- BOOL bLeftRulerChange;
- BOOL bRightRulerChange;
- BOOL bTopRulerChange;
- BOOL bBottomRulerChange;
- BOOL bHeaderRulerChange;
- BOOL bFooterRulerChange;
- BOOL bPageMargin;
- BOOL bColRulerMove;
+ sal_Bool bLeftRulerMove;
+ sal_Bool bRightRulerMove;
+ sal_Bool bTopRulerMove;
+ sal_Bool bBottomRulerMove;
+ sal_Bool bHeaderRulerMove;
+ sal_Bool bFooterRulerMove;
+
+ sal_Bool bLeftRulerChange;
+ sal_Bool bRightRulerChange;
+ sal_Bool bTopRulerChange;
+ sal_Bool bBottomRulerChange;
+ sal_Bool bHeaderRulerChange;
+ sal_Bool bFooterRulerChange;
+ sal_Bool bPageMargin;
+ sal_Bool bColRulerMove;
ScRange aPageArea;
long nRight[ MAXCOL+1 ];
long nLeftPosition;
@@ -104,7 +104,7 @@ private:
void UpdateDrawView();
void DoPrint( ScPreviewLocationData* pFillLocation );
- void InvalidateLocationData( ULONG nId );
+ void InvalidateLocationData( sal_uLong nId );
using Window::SetZoom;
@@ -127,18 +127,18 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void DataChanged(BOOL bNewTime = FALSE); // statt Invalidate rufen
+ void DataChanged(sal_Bool bNewTime = false); // statt Invalidate rufen
void DoInvalidate();
void SetXOffset( long nX );
void SetYOffset( long nY );
- void SetZoom(USHORT nNewZoom);
+ void SetZoom(sal_uInt16 nNewZoom);
void SetPageNo( long nPage );
- BOOL GetPageMargins()const { return bPageMargin; }
- void SetPageMargins( BOOL bVal ) { bPageMargin = bVal; }
- void DrawInvert( long nDragPos, USHORT nFlags );
- void DragMove( long nDragMovePos, USHORT nFlags );
+ sal_Bool GetPageMargins()const { return bPageMargin; }
+ void SetPageMargins( sal_Bool bVal ) { bPageMargin = bVal; }
+ void DrawInvert( long nDragPos, sal_uInt16 nFlags );
+ void DragMove( long nDragMovePos, sal_uInt16 nFlags );
const ScPreviewLocationData& GetLocationData();
@@ -146,19 +146,19 @@ public:
String GetPosString();
long GetPageNo() const { return nPageNo; }
- USHORT GetZoom() const { return nZoom; }
+ sal_uInt16 GetZoom() const { return nZoom; }
Point GetOffset() const { return aOffset; }
SCTAB GetTab() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTab; }
long GetTotalPages() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTotalPages; }
- BOOL AllTested() const { return bValid && nTabsTested >= nTabCount; }
+ sal_Bool AllTested() const { return bValid && nTabsTested >= nTabCount; }
- USHORT GetOptimalZoom(BOOL bWidthOnly);
+ sal_uInt16 GetOptimalZoom(sal_Bool bWidthOnly);
long GetFirstPage(SCTAB nTab);
void CalcAll() { CalcPages(MAXTAB); }
- void SetInGetState(BOOL bSet) { bInGetState = bSet; }
+ void SetInGetState(sal_Bool bSet) { bInGetState = bSet; }
DECL_STATIC_LINK( ScPreview, InvalidateHdl, void* );
static void StaticInvalidate();
diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx
index b706bdc6ca09..936803cd88c2 100644
--- a/sc/source/ui/inc/prevloc.hxx
+++ b/sc/source/ui/inc/prevloc.hxx
@@ -53,12 +53,12 @@ class ScPreviewLocationEntry;
struct ScPreviewColRowInfo
{
- BOOL bIsHeader;
+ sal_Bool bIsHeader;
SCCOLROW nDocIndex;
long nPixelStart;
long nPixelEnd;
- void Set( BOOL bHeader, SCCOLROW nIndex, long nStart, long nEnd )
+ void Set( sal_Bool bHeader, SCCOLROW nIndex, long nStart, long nEnd )
{
bIsHeader = bHeader;
nDocIndex = nIndex;
@@ -100,7 +100,7 @@ class ScPreviewLocationData
MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES];
Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES];
sal_uInt8 aDrawRangeId[SC_PREVIEW_MAXRANGES];
- USHORT nDrawRanges;
+ sal_uInt16 nDrawRanges;
SCTAB nPrintTab;
boost::ptr_list<ScPreviewLocationEntry> aEntries;
@@ -113,11 +113,11 @@ public:
void SetCellMapMode( const MapMode& rMapMode );
void SetPrintTab( SCTAB nNew );
void Clear();
- void AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow,
+ void AddCellRange( const Rectangle& rRect, const ScRange& rRange, sal_Bool bRepCol, sal_Bool bRepRow,
const MapMode& rDrawMap );
- void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol );
- void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow );
- void AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft );
+ void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, sal_Bool bRepCol );
+ void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, sal_Bool bRepRow );
+ void AddHeaderFooter( const Rectangle& rRect, sal_Bool bHeader, sal_Bool bLeft );
void AddNoteMark( const Rectangle& rRect, const ScAddress& rPos );
void AddNoteText( const Rectangle& rRect, const ScAddress& rPos );
@@ -126,24 +126,24 @@ public:
// Get info on visible columns/rows in the visible area
void GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const;
- USHORT GetDrawRanges() const { return nDrawRanges; }
- void GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const;
+ sal_uInt16 GetDrawRanges() const { return nDrawRanges; }
+ void GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const;
- BOOL GetHeaderPosition( Rectangle& rHeaderRect ) const;
- BOOL GetFooterPosition( Rectangle& rFooterRect ) const;
- BOOL IsHeaderLeft() const;
- BOOL IsFooterLeft() const;
+ sal_Bool GetHeaderPosition( Rectangle& rHeaderRect ) const;
+ sal_Bool GetFooterPosition( Rectangle& rFooterRect ) const;
+ sal_Bool IsHeaderLeft() const;
+ sal_Bool IsFooterLeft() const;
- long GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const;
- BOOL GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks,
+ long GetNoteCountInRange( const Rectangle& rVisiblePixel, sal_Bool bNoteMarks ) const;
+ sal_Bool GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, sal_Bool bNoteMarks,
ScAddress& rCellPos, Rectangle& rNoteRect ) const;
- Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks,
+ Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, sal_Bool bNoteMarks,
const ScAddress& aCellPos) const;
// Check if any cells (including column/row headers) are in the visible area
- BOOL HasCellsInRange( const Rectangle& rVisiblePixel ) const;
+ sal_Bool HasCellsInRange( const Rectangle& rVisiblePixel ) const;
- BOOL GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const;
+ sal_Bool GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const;
// returns the rectangle where the EditEngine draws the text of a Header Cell
// if bColHeader is true it returns the rectangle of the header of the column in rCellPos
@@ -152,8 +152,8 @@ public:
Rectangle GetCellOutputRect(const ScAddress& rCellPos) const;
// Query the range and rectangle of the main (non-repeat) cell range.
- // Returns FALSE if not contained.
- BOOL GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const;
+ // Returns sal_False if not contained.
+ sal_Bool GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const;
};
#endif
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 861fba46d892..271a35260e99 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -58,7 +58,7 @@ class ScPreviewShell: public SfxViewShell
Window* pCorner;
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData
- BYTE nSourceDesignMode; // form design mode from TabView
+ sal_uInt8 nSourceDesignMode; // form design mode from TabView
SvxZoomType eZoom;
long nMaxVertPos;
@@ -67,11 +67,11 @@ class ScPreviewShell: public SfxViewShell
private:
void Construct( Window* pParent );
DECL_LINK(ScrollHandler, ScrollBar* );
- void DoScroll( USHORT nMode );
+ void DoScroll( sal_uInt16 nMode );
protected:
- virtual void Activate(BOOL bMDI);
- virtual void Deactivate(BOOL bMDI);
+ virtual void Activate(sal_Bool bMDI);
+ virtual void Deactivate(sal_Bool bMDI);
virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
@@ -82,11 +82,11 @@ protected:
virtual String GetDescription() const;
- virtual void WriteUserData(String &, BOOL bBrowse = FALSE);
- virtual void ReadUserData(const String &, BOOL bBrowse = FALSE);
+ virtual void WriteUserData(String &, sal_Bool bBrowse = false);
+ virtual void ReadUserData(const String &, sal_Bool bBrowse = false);
- virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
- virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
+ virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
public:
TYPEINFO();
@@ -102,7 +102,7 @@ public:
void InitStartTable(SCTAB nTab);
void UpdateScrollBars();
- BOOL ScrollCommand( const CommandEvent& rCEvt );
+ sal_Bool ScrollCommand( const CommandEvent& rCEvt );
void Execute( SfxRequest& rReq );
void GetState( SfxItemSet& rSet );
@@ -111,22 +111,18 @@ public:
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >
GetSourceData() const { return aSourceData; }
- BYTE GetSourceDesignMode() const { return nSourceDesignMode; }
+ sal_uInt8 GetSourceDesignMode() const { return nSourceDesignMode; }
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- virtual USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual PrintDialog* CreatePrintDialog( Window* pParent );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = false );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
void BroadcastAccessibility( const SfxHint &rHint );
- BOOL HasAccessibilityObjects();
+ sal_Bool HasAccessibilityObjects();
const ScPreviewLocationData& GetLocationData();
ScDocument* GetDocument();
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 41d33d693607..84f486999315 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -63,14 +63,14 @@ class FmFormView;
// Einstellungen fuer Kopf-/Fusszeilen
struct ScPrintHFParam
{
- BOOL bEnable;
- BOOL bDynamic;
- BOOL bShared;
+ sal_Bool bEnable;
+ sal_Bool bDynamic;
+ sal_Bool bShared;
long nHeight; // insgesamt (Hoehe+Abstand+Rahmen)
long nManHeight; // eingestellte Groesse (Min. bei dynamisch)
- USHORT nDistance;
- USHORT nLeft; // Raender
- USHORT nRight;
+ sal_uInt16 nDistance;
+ sal_uInt16 nLeft; // Raender
+ sal_uInt16 nRight;
const ScPageHFItem* pLeft;
const ScPageHFItem* pRight;
const SvxBoxItem* pBorder;
@@ -90,7 +90,7 @@ public:
MapMode aUserMapMode;
Paper ePaper;
Orientation eOrientation;
- USHORT nPaperBin;
+ sal_uInt16 nPaperBin;
};
struct ScPrintState // Variablen aus ScPrintFunc retten
@@ -100,7 +100,7 @@ struct ScPrintState // Variablen aus ScPrintFunc retten
SCROW nStartRow;
SCCOL nEndCol;
SCROW nEndRow;
- USHORT nZoom;
+ sal_uInt16 nZoom;
size_t nPagesX;
size_t nPagesY;
long nTabPages;
@@ -115,7 +115,7 @@ private:
SCROW nStartRow;
SCROW nEndRow;
size_t nPagesX;
- BOOL* pHidden;
+ sal_Bool* pHidden;
//! Anzahl wirklich sichtbarer cachen???
public:
@@ -133,7 +133,7 @@ public:
void SetPagesX(size_t nNew);
void SetHidden(size_t nX);
- BOOL IsHidden(size_t nX) const;
+ sal_Bool IsHidden(size_t nX) const;
size_t CountVisible() const;
};
@@ -151,10 +151,10 @@ private:
Point aSrcOffset; // Papier-1/100 mm
Point aOffset; // mit Faktor aus Seitenformat skaliert
- USHORT nManualZoom; // Zoom in Preview (Prozent)
- BOOL bClearWin; // Ausgabe vorher loeschen
- BOOL bUseStyleColor;
- BOOL bIsRender;
+ sal_uInt16 nManualZoom; // Zoom in Preview (Prozent)
+ sal_Bool bClearWin; // Ausgabe vorher loeschen
+ sal_Bool bUseStyleColor;
+ sal_Bool bIsRender;
SCTAB nPrintTab;
long nPageStart; // Offset fuer erste Seite
@@ -163,19 +163,19 @@ private:
const ScRange* pUserArea; // Selektion, wenn im Dialog eingestellt
const SfxItemSet* pParamSet; // eingestellte Vorlage
- BOOL bState; // aus State-struct erzeugt
+ sal_Bool bState; // aus State-struct erzeugt
// Parameter aus Vorlage:
- USHORT nLeftMargin;
- USHORT nTopMargin;
- USHORT nRightMargin;
- USHORT nBottomMargin;
- BOOL bCenterHor;
- BOOL bCenterVer;
- BOOL bLandscape;
- BOOL bSourceRangeValid;
-
- USHORT nPageUsage;
+ sal_uInt16 nLeftMargin;
+ sal_uInt16 nTopMargin;
+ sal_uInt16 nRightMargin;
+ sal_uInt16 nBottomMargin;
+ sal_Bool bCenterHor;
+ sal_Bool bCenterVer;
+ sal_Bool bLandscape;
+ sal_Bool bSourceRangeValid;
+
+ sal_uInt16 nPageUsage;
Size aPageSize; // Drucker-Twips
const SvxBoxItem* pBorderItem;
const SvxBrushItem* pBackgroundItem;
@@ -188,9 +188,9 @@ private:
ScPageAreaParam aAreaParam;
// berechnete Werte:
- USHORT nZoom;
- BOOL bPrintCurrentTable;
- BOOL bMultiArea;
+ sal_uInt16 nZoom;
+ sal_Bool bPrintCurrentTable;
+ sal_Bool bMultiArea;
long nTabPages;
long nTotalPages;
@@ -257,27 +257,27 @@ public:
~ScPrintFunc();
static void DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double nPrintFactor,
- const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile );
+ const Rectangle& rBound, ScViewData* pViewData, sal_Bool bMetaFile );
void SetDrawView( FmFormView* pNew );
void SetOffset( const Point& rOfs );
- void SetManualZoom( USHORT nNewZoom );
+ void SetManualZoom( sal_uInt16 nNewZoom );
void SetDateTime( const Date& rDate, const Time& rTime );
- void SetClearFlag( BOOL bFlag );
- void SetUseStyleColor( BOOL bFlag );
- void SetRenderFlag( BOOL bFlag );
+ void SetClearFlag( sal_Bool bFlag );
+ void SetUseStyleColor( sal_Bool bFlag );
+ void SetRenderFlag( sal_Bool bFlag );
void SetExclusivelyDrawOleAndDrawObjects();//for printing selected objects without surrounding cell contents
- BOOL UpdatePages();
+ sal_Bool UpdatePages();
void ApplyPrintSettings(); // aus DoPrint() schon gerufen
long DoPrint( const MultiSelection& rPageRanges,
- /*long nStartPage, long nDisplayStart, BOOL bDoPrint,
+ /*long nStartPage, long nDisplayStart, sal_Bool bDoPrint,
SfxProgress* pProgress, ScPreviewLocationData* pLocationData );*/
- long nStartPage, long nDisplayStart, BOOL bDoPrint = TRUE,
+ long nStartPage, long nDisplayStart, sal_Bool bDoPrint = sal_True,
SfxProgress* pProgress = NULL, ScPreviewLocationData* pLocationData = NULL);
// Werte abfragen - sofort
@@ -292,32 +292,32 @@ public:
double GetScaleX() const { return nScaleX; }
double GetScaleY() const { return nScaleY; }
long GetTotalPages() const { return nTotalPages; }
- USHORT GetZoom() const { return nZoom; }
+ sal_uInt16 GetZoom() const { return nZoom; }
void ResetBreaks( SCTAB nTab );
void GetPrintState( ScPrintState& rState );
- BOOL GetLastSourceRange( ScRange& rRange ) const;
- USHORT GetLeftMargin() const{return nLeftMargin;}
- USHORT GetRightMargin() const{return nRightMargin;}
- USHORT GetTopMargin() const{return nTopMargin;}
- USHORT GetBottomMargin() const{return nBottomMargin;}
- void SetLeftMargin(USHORT nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; }
- void SetRightMargin(USHORT nRulerRightDistance){ nRightMargin = nRulerRightDistance; }
- void SetTopMargin(USHORT nRulerTopDistance){ nTopMargin = nRulerTopDistance; }
- void SetBottomMargin(USHORT nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; }
+ sal_Bool GetLastSourceRange( ScRange& rRange ) const;
+ sal_uInt16 GetLeftMargin() const{return nLeftMargin;}
+ sal_uInt16 GetRightMargin() const{return nRightMargin;}
+ sal_uInt16 GetTopMargin() const{return nTopMargin;}
+ sal_uInt16 GetBottomMargin() const{return nBottomMargin;}
+ void SetLeftMargin(sal_uInt16 nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; }
+ void SetRightMargin(sal_uInt16 nRulerRightDistance){ nRightMargin = nRulerRightDistance; }
+ void SetTopMargin(sal_uInt16 nRulerTopDistance){ nTopMargin = nRulerTopDistance; }
+ void SetBottomMargin(sal_uInt16 nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; }
ScPrintHFParam GetHeader(){return aHdr;}
ScPrintHFParam GetFooter(){return aFtr;}
private:
void Construct( const ScPrintOptions* pOptions );
void InitParam( const ScPrintOptions* pOptions );
- void CalcZoom( USHORT nRangeNo );
+ void CalcZoom( sal_uInt16 nRangeNo );
void CalcPages();
long CountPages();
long CountNotePages();
- BOOL AdjustPrintArea( BOOL bNew );
+ sal_Bool AdjustPrintArea( sal_Bool bNew );
Size GetDocPageSize();
@@ -327,31 +327,31 @@ private:
void InitModes();
- BOOL IsLeft( long nPageNo );
- BOOL IsMirror( long nPageNo );
+ sal_Bool IsLeft( long nPageNo );
+ sal_Bool IsMirror( long nPageNo );
void ReplaceFields( long nPageNo ); // aendert Text in pEditEngine
void MakeTableString(); // setzt aTableStr
void PrintPage( long nPageNo,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
void PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
long nScrX, long nScrY,
- BOOL bShLeft, BOOL bShTop, BOOL bShRight, BOOL bShBottom );
+ sal_Bool bShLeft, sal_Bool bShTop, sal_Bool bShRight, sal_Bool bShBottom );
void LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- long nScrX, long nScrY, BOOL bRepCol, BOOL bRepRow,
+ long nScrX, long nScrY, sal_Bool bRepCol, sal_Bool bRepRow,
ScPreviewLocationData& rLocationData );
void PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY );
void PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY );
void LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
- BOOL bRepCol, ScPreviewLocationData& rLocationData );
+ sal_Bool bRepCol, ScPreviewLocationData& rLocationData );
void LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
- BOOL bRepRow, ScPreviewLocationData& rLocationData );
- void PrintHF( long nPageNo, BOOL bHeader, long nStartY,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ sal_Bool bRepRow, ScPreviewLocationData& rLocationData );
+ void PrintHF( long nPageNo, sal_Bool bHeader, long nStartY,
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
- long PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData );
- long DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ long PrintNotes( long nPageNo, long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
+ long DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData );
void DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
const SvxBoxItem* pBorderData,
diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx
index f7c9f325c06b..ff3af449551e 100644
--- a/sc/source/ui/inc/privsplt.hxx
+++ b/sc/source/ui/inc/privsplt.hxx
@@ -38,7 +38,7 @@ class ScPrivatSplit : public Control
private:
Link aCtrModifiedLink;
- BOOL aMovingFlag;
+ sal_Bool aMovingFlag;
Pointer aWinPointer;
SC_SPLIT_DIRECTION eScSplit;
short nOldX;
@@ -53,7 +53,7 @@ class ScPrivatSplit : public Control
short nDeltaY;
using Control::ImplInitSettings;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
index d2402bc02e32..b41293779b75 100644
--- a/sc/source/ui/inc/pvfundlg.hxx
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -58,8 +58,8 @@ class ScDPFunctionListBox : public MultiListBox
public:
explicit ScDPFunctionListBox( Window* pParent, const ResId& rResId );
- void SetSelection( USHORT nFuncMask );
- USHORT GetSelection() const;
+ void SetSelection( sal_uInt16 nFuncMask );
+ sal_uInt16 GetSelection() const;
private:
void FillFunctionNames();
@@ -71,20 +71,20 @@ class ScDPFunctionDlg : public ModalDialog
{
typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > NameMapType;
public:
- explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVec& rLabelVec,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+ explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVector& rLabelVec,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
- USHORT GetFuncMask() const;
+ sal_uInt16 GetFuncMask() const;
::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const;
private:
- void Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+ void Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
const ::rtl::OUString& GetBaseFieldName(const ::rtl::OUString& rLayoutName) const;
const ::rtl::OUString& GetBaseItemName(const ::rtl::OUString& rLayoutName) const;
/** Searches for a listbox entry, starts search at specified position. */
- sal_uInt16 FindBaseItemPos( const String& rEntry, USHORT nStartPos ) const;
+ sal_uInt16 FindBaseItemPos( const String& rEntry, sal_uInt16 nStartPos ) const;
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( DblClickHdl, MultiListBox* );
@@ -111,7 +111,7 @@ private:
ScDPListBoxWrapper maLbTypeWrp; /// Wrapper for direct usage of API constants.
- const ScDPLabelDataVec& mrLabelVec; /// Data of all labels.
+ const ScDPLabelDataVector& mrLabelVec; /// Data of all labels.
bool mbEmptyItem; /// true = Empty base item in listbox.
};
@@ -121,15 +121,15 @@ class ScDPSubtotalDlg : public ModalDialog
{
public:
explicit ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
- const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData,
+ const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields, bool bEnableLayout );
- USHORT GetFuncMask() const;
+ sal_uInt16 GetFuncMask() const;
void FillLabelData( ScDPLabelData& rLabelData ) const;
private:
- void Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+ void Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
DECL_LINK( DblClickHdl, MultiListBox* );
DECL_LINK( RadioClickHdl, RadioButton* );
@@ -174,7 +174,7 @@ private:
const ::rtl::OUString& GetFieldName(const ::rtl::OUString& rLayoutName) const;
/** Searches for a listbox entry, starts search at specified position. */
- sal_uInt16 FindListBoxEntry( const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) const;
+ sal_uInt16 FindListBoxEntry( const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) const;
DECL_LINK( RadioClickHdl, RadioButton* );
DECL_LINK( CheckHdl, CheckBox* );
@@ -221,7 +221,7 @@ private:
class ScDPShowDetailDlg : public ModalDialog
{
public:
- explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient );
+ explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient );
virtual short Execute();
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index 7b4dad83ee08..1b04a1445800 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -29,9 +29,8 @@
#ifndef SC_PVLAYDLG_HXX
#define SC_PVLAYDLG_HXX
-#include <vector>
#include <memory>
-#include <boost/shared_ptr.hpp>
+#include <vector>
#include <vcl/lstbox.hxx>
#include <vcl/scrbar.hxx>
@@ -40,35 +39,12 @@
#include "pivot.hxx"
#include "anyrefdg.hxx"
#include "fieldwnd.hxx"
-#include "formula/funcutl.hxx"
-
-/*==========================================================================*\
-
- Eine Instanz der Klasse ScPivotLayoutDlg ist ein (semi-)modaler
- Dialog, in dem mit der Maus Felder mit Spaltenueberschriften den
- drei Pivot-Kategorien "Spalte", "Zeile" und "Daten" zugeordnet
- werden koennen.
- Der Dialog erhaelt in der Struktur LabelData Informationen ueber
- diese Ueberschriften (Name, Art (Zahl/String) und Funktionsmaske).
- Weiterhin werden drei PivotFeld-Arrays uebergeben, mit denen die
- drei Kategorie-Fenster initialisiert werden. Ein Kategorie-Fenster
- wird durch eine Instanz der Klasse FieldWindow dargestellt. Ein
- solches Fenster ist fuer die Darstellung der Datenstrukturen am
- Schirm zustaendig. Es meldet Mausaktionen an den Dialog weiter und
- bietet entsprechende Methoden zur Veraenderung der Darstellung.
- Der Dialog sorgt fuer den Abgleich der interenen Datenstrukturen mit
- der Bildschirmdarstellung. Ein weiteres FieldWindow (Select) bietet
- alle Tabellenueberschriften zur Auswahl an, ist also "read-only".
-
-\*==========================================================================*/
-
-//============================================================================
+// ============================================================================
class ScViewData;
class ScDocument;
class ScRangeData;
-struct ScDPFuncData;
class ScDPObject;
//============================================================================
@@ -91,21 +67,25 @@ public:
virtual ~ScDPLayoutDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const { return bRefInputMode; }
+ virtual sal_Bool IsRefInputMode() const { return bRefInputMode; }
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void StateChanged( StateChangedType nStateChange );
void NotifyDoubleClick ( ScDPFieldType eType, size_t nFieldIndex );
PointerStyle NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex );
void NotifyMouseButtonUp ( const Point& rAt );
PointerStyle NotifyMouseMove ( const Point& rAt );
- void NotifyFieldFocus ( ScDPFieldType eType, BOOL bGotFocus );
+ void NotifyFieldFocus ( ScDPFieldType eType, sal_Bool bGotFocus );
void NotifyMoveFieldToEnd ( ScDPFieldType eToType );
void NotifyRemoveField ( ScDPFieldType eType, size_t nFieldIndex );
protected:
- virtual void Deactivate();
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual sal_Bool IsRefInputMode() const;
+ virtual void SetActive();
+ virtual sal_Bool Close();
private:
typedef boost::shared_ptr< ScDPFuncData > ScDPFuncDataRef;
@@ -157,7 +137,7 @@ private:
ScDPFieldType eDnDFromType;
size_t nDnDFromIndex;
- BOOL bIsDrag;
+ sal_Bool bIsDrag;
::formula::RefEdit* pEditActive;
@@ -198,8 +178,8 @@ private:
ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL );
String GetLabelString ( SCsCOL nCol );
bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType );
- String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE );
- BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
+ String GetFuncString ( sal_uInt16& rFuncMask, sal_Bool bIsValue = true );
+ sal_Bool Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
void Remove ( ScDPFuncDataVec* pArr, size_t nAt );
void Insert ( ScDPFuncDataVec* pArr, const ScDPFuncData& rFData, size_t nAt );
diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx
index f24478b96c35..c02a06b9ffec 100644
--- a/sc/source/ui/inc/redcom.hxx
+++ b/sc/source/ui/inc/redcom.hxx
@@ -57,7 +57,7 @@ protected:
public:
ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
- ScDocShell *,ScChangeAction *,BOOL bPrevNext = FALSE);
+ ScDocShell *,ScChangeAction *,sal_Bool bPrevNext = false);
~ScRedComDialog();
short Execute();
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index f170fa7dc0e4..fc30485dbe92 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -37,7 +37,7 @@
class Class : public SfxChildWindow \
{ \
public: \
- Class( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); \
+ Class( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); \
SFX_DECL_CHILDWINDOW(Class); \
};
@@ -69,7 +69,7 @@ class ScAcceptChgDlgWrapper: public SfxChildWindow
{
public:
ScAcceptChgDlgWrapper( Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo* );
@@ -82,20 +82,20 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow
{
public:
ScSimpleRefDlgWrapper( Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(Class);
- static void SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet=TRUE);
+ static void SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet=sal_True);
virtual String GetRefString();
virtual void SetRefString(const String& rStr);
void SetCloseHdl( const Link& rLink );
void SetUnoLinks( const Link& rDone, const Link& rAbort,
const Link& rChange );
- void SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
- static void SetAutoReOpen(BOOL bFlag);
+ void SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection );
+ static void SetAutoReOpen(sal_Bool bFlag);
void StartRefInput();
};
@@ -106,13 +106,13 @@ class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow
bool m_bFreeWindowLock:1;
Window * m_pSavedWndParent;
public:
- ScValidityRefChildWin( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ ScValidityRefChildWin( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(ScValidityRefChildWin);
~ScValidityRefChildWin();
bool LockVisible( bool bLock ){ bool bVis = m_bVisibleLock; m_bVisibleLock = bLock; return bVis; }
bool LockFreeWindow( bool bLock ){ bool bFreeWindow = m_bFreeWindowLock; m_bFreeWindowLock = bLock; return bFreeWindow; }
void Hide(){ if( !m_bVisibleLock) SfxChildWindow::Hide(); }
- void Show( USHORT nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); }
+ void Show( sal_uInt16 nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); }
};
//==================================================================
diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx
index 8abbd5155342..25de386d023e 100644
--- a/sc/source/ui/inc/refundo.hxx
+++ b/sc/source/ui/inc/refundo.hxx
@@ -61,7 +61,7 @@ public:
~ScRefUndoData();
void DeleteUnchanged( const ScDocument* pDoc );
- void DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst );
+ void DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst );
};
diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx
index 7e6f08adc4f3..fed5f21e2b0e 100644
--- a/sc/source/ui/inc/rfindlst.hxx
+++ b/sc/source/ui/inc/rfindlst.hxx
@@ -38,11 +38,11 @@
struct ScRangeFindData
{
ScRange aRef;
- USHORT nFlags;
+ sal_uInt16 nFlags;
xub_StrLen nSelStart;
xub_StrLen nSelEnd;
- ScRangeFindData( const ScRange& rR, USHORT nF, xub_StrLen nS, xub_StrLen nE ) :
+ ScRangeFindData( const ScRange& rR, sal_uInt16 nF, xub_StrLen nS, xub_StrLen nE ) :
aRef(rR), nFlags(nF), nSelStart(nS), nSelEnd(nE) {}
};
@@ -56,12 +56,12 @@ public:
ScRangeFindList(const String& rName);
~ScRangeFindList();
- ULONG Count() const { return aEntries.Count(); }
+ sal_uLong Count() const { return aEntries.Count(); }
void Insert( ScRangeFindData* pNew ) { aEntries.Insert(pNew, LIST_APPEND); }
- ScRangeFindData* GetObject( ULONG nIndex ) const
+ ScRangeFindData* GetObject( sal_uLong nIndex ) const
{ return (ScRangeFindData*)aEntries.GetObject(nIndex); }
- void SetHidden( BOOL bSet ) { bHidden = bSet; }
+ void SetHidden( sal_Bool bSet ) { bHidden = bSet; }
const String& GetDocName() const { return aDocName; }
bool IsHidden() const { return bHidden; }
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
index fac5b33220e7..e9acea5c11aa 100644
--- a/sc/source/ui/inc/scendlg.hxx
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -33,7 +33,7 @@
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svtools/svmedit.hxx>
#include <svtools/ctrlbox.hxx>
@@ -42,14 +42,14 @@
class ScNewScenarioDlg : public ModalDialog
{
public:
- ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE );
+ ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit = false, sal_Bool bSheetProtected = false );
~ScNewScenarioDlg();
void SetScenarioData( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
+ const Color& rColor, sal_uInt16 nFlags );
void GetScenarioData( String& rName, String& rComment,
- Color& rColor, USHORT& rFlags ) const;
+ Color& rColor, sal_uInt16& rFlags ) const;
private:
FixedLine aFlName;
@@ -69,7 +69,7 @@ private:
CancelButton aBtnCancel;
HelpButton aBtnHelp;
const String aDefScenarioName;
- BOOL bIsEdit;
+ sal_Bool bIsEdit;
DECL_LINK( OkHdl, OKButton * );
DECL_LINK( EnableHdl, CheckBox * );
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index 5e512e3f8763..133d310c664e 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -40,9 +40,9 @@
class ScImportAsciiDlg : public ModalDialog
{
SvStream* mpDatStream;
- ULONG mnStreamPos;
- ULONG* mpRowPosArray;
- ULONG mnRowPosCount;
+ sal_uLong mnStreamPos;
+ sal_uLong* mpRowPosArray;
+ sal_uLong mnRowPosCount;
String maPreviewLine[ CSV_PREVIEW_LINES ];
@@ -117,9 +117,9 @@ private:
void SetupSeparatorCtrls();
- bool GetLine( ULONG nLine, String &rText );
+ bool GetLine( sal_uLong nLine, String &rText );
void UpdateVertical();
- inline bool Seek( ULONG nPos ); // synced to and from mnStreamPos
+ inline bool Seek( sal_uLong nPos ); // synced to and from mnStreamPos
DECL_LINK( CharSetHdl, SvxTextEncodingBox* );
DECL_LINK( FirstRowHdl, NumericField* );
@@ -131,7 +131,7 @@ private:
};
-inline bool ScImportAsciiDlg::Seek(ULONG nPos)
+inline bool ScImportAsciiDlg::Seek(sal_uLong nPos)
{
bool bSuccess = true;
if (nPos != mnStreamPos && mpDatStream)
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index 69c5f5cb6bd8..00113dca3806 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -38,7 +38,7 @@ public:
ScDocument* pDoc );
~ScAutoFormatDlg();
- USHORT GetIndex() const { return nIndex; }
+ sal_uInt16 GetIndex() const { return nIndex; }
String GetCurrFormatName();
private:
@@ -69,9 +69,9 @@ private:
//------------------------
ScAutoFormat* pFormat;
const ScAutoFormatData* pSelFmtData;
- USHORT nIndex;
- BOOL bCoreDataChanged;
- BOOL bFmtInserted;
+ sal_uInt16 nIndex;
+ sal_Bool bCoreDataChanged;
+ sal_Bool bFmtInserted;
void Init ();
void UpdateChecks ();
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
index 605dec3cd7f6..9a0de3c23f4c 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -40,12 +40,12 @@ class ScImportOptionsDlg : public ModalDialog
{
public:
ScImportOptionsDlg( Window* pParent,
- BOOL bAscii = TRUE,
+ sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const String* pStrTitle = NULL,
- BOOL bMultiByte = FALSE,
- BOOL bOnlyDbtoolsEncodings = FALSE,
- BOOL bImport = TRUE );
+ sal_Bool bMultiByte = false,
+ sal_Bool bOnlyDbtoolsEncodings = false,
+ sal_Bool bImport = sal_True );
~ScImportOptionsDlg();
@@ -59,17 +59,18 @@ private:
ComboBox aEdFieldSep;
FixedText aFtTextSep;
ComboBox aEdTextSep;
+ CheckBox aCbQuoteAll;
+ CheckBox aCbShown;
CheckBox aCbFixed;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- CheckBox aCbShown;
ScDelimiterTable* pFieldSepTab;
ScDelimiterTable* pTextSepTab;
private:
- USHORT GetCodeFromCombo( const ComboBox& rEd ) const;
+ sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const;
DECL_LINK( FixedWidthHdl, CheckBox* );
DECL_LINK( DoubleClickHdl, ListBox* );
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index 6c0d3768d7c3..b8c3e20b8136 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -60,7 +60,7 @@ class ScAccessibleEditObject;
class ScHFEditPage : public SfxTabPage
{
public:
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
void SetNumType(SvxNumType eNumType);
@@ -68,9 +68,9 @@ public:
protected:
ScHFEditPage( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const SfxItemSet& rCoreSet,
- USHORT nWhich, bool bHeader );
+ sal_uInt16 nWhich, bool bHeader );
virtual ~ScHFEditPage();
private:
@@ -94,7 +94,7 @@ private:
FixedInfo aFtInfo;
ScPopupMenu aPopUpFile;
- USHORT nWhich;
+ sal_uInt16 nWhich;
String aCmdArr[6];
private:
@@ -120,7 +120,7 @@ class ScRightHeaderEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
@@ -132,7 +132,7 @@ class ScLeftHeaderEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
@@ -144,7 +144,7 @@ class ScRightFooterEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
@@ -156,7 +156,7 @@ class ScLeftFooterEditPage : public ScHFEditPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index c822ab267b1f..0c8ea64c4e0c 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -58,13 +58,13 @@ private:
ScViewData* pViewData;
ScViewSelectionEngine* pEngine;
- BOOL bAnchor;
- BOOL bStarted;
+ sal_Bool bAnchor;
+ sal_Bool bStarted;
ScAddress aAnchorPos;
ScSplitPos GetWhich();
- ULONG CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
+ sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll );
public:
@@ -73,17 +73,17 @@ public:
void SetSelectionEngine( ScViewSelectionEngine* pSelEngine );
void SetAnchor( SCCOL nPosX, SCROW nPosY );
- void SetAnchorFlag( BOOL bSet );
+ void SetAnchorFlag( sal_Bool bSet );
virtual void BeginDrag();
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
- BOOL SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll );
+ sal_Bool SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll );
};
@@ -94,27 +94,27 @@ class ScHeaderFunctionSet : public FunctionSet // Spalten- / Zeilenkoep
{
private:
ScViewData* pViewData;
- BOOL bColumn; // Col- / Rowbar
+ sal_Bool bColumn; // Col- / Rowbar
ScSplitPos eWhich;
- BOOL bAnchor;
+ sal_Bool bAnchor;
SCCOLROW nCursorPos;
public:
ScHeaderFunctionSet( ScViewData* pNewViewData );
- void SetColumn( BOOL bSet );
+ void SetColumn( sal_Bool bSet );
void SetWhich( ScSplitPos eNew );
virtual void BeginDrag();
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
- void SetAnchorFlag(BOOL bSet) { bAnchor = bSet; }
+ void SetAnchorFlag(sal_Bool bSet) { bAnchor = bSet; }
};
diff --git a/sc/source/ui/inc/seltrans.hxx b/sc/source/ui/inc/seltrans.hxx
index 4fda9372a05e..9b0f39a39873 100644
--- a/sc/source/ui/inc/seltrans.hxx
+++ b/sc/source/ui/inc/seltrans.hxx
@@ -67,7 +67,7 @@ public:
virtual ~ScSelectionTransferObj();
void ForgetView();
- BOOL StillValid();
+ sal_Bool StillValid();
ScTabView* GetView() const { return pView; }
ScTransferObj* GetCellData();
diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx
index 975781f05169..b0bb345de3e9 100644
--- a/sc/source/ui/inc/servobj.hxx
+++ b/sc/source/ui/inc/servobj.hxx
@@ -55,7 +55,7 @@ private:
ScDocShell* pDocSh;
ScRange aRange;
String aItemStr;
- BOOL bRefreshListener;
+ sal_Bool bRefreshListener;
void Clear();
@@ -63,9 +63,9 @@ public:
ScServerObject( ScDocShell* pShell, const String& rItem );
virtual ~ScServerObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = false );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
void EndListeningAll();
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
index b4e2c1037509..90dd3e217031 100644
--- a/sc/source/ui/inc/shtabdlg.hxx
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -39,11 +39,11 @@
class ScShowTabDlg : public ModalDialog
{
private:
+ FixedText aFtLbTitle;
::svtools::ToolTipMultiListBox aLb;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
- FixedText aFtLbTitle;
DECL_LINK( DblClkHdl, void * );
@@ -54,14 +54,14 @@ public:
/** Sets dialog title, fixed text for listbox and help IDs. */
void SetDescription(
const String& rTitle, const String& rFixedText,
- ULONG nDlgHelpId, ULONG nLbHelpId );
+ const ::rtl::OString& nDlgHelpId, const rtl::OString& nLbHelpId );
/** Inserts a string into the ListBox. */
- void Insert( const String& rString, BOOL bSelected );
+ void Insert( const String& rString, sal_Bool bSelected );
- USHORT GetSelectEntryCount() const;
- String GetSelectEntry(USHORT nPos) const;
- USHORT GetSelectEntryPos(USHORT nPos) const;
+ sal_uInt16 GetSelectEntryCount() const;
+ String GetSelectEntry(sal_uInt16 nPos) const;
+ sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const;
};
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index eadc59d90470..4dcf023b2780 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -64,14 +64,14 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- BOOL bRefInputMode;
+ sal_Bool bRefInputMode;
ScRange theCurArea;
- BOOL bCloseFlag;
- BOOL bAutoReOpen;
- BOOL bCloseOnButtonUp;
- BOOL bSingleCell;
- BOOL bMultiSelection;
+ sal_Bool bCloseFlag;
+ sal_Bool bAutoReOpen;
+ sal_Bool bCloseOnButtonUp;
+ sal_Bool bSingleCell;
+ sal_Bool bMultiSelection;
void Init();
@@ -81,7 +81,7 @@ private:
protected:
- virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual void RefInputDone( sal_Bool bForced = false );
public:
ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
@@ -90,9 +90,9 @@ public:
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
void StartRefInput();
@@ -104,9 +104,9 @@ public:
void SetUnoLinks( const Link& rDone, const Link& rAbort,
const Link& rChange );
- void SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection );
+ void SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection );
- void SetAutoReOpen(BOOL bFlag) {bAutoReOpen=bFlag;}
+ void SetAutoReOpen(sal_Bool bFlag) {bAutoReOpen=bFlag;}
};
diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx
index eb7a251fdd86..d3cd5362b2b7 100644
--- a/sc/source/ui/inc/sizedev.hxx
+++ b/sc/source/ui/inc/sizedev.hxx
@@ -37,7 +37,7 @@ class ScDocShell;
class ScSizeDeviceProvider
{
OutputDevice* pDevice;
- BOOL bOwner;
+ sal_Bool bOwner;
double nPPTX;
double nPPTY;
MapMode aOldMapMode;
@@ -49,7 +49,7 @@ public:
OutputDevice* GetDevice() const { return pDevice; }
double GetPPTX() const { return nPPTX; }
double GetPPTY() const { return nPPTY; }
- BOOL IsPrinter() const { return !bOwner; }
+ sal_Bool IsPrinter() const { return !bOwner; }
};
#endif
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index a7f4cf8cec0d..86eb96f15b70 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -59,9 +59,9 @@ public:
~ScSolverDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const;
+ virtual sal_Bool IsRefInputMode() const;
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlVariables;
@@ -87,7 +87,7 @@ private:
ScDocument* pDoc;
const SCTAB nCurTab;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
const String errMsgInvalidVar;
const String errMsgInvalidForm;
const String errMsgNoFormula;
@@ -96,7 +96,7 @@ private:
#ifdef _SOLVRDLG_CXX
void Init();
- BOOL CheckTargetValue( String& rStrVal );
+ sal_Bool CheckTargetValue( String& rStrVal );
void RaiseError( ScSolverErr eError );
DECL_LINK( BtnHdl, PushButton* );
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
index 7812b2a24499..1d6e01d02b25 100644
--- a/sc/source/ui/inc/sortdlg.hxx
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -51,21 +51,21 @@ public:
const SfxItemSet* pArgSet );
~ScSortDlg();
- void SetHeaders( BOOL bHeaders );
- void SetByRows ( BOOL bByRows );
- BOOL GetHeaders() const;
- BOOL GetByRows () const;
+ void SetHeaders( sal_Bool bHeaders );
+ void SetByRows ( sal_Bool bByRows );
+ sal_Bool GetHeaders() const;
+ sal_Bool GetByRows () const;
private:
- BOOL bIsHeaders;
- BOOL bIsByRows;
+ sal_Bool bIsHeaders;
+ sal_Bool bIsByRows;
};
-inline void ScSortDlg::SetHeaders( BOOL bHeaders ) { bIsHeaders = bHeaders; }
-inline void ScSortDlg::SetByRows ( BOOL bByRows ) { bIsByRows = bByRows; }
-inline BOOL ScSortDlg::GetHeaders() const { return bIsHeaders; }
-inline BOOL ScSortDlg::GetByRows () const { return bIsByRows; }
+inline void ScSortDlg::SetHeaders( sal_Bool bHeaders ) { bIsHeaders = bHeaders; }
+inline void ScSortDlg::SetByRows ( sal_Bool bByRows ) { bIsByRows = bByRows; }
+inline sal_Bool ScSortDlg::GetHeaders() const { return bIsHeaders; }
+inline sal_Bool ScSortDlg::GetByRows () const { return bIsByRows; }
class ScSortWarningDlg : public ModalDialog
{
diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx
index d525c62597f1..3639007655a9 100644
--- a/sc/source/ui/inc/spelldialog.hxx
+++ b/sc/source/ui/inc/spelldialog.hxx
@@ -52,7 +52,7 @@ class ScSpellDialogChildWindow : public ::svx::SpellDialogChildWindow
public:
SFX_DECL_CHILDWINDOW( ScSpellDialogChildWindow );
- explicit ScSpellDialogChildWindow( Window* pParent, USHORT nId,
+ explicit ScSpellDialogChildWindow( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
virtual ~ScSpellDialogChildWindow();
diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx
index e351c8ff2212..aae57483b8b6 100644
--- a/sc/source/ui/inc/spelleng.hxx
+++ b/sc/source/ui/inc/spelleng.hxx
@@ -121,7 +121,7 @@ public:
protected:
/** Callback from edit engine to check the next cell. */
- virtual BOOL SpellNextDocument();
+ virtual sal_Bool SpellNextDocument();
/** Returns true, if the current text contains a spelling error. */
virtual bool NeedsConversion();
@@ -155,7 +155,7 @@ public:
protected:
/** Callback from edit engine to convert the next cell. */
- virtual BOOL ConvertNextDocument();
+ virtual sal_Bool ConvertNextDocument();
/** Returns true, if the current text contains text to convert. */
virtual bool NeedsConversion();
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
index af022443a80a..16630a099a41 100644
--- a/sc/source/ui/inc/strindlg.hxx
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -32,7 +32,7 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include <layout/layout.hxx>
@@ -47,7 +47,7 @@ public:
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId );
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId );
~ScStringInputDlg();
void GetInputString( String& rString ) const;
diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx
index 6114da813f03..73fab86b8088 100644
--- a/sc/source/ui/inc/styledlg.hxx
+++ b/sc/source/ui/inc/styledlg.hxx
@@ -40,15 +40,15 @@ class ScStyleDlg : public SfxStyleDialog
public:
ScStyleDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId );
+ sal_uInt16 nRscId );
~ScStyleDlg();
protected:
- virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
virtual const SfxItemSet* GetRefreshedSet();
private:
- USHORT nDlgRsc;
+ sal_uInt16 nDlgRsc;
};
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
index 56cf5691f57b..7c1870aa6cad 100644
--- a/sc/source/ui/inc/tabbgcolordlg.hxx
+++ b/sc/source/ui/inc/tabbgcolordlg.hxx
@@ -30,7 +30,8 @@
#define SC_TABBGCOLORDLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
#include <svtools/valueset.hxx>
//------------------------------------------------------------------------
@@ -42,7 +43,7 @@ public:
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId );
+ const rtl::OString& nHelpId );
~ScTabBgColorDlg();
void GetSelectedColor( Color& rColor ) const;
@@ -65,7 +66,7 @@ private:
HelpButton aBtnHelp;
Color aTabBgColor;
const String aTabBgColorNoColorText;
- ULONG mnHelpId;
+ rtl::OString msHelpId;
void FillColorValueSets_Impl();
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
index c9892ecbceec..6e922fa00a29 100644
--- a/sc/source/ui/inc/tabcont.hxx
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -46,13 +46,13 @@ class ScTabControl : public TabBar, public DropTargetHelper, public DragSourceHe
{
private:
ScViewData* pViewData;
- USHORT nMouseClickPageId; /// Last page ID after mouse button down/up
- USHORT nSelPageIdByMouse; /// Selected page ID, if selected with mouse
- BOOL bErrorShown;
+ sal_uInt16 nMouseClickPageId; /// Last page ID after mouse button down/up
+ sal_uInt16 nSelPageIdByMouse; /// Selected page ID, if selected with mouse
+ sal_Bool bErrorShown;
void DoDrag( const Region& rRegion );
- USHORT GetMaxId() const;
+ sal_uInt16 GetMaxId() const;
SCTAB GetPrivatDropPos(const Point& rPos );
protected:
@@ -79,9 +79,9 @@ public:
void UpdateInputContext();
void UpdateStatus();
- void ActivateView(BOOL bActivate);
+ void ActivateView(sal_Bool bActivate);
- void SetSheetLayoutRTL( BOOL bSheetRTL );
+ void SetSheetLayoutRTL( sal_Bool bSheetRTL );
};
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index c0f06f060184..4f43614adde8 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -60,10 +60,10 @@ public:
~ScTabOpDlg();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
- virtual BOOL IsRefInputMode() const { return TRUE; }
+ virtual sal_Bool IsRefInputMode() const { return sal_True; }
virtual void SetActive();
- virtual BOOL Close();
+ virtual sal_Bool Close();
private:
FixedLine aFlVariables;
@@ -91,7 +91,7 @@ private:
ScDocument* pDoc;
const SCTAB nCurTab;
formula::RefEdit* pEdActive;
- BOOL bDlgLostFocus;
+ sal_Bool bDlgLostFocus;
const String errMsgNoFormula;
const String errMsgNoColRow;
const String errMsgWrongFormula;
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 22ddc43e52c2..cec2618541ac 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -40,8 +40,8 @@ class ScTabPageProtection : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rAttrSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreAttrs );
virtual void Reset ( const SfxItemSet& );
protected:
@@ -65,12 +65,12 @@ private:
FixedInfo aTxtHint2;
// aktueller Status:
- BOOL bTriEnabled; // wenn vorher Dont-Care
- BOOL bDontCare; // alles auf TriState
- BOOL bProtect; // einzelne Einstellungen ueber TriState sichern
- BOOL bHideForm;
- BOOL bHideCell;
- BOOL bHidePrint;
+ sal_Bool bTriEnabled; // wenn vorher Dont-Care
+ sal_Bool bDontCare; // alles auf TriState
+ sal_Bool bProtect; // einzelne Einstellungen ueber TriState sichern
+ sal_Bool bHideForm;
+ sal_Bool bHideCell;
+ sal_Bool bHidePrint;
// Handler:
DECL_LINK( ButtonClickHdl, TriStateBox* pBox );
diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
index 9a369a0dd36f..23ba73b6b307 100644
--- a/sc/source/ui/inc/tabsplit.hxx
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -38,7 +38,7 @@ class ScTabSplitter : public Splitter
{
private:
ScViewData* pViewData;
- BOOL bFixed;
+ sal_Bool bFixed;
protected:
virtual void MouseMove( const MouseEvent& rMEvt );
@@ -52,7 +52,7 @@ public:
ScViewData* pData );
~ScTabSplitter();
- void SetFixed(BOOL bSet);
+ void SetFixed(sal_Bool bSet);
};
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index f331d93b61fd..7ca610e85453 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -71,14 +71,14 @@ class ScCornerButton : public Window
{
private:
ScViewData* pViewData;
- BOOL bAdd;
+ sal_Bool bAdd;
protected:
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
virtual void MouseButtonDown( const MouseEvent& rMEvt );
public:
- ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional );
+ ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional );
~ScCornerButton();
virtual void StateChanged( StateChangedType nType );
@@ -107,7 +107,7 @@ private:
Size aFrameSize; // wie bei DoResize uebergeben
Point aBorderPos;
- BOOL bDrawSelMode; // nur Zeichenobjekte selektieren ?
+ sal_Bool bDrawSelMode; // nur Zeichenobjekte selektieren ?
FuPoor* pDrawActual;
FuPoor* pDrawOld;
@@ -135,21 +135,21 @@ private:
ScDocument* pBrushDocument; // cell formats for format paint brush
SfxItemSet* pDrawBrushSet; // drawing object attributes for paint brush
- BOOL bLockPaintBrush; // keep for more than one use?
+ sal_Bool bLockPaintBrush; // keep for more than one use?
Timer aScrollTimer;
ScGridWindow* pTimerWindow;
MouseEvent aTimerMEvt;
- ULONG nTipVisible;
+ sal_uLong nTipVisible;
- BOOL bDragging; // fuer Scrollbars
+ sal_Bool bDragging; // fuer Scrollbars
long nPrevDragPos;
- BOOL bIsBlockMode; // Block markieren
- BOOL bBlockNeg; // wird Markierung aufgehoben?
- BOOL bBlockCols; // werden ganze Spalten markiert?
- BOOL bBlockRows; // werden ganze Zeilen markiert?
+ sal_Bool bIsBlockMode; // Block markieren
+ sal_Bool bBlockNeg; // wird Markierung aufgehoben?
+ sal_Bool bBlockCols; // werden ganze Spalten markiert?
+ sal_Bool bBlockRows; // werden ganze Zeilen markiert?
SCCOL nBlockStartX;
SCCOL nBlockStartXOrig;
@@ -167,11 +167,11 @@ private:
double mfPendingTabBarWidth; // Tab bar width relative to frame window width.
- BOOL bMinimized;
- BOOL bInUpdateHeader;
- BOOL bInActivatePart;
- BOOL bInZoomUpdate;
- BOOL bMoveIsShift;
+ sal_Bool bMinimized;
+ sal_Bool bInUpdateHeader;
+ sal_Bool bInActivatePart;
+ sal_Bool bInZoomUpdate;
+ sal_Bool bMoveIsShift;
void Init();
@@ -189,8 +189,8 @@ private:
void UpdateVarZoom();
- static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL );
- static long GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL );
+ static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL );
+ static long GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL );
void GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY);
void GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
@@ -212,11 +212,11 @@ protected:
void GetBorderSize( SvBorder& rBorder, const Size& rSize );
void ResetDrawDragMode();
- BOOL IsDrawTextEdit() const;
- void DrawEnableAnim(BOOL bSet);
- //HMHvoid DrawShowMarkHdl(BOOL bShow);
+ sal_Bool IsDrawTextEdit() const;
+ void DrawEnableAnim(sal_Bool bSet);
+ //HMHvoid DrawShowMarkHdl(sal_Bool bShow);
- void MakeDrawView( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+ void MakeDrawView( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE );
void HideNoteMarker();
@@ -230,7 +230,7 @@ public:
void HideListBox();
- BOOL HasHintWindow() const { return pInputHintWindow != NULL; }
+ sal_Bool HasHintWindow() const { return pInputHintWindow != NULL; }
void RemoveHintWindow();
void TestHintWindow();
@@ -251,13 +251,13 @@ public:
/** Returns the pending tab bar width relative to the frame window width (0.0 ... 1.0). */
double GetPendingRelTabBarWidth() const;
- void DoResize( const Point& rOffset, const Size& rSize, BOOL bInner = FALSE );
- void RepeatResize( BOOL bUpdateFix = TRUE );
+ void DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner = false );
+ void RepeatResize( sal_Bool bUpdateFix = sal_True );
void UpdateFixPos();
Point GetGridOffset() const;
- BOOL IsDrawSelMode() const { return bDrawSelMode; }
- void SetDrawSelMode(BOOL bNew) { bDrawSelMode = bNew; }
+ sal_Bool IsDrawSelMode() const { return bDrawSelMode; }
+ void SetDrawSelMode(sal_Bool bNew) { bDrawSelMode = bNew; }
void SetDrawFuncPtr(FuPoor* pFuncPtr) { pDrawActual = pFuncPtr; }
void SetDrawFuncOldPtr(FuPoor* pFuncPtr) { pDrawOld = pFuncPtr; }
@@ -271,7 +271,7 @@ public:
ScPageBreakData* GetPageBreakData() { return pPageBreakData; }
ScHighlightRanges* GetHighlightRanges() { return pHighlightRanges; }
- void UpdatePageBreakData( BOOL bForcePaint = FALSE );
+ void UpdatePageBreakData( sal_Bool bForcePaint = false );
void DrawMarkRect( const Rectangle& rRect );
@@ -281,17 +281,18 @@ public:
ScViewFunctionSet* GetFunctionSet() { return &aFunctionSet; }
ScViewSelectionEngine* GetSelEngine() { return pSelEngine; }
- BOOL SelMouseButtonDown( const MouseEvent& rMEvt );
+ sal_Bool SelMouseButtonDown( const MouseEvent& rMEvt );
ScDrawView* GetScDrawView() { return pDrawView; }
SdrView* GetSdrView(); // gegen CLOKs
- BOOL IsMinimized() const { return bMinimized; }
+ sal_Bool IsMinimized() const { return bMinimized; }
- void TabChanged();
- void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
+ // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
+ void TabChanged( bool bSameTabButMoved = false );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll );
SC_DLLPUBLIC void RefreshZoom();
- void SetPagebreakMode( BOOL bSet );
+ void SetPagebreakMode( sal_Bool bSet );
void UpdateLayerLocks();
@@ -301,8 +302,8 @@ public:
void UpdateInputLine();
void InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType,
- BOOL bPaint = TRUE );
- void DoneRefMode( BOOL bContinue = FALSE );
+ sal_Bool bPaint = sal_True );
+ void DoneRefMode( sal_Bool bContinue = false );
void UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ );
void StopRefMode();
@@ -318,9 +319,9 @@ public:
void ActiveGrabFocus();
- void ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl );
+ void ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl );
- SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew = FALSE );
+ SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew = false );
SC_DLLPUBLIC void CellContentChanged();
void SelectionChanged();
@@ -348,10 +349,10 @@ public:
const ScSplitPos* pWhich = NULL );
SvxZoomType GetZoomType() const;
- void SetZoomType( SvxZoomType eNew, BOOL bAll );
- USHORT CalcZoom( SvxZoomType eType, USHORT nOldZoom );
+ void SetZoomType( SvxZoomType eNew, sal_Bool bAll );
+ sal_uInt16 CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom );
-// void CalcZoom( SvxZoomType eType, USHORT& rZoom, SCCOL& rCol, SCROW& rRow );
+// void CalcZoom( SvxZoomType eType, sal_uInt16& rZoom, SCCOL& rCol, SCROW& rRow );
sal_Bool HasPageFieldDataAtCursor() const;
void StartDataSelect();
@@ -363,39 +364,39 @@ public:
// MoveCursorEnd - links oben / benutzter Bereich
SC_DLLPUBLIC void MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
- BOOL bShift, BOOL bControl,
- BOOL bKeepOld = FALSE, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bControl,
+ sal_Bool bKeepOld = false, sal_Bool bKeepSel = false );
void MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
void MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
void MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
void MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel = FALSE );
- void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift );
+ sal_Bool bShift, sal_Bool bKeepSel = false );
+ void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift );
- void MoveCursorEnter( BOOL bShift ); // Shift fuer Richtung (kein Markieren)
+ void MoveCursorEnter( sal_Bool bShift ); // Shift fuer Richtung (kein Markieren)
- BOOL MoveCursorKeyInput( const KeyEvent& rKeyEvent );
+ sal_Bool MoveCursorKeyInput( const KeyEvent& rKeyEvent );
- void FindNextUnprot( BOOL bShift, BOOL bInSelection = TRUE );
+ void FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection = sal_True );
- SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
- void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE );
+ SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = false, sal_Bool bExtendSelection = false );
+ void SelectNextTab( short nDir, sal_Bool bExtendSelection = false );
- void ActivateView( BOOL bActivate, BOOL bFirst );
+ void ActivateView( sal_Bool bActivate, sal_Bool bFirst );
void ActivatePart( ScSplitPos eWhich );
- BOOL IsInActivatePart() const { return bInActivatePart; }
+ sal_Bool IsInActivatePart() const { return bInActivatePart; }
void SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt );
void ResetTimer();
- void ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars = TRUE );
- void ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars = TRUE );
+ void ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars = sal_True );
+ void ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars = sal_True );
SC_DLLPUBLIC void ScrollLines( long nDeltaX, long nDeltaY ); // aktives
- BOOL ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
+ sal_Bool ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
void ScrollToObject( SdrObject* pDrawObj );
void MakeVisible( const Rectangle& rHMMRect );
@@ -413,7 +414,7 @@ public:
void PaintLeftArea( SCROW nStartRow, SCROW nEndRow );
void PaintLeft();
- BOOL PaintExtras();
+ sal_Bool PaintExtras();
void RecalcPPT();
@@ -444,25 +445,25 @@ public:
void InvalidateAttribs();
void MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW nRow );
- void KillEditView( BOOL bNoPaint );
+ void KillEditView( sal_Bool bNoPaint );
void UpdateEditView();
// Bloecke
- void SelectAll( BOOL bContinue = FALSE );
+ void SelectAll( sal_Bool bContinue = false );
void SelectAllTables();
void DeselectAllTables();
void MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bCols = FALSE, BOOL bRows = FALSE, BOOL bCellSelection = FALSE );
+ sal_Bool bCols = false, sal_Bool bRows = false, sal_Bool bCellSelection = false );
void InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bTestNeg = FALSE,
- BOOL bCols = FALSE, BOOL bRows = FALSE );
+ sal_Bool bTestNeg = false,
+ sal_Bool bCols = false, sal_Bool bRows = false );
void InitOwnBlockMode();
- void DoneBlockMode( BOOL bContinue = FALSE );
+ void DoneBlockMode( sal_Bool bContinue = false );
- BOOL IsBlockMode() const { return bIsBlockMode; }
+ sal_Bool IsBlockMode() const { return bIsBlockMode; }
void ExpandBlock(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode);
void ExpandBlockPage(SCsCOL nMovX, SCsROW nMovY);
@@ -470,47 +471,47 @@ public:
void MarkColumns();
void MarkRows();
- void MarkDataArea( BOOL bIncludeCursor = TRUE );
+ void MarkDataArea( sal_Bool bIncludeCursor = sal_True );
void MarkMatrixFormula();
void Unmark();
- void MarkRange( const ScRange& rRange, BOOL bSetCursor = TRUE, BOOL bContinue = FALSE );
+ void MarkRange( const ScRange& rRange, sal_Bool bSetCursor = sal_True, sal_Bool bContinue = false );
- BOOL IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
+ sal_Bool IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
void PaintMarks( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
- void PaintBlock( BOOL bReset = FALSE );
+ void PaintBlock( sal_Bool bReset = false );
void SetMarkData( const ScMarkData& rNew );
void MarkDataChanged();
- void LockModifiers( USHORT nModifiers );
- USHORT GetLockedModifiers() const;
- void ViewOptionsHasChanged( BOOL bHScrollChanged,
- BOOL bGraphicsChanged = FALSE);
+ void LockModifiers( sal_uInt16 nModifiers );
+ sal_uInt16 GetLockedModifiers() const;
+ void ViewOptionsHasChanged( sal_Bool bHScrollChanged,
+ sal_Bool bGraphicsChanged = false);
Point GetMousePosPixel();
void SnapSplitPos( Point& rScreenPosPixel );
- void FreezeSplitters( BOOL bFreeze );
+ void FreezeSplitters( sal_Bool bFreeze );
void RemoveSplit();
void SplitAtCursor();
- void SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer );
+ void SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer );
void InvalidateSplit();
- void ErrorMessage( USHORT nGlobStrId );
- Window* GetParentOrChild( USHORT nChildId );
+ void ErrorMessage( sal_uInt16 nGlobStrId );
+ Window* GetParentOrChild( sal_uInt16 nChildId );
- void EnableRefInput(BOOL bFlag=TRUE);
+ void EnableRefInput(sal_Bool bFlag=sal_True);
Window* GetFrameWin() const { return pFrameWin; }
- BOOL HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; }
+ sal_Bool HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; }
ScDocument* GetBrushDocument() const { return pBrushDocument; }
SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet; }
- BOOL IsPaintBrushLocked() const { return bLockPaintBrush; }
- void SetBrushDocument( ScDocument* pNew, BOOL bLock );
- void SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock );
+ sal_Bool IsPaintBrushLocked() const { return bLockPaintBrush; }
+ void SetBrushDocument( ScDocument* pNew, sal_Bool bLock );
+ void SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock );
void ResetBrushDocument();
};
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index b4685657f577..49fd72ea8106 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -101,15 +101,15 @@ enum ObjectSelectionType
class ScTabViewShell: public SfxViewShell, public ScDBFunc
{
private:
- static USHORT nInsertCtrlState;
- static USHORT nInsCellsCtrlState;
- static USHORT nInsObjCtrlState;
+ static sal_uInt16 nInsertCtrlState;
+ static sal_uInt16 nInsCellsCtrlState;
+ static sal_uInt16 nInsObjCtrlState;
SvxHtmlOptions aHTMLOpt;
ObjectSelectionType eCurOST;
- USHORT nDrawSfxId;
- USHORT nCtrlSfxId;
- USHORT nFormSfxId;
+ sal_uInt16 nDrawSfxId;
+ sal_uInt16 nCtrlSfxId;
+ sal_uInt16 nFormSfxId;
String sDrawCustom; // current custom shape type
ScDrawShell* pDrawShell;
ScDrawTextObjectBar* pDrawTextShell;
@@ -145,36 +145,36 @@ private:
ScNavigatorSettings* pNavSettings;
// used in first Activate
- BOOL bFirstActivate;
+ sal_Bool bFirstActivate;
- BOOL bActiveDrawSh;
- BOOL bActiveDrawTextSh;
- BOOL bActivePivotSh;
- BOOL bActiveAuditingSh;
- BOOL bActiveDrawFormSh;
- BOOL bActiveOleObjectSh;
- BOOL bActiveChartSh;
- BOOL bActiveGraphicSh;
- BOOL bActiveMediaSh;
- BOOL bActiveEditSh;
+ sal_Bool bActiveDrawSh;
+ sal_Bool bActiveDrawTextSh;
+ sal_Bool bActivePivotSh;
+ sal_Bool bActiveAuditingSh;
+ sal_Bool bActiveDrawFormSh;
+ sal_Bool bActiveOleObjectSh;
+ sal_Bool bActiveChartSh;
+ sal_Bool bActiveGraphicSh;
+ sal_Bool bActiveMediaSh;
+ sal_Bool bActiveEditSh;
- BOOL bFormShellAtTop; // does the FormShell need to be on top?
+ sal_Bool bFormShellAtTop; // does the FormShell need to be on top?
- BOOL bDontSwitch; // EditShell nicht abschalten
- BOOL bInFormatDialog; // fuer GetSelectionText
- BOOL bPrintSelected; // for result of SvxPrtQryBox
+ sal_Bool bDontSwitch; // EditShell nicht abschalten
+ sal_Bool bInFormatDialog; // fuer GetSelectionText
+ sal_Bool bPrintSelected; // for result of SvxPrtQryBox
- BOOL bReadOnly; // um Status-Aenderungen zu erkennen
+ sal_Bool bReadOnly; // um Status-Aenderungen zu erkennen
SbxObject* pScSbxObject;
- BOOL bChartAreaValid; // wenn Chart aufgezogen wird
+ sal_Bool bChartAreaValid; // wenn Chart aufgezogen wird
String aEditChartName;
ScRangeListRef aChartSource;
Rectangle aChartPos;
SCTAB nChartDestTab;
- USHORT nCurRefDlgId;
+ sal_uInt16 nCurRefDlgId;
SfxBroadcaster* pAccessibilityBroadcaster;
@@ -182,7 +182,7 @@ private:
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
private:
- void Construct( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+ void Construct( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE );
SfxShell* GetMySubShell() const;
@@ -198,9 +198,9 @@ private:
DECL_LINK( HtmlOptionsHdl, void * );
protected:
- virtual void Activate(BOOL bMDI);
- virtual void Deactivate(BOOL bMDI);
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual void Activate(sal_Bool bMDI);
+ virtual void Deactivate(sal_Bool bMDI);
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = false );
virtual void ShowCursor(bool bOn);
@@ -216,14 +216,14 @@ protected:
virtual Size GetOptimalSizePixel() const;
- virtual String GetSelectionText( BOOL bWholeWord );
- virtual BOOL HasSelection( BOOL bText ) const;
+ virtual String GetSelectionText( sal_Bool bWholeWord );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
virtual String GetDescription() const;
- virtual void WriteUserData(String &, BOOL bBrowse = FALSE);
- virtual void ReadUserData(const String &, BOOL bBrowse = FALSE);
- virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
- virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void WriteUserData(String &, sal_Bool bBrowse = false);
+ virtual void ReadUserData(const String &, sal_Bool bBrowse = false);
+ virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
+ virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
virtual void UIDeactivated( SfxInPlaceClient* pClient );
@@ -253,10 +253,10 @@ public:
void ExecuteInputDirect();
ScInputHandler* GetInputHandler() const;
- void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE );
+ void UpdateInputHandler( sal_Bool bForce = false, sal_Bool bStopEditing = sal_True );
void UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust );
- BOOL TabKeyInput(const KeyEvent& rKEvt);
- BOOL SfxKeyInput(const KeyEvent& rKEvt);
+ sal_Bool TabKeyInput(const KeyEvent& rKEvt);
+ sal_Bool SfxKeyInput(const KeyEvent& rKEvt);
void SetActive();
@@ -303,32 +303,32 @@ public:
void GetDrawOptState(SfxItemSet &rSet);
- void SetDrawShell( BOOL bActive );
- void SetDrawTextShell( BOOL bActive );
+ void SetDrawShell( sal_Bool bActive );
+ void SetDrawTextShell( sal_Bool bActive );
- void SetPivotShell( BOOL bActive );
+ void SetPivotShell( sal_Bool bActive );
ScArea* GetPivotSource(){return pPivotSource;}
void SetPivotSource(ScArea* pSrc){pPivotSource=pSrc;}
void SetDialogDPObject( const ScDPObject* pObj );
const ScDPObject* GetDialogDPObject() const { return pDialogDPObject; }
- BOOL GetDontSwitch(){return bDontSwitch;}
- void SetDontSwitch(BOOL bFlag){bDontSwitch=bFlag;}
+ sal_Bool GetDontSwitch(){return bDontSwitch;}
+ void SetDontSwitch(sal_Bool bFlag){bDontSwitch=bFlag;}
- void SetAuditShell( BOOL bActive );
- void SetDrawFormShell( BOOL bActive );
- void SetEditShell(EditView* pView, BOOL bActive );
- void SetOleObjectShell( BOOL bActive );
- void SetChartShell( BOOL bActive );
- void SetGraphicShell( BOOL bActive );
- void SetMediaShell( BOOL bActive );
+ void SetAuditShell( sal_Bool bActive );
+ void SetDrawFormShell( sal_Bool bActive );
+ void SetEditShell(EditView* pView, sal_Bool bActive );
+ void SetOleObjectShell( sal_Bool bActive );
+ void SetChartShell( sal_Bool bActive );
+ void SetGraphicShell( sal_Bool bActive );
+ void SetMediaShell( sal_Bool bActive );
void SetDrawShellOrSub();
- void SetCurSubShell( ObjectSelectionType eOST, BOOL bForce = FALSE );
+ void SetCurSubShell( ObjectSelectionType eOST, sal_Bool bForce = false );
- void SetFormShellAtTop( BOOL bSet );
+ void SetFormShellAtTop( sal_Bool bSet );
ObjectSelectionType GetCurObjectSelectionType();
@@ -336,15 +336,15 @@ public:
void StopEditShell();
- BOOL IsDrawTextShell() const;
- BOOL IsAuditShell() const;
+ sal_Bool IsDrawTextShell() const;
+ sal_Bool IsAuditShell() const;
- void SetDrawTextUndo( SfxUndoManager* pUndoMgr );
+ void SetDrawTextUndo( ::svl::IUndoManager* pUndoMgr );
void FillFieldData( ScHeaderFieldData& rData );
void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest );
- BOOL GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const;
+ sal_Bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const;
void SetEditChartName(const String& aStr){aEditChartName=aStr;}
@@ -353,27 +353,21 @@ public:
ScNavigatorSettings* GetNavigatorSettings();
// Drucken:
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- virtual USHORT SetPrinter( SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = false );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter,
+ sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
- virtual PrintDialog* CreatePrintDialog( Window* pParent );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
void ConnectObject( SdrOle2Obj* pObj );
- BOOL ActivateObject( SdrOle2Obj* pObj, long nVerb );
+ sal_Bool ActivateObject( SdrOle2Obj* pObj, long nVerb );
void DeactivateOle();
SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell();
SfxModelessDialog* CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW,
SfxChildWinInfo* pInfo,
- Window* pParent, USHORT nSlotId );
+ Window* pParent, sal_uInt16 nSlotId );
void UpdateOleZoom();
inline SbxObject* GetScSbxObject() const
@@ -384,15 +378,15 @@ public:
FmFormShell* GetFormShell() const { return pFormShell; }
void InsertURL( const String& rName, const String& rURL, const String& rTarget,
- USHORT nMode );
+ sal_uInt16 nMode );
void InsertURLButton( const String& rName, const String& rURL, const String& rTarget,
const Point* pInsPos = NULL );
void InsertURLField( const String& rName, const String& rURL, const String& rTarget );
- BOOL SelectObject( const String& rName );
+ sal_Bool SelectObject( const String& rName );
- void SetInFormatDialog(BOOL bFlag) {bInFormatDialog=bFlag;}
- BOOL IsInFormatDialog() {return bInFormatDialog;}
+ void SetInFormatDialog(sal_Bool bFlag) {bInFormatDialog=bFlag;}
+ sal_Bool IsInFormatDialog() {return bInFormatDialog;}
void ForceMove() { Move(); }
@@ -403,20 +397,20 @@ public:
void UpdateNumberFormatter ( ScDocument* pDoc,
const SvxNumberInfoItem& rInfoItem );
- void ExecuteCellFormatDlg ( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+ void ExecuteCellFormatDlg ( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
- BOOL GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
+ sal_Bool GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
void StartSimpleRefDialog( const String& rTitle, const String& rInitVal,
- BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
+ sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection );
void StopSimpleRefDialog();
- void SetCurRefDlgId( USHORT nNew );
+ void SetCurRefDlgId( sal_uInt16 nNew );
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
void BroadcastAccessibility( const SfxHint &rHint );
- BOOL HasAccessibilityObjects();
+ sal_Bool HasAccessibilityObjects();
bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash);
diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx
index 7c0b0504d8c7..1910b2f7a081 100644
--- a/sc/source/ui/inc/tbinsert.hxx
+++ b/sc/source/ui/inc/tbinsert.hxx
@@ -33,20 +33,20 @@
class ScTbxInsertCtrl : public SfxToolBoxControl
{
- USHORT nLastSlotId;
+ sal_uInt16 nLastSlotId;
using SfxToolBoxControl::Select;
- virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( sal_Bool bMod1 = false );
public:
SFX_DECL_TOOLBOX_CONTROL();
- ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
~ScTbxInsertCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
};
diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx
index 32581f1dc792..481801c14af4 100644
--- a/sc/source/ui/inc/tbzoomsliderctrl.hxx
+++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx
@@ -41,10 +41,10 @@ class ScZoomSliderControl: public SfxToolBoxControl
{
public:
SFX_DECL_TOOLBOX_CONTROL();
- ScZoomSliderControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ScZoomSliderControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~ScZoomSliderControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window *pParent );
};
@@ -60,13 +60,13 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- USHORT Offset2Zoom( long nOffset ) const;
- long Zoom2Offset( USHORT nZoom ) const;
+ sal_uInt16 Offset2Zoom( long nOffset ) const;
+ long Zoom2Offset( sal_uInt16 nZoom ) const;
void DoPaint( const Rectangle& rRect );
public:
ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom );
~ScZoomSliderWnd();
void UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem );
diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx
index 24b68650ce16..202409e00d7b 100644
--- a/sc/source/ui/inc/textdlgs.hxx
+++ b/sc/source/ui/inc/textdlgs.hxx
@@ -43,7 +43,7 @@ private:
const SfxItemSet& rOutAttrs;
const SfxObjectShell& rDocShell;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
@@ -60,7 +60,7 @@ class ScParagraphDlg : public SfxTabDialog
private:
const SfxItemSet& rOutAttrs;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr );
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 608670181f46..9ab7c107561b 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -46,8 +46,8 @@ class ScTpCalcOptions : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
@@ -83,7 +83,7 @@ private:
ScDocOptions* pOldOptions;
ScDocOptions* pLocalOptions;
- USHORT nWhichCalc;
+ sal_uInt16 nWhichCalc;
#ifdef _TPCALC_CXX
private:
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index 54e29c534b46..70d043d5ddec 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -42,7 +42,7 @@ class ScTpCompatOptions : public SfxTabPage
public:
static SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreAttrs);
- virtual BOOL FillItemSet(SfxItemSet& rCoreAttrs);
+ virtual sal_Bool FillItemSet(SfxItemSet& rCoreAttrs);
virtual void Reset(const SfxItemSet& rCoreAttrs);
virtual int DeactivatePage(SfxItemSet* pSet = NULL);
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 4103bf8fae57..41746603c5f1 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -47,7 +47,7 @@ public:
static SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreSet);
// static USHORT* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet& rCoreSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rCoreSet);
virtual void Reset( const SfxItemSet& rCoreSet );
virtual int DeactivatePage(SfxItemSet* pSet = NULL);
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index 386015e0337c..171b1a56af90 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -30,7 +30,7 @@
#define SC_TPHF_HXX
-#include <svx/hdft2.hxx>
+#include <svx/hdft.hxx>
class ScStyleDlg;
@@ -42,16 +42,16 @@ public:
virtual ~ScHFPage();
virtual void Reset( const SfxItemSet& rSet );
- virtual BOOL FillItemSet( SfxItemSet& rOutSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rOutSet );
void SetPageStyle( const String& rName ) { aStrPageStyle = rName; }
void SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; }
protected:
ScHFPage( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const SfxItemSet& rSet,
- USHORT nSetId );
+ sal_uInt16 nSetId );
virtual void ActivatePage();
virtual void DeactivatePage();
@@ -62,7 +62,7 @@ private:
PushButton aBtnEdit;
SfxItemSet aDataSet;
String aStrPageStyle;
- USHORT nPageUsage;
+ sal_uInt16 nPageUsage;
const ScStyleDlg* pStyleDlg;
#ifdef _TPHF_CXX
@@ -79,7 +79,7 @@ class ScHeaderPage : public ScHFPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScHeaderPage( Window* pParent, const SfxItemSet& rSet );
@@ -91,7 +91,7 @@ class ScFooterPage : public ScHFPage
{
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
private:
ScFooterPage( Window* pParent, const SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index c9dfa06cc3b6..7c1a994e1080 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -109,7 +109,7 @@ private:
Timer aTimer;
ScPopupMenu* pPopupMenu;
Link aMLink;
- USHORT nSelected;
+ sal_uInt16 nSelected;
SC_DLLPRIVATE DECL_LINK( TimerHdl, Timer*);
@@ -127,7 +127,7 @@ public:
void SetPopupMenu(ScPopupMenu* pPopUp);
- USHORT GetSelected();
+ sal_uInt16 GetSelected();
void SetMenuHdl( const Link& rLink ) { aMLink = rLink; }
const Link& GetMenuHdl() const { return aMLink; }
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index bbd2f471c1e9..7aa00147fa64 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -46,8 +46,8 @@ class ScTpPrintOptions : public SfxTabPage
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
- static USHORT* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rCoreSet );
+ static sal_uInt16* GetRanges();
+ virtual sal_Bool FillItemSet( SfxItemSet& rCoreSet );
virtual void Reset( const SfxItemSet& rCoreSet );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage( SfxItemSet* pSet = NULL );
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index f34d1236210a..8f22696c879d 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -62,8 +62,8 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
protected:
@@ -94,16 +94,16 @@ private:
String aStrColumn;
String aStrRow;
- const USHORT nWhichSort;
+ const sal_uInt16 nWhichSort;
ScSortDlg* pDlg;
ScViewData* pViewData;
const ScSortParam& rSortData;
SCCOLROW nFieldArr[SC_MAXFIELDS];
- USHORT nFieldCount;
+ sal_uInt16 nFieldCount;
SCCOL nFirstCol;
SCROW nFirstRow;
- BOOL bHasHeader;
- BOOL bSortByRows;
+ sal_Bool bHasHeader;
+ sal_Bool bSortByRows;
ListBox* aSortLbArr[3];
RadioButton* aDirBtnArr[3][2];
@@ -112,10 +112,10 @@ private:
#ifdef _TPSORT_CXX
private:
void Init ();
- void DisableField ( USHORT nField );
- void EnableField ( USHORT nField );
+ void DisableField ( sal_uInt16 nField );
+ void EnableField ( sal_uInt16 nField );
void FillFieldLists ();
- USHORT GetFieldSelPos ( SCCOLROW nField );
+ sal_uInt16 GetFieldSelPos ( SCCOLROW nField );
// Handler ------------------------
DECL_LINK( SelectHdl, ListBox * );
@@ -148,8 +148,8 @@ public:
#define SfxTabPage ::SfxTabPage
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
protected:
@@ -191,7 +191,7 @@ private:
String aStrNoName;
String aStrAreaLabel;
- const USHORT nWhichSort;
+ const sal_uInt16 nWhichSort;
const ScSortParam& rSortData;
ScViewData* pViewData;
ScDocument* pDoc;
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 4016e682176b..46f6b7fdaf0e 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -48,7 +48,7 @@ private:
~ScDocStatPage();
protected:
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset ( const SfxItemSet& rSet );
private:
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index 1a2bd22c4a5b..049633ad40b6 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -48,16 +48,16 @@ class ScDocument;
class ScTpSubTotalGroup : public SfxTabPage
{
protected:
- ScTpSubTotalGroup( Window* pParent, USHORT nResId,
+ ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId,
const SfxItemSet& rArgSet );
public:
virtual ~ScTpSubTotalGroup();
- static USHORT* GetRanges ();
- BOOL DoReset ( USHORT nGroupNo,
+ static sal_uInt16* GetRanges ();
+ sal_Bool DoReset ( sal_uInt16 nGroupNo,
const SfxItemSet& rArgSet );
- BOOL DoFillItemSet ( USHORT nGroupNo,
+ sal_Bool DoFillItemSet ( sal_uInt16 nGroupNo,
SfxItemSet& rArgSet );
protected:
FixedText aFtGroup;
@@ -72,17 +72,17 @@ protected:
ScViewData* pViewData;
ScDocument* pDoc;
- const USHORT nWhichSubTotals;
+ const sal_uInt16 nWhichSubTotals;
const ScSubTotalParam& rSubTotalData;
SCCOL nFieldArr[SC_MAXFIELDS];
- const USHORT nFieldCount;
+ const sal_uInt16 nFieldCount;
private:
void Init ();
void FillListBoxes ();
- ScSubTotalFunc LbPosToFunc ( USHORT nPos );
- USHORT FuncToLbPos ( ScSubTotalFunc eFunc );
- USHORT GetFieldSelPos ( SCCOL nField );
+ ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos );
+ sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc );
+ sal_uInt16 GetFieldSelPos ( SCCOL nField );
// Handler ------------------------
DECL_LINK( SelectHdl, ListBox * );
@@ -102,7 +102,7 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -119,7 +119,7 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -136,7 +136,7 @@ public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -152,10 +152,10 @@ protected:
public:
virtual ~ScTpSubTotalOptions();
- static USHORT* GetRanges ();
+ static sal_uInt16* GetRanges ();
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rArgSet );
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
private:
@@ -172,7 +172,7 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- const USHORT nWhichSubTotals;
+ const sal_uInt16 nWhichSubTotals;
const ScSubTotalParam& rSubTotalData;
private:
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index b1b988811d6e..d72b9f306e4e 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -58,8 +58,8 @@ class ScTablePage : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 2e277a14af8d..f627baa52225 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -47,8 +47,8 @@ class ScTpUserLists : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rAttrSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreAttrs );
virtual void Reset ( const SfxItemSet& rCoreAttrs );
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
@@ -79,7 +79,7 @@ private:
const String aStrCopyFrom;
const String aStrCopyErr;
- const USHORT nWhichUserLists;
+ const sal_uInt16 nWhichUserLists;
ScUserList* pUserLists;
ScDocument* pDoc;
@@ -87,20 +87,20 @@ private:
ScRangeUtil* pRangeUtil;
String aStrSelectedArea;
- BOOL bModifyMode;
- BOOL bCancelMode;
- BOOL bCopyDone;
- USHORT nCancelPos;
+ sal_Bool bModifyMode;
+ sal_Bool bCancelMode;
+ sal_Bool bCopyDone;
+ sal_uInt16 nCancelPos;
#ifdef _TPUSRLST_CXX
private:
void Init ();
- USHORT UpdateUserListBox ();
- void UpdateEntries ( USHORT nList );
+ sal_uInt16 UpdateUserListBox ();
+ void UpdateEntries ( sal_uInt16 nList );
void MakeListStr ( String& rListStr );
void AddNewList ( const String& rEntriesStr );
- void RemoveList ( USHORT nList );
- void ModifyList ( USHORT nSelList,
+ void RemoveList ( sal_uInt16 nList );
+ void ModifyList ( sal_uInt16 nSelList,
const String& rEntriesStr );
void CopyListFromArea ( const ScRefAddress& rStartPos,
const ScRefAddress& rEndPos );
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 43a75433adda..68093f0ce0f5 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -100,7 +100,7 @@ class ScTpContentOptions : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -156,7 +156,7 @@ class ScTpLayoutOptions : public SfxTabPage
public:
static SfxTabPage* Create ( Window* pParent,
const SfxItemSet& rCoreSet );
- virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
virtual void Reset ( const SfxItemSet& rCoreSet );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 5940d806b43c..2afa83c05cb6 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -59,10 +59,11 @@ private:
SCCOL nDragHandleX;
SCROW nDragHandleY;
SCTAB nVisibleTab;
- USHORT nDragSourceFlags;
- BOOL bDragWasInternal;
- BOOL bUsedForLink;
+ sal_uInt16 nDragSourceFlags;
+ sal_Bool bDragWasInternal;
+ sal_Bool bUsedForLink;
bool bHasFiltered; // if has filtered rows
+ bool bUseInApi; // to recognize clipboard content copied from API
void InitDocShell();
static void StripRefs( ScDocument* pDoc, SCCOL nStartX, SCROW nStartY,
@@ -70,7 +71,7 @@ private:
ScDocument* pDestDoc=0,
SCCOL nSubX=0, SCROW nSubY=0 );
static void PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor,
- const ScRange& rBlock, BOOL bMetaFile );
+ const ScRange& rBlock, sal_Bool bMetaFile );
static void GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol );
public:
@@ -90,8 +91,9 @@ public:
SCCOL GetDragHandleX() const { return nDragHandleX; }
SCROW GetDragHandleY() const { return nDragHandleY; }
SCTAB GetVisibleTab() const { return nVisibleTab; }
- USHORT GetDragSourceFlags() const { return nDragSourceFlags; }
+ sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; }
bool HasFilteredRows() const { return bHasFiltered; }
+ bool GetUseInApi() const { return bUseInApi; }
ScDocShell* GetSourceDocShell();
ScDocument* GetSourceDocument();
ScMarkData GetSourceMarkData();
@@ -100,12 +102,13 @@ public:
void SetDragHandlePos( SCCOL nX, SCROW nY );
void SetVisibleTab( SCTAB nNew );
void SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark );
- void SetDragSourceFlags( USHORT nFlags );
+ void SetDragSourceFlags( sal_uInt16 nFlags );
void SetDragWasInternal();
+ SC_DLLPUBLIC void SetUseInApi( bool bSet );
static SC_DLLPUBLIC ScTransferObj* GetOwnClipboard( Window* pUIWin );
- static SfxObjectShell* SetDrawClipDoc( BOOL bAnyOle ); // update ScGlobal::pDrawClipDocShellRef
+ static SfxObjectShell* SetDrawClipDoc( sal_Bool bAnyOle ); // update ScGlobal::pDrawClipDocShellRef
virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
};
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
index fa8ba1abfc1f..c97c14143798 100644
--- a/sc/source/ui/inc/ui_pch.hxx
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -76,7 +76,7 @@
#include <vcl/outdev.hxx>
#include <vcl/pointr.hxx>
#include <vcl/ptrstyle.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/event.hxx>
#include <limits.h>
#include <tools/errinf.hxx>
@@ -202,7 +202,7 @@
#include <svl/stritem.hxx>
#include <collect.hxx>
#include <svx/svdsob.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdglue.hxx>
#include <svx/svdlayer.hxx>
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 4c6ae0914780..f35302c92901 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -56,7 +56,7 @@ class ScInputStatusItem : public SfxPoolItem
public:
TYPEINFO();
- ScInputStatusItem( USHORT nWhich,
+ ScInputStatusItem( sal_uInt16 nWhich,
const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
@@ -94,16 +94,16 @@ public:
class ScTablesHint : public SfxHint
{
- USHORT nId;
+ sal_uInt16 nId;
SCTAB nTab1;
SCTAB nTab2;
public:
TYPEINFO();
- ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2=0);
+ ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2=0);
~ScTablesHint();
- USHORT GetId() const { return nId; }
+ sal_uInt16 GetId() const { return nId; }
SCTAB GetTab1() const { return nTab1; }
SCTAB GetTab2() const { return nTab2; }
};
@@ -129,16 +129,16 @@ private:
class ScIndexHint : public SfxHint
{
- USHORT nId;
- USHORT nIndex;
+ sal_uInt16 nId;
+ sal_uInt16 nIndex;
public:
TYPEINFO();
- ScIndexHint(USHORT nNewId, USHORT nIdx);
+ ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx);
~ScIndexHint();
- USHORT GetId() const { return nId; }
- USHORT GetIndex() const { return nIndex; }
+ sal_uInt16 GetId() const { return nId; }
+ sal_uInt16 GetIndex() const { return nIndex; }
};
//----------------------------------------------------------------------------
@@ -148,10 +148,10 @@ class SC_DLLPUBLIC ScSortItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScSortItem( USHORT nWhich,
+ ScSortItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScSortParam* pSortData );
- ScSortItem( USHORT nWhich,
+ ScSortItem( sal_uInt16 nWhich,
const ScSortParam* pSortData );
ScSortItem( const ScSortItem& rItem );
~ScSortItem();
@@ -159,7 +159,7 @@ public:
virtual String GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const;
ScViewData* GetViewData () const { return pViewData; }
const ScSortParam& GetSortData () const { return theSortData; }
@@ -176,10 +176,10 @@ class SC_DLLPUBLIC ScQueryItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScQueryItem( USHORT nWhich,
+ ScQueryItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScQueryParam* pQueryData );
- ScQueryItem( USHORT nWhich,
+ ScQueryItem( sal_uInt16 nWhich,
const ScQueryParam* pQueryData );
ScQueryItem( const ScQueryItem& rItem );
~ScQueryItem();
@@ -191,13 +191,13 @@ public:
ScViewData* GetViewData () const { return pViewData; }
const ScQueryParam& GetQueryData() const { return theQueryData; }
- BOOL GetAdvancedQuerySource(ScRange& rSource) const;
+ sal_Bool GetAdvancedQuerySource(ScRange& rSource) const;
void SetAdvancedQuerySource(const ScRange* pSource);
private:
ScViewData* pViewData;
ScQueryParam theQueryData;
- BOOL bIsAdvanced;
+ sal_Bool bIsAdvanced;
ScRange aAdvSource;
};
@@ -208,10 +208,10 @@ class SC_DLLPUBLIC ScSubTotalItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScSubTotalItem( USHORT nWhich,
+ ScSubTotalItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScSubTotalParam* pSubTotalData );
- ScSubTotalItem( USHORT nWhich,
+ ScSubTotalItem( sal_uInt16 nWhich,
const ScSubTotalParam* pSubTotalData );
ScSubTotalItem( const ScSubTotalItem& rItem );
~ScSubTotalItem();
@@ -219,7 +219,7 @@ public:
virtual String GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const;
ScViewData* GetViewData () const { return pViewData; }
const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; }
@@ -236,7 +236,7 @@ class SC_DLLPUBLIC ScUserListItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScUserListItem( USHORT nWhich );
+ ScUserListItem( sal_uInt16 nWhich );
ScUserListItem( const ScUserListItem& rItem );
~ScUserListItem();
@@ -258,7 +258,7 @@ class ScConsolidateItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScConsolidateItem( USHORT nWhich,
+ ScConsolidateItem( sal_uInt16 nWhich,
const ScConsolidateParam* pParam );
ScConsolidateItem( const ScConsolidateItem& rItem );
~ScConsolidateItem();
@@ -280,8 +280,8 @@ class ScPivotItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScPivotItem( USHORT nWhich, const ScDPSaveData* pData,
- const ScRange* pRange, BOOL bNew );
+ ScPivotItem( sal_uInt16 nWhich, const ScDPSaveData* pData,
+ const ScRange* pRange, sal_Bool bNew );
ScPivotItem( const ScPivotItem& rItem );
~ScPivotItem();
@@ -291,12 +291,12 @@ public:
const ScDPSaveData& GetData() const { return *pSaveData; }
const ScRange& GetDestRange() const { return aDestRange; }
- BOOL IsNewSheet() const { return bNewSheet; }
+ sal_Bool IsNewSheet() const { return bNewSheet; }
private:
ScDPSaveData* pSaveData;
ScRange aDestRange;
- BOOL bNewSheet;
+ sal_Bool bNewSheet;
};
//----------------------------------------------------------------------------
@@ -306,7 +306,7 @@ class ScSolveItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScSolveItem( USHORT nWhich,
+ ScSolveItem( sal_uInt16 nWhich,
const ScSolveParam* pParam );
ScSolveItem( const ScSolveItem& rItem );
~ScSolveItem();
@@ -328,7 +328,7 @@ class ScTabOpItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScTabOpItem( USHORT nWhich,
+ ScTabOpItem( sal_uInt16 nWhich,
const ScTabOpParam* pParam );
ScTabOpItem( const ScTabOpItem& rItem );
~ScTabOpItem();
@@ -350,7 +350,7 @@ class ScCondFrmtItem : public SfxPoolItem
{
public:
TYPEINFO();
- ScCondFrmtItem( USHORT nWhich,
+ ScCondFrmtItem( sal_uInt16 nWhich,
//! const ScConditionalFormat* pCondFrmt );
const ScConditionalFormat& rCondFrmt );
ScCondFrmtItem( const ScCondFrmtItem& rItem );
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 385f0892f5c3..abc6770157e0 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -32,6 +32,7 @@
#include <svl/undo.hxx>
#include "global.hxx"
#include "address.hxx"
+#include "docsh.hxx"
class ScDocument;
class ScDocShell;
@@ -48,12 +49,16 @@ public:
ScSimpleUndo( ScDocShell* pDocSh );
virtual ~ScSimpleUndo();
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
protected:
ScDocShell* pDocShell;
SfxUndoAction* pDetectiveUndo;
+ bool IsPaintLocked() const { return pDocShell->IsPaintLocked(); }
+
+ bool SetViewMarkData( const ScMarkData& rMarkData );
+
void BeginUndo();
void EndUndo();
void BeginRedo();
@@ -85,7 +90,7 @@ protected:
// void BeginRedo();
void EndRedo();
- BOOL AdjustHeight();
+ sal_Bool AdjustHeight();
void ShowBlock();
};
@@ -155,16 +160,16 @@ public:
SfxUndoAction* GetWrappedUndo() { return pWrappedUndo; }
void ForgetWrappedUndo();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked );
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
virtual String GetComment() const;
virtual String GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
};
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index a6eb727a7554..d8617490219a 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -60,29 +60,29 @@ public:
ScUndoInsertCells( ScDocShell* pNewDocShell,
const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bNewPartOfPaste );
+ sal_Bool bNewPartOfPaste );
virtual ~ScUndoInsertCells();
virtual void Undo();
virtual void Redo();
virtual void Repeat( SfxRepeatTarget& rTarget );
- virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const;
virtual String GetComment() const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
private:
ScRange aEffRange;
SCTAB nCount;
SCTAB* pTabs;
SCTAB* pScenarios;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
InsCellCmd eCmd;
- BOOL bPartOfPaste;
+ sal_Bool bPartOfPaste;
SfxUndoAction* pPasteUndo;
- void DoChange ( const BOOL bUndo );
+ void DoChange ( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -99,7 +99,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -108,11 +108,11 @@ private:
SCTAB nCount;
SCTAB* pTabs;
SCTAB* pScenarios;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
DelCellCmd eCmd;
- void DoChange ( const BOOL bUndo );
+ void DoChange ( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -122,7 +122,7 @@ class ScUndoDeleteMulti: public ScMoveUndo
public:
TYPEINFO();
ScUndoDeleteMulti( ScDocShell* pNewDocShell,
- BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab,
+ sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab,
const SCCOLROW* pRng, SCCOLROW nRngCnt,
ScDocument* pUndoDocument, ScRefUndoData* pRefData );
virtual ~ScUndoDeleteMulti();
@@ -130,18 +130,18 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
- BOOL bRows;
- BOOL bRefresh;
+ sal_Bool bRows;
+ sal_Bool bRefresh;
SCTAB nTab;
SCCOLROW* pRanges;
SCCOLROW nRangeCnt;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void DoChange() const;
void SetChangeTrack();
@@ -162,7 +162,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -170,27 +170,27 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScRange aExtendedRange;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
struct ScUndoPasteOptions
{
- USHORT nFunction;
- BOOL bSkipEmpty;
- BOOL bTranspose;
- BOOL bAsLink;
+ sal_uInt16 nFunction;
+ sal_Bool bSkipEmpty;
+ sal_Bool bTranspose;
+ sal_Bool bAsLink;
InsCellCmd eMoveMode;
ScUndoPasteOptions() :
nFunction( PASTE_NOFUNC ),
- bSkipEmpty( FALSE ),
- bTranspose( FALSE ),
- bAsLink( FALSE ),
+ bSkipEmpty( false ),
+ bTranspose( false ),
+ bAsLink( false ),
eMoveMode( INS_NONE )
{}
};
@@ -204,16 +204,16 @@ public:
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
- BOOL bRedoIsFilled = TRUE,
+ sal_Bool bRedoIsFilled = sal_True,
const ScUndoPasteOptions* pOptions = NULL );
virtual ~ScUndoPaste();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -221,15 +221,15 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScRefUndoData* pRefUndoData;
ScRefUndoData* pRefRedoData;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- BOOL bRedoFilled;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_Bool bRedoFilled;
ScUndoPasteOptions aPasteOptions;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -239,27 +239,27 @@ class ScUndoDragDrop: public ScMoveUndo
public:
TYPEINFO();
ScUndoDragDrop( ScDocShell* pNewDocShell,
- const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut,
+ const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut,
ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bScenario );
+ sal_Bool bScenario );
virtual ~ScUndoDragDrop();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScRange aSrcRange;
ScRange aDestRange;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- BOOL bCut;
- BOOL bKeepScenarioFlags;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_Bool bCut;
+ sal_Bool bKeepScenarioFlags;
- void PaintArea( ScRange aRange, USHORT nExtFlags ) const;
+ void PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const;
void DoUndo( ScRange aRange ) const;
void SetChangeTrack();
@@ -273,14 +273,14 @@ public:
ScUndoDeleteContents( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
const ScRange& rRange,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
- USHORT nNewFlags, BOOL bObjects );
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
+ sal_uInt16 nNewFlags, sal_Bool bObjects );
virtual ~ScUndoDeleteContents();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -289,12 +289,12 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
SdrUndoAction* pDrawUndo; // geloeschte Objekte
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- USHORT nFlags;
- BOOL bMulti; // Mehrfachselektion
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_uInt16 nFlags;
+ sal_Bool bMulti; // Mehrfachselektion
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -307,14 +307,14 @@ public:
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc,
- USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink );
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc,
+ sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink );
virtual ~ScUndoFillTable();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -322,16 +322,16 @@ private:
ScRange aRange;
ScMarkData aMarkData;
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- USHORT nFlags;
- USHORT nFunction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_uInt16 nFlags;
+ sal_uInt16 nFunction;
SCTAB nSrcTab;
- BOOL bMulti; // Mehrfachselektion
- BOOL bSkipEmpty;
- BOOL bAsLink;
+ sal_Bool bMulti; // Mehrfachselektion
+ sal_Bool bSkipEmpty;
+ sal_Bool bAsLink;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
@@ -344,7 +344,7 @@ public:
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
const ScPatternAttr* pNewApply,
const SvxBoxItem* pNewOuter = NULL,
const SvxBoxInfoItem* pNewInner = NULL );
@@ -353,7 +353,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -363,12 +363,12 @@ private:
ScRange aRange;
ScEditDataArray aDataArray;
ScDocument* pUndoDoc;
- BOOL bMulti;
+ sal_Bool bMulti;
ScPatternAttr* pApplyPattern;
SvxBoxItem* pLineOuter;
SvxBoxInfoItem* pLineInner;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void ChangeEditData( const bool bUndo );
};
@@ -384,14 +384,14 @@ public:
ScDocument* pNewUndoDoc,
SCCOLROW nNewCnt, SCCOLROW* pNewRanges,
ScOutlineTable* pNewUndoTab,
- ScSizeMode eNewMode, USHORT nNewSizeTwips,
- BOOL bNewWidth );
+ ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips,
+ sal_Bool bNewWidth );
virtual ~ScUndoWidthOrHeight();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -405,8 +405,8 @@ private:
ScOutlineTable* pUndoTab;
SCCOLROW nRangeCnt;
SCCOLROW* pRanges;
- USHORT nNewSize;
- BOOL bWidth;
+ sal_uInt16 nNewSize;
+ sal_Bool bWidth;
ScSizeMode eMode;
SdrUndoAction* pDrawUndo;
};
@@ -422,13 +422,13 @@ public:
FillDir eNewFillDir,
FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd,
double fNewStartValue, double fNewStepValue, double fNewMaxValue,
- USHORT nMaxShIndex );
+ sal_uInt16 nMaxShIndex );
virtual ~ScUndoAutoFill();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -442,9 +442,9 @@ private:
double fStartValue;
double fStepValue;
double fMaxValue;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- USHORT nMaxSharedIndex;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_uInt16 nMaxSharedIndex;
void SetChangeTrack();
};
@@ -461,7 +461,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -482,21 +482,21 @@ public:
ScUndoAutoFormat( ScDocShell* pNewDocShell,
const ScRange& rRange, ScDocument* pNewUndoDoc,
const ScMarkData& rMark,
- BOOL bNewSize, USHORT nNewFormatNo );
+ sal_Bool bNewSize, sal_uInt16 nNewFormatNo );
virtual ~ScUndoAutoFormat();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScDocument* pUndoDoc; // geloeschte Daten
ScMarkData aMarkData;
- BOOL bSize;
- USHORT nFormatNo;
+ sal_Bool bSize;
+ sal_uInt16 nFormatNo;
};
@@ -514,7 +514,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -524,8 +524,8 @@ private:
String aUndoStr; // Daten bei Einfachmarkierung
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
SvxSearchItem* pSearchItem;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void SetChangeTrack();
};
@@ -543,13 +543,13 @@ public:
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMode );
+ sal_uInt8 nMode );
virtual ~ScUndoTabOp();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -560,7 +560,7 @@ private:
ScRefAddress theFormulaEnd;
ScRefAddress theRowCell;
ScRefAddress theColCell;
- BYTE nMode;
+ sal_uInt8 nMode;
};
@@ -579,7 +579,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -589,8 +589,8 @@ private:
ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
ScAddress aNewCursorPos;
ScDocument* pRedoDoc; // Blockmarkierung und neue Daten
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
ScConversionParam maConvParam; /// Conversion type and parameters.
void DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPos );
@@ -603,13 +603,13 @@ public:
TYPEINFO();
ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag);
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag);
virtual ~ScUndoRefConversion();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -618,10 +618,10 @@ private:
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
ScRange aRange;
- BOOL bMulti;
- USHORT nFlags;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_Bool bMulti;
+ sal_uInt16 nFlags;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void DoChange( ScDocument* pRefDoc);
void SetChangeTrack();
@@ -639,7 +639,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -664,7 +664,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -690,10 +690,10 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
private:
ScMarkData aMarkData;
@@ -701,7 +701,7 @@ private:
String aStyleName;
ScRange aRange;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
};
@@ -716,7 +716,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -739,7 +739,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -747,8 +747,8 @@ private:
ScDocument* pUndoDoc;
String aFormula;
formula::FormulaGrammar::AddressConvention eConv;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void SetChangeTrack();
};
@@ -762,13 +762,13 @@ public:
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefreshDelay );
+ sal_uLong nRefreshDelay );
virtual ~ScUndoInsertAreaLink();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -778,7 +778,7 @@ private:
String aOptions;
String aAreaName;
ScRange aRange;
- ULONG nRefreshDelay;
+ sal_uLong nRefreshDelay;
};
@@ -790,13 +790,13 @@ public:
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefreshDelay );
+ sal_uLong nRefreshDelay );
virtual ~ScUndoRemoveAreaLink();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -806,7 +806,7 @@ private:
String aOptions;
String aAreaName;
ScRange aRange;
- ULONG nRefreshDelay;
+ sal_uLong nRefreshDelay;
};
@@ -818,19 +818,19 @@ public:
const String& rOldD,
const String& rOldF, const String& rOldO,
const String& rOldA, const ScRange& rOldR,
- ULONG nOldRD,
+ sal_uLong nOldRD,
const String& rNewD,
const String& rNewF, const String& rNewO,
const String& rNewA, const ScRange& rNewR,
- ULONG nNewRD,
+ sal_uLong nNewRD,
ScDocument* pUndo, ScDocument* pRedo,
- BOOL bDoInsert );
+ sal_Bool bDoInsert );
virtual ~ScUndoUpdateAreaLink();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -847,11 +847,11 @@ private:
ScRange aNewRange;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- ULONG nOldRefresh;
- ULONG nNewRefresh;
- BOOL bWithInsert;
+ sal_uLong nOldRefresh;
+ sal_uLong nNewRefresh;
+ sal_Bool bWithInsert;
- void DoChange( const BOOL bUndo ) const;
+ void DoChange( const sal_Bool bUndo ) const;
};
@@ -860,20 +860,20 @@ class ScUndoIndent: public ScBlockUndo
public:
TYPEINFO();
ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, BOOL bIncrement );
+ ScDocument* pNewUndoDoc, sal_Bool bIncrement );
virtual ~ScUndoIndent();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
- BOOL bIsIncrement;
+ sal_Bool bIsIncrement;
};
@@ -888,7 +888,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -904,20 +904,20 @@ class ScUndoClearItems: public ScBlockUndo
public:
TYPEINFO();
ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, const USHORT* pW );
+ ScDocument* pNewUndoDoc, const sal_uInt16* pW );
virtual ~ScUndoClearItems();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
- USHORT* pWhich;
+ sal_uInt16* pWhich;
};
@@ -932,7 +932,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -954,7 +954,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -980,7 +980,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
index 0def8a3d67ba..2ab9ab1a9cfa 100644
--- a/sc/source/ui/inc/undocell.hxx
+++ b/sc/source/ui/inc/undocell.hxx
@@ -52,13 +52,13 @@ public:
ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, BOOL bAutomatic );
+ const ScPatternAttr* pApplyPat, sal_Bool bAutomatic );
virtual ~ScUndoCursorAttr();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -76,7 +76,7 @@ private:
ScPatternAttr* pApplyPattern;
::boost::shared_ptr<EditTextObject> pOldEditData;
::boost::shared_ptr<EditTextObject> pNewEditData;
- BOOL bIsAutomatic;
+ sal_Bool bIsAutomatic;
void DoChange( const ScPatternAttr* pWhichPattern, const ::boost::shared_ptr<EditTextObject>& pEditData ) const;
};
@@ -89,14 +89,14 @@ public:
ScUndoEnterData( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
SCTAB nNewCount, SCTAB* pNewTabs,
- ScBaseCell** ppOldData, BOOL* pHasForm, ULONG* pOldForm,
+ ScBaseCell** ppOldData, sal_Bool* pHasForm, sal_uLong* pOldForm,
const String& rNewStr, EditTextObject* pObj = NULL );
virtual ~ScUndoEnterData();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -104,10 +104,10 @@ private:
String aNewString;
SCTAB* pTabs;
ScBaseCell** ppOldCells;
- BOOL* pHasFormat;
- ULONG* pOldFormats;
+ sal_Bool* pHasFormat;
+ sal_uLong* pOldFormats;
EditTextObject* pNewEditData;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
@@ -124,13 +124,13 @@ public:
TYPEINFO();
ScUndoEnterValue( ScDocShell* pNewDocShell,
const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, double nVal, BOOL bHeight );
+ ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight );
virtual ~ScUndoEnterValue();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -138,8 +138,8 @@ private:
ScAddress aPos;
ScBaseCell* pOldCell;
double nValue;
- ULONG nEndChangeAction;
- BOOL bNeedHeight;
+ sal_uLong nEndChangeAction;
+ sal_Bool bNeedHeight;
void SetChangeTrack();
};
@@ -151,13 +151,13 @@ public:
TYPEINFO();
ScUndoPutCell( ScDocShell* pNewDocShell,
const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight );
+ ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight );
virtual ~ScUndoPutCell();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -165,8 +165,8 @@ private:
ScAddress aPos;
ScBaseCell* pOldCell;
ScBaseCell* pEnteredCell;
- ULONG nEndChangeAction;
- BOOL bNeedHeight;
+ sal_uLong nEndChangeAction;
+ sal_Bool bNeedHeight;
void SetChangeTrack();
};
@@ -178,13 +178,13 @@ public:
TYPEINFO();
ScUndoPageBreak( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
- BOOL bNewColumn, BOOL bNewInsert );
+ sal_Bool bNewColumn, sal_Bool bNewInsert );
virtual ~ScUndoPageBreak();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -192,10 +192,10 @@ private:
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
- BOOL bColumn; // Spalten- oder Zeilenumbruch
- BOOL bInsert; // Einfuegen oder Loeschen
+ sal_Bool bColumn; // Spalten- oder Zeilenumbruch
+ sal_Bool bInsert; // Einfuegen oder Loeschen
- void DoChange( BOOL bInsert ) const;
+ void DoChange( sal_Bool bInsert ) const;
};
class ScUndoPrintZoom: public ScSimpleUndo
@@ -203,24 +203,24 @@ class ScUndoPrintZoom: public ScSimpleUndo
public:
TYPEINFO();
ScUndoPrintZoom( ScDocShell* pNewDocShell, SCTAB nT,
- USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP );
+ sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP );
virtual ~ScUndoPrintZoom();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
- USHORT nOldScale;
- USHORT nOldPages;
- USHORT nNewScale;
- USHORT nNewPages;
+ sal_uInt16 nOldScale;
+ sal_uInt16 nOldPages;
+ sal_uInt16 nNewScale;
+ sal_uInt16 nNewPages;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
};
class ScUndoThesaurus: public ScSimpleUndo
@@ -236,7 +236,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -248,9 +248,9 @@ private:
EditTextObject* pUndoTObject; // bei EditZelle
String aRedoStr;
EditTextObject* pRedoTObject;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
- void DoChange( BOOL bUndo, const String& rStr,
+ void DoChange( sal_Bool bUndo, const String& rStr,
const EditTextObject* pTObj );
void SetChangeTrack( ScBaseCell* pOldCell );
};
@@ -284,7 +284,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat( SfxRepeatTarget& rTarget );
- virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const;
virtual String GetComment() const;
@@ -312,7 +312,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat( SfxRepeatTarget& rTarget );
- virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const;
virtual String GetComment() const;
@@ -335,14 +335,14 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
- BOOL bIsDelete;
+ sal_Bool bIsDelete;
ScDetOpList* pOldList;
- USHORT nAction;
+ sal_uInt16 nAction;
ScAddress aPos;
SdrUndoAction* pDrawUndo;
};
@@ -359,7 +359,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -367,7 +367,7 @@ private:
ScRangeName* pOldRanges;
ScRangeName* pNewRanges;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
};
diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
index 05e4b9eff433..2aebb30a0cc5 100644
--- a/sc/source/ui/inc/undodat.hxx
+++ b/sc/source/ui/inc/undodat.hxx
@@ -54,14 +54,14 @@ public:
TYPEINFO();
ScUndoDoOutline( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
- ScDocument* pNewUndoDoc, BOOL bNewColumns,
- USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow );
+ ScDocument* pNewUndoDoc, sal_Bool bNewColumns,
+ sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow );
virtual ~ScUndoDoOutline();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -70,10 +70,10 @@ private:
SCCOLROW nEnd;
SCTAB nTab;
ScDocument* pUndoDoc;
- BOOL bColumns;
- USHORT nLevel;
- USHORT nEntry;
- BOOL bShow;
+ sal_Bool bColumns;
+ sal_uInt16 nLevel;
+ sal_uInt16 nEntry;
+ sal_Bool bShow;
};
@@ -85,13 +85,13 @@ public:
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, BOOL bNewMake );
+ sal_Bool bNewColumns, sal_Bool bNewMake );
virtual ~ScUndoMakeOutline();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -99,8 +99,8 @@ private:
ScAddress aBlockStart;
ScAddress aBlockEnd;
ScOutlineTable* pUndoTable;
- BOOL bColumns;
- BOOL bMake;
+ sal_Bool bColumns;
+ sal_Bool bMake;
};
@@ -111,13 +111,13 @@ public:
ScUndoOutlineLevel( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, USHORT nNewLevel );
+ sal_Bool bNewColumns, sal_uInt16 nNewLevel );
virtual ~ScUndoOutlineLevel();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -127,8 +127,8 @@ private:
SCTAB nTab;
ScDocument* pUndoDoc;
ScOutlineTable* pUndoTable;
- BOOL bColumns;
- USHORT nLevel;
+ sal_Bool bColumns;
+ sal_uInt16 nLevel;
};
@@ -140,13 +140,13 @@ public:
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewShow );
+ sal_Bool bNewShow );
virtual ~ScUndoOutlineBlock();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -155,7 +155,7 @@ private:
ScAddress aBlockEnd;
ScDocument* pUndoDoc;
ScOutlineTable* pUndoTable;
- BOOL bShow;
+ sal_Bool bShow;
};
@@ -172,7 +172,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -197,7 +197,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -223,7 +223,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -245,24 +245,24 @@ public:
TYPEINFO();
ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab,
const ScSortParam& rParam,
- BOOL bQuery, ScDocument* pNewUndoDoc,
+ sal_Bool bQuery, ScDocument* pNewUndoDoc,
ScDBCollection* pNewUndoDB, const ScRange* pDest = NULL );
virtual ~ScUndoSort();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
ScSortParam aSortParam;
- BOOL bRepeatQuery;
+ sal_Bool bRepeatQuery;
ScDocument* pUndoDoc;
ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich
- BOOL bDestArea;
+ sal_Bool bDestArea;
ScRange aDestRange;
};
@@ -274,13 +274,13 @@ public:
ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab,
const ScQueryParam& rParam, ScDocument* pNewUndoDoc,
ScDBCollection* pNewUndoDB, const ScRange* pOld,
- BOOL bSize, const ScRange* pAdvSrc );
+ sal_Bool bSize, const ScRange* pAdvSrc );
virtual ~ScUndoQuery();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -292,9 +292,9 @@ private:
ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich
ScRange aOldDest;
ScRange aAdvSource;
- BOOL bIsAdvanced;
- BOOL bDestArea;
- BOOL bDoSize;
+ sal_Bool bIsAdvanced;
+ sal_Bool bDestArea;
+ sal_Bool bDoSize;
};
@@ -302,20 +302,20 @@ class ScUndoAutoFilter: public ScDBFuncUndo
{
private:
String aDBName;
- BOOL bFilterSet;
+ sal_Bool bFilterSet;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
public:
TYPEINFO();
ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
- const String& rName, BOOL bSet );
+ const String& rName, sal_Bool bSet );
virtual ~ScUndoAutoFilter();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
};
@@ -332,7 +332,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -356,7 +356,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -370,7 +370,7 @@ private:
ScDBData* pUndoDBData;
ScDBData* pRedoDBData;
SCCOL nFormulaCols;
- BOOL bRedoFilled;
+ sal_Bool bRedoFilled;
};
@@ -389,7 +389,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -404,7 +404,7 @@ private:
ScDBCollection* pUndoDB;
ScRange aOldQuery;
ScRange aNewQuery;
- BOOL bQuerySize;
+ sal_Bool bQuerySize;
};
@@ -415,13 +415,13 @@ public:
ScUndoDataPilot( ScDocShell* pNewDocShell,
ScDocument* pOldDoc, ScDocument* pNewDoc,
const ScDPObject* pOldObj, const ScDPObject* pNewObj,
- BOOL bMove );
+ sal_Bool bMove );
virtual ~ScUndoDataPilot();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -430,7 +430,7 @@ private:
ScDocument* pNewUndoDoc;
ScDPObject* pOldDPObject;
ScDPObject* pNewDPObject;
- BOOL bAllowMove;
+ sal_Bool bAllowMove;
};
@@ -440,7 +440,7 @@ public:
TYPEINFO();
ScUndoConsolidate( ScDocShell* pNewDocShell,
const ScArea& rArea, const ScConsolidateParam& rPar,
- ScDocument* pNewUndoDoc, BOOL bReference,
+ ScDocument* pNewUndoDoc, sal_Bool bReference,
SCROW nInsCount, ScOutlineTable* pTab,
ScDBData* pData );
virtual ~ScUndoConsolidate();
@@ -448,7 +448,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -456,7 +456,7 @@ private:
ScArea aDestArea;
ScDocument* pUndoDoc;
ScConsolidateParam aParam;
- BOOL bInsRef;
+ sal_Bool bInsRef;
SCSIZE nInsertCount;
ScOutlineTable* pUndoTab;
ScDBData* pUndoData;
@@ -469,29 +469,29 @@ public:
TYPEINFO();
ScUndoChartData( ScDocShell* pNewDocShell,
const String& rName, const ScRange& rNew,
- BOOL bColHdr, BOOL bRowHdr, BOOL bAdd );
+ sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd );
ScUndoChartData( ScDocShell* pNewDocShell,
const String& rName, const ScRangeListRef& rNew,
- BOOL bColHdr, BOOL bRowHdr, BOOL bAdd );
+ sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd );
virtual ~ScUndoChartData();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
String aChartName;
ScRangeListRef aOldRangeListRef;
- BOOL bOldColHeaders;
- BOOL bOldRowHeaders;
+ sal_Bool bOldColHeaders;
+ sal_Bool bOldRowHeaders;
// ScRange aNewRange;
ScRangeListRef aNewRangeListRef;
- BOOL bNewColHeaders;
- BOOL bNewRowHeaders;
- BOOL bAddRange;
+ sal_Bool bNewColHeaders;
+ sal_Bool bNewRowHeaders;
+ sal_Bool bAddRange;
void Init();
};
@@ -506,16 +506,16 @@ public:
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
- BOOL bRedoIsFilled = TRUE
+ sal_Bool bRedoIsFilled = true
);
virtual ~ScUndoDataForm();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -523,14 +523,14 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScRefUndoData* pRefUndoData;
ScRefUndoData* pRefRedoData;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
- BOOL bRedoFilled;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
+ sal_Bool bRedoFilled;
- void DoChange( const BOOL bUndo );
+ void DoChange( const sal_Bool bUndo );
void SetChangeTrack();
};
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
index 565766e3bccb..f8f633a2dc7c 100644
--- a/sc/source/ui/inc/undodraw.hxx
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -46,16 +46,16 @@ public:
SfxUndoAction* GetDrawUndo() { return pDrawUndo; }
void ForgetDrawUndo();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked );
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
virtual String GetComment() const;
virtual String GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
};
diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx
index 132c0c1ac70c..9d34785ea1af 100644
--- a/sc/source/ui/inc/undoolk.hxx
+++ b/sc/source/ui/inc/undoolk.hxx
@@ -38,7 +38,7 @@ SdrUndoAction* GetSdrUndoAction ( ScDocument* pDoc );
void DoSdrUndoAction ( SdrUndoAction* pUndoAction, ScDocument* pDoc );
void RedoSdrUndoAction ( SdrUndoAction* pUndoAction );
void DeleteSdrUndoAction ( SdrUndoAction* pUndoAction );
-void EnableDrawAdjust ( ScDocument* pDoc, BOOL bEnable );
+void EnableDrawAdjust ( ScDocument* pDoc, sal_Bool bEnable );
diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx
index 9e3b3ed9f87e..f5069ab031b0 100644
--- a/sc/source/ui/inc/undostyl.hxx
+++ b/sc/source/ui/inc/undostyl.hxx
@@ -79,7 +79,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
};
@@ -96,7 +96,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 3306925fc5d7..0c6bec3782af 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -65,23 +65,23 @@ public:
ScUndoInsertTab(
ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
const String& rNewName);
virtual ~ScUndoInsertTab();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
String sNewName;
SdrUndoAction* pDrawUndo;
- ULONG nEndChangeAction;
+ sal_uLong nEndChangeAction;
SCTAB nTab;
- BOOL bAppend;
+ sal_Bool bAppend;
void SetChangeTrack();
};
@@ -93,14 +93,14 @@ public:
ScUndoInsertTables(
ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
SvStrings *pNewNameList);
virtual ~ScUndoInsertTables();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -108,10 +108,10 @@ private:
SdrUndoAction* pDrawUndo;
SvStrings* pNameList;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
SCTAB nTab;
- BOOL bAppend;
+ sal_Bool bAppend;
void SetChangeTrack();
};
@@ -131,14 +131,14 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
std::vector<SCTAB> theTabs;
- ULONG nStartChangeAction;
- ULONG nEndChangeAction;
+ sal_uLong nStartChangeAction;
+ sal_uLong nEndChangeAction;
void SetChangeTrack();
};
@@ -158,7 +158,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -187,7 +187,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -197,7 +197,7 @@ private:
::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpOldNames;
::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpNewNames;
- void DoChange( BOOL bUndo ) const;
+ void DoChange( sal_Bool bUndo ) const;
};
@@ -216,7 +216,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -246,7 +246,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -265,14 +265,14 @@ public:
ScDocShell* pNewDocShell,
SCTAB nSrc, SCTAB nDest,
const String& rN, const String& rC,
- const Color& rCol, USHORT nF,
+ const Color& rCol, sal_uInt16 nF,
const ScMarkData& rMark );
virtual ~ScUndoMakeScenario();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -282,7 +282,7 @@ private:
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
ScMarkData aMarkData;
SdrUndoAction* pDrawUndo;
};
@@ -295,20 +295,20 @@ public:
ScUndoImportTab(
ScDocShell* pShell,
SCTAB nNewTab, SCTAB nNewCount,
- BOOL bNewLink );
+ sal_Bool bNewLink );
virtual ~ScUndoImportTab();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
SCTAB nCount;
- BOOL bLink;
+ sal_Bool bLink;
ScDocument* pRedoDoc;
SdrUndoAction* pDrawUndo;
@@ -328,7 +328,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -336,13 +336,13 @@ private:
String aDocName;
String aFltName;
String aOptions;
- ULONG nRefreshDelay;
- USHORT nCount;
+ sal_uLong nRefreshDelay;
+ sal_uInt16 nCount;
SCTAB* pTabs;
- BYTE* pModes;
+ sal_uInt8* pModes;
String* pTabNames;
- void DoChange( BOOL bLink ) const;
+ void DoChange( sal_Bool bLink ) const;
};
@@ -352,21 +352,21 @@ public:
TYPEINFO();
ScUndoShowHideTab(
ScDocShell* pShell,
- SCTAB nNewTab, BOOL bNewShow );
+ SCTAB nNewTab, sal_Bool bNewShow );
virtual ~ScUndoShowHideTab();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
- BOOL bShow;
+ sal_Bool bShow;
- void DoChange( BOOL bShow ) const;
+ void DoChange( sal_Bool bShow ) const;
};
// ============================================================================
@@ -382,7 +382,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -406,7 +406,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -429,7 +429,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -438,7 +438,7 @@ private:
ScPrintRangeSaver* pOldRanges;
ScPrintRangeSaver* pNewRanges;
- void DoChange( BOOL bUndo );
+ void DoChange( sal_Bool bUndo );
};
@@ -451,14 +451,14 @@ public:
const String& rON, const String& rNN,
const String& rOC, const String& rNC,
const Color& rOCol, const Color& rNCol,
- USHORT nOF, USHORT nNF );
+ sal_uInt16 nOF, sal_uInt16 nNF );
virtual ~ScUndoScenarioFlags();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -470,8 +470,8 @@ private:
String aNewComment;
Color aOldColor;
Color aNewColor;
- USHORT nOldFlags;
- USHORT nNewFlags;
+ sal_uInt16 nOldFlags;
+ sal_uInt16 nNewFlags;
};
@@ -488,7 +488,7 @@ public:
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
@@ -505,21 +505,21 @@ class ScUndoLayoutRTL : public ScSimpleUndo
{
public:
TYPEINFO();
- ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL );
+ ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL );
virtual ~ScUndoLayoutRTL();
virtual void Undo();
virtual void Redo();
virtual void Repeat(SfxRepeatTarget& rTarget);
- virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const;
virtual String GetComment() const;
private:
SCTAB nTab;
- BOOL bRTL;
+ sal_Bool bRTL;
- void DoChange( BOOL bNew );
+ void DoChange( sal_Bool bNew );
};
#endif
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 050c54a00121..0ad2ac9c6df2 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -108,9 +108,9 @@ public:
inline ScTabViewShell * GetTabViewShell();
bool SetupRefDlg();
- bool RemoveRefDlg( BOOL bRestoreModal = TRUE );
+ bool RemoveRefDlg( sal_Bool bRestoreModal = sal_True );
- virtual void SetModal( BOOL bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); }
+ virtual void SetModal( sal_Bool bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); }
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc )
{
@@ -129,7 +129,7 @@ public:
DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" );
if ( IsInExecute() )
- EndDialog( FALSE );
+ EndDialog( false );
else if ( GetStyle() & WB_CLOSEABLE )
Close();
}
@@ -149,7 +149,7 @@ public:
(m_pHandler->*m_pRefInputStartPostHdl)( pEdit, pButton );
}
- virtual void RefInputDone( BOOL bForced = FALSE )
+ virtual void RefInputDone( sal_Bool bForced = false )
{
if( !CanInputDone( bForced ) )
return;
@@ -164,11 +164,11 @@ public:
(m_pHandler->*m_pRefInputDonePostHdl)();
}
- BOOL IsChildFocus();
+ sal_Bool IsChildFocus();
enum { SLOTID = SID_VALIDITY_REFERENCE };
- BOOL Close();
+ sal_Bool Close();
};
@@ -182,9 +182,9 @@ public:
virtual ~ScTPValidationValue();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rArgSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rArgSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rArgSet );
virtual void Reset( const SfxItemSet& rArgSet );
private:
@@ -240,7 +240,7 @@ private:
void TidyListBoxes();
public:
- USHORT GetAllowEntryPos();
+ sal_uInt16 GetAllowEntryPos();
String GetMinText();
void SetupRefDlg();
void RemoveRefDlg();
@@ -271,8 +271,8 @@ public:
~ScTPValidationHelp();
static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
@@ -304,8 +304,8 @@ public:
~ScTPValidationError();
static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
- static USHORT* GetRanges ();
- virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ static sal_uInt16* GetRanges ();
+ virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet );
virtual void Reset ( const SfxItemSet& rArgSet );
};
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index f2e47ee9aeb1..83a15fc79b60 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -149,7 +149,7 @@ private:
bool bShowGrid; // per-sheet show grid-lines option.
- BOOL bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten
+ sal_Bool bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten
ScViewDataTable();
~ScViewDataTable();
@@ -220,14 +220,14 @@ private:
ScPasteFlags nPasteFlags;
ScSplitPos eEditActivePart; // the part that was active when edit mode was started
- BOOL bEditActive[4]; // aktiv?
- BOOL bActive; // aktives Fenster ?
- BOOL bIsRefMode; // Referenzeingabe
- BOOL bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL
- BYTE nFillMode; // Modus
- BOOL bPagebreak; // Seitenumbruch-Vorschaumodus
+ sal_Bool bEditActive[4]; // aktiv?
+ sal_Bool bActive; // aktives Fenster ?
+ sal_Bool bIsRefMode; // Referenzeingabe
+ sal_Bool bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL
+ sal_uInt8 nFillMode; // Modus
+ sal_Bool bPagebreak; // Seitenumbruch-Vorschaumodus
- BOOL bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click
+ sal_Bool bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click
SC_DLLPRIVATE DECL_LINK (EmptyEditHdl, EditStatus*);
SC_DLLPRIVATE DECL_LINK (EditEngineHdl, EditStatus*);
@@ -258,9 +258,9 @@ public:
Window* GetDialogParent(); // von tabvwsh weitergeleitet
Window* GetActiveWin(); // von View
ScDrawView* GetScDrawView(); // von View
- BOOL IsMinimized(); // von View
+ sal_Bool IsMinimized(); // von View
- void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE );
+ void UpdateInputHandler( sal_Bool bForce = false, sal_Bool bStopEditing = sal_True );
void WriteUserData(String& rData);
void ReadUserData(const String& rData);
@@ -271,8 +271,8 @@ public:
ScDocument* GetDocument() const;
- BOOL IsActive() const { return bActive; }
- void Activate(BOOL bActivate) { bActive = bActivate; }
+ sal_Bool IsActive() const { return bActive; }
+ void Activate(sal_Bool bActivate) { bActive = bActivate; }
void UpdateThis();
@@ -290,7 +290,7 @@ public:
SCROW GetPosY( ScVSplitPos eWhich ) const { return pThisTab->nPosY[eWhich]; }
SCCOL GetCurX() const { return pThisTab->nCurX; }
SCROW GetCurY() const { return pThisTab->nCurY; }
- BOOL HasOldCursor() const { return pThisTab->bOldCurValid; }
+ sal_Bool HasOldCursor() const { return pThisTab->bOldCurValid; }
SCCOL GetOldCurX() const;
SCROW GetOldCurY() const;
ScSplitMode GetHSplitMode() const { return pThisTab->eHSplitMode; }
@@ -299,7 +299,7 @@ public:
long GetVSplitPos() const { return pThisTab->nVSplitPos; }
SCCOL GetFixPosX() const { return pThisTab->nFixPosX; }
SCROW GetFixPosY() const { return pThisTab->nFixPosY; }
- BOOL IsPagebreakMode() const { return bPagebreak; }
+ sal_Bool IsPagebreakMode() const { return bPagebreak; }
bool IsPasteMode() const { return nPasteFlags & SC_PASTE_MODE; }
bool ShowPasteSource() const { return nPasteFlags & SC_PASTE_BORDER; }
@@ -315,16 +315,16 @@ public:
void SetVSplitPos( long nPos ) { pThisTab->nVSplitPos = nPos; }
void SetFixPosX( SCCOL nPos ) { pThisTab->nFixPosX = nPos; }
void SetFixPosY( SCROW nPos ) { pThisTab->nFixPosY = nPos; }
- void SetPagebreakMode( BOOL bSet );
+ void SetPagebreakMode( sal_Bool bSet );
void SetPasteMode ( ScPasteFlags nFlags ) { nPasteFlags = nFlags; }
- void SetZoomType( SvxZoomType eNew, BOOL bAll );
+ void SetZoomType( SvxZoomType eNew, sal_Bool bAll );
void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs );
void SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs );
- void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll );
void RefreshZoom();
- void SetSelCtrlMouseClick( BOOL bTmp ) { bSelCtrlMouseClick = bTmp; }
+ void SetSelCtrlMouseClick( sal_Bool bTmp ) { bSelCtrlMouseClick = bTmp; }
SvxZoomType GetZoomType() const { return pThisTab->eZoomType; }
const Fraction& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
@@ -349,31 +349,31 @@ public:
ScMarkType GetSimpleArea( ScRange & rRange, ScMarkData & rNewMark ) const;
void GetMultiArea( ScRangeListRef& rRange ) const;
- BOOL SimpleColMarked();
- BOOL SimpleRowMarked();
+ sal_Bool SimpleColMarked();
+ sal_Bool SimpleRowMarked();
- BOOL IsMultiMarked();
+ sal_Bool IsMultiMarked();
void SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
void SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- BYTE nMode );
+ sal_uInt8 nMode );
void GetFillData( SCCOL& rStartCol, SCROW& rStartRow,
SCCOL& rEndCol, SCROW& rEndRow );
void ResetFillMode();
- BOOL IsAnyFillMode() { return nFillMode != SC_FILL_NONE; }
- BOOL IsFillMode() { return nFillMode == SC_FILL_FILL; }
- BYTE GetFillMode() { return nFillMode; }
+ sal_Bool IsAnyFillMode() { return nFillMode != SC_FILL_NONE; }
+ sal_Bool IsFillMode() { return nFillMode == SC_FILL_FILL; }
+ sal_uInt8 GetFillMode() { return nFillMode; }
// TRUE: Zelle ist zusammengefasst
- BOOL GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix );
- BOOL GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+ sal_Bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix );
+ sal_Bool GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
SCsCOL& rPosX, SCsROW& rPosY,
- BOOL bTestMerge = TRUE, BOOL bRepair = FALSE,
- BOOL bNextIfLarge = TRUE );
+ sal_Bool bTestMerge = sal_True, sal_Bool bRepair = false,
+ sal_Bool bNextIfLarge = sal_True );
void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
- SCsCOL nPosX, SCsROW nPosY, BOOL& rLeft, BOOL& rTop );
+ SCsCOL nPosX, SCsROW nPosY, sal_Bool& rLeft, sal_Bool& rTop );
- BOOL IsRefMode() const { return bIsRefMode; }
+ sal_Bool IsRefMode() const { return bIsRefMode; }
ScRefType GetRefType() const { return eRefType; }
SCCOL GetRefStartX() const { return nRefStartX; }
SCROW GetRefStartY() const { return nRefStartY; }
@@ -382,7 +382,7 @@ public:
SCROW GetRefEndY() const { return nRefEndY; }
SCTAB GetRefEndZ() const { return nRefEndZ; }
- void SetRefMode( BOOL bNewMode, ScRefType eNewType )
+ void SetRefMode( sal_Bool bNewMode, ScRefType eNewType )
{ bIsRefMode = bNewMode; eRefType = eNewType; }
void SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
@@ -390,11 +390,11 @@ public:
void SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
{ nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = nNewZ; }
- void ResetDelMark() { bDelMarkValid = FALSE; }
+ void ResetDelMark() { bDelMarkValid = false; }
void SetDelMark( const ScRange& rRange )
- { aDelRange = rRange; bDelMarkValid = TRUE; }
+ { aDelRange = rRange; bDelMarkValid = sal_True; }
- BOOL GetDelMark( ScRange& rRange ) const
+ sal_Bool GetDelMark( ScRange& rRange ) const
{ rRange = aDelRange; return bDelMarkValid; }
inline void GetMoveCursor( SCCOL& rCurX, SCROW& rCurY );
@@ -402,20 +402,20 @@ public:
const ScViewOptions& GetOptions() const { return *pOptions; }
void SetOptions( const ScViewOptions& rOpt );
- BOOL IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); }
- void SetGridMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); }
- BOOL IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); }
- void SetSyntaxMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); }
- BOOL IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); }
- void SetHeaderMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); }
- BOOL IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); }
- void SetTabMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); }
- BOOL IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); }
- void SetVScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); }
- BOOL IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); }
- void SetHScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); }
- BOOL IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); }
- void SetOutlineMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); }
+ sal_Bool IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); }
+ void SetGridMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); }
+ sal_Bool IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); }
+ void SetSyntaxMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); }
+ sal_Bool IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); }
+ void SetHeaderMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); }
+ sal_Bool IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); }
+ void SetTabMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); }
+ sal_Bool IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); }
+ void SetVScrollMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); }
+ sal_Bool IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); }
+ void SetHScrollMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); }
+ sal_Bool IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); }
+ void SetOutlineMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); }
void KillEditView();
void ResetEditView();
@@ -423,13 +423,13 @@ public:
ScEditEngineDefaulter* pNewEngine,
Window* pWin, SCCOL nNewX, SCROW nNewY );
void GetEditView( ScSplitPos eWhich, EditView*& rViewPtr, SCCOL& rCol, SCROW& rRow );
- BOOL HasEditView( ScSplitPos eWhich ) const
+ sal_Bool HasEditView( ScSplitPos eWhich ) const
{ return pEditView[eWhich] && bEditActive[eWhich]; }
EditView* GetEditView( ScSplitPos eWhich ) const
{ return pEditView[eWhich]; }
void EditGrowX();
- void EditGrowY( BOOL bInitial = FALSE );
+ void EditGrowY( sal_Bool bInitial = false );
ScSplitPos GetEditActivePart() const { return eEditActivePart; }
SCCOL GetEditViewCol() const { return nEditCol; }
@@ -440,25 +440,25 @@ public:
SCROW GetEditEndRow() const { return nEditEndRow; }
Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, Window* pWin,
- const ScPatternAttr* pPattern, BOOL bForceToTop );
+ const ScPatternAttr* pPattern, sal_Bool bForceToTop );
void SetTabNo( SCTAB nNewTab );
void SetActivePart( ScSplitPos eNewActive );
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
- BOOL bAllowNeg = FALSE ) const;
+ sal_Bool bAllowNeg = false ) const;
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const;
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const;
- SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeY = SC_SIZE_NONE ) const;
- SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeX = SC_SIZE_NONE ) const;
+ SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY = SC_SIZE_NONE ) const;
+ SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX = SC_SIZE_NONE ) const;
SCCOL VisibleCellsX( ScHSplitPos eWhichX ) const; // angezeigte komplette Zellen
SCROW VisibleCellsY( ScVSplitPos eWhichY ) const;
SCCOL PrevCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der vorgehenden Seite
SCROW PrevCellsY( ScVSplitPos eWhichY ) const;
- BOOL IsOle();
+ sal_Bool IsOle();
void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
void SetScreen( const Rectangle& rVisArea );
void SetScreenPos( const Point& rVisAreaStart );
@@ -478,8 +478,8 @@ public:
Point GetMousePosPixel();
- BOOL UpdateFixX(SCTAB nTab = MAXTAB+1);
- BOOL UpdateFixY(SCTAB nTab = MAXTAB+1);
+ sal_Bool UpdateFixX(SCTAB nTab = MAXTAB+1);
+ sal_Bool UpdateFixY(SCTAB nTab = MAXTAB+1);
SCCOL GetTabStartCol() const { return nTabStartCol; }
void SetTabStartCol(SCCOL nNew) { nTabStartCol = nNew; }
@@ -489,9 +489,9 @@ public:
const Size& GetScenButSize() const { return aScenButSize; }
void SetScenButSize(const Size& rNew) { aScenButSize = rNew; }
- BOOL IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
+ sal_Bool IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
- static inline long ToPixel( USHORT nTwips, double nFactor );
+ static inline long ToPixel( sal_uInt16 nTwips, double nFactor );
/** while (rScrY <= nEndPixels && rPosY <= nEndRow) add pixels of row
heights converted with nPPTY to rScrY, optimized for row height
@@ -515,7 +515,7 @@ public:
// ---------------------------------------------------------------------------
-inline long ScViewData::ToPixel( USHORT nTwips, double nFactor )
+inline long ScViewData::ToPixel( sal_uInt16 nTwips, double nFactor )
{
long nRet = (long)( nTwips * nFactor );
if ( !nRet && nTwips )
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 5aa485eb874e..9306cb8c3ad3 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -49,6 +49,7 @@ class SfxItemSet;
class SvxBorderLine;
class SvxBoxItem;
class SvxBoxInfoItem;
+class SfxStyleSheetBase;
class SfxStyleSheet;
class SfxPoolItem;
class EditTextObject;
@@ -75,7 +76,7 @@ class ScViewFunc : public ScTabView
private:
ScAddress aFormatSource; // fuer automatisches Erweitern von Formatierung
ScRange aFormatArea;
- BOOL bFormatValid;
+ sal_Bool bFormatValid;
public:
ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
@@ -85,192 +86,192 @@ public:
void GetSelectionFrame ( SvxBoxItem& rLineOuter,
SvxBoxInfoItem& rLineInner );
- BYTE GetSelectionScriptType();
+ sal_uInt8 GetSelectionScriptType();
- BOOL GetAutoSumArea(ScRangeList& rRangeList);
+ sal_Bool GetAutoSumArea(ScRangeList& rRangeList);
void EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr);
bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue );
String GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
- BOOL bRecord = TRUE, const EditTextObject* pData = NULL );
+ sal_Bool bRecord = sal_True, const EditTextObject* pData = NULL );
void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData,
- BOOL bRecord = TRUE, BOOL bTestSimple = FALSE );
+ sal_Bool bRecord = sal_True, sal_Bool bTestSimple = false );
void EnterMatrix( const String& rString );
void EnterBlock( const String& rString, const EditTextObject* pData );
void EnterDataAtCursor( const String& rString ); //! nicht benutzt ?
- SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, BOOL bIncludeObjects = FALSE );
- SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc = NULL, BOOL bCut = FALSE, BOOL bApi = FALSE,
- BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
- SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL bCut = FALSE,
- BOOL bApi = FALSE, BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
+ SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, sal_Bool bIncludeObjects = false );
+ SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc = NULL, sal_Bool bCut = false, sal_Bool bApi = false,
+ sal_Bool bIncludeObjects = false, sal_Bool bStopEdit = true );
+ SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, sal_Bool bCut = false,
+ sal_Bool bApi = false, sal_Bool bIncludeObjects = false, sal_Bool bStopEdit = true );
ScTransferObj* CopyToTransferable();
- SC_DLLPUBLIC BOOL PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
- USHORT nFunction = PASTE_NOFUNC, BOOL bSkipEmpty = FALSE,
- BOOL bTranspose = FALSE, BOOL bAsLink = FALSE,
+ SC_DLLPUBLIC sal_Bool PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
+ sal_uInt16 nFunction = PASTE_NOFUNC, sal_Bool bSkipEmpty = false,
+ sal_Bool bTranspose = false, sal_Bool bAsLink = false,
InsCellCmd eMoveMode = INS_NONE,
- USHORT nUndoExtraFlags = IDF_NONE,
- BOOL bAllowDialogs = FALSE );
+ sal_uInt16 nUndoExtraFlags = IDF_NONE,
+ sal_Bool bAllowDialogs = false );
- void FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink );
+ void FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink );
SC_DLLPUBLIC void PasteFromSystem();
- SC_DLLPUBLIC BOOL PasteFromSystem( ULONG nFormatId, BOOL bApi = FALSE );
+ SC_DLLPUBLIC sal_Bool PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi = false );
void PasteFromTransferable( const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable );
void PasteDraw();
void PasteDraw( const Point& rLogicPos, SdrModel* pModel,
- BOOL bGroup = FALSE, BOOL bSameDocClipboard = FALSE );
+ sal_Bool bGroup = false, sal_Bool bSameDocClipboard = false );
- BOOL PasteOnDrawObject( const ::com::sun::star::uno::Reference<
+ sal_Bool PasteOnDrawObject( const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
- SdrObject* pHitObj, BOOL bLink );
+ SdrObject* pHitObj, sal_Bool bLink );
- BOOL PasteDataFormat( ULONG nFormatId,
+ sal_Bool PasteDataFormat( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL,
- BOOL bLink = FALSE, BOOL bAllowDialogs = FALSE );
+ sal_Bool bLink = false, sal_Bool bAllowDialogs = false );
- BOOL PasteFile( const Point&, const String&, BOOL bLink=FALSE );
- BOOL PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT );
- BOOL PasteBitmap( const Point&, const Bitmap& );
- BOOL PasteMetaFile( const Point&, const GDIMetaFile& );
- BOOL PasteGraphic( const Point& rPos, const Graphic& rGraphic,
+ sal_Bool PasteFile( const Point&, const String&, sal_Bool bLink=false );
+ sal_Bool PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT );
+ sal_Bool PasteBitmap( const Point&, const Bitmap& );
+ sal_Bool PasteMetaFile( const Point&, const GDIMetaFile& );
+ sal_Bool PasteGraphic( const Point& rPos, const Graphic& rGraphic,
const String& rFile, const String& rFilter );
- BOOL PasteBookmark( ULONG nFormatId,
+ sal_Bool PasteBookmark( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY );
- BOOL PasteDDE( const ::com::sun::star::uno::Reference<
+ sal_Bool PasteDDE( const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable );
- BOOL ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic );
+ sal_Bool ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic );
void InsertBookmark( const String& rDescription, const String& rURL,
SCCOL nPosX, SCROW nPosY, const String* pTarget = NULL,
- BOOL bTryReplace = FALSE );
- BOOL HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
+ sal_Bool bTryReplace = false );
+ sal_Bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
long DropRequestHdl( Exchange* pExchange );
- BOOL MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi );
+ sal_Bool MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi );
- BOOL LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi );
+ sal_Bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi );
- void CreateNames( USHORT nFlags );
- USHORT GetCreateNameFlags();
+ void CreateNames( sal_uInt16 nFlags );
+ sal_uInt16 GetCreateNameFlags();
void InsertNameList();
- BOOL InsertName( const String& rName, const String& rSymbol,
+ sal_Bool InsertName( const String& rName, const String& rSymbol,
const String& rType );
void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet,
- BOOL bRecord = TRUE );
+ sal_Bool bRecord = sal_True );
void ApplyAttr( const SfxPoolItem& rAttrItem );
void ApplySelectionPattern( const ScPatternAttr& rAttr,
- BOOL bRecord = TRUE,
- BOOL bCursorOnly = FALSE );
+ sal_Bool bRecord = sal_True,
+ sal_Bool bCursorOnly = false );
void ApplyPatternLines( const ScPatternAttr& rAttr,
const SvxBoxItem* pNewOuter,
- const SvxBoxInfoItem* pNewInner, BOOL bRecord = TRUE );
+ const SvxBoxInfoItem* pNewInner, sal_Bool bRecord = sal_True );
void ApplyUserItemSet( const SfxItemSet& rItemSet );
const SfxStyleSheet* GetStyleSheetFromMarked();
void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet,
- BOOL bRecord = TRUE );
- void RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet );
- void UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet );
+ sal_Bool bRecord = sal_True );
+ void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
+ void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
- void SetNumberFormat( short nFormatType, ULONG nAdd = 0 );
+ void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 );
void SetNumFmtByStr( const String& rCode );
- void ChangeNumFmtDecimals( BOOL bIncrement );
+ void ChangeNumFmtDecimals( sal_Bool bIncrement );
void SetConditionalFormat( const ScConditionalFormat& rNew );
void SetValidation( const ScValidationData& rNew );
- void ChangeIndent( BOOL bIncrement );
+ void ChangeIndent( sal_Bool bIncrement );
void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
void Protect( SCTAB nTab, const String& rPassword );
- BOOL Unprotect( SCTAB nTab, const String& rPassword );
+ sal_Bool Unprotect( SCTAB nTab, const String& rPassword );
- void DeleteCells( DelCellCmd eCmd, BOOL bRecord = TRUE );
- BOOL InsertCells( InsCellCmd eCmd, BOOL bRecord = TRUE, BOOL bPartOfPaste = FALSE );
- void DeleteMulti( BOOL bRows, BOOL bRecord = TRUE );
+ void DeleteCells( DelCellCmd eCmd, sal_Bool bRecord = sal_True );
+ sal_Bool InsertCells( InsCellCmd eCmd, sal_Bool bRecord = sal_True, sal_Bool bPartOfPaste = false );
+ void DeleteMulti( sal_Bool bRows, sal_Bool bRecord = sal_True );
- void DeleteContents( USHORT nFlags, BOOL bRecord = TRUE );
+ void DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord = sal_True );
- void SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
- ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE,
+ void SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True,
ScMarkData* pMarkData = NULL );
- void SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord = TRUE, BOOL bPaint = TRUE );
- void ShowMarkedColumns( BOOL bShow, BOOL bRecord = TRUE );
- void ShowMarkedRows( BOOL bShow, BOOL bRecord = TRUE );
+ void SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True );
+ void ShowMarkedColumns( sal_Bool bShow, sal_Bool bRecord = sal_True );
+ void ShowMarkedRows( sal_Bool bShow, sal_Bool bRecord = sal_True );
- BOOL AdjustBlockHeight( BOOL bPaint = TRUE, ScMarkData* pMarkData = NULL );
- BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint = TRUE );
+ sal_Bool AdjustBlockHeight( sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL );
+ sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint = sal_True );
- void ModifyCellSize( ScDirection eDir, BOOL bOptimal );
+ void ModifyCellSize( ScDirection eDir, sal_Bool bOptimal );
- SC_DLLPUBLIC void InsertPageBreak( BOOL bColumn, BOOL bRecord = TRUE,
+ SC_DLLPUBLIC void InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True,
const ScAddress* pPos = NULL,
- BOOL bSetModified = TRUE );
- SC_DLLPUBLIC void DeletePageBreak( BOOL bColumn, BOOL bRecord = TRUE,
+ sal_Bool bSetModified = sal_True );
+ SC_DLLPUBLIC void DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True,
const ScAddress* pPos = NULL,
- BOOL bSetModified = TRUE );
+ sal_Bool bSetModified = sal_True );
void RemoveManualBreaks();
- void SetPrintZoom(USHORT nScale, USHORT nPages);
+ void SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages);
void AdjustPrintZoom();
- BOOL TestMergeCells();
- BOOL TestRemoveMerge();
+ sal_Bool TestMergeCells();
+ sal_Bool TestRemoveMerge();
- BOOL MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord = TRUE, BOOL bCenter = FALSE );
- BOOL RemoveMerge( BOOL bRecord = TRUE );
+ sal_Bool MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord = true, sal_Bool bCenter = false );
+ sal_Bool RemoveMerge( sal_Bool bRecord = true );
- void FillSimple( FillDir eDir, BOOL bRecord = TRUE );
+ void FillSimple( FillDir eDir, sal_Bool bRecord = sal_True );
void FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
- double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
+ double fStart, double fStep, double fMax, sal_Bool bRecord = sal_True );
void FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord = TRUE );
+ SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord = sal_True );
void FillCrossDblClick();
void TransliterateText( sal_Int32 nType );
ScAutoFormatData* CreateAutoFormatData();
- void AutoFormat( USHORT nFormatNo, BOOL bRecord = TRUE );
+ void AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord = sal_True );
void SearchAndReplace( const SvxSearchItem* pSearchItem,
- BOOL bAddUndo, BOOL bIsApi );
+ sal_Bool bAddUndo, sal_Bool bIsApi );
void Solve( const ScSolveParam& rParam );
- void TabOp( const ScTabOpParam& rParam, BOOL bRecord = TRUE );
+ void TabOp( const ScTabOpParam& rParam, sal_Bool bRecord = sal_True );
- BOOL InsertTable( const String& rName, SCTAB nTabNr, BOOL bRecord = TRUE );
- BOOL InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, BOOL bRecord = TRUE);
+ sal_Bool InsertTable( const String& rName, SCTAB nTabNr, sal_Bool bRecord = sal_True );
+ sal_Bool InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, sal_Bool bRecord = sal_True);
- BOOL AppendTable( const String& rName, BOOL bRecord = TRUE );
+ sal_Bool AppendTable( const String& rName, sal_Bool bRecord = sal_True );
- BOOL DeleteTable( SCTAB nTabNr, BOOL bRecord = TRUE );
- BOOL DeleteTables(const std::vector<SCTAB>& TheTabs, BOOL bRecord = TRUE );
+ sal_Bool DeleteTable( SCTAB nTabNr, sal_Bool bRecord = true );
+ sal_Bool DeleteTables(const std::vector<SCTAB>& TheTabs, sal_Bool bRecord = true );
- BOOL RenameTable( const String& rName, SCTAB nTabNr );
- void MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName = NULL );
+ sal_Bool RenameTable( const String& rName, SCTAB nTabNr );
+ void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName = NULL );
void ImportTables( ScDocShell* pSrcShell,
SCTAB nCount, const SCTAB* pSrcTabs,
- BOOL bLink,SCTAB nTab);
+ sal_Bool bLink,SCTAB nTab);
bool SetTabBgColor( const Color& rColor, SCTAB nTabNr );
bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList );
@@ -280,13 +281,13 @@ public:
const String& rTabName );
void InsertAreaLink( const String& rFile,
const String& rFilter, const String& rOptions,
- const String& rSource, ULONG nRefresh );
+ const String& rSource, sal_uLong nRefresh );
void ShowTable( const String& rName );
void HideTable( SCTAB nTabNr );
void MakeScenario( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags );
+ const Color& rColor, sal_uInt16 nFlags );
void ExtendScenario();
void UseScenario( const String& rName );
@@ -298,22 +299,22 @@ public:
void InsertDraw();
void SetSelectionFrameLines( const SvxBorderLine* pLine,
- BOOL bColorOnly );
+ sal_Bool bColorOnly );
void SetNoteText( const ScAddress& rPos, const String& rNoteText );
void ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate );
- void DoRefConversion( BOOL bRecord = TRUE );
+ void DoRefConversion( sal_Bool bRecord = sal_True );
- void DoHangulHanjaConversion( BOOL bRecord = TRUE );
- void DoThesaurus( BOOL bRecord = TRUE );
+ void DoHangulHanjaConversion( sal_Bool bRecord = true );
+ void DoThesaurus( sal_Bool bRecord = true );
/** Generic implementation of sheet conversion functions. */
- void DoSheetConversion( const ScConversionParam& rParam, BOOL bRecord = TRUE );
+ void DoSheetConversion( const ScConversionParam& rParam, sal_Bool bRecord = sal_True );
- void SetPrintRanges( BOOL bEntireSheet,
+ void SetPrintRanges( sal_Bool bEntireSheet,
const String* pPrint,
const String* pRepCol, const String* pRepRow,
- BOOL bAddPrint );
+ sal_Bool bAddPrint );
void DetectiveAddPred();
void DetectiveDelPred();
@@ -332,8 +333,8 @@ public:
inline void HideNote() { ShowNote( false ); }
void EditNote();
- void ForgetFormatArea() { bFormatValid = FALSE; }
- BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL );
+ void ForgetFormatArea() { bFormatValid = false; }
+ sal_Bool SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix = NULL );
// Amelia Wang
SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow ,
@@ -347,7 +348,7 @@ protected:
void UpdateLineAttrs( SvxBorderLine& rLine,
const SvxBorderLine* pDestLine,
const SvxBorderLine* pSrcLine,
- BOOL bColor );
+ sal_Bool bColor );
private:
@@ -359,12 +360,12 @@ private:
InsCellCmd eMoveMode, sal_uInt16 nCondFlags, sal_uInt16 nUndoFlags );
void PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& rMark);
- USHORT GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula );
+ sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula );
void StartFormatArea();
- BOOL TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged );
+ sal_Bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged );
void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
- BOOL bAttrChanged, BOOL bAddUndo );
+ sal_Bool bAttrChanged, sal_Bool bAddUndo );
void MarkAndJumpToRanges(const ScRangeList& rRanges);
};
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 20f61b334a5c..d01faeae35ff 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -53,21 +53,21 @@ enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS };
class ScViewUtil // static Methoden
{
public:
- static BOOL ExecuteCharMap( const SvxFontItem& rOldFont,
+ static sal_Bool ExecuteCharMap( const SvxFontItem& rOldFont,
SfxViewFrame& rFrame,
SvxFontItem& rNewFont,
String& rString );
- static BOOL IsActionShown( const ScChangeAction& rAction,
+ static sal_Bool IsActionShown( const ScChangeAction& rAction,
const ScChangeViewSettings& rSettings,
ScDocument& rDocument );
static void PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
- USHORT nWhichId, USHORT nScript );
+ sal_uInt16 nWhichId, sal_uInt16 nScript );
- static USHORT GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos );
+ static sal_uInt16 GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos );
- static sal_Int32 GetTransliterationType( USHORT nSlotID );
+ static sal_Int32 GetTransliterationType( sal_uInt16 nSlotID );
static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc );
/** Fit a range to cover nRows number of unfiltered rows.
@@ -75,7 +75,7 @@ public:
static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows );
static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc );
- static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId );
+ static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId );
/** Returns true, if the passed view shell is in full screen mode. */
static bool IsFullScreen( SfxViewShell& rViewShell );
@@ -103,7 +103,7 @@ private:
public:
ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
- BOOL GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+ sal_Bool GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
};
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 61bcfeb4b045..ac3596d72e28 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -61,7 +61,7 @@
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute();
-inline void EnableDisable( Window& rWin, BOOL bEnable )
+inline void EnableDisable( Window& rWin, sal_Bool bEnable )
{
if (bEnable)
rWin.Enable();
@@ -82,9 +82,9 @@ ScRedlinData::ScRedlinData()
nInfo=RD_SPECIAL_NONE;
nActionNo=0;
pData=NULL;
- bDisabled=FALSE;
- bIsRejectable=FALSE;
- bIsAcceptable=FALSE;
+ bDisabled=false;
+ bIsRejectable=false;
+ bIsAcceptable=false;
nTable=SCTAB_MAX;
nCol=SCCOL_MAX;
nRow=SCROW_MAX;
@@ -95,9 +95,9 @@ ScRedlinData::~ScRedlinData()
nInfo=RD_SPECIAL_NONE;
nActionNo=0;
pData=NULL;
- bDisabled=FALSE;
- bIsRejectable=FALSE;
- bIsAcceptable=FALSE;
+ bDisabled=false;
+ bIsRejectable=false;
+ bIsAcceptable=false;
}
//============================================================================
@@ -129,15 +129,15 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
aStrEmpty ( ScResId( STR_EMPTY ))
{
FreeResource();
- bNoSelection=FALSE;
- bNeedsUpdate=FALSE;
- bIgnoreMsg=FALSE;
+ bNoSelection=false;
+ bNeedsUpdate=false;
+ bIgnoreMsg=false;
nAcceptCount=0;
nRejectCount=0;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
- bHasFilterEntry=FALSE;
- bUseColor=FALSE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
+ bHasFilterEntry=false;
+ bUseColor=false;
aReOpenTimer.SetTimeout(50);
aReOpenTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl ));
@@ -158,14 +158,14 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
pTPFilter->SetReadyHdl(LINK( this, ScAcceptChgDlg, FilterHandle ));
pTPFilter->SetRefHdl(LINK( this, ScAcceptChgDlg, RefHandle ));
pTPFilter->SetModifyHdl(LINK( this, ScAcceptChgDlg, FilterModified));
- pTPFilter->HideRange(FALSE);
+ pTPFilter->HideRange(false);
pTPView->InsertCalcHeader();
pTPView->SetRejectClickHdl( LINK( this, ScAcceptChgDlg,RejectHandle));
pTPView->SetAcceptClickHdl( LINK(this, ScAcceptChgDlg, AcceptHandle));
pTPView->SetRejectAllClickHdl( LINK( this, ScAcceptChgDlg,RejectAllHandle));
pTPView->SetAcceptAllClickHdl( LINK(this, ScAcceptChgDlg, AcceptAllHandle));
pTheView->SetCalcView();
- pTheView->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ pTheView->SetStyle(pTheView->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
pTheView->SetExpandingHdl( LINK(this, ScAcceptChgDlg, ExpandingHandle));
pTheView->SetSelectHdl( LINK(this, ScAcceptChgDlg, SelectHandle));
pTheView->SetDeselectHdl( LINK(this, ScAcceptChgDlg, SelectHandle));
@@ -205,13 +205,13 @@ void ScAcceptChgDlg::ReInit(ScViewData* ptrViewData)
else
pDoc=NULL;
- bNoSelection=FALSE;
- bNeedsUpdate=FALSE;
- bIgnoreMsg=FALSE;
+ bNoSelection=false;
+ bNeedsUpdate=false;
+ bIgnoreMsg=false;
nAcceptCount=0;
nRejectCount=0;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
// don't call Init here (switching between views), just set link below
// (dialog is just hidden, not deleted anymore, when switching views)
@@ -241,7 +241,7 @@ void ScAcceptChgDlg::Init()
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
pTPFilter->ClearAuthors();
ScStrCollection aUserColl=pChanges->GetUserCollection();
- for(USHORT i=0;i<aUserColl.GetCount();i++)
+ for(sal_uInt16 i=0;i<aUserColl.GetCount();i++)
pTPFilter->InsertAuthor(aUserColl[i]->GetString());
}
@@ -256,7 +256,7 @@ void ScAcceptChgDlg::Init()
pTPFilter->SetFirstTime(aChangeViewSet.GetTheFirstDateTime());
pTPFilter->SetLastDate(aChangeViewSet.GetTheLastDateTime());
pTPFilter->SetLastTime(aChangeViewSet.GetTheLastDateTime());
- pTPFilter->SetDateMode((USHORT)aChangeViewSet.GetTheDateMode());
+ pTPFilter->SetDateMode((sal_uInt16)aChangeViewSet.GetTheDateMode());
pTPFilter->CheckComment(aChangeViewSet.HasComment());
pTPFilter->SetComment(aChangeViewSet.GetTheComment());
@@ -297,10 +297,10 @@ void ScAcceptChgDlg::ClearView()
{
nAcceptCount=0;
nRejectCount=0;
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
pTheView->Clear();
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
}
String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType)
@@ -325,11 +325,11 @@ String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType)
}
-BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
+sal_Bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
{
- if(pScChangeAction==NULL) return FALSE;
+ if(pScChangeAction==NULL) return false;
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -345,7 +345,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
if(eType==SC_CAT_CONTENT)
{
if(!pScChangeAction->IsDialogParent())
- pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
+ pScChangeAction->GetDescription( aDesc, pDoc, true);
}
else
pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
@@ -365,13 +365,13 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
{
ScRange* pRangeEntry = aRangeList[ i ];
if (pRangeEntry->Intersects(aRef)) {
- bFlag = TRUE;
+ bFlag = true;
break;
}
}
}
else
- bFlag=TRUE;
+ bFlag=true;
}
return bFlag;
@@ -379,7 +379,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeAction,
ScChangeActionState /* eState */, SvLBoxEntry* pParent,
- BOOL bDelMaster,BOOL bDisabled,ULONG nPos)
+ sal_Bool bDelMaster,sal_Bool bDisabled,sal_uLong nPos)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
@@ -387,7 +387,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
SvLBoxEntry* pEntry=NULL;
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -415,13 +415,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
{
aString=aStrContentWithChild;
pNewData->nInfo=RD_SPECIAL_VISCONTENT;
- pNewData->bIsRejectable=FALSE;
- pNewData->bIsAcceptable=FALSE;
+ pNewData->bIsRejectable=false;
+ pNewData->bIsAcceptable=false;
}
else
{
aString=*MakeTypeString(eType);
- pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
+ pScChangeAction->GetDescription( aDesc, pDoc, sal_True);
}
}
else
@@ -430,9 +430,9 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
if(bDelMaster)
{
- pScChangeAction->GetDescription( aDesc, pDoc,TRUE);
- pNewData->bDisabled=TRUE;
- pNewData->bIsRejectable=FALSE;
+ pScChangeAction->GetDescription( aDesc, pDoc,sal_True);
+ pNewData->bDisabled=sal_True;
+ pNewData->bIsRejectable=false;
}
else
pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
@@ -440,11 +440,11 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
}
aString+='\t';
- pScChangeAction->GetRefString(aRefStr, pDoc, TRUE);
+ pScChangeAction->GetRefString(aRefStr, pDoc, sal_True);
aString+=aRefStr;
aString+='\t';
- BOOL bIsGenerated;
+ sal_Bool bIsGenerated;
if(!pChanges->IsGenerated(pScChangeAction->GetActionNumber()))
{
@@ -455,13 +455,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
aString+=' ';
aString+=ScGlobal::pLocaleData->getTime(aDateTime);
aString+='\t';
- bIsGenerated=FALSE;
+ bIsGenerated=false;
}
else
{
aString+='\t';
aString+='\t';
- bIsGenerated=TRUE;
+ bIsGenerated=sal_True;
}
String aComment=pScChangeAction->GetComment();
@@ -486,16 +486,16 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
ScRange* pRangeEntry = aRangeList[ i ];
if( pRangeEntry->Intersects(aRef) )
{
- bHasFilterEntry=TRUE;
- bFlag=TRUE;
+ bHasFilterEntry=true;
+ bFlag=true;
break;
}
}
}
else if(!bIsGenerated)
{
- bHasFilterEntry=TRUE;
- bFlag=TRUE;
+ bHasFilterEntry=sal_True;
+ bFlag=sal_True;
}
}
}
@@ -525,18 +525,18 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA
SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChangeAction,
ScChangeActionState eState,SvLBoxEntry* pParent,
- BOOL bDelMaster,BOOL bDisabled,ULONG nPos)
+ sal_Bool bDelMaster,sal_Bool bDisabled,sal_uLong nPos)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pScChangeAction==NULL || pChanges==NULL) return NULL;
- BOOL bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
+ sal_Bool bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
SvLBoxEntry* pEntry=NULL;
- int bFlag=FALSE;
+ int bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -552,13 +552,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
if( pRangeEntry->Intersects(aRef) )
{
if( pScChangeAction->GetState()==eState )
- bFlag=TRUE;
+ bFlag=true;
break;
}
}
}
else if(pScChangeAction->GetState()==eState && !bIsGenerated)
- bFlag=TRUE;
+ bFlag=true;
}
if(bFlag)
@@ -587,13 +587,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
{
aString=aStrContentWithChild;
pNewData->nInfo=RD_SPECIAL_VISCONTENT;
- pNewData->bIsRejectable=FALSE;
- pNewData->bIsAcceptable=FALSE;
+ pNewData->bIsRejectable=false;
+ pNewData->bIsAcceptable=false;
}
else
{
aString=*MakeTypeString(eType);
- pScChangeAction->GetDescription( aDesc, pDoc, TRUE);
+ pScChangeAction->GetDescription( aDesc, pDoc, sal_True);
}
}
else
@@ -602,9 +602,9 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
if(bDelMaster)
{
- pScChangeAction->GetDescription( aDesc, pDoc,TRUE);
- pNewData->bDisabled=TRUE;
- pNewData->bIsRejectable=FALSE;
+ pScChangeAction->GetDescription( aDesc, pDoc,sal_True);
+ pNewData->bDisabled=sal_True;
+ pNewData->bIsRejectable=false;
}
else
pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete());
@@ -612,7 +612,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
}
aString+='\t';
- pScChangeAction->GetRefString(aRefStr, pDoc, TRUE);
+ pScChangeAction->GetRefString(aRefStr, pDoc, sal_True);
aString+=aRefStr;
aString+='\t';
@@ -651,16 +651,16 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang
}
SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
- SvLBoxEntry* pParent, ULONG nSpecial)
+ SvLBoxEntry* pParent, sal_uLong nSpecial)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
SvLBoxEntry* pEntry=NULL;
if(pScChangeAction==NULL || pChanges==NULL) return NULL;
- BOOL bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
+ sal_Bool bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber());
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
ScRange aRef=pScChangeAction->GetBigRange().MakeRange();
String aUser=pScChangeAction->GetUser();
@@ -675,13 +675,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
ScRange* pRangeEntry = aRangeList[ i ];
if( pRangeEntry->Intersects(aRef) )
{
- bFlag=TRUE;
+ bFlag=true;
break;
}
}
}
else if(!bIsGenerated)
- bFlag=TRUE;
+ bFlag=sal_True;
}
String aRefStr;
@@ -722,7 +722,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
aDesc+=a2String;
aString+='\t';
- pScChangeAction->GetRefString(aRefStr, pDoc, TRUE);
+ pScChangeAction->GetRefString(aRefStr, pDoc, sal_True);
aString+=aRefStr;
aString+='\t';
@@ -758,7 +758,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
pNewData->pData=(void *)pScChangeAction;
pNewData->nActionNo=pScChangeAction->GetActionNumber();
pNewData->bIsAcceptable=pScChangeAction->IsClickable();
- pNewData->bIsRejectable=FALSE;
+ pNewData->bIsRejectable=false;
pNewData->bDisabled=!pNewData->bIsAcceptable;
pNewData->aDateTime=aDateTime;
pNewData->nRow = aRef.aStart.Row();
@@ -767,7 +767,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
if(pTheView->IsValidComment(&aComment) && bFlag)
{
- bHasFilterEntry=TRUE;
+ bHasFilterEntry=sal_True;
pEntry=pTheView->InsertEntry(aString,pNewData,pParent);
}
else
@@ -781,7 +781,7 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt )
{
ClearView();
UpdateView();
- bNoSelection=FALSE;
+ bNoSelection=false;
}
return SfxModelessDialog::PreNotify(rNEvt);
@@ -790,16 +790,16 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt )
void ScAcceptChgDlg::UpdateView()
{
- bNeedsUpdate=FALSE;
+ bNeedsUpdate=false;
DateTime aDateTime;
SvLBoxEntry* pParent=NULL;
ScChangeTrack* pChanges=NULL;
const ScChangeAction* pScChangeAction=NULL;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
SetPointer(Pointer(POINTER_WAIT));
- pTheView->SetUpdateMode(FALSE);
- BOOL bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
+ pTheView->SetUpdateMode(false);
+ sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
pTPFilter->IsAuthor()||pTPFilter->IsComment();
bUseColor=bFilterFlag;
@@ -811,11 +811,11 @@ void ScAcceptChgDlg::UpdateView()
pScChangeAction=pChanges->GetFirst();
}
ScChangeActionTable ActionTable;
- BOOL bTheFlag=FALSE;
+ sal_Bool bTheFlag=false;
while(pScChangeAction!=NULL)
{
- bHasFilterEntry=FALSE;
+ bHasFilterEntry=false;
switch(pScChangeAction->GetState())
{
case SC_CAS_VIRGIN:
@@ -830,7 +830,7 @@ void ScAcceptChgDlg::UpdateView()
else
pParent=NULL;
- bTheFlag=TRUE;
+ bTheFlag=sal_True;
break;
case SC_CAS_ACCEPTED:
@@ -847,11 +847,11 @@ void ScAcceptChgDlg::UpdateView()
if(pParent!=NULL && pScChangeAction->IsDialogParent())
{
if(!bFilterFlag)
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(true);
else
{
- BOOL bTestFlag=bHasFilterEntry;
- bHasFilterEntry=FALSE;
+ sal_Bool bTestFlag=bHasFilterEntry;
+ bHasFilterEntry=false;
if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag)
pTheView->RemoveEntry(pParent);
}
@@ -861,7 +861,7 @@ void ScAcceptChgDlg::UpdateView()
}
if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) )
- bTheFlag=FALSE;
+ bTheFlag=false;
pTPView->EnableAccept(bTheFlag);
pTPView->EnableAcceptAll(bTheFlag);
@@ -873,16 +873,16 @@ void ScAcceptChgDlg::UpdateView()
pParent=pTheView->InsertEntry(
aStrAllAccepted, static_cast< RedlinData * >(NULL),
static_cast< SvLBoxEntry * >(NULL));
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(sal_True);
}
if(nRejectCount>0)
{
pParent=pTheView->InsertEntry(
aStrAllRejected, static_cast< RedlinData * >(NULL),
static_cast< SvLBoxEntry * >(NULL));
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(sal_True);
}
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
SetPointer(Pointer(POINTER_ARROW));
SvLBoxEntry* pEntry=pTheView->First();
if(pEntry!=NULL)
@@ -890,7 +890,7 @@ void ScAcceptChgDlg::UpdateView()
}
//----------------------------------------------------------------------------
-BOOL ScAcceptChgDlg::Close()
+sal_Bool ScAcceptChgDlg::Close()
{
return SfxModelessDialog::Close();
}
@@ -912,22 +912,22 @@ IMPL_LINK( ScAcceptChgDlg, MinSizeHandle, SvxAcceptChgCtr*, pCtr )
IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG )
{
- USHORT nId =ScSimpleRefDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId =ScSimpleRefDlgWrapper::GetChildWindowId();
- ScSimpleRefDlgWrapper::SetDefaultPosSize(GetPosPixel(),GetSizePixel(),TRUE);
+ ScSimpleRefDlgWrapper::SetDefaultPosSize(GetPosPixel(),GetSizePixel(),sal_True);
- SC_MOD()->SetRefDialog( nId, TRUE );
+ SC_MOD()->SetRefDialog( nId, sal_True );
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
ScSimpleRefDlgWrapper* pWnd =(ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId );
if(pWnd!=NULL)
{
- USHORT nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->ShowChildWindow(nAcceptId,FALSE);
+ sal_uInt16 nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId();
+ pViewFrm->ShowChildWindow(nAcceptId,false);
pWnd->SetCloseHdl(LINK( this, ScAcceptChgDlg,RefInfoHandle));
pWnd->SetRefString(pTPFilter->GetRange());
- pWnd->SetAutoReOpen(FALSE);
+ pWnd->SetAutoReOpen(false);
Window* pWin=pWnd->GetWindow();
pWin->SetPosSizePixel(GetPosPixel(),GetSizePixel());
Hide();
@@ -939,9 +939,9 @@ IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG )
IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult)
{
- USHORT nId;
+ sal_uInt16 nId;
- ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE);
+ ScSimpleRefDlgWrapper::SetAutoReOpen(true);
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
if(pResult!=NULL)
@@ -961,12 +961,12 @@ IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult)
Invalidate();
}
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->ShowChildWindow( nId, TRUE );
+ pViewFrm->ShowChildWindow( nId, sal_True );
}
else
{
nId = ScAcceptChgDlgWrapper::GetChildWindowId();
- pViewFrm->SetChildWindow( nId, FALSE );
+ pViewFrm->SetChildWindow( nId, false );
}
return 0;
}
@@ -987,7 +987,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef )
{
SetPointer(Pointer(POINTER_WAIT));
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pRef!=NULL)
@@ -1018,7 +1018,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef )
}
SetPointer(Pointer(POINTER_ARROW));
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
return 0;
}
IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
@@ -1026,7 +1026,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
SetPointer(Pointer(POINTER_WAIT));
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
if(pRef!=NULL)
{
SvLBoxEntry* pEntry=pTheView->FirstSelected();
@@ -1040,7 +1040,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
if(pScChangeAction->GetType()==SC_CAT_CONTENT)
{
if(pEntryData->nInfo==RD_SPECIAL_CONTENT)
- pChanges->SelectContent(pScChangeAction,TRUE);
+ pChanges->SelectContent(pScChangeAction,true);
else
pChanges->SelectContent(pScChangeAction);
}
@@ -1056,7 +1056,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef )
ClearView();
UpdateView();
}
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
return 0;
}
@@ -1103,7 +1103,7 @@ void ScAcceptChgDlg::AcceptFiltered()
IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG )
{
SetPointer(Pointer(POINTER_WAIT));
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pChanges!=NULL)
{
@@ -1124,7 +1124,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG )
}
SetPointer(Pointer(POINTER_ARROW));
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
return 0;
}
@@ -1133,7 +1133,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG )
{
SetPointer(Pointer(POINTER_WAIT));
- bIgnoreMsg=TRUE;
+ bIgnoreMsg=sal_True;
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
if(pChanges!=NULL)
{
@@ -1149,7 +1149,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG )
ClearView();
UpdateView();
}
- bIgnoreMsg=FALSE;
+ bIgnoreMsg=false;
SetPointer(Pointer(POINTER_ARROW));
return 0;
@@ -1160,7 +1160,7 @@ IMPL_LINK( ScAcceptChgDlg, SelectHandle, SvxRedlinTable*, EMPTYARG )
if(!bNoSelection)
aSelectionTimer.Start();
- bNoSelection=FALSE;
+ bNoSelection=false;
return 0;
}
@@ -1188,12 +1188,12 @@ void ScAcceptChgDlg::GetDependents( const ScChangeAction* pScChangeAction,
aActionTable,pScChangeAction->IsMasterDelete());
}
-BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
+sal_Bool ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
{
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
ScRedlinData *pEntryData=(ScRedlinData *)(pParent->GetUserData());
const ScChangeAction* pScChangeAction = (ScChangeAction*) pEntryData->pData;
- BOOL bParentInserted = FALSE;
+ sal_Bool bParentInserted = false;
// If the parent is a MatrixOrigin then place it in the right order before
// the MatrixReferences. Also if it is the first content change at this
// position don't insert the first dependent MatrixReference as the special
@@ -1204,7 +1204,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
{
pActionTable->Insert( pScChangeAction->GetActionNumber(),
(ScChangeAction*) pScChangeAction );
- bParentInserted = TRUE;
+ bParentInserted = sal_True;
}
SvLBoxEntry* pEntry=NULL;
@@ -1216,18 +1216,18 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
pCChild=(const ScChangeActionContent*)pActionTable->Next();
}
- if(pCChild==NULL) return TRUE;
+ if(pCChild==NULL) return sal_True;
SvLBoxEntry* pOriginal=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_CONTENT);
if(pOriginal!=NULL)
{
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
ScRedlinData *pParentData=(ScRedlinData *)(pOriginal->GetUserData());
pParentData->pData=(void *)pScChangeAction;
pParentData->nActionNo=pScChangeAction->GetActionNumber();
pParentData->bIsAcceptable=pScChangeAction->IsRejectable(); // select old value
- pParentData->bIsRejectable=FALSE;
- pParentData->bDisabled=FALSE;
+ pParentData->bIsRejectable=false;
+ pParentData->bDisabled=false;
}
while(pCChild!=NULL)
{
@@ -1236,7 +1236,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
pEntry=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_NONE);
if(pEntry!=NULL)
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
}
pCChild=(const ScChangeActionContent*)pActionTable->Next();
}
@@ -1248,13 +1248,13 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
if(pEntry!=NULL)
{
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
ScRedlinData *pParentData=(ScRedlinData *)(pEntry->GetUserData());
pParentData->pData=(void *)pScChangeAction;
pParentData->nActionNo=pScChangeAction->GetActionNumber();
pParentData->bIsAcceptable=pScChangeAction->IsClickable();
- pParentData->bIsRejectable=FALSE;
- pParentData->bDisabled=FALSE;
+ pParentData->bIsRejectable=false;
+ pParentData->bDisabled=false;
}
}
@@ -1262,10 +1262,10 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo
}
-BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent)
+sal_Bool ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
ScChangeActionState eState = SC_CAS_VIRGIN;
String aString=pTheView->GetEntryText( pParent);
@@ -1284,30 +1284,30 @@ BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent)
{
if(pScChangeAction->GetState()==eState &&
InsertFilteredAction(pScChangeAction,eState,pParent)!=NULL)
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
pScChangeAction=pScChangeAction->GetNext();
}
return bTheTestFlag;
}
-BOOL ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
+sal_Bool ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
SvLBoxEntry* pEntry=NULL;
const ScChangeAction* pChild=(const ScChangeAction*)pActionTable->First();
while(pChild!=NULL)
{
- pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,FALSE,TRUE);
+ pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,false,sal_True);
if(pEntry!=NULL)
{
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData());
- pEntryData->bIsRejectable=FALSE;
- pEntryData->bIsAcceptable=FALSE;
- pEntryData->bDisabled=TRUE;
+ pEntryData->bIsRejectable=false;
+ pEntryData->bIsAcceptable=false;
+ pEntryData->bDisabled=sal_True;
if(pChild->IsDialogParent())
Expand(pChanges,pChild,pEntry);
@@ -1316,11 +1316,11 @@ BOOL ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry*
}
return bTheTestFlag;
}
-BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
+sal_Bool ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
ScChangeActionTable* pActionTable,SvLBoxEntry* pParent)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
SvLBoxEntry* pEntry=NULL;
ScChangeActionTable aDelActionTable;
const ScChangeAction* pChild=(const ScChangeAction*)pActionTable->First();
@@ -1329,18 +1329,18 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
{
if(pScChangeAction!=pChild)
- pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,FALSE,TRUE);
+ pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,false,sal_True);
else
- pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,TRUE,TRUE);
+ pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,sal_True,sal_True);
if(pEntry!=NULL)
{
ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData());
- pEntryData->bIsRejectable=FALSE;
- pEntryData->bIsAcceptable=FALSE;
- pEntryData->bDisabled=TRUE;
+ pEntryData->bIsRejectable=false;
+ pEntryData->bIsAcceptable=false;
+ pEntryData->bDisabled=sal_True;
- bTheTestFlag=FALSE;
+ bTheTestFlag=false;
if ( pChild->IsDialogParent() )
Expand(pChanges,pChild,pEntry);
@@ -1350,10 +1350,10 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction,
return bTheTestFlag;
}
-BOOL ScAcceptChgDlg::Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
- SvLBoxEntry* pEntry,BOOL bFilter)
+sal_Bool ScAcceptChgDlg::Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
+ SvLBoxEntry* pEntry,sal_Bool bFilter)
{
- BOOL bTheTestFlag=TRUE;
+ sal_Bool bTheTestFlag=sal_True;
if(pChanges!=NULL &&pEntry!=NULL &&pScChangeAction!=NULL)
{
@@ -1406,8 +1406,8 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable )
if(pEntry->HasChildsOnDemand())
{
- BOOL bTheTestFlag=TRUE;
- pEntry->EnableChildsOnDemand(FALSE);
+ sal_Bool bTheTestFlag=sal_True;
+ pEntry->EnableChildsOnDemand(false);
pTheView->RemoveEntry(pTheView->FirstChild(pEntry));
if(pEntryData!=NULL)
@@ -1449,32 +1449,32 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable )
}
}
SetPointer(Pointer(POINTER_ARROW));
- return (ULONG) TRUE;
+ return (sal_uLong) sal_True;
}
-void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
- ULONG nEndAction, ULONG /* nPos */)
+void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction,
+ sal_uLong nEndAction, sal_uLong /* nPos */)
{
if(pChanges!=NULL)
{
DateTime aDateTime;
SvLBoxEntry* pParent=NULL;
const ScChangeAction* pScChangeAction=NULL;
- bAcceptEnableFlag=TRUE;
- bRejectEnableFlag=TRUE;
+ bAcceptEnableFlag=sal_True;
+ bRejectEnableFlag=sal_True;
SetPointer(Pointer(POINTER_WAIT));
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
ScChangeActionTable ActionTable;
- BOOL bTheFlag=FALSE;
+ sal_Bool bTheFlag=false;
- BOOL bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
+ sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()||
pTPFilter->IsAuthor()||pTPFilter->IsComment();
bUseColor=bFilterFlag;
- for(ULONG i=nStartAction;i<=nEndAction;i++)
+ for(sal_uLong i=nStartAction;i<=nEndAction;i++)
{
pScChangeAction=pChanges->GetAction(i);
if(pScChangeAction==NULL) continue;
@@ -1494,7 +1494,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
else
pParent=NULL;
- bTheFlag=TRUE;
+ bTheFlag=sal_True;
break;
case SC_CAS_ACCEPTED:
@@ -1511,11 +1511,11 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
if(pParent!=NULL && pScChangeAction->IsDialogParent())
{
if(!bFilterFlag)
- pParent->EnableChildsOnDemand(TRUE);
+ pParent->EnableChildsOnDemand(true);
else
{
- BOOL bTestFlag=bHasFilterEntry;
- bHasFilterEntry=FALSE;
+ sal_Bool bTestFlag=bHasFilterEntry;
+ bHasFilterEntry=false;
if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag)
pTheView->RemoveEntry(pParent);
}
@@ -1525,22 +1525,22 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction,
}
if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) )
- bTheFlag=FALSE;
+ bTheFlag=false;
pTPView->EnableAccept(bTheFlag);
pTPView->EnableAcceptAll(bTheFlag);
pTPView->EnableReject(bTheFlag);
pTPView->EnableRejectAll(bTheFlag);
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
SetPointer(Pointer(POINTER_ARROW));
}
}
-void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction)
+void ScAcceptChgDlg::RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction)
{
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
SvLBoxEntry* pEntry=pTheView->GetCurEntry();
@@ -1549,26 +1549,26 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction)
if(pEntry!=NULL)
pEntryData=(ScRedlinData *)(pEntry->GetUserData());
- ULONG nAction=0;
+ sal_uLong nAction=0;
if(pEntryData!=NULL)
nAction=pEntryData->nActionNo;
if(nAction>=nStartAction && nAction<=nEndAction)
pTheView->SetCurEntry(pTheView->GetModel()->GetEntry(0));
- BOOL bRemove=FALSE;
+ sal_Bool bRemove=false;
// MUST do it backwards, don't delete parents before children and GPF
pEntry=pTheView->Last();
while(pEntry!=NULL)
{
- bRemove=FALSE;
+ bRemove=false;
pEntryData=(ScRedlinData *)(pEntry->GetUserData());
if(pEntryData!=NULL)
{
nAction=pEntryData->nActionNo;
- if(nStartAction<=nAction && nAction<=nEndAction) bRemove=TRUE;
+ if(nStartAction<=nAction && nAction<=nEndAction) bRemove=sal_True;
}
@@ -1579,33 +1579,33 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction)
pEntry=pPrevEntry;
}
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
}
-void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction)
+void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction)
{
- pTheView->SetUpdateMode(FALSE);
+ pTheView->SetUpdateMode(false);
- ULONG nPos=LIST_APPEND;
+ sal_uLong nPos=LIST_APPEND;
- BOOL bRemove=FALSE;
+ sal_Bool bRemove=false;
SvLBoxEntry* pEntry=pTheView->First();
SvLBoxEntry* pNextEntry = (pEntry ? pTheView->NextSibling(pEntry) : NULL);
SvLBoxEntry* pLastEntry=NULL;
while(pEntry!=NULL)
{
- bRemove=FALSE;
+ bRemove=false;
ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData());
if(pEntryData!=NULL)
{
ScChangeAction* pScChangeAction=
(ScChangeAction*) pEntryData->pData;
- ULONG nAction=pScChangeAction->GetActionNumber();
+ sal_uLong nAction=pScChangeAction->GetActionNumber();
- if(nStartAction<=nAction && nAction<=nEndAction) bRemove=TRUE;
+ if(nStartAction<=nAction && nAction<=nEndAction) bRemove=sal_True;
}
if(bRemove)
@@ -1641,7 +1641,7 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,U
else
AppendChanges(pChgTrack,nStartAction,nEndAction);
- pTheView->SetUpdateMode(TRUE);
+ pTheView->SetUpdateMode(sal_True);
}
@@ -1650,8 +1650,8 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
ScChangeTrackMsgQueue& aMsgQueue= pChgTrack->GetMsgQueue();
ScChangeTrackMsgInfo* pTrackInfo=aMsgQueue.Get();
- ULONG nStartAction;
- ULONG nEndAction;
+ sal_uLong nStartAction;
+ sal_uLong nEndAction;
while(pTrackInfo!=NULL)
{
@@ -1660,7 +1660,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
if(!bIgnoreMsg)
{
- bNoSelection=TRUE;
+ bNoSelection=sal_True;
switch(pTrackInfo->eMsgType)
{
@@ -1669,7 +1669,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
case SC_CTM_REMOVE: RemoveEntrys(nStartAction,nEndAction);
break;
case SC_CTM_PARENT:
- case SC_CTM_CHANGE: //bNeedsUpdate=TRUE;
+ case SC_CTM_CHANGE: //bNeedsUpdate=sal_True;
UpdateEntrys(pChgTrack,nStartAction,nEndAction);
break;
default:
@@ -1686,7 +1686,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
}
IMPL_LINK( ScAcceptChgDlg, ReOpenTimerHdl, Timer*, EMPTYARG )
{
- ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE);
+ ScSimpleRefDlgWrapper::SetAutoReOpen(sal_True);
aAcceptChgCtr.ShowFilterPage();
RefHandle(NULL);
@@ -1697,9 +1697,9 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
{
ScTabView* pTabView = pViewData->GetView();
- BOOL bAcceptFlag = TRUE;
- BOOL bRejectFlag = TRUE;
- BOOL bContMark = FALSE;
+ sal_Bool bAcceptFlag = sal_True;
+ sal_Bool bRejectFlag = sal_True;
+ sal_Bool bContMark = false;
pTabView->DoneBlockMode(); // clears old marking
SvLBoxEntry* pEntry = pTheView->FirstSelected();
@@ -1718,16 +1718,16 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
const ScBigRange& rBigRange = pScChangeAction->GetBigRange();
if( rBigRange.IsValid( pDoc ) && IsActive() )
{
- BOOL bSetCursor = !pTheView->NextSelected( pEntry );
+ sal_Bool bSetCursor = !pTheView->NextSelected( pEntry );
pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark );
- bContMark = TRUE;
+ bContMark = sal_True;
}
}
}
else
{
- bAcceptFlag = FALSE;
- bRejectFlag = FALSE;
+ bAcceptFlag = false;
+ bRejectFlag = false;
}
bAcceptEnableFlag = bAcceptFlag;
bRejectEnableFlag = bRejectFlag;
@@ -1736,7 +1736,7 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
}
ScChangeTrack* pChanges = pDoc->GetChangeTrack();
- BOOL bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected();
+ sal_Bool bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected();
pTPView->EnableAccept( bAcceptFlag && bEnable );
pTPView->EnableReject( bRejectFlag && bEnable );
@@ -1764,11 +1764,11 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
aPopup.Deactivate();
}
- USHORT nSortedCol= pTheView->GetSortedCol();
+ sal_uInt16 nSortedCol= pTheView->GetSortedCol();
if(nSortedCol!=0xFFFF)
{
- USHORT nItemId=nSortedCol+SC_SUB_SORT+1;
+ sal_uInt16 nItemId=nSortedCol+SC_SUB_SORT+1;
aPopup.CheckItem(nItemId);
@@ -1778,7 +1778,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
pSubMenu->CheckItem(nItemId);
}
- aPopup.EnableItem(SC_CHANGES_COMMENT,FALSE);
+ aPopup.EnableItem(SC_CHANGES_COMMENT,false);
if(pDoc->IsDocEditable() && pEntry!=NULL)
{
@@ -1792,7 +1792,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
}
}
- USHORT nCommand=aPopup.Execute( this, GetPointerPosPixel() );
+ sal_uInt16 nCommand=aPopup.Execute( this, GetPointerPosPixel() );
if(nCommand)
@@ -1807,14 +1807,14 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG )
ScChangeAction* pScChangeAction=
(ScChangeAction*) pEntryData->pData;
- pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,FALSE);
+ pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,false);
}
}
}
else
{
- BOOL bSortDir=pTheView->GetSortDirection();
- USHORT nDialogCol=nCommand-SC_SUB_SORT-1;
+ sal_Bool bSortDir=pTheView->GetSortDirection();
+ sal_uInt16 nDialogCol=nCommand-SC_SUB_SORT-1;
if(nSortedCol==nDialogCol) bSortDir=!bSortDir;
pTheView->SortByCol(nDialogCol,bSortDir);
/*
@@ -1864,13 +1864,13 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
if ( aStr.Len())
{
- USHORT nCount=(USHORT)aStr.ToInt32();
+ sal_uInt16 nCount=(sal_uInt16)aStr.ToInt32();
- for(USHORT i=0;i<nCount;i++)
+ for(sal_uInt16 i=0;i<nCount;i++)
{
xub_StrLen n1 = aStr.Search(';');
aStr.Erase(0, n1+1);
- pTheView->SetTab(i,(USHORT)aStr.ToInt32(),MAP_PIXEL);
+ pTheView->SetTab(i,(sal_uInt16)aStr.ToInt32(),MAP_PIXEL);
}
}
}
@@ -1882,11 +1882,11 @@ void ScAcceptChgDlg::FillInfo(SfxChildWinInfo& rInfo) const
SfxModelessDialog::FillInfo(rInfo);
rInfo.aExtraString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "AcceptChgDat:(" ));
- USHORT nCount=pTheView->TabCount();
+ sal_uInt16 nCount=pTheView->TabCount();
rInfo.aExtraString += String::CreateFromInt32(nCount);
rInfo.aExtraString += ';';
- for(USHORT i=0;i<nCount;i++)
+ for(sal_uInt16 i=0;i<nCount;i++)
{
rInfo.aExtraString += String::CreateFromInt32(pTheView->GetTab(i));
rInfo.aExtraString += ';';
@@ -1911,7 +1911,7 @@ void ScAcceptChgDlg::InitFilter()
pTheView->SetFilterComment(pTPFilter->IsComment());
utl::SearchParam aSearchParam( pTPFilter->GetComment(),
- utl::SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE );
+ utl::SearchParam::SRCH_REGEXP,false,false,false );
pTheView->SetCommentParams(&aSearchParam);
@@ -1985,8 +1985,8 @@ IMPL_LINK( ScAcceptChgDlg, ColCompareHdl, SvSortData*, pSortData )
if(pLeftItem != NULL && pRightItem != NULL)
{
- USHORT nLeftKind=pLeftItem->IsA();
- USHORT nRightKind=pRightItem->IsA();
+ sal_uInt16 nLeftKind=pLeftItem->IsA();
+ sal_uInt16 nRightKind=pRightItem->IsA();
if(nRightKind == SV_ITEM_ID_LBOXSTRING &&
nLeftKind == SV_ITEM_ID_LBOXSTRING )
diff --git a/sc/source/ui/miscdlgs/acredlin.src b/sc/source/ui/miscdlgs/acredlin.src
index 07ae0398134f..541959eb1d7b 100644
--- a/sc/source/ui/miscdlgs/acredlin.src
+++ b/sc/source/ui/miscdlgs/acredlin.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_CHANGES
{
OutputSize = TRUE ;
- HelpId = FID_CHG_ACCEPT ;
+ HelpId = CMD_FID_CHG_ACCEPT ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 282 , 142 ) ;
@@ -61,6 +61,7 @@ ModelessDialog RID_SCDLG_CHANGES
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_CHANGES:ED_ASSIGN";
Hide = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 119 ) ;
@@ -69,6 +70,7 @@ ModelessDialog RID_SCDLG_CHANGES
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CHANGES:RB_ASSIGN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 118 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index c7676c9166c6..2a3e02fa9eeb 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -71,8 +71,8 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi
, pAccel( NULL )
, pHiddenMarks(NULL)
, nRefTab(0)
- , bHighLightRef( FALSE )
- , bAccInserted( FALSE )
+ , bHighLightRef( false )
+ , bAccInserted( false )
{
ScInputOptions aInputOption=SC_MOD()->GetInputOptions();
bEnableColorRef=aInputOption.GetRangeFinder();
@@ -86,14 +86,14 @@ ScFormulaReferenceHelper::~ScFormulaReferenceHelper()
// common cleanup for ScAnyRefDlg and ScFormulaDlg is done here
HideReference();
- enableInput( TRUE );
+ enableInput( sal_True );
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
if ( pInputHdl )
pInputHdl->ResetDelayTimer(); // stop the timer for disabling the input line
}
// -----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::enableInput( BOOL bEnable )
+void ScFormulaReferenceHelper::enableInput( sal_Bool bEnable )
{
TypeId aType(TYPE(ScDocShell));
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -115,8 +115,8 @@ void ScFormulaReferenceHelper::enableInput( BOOL bEnable )
Window *pParent=pWin->GetParent();
if(pParent)
{
- pParent->EnableInput(bEnable,TRUE /* FALSE */);
- if(TRUE /*bChilds*/)
+ pParent->EnableInput(bEnable,sal_True /* sal_False */);
+ if(sal_True /*bChilds*/)
pViewSh->EnableRefInput(bEnable);
}
}
@@ -133,7 +133,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
{
if( bEnableColorRef )
{
- bHighLightRef=TRUE;
+ bHighLightRef=sal_True;
ScViewData* pViewData=ScDocShell::GetViewData();
if ( pViewData )
{
@@ -142,7 +142,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
ScRangeList aRangeList;
- pTabViewShell->DoneRefMode( FALSE );
+ pTabViewShell->DoneRefMode( false );
pTabViewShell->ClearHighlightRanges();
if( ParseWithNames( aRangeList, rStr, pDoc ) )
@@ -171,7 +171,7 @@ bool ScFormulaReferenceHelper::ParseWithNames( ScRangeList& rRanges, const Strin
ScRange aRange;
String aRangeStr( rStr.GetToken( nToken ) );
- USHORT nFlags = aRange.ParseAny( aRangeStr, pDoc, aDetails );
+ sal_uInt16 nFlags = aRange.ParseAny( aRangeStr, pDoc, aDetails );
if ( nFlags & SCA_VALID )
{
if ( (nFlags & SCA_TAB_3D) == 0 )
@@ -193,7 +193,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
{
if( /*!pRefEdit &&*/ bEnableColorRef)
{
- bHighLightRef=TRUE;
+ bHighLightRef=sal_True;
ScViewData* pViewData=ScDocShell::GetViewData();
if ( pViewData && pRefComp.get() )
{
@@ -208,17 +208,17 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
if(pTabViewShell!=NULL && pScTokA!=NULL)
{
- pTabViewShell->DoneRefMode( FALSE );
+ pTabViewShell->DoneRefMode( false );
pTabViewShell->ClearHighlightRanges();
pScTokA->Reset();
const ScToken* pToken = static_cast<const ScToken*>(pScTokA->GetNextReference());
- USHORT nIndex=0;
+ sal_uInt16 nIndex=0;
while(pToken!=NULL)
{
- BOOL bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
+ sal_Bool bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
if(pToken->GetType()==formula::svSingleRef || bDoubleRef)
@@ -250,7 +250,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
}
}
// -----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode )
+void ScFormulaReferenceHelper::HideReference( sal_Bool bDoneRefMode )
{
ScViewData* pViewData=ScDocShell::GetViewData();
@@ -260,14 +260,14 @@ void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode )
if(pTabViewShell!=NULL)
{
- // bDoneRefMode is FALSE when called from before SetReference.
+ // bDoneRefMode is sal_False when called from before SetReference.
// In that case, RefMode was just started and must not be ended now.
if ( bDoneRefMode )
- pTabViewShell->DoneRefMode( FALSE );
+ pTabViewShell->DoneRefMode( false );
pTabViewShell->ClearHighlightRanges();
}
- bHighLightRef=FALSE;
+ bHighLightRef=false;
}
}
// -----------------------------------------------------------------------------
@@ -318,9 +318,9 @@ void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::R
const ScRange* pRange = aRangeList.front();
pViewShell->SetTabNo( pRange->aStart.Tab() );
pViewShell->MoveCursorAbs( pRange->aStart.Col(),
- pRange->aStart.Row(), SC_FOLLOW_JUMP, FALSE, FALSE );
+ pRange->aStart.Row(), SC_FOLLOW_JUMP, false, false );
pViewShell->MoveCursorAbs( pRange->aEnd.Col(),
- pRange->aEnd.Row(), SC_FOLLOW_JUMP, TRUE, FALSE );
+ pRange->aEnd.Row(), SC_FOLLOW_JUMP, sal_True, false );
m_pDlg->SetReference( *pRange, pDoc );
}
}
@@ -343,7 +343,7 @@ void ScFormulaReferenceHelper::Init()
pRefCell.reset( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) );
pRefComp.reset( new ScCompiler( pDoc, aCursorPos) );
pRefComp->SetGrammar( pDoc->GetGrammar() );
- pRefComp->SetCompileForFAP(TRUE);
+ pRefComp->SetCompileForFAP(sal_True);
nRefTab = nTab;
}
@@ -360,20 +360,20 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel )
case KEY_ESCAPE:
if( pRefEdit )
pRefEdit->GrabFocus();
- m_pDlg->RefInputDone( TRUE );
+ m_pDlg->RefInputDone( sal_True );
break;
}
- return TRUE;
+ return sal_True;
}
//----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::RefInputDone( BOOL bForced )
+void ScFormulaReferenceHelper::RefInputDone( sal_Bool bForced )
{
if ( CanInputDone( bForced ) )
{
if (bAccInserted) // Accelerator wieder abschalten
{
Application::RemoveAccel( pAccel.get() );
- bAccInserted = FALSE;
+ bAccInserted = false;
}
// Fenstertitel anpassen
@@ -393,8 +393,8 @@ void ScFormulaReferenceHelper::RefInputDone( BOOL bForced )
}
// Alle anderen: Show();
- USHORT nChildren = m_pWindow->GetChildCount();
- for ( USHORT i = 0; i < nChildren; i++ )
+ sal_uInt16 nChildren = m_pWindow->GetChildCount();
+ for ( sal_uInt16 i = 0; i < nChildren; i++ )
if (pHiddenMarks[i])
{
m_pWindow->GetChild(i)->GetWindow( WINDOW_CLIENT )->Show();
@@ -420,11 +420,11 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
sNewDialogText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " ));
// Alle Elemente ausser EditCell und Button verstecken
- USHORT nChildren = m_pWindow->GetChildCount();
- pHiddenMarks = new BOOL [nChildren];
- for (USHORT i = 0; i < nChildren; i++)
+ sal_uInt16 nChildren = m_pWindow->GetChildCount();
+ pHiddenMarks = new sal_Bool [nChildren];
+ for (sal_uInt16 i = 0; i < nChildren; i++)
{
- pHiddenMarks[i] = FALSE;
+ pHiddenMarks[i] = false;
Window* pWin = m_pWindow->GetChild(i);
pWin = pWin->GetWindow( WINDOW_CLIENT );
if (pWin == (Window*)pRefEdit)
@@ -435,7 +435,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
; // do nothing
else if (pWin->IsVisible())
{
- pHiddenMarks[i] = TRUE;
+ pHiddenMarks[i] = sal_True;
pWin->Hide();
}
}
@@ -487,7 +487,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
pAccel->SetSelectHdl( LINK( this, ScFormulaReferenceHelper, AccelSelectHdl ) );
}
Application::InsertAccel( pAccel.get() );
- bAccInserted = TRUE;
+ bAccInserted = true;
}
}
// -----------------------------------------------------------------------------
@@ -498,11 +498,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula
if( pRefEdit == pEdit ) // is this the active ref edit field?
{
pRefEdit->GrabFocus(); // before RefInputDone()
- m_pDlg->RefInputDone( TRUE ); // finish ref input
+ m_pDlg->RefInputDone( sal_True ); // finish ref input
}
else
{
- m_pDlg->RefInputDone( TRUE ); // another active ref edit?
+ m_pDlg->RefInputDone( sal_True ); // another active ref edit?
m_pDlg->RefInputStart( pEdit, pButton ); // start ref input
// pRefEdit might differ from pEdit after RefInputStart() (i.e. ScFormulaDlg)
if( pRefEdit )
@@ -511,11 +511,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula
}
}
// -----------------------------------------------------------------------------
-BOOL ScFormulaReferenceHelper::DoClose( USHORT nId )
+sal_Bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
{
SfxApplication* pSfxApp = SFX_APP();
- SetDispatcherLock( FALSE ); //! here and in dtor ?
+ SetDispatcherLock( false ); //! here and in dtor ?
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if ( pViewFrm && pViewFrm->HasChildWindow(FID_INPUTLINE_STATUS) )
@@ -539,17 +539,17 @@ BOOL ScFormulaReferenceHelper::DoClose( USHORT nId )
if (pMyDisp)
pMyViewFrm = pMyDisp->GetFrame();
}
- SC_MOD()->SetRefDialog( nId, FALSE, pMyViewFrm );
+ SC_MOD()->SetRefDialog( nId, false, pMyViewFrm );
pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if ( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(sal_True);
- return TRUE;
+ return sal_True;
}
-void ScFormulaReferenceHelper::SetDispatcherLock( BOOL bLock )
+void ScFormulaReferenceHelper::SetDispatcherLock( sal_Bool bLock )
{
// lock / unlock only the dispatchers of Calc documents
@@ -576,11 +576,11 @@ void ScFormulaReferenceHelper::SetDispatcherLock( BOOL bLock )
// -----------------------------------------------------------------------------
void ScFormulaReferenceHelper::ViewShellChanged(ScTabViewShell* /* pScViewShell */)
{
- enableInput( FALSE );
+ enableInput( false );
EnableSpreadsheets();
}
-void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds)
+void ScFormulaReferenceHelper::EnableSpreadsheets(sal_Bool bFlag, sal_Bool bChilds)
{
TypeId aType(TYPE(ScDocShell));
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -602,7 +602,7 @@ void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds)
Window *pParent=pWin->GetParent();
if(pParent)
{
- pParent->EnableInput(bFlag,FALSE);
+ pParent->EnableInput(bFlag,false);
if(bChilds)
pViewSh->EnableRefInput(bFlag);
}
@@ -670,7 +670,7 @@ void lcl_HideAllReferences()
//----------------------------------------------------------------------------
ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId*/, bool bBindRef )
+ Window* pParent, sal_uInt16 nResId*/, bool bBindRef )
: //SfxModelessDialog ( pB, pCW, pParent, ScResId( nResId ) ),
m_rWindow( rWindow ),
m_bInRefMode( false ),
@@ -679,7 +679,7 @@ ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow*
pActiveWin(NULL)
{
m_aHelper.SetWindow(/*this*/&m_rWindow);
- if(m_rWindow.GetHelpId()==0) //Hack, da im SfxModelessDialog die HelpId
+ if(m_rWindow.GetHelpId().getLength()==0) //Hack, da im SfxModelessDialog die HelpId
m_rWindow.SetHelpId(m_rWindow.GetUniqueId()); //fuer einen ModelessDialog entfernt und
//in eine UniqueId gewandelt wird, machen
//wir das an dieser Stelle rueckgaengig.
@@ -711,7 +711,7 @@ bool ScRefHandler::EnterRefMode()
{
pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() );
if( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(sal_True);
pParentDoc = pMyViewFrm->GetObjectShell();
}
}
@@ -728,13 +728,13 @@ bool ScRefHandler::EnterRefMode()
if ( pInputHdl )
pInputHdl->NotifyChange( NULL );
- m_aHelper.enableInput( FALSE );
+ m_aHelper.enableInput( false );
m_aHelper.EnableSpreadsheets();
m_aHelper.Init();
- m_aHelper.SetDispatcherLock( TRUE );
+ m_aHelper.SetDispatcherLock( true );
return m_bInRefMode = true;
}
@@ -753,12 +753,12 @@ bool ScRefHandler::LeaveRefMode()
lcl_HideAllReferences();
if( Dialog *pDlg = dynamic_cast<Dialog*>( static_cast<Window*>(*this) ) )
- pDlg->SetModalInputMode(FALSE);
- SetDispatcherLock( FALSE ); //! here and in DoClose ?
+ pDlg->SetModalInputMode(false);
+ SetDispatcherLock( false ); //! here and in DoClose ?
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if( pScViewShell )
- pScViewShell->UpdateInputHandler(TRUE);
+ pScViewShell->UpdateInputHandler(sal_True);
lcl_InvalidateWindows();
@@ -798,7 +798,7 @@ void ScRefHandler::SwitchToDocument()
//----------------------------------------------------------------------------
-BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
+sal_Bool ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
{
// default: allow only same document (overridden in function dialog)
String aCmpName;
@@ -811,20 +811,20 @@ BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be
//----------------------------------------------------------------------------
-BOOL ScRefHandler::IsRefInputMode() const
+sal_Bool ScRefHandler::IsRefInputMode() const
{
return m_rWindow.IsVisible(); // nur wer sichtbar ist kann auch Referenzen bekommen
}
//----------------------------------------------------------------------------
-BOOL ScRefHandler::DoClose( USHORT nId )
+sal_Bool ScRefHandler::DoClose( sal_uInt16 nId )
{
m_aHelper.DoClose(nId);
- return TRUE;
+ return sal_True;
}
-void ScRefHandler::SetDispatcherLock( BOOL bLock )
+void ScRefHandler::SetDispatcherLock( sal_Bool bLock )
{
m_aHelper.SetDispatcherLock( bLock );
}
@@ -845,11 +845,11 @@ void ScRefHandler::AddRefEntry()
//----------------------------------------------------------------------------
-BOOL ScRefHandler::IsTableLocked() const
+sal_Bool ScRefHandler::IsTableLocked() const
{
// per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------
@@ -881,7 +881,7 @@ INTRODUCE_TEMPLATE long ScRefHdlrImplBase<TWindow,bBindRef>::PreNotify( NotifyEv
{\
if( bBindRef || m_bInRefMode )\
{\
- USHORT nSwitch=rNEvt.GetType();\
+ sal_uInt16 nSwitch=rNEvt.GetType();\
if(nSwitch==EVENT_GETFOCUS)\
{\
pActiveWin=rNEvt.GetWindow();\
@@ -901,15 +901,15 @@ INTRODUCE_TEMPLATE void ScRefHdlrImplBase<TWindow,bBindRef>::StateChanged( State
{\
if(m_rWindow.IsVisible())\
{\
- m_aHelper.enableInput( FALSE );\
+ m_aHelper.enableInput( false );\
m_aHelper.EnableSpreadsheets();\
- m_aHelper.SetDispatcherLock( TRUE );\
+ m_aHelper.SetDispatcherLock( sal_True );\
aTimer.Start();\
}\
else\
{\
- m_aHelper.enableInput( TRUE );\
- m_aHelper.SetDispatcherLock( FALSE ); /*//! here and in DoClose ?*/\
+ m_aHelper.enableInput( sal_True );\
+ m_aHelper.SetDispatcherLock( false ); /*//! here and in DoClose ?*/\
}\
}\
}
@@ -933,7 +933,7 @@ bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const String& rStr, ScD
return m_aHelper.ParseWithNames( rRanges, rStr, pDoc );
}
// -----------------------------------------------------------------------------
-void ScRefHandler::HideReference( BOOL bDoneRefMode )
+void ScRefHandler::HideReference( sal_Bool bDoneRefMode )
{
m_aHelper.HideReference( bDoneRefMode );
}
@@ -948,7 +948,7 @@ void ScRefHandler::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB
m_aHelper.ReleaseFocus( pEdit,pButton );
}
//----------------------------------------------------------------------------
-void ScRefHandler::RefInputDone( BOOL bForced )
+void ScRefHandler::RefInputDone( sal_Bool bForced )
{
m_aHelper.RefInputDone( bForced );
}
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index b3eff6dde692..3cc608c0c8d0 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -78,7 +78,7 @@ ScAutoFmtPreview::ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocume
aVD ( *this ),
aScriptedText ( aVD ),
xBreakIter ( pDoc->GetBreakIterator() ),
- bFitWidth ( FALSE ),
+ bFitWidth ( false ),
mbRTL ( false ),
aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ),
mnLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ),
@@ -121,7 +121,7 @@ void lcl_SetFontProperties(
rFont.SetItalic ( (FontItalic)rPostureItem.GetValue() );
}
-void ScAutoFmtPreview::MakeFonts( USHORT nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
+void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
{
if ( pCurData )
{
@@ -162,7 +162,7 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va
SETONALLFONTS( SetShadow, pShadowedItem->GetValue() )
SETONALLFONTS( SetColor, aColor )
SETONALLFONTS( SetSize, aFontSize )
- SETONALLFONTS( SetTransparent, TRUE )
+ SETONALLFONTS( SetTransparent, sal_True )
#undef SETONALLFONTS
}
@@ -170,9 +170,9 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va
//------------------------------------------------------------------------
-USHORT ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
+sal_uInt16 ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
- static const USHORT pnFmtMap[] =
+ static const sal_uInt16 pnFmtMap[] =
{
0, 1, 2, 1, 3,
4, 5, 6, 5, 7,
@@ -206,11 +206,11 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
//------------------------
String cellString;
- BOOL bNumFormat = pCurData->GetIncludeValueFormat();
- ULONG nNum;
+ sal_Bool bNumFormat = pCurData->GetIncludeValueFormat();
+ sal_uLong nNum;
double nVal;
Color* pDummy = NULL;
- USHORT nIndex = static_cast< USHORT >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
+ sal_uInt16 nIndex = static_cast< sal_uInt16 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
switch( nIndex )
{
@@ -249,7 +249,7 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
mknum:
if( bNumFormat )
{
- ScNumFormatAbbrev& rNumFormat = (ScNumFormatAbbrev&)pCurData->GetNumFormat( (USHORT) nNum );
+ ScNumFormatAbbrev& rNumFormat = (ScNumFormatAbbrev&)pCurData->GetNumFormat( (sal_uInt16) nNum );
nNum = rNumFormat.GetFormatIndex( *pNumFmt );
}
else
@@ -261,11 +261,11 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
if ( cellString.Len() > 0 )
{
Size aStrSize;
- USHORT nFmtIndex = GetFormatIndex( nCol, nRow );
+ sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow );
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
- USHORT nRightX = 0;
- BOOL bJustify = pCurData->GetIncludeJustify();
+ sal_uInt16 nRightX = 0;
+ sal_Bool bJustify = pCurData->GetIncludeJustify();
SvxHorJustifyItem aHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
SvxCellHorJustify eJustification;
@@ -318,21 +318,21 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
aStrSize = aScriptedText.GetTextSize();
}
- nRightX = (USHORT)( cellRect.GetWidth()
+ nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
//-----------------------------
// vertikal (immer zentrieren):
//-----------------------------
- aPos.Y() += (mnRowHeight - (USHORT)aStrSize.Height()) / 2;
+ aPos.Y() += (mnRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
//-----------
// horizontal
//-----------
if ( eJustification != SVX_HOR_JUSTIFY_STANDARD )
{
- USHORT nHorPos = (USHORT)
+ sal_uInt16 nHorPos = (sal_uInt16)
((cellRect.GetWidth()-aStrSize.Width())/2);
switch ( eJustification )
@@ -438,7 +438,7 @@ void ScAutoFmtPreview::Init()
SetBorderStyle( WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
maArray.SetUseDiagDoubleClipping( false );
- CalcCellArray( FALSE );
+ CalcCellArray( false );
CalcLineMap();
TypeId aType(TYPE(ScDocShell));
@@ -454,7 +454,7 @@ void ScAutoFmtPreview::Init()
//------------------------------------------------------------------------
-void ScAutoFmtPreview::CalcCellArray( BOOL bFitWidthP )
+void ScAutoFmtPreview::CalcCellArray( sal_Bool bFitWidthP )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( bFitWidthP ? mnDataColWidth2 : mnDataColWidth1 );
@@ -536,7 +536,7 @@ void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ )
Point aTmpPoint;
Rectangle aRect( aTmpPoint, aWndSize );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aVD.SetFont( aFont );
aVD.SetLineColor();
aVD.SetFillColor( aBackCol );
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 8f1e46b46ee5..6b3f694195fd 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -44,7 +44,7 @@
// struct ScConflictsListEntry
//=============================================================================
-bool ScConflictsListEntry::HasSharedAction( ULONG nSharedAction ) const
+bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const
{
ScChangeActionList::const_iterator aEnd = maSharedActions.end();
for ( ScChangeActionList::const_iterator aItr = maSharedActions.begin(); aItr != aEnd; ++aItr )
@@ -58,7 +58,7 @@ bool ScConflictsListEntry::HasSharedAction( ULONG nSharedAction ) const
return false;
}
-bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const
+bool ScConflictsListEntry::HasOwnAction( sal_uLong nOwnAction ) const
{
ScChangeActionList::const_iterator aEnd = maOwnActions.end();
for ( ScChangeActionList::const_iterator aItr = maOwnActions.begin(); aItr != aEnd; ++aItr )
@@ -77,7 +77,7 @@ bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const
// class ScConflictsListHelper
//=============================================================================
-bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction )
+bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction )
{
ScConflictsList::const_iterator aEnd = rConflictsList.end();
for ( ScConflictsList::const_iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr )
@@ -91,7 +91,7 @@ bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, ULONG
return false;
}
-ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction )
+ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsList& rConflictsList, sal_uLong nSharedAction )
{
ScConflictsList::iterator aEnd = rConflictsList.end();
for ( ScConflictsList::iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr )
@@ -105,7 +105,7 @@ ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsLi
return NULL;
}
-ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction )
+ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction )
{
ScConflictsList::iterator aEnd = rConflictsList.end();
for ( ScConflictsList::iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr )
@@ -165,8 +165,8 @@ void ScConflictsListHelper::TransformConflictsList( ScConflictsList& rConflictsL
// class ScConflictsFinder
//=============================================================================
-ScConflictsFinder::ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared,
- ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList )
+ScConflictsFinder::ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared,
+ sal_uLong nStartOwn, sal_uLong nEndOwn, ScConflictsList& rConflictsList )
:mpTrack( pTrack )
,mnStartShared( nStartShared )
,mnEndShared( nEndShared )
@@ -216,7 +216,7 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct
return NULL;
}
-ScConflictsListEntry* ScConflictsFinder::GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions )
+ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions )
{
// try to get a list entry which already contains the shared action
ScConflictsListEntry* pEntry = ScConflictsListHelper::GetSharedActionEntry( mrConflictsList, nSharedAction );
@@ -460,7 +460,7 @@ ScConflictsDlg::ScConflictsDlg( Window* pParent, ScViewData* pViewData, ScDocume
aHeader += maStrTitleDate;
maLbConflicts.InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HIB_LEFT | HIB_LEFTIMAGE | HIB_VCENTER );
- maLbConflicts.SetWindowBits( WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL );
+ maLbConflicts.SetStyle( maLbConflicts.GetStyle() | WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL );
maLbConflicts.SetSelectionMode( MULTIPLE_SELECTION );
maLbConflicts.SetHighlightRange();
@@ -512,7 +512,7 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen
if ( pAction && pDoc )
{
String aDesc;
- pAction->GetDescription( aDesc, pDoc, TRUE, false );
+ pAction->GetDescription( aDesc, pDoc, sal_True, false );
aString += aDesc;
aString += '\t';
@@ -528,7 +528,7 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen
DateTime aDateTime = pAction->GetDateTime();
aString += ScGlobal::pLocaleData->getDate( aDateTime );
aString += ' ';
- aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE );
+ aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
aString += '\t';
}
@@ -552,7 +552,7 @@ void ScConflictsDlg::HandleListBoxSelection( bool bSelectHandle )
{
if ( bSelectHandle )
{
- maLbConflicts.SelectAll( FALSE );
+ maLbConflicts.SelectAll( false );
}
if ( !maLbConflicts.IsSelected( pRootEntry ) )
{
@@ -608,7 +608,7 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
ScTabView* pTabView = mpViewData->GetView();
pTabView->DoneBlockMode();
- BOOL bContMark = FALSE;
+ sal_Bool bContMark = false;
SvLBoxEntry* pEntry = maLbConflicts.FirstSelected();
while ( pEntry )
{
@@ -624,9 +624,9 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
const ScBigRange& rBigRange = ( static_cast< const ScChangeAction* >( pAction ) )->GetBigRange();
if ( rBigRange.IsValid( mpOwnDoc ) )
{
- BOOL bSetCursor = !maLbConflicts.NextSelected( pEntry );
+ sal_Bool bSetCursor = !maLbConflicts.NextSelected( pEntry );
pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark );
- bContMark = TRUE;
+ bContMark = sal_True;
}
}
}
@@ -681,9 +681,9 @@ void ScConflictsDlg::KeepAllHandler( bool bMine )
SetConflictAction( pRootEntry, eConflictAction );
pRootEntry = maLbConflicts.NextSibling( pRootEntry );
}
- maLbConflicts.SetUpdateMode( FALSE );
+ maLbConflicts.SetUpdateMode( false );
maLbConflicts.Clear();
- maLbConflicts.SetUpdateMode( TRUE );
+ maLbConflicts.SetUpdateMode( sal_True );
SetPointer( Pointer( POINTER_ARROW ) );
EndDialog( RET_OK );
}
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.src b/sc/source/ui/miscdlgs/conflictsdlg.src
index 2e7bb6b93503..dd127cebe24b 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.src
+++ b/sc/source/ui/miscdlgs/conflictsdlg.src
@@ -52,12 +52,14 @@ ModalDialog RID_SCDLG_CONFLICTS
};
PushButton BTN_KEEPMINE
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPMINE";
Pos = MAP_APPFONT ( 72 , 145 ) ;
Size = MAP_APPFONT ( 76 , 14 ) ;
Text [ en-US ] = "Keep ~Mine" ;
};
PushButton BTN_KEEPOTHER
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPOTHER";
Pos = MAP_APPFONT ( 190 , 145 ) ;
Size = MAP_APPFONT ( 76 , 14 ) ;
Text [ en-US ] = "Keep ~Other" ;
@@ -69,12 +71,14 @@ ModalDialog RID_SCDLG_CONFLICTS
};
PushButton BTN_KEEPALLMINE
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPALLMINE";
Pos = MAP_APPFONT ( 6 , 172 ) ;
Size = MAP_APPFONT ( 104 , 14 ) ;
Text [ en-US ] = "~Keep All Mine" ;
};
PushButton BTN_KEEPALLOTHERS
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONFLICTS:BTN_KEEPALLOTHERS";
Pos = MAP_APPFONT ( 116 , 172 ) ;
Size = MAP_APPFONT ( 104 , 14 ) ;
Text [ en-US ] = "Keep ~All Others" ;
diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx
index 8692c8be0b87..e2dea76b26aa 100644
--- a/sc/source/ui/miscdlgs/crdlg.cxx
+++ b/sc/source/ui/miscdlgs/crdlg.cxx
@@ -45,7 +45,7 @@
ScColOrRowDlg::ScColOrRowDlg( Window* pParent,
const String& rStrTitle,
const String& rStrLabel,
- BOOL bColDefault )
+ sal_Bool bColDefault )
: ModalDialog ( pParent, ScResId( RID_SCDLG_COLORROW ) ),
//
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 73f65e48e90f..49fbe93e017f 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -53,9 +53,9 @@
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute()
#define QUERYBOX(m) QueryBox(this,WinBits(WB_YES_NO|WB_DEF_YES),m).Execute()
-const ULONG nEntryDataCol = 0;
-const ULONG nEntryDataRow = 1;
-const ULONG nEntryDataDelim = 2;
+const sal_uLong nEntryDataCol = 0;
+const sal_uLong nEntryDataRow = 1;
+const sal_uLong nEntryDataDelim = 2;
//============================================================================
@@ -109,12 +109,15 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB,
pDoc ( ptrViewData->GetDocument() ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE )
+ bDlgLostFocus ( false )
{
xColNameRanges = pDoc->GetColNameRanges()->Clone();
xRowNameRanges = pDoc->GetRowNameRanges()->Clone();
Init();
FreeResource();
+
+ aRbAssign.SetAccessibleRelationMemberOf(&aEdAssign);
+ aRbAssign2.SetAccessibleRelationMemberOf(&aEdAssign);
}
@@ -196,8 +199,8 @@ void ScColRowNameRangesDlg::Init()
}
else
{
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
aEdAssign.SetText( EMPTY_STRING );
aEdAssign2.SetText( EMPTY_STRING );
}
@@ -229,22 +232,22 @@ void ScColRowNameRangesDlg::Init()
#*
#************************************************************************/
-void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef)
+void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,sal_Bool bRef)
{
theCurData = theCurArea = rLabelRange;
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
SCCOL nCol1 = theCurArea.aStart.Col();
SCCOL nCol2 = theCurArea.aEnd.Col();
SCROW nRow1 = theCurArea.aStart.Row();
SCROW nRow2 = theCurArea.aEnd.Row();
if ( (static_cast<SCCOLROW>(nCol2 - nCol1) >= nRow2 - nRow1) || (nCol1 == 0 && nCol2 == MAXCOL) )
{ // Spaltenkoepfe und Grenzfall gesamte Tabelle
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
if ( nRow2 == MAXROW )
{
if ( nRow1 == 0 )
- bValid = FALSE; // Grenzfall gesamte Tabelle
+ bValid = false; // Grenzfall gesamte Tabelle
else
{ // Head unten, Data oben
theCurData.aStart.SetRow( 0 );
@@ -259,8 +262,8 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef)
}
else
{ // Zeilenkoepfe
- aBtnRowHead.Check( TRUE );
- aBtnColHead.Check( FALSE );
+ aBtnRowHead.Check( sal_True );
+ aBtnColHead.Check( false );
if ( nCol2 == MAXCOL )
{ // Head rechts, Data links
theCurData.aStart.SetCol( 0 );
@@ -329,7 +332,7 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef)
#*
#************************************************************************/
-void ScColRowNameRangesDlg::AdjustColRowData( const ScRange& rDataRange,BOOL bRef)
+void ScColRowNameRangesDlg::AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef)
{
theCurData = rDataRange;
if ( aBtnColHead.IsChecked() )
@@ -416,9 +419,9 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD
String aRefStr;
if ( pEdActive == &aEdAssign )
- SetColRowData( rRef, TRUE );
+ SetColRowData( rRef, sal_True );
else
- AdjustColRowData( rRef, TRUE );
+ AdjustColRowData( rRef, sal_True );
aBtnColHead.Enable();
aBtnRowHead.Enable();
aBtnAdd.Enable();
@@ -441,7 +444,7 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD
#*
#************************************************************************/
-BOOL ScColRowNameRangesDlg::Close()
+sal_Bool ScColRowNameRangesDlg::Close()
{
return DoClose( ScColRowNameRangesDlgWrapper::GetChildWindowId() );
}
@@ -465,7 +468,7 @@ void ScColRowNameRangesDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -497,14 +500,14 @@ void ScColRowNameRangesDlg::SetActive()
void ScColRowNameRangesDlg::UpdateNames()
{
- aLbRange.SetUpdateMode( FALSE );
+ aLbRange.SetUpdateMode( false );
//-----------------------------------------------------------
aLbRange.Clear();
aRangeMap.clear();
aEdAssign.SetText( EMPTY_STRING );
size_t nCount, j;
- USHORT nPos; //@008 Hilfsvariable q eingefuegt
+ sal_uInt16 nPos; //@008 Hilfsvariable q eingefuegt
SCCOL nCol1;
SCROW nRow1; //Erweiterung fuer Bereichsnamen
@@ -611,7 +614,7 @@ void ScColRowNameRangesDlg::UpdateNames()
delete [] ppSortArray;
}
//-----------------------------------------------------------
- aLbRange.SetUpdateMode( TRUE );
+ aLbRange.SetUpdateMode( sal_True );
aLbRange.Invalidate();
}
@@ -631,14 +634,14 @@ void ScColRowNameRangesDlg::UpdateNames()
#*
#************************************************************************/
-void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColName )
+void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, sal_Bool bColName )
{
ScRangePair* pPair = NULL;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
if ( bFound )
{
@@ -682,7 +685,7 @@ void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColNam
#*
#************************************************************************/
-BOOL ScColRowNameRangesDlg::IsRefInputMode() const
+sal_Bool ScColRowNameRangesDlg::IsRefInputMode() const
{
return (pEdActive != NULL);
}
@@ -772,8 +775,8 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG )
{
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
ScRange aRange1, aRange2;
- BOOL bOk1;
- if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != FALSE
+ sal_Bool bOk1;
+ if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != false
&& ((aRange2.ParseAny( aNewData, pDoc, eConv ) & SCA_VALID) == SCA_VALID) )
{
theCurArea = aRange1;
@@ -800,8 +803,8 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG )
aBtnAdd.Disable();
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
aEdAssign2.SetText( EMPTY_STRING );
theCurArea = ScRange();
theCurData = theCurArea;
@@ -838,20 +841,20 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
{
String aRangeStr = aLbRange.GetSelectEntry();
- USHORT nSelectPos = aLbRange.GetSelectEntryPos();
- BOOL bColName =
- ((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
+ sal_uInt16 nSelectPos = aLbRange.GetSelectEntryPos();
+ sal_Bool bColName =
+ ((sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
if (itr == aRangeMap.end())
return 0;
const ScRange& rRange = itr->second;
ScRangePair* pPair = NULL;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
- bFound = TRUE;
+ bFound = sal_True;
if ( bFound )
{
String aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY );
@@ -869,7 +872,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
delete pPair;
UpdateNames();
- USHORT nCnt = aLbRange.GetEntryCount();
+ sal_uInt16 nCnt = aLbRange.GetEntryCount();
if ( nSelectPos >= nCnt )
{
if ( nCnt )
@@ -879,7 +882,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
}
aLbRange.SelectEntryPos( nSelectPos );
if ( nSelectPos &&
- (ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
+ (sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
aLbRange.SelectEntryPos( --nSelectPos ); // ---Zeile---
aLbRange.GrabFocus();
@@ -887,8 +890,8 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
aBtnRemove.Disable();
aEdAssign.SetText( EMPTY_STRING );
theCurArea = theCurData = ScRange();
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
aEdAssign2.SetText( EMPTY_STRING );
Range1SelectHdl( 0 );
}
@@ -915,11 +918,11 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG )
{
- USHORT nSelectPos = aLbRange.GetSelectEntryPos();
- USHORT nCnt = aLbRange.GetEntryCount();
- USHORT nMoves = 0;
+ sal_uInt16 nSelectPos = aLbRange.GetSelectEntryPos();
+ sal_uInt16 nCnt = aLbRange.GetEntryCount();
+ sal_uInt16 nMoves = 0;
while ( nSelectPos < nCnt
- && (ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
+ && (sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim )
{ // skip Delimiter
++nMoves;
aLbRange.SelectEntryPos( ++nSelectPos );
@@ -945,8 +948,8 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG )
NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
if ( itr != aRangeMap.end() )
{
- BOOL bColName =
- ((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
+ sal_Bool bColName =
+ ((sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
UpdateRangeData( itr->second, bColName );
aBtnAdd.Disable();
aBtnRemove.Enable();
@@ -1001,14 +1004,14 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG )
IMPL_LINK( ScColRowNameRangesDlg, Range1DataModifyHdl, void *, EMPTYARG )
{
String aNewArea( aEdAssign.GetText() );
- BOOL bValid = FALSE;
+ sal_Bool bValid = false;
if ( aNewArea.Len() > 0 )
{
ScRange aRange;
if ( (aRange.ParseAny( aNewArea, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID) == SCA_VALID )
{
SetColRowData( aRange );
- bValid = TRUE;
+ bValid = sal_True;
}
}
if ( bValid )
@@ -1089,8 +1092,8 @@ IMPL_LINK( ScColRowNameRangesDlg, ColClickHdl, void *, EMPTYARG )
{
if ( !aBtnColHead.GetSavedValue() )
{
- aBtnColHead.Check( TRUE );
- aBtnRowHead.Check( FALSE );
+ aBtnColHead.Check( sal_True );
+ aBtnRowHead.Check( false );
if ( theCurArea.aStart.Row() == 0 && theCurArea.aEnd.Row() == MAXROW )
{
theCurArea.aEnd.SetRow( MAXROW - 1 );
@@ -1127,8 +1130,8 @@ IMPL_LINK( ScColRowNameRangesDlg, RowClickHdl, void *, EMPTYARG )
{
if ( !aBtnRowHead.GetSavedValue() )
{
- aBtnRowHead.Check( TRUE );
- aBtnColHead.Check( FALSE );
+ aBtnRowHead.Check( sal_True );
+ aBtnColHead.Check( false );
if ( theCurArea.aStart.Col() == 0 && theCurArea.aEnd.Col() == MAXCOL )
{
theCurArea.aEnd.SetCol( MAXCOL - 1 );
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index ed9a01fa5ec6..10ef3a3b7dda 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -81,7 +81,7 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
nTab = pViewData->GetTabNo();
//if there is no selection
if ((nStartCol == nEndCol) && (nStartRow == nEndRow))
- bNoSelection = TRUE;
+ bNoSelection = true;
if (bNoSelection)
{
@@ -285,7 +285,7 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
{
if ( pEdit->IsModified() )
- aBtnRestore.Enable( TRUE );
+ aBtnRestore.Enable( true );
return 0;
}
@@ -295,7 +295,7 @@ IMPL_LINK( ScDataFormDlg, Impl_NewHdl, PushButton*, EMPTYARG )
ScDocShell* pDocSh = pViewData->GetDocShell();
if ( pDoc )
{
- sal_Bool bHasData = sal_False;
+ sal_Bool bHasData = false;
for(sal_uInt16 i = 0; i < aColLength; i++)
if (pEdits[i])
if ( pEdits[i]->GetText().Len() != 0 )
@@ -396,19 +396,19 @@ void ScDataFormDlg::SetButtonState()
{
if ( aCurrentRow > nEndRow )
{
- aBtnDelete.Enable( FALSE );
- aBtnLast.Enable( TRUE );
- aBtnNext.Enable( FALSE );
+ aBtnDelete.Enable( false );
+ aBtnLast.Enable( true );
+ aBtnNext.Enable( false );
}
else
{
- aBtnDelete.Enable( TRUE );
- aBtnNext.Enable( TRUE );
+ aBtnDelete.Enable( true );
+ aBtnNext.Enable( true );
}
if ( 1 == aCurrentRow )
- aBtnLast.Enable( FALSE );
+ aBtnLast.Enable( false );
- aBtnRestore.Enable( FALSE );
+ aBtnRestore.Enable( false );
if ( pEdits )
pEdits[0]->GrabFocus();
}
diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx
index 2537db56ed42..a036dbf22a16 100644
--- a/sc/source/ui/miscdlgs/delcldlg.cxx
+++ b/sc/source/ui/miscdlgs/delcldlg.cxx
@@ -40,11 +40,11 @@
#include "miscdlgs.hrc"
-static BYTE nDelItemChecked=0;
+static sal_uInt8 nDelItemChecked=0;
//==================================================================
-ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove ) :
+ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DELCELL ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 7ce7d492aa3a..d824067e24ba 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -42,15 +42,15 @@
//==================================================================
-BOOL ScDeleteContentsDlg::bPreviousAllCheck = FALSE;
-USHORT ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
+sal_Bool ScDeleteContentsDlg::bPreviousAllCheck = false;
+sal_uInt16 ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
IDF_NOTE | IDF_FORMULA |
IDF_VALUE);
//-----------------------------------------------------------------------
ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
- USHORT nCheckDefaults ) :
+ sal_uInt16 nCheckDefaults ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DELCONT ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
@@ -65,12 +65,12 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
- bObjectsDisabled( FALSE )
+ bObjectsDisabled( false )
{
if ( nCheckDefaults != 0 )
{
ScDeleteContentsDlg::nPreviousChecks = nCheckDefaults;
- ScDeleteContentsDlg::bPreviousAllCheck = FALSE;
+ ScDeleteContentsDlg::bPreviousAllCheck = false;
}
aBtnDelAll.Check ( ScDeleteContentsDlg::bPreviousAllCheck );
@@ -99,7 +99,7 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
//------------------------------------------------------------------------
-USHORT ScDeleteContentsDlg::GetDelContentsCmdBits() const
+sal_uInt16 ScDeleteContentsDlg::GetDelContentsCmdBits() const
{
ScDeleteContentsDlg::nPreviousChecks = 0;
@@ -127,7 +127,7 @@ USHORT ScDeleteContentsDlg::GetDelContentsCmdBits() const
//------------------------------------------------------------------------
-void ScDeleteContentsDlg::DisableChecks( BOOL bDelAllChecked )
+void ScDeleteContentsDlg::DisableChecks( sal_Bool bDelAllChecked )
{
if ( bDelAllChecked )
{
@@ -158,8 +158,8 @@ void ScDeleteContentsDlg::DisableChecks( BOOL bDelAllChecked )
void ScDeleteContentsDlg::DisableObjects()
{
- bObjectsDisabled = TRUE;
- aBtnDelObjects.Check(FALSE);
+ bObjectsDisabled = sal_True;
+ aBtnDelObjects.Check(false);
aBtnDelObjects.Disable();
}
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index 2b544a1c5d7c..67b297c2a180 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -62,10 +62,20 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent,
String aStartStr,
double fStep,
double fMax,
- USHORT nPossDir )
+ sal_uInt16 nPossDir )
: ModalDialog ( pParent, ScResId( RID_SCDLG_FILLSERIES ) ),
+ aFtStartVal ( this, ScResId( FT_START_VALUE ) ),
+ aEdStartVal ( this, ScResId( ED_START_VALUES ) ),
+ aStartStrVal ( aStartStr),
+
+ aFtEndVal ( this, ScResId( FT_END_VALUE ) ),
+ aEdEndVal ( this, ScResId( ED_END_VALUES ) ),
+
+ aFtIncrement ( this, ScResId( FT_INCREMENT ) ),
+ aEdIncrement ( this, ScResId( ED_INCREMENT ) ),
+
aFlDirection ( this, ScResId( FL_DIRECTION ) ),
aBtnDown ( this, ScResId( BTN_BOTTOM ) ),
aBtnRight ( this, ScResId( BTN_RIGHT ) ),
@@ -84,14 +94,6 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent,
aBtnMonth ( this, ScResId( BTN_MONTH ) ),
aBtnYear ( this, ScResId( BTN_YEAR ) ),
- aFtStartVal ( this, ScResId( FT_START_VALUE ) ),
- aEdStartVal ( this, ScResId( ED_START_VALUES ) ),
- aStartStrVal ( aStartStr),
- aFtEndVal ( this, ScResId( FT_END_VALUE ) ),
- aEdEndVal ( this, ScResId( ED_END_VALUES ) ),
- aFtIncrement ( this, ScResId( FT_INCREMENT ) ),
- aEdIncrement ( this, ScResId( ED_INCREMENT ) ),
-
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
@@ -116,7 +118,7 @@ ScFillSeriesDlg::~ScFillSeriesDlg()
//----------------------------------------------------------------------------
-void ScFillSeriesDlg::SetEdStartValEnabled(BOOL bFlag)
+void ScFillSeriesDlg::SetEdStartValEnabled(sal_Bool bFlag)
{
bStartValFlag=bFlag;
if(bFlag)
@@ -133,7 +135,7 @@ void ScFillSeriesDlg::SetEdStartValEnabled(BOOL bFlag)
//----------------------------------------------------------------------------
-void ScFillSeriesDlg::Init( USHORT nPossDir )
+void ScFillSeriesDlg::Init( sal_uInt16 nPossDir )
{
aBtnOk.SetClickHdl ( LINK( this, ScFillSeriesDlg, OKHdl ) );
aBtnArithmetic.SetClickHdl ( LINK( this, ScFillSeriesDlg, DisableHdl ) );
@@ -222,7 +224,7 @@ void ScFillSeriesDlg::Init( USHORT nPossDir )
rDoc.GetFormatTable()->GetInputLineString( fEndVal, 0, aEndTxt );
aEdEndVal.SetText( aEndTxt );
- bStartValFlag=FALSE;
+ bStartValFlag=false;
aFlSep1.SetStyle( aFlSep1.GetStyle() | WB_VERT );
aFlSep2.SetStyle( aFlSep2.GetStyle() | WB_VERT );
@@ -231,15 +233,15 @@ void ScFillSeriesDlg::Init( USHORT nPossDir )
//----------------------------------------------------------------------------
-BOOL ScFillSeriesDlg::CheckStartVal()
+sal_Bool ScFillSeriesDlg::CheckStartVal()
{
- BOOL bValOk = FALSE;
+ sal_Bool bValOk = false;
String aStr( aEdStartVal.GetText() );
if ( aStr.Len() == 0 || aBtnAutoFill.IsChecked())
{
fStartVal = MAXDOUBLE;
- bValOk = TRUE;
+ bValOk = sal_True;
}
else
{
@@ -252,7 +254,7 @@ BOOL ScFillSeriesDlg::CheckStartVal()
//----------------------------------------------------------------------------
-BOOL ScFillSeriesDlg::CheckIncrementVal()
+sal_Bool ScFillSeriesDlg::CheckIncrementVal()
{
sal_uInt32 nKey = 0;
String aStr( aEdIncrement.GetText() );
@@ -263,15 +265,15 @@ BOOL ScFillSeriesDlg::CheckIncrementVal()
//----------------------------------------------------------------------------
-BOOL ScFillSeriesDlg::CheckEndVal()
+sal_Bool ScFillSeriesDlg::CheckEndVal()
{
- BOOL bValOk = FALSE;
+ sal_Bool bValOk = false;
String aStr( aEdEndVal.GetText() );
if ( aStr.Len() == 0 )
{
fEndVal = (fIncrement < 0) ? -MAXDOUBLE : MAXDOUBLE;
- bValOk = TRUE;
+ bValOk = sal_True;
}
else
{
@@ -342,21 +344,21 @@ IMPL_LINK( ScFillSeriesDlg, OKHdl, void *, EMPTYARG )
else if ( aBtnMonth.IsChecked() ) theFillDateCmd = FILL_MONTH;
else if ( aBtnYear.IsChecked() ) theFillDateCmd = FILL_YEAR;
- BOOL bAllOk = TRUE;
+ sal_Bool bAllOk = sal_True;
Edit* pEdWrong = NULL;
if ( !CheckStartVal() )
{
- bAllOk = FALSE;
+ bAllOk = false;
pEdWrong = &aEdStartVal;
}
else if ( !CheckIncrementVal() )
{
- bAllOk = FALSE;
+ bAllOk = false;
pEdWrong = &aEdIncrement;
}
else if ( !CheckEndVal() )
{
- bAllOk = FALSE;
+ bAllOk = false;
pEdWrong = &aEdEndVal;
}
if ( bAllOk )
diff --git a/sc/source/ui/miscdlgs/groupdlg.cxx b/sc/source/ui/miscdlgs/groupdlg.cxx
index 593a63934e03..eeda6abd96d9 100644
--- a/sc/source/ui/miscdlgs/groupdlg.cxx
+++ b/sc/source/ui/miscdlgs/groupdlg.cxx
@@ -43,9 +43,9 @@
//==================================================================
ScGroupDlg::ScGroupDlg( Window* pParent,
- USHORT nResId,
- BOOL bUngroup,
- BOOL bRows ) :
+ sal_uInt16 nResId,
+ sal_Bool bUngroup,
+ sal_Bool bRows ) :
ModalDialog ( pParent, ScResId( nResId ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
@@ -69,7 +69,7 @@ ScGroupDlg::ScGroupDlg( Window* pParent,
//------------------------------------------------------------------------
-BOOL ScGroupDlg::GetColsChecked() const
+sal_Bool ScGroupDlg::GetColsChecked() const
{
return aBtnCols.IsChecked();
}
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index c44833102bb7..5df31766517f 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -60,7 +60,7 @@
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute();
-inline void EnableDisable( Window& rWin, BOOL bEnable )
+inline void EnableDisable( Window& rWin, sal_Bool bEnable )
{
if (bEnable)
rWin.Enable();
@@ -103,16 +103,17 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind
aOkButton.SetClickHdl(LINK( this, ScHighlightChgDlg, OKBtnHdl));
aHighlightBox.SetClickHdl(LINK( this, ScHighlightChgDlg, HighLightHandle ));
aFilterCtr.SetRefHdl(LINK( this, ScHighlightChgDlg, RefHandle ));
- aFilterCtr.HideRange(FALSE);
+ aFilterCtr.HideRange(false);
aFilterCtr.Show();
- SetDispatcherLock( TRUE );
+ SetDispatcherLock( true );
Init();
}
+
ScHighlightChgDlg::~ScHighlightChgDlg()
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
}
void ScHighlightChgDlg::Init()
@@ -128,7 +129,7 @@ void ScHighlightChgDlg::Init()
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
aFilterCtr.ClearAuthors();
ScStrCollection aUserColl=pChanges->GetUserCollection();
- for(USHORT i=0;i<aUserColl.GetCount();i++)
+ for(sal_uInt16 i=0;i<aUserColl.GetCount();i++)
aFilterCtr.InsertAuthor(aUserColl[i]->GetString());
}
@@ -143,7 +144,7 @@ void ScHighlightChgDlg::Init()
aFilterCtr.SetFirstTime(aChangeViewSet.GetTheFirstDateTime());
aFilterCtr.SetLastDate(aChangeViewSet.GetTheLastDateTime());
aFilterCtr.SetLastTime(aChangeViewSet.GetTheLastDateTime());
- aFilterCtr.SetDateMode((USHORT)aChangeViewSet.GetTheDateMode());
+ aFilterCtr.SetDateMode((sal_uInt16)aChangeViewSet.GetTheDateMode());
aFilterCtr.CheckAuthor(aChangeViewSet.HasAuthor());
aFilterCtr.CheckComment(aChangeViewSet.HasComment());
aFilterCtr.SetComment(aChangeViewSet.GetTheComment());
@@ -170,7 +171,7 @@ void ScHighlightChgDlg::Init()
pRangeEntry->Format( aRefStr, ABS_DREF3D, pDoc );
aFilterCtr.SetRange(aRefStr);
}
- aFilterCtr.Enable(TRUE,TRUE);
+ aFilterCtr.Enable(sal_True,sal_True);
HighLightHandle(&aHighlightBox);
}
@@ -192,12 +193,12 @@ void ScHighlightChgDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
}
//----------------------------------------------------------------------------
-BOOL ScHighlightChgDlg::Close()
+sal_Bool ScHighlightChgDlg::Close()
{
return DoClose( ScHighlightChgDlgWrapper::GetChildWindowId() );
}
-void ScHighlightChgDlg::RefInputDone( BOOL bForced)
+void ScHighlightChgDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
if(bForced || !aRbAssign.IsVisible())
@@ -213,7 +214,7 @@ void ScHighlightChgDlg::SetActive()
{
}
-BOOL ScHighlightChgDlg::IsRefInputMode() const
+sal_Bool ScHighlightChgDlg::IsRefInputMode() const
{
return aEdAssign.IsVisible();
}
@@ -224,13 +225,13 @@ IMPL_LINK( ScHighlightChgDlg, HighLightHandle, CheckBox*, pCb )
{
if(aHighlightBox.IsChecked())
{
- aFilterCtr.Enable(TRUE,TRUE);
+ aFilterCtr.Enable(sal_True,sal_True);
aCbAccept.Enable();
aCbReject.Enable();
}
else
{
- aFilterCtr.Disable(TRUE);
+ aFilterCtr.Disable(sal_True);
aCbAccept.Disable();
aCbReject.Disable();
}
@@ -242,7 +243,7 @@ IMPL_LINK( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef )
{
if(pRef!=NULL)
{
- SetDispatcherLock( TRUE );
+ SetDispatcherLock( true );
aEdAssign.Show();
aRbAssign.Show();
aEdAssign.SetText(aFilterCtr.GetRange());
diff --git a/sc/source/ui/miscdlgs/highred.src b/sc/source/ui/miscdlgs/highred.src
index 259afee9a5be..5c86c5863185 100644
--- a/sc/source/ui/miscdlgs/highred.src
+++ b/sc/source/ui/miscdlgs/highred.src
@@ -29,7 +29,7 @@
ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
{
OutputSize = TRUE ;
- HelpId = FID_CHG_ACCEPT ;
+ HelpId = CMD_FID_CHG_ACCEPT ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 318 , 148 ) ;
@@ -38,6 +38,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
// Dieser Dialog hat einen Cancel-Button !
CheckBox CB_HIGHLIGHT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_HIGHLIGHT_CHANGES:CB_HIGHLIGHT";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
TabStop = TRUE ;
@@ -51,6 +52,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
CheckBox CB_HIGHLIGHT_ACCEPT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_HIGHLIGHT_CHANGES:CB_HIGHLIGHT_ACCEPT";
Pos = MAP_APPFONT ( 12 , 118 ) ;
Size = MAP_APPFONT ( 246 , 10 ) ;
TabStop = TRUE ;
@@ -58,6 +60,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
CheckBox CB_HIGHLIGHT_REJECT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_HIGHLIGHT_CHANGES:CB_HIGHLIGHT_REJECT";
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 246 , 10 ) ;
TabStop = TRUE ;
@@ -84,6 +87,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_HIGHLIGHT_CHANGES:ED_ASSIGN";
Hide = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 119 ) ;
@@ -92,10 +96,11 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_HIGHLIGHT_CHANGES:RB_ASSIGN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 118 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
- TabStop = FALSE ;
+ TabStop = TRUE;
QuickHelpText [ en-US ] = "Minimize/Maximize" ;
};
Text [ en-US ] = "Show Changes" ;
diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx
index 32cba4161088..237d9423990c 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -40,11 +40,11 @@
#include "miscdlgs.hrc"
-static BYTE nInsItemChecked=0;
+static sal_uInt8 nInsItemChecked=0;
//==================================================================
-ScInsertCellDlg::ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove) :
+ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) :
ModalDialog ( pParent, ScResId( RID_SCDLG_INSCELL ) ),
//
aFlFrame ( this, ScResId( FL_FRAME ) ),
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index a9eea25d9c58..0e2546f5db2f 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -42,18 +42,18 @@
//==================================================================
-BOOL ScInsertContentsDlg::bPreviousAllCheck = TRUE;
-USHORT ScInsertContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
+sal_Bool ScInsertContentsDlg::bPreviousAllCheck = sal_True;
+sal_uInt16 ScInsertContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
IDF_NOTE | IDF_FORMULA |
IDF_ATTRIB | IDF_OBJECTS);
-USHORT ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
-USHORT ScInsertContentsDlg::nPreviousChecks2 = 0;
-USHORT ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
+sal_uInt16 ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
+sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0;
+sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
//-----------------------------------------------------------------------
ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
- USHORT nCheckDefaults,
+ sal_uInt16 nCheckDefaults,
const String* pStrTitle )
: ModalDialog ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
@@ -86,11 +86,11 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
- bOtherDoc ( FALSE ),
- bFillMode ( FALSE ),
- bChangeTrack ( FALSE ),
- bMoveDownDisabled( FALSE ),
- bMoveRightDisabled( FALSE )
+ bOtherDoc ( false ),
+ bFillMode ( false ),
+ bChangeTrack ( false ),
+ bMoveDownDisabled( false ),
+ bMoveRightDisabled( false )
{
if ( pStrTitle )
SetText( *pStrTitle );
@@ -98,7 +98,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
if ( nCheckDefaults != 0 )
{
ScInsertContentsDlg::nPreviousChecks = nCheckDefaults;
- ScInsertContentsDlg::bPreviousAllCheck = FALSE;
+ ScInsertContentsDlg::bPreviousAllCheck = false;
ScInsertContentsDlg::nPreviousChecks2 = 0;
}
@@ -120,18 +120,18 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
switch( ScInsertContentsDlg::nPreviousFormulaChecks )
{
- case PASTE_NOFUNC: aRbNoOp.Check(TRUE); break;
- case PASTE_ADD: aRbAdd.Check(TRUE); break;
- case PASTE_SUB: aRbSub.Check(TRUE); break;
- case PASTE_MUL: aRbMul.Check(TRUE); break;
- case PASTE_DIV: aRbDiv.Check(TRUE); break;
+ case PASTE_NOFUNC: aRbNoOp.Check(sal_True); break;
+ case PASTE_ADD: aRbAdd.Check(sal_True); break;
+ case PASTE_SUB: aRbSub.Check(sal_True); break;
+ case PASTE_MUL: aRbMul.Check(sal_True); break;
+ case PASTE_DIV: aRbDiv.Check(sal_True); break;
}
switch( ScInsertContentsDlg::nPreviousMoveMode )
{
- case INS_NONE: aRbMoveNone.Check(TRUE); break;
- case INS_CELLSDOWN: aRbMoveDown.Check(TRUE); break;
- case INS_CELLSRIGHT: aRbMoveRight.Check(TRUE); break;
+ case INS_NONE: aRbMoveNone.Check(sal_True); break;
+ case INS_CELLSDOWN: aRbMoveDown.Check(sal_True); break;
+ case INS_CELLSRIGHT: aRbMoveRight.Check(sal_True); break;
}
aBtnSkipEmptyCells.Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_NOEMPTY ) != 0);
@@ -152,7 +152,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
//------------------------------------------------------------------------
-USHORT ScInsertContentsDlg::GetInsContentsCmdBits() const
+sal_uInt16 ScInsertContentsDlg::GetInsContentsCmdBits() const
{
ScInsertContentsDlg::nPreviousChecks = 0;
@@ -192,7 +192,7 @@ InsCellCmd ScInsertContentsDlg::GetMoveMode()
//------------------------------------------------------------------------
-void ScInsertContentsDlg::DisableChecks( BOOL bInsAllChecked )
+void ScInsertContentsDlg::DisableChecks( sal_Bool bInsAllChecked )
{
if ( bInsAllChecked )
{
@@ -243,7 +243,7 @@ void ScInsertContentsDlg::TestModes()
aFlFrame.Disable();
aBtnInsAll.Disable();
- DisableChecks(TRUE);
+ DisableChecks(sal_True);
}
else
{
@@ -267,52 +267,52 @@ void ScInsertContentsDlg::TestModes()
}
}
-void ScInsertContentsDlg::SetOtherDoc( BOOL bSet )
+void ScInsertContentsDlg::SetOtherDoc( sal_Bool bSet )
{
if ( bSet != bOtherDoc )
{
bOtherDoc = bSet;
TestModes();
if ( bSet )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
-void ScInsertContentsDlg::SetFillMode( BOOL bSet )
+void ScInsertContentsDlg::SetFillMode( sal_Bool bSet )
{
if ( bSet != bFillMode )
{
bFillMode = bSet;
TestModes();
if ( bSet )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
-void ScInsertContentsDlg::SetChangeTrack( BOOL bSet )
+void ScInsertContentsDlg::SetChangeTrack( sal_Bool bSet )
{
if ( bSet != bChangeTrack )
{
bChangeTrack = bSet;
TestModes();
if ( bSet )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
void ScInsertContentsDlg::SetCellShiftDisabled( int nDisable )
{
- BOOL bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0);
- BOOL bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0);
+ sal_Bool bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0);
+ sal_Bool bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0);
if ( bDown != bMoveDownDisabled || bRight != bMoveRightDisabled )
{
bMoveDownDisabled = bDown;
bMoveRightDisabled = bRight;
TestModes();
if ( bMoveDownDisabled && aRbMoveDown.IsChecked() )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
if ( bMoveRightDisabled && aRbMoveRight.IsChecked() )
- aRbMoveNone.Check(TRUE);
+ aRbMoveNone.Check(sal_True);
}
}
@@ -354,7 +354,7 @@ ScInsertContentsDlg::~ScInsertContentsDlg()
}
}
-USHORT ScInsertContentsDlg::GetFormulaCmdBits() const
+sal_uInt16 ScInsertContentsDlg::GetFormulaCmdBits() const
{
ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
if(aRbAdd.IsChecked())
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 132ba4282e6a..3a3e0726705e 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -70,9 +70,10 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT
: ModalDialog ( pParent, ScResId( RID_SCDLG_INSERT_TABLE ) ),
//
+ aFlPos ( this, ScResId( FL_POSITION ) ),
aBtnBefore ( this, ScResId( RB_BEFORE ) ),
aBtnBehind ( this, ScResId( RB_BEHIND ) ),
- aFlPos ( this, ScResId( FL_POSITION ) ),
+ aFlTable ( this, ScResId( FL_TABLE ) ),
aBtnNew ( this, ScResId( RB_NEW ) ),
aBtnFromFile ( this, ScResId( RB_FROMFILE ) ),
aFtCount ( this, ScResId( FT_COUNT ) ),
@@ -83,7 +84,6 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT
aFtPath ( this, ScResId( FT_PATH ) ),
aBtnBrowse ( this, ScResId( BTN_BROWSE ) ),
aBtnLink ( this, ScResId( CB_LINK ) ),
- aFlTable ( this, ScResId( FL_TABLE ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
@@ -101,6 +101,7 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT
#endif /* ENABLE_LAYOUT */
Init_Impl( bFromFile );
FreeResource();
+ aLbTables.SetAccessibleName(aBtnFromFile.GetText());
}
//------------------------------------------------------------------------
@@ -226,7 +227,7 @@ void ScInsertTableDlg::SetFromTo_Impl()
void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
{
- aLbTables.SetUpdateMode( FALSE );
+ aLbTables.SetUpdateMode( false );
aLbTables.Clear();
if ( pSrcDoc )
@@ -241,7 +242,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
}
}
- aLbTables.SetUpdateMode( TRUE );
+ aLbTables.SetUpdateMode( sal_True );
if(aLbTables.GetEntryCount()==1)
aLbTables.SelectEntryPos(0);
@@ -249,7 +250,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
//------------------------------------------------------------------------
-const String* ScInsertTableDlg::GetFirstTable( USHORT* pN )
+const String* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
{
const String* pStr = NULL;
@@ -272,7 +273,7 @@ const String* ScInsertTableDlg::GetFirstTable( USHORT* pN )
//------------------------------------------------------------------------
-const String* ScInsertTableDlg::GetNextTable( USHORT* pN )
+const String* ScInsertTableDlg::GetNextTable( sal_uInt16* pN )
{
const String* pStr = NULL;
@@ -393,7 +394,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
if ( pDocShTables )
pDocShTables->DoClose(); // delete passiert beim Zuweisen auf die Ref
- pMed->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMed->UseInteractionHandler( sal_True ); // to enable the filter options dialog
pDocShTables = new ScDocShell;
aDocShTablesRef = pDocShTables;
@@ -403,7 +404,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
pDocShTables->DoLoad( pMed );
SetPointer( aOldPtr );
- ULONG nErr = pDocShTables->GetErrorCode();
+ sal_uLong nErr = pDocShTables->GetErrorCode();
if ( nErr )
ErrorHandler::HandleError( nErr ); // auch Warnings
diff --git a/sc/source/ui/miscdlgs/instbdlg.src b/sc/source/ui/miscdlgs/instbdlg.src
index 20d3049bb501..7c5b90731b05 100644
--- a/sc/source/ui/miscdlgs/instbdlg.src
+++ b/sc/source/ui/miscdlgs/instbdlg.src
@@ -28,6 +28,7 @@
#include "instbdlg.hrc"
ModalDialog RID_SCDLG_INSERT_TABLE
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_INSERT_TABLE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 274 , 190 ) ;
@@ -58,6 +59,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
RadioButton RB_BEFORE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_BEFORE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
TabStop = TRUE ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
RadioButton RB_BEHIND
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_BEHIND";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
TabStop = TRUE ;
@@ -78,6 +81,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
RadioButton RB_NEW
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_NEW";
Pos = MAP_APPFONT ( 12 , 55 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
Text [ en-US ] = "~New sheet" ;
@@ -90,6 +94,7 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
NumericField NF_COUNT
{
+ HelpID = "sc:NumericField:RID_SCDLG_INSERT_TABLE:NF_COUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 66 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -108,18 +113,21 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
Edit ED_TABNAME
{
+ HelpID = "sc:Edit:RID_SCDLG_INSERT_TABLE:ED_TABNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 82 ) ;
Size = MAP_APPFONT ( 137 , 12 ) ;
};
RadioButton RB_FROMFILE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSERT_TABLE:RB_FROMFILE";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 197 , 10 ) ;
Text [ en-US ] = "~From file" ;
};
MultiListBox LB_TABLES
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_INSERT_TABLE:LB_TABLES";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 113 ) ;
@@ -128,12 +136,14 @@ ModalDialog RID_SCDLG_INSERT_TABLE
};
PushButton BTN_BROWSE
{
+ HelpID = "sc:PushButton:RID_SCDLG_INSERT_TABLE:BTN_BROWSE";
Pos = MAP_APPFONT ( 149 , 113 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Browse..." ;
};
CheckBox CB_LINK
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSERT_TABLE:CB_LINK";
Pos = MAP_APPFONT ( 149 , 131 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "Lin~k" ;
diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx
index 73681eb998f8..307e293384d6 100644
--- a/sc/source/ui/miscdlgs/lbseldlg.cxx
+++ b/sc/source/ui/miscdlgs/lbseldlg.cxx
@@ -45,7 +45,7 @@
//==================================================================
ScSelEntryDlg::ScSelEntryDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const String& aTitle,
const String& aLbTitle,
List& aEntryList ) :
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 93094b589776..baff23726e72 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -83,6 +83,9 @@ ScLinkedAreaDlg::ScLinkedAreaDlg( Window* pParent ) :
aLbRanges.SetSelectHdl( LINK( this, ScLinkedAreaDlg, RangeHdl ) );
aBtnReload.SetClickHdl( LINK( this, ScLinkedAreaDlg, ReloadHdl ) );
UpdateEnable();
+
+ aNfDelay.SetAccessibleName(aBtnReload.GetText());
+ aNfDelay.SetAccessibleRelationLabeledBy(&aBtnReload);
}
ScLinkedAreaDlg::~ScLinkedAreaDlg()
@@ -133,7 +136,7 @@ IMPL_LINK( ScLinkedAreaDlg, FileHdl, ComboBox*, EMPTYARG )
String aOptions;
// get filter name by looking at the file content (bWithContent = TRUE)
// Break operation if any error occurred inside.
- if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, TRUE, TRUE ))
+ if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, true, true ))
return 0;
// #i53241# replace HTML filter with DataQuery filter
@@ -166,11 +169,11 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter,
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, rFile );
- ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, TRUE ); // with interaction
+ ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, sal_True ); // with interaction
pSourceShell = aLoader.GetDocShell();
if ( pSourceShell )
{
- ULONG nErr = pSourceShell->GetErrorCode();
+ sal_uLong nErr = pSourceShell->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // including warnings
@@ -182,7 +185,7 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter,
void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilter,
const String& rOptions, const String& rSource,
- ULONG nRefresh )
+ sal_uLong nRefresh )
{
LoadDocument( rFile, rFilter, rOptions );
if (pSourceShell)
@@ -202,7 +205,7 @@ void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilte
aLbRanges.SelectEntry( aRange );
}
- BOOL bDoRefresh = ( nRefresh != 0 );
+ sal_Bool bDoRefresh = ( nRefresh != 0 );
aBtnReload.Check( bDoRefresh );
if (bDoRefresh)
aNfDelay.SetValue( nRefresh );
@@ -251,13 +254,13 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
if (pSourceShell)
pSourceShell->DoClose(); // deleted when assigning aSourceRef
- pMed->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMed->UseInteractionHandler( sal_True ); // to enable the filter options dialog
pSourceShell = new ScDocShell;
aSourceRef = pSourceShell;
pSourceShell->DoLoad( pMed );
- ULONG nErr = pSourceShell->GetErrorCode();
+ sal_uLong nErr = pSourceShell->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // including warnings
@@ -285,7 +288,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
void ScLinkedAreaDlg::UpdateSourceRanges()
{
- aLbRanges.SetUpdateMode( FALSE );
+ aLbRanges.SetUpdateMode( false );
aLbRanges.Clear();
if ( pSourceShell )
@@ -297,7 +300,7 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
aLbRanges.InsertEntry( aName );
}
- aLbRanges.SetUpdateMode( TRUE );
+ aLbRanges.SetUpdateMode( sal_True );
if ( aLbRanges.GetEntryCount() == 1 )
aLbRanges.SelectEntryPos(0);
@@ -305,10 +308,10 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
void ScLinkedAreaDlg::UpdateEnable()
{
- BOOL bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
+ sal_Bool bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
aBtnOk.Enable( bEnable );
- BOOL bReload = aBtnReload.IsChecked();
+ sal_Bool bReload = aBtnReload.IsChecked();
aNfDelay.Enable( bReload );
aFtSeconds.Enable( bReload );
}
@@ -346,8 +349,8 @@ String ScLinkedAreaDlg::GetOptions()
String ScLinkedAreaDlg::GetSource()
{
String aSource;
- USHORT nCount = aLbRanges.GetSelectEntryCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = aLbRanges.GetSelectEntryCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if (i > 0)
aSource.Append( (sal_Unicode) ';' );
@@ -356,10 +359,10 @@ String ScLinkedAreaDlg::GetSource()
return aSource;
}
-ULONG ScLinkedAreaDlg::GetRefresh()
+sal_uLong ScLinkedAreaDlg::GetRefresh()
{
if ( aBtnReload.IsChecked() )
- return sal::static_int_cast<ULONG>( aNfDelay.GetValue() );
+ return sal::static_int_cast<sal_uLong>( aNfDelay.GetValue() );
else
return 0; // disabled
}
diff --git a/sc/source/ui/miscdlgs/linkarea.src b/sc/source/ui/miscdlgs/linkarea.src
index 715d3fd20766..11780c2995fe 100644
--- a/sc/source/ui/miscdlgs/linkarea.src
+++ b/sc/source/ui/miscdlgs/linkarea.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_LINKAREA
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_LINKAREA";
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
@@ -58,6 +59,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
ComboBox CB_URL
{
+ HelpID = "sc:ComboBox:RID_SCDLG_LINKAREA:CB_URL";
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 174 , 80 ) ;
TabStop = TRUE ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
PushButton BTN_BROWSE
{
+ HelpID = "sc:PushButton:RID_SCDLG_LINKAREA:BTN_BROWSE";
Pos = MAP_APPFONT ( 190 , 14 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Text = "~..." ;
@@ -84,6 +87,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
MultiListBox LB_RANGES
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_LINKAREA:LB_RANGES";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 74 ) ;
@@ -92,6 +96,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
CheckBox BTN_RELOAD
{
+ HelpID = "sc:CheckBox:RID_SCDLG_LINKAREA:BTN_RELOAD";
Pos = MAP_APPFONT ( 12 , 168 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -99,6 +104,7 @@ ModalDialog RID_SCDLG_LINKAREA
};
NumericField NF_DELAY
{
+ HelpID = "sc:NumericField:RID_SCDLG_LINKAREA:NF_DELAY";
Border = TRUE ;
Pos = MAP_APPFONT ( 113 , 166 ) ;
Size = MAP_APPFONT ( 32 , 12 ) ;
diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx
index 972fe37e5abe..d49e3c0a6b21 100644
--- a/sc/source/ui/miscdlgs/mtrindlg.cxx
+++ b/sc/source/ui/miscdlgs/mtrindlg.cxx
@@ -43,11 +43,11 @@
//==================================================================
ScMetricInputDlg::ScMetricInputDlg( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
long nCurrent,
long nDefault,
FieldUnit eFUnit,
- USHORT nDecimals,
+ sal_uInt16 nDecimals,
long nMaximum,
long nMinimum,
long nFirst,
@@ -99,14 +99,14 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const
mit Nachkommastellen:
double nVal = aEdValue.GetValue( eUnit );
- USHORT nDecs = aEdValue.GetDecimalDigits();
+ sal_uInt16 nDecs = aEdValue.GetDecimalDigits();
double nFactor = 0.0;
- // static long ImpPower10( USHORT nDecs )
+ // static long ImpPower10( sal_uInt16 nDecs )
{
nFactor = 1.0;
- for ( USHORT i=0; i < nDecs; i++ )
+ for ( sal_uInt16 i=0; i < nDecs; i++ )
nFactor *= 10.0;
}
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 7afa05bda563..c2a4d2036c7f 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -104,7 +104,7 @@ ScMoveTableDlg::~ScMoveTableDlg()
//------------------------------------------------------------------------
-USHORT ScMoveTableDlg::GetSelectedDocument () const { return nDocument; }
+sal_uInt16 ScMoveTableDlg::GetSelectedDocument () const { return nDocument; }
SCTAB ScMoveTableDlg::GetSelectedTable () const { return nTable; }
@@ -124,7 +124,7 @@ void ScMoveTableDlg::SetForceCopyTable()
aBtnCopy.Disable();
}
-void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
+void ScMoveTableDlg::EnableCopyTable(sal_Bool bFlag)
{
if(bFlag)
aBtnCopy.Enable();
@@ -132,7 +132,7 @@ void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
aBtnCopy.Disable();
}
-void ScMoveTableDlg::EnableRenameTable(BOOL bFlag)
+void ScMoveTableDlg::EnableRenameTable(sal_Bool bFlag)
{
bRenameTable = bFlag;
aEdTabName.Enable(bFlag);
@@ -195,8 +195,8 @@ void ScMoveTableDlg::CheckNewTabName()
}
bool bFound = false;
- USHORT nLast = aLbTable.GetEntryCount() - 1;
- for ( USHORT i=0; i<=nLast; ++i )
+ sal_uInt16 nLast = aLbTable.GetEntryCount() - 1;
+ for ( sal_uInt16 i=0; i<=nLast; ++i )
{
if ( rNewName == aLbTable.GetEntry( i ) )
{
@@ -226,7 +226,7 @@ void ScMoveTableDlg::CheckNewTabName()
ScDocument* ScMoveTableDlg::GetSelectedDoc()
{
- USHORT nPos = aLbDoc.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbDoc.GetSelectEntryPos();
return static_cast<ScDocument*>(aLbDoc.GetEntryData(nPos));
}
@@ -238,8 +238,8 @@ void ScMoveTableDlg::Init()
aLbDoc.SetSelectHdl ( LINK( this, ScMoveTableDlg, SelHdl ) );
aBtnCopy.SetToggleHdl( LINK( this, ScMoveTableDlg, CheckBtnHdl ) );
aEdTabName.SetModifyHdl( LINK( this, ScMoveTableDlg, CheckNameHdl ) );
- aBtnMove.Check( TRUE );
- aBtnCopy.Check( FALSE );
+ aBtnMove.Check( true );
+ aBtnCopy.Check( false );
aEdTabName.Enable(false);
aFtWarn.SetControlBackground( Color( COL_YELLOW ) );
aFtWarn.Hide();
@@ -253,12 +253,12 @@ void ScMoveTableDlg::InitDocListBox()
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
ScDocShell* pScSh = NULL;
- USHORT nSelPos = 0;
- USHORT i = 0;
+ sal_uInt16 nSelPos = 0;
+ sal_uInt16 i = 0;
String aEntryName;
aLbDoc.Clear();
- aLbDoc.SetUpdateMode( FALSE );
+ aLbDoc.SetUpdateMode( false );
while ( pSh )
{
@@ -283,7 +283,7 @@ void ScMoveTableDlg::InitDocListBox()
pSh = SfxObjectShell::GetNext( *pSh );
}
- aLbDoc.SetUpdateMode( TRUE );
+ aLbDoc.SetUpdateMode( sal_True );
aLbDoc.InsertEntry( String( ScResId( STR_NEWDOC ) ) );
aLbDoc.SelectEntryPos( nSelPos );
}
@@ -301,10 +301,10 @@ IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn )
IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
{
- USHORT nDocSel = aLbDoc.GetSelectEntryPos();
- USHORT nDocLast = aLbDoc.GetEntryCount()-1;
- USHORT nTabSel = aLbTable.GetSelectEntryPos();
- USHORT nTabLast = aLbTable.GetEntryCount()-1;
+ sal_uInt16 nDocSel = aLbDoc.GetSelectEntryPos();
+ sal_uInt16 nDocLast = aLbDoc.GetEntryCount()-1;
+ sal_uInt16 nTabSel = aLbTable.GetSelectEntryPos();
+ sal_uInt16 nTabLast = aLbTable.GetEntryCount()-1;
nDocument = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW;
nTable = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND;
@@ -342,7 +342,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
String aName;
aLbTable.Clear();
- aLbTable.SetUpdateMode( FALSE );
+ aLbTable.SetUpdateMode( false );
if ( pDoc )
{
SCTAB nLast = pDoc->GetTableCount()-1;
@@ -353,7 +353,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
}
}
aLbTable.InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) );
- aLbTable.SetUpdateMode( TRUE );
+ aLbTable.SetUpdateMode( sal_True );
aLbTable.SelectEntryPos( 0 );
ResetRenameInput();
}
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index 269ae78ad21f..ed7921c6f177 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -42,7 +42,7 @@
//==================================================================
-ScNameCreateDlg::ScNameCreateDlg( Window * pParent, USHORT nFlags )
+ScNameCreateDlg::ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags )
: ModalDialog( pParent, ScResId(RID_SCDLG_NAMES_CREATE) ),
aFixedLine ( this, ScResId( FL_FRAME ) ),
aTopBox ( this, ScResId( BTN_TOP ) ),
@@ -53,19 +53,19 @@ ScNameCreateDlg::ScNameCreateDlg( Window * pParent, USHORT nFlags )
aCancelButton ( this, ScResId( BTN_CANCEL ) ),
aHelpButton ( this, ScResId( BTN_HELP ) )
{
- aTopBox.Check ( (nFlags & NAME_TOP) ? TRUE : FALSE );
- aLeftBox.Check ( (nFlags & NAME_LEFT) ? TRUE : FALSE );
- aBottomBox.Check( (nFlags & NAME_BOTTOM)? TRUE : FALSE );
- aRightBox.Check ( (nFlags & NAME_RIGHT) ? TRUE : FALSE );
+ aTopBox.Check ( (nFlags & NAME_TOP) ? sal_True : false );
+ aLeftBox.Check ( (nFlags & NAME_LEFT) ? sal_True : false );
+ aBottomBox.Check( (nFlags & NAME_BOTTOM)? sal_True : false );
+ aRightBox.Check ( (nFlags & NAME_RIGHT) ? sal_True : false );
FreeResource();
}
//------------------------------------------------------------------
-USHORT ScNameCreateDlg::GetFlags() const
+sal_uInt16 ScNameCreateDlg::GetFlags() const
{
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
nResult |= aTopBox.IsChecked() ? NAME_TOP: 0 ;
nResult |= aLeftBox.IsChecked() ? NAME_LEFT: 0 ;
diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx
index ea17b22bd4f2..1f28fc4a9258 100644
--- a/sc/source/ui/miscdlgs/namepast.cxx
+++ b/sc/source/ui/miscdlgs/namepast.cxx
@@ -43,7 +43,7 @@
//==================================================================
-ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList )
+ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList )
: ModalDialog( pParent, ScResId( RID_SCDLG_NAMES_PASTE ) ),
aLabelText ( this, ScResId( FT_LABEL ) ),
aNameList ( this, ScResId( LB_ENTRYLIST ) ),
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 233a028411f7..39becaf0990c 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -68,7 +68,7 @@ ScSolverProgressDialog::ScSolverProgressDialog( Window* pParent )
maFlButtons ( this, ScResId( FL_BUTTONS ) ),
maBtnOk ( this, ScResId( BTN_OK ) )
{
- maBtnOk.Enable(FALSE);
+ maBtnOk.Enable(false);
FreeResource();
}
@@ -160,7 +160,7 @@ void ScCursorRefEdit::KeyInput( const KeyEvent& rKEvt )
//----------------------------------------------------------------------------
-ScOptSolverSave::ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue,
+ScOptSolverSave::ScOptSolverSave( const String& rObjective, sal_Bool bMax, sal_Bool bMin, sal_Bool bValue,
const String& rTarget, const String& rVariable,
const std::vector<ScOptConditionRow>& rConditions,
const String& rEngine,
@@ -270,6 +270,19 @@ ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
mpOperator[3] = &maLbOp4;
mpDelButton[3] = &maBtnDel4;
+ maRbMax.SetAccessibleRelationMemberOf(&maFtDirection);
+ maRbMin.SetAccessibleRelationMemberOf(&maFtDirection);
+ maRbValue.SetAccessibleRelationMemberOf(&maFtDirection);
+ maEdLeft2.SetAccessibleName(maFtCellRef.GetText());
+ maLbOp2.SetAccessibleName(maFtOperator.GetText());
+ maEdRight2.SetAccessibleName(maFtConstraint.GetText());
+ maEdLeft3.SetAccessibleName(maFtCellRef.GetText());
+ maLbOp3.SetAccessibleName(maFtOperator.GetText());
+ maEdRight3.SetAccessibleName(maFtConstraint.GetText());
+ maEdLeft4.SetAccessibleName(maFtCellRef.GetText());
+ maLbOp4.SetAccessibleName(maFtOperator.GetText());
+ maEdRight4.SetAccessibleName(maFtConstraint.GetText());
+
Init( aCursorPos );
FreeResource();
}
@@ -290,7 +303,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_DEL_ROWS ) );
uno::Reference<frame::XFrame> xFrame = GetBindings().GetActiveFrame();
- Image aDelNm = ::GetImage( xFrame, aSlotURL, FALSE );
+ Image aDelNm = ::GetImage( xFrame, aSlotURL, false );
for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
{
@@ -450,7 +463,7 @@ void ScOptSolverDlg::EnableButtons()
//----------------------------------------------------------------------------
-BOOL ScOptSolverDlg::Close()
+sal_Bool ScOptSolverDlg::Close()
{
return DoClose( ScOptSolverDlgWrapper::GetChildWindowId() );
}
@@ -495,7 +508,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
aStr = aName;
else // format cell/range reference
{
- USHORT nFmt = ( aAdr.Tab() == mnCurTab ) ? SCA_ABS : SCA_ABS_3D;
+ sal_uInt16 nFmt = ( aAdr.Tab() == mnCurTab ) ? SCA_ABS : SCA_ABS_3D;
if ( bSingle )
aAdr.Format( aStr, nFmt, pDocP, pDocP->GetAddressConvention() );
else
@@ -528,7 +541,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScOptSolverDlg::IsRefInputMode() const
+sal_Bool ScOptSolverDlg::IsRefInputMode() const
{
return mpEdActive != NULL;
}
@@ -542,7 +555,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn )
{
bool bSolve = ( pBtn == &maBtnSolve );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
bool bClose = true;
@@ -562,7 +575,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn )
else
{
// no solution -> dialog is kept open
- SetDispatcherLock( TRUE );
+ SetDispatcherLock( sal_True );
}
}
else if ( pBtn == &maBtnOpt )
@@ -627,7 +640,7 @@ IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn )
for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
if( pBtn == mpDelButton[nRow] )
{
- BOOL bHadFocus = pBtn->HasFocus();
+ sal_Bool bHadFocus = pBtn->HasFocus();
ReadConditions();
long nVecPos = nScrollPos + nRow;
@@ -770,7 +783,7 @@ bool ScOptSolverDlg::ParseRef( ScRange& rRange, const String& rInput, bool bAllo
{
ScRangeUtil aRangeUtil;
ScAddress::Details aDetails(mpDoc->GetAddressConvention(), 0, 0);
- USHORT nFlags = rRange.ParseAny( rInput, mpDoc, aDetails );
+ sal_uInt16 nFlags = rRange.ParseAny( rInput, mpDoc, aDetails );
if ( nFlags & SCA_VALID )
{
if ( (nFlags & SCA_TAB_3D) == 0 )
@@ -1020,7 +1033,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
{
ScAddress aCellPos;
ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] );
- aFunc.PutCell( aCellPos, new ScValueCell( aSolution[nVarPos] ), TRUE );
+ aFunc.PutCell( aCellPos, new ScValueCell( aSolution[nVarPos] ), sal_True );
}
mpDocShell->UnlockPaint();
}
@@ -1055,7 +1068,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
{
ScAddress aCellPos;
ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] );
- aFunc.PutCell( aCellPos, new ScValueCell( aOldValues[nVarPos] ), TRUE );
+ aFunc.PutCell( aCellPos, new ScValueCell( aOldValues[nVarPos] ), sal_True );
}
mpDocShell->UnlockPaint();
}
diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx
index 4a8fbc15b4e7..90157f61f3ec 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.cxx
+++ b/sc/source/ui/miscdlgs/protectiondlg.cxx
@@ -43,7 +43,7 @@ static const ScTableProtection::Option aOptions[] = {
ScTableProtection::SELECT_LOCKED_CELLS,
ScTableProtection::SELECT_UNLOCKED_CELLS,
};
-static const USHORT nOptionCount = SAL_N_ELEMENTS(aOptions);
+static const sal_uInt16 nOptionCount = SAL_N_ELEMENTS(aOptions);
ScTableProtectionDlg::ScTableProtectionDlg(Window* pParent) :
@@ -80,7 +80,7 @@ short ScTableProtectionDlg::Execute()
void ScTableProtectionDlg::SetDialogData(const ScTableProtection& rData)
{
- for (USHORT i = 0; i < nOptionCount; ++i)
+ for (sal_uInt16 i = 0; i < nOptionCount; ++i)
maOptionsListBox.CheckEntryPos(i, rData.isOptionEnabled(aOptions[i]));
}
@@ -91,7 +91,7 @@ void ScTableProtectionDlg::WriteData(ScTableProtection& rData) const
// We assume that the two password texts match.
rData.setPassword(maPassword1Edit.GetText());
- for (USHORT i = 0; i < nOptionCount; ++i)
+ for (sal_uInt16 i = 0; i < nOptionCount; ++i)
rData.setOption(aOptions[i], maOptionsListBox.IsChecked(i));
}
diff --git a/sc/source/ui/miscdlgs/protectiondlg.src b/sc/source/ui/miscdlgs/protectiondlg.src
index d009f824580b..aca43c6beeb3 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.src
+++ b/sc/source/ui/miscdlgs/protectiondlg.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_TABPROTECTION
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_TABPROTECTION";
Text [ en-US ] = "Protect Sheet" ;
Size = MAP_APPFONT ( 220 , 135 ) ;
Moveable = TRUE ;
@@ -53,6 +54,7 @@ ModalDialog RID_SCDLG_TABPROTECTION
CheckBox BTN_PROTECT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_TABPROTECTION:BTN_PROTECT";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 150 , 10 );
@@ -69,6 +71,7 @@ ModalDialog RID_SCDLG_TABPROTECTION
Edit ED_PASSWORD1
{
+ HelpID = "sc:Edit:RID_SCDLG_TABPROTECTION:ED_PASSWORD1";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 56, 22 );
@@ -85,6 +88,7 @@ ModalDialog RID_SCDLG_TABPROTECTION
Edit ED_PASSWORD2
{
+ HelpID = "sc:Edit:RID_SCDLG_TABPROTECTION:ED_PASSWORD2";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 56, 39 );
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index cae6a64ce233..1aaf202e7a3f 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -41,12 +41,12 @@
//------------------------------------------------------------------------
ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
- ScDocShell *pShell,ScChangeAction *pAction,BOOL bPrevNext)
+ ScDocShell *pShell,ScChangeAction *pAction,sal_Bool bPrevNext)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, TRUE );
+ pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, true );
DBG_ASSERT(pDlg, "Dialog creation failed!");
pDocShell=pShell;
pDlg->DontChangeAuthor();
@@ -116,8 +116,8 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction)
pDlg->SetText(aTitle);
aComment=pChangeAction->GetComment();
- BOOL bNext=FindNext(pChangeAction)!=NULL;
- BOOL bPrev=FindPrev(pChangeAction)!=NULL;
+ sal_Bool bNext=FindNext(pChangeAction)!=NULL;
+ sal_Bool bPrev=FindPrev(pChangeAction)!=NULL;
pDlg->EnableTravel(bNext,bPrev);
String aAuthor = pChangeAction->GetUser();
@@ -125,7 +125,7 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction)
DateTime aDT = pChangeAction->GetDateTime();
String aDate = ScGlobal::pLocaleData->getDate( aDT );
aDate += ' ';
- aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE );
+ aDate += ScGlobal::pLocaleData->getTime( aDT, false, false );
pDlg->ShowLastAuthor(aAuthor, aDate);
pDlg->SetNote(aComment);
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.src b/sc/source/ui/miscdlgs/retypepassdlg.src
index 2c3f93a6d6a0..0c9f11e46947 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.src
+++ b/sc/source/ui/miscdlgs/retypepassdlg.src
@@ -29,6 +29,7 @@
ModalDialog RID_SCDLG_RETYPEPASS
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_RETYPEPASS";
Text [ en-US ] = "Re-type Password" ;
Size = MAP_APPFONT ( 260 , 165 ) ;
Moveable = TRUE ;
@@ -81,6 +82,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_DOC
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_DOC";
Pos = MAP_APPFONT ( 158, 59 );
Size = MAP_APPFONT ( 30, 14 );
@@ -113,6 +115,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET1
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET1";
Pos = MAP_APPFONT ( 158, 94 );
Size = MAP_APPFONT ( 30, 14 );
@@ -137,6 +140,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET2
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET2";
Pos = MAP_APPFONT ( 158, 110 );
Size = MAP_APPFONT ( 30, 14 );
@@ -161,6 +165,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET3
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET3";
Pos = MAP_APPFONT ( 158, 126 );
Size = MAP_APPFONT ( 30, 14 );
@@ -185,6 +190,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
PushButton BTN_RETYPE_SHEET4
{
+ HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET4";
Pos = MAP_APPFONT ( 158, 142 );
Size = MAP_APPFONT ( 30, 14 );
@@ -228,6 +234,7 @@ ModalDialog RID_SCDLG_RETYPEPASS
ModalDialog RID_SCDLG_RETYPEPASS_INPUT
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_RETYPEPASS_INPUT";
Text [ en-US ] = "Re-type Password" ;
Size = MAP_APPFONT ( 230 , 110 ) ;
Moveable = TRUE ;
@@ -254,6 +261,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
RadioButton BTN_RETYPE_PASSWORD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_RETYPEPASS_INPUT:BTN_RETYPE_PASSWORD";
Pos = MAP_APPFONT ( 11, 10 );
Size = MAP_APPFONT ( 150, 10 );
@@ -270,6 +278,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
Edit ED_PASSWORD1
{
+ HelpID = "sc:Edit:RID_SCDLG_RETYPEPASS_INPUT:ED_PASSWORD1";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 65, 29 );
@@ -286,6 +295,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
Edit ED_PASSWORD2
{
+ HelpID = "sc:Edit:RID_SCDLG_RETYPEPASS_INPUT:ED_PASSWORD2";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT ( 65, 44 );
@@ -294,6 +304,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
CheckBox BTN_MATCH_OLD_PASSWORD
{
+ HelpID = "sc:CheckBox:RID_SCDLG_RETYPEPASS_INPUT:BTN_MATCH_OLD_PASSWORD";
Pos = MAP_APPFONT ( 20, 65 );
Size = MAP_APPFONT ( 150, 10 );
@@ -302,6 +313,7 @@ ModalDialog RID_SCDLG_RETYPEPASS_INPUT
RadioButton BTN_REMOVE_PASSWORD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_RETYPEPASS_INPUT:BTN_REMOVE_PASSWORD";
Pos = MAP_APPFONT ( 11, 90 );
Size = MAP_APPFONT ( 150, 10 );
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 943b965e7b69..9ed724c31063 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -50,7 +50,7 @@
#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <comphelper/processfactory.hxx>
-
+#include <sfx2/sfxresid.hxx>
#include "sc.hrc"
#include "scmod.hxx"
#include "attrib.hxx"
@@ -102,8 +102,8 @@ ScAutoFormatDlg::ScAutoFormatDlg( Window* pParent,
pFormat ( pAutoFormat ),
pSelFmtData ( pSelFormatData ),
nIndex ( 0 ),
- bCoreDataChanged( FALSE ),
- bFmtInserted ( FALSE )
+ bCoreDataChanged( false ),
+ bFmtInserted ( false )
{
Init();
pWndPreview->NotifyChange( (*pFormat)[0] );
@@ -121,7 +121,7 @@ ScAutoFormatDlg::~ScAutoFormatDlg()
void ScAutoFormatDlg::Init()
{
- USHORT nCount;
+ sal_uInt16 nCount;
String aEntry;
aLbFormat .SetSelectHdl( LINK( this, ScAutoFormatDlg, SelFmtHdl ) );
@@ -149,7 +149,7 @@ void ScAutoFormatDlg::Init()
nCount = pFormat->GetCount();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
((*pFormat)[i])->GetName( aEntry );
aLbFormat.InsertEntry( aEntry );
@@ -169,7 +169,7 @@ void ScAutoFormatDlg::Init()
{
aBtnAdd.Disable();
aBtnRemove.Disable();
- bFmtInserted = TRUE;
+ bFmtInserted = sal_True;
}
}
@@ -220,7 +220,7 @@ IMPL_LINK_INLINE_END( ScAutoFormatDlg, DblClkHdl, void *, EMPTYARG )
IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn )
{
ScAutoFormatData* pData = (*pFormat)[nIndex];
- BOOL bCheck = ((CheckBox*)pBtn)->IsChecked();
+ sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked();
if ( pBtn == &aBtnNumFormat )
pData->SetIncludeValueFormat( bCheck );
@@ -238,7 +238,7 @@ IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pWndPreview->NotifyChange( pData );
@@ -252,10 +252,10 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
{
if ( !bFmtInserted && pSelFmtData )
{
- String aStrStandard( ScResId(STR_STANDARD) );
+ String aStrStandard( SfxResId(STR_STANDARD) );
String aFormatName;
ScStringInputDlg* pDlg;
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
while ( !bOk )
{
@@ -263,7 +263,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
aStrTitle,
aStrLabel,
aFormatName,
- HID_SC_ADD_AUTOFMT );
+ HID_SC_ADD_AUTOFMT, HID_SC_AUTOFMT_NAME );
if ( pDlg->Execute() == RET_OK )
{
@@ -279,7 +279,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( bFmtInserted )
{
- USHORT nAt = pFormat->IndexOf( pNewData );
+ sal_uInt16 nAt = pFormat->IndexOf( pNewData );
aLbFormat.InsertEntry( aFormatName, nAt );
aLbFormat.SelectEntry( aFormatName );
@@ -288,11 +288,11 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
+ bOk = sal_True;
}
else
delete pNewData;
@@ -301,7 +301,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
if ( !bFmtInserted )
{
- USHORT nRet = ErrorBox( this,
+ sal_uInt16 nRet = ErrorBox( this,
WinBits( WB_OK_CANCEL | WB_DEF_OK),
ScGlobal::GetRscString(STR_INVALID_AFNAME)
).Execute();
@@ -310,7 +310,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
@@ -342,7 +342,7 @@ IMPL_LINK( ScAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pFormat->AtFree( nIndex ); // in der Core loeschen
@@ -359,7 +359,7 @@ IMPL_LINK( ScAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
while( !bOk )
{
@@ -370,12 +370,12 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
aStrRename,
aStrLabel,
aFormatName,
- HID_SC_REN_AFMT_DLG );
+ HID_SC_REN_AFMT_DLG, HID_SC_REN_AFMT_NAME );
if( pDlg->Execute() == RET_OK )
{
- BOOL bFmtRenamed = FALSE;
+ sal_Bool bFmtRenamed = false;
pDlg->GetInputString( aFormatName );
- USHORT n;
+ sal_uInt16 n;
if ( aFormatName.Len() > 0 )
{
@@ -401,29 +401,29 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
pFormat->Insert( pNewData);
- USHORT nCount = pFormat->GetCount();
+ sal_uInt16 nCount = pFormat->GetCount();
- aLbFormat.SetUpdateMode(FALSE);
+ aLbFormat.SetUpdateMode(false);
aLbFormat.Clear();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
((*pFormat)[i])->GetName( aEntry );
aLbFormat.InsertEntry( aEntry );
}
- aLbFormat.SetUpdateMode( TRUE);
+ aLbFormat.SetUpdateMode( sal_True);
aLbFormat.SelectEntry( aFormatName);
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
- bFmtRenamed = TRUE;
+ bOk = sal_True;
+ bFmtRenamed = sal_True;
}
}
if( !bFmtRenamed )
@@ -435,7 +435,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index b96a1ad73594..5b5492dccc8e 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -159,12 +159,12 @@ void ScShareDocumentDlg::UpdateView()
::rtl::OUString aDateStr = aDateTimeStr.getToken( 0, ' ', nIndex );
::rtl::OUString aTimeStr = aDateTimeStr.getToken( 0, ' ', nIndex );
nIndex = 0;
- USHORT nDay = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
- USHORT nMonth = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
- USHORT nYear = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
+ sal_uInt16 nDay = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
+ sal_uInt16 nMonth = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
+ sal_uInt16 nYear = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() );
nIndex = 0;
- USHORT nHours = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
- USHORT nMinutes = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
+ sal_uInt16 nHours = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
+ sal_uInt16 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
Date aDate( nDay, nMonth, nYear );
Time aTime( nHours, nMinutes );
DateTime aDateTime( aDate, aTime );
@@ -173,7 +173,7 @@ void ScShareDocumentDlg::UpdateView()
aString += '\t';
aString += ScGlobal::pLocaleData->getDate( aDateTime );
aString += ' ';
- aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE );
+ aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
maLbUsers.InsertEntry( aString, NULL );
}
@@ -229,7 +229,7 @@ void ScShareDocumentDlg::UpdateView()
aString += ScGlobal::pLocaleData->getDate( aDateTime );
aString += ' ';
- aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE );
+ aString += ScGlobal::pLocaleData->getTime( aDateTime, false );
maLbUsers.InsertEntry( aString, NULL );
}
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.src b/sc/source/ui/miscdlgs/sharedocdlg.src
index fe55ee58c8e4..2accd0300bbd 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.src
+++ b/sc/source/ui/miscdlgs/sharedocdlg.src
@@ -30,7 +30,7 @@
ModalDialog RID_SCDLG_SHAREDOCUMENT
{
OutputSize = TRUE ;
- HelpId = SID_SHARE_DOC ;
+ HelpId = CMD_SID_SHARE_DOC ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 204 , 186 ) ;
Text [ en-US ] = "Share Document" ;
@@ -38,6 +38,7 @@ ModalDialog RID_SCDLG_SHAREDOCUMENT
Closeable = TRUE ;
CheckBox CB_SHARE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SHAREDOCUMENT:CB_SHARE";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 192 , 8 ) ;
Text [ en-US ] = "Share this spreadsheet with other users" ;
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx
index 5cb89a26d32e..7e5ab24eb412 100644
--- a/sc/source/ui/miscdlgs/shtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/shtabdlg.cxx
@@ -46,11 +46,11 @@
ScShowTabDlg::ScShowTabDlg( Window* pParent ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_SHOW_TAB ) ),
+ aFtLbTitle ( this, ScResId( FT_LABEL ) ),
aLb ( this, ScResId( LB_ENTRYLIST ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
- aFtLbTitle ( this, ScResId( FT_LABEL ) )
+ aBtnHelp ( this, ScResId( BTN_HELP ) )
{
aLb.Clear();
aLb.SetDoubleClickHdl( LINK( this, ScShowTabDlg, DblClkHdl ) );
@@ -63,15 +63,15 @@ ScShowTabDlg::ScShowTabDlg( Window* pParent ) :
void ScShowTabDlg::SetDescription(
const String& rTitle, const String& rFixedText,
- ULONG nDlgHelpId, ULONG nLbHelpId )
+ const rtl::OString& rDlgHelpId, const rtl::OString& sLbHelpId )
{
SetText( rTitle );
aFtLbTitle.SetText( rFixedText );
- SetHelpId( nDlgHelpId );
- aLb.SetHelpId( nLbHelpId );
+ SetHelpId( rDlgHelpId );
+ aLb.SetHelpId( sLbHelpId );
}
-void ScShowTabDlg::Insert( const String& rString, BOOL bSelected )
+void ScShowTabDlg::Insert( const String& rString, sal_Bool bSelected )
{
aLb.InsertEntry( rString );
if( bSelected )
@@ -80,17 +80,17 @@ void ScShowTabDlg::Insert( const String& rString, BOOL bSelected )
//------------------------------------------------------------------------
-USHORT ScShowTabDlg::GetSelectEntryCount() const
+sal_uInt16 ScShowTabDlg::GetSelectEntryCount() const
{
return aLb.GetSelectEntryCount();
}
-String ScShowTabDlg::GetSelectEntry(USHORT nPos) const
+String ScShowTabDlg::GetSelectEntry(sal_uInt16 nPos) const
{
return aLb.GetSelectEntry(nPos);
}
-USHORT ScShowTabDlg::GetSelectEntryPos(USHORT nPos) const
+sal_uInt16 ScShowTabDlg::GetSelectEntryPos(sal_uInt16 nPos) const
{
return aLb.GetSelectEntryPos(nPos);
}
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index f39a9b1fb927..5d5a8ba468fd 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -81,22 +81,22 @@ ScSimpleRefDlg::ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
//
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
- bRefInputMode ( FALSE ),
- bAutoReOpen ( TRUE ),
- bCloseOnButtonUp( FALSE ),
- bSingleCell ( FALSE ),
- bMultiSelection ( FALSE )
+ bRefInputMode ( false ),
+ bAutoReOpen ( sal_True ),
+ bCloseOnButtonUp( false ),
+ bSingleCell ( false ),
+ bMultiSelection ( false )
{
// damit die Strings in der Resource bei den FixedTexten bleiben koennen:
Init();
FreeResource();
- SetDispatcherLock( TRUE ); // Modal-Modus einschalten
+ SetDispatcherLock( sal_True ); // Modal-Modus einschalten
}
//----------------------------------------------------------------------------
ScSimpleRefDlg::~ScSimpleRefDlg()
{
- SetDispatcherLock( FALSE ); // Modal-Modus einschalten
+ SetDispatcherLock( false ); // Modal-Modus einschalten
}
//----------------------------------------------------------------------------
@@ -117,7 +117,7 @@ void ScSimpleRefDlg::Init()
{
aBtnOk.SetClickHdl ( LINK( this, ScSimpleRefDlg, OkBtnHdl ) );
aBtnCancel.SetClickHdl ( LINK( this, ScSimpleRefDlg, CancelBtnHdl ) );
- bCloseFlag=FALSE;
+ bCloseFlag=false;
}
//----------------------------------------------------------------------------
@@ -160,10 +160,10 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScSimpleRefDlg::Close()
+sal_Bool ScSimpleRefDlg::Close()
{
CancelBtnHdl(&aBtnCancel);
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -178,9 +178,9 @@ void ScSimpleRefDlg::SetActive()
RefInputDone();
}
//------------------------------------------------------------------------
-BOOL ScSimpleRefDlg::IsRefInputMode() const
+sal_Bool ScSimpleRefDlg::IsRefInputMode() const
{
- return TRUE;
+ return sal_True;
}
String ScSimpleRefDlg::GetRefString() const
@@ -201,7 +201,7 @@ void ScSimpleRefDlg::SetUnoLinks( const Link& rDone, const Link& rAbort,
aChangeHdl = rChange;
}
-void ScSimpleRefDlg::SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection )
+void ScSimpleRefDlg::SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection )
{
bCloseOnButtonUp = bSetCloseOnButtonUp;
bSingleCell = bSetSingleCell;
@@ -217,10 +217,10 @@ void ScSimpleRefDlg::StartRefInput()
}
aRbAssign.DoRef();
- bCloseFlag=TRUE;
+ bCloseFlag=sal_True;
}
-void ScSimpleRefDlg::RefInputDone( BOOL bForced)
+void ScSimpleRefDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
if ( (bForced || bCloseOnButtonUp) && bCloseFlag )
@@ -231,7 +231,7 @@ void ScSimpleRefDlg::RefInputDone( BOOL bForced)
// ========
IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG )
{
- bAutoReOpen=FALSE;
+ bAutoReOpen=false;
String aResult=aEdAssign.GetText();
aCloseHdl.Call(&aResult);
Link aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose
@@ -243,7 +243,7 @@ IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG )
//------------------------------------------------------------------------
IMPL_LINK( ScSimpleRefDlg, CancelBtnHdl, void *, EMPTYARG )
{
- bAutoReOpen=FALSE;
+ bAutoReOpen=false;
String aResult=aEdAssign.GetText();
aCloseHdl.Call(NULL);
Link aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 4ed6eebb07cb..9927d5060306 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -77,7 +77,7 @@ class ScSolverOptionsString : public SvLBoxString
sal_Int32 mnIntValue;
public:
- ScSolverOptionsString( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) :
+ ScSolverOptionsString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) :
SvLBoxString( pEntry, nFlags, rStr ),
mbIsDouble( false ),
mfDoubleValue( 0.0 ),
@@ -90,10 +90,10 @@ public:
void SetDoubleValue( double fNew ) { mbIsDouble = true; mfDoubleValue = fNew; }
void SetIntValue( sal_Int32 nNew ) { mbIsDouble = false; mnIntValue = nNew; }
- virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry );
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
};
-void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* /* pEntry */ )
+void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* /* pEntry */ )
{
//! move position? (SvxLinguTabPage: aPos.X() += 20)
String aNormalStr( GetText() );
@@ -146,7 +146,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( Window* pParent,
maBtnEdit.SetClickHdl( LINK( this, ScSolverOptionsDialog, ButtonHdl ) );
- maLbSettings.SetWindowBits( WB_CLIPCHILDREN|WB_FORCE_MAKEVISIBLE );
+ maLbSettings.SetStyle( maLbSettings.GetStyle()|WB_CLIPCHILDREN|WB_FORCE_MAKEVISIBLE );
maLbSettings.SetHelpId( HID_SC_SOLVEROPTIONS_LB );
maLbSettings.SetHighlightRange();
@@ -175,7 +175,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( Window* pParent,
maProperties.realloc(0); // don't use options from different engine
}
if ( nSelect >= 0 ) // select in list box
- maLbEngine.SelectEntryPos( static_cast<USHORT>(nSelect) );
+ maLbEngine.SelectEntryPos( static_cast<sal_uInt16>(nSelect) );
if ( !maProperties.getLength() )
ReadFromComponent(); // fill maProperties from component (using maEngine)
@@ -208,8 +208,8 @@ const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties(
SvLBoxEntry* pEntry = pModel->GetEntry(nEntryPos);
bool bHasData = false;
- USHORT nItemCount = pEntry->ItemCount();
- for (USHORT nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos)
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ for (sal_uInt16 nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos)
{
SvLBoxItem* pItem = pEntry->GetItem( nItemPos );
ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(pItem);
@@ -265,7 +265,7 @@ void ScSolverOptionsDialog::FillListBox()
// fill the list box
- maLbSettings.SetUpdateMode(FALSE);
+ maLbSettings.SetUpdateMode(false);
maLbSettings.Clear();
String sEmpty;
@@ -318,7 +318,7 @@ void ScSolverOptionsDialog::FillListBox()
pModel->Insert( pEntry );
}
- maLbSettings.SetUpdateMode(TRUE);
+ maLbSettings.SetUpdateMode(sal_True);
}
void ScSolverOptionsDialog::ReadFromComponent()
@@ -331,8 +331,8 @@ void ScSolverOptionsDialog::EditOption()
SvLBoxEntry* pEntry = maLbSettings.GetCurEntry();
if (pEntry)
{
- USHORT nItemCount = pEntry->ItemCount();
- for (USHORT nPos=0; nPos<nItemCount; ++nPos)
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ for (sal_uInt16 nPos=0; nPos<nItemCount; ++nPos)
{
SvLBoxItem* pItem = pEntry->GetItem( nPos );
ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(pItem);
@@ -381,7 +381,7 @@ IMPL_LINK( ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListBox*, EMPTYA
IMPL_LINK( ScSolverOptionsDialog, EngineSelectHdl, ListBox*, EMPTYARG )
{
- USHORT nSelectPos = maLbEngine.GetSelectEntryPos();
+ sal_uInt16 nSelectPos = maLbEngine.GetSelectEntryPos();
if ( nSelectPos < maImplNames.getLength() )
{
String aNewEngine( maImplNames[nSelectPos] );
@@ -397,14 +397,14 @@ IMPL_LINK( ScSolverOptionsDialog, EngineSelectHdl, ListBox*, EMPTYARG )
IMPL_LINK( ScSolverOptionsDialog, SettingsSelHdl, SvxCheckListBox*, EMPTYARG )
{
- BOOL bCheckbox = FALSE;
+ sal_Bool bCheckbox = false;
SvLBoxEntry* pEntry = maLbSettings.GetCurEntry();
if (pEntry)
{
SvLBoxItem* pItem = pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON);
if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXBUTTON )
- bCheckbox = TRUE;
+ bCheckbox = sal_True;
}
maBtnEdit.Enable( !bCheckbox );
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index d887b2a68cf6..a03daeb49fee 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -81,7 +81,7 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pDoc ( pDocument ),
nCurTab ( aCursorPos.Tab() ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
errMsgInvalidVar ( ScResId( STR_INVALIDVAR ) ),
errMsgInvalidForm ( ScResId( STR_INVALIDFORM ) ),
errMsgNoFormula ( ScResId( STR_NOFORMULA ) ),
@@ -89,6 +89,9 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
{
Init();
FreeResource();
+
+ aRBFormulaCell.SetAccessibleRelationMemberOf(&aFlVariables);
+ aRBVariableCell.SetAccessibleRelationMemberOf(&aFlVariables);
}
//----------------------------------------------------------------------------
@@ -128,7 +131,7 @@ void ScSolverDlg::Init()
//----------------------------------------------------------------------------
-BOOL ScSolverDlg::Close()
+sal_Bool ScSolverDlg::Close()
{
return DoClose( ScSolverDlgWrapper::GetChildWindowId() );
}
@@ -139,7 +142,7 @@ void ScSolverDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -161,7 +164,7 @@ void ScSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
String aStr;
ScAddress aAdr = rRef.aStart;
- USHORT nFmt = ( aAdr.Tab() == nCurTab )
+ sal_uInt16 nFmt = ( aAdr.Tab() == nCurTab )
? SCA_ABS
: SCA_ABS_3D;
@@ -205,14 +208,14 @@ void ScSolverDlg::RaiseError( ScSolverErr eError )
//----------------------------------------------------------------------------
-BOOL ScSolverDlg::IsRefInputMode() const
+sal_Bool ScSolverDlg::IsRefInputMode() const
{
return pEdActive != NULL;
}
//----------------------------------------------------------------------------
-BOOL ScSolverDlg::CheckTargetValue( String& rStrVal )
+sal_Bool ScSolverDlg::CheckTargetValue( String& rStrVal )
{
sal_uInt32 n1 = 0;
double n2;
@@ -235,8 +238,8 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn )
// 3. wurde ein korrekter Zielwert eingegeben
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- USHORT nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv );
- USHORT nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv );
+ sal_uInt16 nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv );
+ sal_uInt16 nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv );
if ( SCA_VALID == ( nRes1 & SCA_VALID ) )
{
@@ -257,7 +260,7 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn )
theTargetValStr );
ScSolveItem aOutItem( SCITEM_SOLVEDATA, &aOutParam );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_SOLVE,
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index 08180d069473..c33f4b53b43b 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -56,7 +56,7 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent,
const String& rTitle,
const String& rEditTitle,
const String& rDefault,
- ULONG nHelpId ) :
+ const rtl::OString& sHelpId, const rtl::OString& sEditHelpId ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_STRINPUT ) ),
//
aFtEditTitle ( this, ScResId( FT_LABEL ) ),
@@ -65,30 +65,12 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent,
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) )
{
- SetHelpId( nHelpId );
+ SetHelpId( sHelpId );
SetText( rTitle );
aFtEditTitle.SetText( rEditTitle );
aEdInput.SetText( rDefault );
aEdInput.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
-
- // HelpId for Edit different for different uses
-
- if ( nHelpId == FID_TAB_APPEND )
- aEdInput.SetHelpId( HID_SC_APPEND_NAME );
- else if ( nHelpId == FID_TAB_RENAME )
- aEdInput.SetHelpId( HID_SC_RENAME_NAME );
- else if ( nHelpId == HID_SC_ADD_AUTOFMT )
- aEdInput.SetHelpId( HID_SC_AUTOFMT_NAME );
- else if ( nHelpId == HID_SC_REN_AFMT_DLG )
- aEdInput.SetHelpId( HID_SC_REN_AFMT_NAME );
- else if ( nHelpId == SID_RENAME_OBJECT )
- aEdInput.SetHelpId( HID_SC_RENAME_OBJECT );
- // #i68101#
- else if ( nHelpId == SID_TITLE_DESCRIPTION_OBJECT )
- aEdInput.SetHelpId( HID_SC_TITLE_DESCRIPTION_OBJECT );
- else
- DBG_ERRORFILE( "unknown ID" );
-
+ aEdInput.SetHelpId( sEditHelpId );
//-------------
FreeResource();
}
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 36e02ad43115..fec8ef51c2a5 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -57,7 +57,7 @@ ScTabBgColorDlg::ScTabBgColorDlg( Window* pParent,
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId ) :
+ const rtl::OString& sHelpId ) :
ModalDialog ( pParent, ScResId( RID_SCDLG_TAB_BG_COLOR ) ),
aBorderWin ( this, ScResId( TAB_BG_COLOR_CT_BORDER ) ),
aTabBgColorSet ( &aBorderWin, ScResId( TAB_BG_COLOR_SET_BGDCOLOR ), this ),
@@ -66,10 +66,10 @@ ScTabBgColorDlg::ScTabBgColorDlg( Window* pParent,
aBtnHelp ( this, ScResId( BTN_HELP ) ),
aTabBgColor ( rDefaultColor ),
aTabBgColorNoColorText ( rTabBgColorNoColorText ),
- mnHelpId ( nHelpId )
+ msHelpId ( sHelpId )
{
- SetHelpId( nHelpId );
+ SetHelpId( sHelpId );
this->SetText( rTitle );
this->SetStyle(GetStyle() | WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL | WB_SYSTEMWINDOW | WB_STANDALONE | WB_HIDE);
@@ -98,7 +98,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
::boost::scoped_ptr<XColorTable> pOwnColorTable; // locally instantiated in case the doc shell doesn't have one.
const Size aSize15x15 = Size( 15, 15 );
- USHORT nSelectedItem = 0;
+ sal_uInt16 nSelectedItem = 0;
DBG_ASSERT( pDocSh, "DocShell not found!" );
@@ -151,10 +151,10 @@ IMPL_LINK( ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, EMPTYARG )
Handler, called when color selection is changed
*/
{
- USHORT nItemId = aTabBgColorSet.GetSelectItemId();
+ sal_uInt16 nItemId = aTabBgColorSet.GetSelectItemId();
Color aColor = nItemId ? ( aTabBgColorSet.GetItemColor( nItemId ) ) : Color( COL_AUTO );
aTabBgColor = aColor;
- EndDialog( TRUE );
+ EndDialog( sal_True );
return 0;
}
@@ -163,10 +163,10 @@ IMPL_LINK( ScTabBgColorDlg, TabBgColorOKHdl_Impl, OKButton*, EMPTYARG )
// Handler, called when the OK button is pushed
- USHORT nItemId = aTabBgColorSet.GetSelectItemId();
+ sal_uInt16 nItemId = aTabBgColorSet.GetSelectItemId();
Color aColor = nItemId ? ( aTabBgColorSet.GetItemColor( nItemId ) ) : Color( COL_AUTO );
aTabBgColor = aColor;
- EndDialog( TRUE );
+ EndDialog( sal_True );
return 0;
}
@@ -183,10 +183,10 @@ void ScTabBgColorDlg::ScTabBgColorValueSet::KeyInput( const KeyEvent& rKEvt )
case KEY_SPACE:
case KEY_RETURN:
{
- USHORT nItemId = GetSelectItemId();
+ sal_uInt16 nItemId = GetSelectItemId();
const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : Color( COL_AUTO );
aTabBgColorDlg->aTabBgColor = aColor;
- aTabBgColorDlg->EndDialog(TRUE);
+ aTabBgColorDlg->EndDialog(sal_True);
}
break;
}
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index ebb951652a4d..a42ddf505731 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -77,7 +77,7 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pDoc ( pDocument ),
nCurTab ( theFormulaCell.Tab() ),
pEdActive ( NULL ),
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
errMsgNoFormula ( ScResId( STR_NOFORMULA ) ),
errMsgNoColRow ( ScResId( STR_NOCOLROW ) ),
errMsgWrongFormula ( ScResId( STR_WRONGFORMULA ) ),
@@ -128,7 +128,7 @@ void ScTabOpDlg::Init()
//----------------------------------------------------------------------------
-BOOL ScTabOpDlg::Close()
+sal_Bool ScTabOpDlg::Close()
{
return DoClose( ScTabOpDlgWrapper::GetChildWindowId() );
}
@@ -139,7 +139,7 @@ void ScTabOpDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if( pEdActive )
pEdActive->GrabFocus();
}
@@ -161,7 +161,7 @@ void ScTabOpDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
RefInputStart(pEdActive);
String aStr;
- USHORT nFmt = ( rRef.aStart.Tab() == nCurTab )
+ sal_uInt16 nFmt = ( rRef.aStart.Tab() == nCurTab )
? SCR_ABS
: SCR_ABS_3D;
@@ -237,10 +237,10 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
//----------------------------------------------------------------------------
-BOOL lcl_Parse( const String& rString, ScDocument* pDoc, SCTAB nCurTab,
+sal_Bool lcl_Parse( const String& rString, ScDocument* pDoc, SCTAB nCurTab,
ScRefAddress& rStart, ScRefAddress& rEnd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
if ( rString.Search(':') != STRING_NOTFOUND )
bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv );
@@ -259,8 +259,8 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn )
{
if ( pBtn == &aBtnOk )
{
- BYTE nMode = 3;
- USHORT nError = 0;
+ sal_uInt8 nMode = 3;
+ sal_uInt16 nError = 0;
// Zu ueberpruefen:
// 1. enthalten die Strings korrekte Tabellenkoordinaten/def.Namen?
@@ -325,7 +325,7 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn )
nMode );
ScTabOpItem aOutItem( SID_TABOP, &aOutParam );
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_TABOP,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index 9dddb5997f5a..4048bdaa8ff7 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -66,7 +66,7 @@ ScCharDlg::ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
// -----------------------------------------------------------------------
-void ScCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
@@ -112,7 +112,7 @@ ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) :
// -----------------------------------------------------------------------
-void ScParagraphDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
switch( nId )
{
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 42a53c240247..18560d2c521a 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -67,24 +67,24 @@
struct SaveData
{
SaveData()
- : bCriteria(FALSE),bPrintArea(FALSE),
- bColHeader(FALSE),bRowHeader(FALSE),
- bDirty(FALSE) {}
+ : bCriteria(false),bPrintArea(false),
+ bColHeader(false),bRowHeader(false),
+ bDirty(false) {}
void Clear()
{
aStrSymbol.Erase();
bCriteria = bPrintArea =
- bColHeader = bRowHeader = FALSE;
- bDirty = TRUE;
+ bColHeader = bRowHeader = false;
+ bDirty = sal_True;
}
String aStrSymbol;
- BOOL bCriteria:1;
- BOOL bPrintArea:1;
- BOOL bColHeader:1;
- BOOL bRowHeader:1;
- BOOL bDirty:1;
+ sal_Bool bCriteria:1;
+ sal_Bool bPrintArea:1;
+ sal_Bool bColHeader:1;
+ sal_Bool bRowHeader:1;
+ sal_Bool bDirty:1;
};
static SaveData* pSaveObj = NULL;
@@ -95,7 +95,7 @@ static SaveData* pSaveObj = NULL;
pSaveObj->bPrintArea = aBtnPrintArea.IsChecked(); \
pSaveObj->bColHeader = aBtnColHeader.IsChecked(); \
pSaveObj->bRowHeader = aBtnRowHeader.IsChecked(); \
- pSaveObj->bDirty = TRUE;
+ pSaveObj->bDirty = sal_True;
#define RESTORE_DATA() \
if ( pSaveObj->bDirty ) \
@@ -105,7 +105,7 @@ static SaveData* pSaveObj = NULL;
aBtnPrintArea.Check( pSaveObj->bPrintArea ); \
aBtnColHeader.Check( pSaveObj->bColHeader ); \
aBtnRowHeader.Check( pSaveObj->bRowHeader ); \
- pSaveObj->bDirty = FALSE; \
+ pSaveObj->bDirty = false; \
}
#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute();
@@ -142,7 +142,7 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnRemove ( this, ScResId( BTN_REMOVE ) ),
aBtnMore ( this, ScResId( BTN_MORE ) ),
//
- bSaved (FALSE),
+ bSaved (false),
aStrAdd ( ScResId( STR_ADD ) ),
aStrModify ( ScResId( STR_MODIFY ) ),
errMsgInvalidSym( ScResId( STR_INVALIDSYMBOL ) ),
@@ -155,6 +155,8 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
pSaveObj = new SaveData;
Init();
FreeResource();
+
+ aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
}
@@ -214,20 +216,20 @@ void ScNameDlg::Init()
UpdateChecks();
EdModifyHdl( 0 );
- bSaved=TRUE;
+ bSaved=sal_True;
SAVE_DATA()
//@BugID 54702
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScNameDlg::IsRefInputMode() const
+sal_Bool ScNameDlg::IsRefInputMode() const
{
return aEdAssign.IsEnabled();
}
-void ScNameDlg::RefInputDone( BOOL bForced)
+void ScNameDlg::RefInputDone( sal_Bool bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
EdModifyHdl(&aEdAssign);
@@ -252,7 +254,7 @@ void ScNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
//----------------------------------------------------------------------------
-BOOL ScNameDlg::Close()
+sal_Bool ScNameDlg::Close()
{
return DoClose( ScNameDlgWrapper::GetChildWindowId() );
}
@@ -314,8 +316,8 @@ void ScNameDlg::UpdateChecks()
void ScNameDlg::UpdateNames()
{
- aEdName.SetUpdateMode( FALSE );
- USHORT nNamePos = aEdName.GetTopEntry();
+ aEdName.SetUpdateMode( false );
+ sal_uInt16 nNamePos = aEdName.GetTopEntry();
aEdName.Clear();
aEdAssign.SetText( EMPTY_STRING );
@@ -336,7 +338,7 @@ void ScNameDlg::UpdateNames()
}
}
- aEdName.SetUpdateMode( TRUE );
+ aEdName.SetUpdateMode( true );
aEdName.SetTopEntry(nNamePos);
aEdName.Invalidate();
}
@@ -393,9 +395,9 @@ IMPL_LINK_INLINE_END( ScNameDlg, CancelBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG )
{
- BOOL bAdded = FALSE;
+ sal_Bool bAdded = false;
String aNewEntry = aEdName.GetText();
- USHORT nNamePos = aEdName.GetTopEntry();
+ sal_uInt16 nNamePos = aEdName.GetTopEntry();
aNewEntry.EraseLeadingChars( ' ' );
aNewEntry.EraseTrailingChars( ' ' );
@@ -444,7 +446,7 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG )
delete pNewEntry;
UpdateNames();
- bSaved=FALSE;
+ bSaved=false;
RESTORE_DATA()
aEdName.SetText(EMPTY_STRING);
aEdName.GrabFocus();
@@ -454,9 +456,9 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG )
aBtnRemove.Disable();
//@BugID 54702 raus mit dem Sch.
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
- bAdded = TRUE;
+ bAdded = sal_True;
}
else // theSymbol ungueltig
{
@@ -500,7 +502,7 @@ IMPL_LINK( ScNameDlg, RemoveBtnHdl, void *, EMPTYARG )
aLocalRangeName.erase(*pData);
UpdateNames();
UpdateChecks();
- bSaved=FALSE;
+ bSaved=false;
RESTORE_DATA()
theCurSel = Selection( 0, SELECTION_MAX );
aBtnAdd.SetText( aStrAdd );
@@ -537,7 +539,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
{
String theName = aEdName.GetText();
String theSymbol = aEdAssign.GetText();
- BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND
+ sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
!= aEdName.GetEntryPos( theName ));
if ( pEd == &aEdName )
@@ -552,7 +554,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
aEdAssign.Disable();
aRbAssign.Disable();
//@BugID 54702 raus mit dem Sch.
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
else
{
@@ -565,7 +567,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
if(!bSaved)
{
- bSaved=TRUE;
+ bSaved=sal_True;
SAVE_DATA()
}
NameSelectHdl( 0 );
@@ -576,7 +578,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd )
aBtnAdd.SetText( aStrAdd );
aBtnRemove.Disable();
- bSaved=FALSE;
+ bSaved=false;
RESTORE_DATA()
}
theSymbol = aEdAssign.GetText();
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index ef8705ff402e..90d83f861008 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -75,7 +75,7 @@ using namespace com::sun::star;
// Reihenfolge der Kategorien im Navigator -------------------------------------
-static USHORT pTypeList[SC_CONTENT_COUNT] =
+static sal_uInt16 pTypeList[SC_CONTENT_COUNT] =
{
SC_CONTENT_ROOT, // ROOT (0) muss vorne stehen
SC_CONTENT_TABLE,
@@ -88,7 +88,7 @@ static USHORT pTypeList[SC_CONTENT_COUNT] =
SC_CONTENT_DRAWING
};
-BOOL ScContentTree::bIsInDrag = FALSE;
+sal_Bool ScContentTree::bIsInDrag = false;
ScDocShell* ScContentTree::GetManualOrCurrent()
@@ -129,10 +129,10 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
SvTreeListBox ( pParent, rResId ),
aEntryImages ( ScResId( RID_IMAGELIST_NAVCONT ) ),
nRootType ( SC_CONTENT_ROOT ),
- bHiddenDoc ( FALSE ),
+ bHiddenDoc ( false ),
pHiddenDocument ( NULL )
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<SC_CONTENT_COUNT; i++)
pPosList[pTypeList[i]] = i; // invers zum suchen
@@ -145,13 +145,15 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
SetNodeDefaultImages();
SetDoubleClickHdl( LINK( this, ScContentTree, ContentDoubleClickHdl ) );
+
+ SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
ScContentTree::~ScContentTree()
{
}
-void ScContentTree::InitRoot( USHORT nType )
+void ScContentTree::InitRoot( sal_uInt16 nType )
{
if ( !nType )
return;
@@ -165,8 +167,8 @@ void ScContentTree::InitRoot( USHORT nType )
const Image& rImage = aEntryImages.GetImage( nType );
String aName( ScResId( SCSTR_CONTENT_ROOT + nType ) );
// wieder an die richtige Position:
- USHORT nPos = nRootType ? 0 : pPosList[nType]-1;
- SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, FALSE, nPos );
+ sal_uInt16 nPos = nRootType ? 0 : pPosList[nType]-1;
+ SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, false, nPos );
pRootNodes[nType] = pNew;
}
@@ -174,11 +176,11 @@ void ScContentTree::InitRoot( USHORT nType )
void ScContentTree::ClearAll()
{
Clear();
- for (USHORT i=1; i<SC_CONTENT_COUNT; i++)
+ for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
InitRoot(i);
}
-void ScContentTree::ClearType(USHORT nType)
+void ScContentTree::ClearType(sal_uInt16 nType)
{
if (!nType)
ClearAll();
@@ -194,7 +196,7 @@ void ScContentTree::ClearType(USHORT nType)
}
}
-void ScContentTree::InsertContent( USHORT nType, const String& rValue )
+void ScContentTree::InsertContent( sal_uInt16 nType, const String& rValue )
{
if (nType >= SC_CONTENT_COUNT)
{
@@ -211,7 +213,7 @@ void ScContentTree::InsertContent( USHORT nType, const String& rValue )
}
}
-void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const
+void ScContentTree::GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const
{
rnRootIndex = SC_CONTENT_ROOT;
rnChildIndex = SC_CONTENT_NOCHILD;
@@ -221,7 +223,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
SvLBoxEntry* pParent = GetParent( pEntry );
bool bFound = false;
- for( USHORT nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot )
+ for( sal_uInt16 nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot )
{
if( pEntry == pRootNodes[ nRoot ] )
{
@@ -234,7 +236,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
rnRootIndex = nRoot;
// search the entry in all child entries of the parent
- ULONG nEntry = 0;
+ sal_uLong nEntry = 0;
SvLBoxEntry* pIterEntry = FirstChild( pParent );
while( !bFound && pIterEntry )
{
@@ -252,10 +254,10 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
}
}
-ULONG ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const
+sal_uLong ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const
{
- USHORT nRoot;
- ULONG nChild;
+ sal_uInt16 nRoot;
+ sal_uLong nChild;
GetEntryIndexes( nRoot, nChild, pEntry );
return nChild;
}
@@ -266,8 +268,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName )
if (pDoc)
{
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- USHORT nCount = pDbNames->GetCount();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pDbNames->GetCount();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDBData* pData = (*pDbNames)[i];
if ( pData->GetName() == rDBName )
@@ -284,8 +286,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName )
IMPL_LINK( ScContentTree, ContentDoubleClickHdl, ScContentTree *, EMPTYARG )
{
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
SvLBoxEntry* pEntry = GetCurEntry();
GetEntryIndexes( nType, nChild, pEntry );
@@ -364,7 +366,7 @@ void ScContentTree::MouseButtonDown( const MouseEvent& rMEvt )
void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = false;
const KeyCode aCode = rKEvt.GetKeyCode();
if (aCode.GetCode() == KEY_RETURN)
@@ -373,15 +375,15 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
case KEY_MOD1:
ToggleRoot(); // toggle root mode (as in Writer)
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case 0:
{
SvLBoxEntry* pEntry = GetCurEntry();
if( pEntry )
{
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
GetEntryIndexes( nType, nChild, pEntry );
if( (nType != SC_CONTENT_ROOT) && (nChild == SC_CONTENT_NOCHILD) )
@@ -396,7 +398,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
ContentDoubleClickHdl(0); // select content as if double clicked
}
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
}
@@ -428,7 +430,7 @@ void ScContentTree::DragFinished( sal_Int8 /* nAction */ )
void ScContentTree::Command( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
switch ( rCEvt.GetCommand() )
{
@@ -440,7 +442,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
Application::PostUserEvent( STATIC_LINK( this, ScContentTree, ExecDragHdl ) );
- bDone = TRUE;
+ bDone = sal_True;
break;
case COMMAND_CONTEXTMENU:
@@ -457,8 +459,8 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
ScPopupMenu aDocMenu;
aDocMenu.SetMenuFlags( aDocMenu.GetMenuFlags() | MENU_FLAG_NOAUTOMNEMONICS );
- USHORT i=0;
- USHORT nPos=0;
+ sal_uInt16 i=0;
+ sal_uInt16 nPos=0;
// geladene Dokumente
ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
@@ -501,13 +503,13 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
if ( aDropMenu.WasHit() ) // Drag-Drop Modus
{
- USHORT nId = aDropMenu.GetSelected();
+ sal_uInt16 nId = aDropMenu.GetSelected();
if ( nId >= RID_DROPMODE_URL && nId <= RID_DROPMODE_COPY )
pParentWindow->SetDropMode( nId - RID_DROPMODE_URL );
}
else if ( aDocMenu.WasHit() ) // angezeigtes Dokument
{
- USHORT nId = aDocMenu.GetSelected();
+ sal_uInt16 nId = aDocMenu.GetSelected();
String aName = aDocMenu.GetItemText(nId);
SelectDoc( aName );
}
@@ -521,14 +523,14 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvLBoxEntry* pEntry = GetEntry( aPos );
if ( pEntry )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
String aHelpText;
SvLBoxEntry* pParent = GetParent(pEntry);
if ( !pParent ) // Top-Level ?
@@ -536,23 +538,23 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
aHelpText = String::CreateFromInt32( GetChildCount(pEntry) );
aHelpText += ' ';
aHelpText += GetEntryText(pEntry);
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( pParent == pRootNodes[SC_CONTENT_NOTE] )
{
aHelpText = GetEntryText(pEntry); // Notizen als Help-Text
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( pParent == pRootNodes[SC_CONTENT_AREALINK] )
{
- ULONG nIndex = GetChildIndex(pEntry);
+ sal_uLong nIndex = GetChildIndex(pEntry);
if( nIndex != SC_CONTENT_NOCHILD )
{
const ScAreaLink* pLink = GetLink(nIndex);
if (pLink)
{
aHelpText = pLink->GetFile(); // Source-Datei als Help-Text
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -570,7 +572,7 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
Rectangle aItemRect( aPos, aSize );
Help::ShowQuickHelp( this, aItemRect, aHelpText );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -593,7 +595,7 @@ ScDocument* ScContentTree::GetSourceDocument()
return NULL;
}
-void ScContentTree::Refresh( USHORT nType )
+void ScContentTree::Refresh( sal_uInt16 nType )
{
if ( bHiddenDoc && !pHiddenDocument )
return; // anderes Dokument angezeigt
@@ -613,7 +615,7 @@ void ScContentTree::Refresh( USHORT nType )
if (!DrawNamesChanged(SC_CONTENT_DRAWING))
return;
- SetUpdateMode(FALSE);
+ SetUpdateMode(false);
ClearType( nType );
@@ -635,7 +637,7 @@ void ScContentTree::Refresh( USHORT nType )
GetLinkNames();
ApplySettings();
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
void ScContentTree::GetTableNames()
@@ -703,11 +705,11 @@ void ScContentTree::GetDbNames()
return;
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- USHORT nCount = pDbNames->GetCount();
+ sal_uInt16 nCount = pDbNames->GetCount();
if ( nCount > 0 )
{
String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDBData* pData = (*pDbNames)[i];
String aStrName = pData->GetName();
@@ -717,7 +719,7 @@ void ScContentTree::GetDbNames()
}
}
-bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier )
+bool ScContentTree::IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier )
{
bool bRet = false;
switch ( nContentType )
@@ -737,7 +739,7 @@ bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier )
return bRet;
}
-void ScContentTree::GetDrawNames( USHORT nType )
+void ScContentTree::GetDrawNames( sal_uInt16 nType )
{
if ( nRootType && nRootType != nType ) // ausgeblendet ?
return;
@@ -805,8 +807,8 @@ void ScContentTree::GetLinkNames()
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -816,18 +818,18 @@ void ScContentTree::GetLinkNames()
}
}
-const ScAreaLink* ScContentTree::GetLink( ULONG nIndex )
+const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
return NULL;
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -870,13 +872,13 @@ void ScContentTree::GetNoteStrings()
}
}
-ScAddress ScContentTree::GetNotePos( ULONG nIndex )
+ScAddress ScContentTree::GetNotePos( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
return ScAddress();
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
@@ -898,19 +900,19 @@ ScAddress ScContentTree::GetNotePos( ULONG nIndex )
return ScAddress();
}
-BOOL ScContentTree::NoteStringsChanged()
+sal_Bool ScContentTree::NoteStringsChanged()
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return FALSE;
+ return false;
SvLBoxEntry* pParent = pRootNodes[SC_CONTENT_NOTE];
if (!pParent)
- return FALSE;
+ return false;
SvLBoxEntry* pEntry = FirstChild( pParent );
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount && bEqual; nTab++)
{
@@ -921,11 +923,11 @@ BOOL ScContentTree::NoteStringsChanged()
if( const ScPostIt* pNote = pCell->GetNote() )
{
if ( !pEntry )
- bEqual = FALSE;
+ bEqual = false;
else
{
if ( lcl_NoteString( *pNote ) != GetEntryText(pEntry) )
- bEqual = FALSE;
+ bEqual = false;
pEntry = NextSibling( pEntry );
}
@@ -935,27 +937,27 @@ BOOL ScContentTree::NoteStringsChanged()
}
if ( pEntry )
- bEqual = FALSE; // kommt noch was
+ bEqual = false; // kommt noch was
return !bEqual;
}
-BOOL ScContentTree::DrawNamesChanged( USHORT nType )
+sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return FALSE;
+ return false;
SvLBoxEntry* pParent = pRootNodes[nType];
if (!pParent)
- return FALSE;
+ return false;
SvLBoxEntry* pEntry = FirstChild( pParent );
// iterate in flat mode for groups
SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS;
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pDrawLayer && pShell)
@@ -974,11 +976,11 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType )
if ( IsPartOfType( nType, pObject->GetObjIdentifier() ) )
{
if ( !pEntry )
- bEqual = FALSE;
+ bEqual = false;
else
{
if ( ScDrawLayer::GetVisibleName( pObject ) != GetEntryText(pEntry) )
- bEqual = FALSE;
+ bEqual = false;
pEntry = NextSibling( pEntry );
}
@@ -990,15 +992,15 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType )
}
if ( pEntry )
- bEqual = FALSE; // kommt noch was
+ bEqual = false; // kommt noch was
return !bEqual;
}
-BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange& rRange )
+sal_Bool lcl_GetRange( ScDocument* pDoc, sal_uInt16 nType, const String& rName, ScRange& rRange )
{
- BOOL bFound = FALSE;
- USHORT nPos;
+ sal_Bool bFound = false;
+ sal_uInt16 nPos;
if ( nType == SC_CONTENT_RANGENAME )
{
@@ -1021,22 +1023,22 @@ BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange&
SCROW nRow1, nRow2;
(*pList)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2);
rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
- bFound = TRUE;
+ bFound = sal_True;
}
}
return bFound;
}
-void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType, Window* pWin )
+void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, sal_uInt16 nType, Window* pWin )
{
ScDocument* pSrcDoc = pSrcShell->GetDocument();
ScDrawLayer* pModel = pSrcDoc->GetDrawLayer();
if (pModel)
{
- BOOL bOle = ( nType == SC_CONTENT_OLEOBJECT );
- BOOL bGraf = ( nType == SC_CONTENT_GRAPHIC );
- USHORT nDrawId = sal::static_int_cast<USHORT>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
+ sal_Bool bOle = ( nType == SC_CONTENT_OLEOBJECT );
+ sal_Bool bGraf = ( nType == SC_CONTENT_GRAPHIC );
+ sal_uInt16 nDrawId = sal::static_int_cast<sal_uInt16>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
SCTAB nTab = 0;
SdrObject* pObject = pModel->GetNamedObject( rName, nDrawId, nTab );
if (pObject)
@@ -1066,10 +1068,10 @@ void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType,
}
}
-void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlags, Window* pWin )
+void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_uInt16 nFlags, Window* pWin )
{
ScMarkData aMark;
- aMark.SelectTable( rRange.aStart.Tab(), TRUE );
+ aMark.SelectTable( rRange.aStart.Tab(), sal_True );
aMark.SetMarkArea( rRange );
ScDocument* pSrcDoc = pSrcShell->GetDocument();
@@ -1080,7 +1082,7 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
ScClipParam aClipParam(rRange, false);
pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark);
- // pClipDoc->ExtendMerge( rRange, TRUE );
+ // pClipDoc->ExtendMerge( rRange, sal_True );
TransferableObjectDescriptor aObjDesc;
pSrcShell->FillTransferableObjectDescriptor( aObjDesc );
@@ -1102,12 +1104,12 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag
void ScContentTree::DoDrag()
{
ScDocumentLoader* pDocLoader = NULL;
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
ScModule* pScMod = SC_MOD();
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
SvLBoxEntry* pEntry = GetCurEntry();
GetEntryIndexes( nType, nChild, pEntry );
@@ -1135,11 +1137,11 @@ void ScContentTree::DoDrag()
}
}
- BOOL bDoLinkTrans = FALSE; // use ScLinkTransferObj
+ sal_Bool bDoLinkTrans = false; // use ScLinkTransferObj
String aLinkURL; // for ScLinkTransferObj
String aLinkText;
- USHORT nDropMode = pParentWindow->GetDropMode();
+ sal_uInt16 nDropMode = pParentWindow->GetDropMode();
switch ( nDropMode )
{
case SC_DROPMODE_URL:
@@ -1158,7 +1160,7 @@ void ScContentTree::DoDrag()
aLinkURL = aUrl;
aLinkText = aText;
}
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
}
break;
case SC_DROPMODE_LINK:
@@ -1171,12 +1173,12 @@ void ScContentTree::DoDrag()
{
case SC_CONTENT_TABLE:
pScMod->SetDragLink( aDocName, aText, EMPTY_STRING );
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
break;
case SC_CONTENT_RANGENAME:
case SC_CONTENT_DBAREA:
pScMod->SetDragLink( aDocName, EMPTY_STRING, aText );
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
break;
// other types cannot be linked
@@ -1245,7 +1247,7 @@ void ScContentTree::DoDrag()
}
}
- bIsInDrag = FALSE; // static Member
+ bIsInDrag = false; // static Member
delete pDocLoader; // falls Dokument zum Draggen geladen wurde
}
@@ -1259,19 +1261,19 @@ IMPL_STATIC_LINK(ScContentTree, ExecDragHdl, void*, EMPTYARG)
return 0;
}
-BOOL ScContentTree::LoadFile( const String& rUrl )
+sal_Bool ScContentTree::LoadFile( const String& rUrl )
{
String aDocName = rUrl;
xub_StrLen nPos = aDocName.Search('#');
if ( nPos != STRING_NOTFOUND )
aDocName.Erase(nPos); // nur der Name, ohne #...
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
String aFilter, aOptions;
ScDocumentLoader aLoader( aDocName, aFilter, aOptions );
if ( !aLoader.IsError() )
{
- bHiddenDoc = TRUE;
+ bHiddenDoc = sal_True;
aHiddenName = aDocName;
aHiddenTitle = aLoader.GetTitle();
pHiddenDocument = aLoader.GetDocument();
@@ -1290,16 +1292,16 @@ BOOL ScContentTree::LoadFile( const String& rUrl )
return bReturn;
}
-void ScContentTree::InitWindowBits( BOOL bButtons )
+void ScContentTree::InitWindowBits( sal_Bool bButtons )
{
- WinBits nFlags = WB_CLIPCHILDREN|WB_HSCROLL;
+ WinBits nFlags = GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL;
if (bButtons)
nFlags |= WB_HASBUTTONS|WB_HASBUTTONSATROOT;
- SetWindowBits( nFlags );
+ SetStyle( nFlags );
}
-void ScContentTree::SetRootType( USHORT nNew )
+void ScContentTree::SetRootType( sal_uInt16 nNew )
{
if ( nNew != nRootType )
{
@@ -1314,14 +1316,14 @@ void ScContentTree::SetRootType( USHORT nNew )
void ScContentTree::ToggleRoot() // nach Selektion
{
- USHORT nNew = SC_CONTENT_ROOT;
+ sal_uInt16 nNew = SC_CONTENT_ROOT;
if ( nRootType == SC_CONTENT_ROOT )
{
SvLBoxEntry* pEntry = GetCurEntry();
if (pEntry)
{
SvLBoxEntry* pParent = GetParent(pEntry);
- for (USHORT i=1; i<SC_CONTENT_COUNT; i++)
+ for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
if ( pEntry == pRootNodes[i] || pParent == pRootNodes[i] )
nNew = i;
}
@@ -1333,7 +1335,7 @@ void ScContentTree::ToggleRoot() // nach Selektion
void ScContentTree::ResetManualDoc()
{
aManualDoc.Erase();
- bHiddenDoc = FALSE;
+ bHiddenDoc = false;
ActiveDocChanged();
}
@@ -1396,7 +1398,7 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
if ( rName.Copy( nNotActiveStart ) == pParentWindow->aStrNotActive )
aRealName = rName.Copy( 0, nNotActiveStart );
- BOOL bLoaded = FALSE;
+ sal_Bool bLoaded = false;
// ist es ein normal geladenes Doc ?
@@ -1405,13 +1407,13 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
{
if ( pSh->ISA(ScDocShell) )
if ( pSh->GetTitle() == aRealName )
- bLoaded = TRUE;
+ bLoaded = sal_True;
pSh = SfxObjectShell::GetNext( *pSh );
}
if (bLoaded)
{
- bHiddenDoc = FALSE;
+ bHiddenDoc = false;
SetManualDoc(aRealName);
}
else if (aHiddenTitle.Len()) // verstecktes ausgewaehlt
@@ -1430,15 +1432,15 @@ void ScContentTree::ApplySettings()
const ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings();
if( pSettings )
{
- USHORT nRootSel = pSettings->GetRootSelected();
- ULONG nChildSel = pSettings->GetChildSelected();
+ sal_uInt16 nRootSel = pSettings->GetRootSelected();
+ sal_uLong nChildSel = pSettings->GetChildSelected();
- for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
+ for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
{
if( pRootNodes[ nEntry ] )
{
// expand
- BOOL bExp = pSettings->IsExpanded( nEntry );
+ sal_Bool bExp = pSettings->IsExpanded( nEntry );
if( bExp != IsExpanded( pRootNodes[ nEntry ] ) )
{
if( bExp )
@@ -1465,13 +1467,13 @@ void ScContentTree::StoreSettings() const
ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings();
if( pSettings )
{
- for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
+ for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
{
- BOOL bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] );
+ sal_Bool bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] );
pSettings->SetExpanded( nEntry, bExp );
}
- USHORT nRoot;
- ULONG nChild;
+ sal_uInt16 nRoot;
+ sal_uLong nChild;
GetEntryIndexes( nRoot, nChild, GetCurEntry() );
pSettings->SetRootSelected( nRoot );
pSettings->SetChildSelected( nChild );
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index 83fe56cbedbe..3d30ddb74d94 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -46,7 +46,7 @@
//------------------------------------------------------------------------
-ScNavigatorControllerItem::ScNavigatorControllerItem( USHORT nIdP,
+ScNavigatorControllerItem::ScNavigatorControllerItem( sal_uInt16 nIdP,
ScNavigatorDlg& rDlg,
SfxBindings& rBindings )
: SfxControllerItem ( nIdP, rBindings ),
@@ -56,7 +56,7 @@ ScNavigatorControllerItem::ScNavigatorControllerItem( USHORT nIdP,
//------------------------------------------------------------------------
-void ScNavigatorControllerItem::StateChanged( USHORT /* nSID */, SfxItemState /* eState */,
+void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemState /* eState */,
const SfxPoolItem* pItem )
{
switch( GetId() )
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 670cd0d02125..c2988f6826b0 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -114,7 +114,7 @@ long ColumnEdit::Notify( NotifyEvent& rNEvt )
{
long nHandled = SpinField::Notify( rNEvt );
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_KEYINPUT )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
@@ -406,7 +406,7 @@ CommandToolBox::~CommandToolBox()
//------------------------------------------------------------------------
-void CommandToolBox::Select( USHORT nSelId )
+void CommandToolBox::Select( sal_uInt16 nSelId )
{
// Modus umschalten ?
@@ -474,7 +474,7 @@ IMPL_LINK( CommandToolBox, ToolBoxDropdownClickHdl, ToolBox*, EMPTYARG )
ScPopupMenu aPop( ScResId( RID_POPUP_DROPMODE ) );
aPop.CheckItem( RID_DROPMODE_URL + rDlg.GetDropMode() );
aPop.Execute( this, GetItemRect(IID_DROPMODE), POPUPMENU_EXECUTE_DOWN );
- USHORT nId = aPop.GetSelected();
+ sal_uInt16 nId = aPop.GetSelected();
EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage)
@@ -501,17 +501,17 @@ void CommandToolBox::UpdateButtons()
// Umschalten-Button:
if ( eMode == NAV_LMODE_SCENARIOS || eMode == NAV_LMODE_NONE )
{
- EnableItem( IID_CHANGEROOT, FALSE );
- CheckItem( IID_CHANGEROOT, FALSE );
+ EnableItem( IID_CHANGEROOT, false );
+ CheckItem( IID_CHANGEROOT, false );
}
else
{
- EnableItem( IID_CHANGEROOT, TRUE );
- BOOL bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT;
+ EnableItem( IID_CHANGEROOT, sal_True );
+ sal_Bool bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT;
CheckItem( IID_CHANGEROOT, bRootSet );
}
- USHORT nImageId = 0;
+ sal_uInt16 nImageId = 0;
switch ( rDlg.nDropMode )
{
case SC_DROPMODE_URL: nImageId = RID_IMG_DROP_URL; break;
@@ -525,10 +525,10 @@ void CommandToolBox::InitImageList()
{
ImageList& rImgLst = rDlg.aCmdImageList;
- USHORT nCount = GetItemCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = GetItemCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
- USHORT nId = GetItemId(i);
+ sal_uInt16 nId = GetItemId(i);
SetItemImage( nId, rImgLst.GetImage( nId ) );
}
}
@@ -551,7 +551,7 @@ void CommandToolBox::DataChanged( const DataChangedEvent& rDCEvt )
//==================================================================
ScNavigatorSettings::ScNavigatorSettings() :
- maExpandedVec( SC_CONTENT_COUNT, FALSE ),
+ maExpandedVec( SC_CONTENT_COUNT, false ),
mnRootSelected( SC_CONTENT_ROOT ),
mnChildSelected( SC_CONTENT_NOCHILD )
{
@@ -567,7 +567,7 @@ SFX_IMPL_CHILDWINDOWCONTEXT( ScNavigatorDialogWrapper, SID_NAVIGATOR )
ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBind,
SfxChildWinInfo* /* pInfo */ ) :
SfxChildWindowContext( nId )
@@ -589,7 +589,7 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
// deshalb muessen in Abhaengigkeit von der momentanen Groesse die
// Inhalte eingeblendet werden oder nicht
- BOOL bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL );
+ sal_Bool bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL );
NavListMode eNavMode = NAV_LMODE_NONE;
if (!bSmall)
{
@@ -603,12 +603,12 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
eNavMode = NAV_LMODE_AREAS;
}
- // Die Groesse des Floats nicht neu setzen (FALSE bei SetListMode), damit der
+ // Die Groesse des Floats nicht neu setzen (sal_False bei SetListMode), damit der
// Navigator nicht aufgeklappt wird, wenn er minimiert war (#38872#).
- pNavigator->SetListMode( eNavMode, FALSE ); // FALSE: Groesse des Float nicht setzen
+ pNavigator->SetListMode( eNavMode, false ); // FALSE: Groesse des Float nicht setzen
- USHORT nCmdId;
+ sal_uInt16 nCmdId;
switch (eNavMode)
{
case NAV_LMODE_DOCS: nCmdId = IID_DOCS; break;
@@ -665,7 +665,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
nCurCol ( 0 ),
nCurRow ( 0 ),
nCurTab ( 0 ),
- bFirstBig ( FALSE )
+ bFirstBig ( false )
{
ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
nDropMode = rCfg.GetDragMode();
@@ -715,7 +715,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
aLbDocuments.Hide(); // bei NAV_LMODE_NONE gibts die nicht
- aLbEntries.InitWindowBits(TRUE);
+ aLbEntries.InitWindowBits(sal_True);
aLbEntries.SetSpaceBetweenEntries(0);
aLbEntries.SetSelectionMode( SINGLE_SELECTION );
@@ -724,7 +724,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
SV_DRAGDROP_ENABLE_TOP );
// war eine Kategorie als Root ausgewaehlt?
- USHORT nLastRoot = rCfg.GetRootType();
+ sal_uInt16 nLastRoot = rCfg.GetRootType();
if ( nLastRoot )
aLbEntries.SetRootType( nLastRoot );
@@ -744,6 +744,10 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
aContentTimer.SetTimeout( SC_CONTENT_TIMEOUT );
FreeResource();
+
+ aLbEntries.SetAccessibleRelationLabeledBy(&aLbEntries);
+ aTbxCmd.SetAccessibleRelationLabeledBy(&aTbxCmd);
+ aLbDocuments.SetAccessibleName(aStrActiveWin);
}
//------------------------------------------------------------------------
@@ -752,7 +756,7 @@ ScNavigatorDlg::~ScNavigatorDlg()
{
aContentTimer.Stop();
- USHORT i;
+ sal_uInt16 i;
for ( i=0; i<CTRL_ITEMS; i++ )
delete ppBoundItems[i];
@@ -828,18 +832,18 @@ void ScNavigatorDlg::DoResize()
// bei angedocktem Navigator wird das Fenster evtl. erst klein erzeugt,
// dann kommt ein Resize auf die wirkliche Groesse -> dann Inhalte einschalten
- BOOL bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL );
+ sal_Bool bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL );
if ( !bSmall && bFirstBig )
{
// Inhalte laut Config wieder einschalten
- bFirstBig = FALSE;
+ bFirstBig = false;
NavListMode eNavMode = NAV_LMODE_AREAS;
ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
NavListMode eLastMode = (NavListMode) rCfg.GetListMode();
if ( eLastMode == NAV_LMODE_SCENARIOS )
eNavMode = NAV_LMODE_SCENARIOS;
- SetListMode( eNavMode, FALSE ); // FALSE: Groesse des Float nicht setzen
+ SetListMode( eNavMode, false ); // FALSE: Groesse des Float nicht setzen
}
// auch wenn die Inhalte nicht sichtbar sind, die Groessen anpassen,
@@ -868,7 +872,7 @@ void ScNavigatorDlg::DoResize()
aWndScenarios.SetSizePixel( aNewSize );
aLbDocuments.SetSizePixel( aDocSize );
- BOOL bListMode = (eListMode != NAV_LMODE_NONE);
+ sal_Bool bListMode = (eListMode != NAV_LMODE_NONE);
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
if ( pFloat && bListMode )
nListModeHeight = nTotalHeight;
@@ -880,7 +884,7 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA(SfxSimpleHint) )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId();
if ( nHintId == SC_HINT_DOCNAME_CHANGED )
{
@@ -934,7 +938,7 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA(SfxEventHint) )
{
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
if ( nEventId == SFX_EVENT_ACTIVATEDOC )
{
aLbEntries.ActiveDocChanged();
@@ -956,7 +960,7 @@ IMPL_LINK( ScNavigatorDlg, TimeHdl, Timer*, pTimer )
//------------------------------------------------------------------------
-void ScNavigatorDlg::SetDropMode(USHORT nNew)
+void ScNavigatorDlg::SetDropMode(sal_uInt16 nNew)
{
nDropMode = nNew;
aTbxCmd.UpdateButtons();
@@ -989,7 +993,7 @@ void ScNavigatorDlg::SetCurrentCell( SCCOL nColNo, SCROW nRowNo )
String aAddr;
aScAddress.Format( aAddr, SCA_ABS );
- BOOL bUnmark = FALSE;
+ sal_Bool bUnmark = false;
if ( GetViewData() )
bUnmark = !pViewData->GetMarkData().IsCellMarked( nColNo, nRowNo );
@@ -1089,7 +1093,7 @@ ScNavigatorSettings* ScNavigatorDlg::GetNavigatorSettings()
//------------------------------------------------------------------------
-BOOL ScNavigatorDlg::GetViewData()
+sal_Bool ScNavigatorDlg::GetViewData()
{
ScTabViewShell* pViewSh = GetTabViewShell();
pViewData = pViewSh ? pViewSh->GetViewData() : NULL;
@@ -1160,30 +1164,30 @@ void ScNavigatorDlg::UpdateAll()
//------------------------------------------------------------------------
-void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize )
+void ScNavigatorDlg::SetListMode( NavListMode eMode, sal_Bool bSetSize )
{
if ( eMode != eListMode )
{
if ( eMode != NAV_LMODE_NONE )
- bFirstBig = FALSE; // nicht mehr automatisch umschalten
+ bFirstBig = false; // nicht mehr automatisch umschalten
eListMode = eMode;
switch ( eMode )
{
case NAV_LMODE_NONE:
- ShowList( FALSE, bSetSize );
+ ShowList( false, bSetSize );
break;
case NAV_LMODE_AREAS:
case NAV_LMODE_DBAREAS:
case NAV_LMODE_DOCS:
aLbEntries.Refresh();
- ShowList( TRUE, bSetSize );
+ ShowList( sal_True, bSetSize );
break;
case NAV_LMODE_SCENARIOS:
- ShowScenarios( TRUE, bSetSize );
+ ShowScenarios( sal_True, bSetSize );
break;
}
@@ -1192,7 +1196,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize )
if ( eMode != NAV_LMODE_NONE )
{
ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg();
- rCfg.SetListMode( (USHORT) eMode );
+ rCfg.SetListMode( (sal_uInt16) eMode );
}
}
@@ -1202,7 +1206,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize )
//------------------------------------------------------------------------
-void ScNavigatorDlg::ShowList( BOOL bShow, BOOL bSetSize )
+void ScNavigatorDlg::ShowList( sal_Bool bShow, sal_Bool bSetSize )
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
Size aSize = GetParent()->GetOutputSizePixel();
@@ -1247,7 +1251,7 @@ void ScNavigatorDlg::ShowList( BOOL bShow, BOOL bSetSize )
//------------------------------------------------------------------------
-void ScNavigatorDlg::ShowScenarios( BOOL bShow, BOOL bSetSize )
+void ScNavigatorDlg::ShowScenarios( sal_Bool bShow, sal_Bool bSetSize )
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
Size aSize = GetParent()->GetOutputSizePixel();
@@ -1303,7 +1307,7 @@ void ScNavigatorDlg::ShowScenarios( BOOL bShow, BOOL bSetSize )
void ScNavigatorDlg::GetDocNames( const String* pManualSel )
{
aLbDocuments.Clear();
- aLbDocuments.SetUpdateMode( FALSE );
+ aLbDocuments.SetUpdateMode( false );
ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
@@ -1342,7 +1346,7 @@ void ScNavigatorDlg::GetDocNames( const String* pManualSel )
aSelEntry = aEntry;
}
- aLbDocuments.SetUpdateMode( TRUE );
+ aLbDocuments.SetUpdateMode( sal_True );
aLbDocuments.SelectEntry( aSelEntry );
}
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index d8733a2cfef2..48cc2fff6c6c 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -55,7 +55,7 @@ ScScenarioListBox::ScScenarioListBox( ScScenarioWindow& rParent ) :
mrParent( rParent )
{
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( WEIGHT_LIGHT );
SetFont( aFont );
}
@@ -88,7 +88,7 @@ void ScScenarioListBox::UpdateEntries( List* pNewEntryList )
{
// sheet contains scenarios
DBG_ASSERT( pNewEntryList->Count() % 3 == 0, "ScScenarioListBox::UpdateEntries - wrong list size" );
- SetUpdateMode( FALSE );
+ SetUpdateMode( false );
String* pEntry = static_cast< String* >( pNewEntryList->First() );
while( pEntry )
{
@@ -107,7 +107,7 @@ void ScScenarioListBox::UpdateEntries( List* pNewEntryList )
InsertEntry( aEntry.maName, LISTBOX_APPEND );
pEntry = static_cast< String* >( pNewEntryList->Next() );
}
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
SetNoSelection();
mrParent.SetComment( EMPTY_STRING );
}
@@ -182,7 +182,7 @@ const ScScenarioListBox::ScenarioEntry* ScScenarioListBox::GetSelectedEntry() co
return (nPos < maEntries.size()) ? &maEntries[ nPos ] : 0;
}
-void ScScenarioListBox::ExecuteScenarioSlot( USHORT nSlotId )
+void ScScenarioListBox::ExecuteScenarioSlot( sal_uInt16 nSlotId )
{
if( SfxViewFrame* pViewFrm = SfxViewFrame::Current() )
{
@@ -221,7 +221,7 @@ ScScenarioWindow::ScScenarioWindow( Window* pParent,const String& aQH_List,
aEdComment ( this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP )
{
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( WEIGHT_LIGHT );
aEdComment.SetFont( aFont );
aEdComment.SetMaxTextLen( 512 );
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 05e6fc3d855c..7648ec79cb4e 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -90,12 +90,12 @@ SfxTabPage* ScRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet&
return new ScRedlineOptionsTabPage( pParent, rSet );
}
-BOOL ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
+sal_Bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
{
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
- ULONG nNew=0;
- USHORT nPos=0;
+ sal_uLong nNew=0;
+ sal_uInt16 nPos=0;
nPos = aContentColorLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
@@ -154,7 +154,7 @@ BOOL ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
if (pDocSh)
pDocSh->PostPaintGridAll();
- return FALSE;
+ return false;
}
void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
@@ -166,12 +166,12 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
aInsertColorLB.InsertEntry(aAuthorStr);
aRemoveColorLB.InsertEntry(aAuthorStr);
- aContentColorLB.SetUpdateMode( FALSE);
- aMoveColorLB.SetUpdateMode( FALSE);
- aInsertColorLB.SetUpdateMode( FALSE);
- aRemoveColorLB.SetUpdateMode( FALSE);
+ aContentColorLB.SetUpdateMode( false);
+ aMoveColorLB.SetUpdateMode( false);
+ aInsertColorLB.SetUpdateMode( false);
+ aRemoveColorLB.SetUpdateMode( false);
- for( USHORT i = 0; i < pColorTbl->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
Color aColor = pEntry->GetColor();
@@ -182,15 +182,15 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
aInsertColorLB.InsertEntry( aColor, sName );
aRemoveColorLB.InsertEntry( aColor, sName );
}
- aContentColorLB.SetUpdateMode( TRUE );
- aMoveColorLB.SetUpdateMode( TRUE );
- aInsertColorLB.SetUpdateMode( TRUE );
- aRemoveColorLB.SetUpdateMode( TRUE );
+ aContentColorLB.SetUpdateMode( sal_True );
+ aMoveColorLB.SetUpdateMode( sal_True );
+ aInsertColorLB.SetUpdateMode( sal_True );
+ aRemoveColorLB.SetUpdateMode( sal_True );
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
- ULONG nColor = aAppOptions.GetTrackContentColor();
+ sal_uLong nColor = aAppOptions.GetTrackContentColor();
if (nColor == COL_TRANSPARENT)
aContentColorLB.SelectEntryPos(0);
else
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 143cb41d4ea2..a969b311ddf7 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -56,7 +56,7 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pCalcOptRanges[] =
+static sal_uInt16 pCalcOptRanges[] =
{
SID_SCDOCOPTIONS,
SID_SCDOCOPTIONS,
@@ -125,7 +125,7 @@ void ScTpCalcOptions::Init()
//-----------------------------------------------------------------------
-USHORT* ScTpCalcOptions::GetRanges()
+sal_uInt16* ScTpCalcOptions::GetRanges()
{
return pCalcOptRanges;
}
@@ -141,7 +141,7 @@ SfxTabPage* ScTpCalcOptions::Create( Window* pParent, const SfxItemSet& rAttrSet
void ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ )
{
- USHORT d,m,y;
+ sal_uInt16 d,m,y;
*pLocalOptions = *pOldOptions;
@@ -190,10 +190,10 @@ void ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ )
//-----------------------------------------------------------------------
-BOOL ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
// alle weiteren Optionen werden in den Handlern aktualisiert
- pLocalOptions->SetIterCount( (USHORT)aEdSteps.GetValue() );
+ pLocalOptions->SetIterCount( (sal_uInt16)aEdSteps.GetValue() );
pLocalOptions->SetIgnoreCase( !aBtnCase.IsChecked() );
pLocalOptions->SetCalcAsShown( aBtnCalc.IsChecked() );
pLocalOptions->SetMatchWholeCell( aBtnMatch.IsChecked() );
@@ -209,10 +209,10 @@ BOOL ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs )
if ( *pLocalOptions != *pOldOptions )
{
rCoreAttrs.Put( ScTpCalcItem( nWhichCalc, *pLocalOptions ) );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -285,13 +285,13 @@ IMPL_LINK( ScTpCalcOptions, CheckClickHdl, CheckBox*, pBtn )
{
if ( pBtn->IsChecked() )
{
- pLocalOptions->SetIter( TRUE );
+ pLocalOptions->SetIter( sal_True );
aFtSteps.Enable(); aEdSteps.Enable();
aFtEps .Enable(); aEdEps .Enable();
}
else
{
- pLocalOptions->SetIter( FALSE );
+ pLocalOptions->SetIter( false );
aFtSteps.Disable(); aEdSteps.Disable();
aFtEps .Disable(); aEdEps .Disable();
}
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index 26ab3f88361e..367180b5153a 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -59,7 +59,7 @@ SfxTabPage* ScTpCompatOptions::Create(Window *pParent, const SfxItemSet &rCoreAt
return new ScTpCompatOptions(pParent, rCoreAttrs);
}
-BOOL ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
+sal_Bool ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
{
ScOptionsUtil::KeyBindingType eKeyB = ScOptionsUtil::KEY_DEFAULT;
switch (maLbKeyBindings.GetSelectEntryPos())
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 38ca8a34aeae..c87183e6bb33 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -215,7 +215,7 @@ SfxTabPage* ScTpFormulaOptions::Create(Window* pParent, const SfxItemSet& rCoreS
return new ScTpFormulaOptions(pParent, rCoreSet);
}
-BOOL ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet)
+sal_Bool ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet)
{
::formula::FormulaGrammar::Grammar eGram = ::formula::FormulaGrammar::GRAM_DEFAULT;
switch (maLbFormulaSyntax.GetSelectEntryPos())
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 31f913e23061..29fd59c5309b 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -42,7 +42,7 @@
// -----------------------------------------------------------------------
-static USHORT pPrintOptRanges[] =
+static sal_uInt16 pPrintOptRanges[] =
{
SID_SCPRINTOPTIONS,
SID_SCPRINTOPTIONS,
@@ -68,7 +68,7 @@ ScTpPrintOptions::~ScTpPrintOptions()
{
}
-USHORT* ScTpPrintOptions::GetRanges()
+sal_uInt16* ScTpPrintOptions::GetRanges()
{
return pPrintOptRanges;
}
@@ -93,7 +93,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
ScPrintOptions aOptions;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, FALSE , &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, false , &pItem))
aOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
else
{
@@ -101,9 +101,9 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
aOptions = SC_MOD()->GetPrintOptions();
}
- if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, FALSE , &pItem ) )
+ if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) )
{
- BOOL bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
+ sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
aSelectedSheetsCB.Check( bChecked );
}
else
@@ -118,7 +118,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
// -----------------------------------------------------------------------
-BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
rCoreAttrs.ClearItem( SID_PRINT_SELECTEDSHEET );
@@ -135,11 +135,11 @@ BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, aSelectedSheetsCB.IsChecked() ) );
}
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return false;
}
}
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index af0cb875409c..6761f313e38c 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -56,7 +56,7 @@
#define CR (sal_Unicode)13
#define LF (sal_Unicode)10
-static USHORT pUserListsRanges[] =
+static sal_uInt16 pUserListsRanges[] =
{
SID_SCUSERLISTS,
SID_SCUSERLISTS,
@@ -99,9 +99,9 @@ ScTpUserLists::ScTpUserLists( Window* pParent,
pDoc ( NULL ),
pViewData ( NULL ),
pRangeUtil ( new ScRangeUtil ),
- bModifyMode ( FALSE ),
- bCancelMode ( FALSE ),
- bCopyDone ( FALSE ),
+ bModifyMode ( false ),
+ bCancelMode ( false ),
+ bCopyDone ( false ),
nCancelPos ( 0 )
{
SetExchangeSupport();
@@ -167,7 +167,7 @@ void ScTpUserLists::Init()
// -----------------------------------------------------------------------
-USHORT* ScTpUserLists::GetRanges()
+sal_uInt16* ScTpUserLists::GetRanges()
{
return pUserListsRanges;
}
@@ -230,7 +230,7 @@ void ScTpUserLists::Reset( const SfxItemSet& rCoreAttrs )
// -----------------------------------------------------------------------
-BOOL ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
+sal_Bool ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
{
// Modifikationen noch nicht uebernommen?
// -> Click auf Add-Button simulieren
@@ -242,18 +242,18 @@ BOOL ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs )
GetItemSet().Get( nWhichUserLists );
ScUserList* pCoreList = rUserListItem.GetUserList();
- BOOL bDataModified = FALSE;
+ sal_Bool bDataModified = false;
if ( (pUserLists == NULL) && (pCoreList == NULL) )
{
- bDataModified = FALSE;
+ bDataModified = false;
}
else if ( pUserLists != NULL )
{
if ( pCoreList != NULL )
bDataModified = (*pUserLists != *pCoreList);
else
- bDataModified = TRUE;
+ bDataModified = sal_True;
}
if ( bDataModified )
@@ -281,7 +281,7 @@ int ScTpUserLists::DeactivatePage( SfxItemSet* pSetP )
// -----------------------------------------------------------------------
-USHORT ScTpUserLists::UpdateUserListBox()
+sal_uInt16 ScTpUserLists::UpdateUserListBox()
{
aLbLists.Clear();
@@ -289,12 +289,12 @@ USHORT ScTpUserLists::UpdateUserListBox()
//----------------------------------------------------------
- USHORT nCount = pUserLists->GetCount();
+ sal_uInt16 nCount = pUserLists->GetCount();
String aEntry;
if ( nCount > 0 )
{
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
aEntry = (*pUserLists)[i]->GetString();
DBG_ASSERT( aEntry.Len() > 0, "Empty UserList-entry :-/" );
@@ -307,7 +307,7 @@ USHORT ScTpUserLists::UpdateUserListBox()
// -----------------------------------------------------------------------
-void ScTpUserLists::UpdateEntries( USHORT nList )
+void ScTpUserLists::UpdateEntries( sal_uInt16 nList )
{
if ( !pUserLists ) return;
@@ -316,10 +316,10 @@ void ScTpUserLists::UpdateEntries( USHORT nList )
if ( nList < pUserLists->GetCount() )
{
ScUserListData* pList = (*pUserLists)[nList];
- USHORT nSubCount = pList->GetSubCount();
+ sal_uInt16 nSubCount = pList->GetSubCount();
String aEntryListStr;
- for ( USHORT i=0; i<nSubCount; i++ )
+ for ( sal_uInt16 i=0; i<nSubCount; i++ )
{
if ( i!=0 )
aEntryListStr += CR;
@@ -413,8 +413,8 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
SCROW nStartRow = rStartPos.Row();
SCCOL nEndCol = rEndPos.Col();
SCROW nEndRow = rEndPos.Row();
- USHORT nCellDir = SCRET_COLS;
- BOOL bValueIgnored = FALSE;
+ sal_uInt16 nCellDir = SCRET_COLS;
+ sal_Bool bValueIgnored = false;
if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) )
{
@@ -447,7 +447,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
}
}
else
- bValueIgnored = TRUE;
+ bValueIgnored = sal_True;
}
if ( aStrList.Len() > 0 )
AddNewList( aStrList );
@@ -471,7 +471,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
}
}
else
- bValueIgnored = TRUE;
+ bValueIgnored = sal_True;
}
if ( aStrList.Len() > 0 )
AddNewList( aStrList );
@@ -487,13 +487,13 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
//----------------------------------------------------------
- bCopyDone = TRUE;
+ bCopyDone = sal_True;
}
// -----------------------------------------------------------------------
-void ScTpUserLists::ModifyList( USHORT nSelList,
+void ScTpUserLists::ModifyList( sal_uInt16 nSelList,
const String& rEntriesStr )
{
if ( !pUserLists ) return;
@@ -509,7 +509,7 @@ void ScTpUserLists::ModifyList( USHORT nSelList,
// -----------------------------------------------------------------------
-void ScTpUserLists::RemoveList( USHORT nList )
+void ScTpUserLists::RemoveList( sal_uInt16 nList )
{
if ( pUserLists ) pUserLists->AtFree( nList );
}
@@ -522,7 +522,7 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb )
{
if ( pLb == &aLbLists )
{
- USHORT nSelPos = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbLists.GetSelectEntryPos();
if ( nSelPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( !aFtEntries.IsEnabled() ) aFtEntries.Enable();
@@ -565,7 +565,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
aEdCopyFrom.Disable();
}
aBtnNew.SetText( aStrCancel );
- bCancelMode = TRUE;
+ bCancelMode = sal_True;
}
else // if ( bCancelMode )
{
@@ -592,8 +592,8 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
aEdCopyFrom.Enable();
}
aBtnNew.SetText( aStrNew );
- bCancelMode = FALSE;
- bModifyMode = FALSE;
+ bCancelMode = false;
+ bModifyMode = false;
}
}
else if ( pBtn == &aBtnAdd )
@@ -625,11 +625,11 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
aBtnAdd.Disable();
aBtnRemove.Enable();
aBtnNew.SetText( aStrNew );
- bCancelMode = FALSE;
+ bCancelMode = false;
}
else // if ( bModifyMode )
{
- USHORT nSelList = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nSelList = aLbLists.GetSelectEntryPos();
DBG_ASSERT( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
@@ -645,8 +645,8 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
LbSelectHdl( &aLbLists );
}
- aBtnNew.SetText( aStrNew ); bCancelMode = FALSE;
- aBtnAdd.SetText( aStrAdd ); bModifyMode = FALSE;
+ aBtnNew.SetText( aStrNew ); bCancelMode = false;
+ aBtnAdd.SetText( aStrAdd ); bModifyMode = false;
aBtnAdd.Disable();
aBtnRemove.Enable();
aFtLists.Enable();
@@ -664,7 +664,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
if ( aLbLists.GetEntryCount() > 0 )
{
- USHORT nRemovePos = aLbLists.GetSelectEntryPos();
+ sal_uInt16 nRemovePos = aLbLists.GetSelectEntryPos();
String aMsg ( aStrQueryRemove.GetToken( 0, '#' ) );
aMsg += aLbLists.GetEntry( nRemovePos );
@@ -716,7 +716,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
ScRefAddress theStartPos;
ScRefAddress theEndPos;
String theAreaStr( aEdCopyFrom.GetText() );
- BOOL bAreaOk = FALSE;
+ sal_Bool bAreaOk = false;
if ( theAreaStr.Len() > 0 )
{
@@ -783,8 +783,8 @@ IMPL_LINK( ScTpUserLists, EdEntriesModHdl, MultiLineEdit*, pEd )
{
if ( !bCancelMode && !bModifyMode )
{
- aBtnNew.SetText( aStrCancel ); bCancelMode = TRUE;
- aBtnAdd.SetText( aStrModify ); bModifyMode = TRUE;
+ aBtnNew.SetText( aStrCancel ); bCancelMode = sal_True;
+ aBtnAdd.SetText( aStrModify ); bModifyMode = sal_True;
aBtnAdd.Enable();
aBtnRemove.Disable();
aFtLists.Disable();
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 005824580fd4..79ec3116762f 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -141,9 +141,9 @@ SfxTabPage* ScTpContentOptions::Create( Window* pParent,
return new ScTpContentOptions(pParent, rCoreSet);
}
-BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if( aFormulaCB .GetSavedValue() != aFormulaCB .IsChecked() ||
aNilCB .GetSavedValue() != aNilCB .IsChecked() ||
aAnnotCB .GetSavedValue() != aAnnotCB .IsChecked() ||
@@ -168,17 +168,17 @@ BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
pLocalOptions->SetGridColor( aColorLB.GetSelectEntryColor(),
aColorLB.GetSelectEntry() );
rCoreSet.Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aRangeFindCB.GetSavedValue() != aRangeFindCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_RANGEFINDER, aRangeFindCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aSyncZoomCB.GetSavedValue() != aSyncZoomCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_OPT_SYNCZOOM, aSyncZoomCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
@@ -188,7 +188,7 @@ BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet )
void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, FALSE , &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
pLocalOptions = new ScViewOptions(
((const ScTpViewItem*)pItem)->GetViewOptions() );
else
@@ -200,9 +200,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
aAnchorCB .Check(pLocalOptions->GetOption(VOPT_ANCHOR));
aClipMarkCB .Check(pLocalOptions->GetOption(VOPT_CLIPMARKS));
- aObjGrfLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_OLE) );
- aDiagramLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_CHART) );
- aDrawLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_DRAW) );
+ aObjGrfLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_OLE) );
+ aDiagramLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_CHART) );
+ aDrawLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_DRAW) );
aRowColHeaderCB.Check( pLocalOptions->GetOption(VOPT_HEADER) );
aHScrollCB .Check( pLocalOptions->GetOption(VOPT_HSCROLL) );
@@ -217,9 +217,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
aHandleCB.Check( !pLocalOptions->GetOption(VOPT_SOLIDHANDLES) ); // inverted
aBigHandleCB.Check( pLocalOptions->GetOption(VOPT_BIGHANDLES) );
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, false, &pItem))
aRangeFindCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, false, &pItem))
aSyncZoomCB.Check(((const SfxBoolItem*)pItem)->GetValue());
aRangeFindCB.SaveValue();
@@ -250,7 +250,7 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
void ScTpContentOptions::ActivatePage( const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, FALSE , &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
*pLocalOptions = ((const ScTpViewItem*)pItem)->GetViewOptions();
}
@@ -263,7 +263,7 @@ int ScTpContentOptions::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb )
{
- USHORT nSelPos = pLb->GetSelectEntryPos();
+ sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
ScVObjMode eMode = ScVObjMode(nSelPos);
ScVObjType eType = VOBJ_TYPE_OLE;
@@ -280,7 +280,7 @@ IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb )
IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn )
{
ScViewOption eOption = VOPT_FORMULAS;
- BOOL bChecked = pBtn->IsChecked();
+ sal_Bool bChecked = pBtn->IsChecked();
if ( &aFormulaCB == pBtn ) eOption = VOPT_FORMULAS;
else if ( &aNilCB == pBtn ) eOption = VOPT_NULLVALS;
@@ -310,7 +310,7 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn )
void ScTpContentOptions::InitGridOpt()
{
- BOOL bGrid = pLocalOptions->GetOption( VOPT_GRID );
+ sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID );
aGridCB.Check( bGrid );
@@ -342,7 +342,7 @@ void ScTpContentOptions::InitGridOpt()
//------------------------------------------------------
- aColorLB.SetUpdateMode( FALSE );
+ aColorLB.SetUpdateMode( false );
// Eintraege aus der Colortable
@@ -360,7 +360,7 @@ void ScTpContentOptions::InitGridOpt()
aColorLB.GetEntryPos( aStdCol ) )
aColorLB.InsertEntry( aStdCol, ScGlobal::GetRscString( STR_GRIDCOLOR ) );
- aColorLB.SetUpdateMode( TRUE );
+ aColorLB.SetUpdateMode( sal_True );
Invalidate();
}
@@ -369,7 +369,7 @@ void ScTpContentOptions::InitGridOpt()
String aName;
Color aCol = pLocalOptions->GetGridColor( &aName );
- USHORT nSelPos = aColorLB.GetEntryPos( aCol );
+ sal_uInt16 nSelPos = aColorLB.GetEntryPos( aCol );
if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
aColorLB.SelectEntryPos( nSelPos );
@@ -379,7 +379,7 @@ void ScTpContentOptions::InitGridOpt()
IMPL_LINK( ScTpContentOptions, GridHdl, CheckBox*, pBox )
{
- BOOL bChecked = pBox->IsChecked();
+ sal_Bool bChecked = pBox->IsChecked();
aColorFT.Enable(bChecked);
aColorLB.Enable(bChecked);
pLocalOptions->SetOption( VOPT_GRID, bChecked );
@@ -422,7 +422,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent,
aAlignCB.SetClickHdl(LINK(this, ScTpLayoutOptions, AlignHdl));
- for ( USHORT i = 0; i < aUnitArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnitArr.Count(); ++i )
{
String sMetric = aUnitArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aUnitArr.GetValue( i );
@@ -436,7 +436,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent,
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- USHORT nPos = aUnitLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aUnitLB.InsertEntry( sMetric );
aUnitLB.SetEntryData( nPos, (void*)(long)eFUnit );
}
break;
@@ -464,23 +464,23 @@ SfxTabPage* ScTpLayoutOptions::Create( Window* pParent,
return pNew;
}
-BOOL ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
{
- BOOL bRet = TRUE;
- const USHORT nMPos = aUnitLB.GetSelectEntryPos();
+ sal_Bool bRet = sal_True;
+ const sal_uInt16 nMPos = aUnitLB.GetSelectEntryPos();
if ( nMPos != aUnitLB.GetSavedValue() )
{
- USHORT nFieldUnit = (USHORT)(long)aUnitLB.GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aUnitLB.GetEntryData( nMPos );
rCoreSet.Put( SfxUInt16Item( SID_ATTR_METRIC,
- (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
if(aTabMF.GetText() != aTabMF.GetSavedValue())
{
rCoreSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
- sal::static_int_cast<UINT16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) )));
- bRet = TRUE;
+ sal::static_int_cast<sal_uInt16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) )));
+ bRet = sal_True;
}
ScLkUpdMode nSet=LM_ALWAYS;
@@ -502,55 +502,55 @@ BOOL ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
aAppOptions.SetLinkMode(nSet );
SC_MOD()->SetAppOptions(aAppOptions);
- bRet = TRUE;
+ bRet = sal_True;
}
if(aAlignCB.GetSavedValue() != aAlignCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_SELECTION, aAlignCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aAlignLB.GetSavedValue() != aAlignLB.GetSelectEntryPos())
{
rCoreSet.Put(SfxUInt16Item(SID_SC_INPUT_SELECTIONPOS, aAlignLB.GetSelectEntryPos()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aEditModeCB.GetSavedValue() != aEditModeCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_EDITMODE, aEditModeCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aFormatCB.GetSavedValue() != aFormatCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_FMT_EXPAND, aFormatCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aExpRefCB.GetSavedValue() != aExpRefCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_REF_EXPAND, aExpRefCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aMarkHdrCB.GetSavedValue() != aMarkHdrCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_MARK_HEADER, aMarkHdrCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if(aTextFmtCB.GetSavedValue() != aTextFmtCB.IsChecked())
{
rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_TEXTWYSIWYG, aTextFmtCB.IsChecked()));
- bRet = TRUE;
+ bRet = sal_True;
}
if( aReplWarnCB.GetSavedValue() != aReplWarnCB.IsChecked() )
{
rCoreSet.Put( SfxBoolItem( SID_SC_INPUT_REPLCELLSWARN, aReplWarnCB.IsChecked() ) );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -564,7 +564,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( USHORT i = 0; i < aUnitLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnitLB.GetEntryCount(); ++i )
{
if ( (FieldUnit)(long)aUnitLB.GetEntryData( i ) == eFieldUnit )
{
@@ -577,7 +577,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
aUnitLB.SaveValue();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem))
aTabMF.SetValue(aTabMF.Normalize(((SfxUInt16Item*)pItem)->GetValue()), FUNIT_TWIP);
aTabMF.SaveValue();
@@ -607,29 +607,29 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
// added to avoid warnings
}
}
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, false, &pItem))
aAlignCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, false, &pItem))
aAlignLB.SelectEntryPos(((const SfxUInt16Item*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, false, &pItem))
aEditModeCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, false, &pItem))
aFormatCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, false, &pItem))
aExpRefCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, false, &pItem))
aMarkHdrCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, FALSE, &pItem))
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, false, &pItem))
aTextFmtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
- if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, false, &pItem ) )
aReplWarnCB.Check( ( (const SfxBoolItem*)pItem)->GetValue() );
aAlignCB .SaveValue();
@@ -661,7 +661,7 @@ int ScTpLayoutOptions::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK(ScTpLayoutOptions, MetricHdl, ListBox*, EMPTYARG)
{
- const USHORT nMPos = aUnitLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aUnitLB.GetSelectEntryPos();
if(nMPos != USHRT_MAX)
{
FieldUnit eFieldUnit = (FieldUnit)(long)aUnitLB.GetEntryData( nMPos );
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 578f488f6529..7b73e7e56599 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -56,16 +56,16 @@
// STATIC DATA ---------------------------------------------------------------
// List box positions for print range (PR)
-const USHORT SC_AREASDLG_PR_NONE = 0;
-const USHORT SC_AREASDLG_PR_ENTIRE = 1;
-const USHORT SC_AREASDLG_PR_USER = 2;
-const USHORT SC_AREASDLG_PR_SELECT = 3;
-const USHORT SC_AREASDLG_PR_OFFSET = 4;
+const sal_uInt16 SC_AREASDLG_PR_NONE = 0;
+const sal_uInt16 SC_AREASDLG_PR_ENTIRE = 1;
+const sal_uInt16 SC_AREASDLG_PR_USER = 2;
+const sal_uInt16 SC_AREASDLG_PR_SELECT = 3;
+const sal_uInt16 SC_AREASDLG_PR_OFFSET = 4;
// List box positions for repeat ranges (RR)
-const USHORT SC_AREASDLG_RR_NONE = 0;
-const USHORT SC_AREASDLG_RR_USER = 1;
-const USHORT SC_AREASDLG_RR_OFFSET = 2;
+const sal_uInt16 SC_AREASDLG_RR_NONE = 0;
+const sal_uInt16 SC_AREASDLG_RR_USER = 1;
+const sal_uInt16 SC_AREASDLG_RR_OFFSET = 2;
//============================================================================
@@ -89,7 +89,7 @@ void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIs
#if 0
// this method is useful when debugging address flags.
-static void printAddressFlags(USHORT nFlag)
+static void printAddressFlags(sal_uInt16 nFlag)
{
if ((nFlag & SCA_COL_ABSOLUTE ) == SCA_COL_ABSOLUTE ) printf("SCA_COL_ABSOLUTE \n");
if ((nFlag & SCA_ROW_ABSOLUTE ) == SCA_ROW_ABSOLUTE ) printf("SCA_ROW_ABSOLUTE \n");
@@ -122,18 +122,18 @@ static void printAddressFlags(USHORT nFlag)
ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent )
: ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_AREAS),
//
- aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
aFlPrintArea ( this, ScResId( FL_PRINTAREA ) ),
+ aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
aEdPrintArea ( this, this, ScResId( ED_PRINTAREA ) ),
aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ),
//
- aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
aFlRepeatRow ( this, ScResId( FL_REPEATROW ) ),
+ aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
aEdRepeatRow ( this, this, ScResId( ED_REPEATROW ) ),
aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ),
//
- aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
aFlRepeatCol ( this, ScResId( FL_REPEATCOL ) ),
+ aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
aEdRepeatCol ( this, this, ScResId( ED_REPEATCOL ) ),
aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ),
//
@@ -141,7 +141,7 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
//
- bDlgLostFocus ( FALSE ),
+ bDlgLostFocus ( false ),
pRefInputEdit ( &aEdPrintArea ),
pDoc ( NULL ),
pViewData ( NULL ),
@@ -176,10 +176,10 @@ ScPrintAreasDlg::~ScPrintAreasDlg()
// Extra-Data an ListBox-Entries abraeumen
ListBox* pLb[3] = { &aLbPrintArea, &aLbRepeatRow, &aLbRepeatCol };
- for ( USHORT i=0; i<3; i++ )
+ for ( sal_uInt16 i=0; i<3; i++ )
{
- USHORT nCount = pLb[i]->GetEntryCount();
- for ( USHORT j=0; j<nCount; j++ )
+ sal_uInt16 nCount = pLb[i]->GetEntryCount();
+ for ( sal_uInt16 j=0; j<nCount; j++ )
delete (String*)pLb[i]->GetEntryData(j);
}
}
@@ -187,7 +187,7 @@ ScPrintAreasDlg::~ScPrintAreasDlg()
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::Close()
+sal_Bool ScPrintAreasDlg::Close()
{
return DoClose( ScPrintAreasDlgWrapper::GetChildWindowId() );
}
@@ -195,12 +195,12 @@ BOOL ScPrintAreasDlg::Close()
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::IsTableLocked() const
+sal_Bool ScPrintAreasDlg::IsTableLocked() const
{
// Druckbereiche gelten pro Tabelle, darum macht es keinen Sinn,
// bei der Eingabe die Tabelle umzuschalten
- return TRUE;
+ return sal_True;
}
@@ -230,7 +230,7 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */
}
else
{
- BOOL bRow = ( &aEdRepeatRow == pRefInputEdit );
+ sal_Bool bRow = ( &aEdRepeatRow == pRefInputEdit );
lcl_GetRepeatRangeString(&rRef, pDoc, bRow, aStr);
pRefInputEdit->SetRefString( aStr );
}
@@ -263,7 +263,7 @@ void ScPrintAreasDlg::AddRefEntry()
void ScPrintAreasDlg::Deactivate()
{
- bDlgLostFocus = TRUE;
+ bDlgLostFocus = sal_True;
}
@@ -273,7 +273,7 @@ void ScPrintAreasDlg::SetActive()
{
if ( bDlgLostFocus )
{
- bDlgLostFocus = FALSE;
+ bDlgLostFocus = false;
if ( pRefInputEdit )
{
@@ -320,8 +320,8 @@ void ScPrintAreasDlg::Impl_Reset()
String aOne;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
- USHORT nRangeCount = pDoc->GetPrintRangeCount( nCurTab );
- for (USHORT i=0; i<nRangeCount; i++)
+ sal_uInt16 nRangeCount = pDoc->GetPrintRangeCount( nCurTab );
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
const ScRange* pPrintRange = pDoc->GetPrintRange( nCurTab, i );
if (pPrintRange)
@@ -360,10 +360,10 @@ void ScPrintAreasDlg::Impl_Reset()
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
+sal_Bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
{
String aRangeStr = pEd->GetText();
- BOOL bDataChanged = (pEd->GetSavedValue() != aRangeStr);
+ sal_Bool bDataChanged = (pEd->GetSavedValue() != aRangeStr);
if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd )
{
@@ -381,18 +381,18 @@ BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
//----------------------------------------------------------------------------
-BOOL ScPrintAreasDlg::Impl_CheckRefStrings()
+sal_Bool ScPrintAreasDlg::Impl_CheckRefStrings()
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
String aStrPrintArea = aEdPrintArea.GetText();
String aStrRepeatRow = aEdRepeatRow.GetText();
String aStrRepeatCol = aEdRepeatCol.GetText();
- BOOL bPrintAreaOk = TRUE;
+ sal_Bool bPrintAreaOk = sal_True;
if ( aStrPrintArea.Len() )
{
- const USHORT nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL;
- const USHORT nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2;
+ const sal_uInt16 nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL;
+ const sal_uInt16 nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
@@ -402,21 +402,21 @@ BOOL ScPrintAreasDlg::Impl_CheckRefStrings()
for ( xub_StrLen i = 0; i < nSepCount && bPrintAreaOk; ++i )
{
String aOne = aStrPrintArea.GetToken(i, sep);
- USHORT nResult = aRange.Parse( aOne, pDoc, eConv );
+ sal_uInt16 nResult = aRange.Parse( aOne, pDoc, eConv );
if ((nResult & nValidRange) != nValidRange)
{
- USHORT nAddrResult = aAddr.Parse( aOne, pDoc, eConv );
+ sal_uInt16 nAddrResult = aAddr.Parse( aOne, pDoc, eConv );
if ((nAddrResult & nValidAddr) != nValidAddr)
- bPrintAreaOk = FALSE;
+ bPrintAreaOk = false;
}
}
}
- BOOL bRepeatRowOk = (aStrRepeatRow.Len() == 0);
+ sal_Bool bRepeatRowOk = (aStrRepeatRow.Len() == 0);
if ( !bRepeatRowOk )
bRepeatRowOk = lcl_CheckRepeatString(aStrRepeatRow, pDoc, true, NULL);
- BOOL bRepeatColOk = (aStrRepeatCol.Len() == 0);
+ sal_Bool bRepeatColOk = (aStrRepeatCol.Len() == 0);
if ( !bRepeatColOk )
bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, NULL);
@@ -453,7 +453,7 @@ void ScPrintAreasDlg::Impl_FillLists()
//------------------------------------------------------
ScRange aRange;
String aStrRange;
- BOOL bSimple = TRUE;
+ sal_Bool bSimple = sal_True;
if ( pViewData )
bSimple = (pViewData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE);
@@ -465,7 +465,7 @@ void ScPrintAreasDlg::Impl_FillLists()
else
{
ScRangeListRef aList( new ScRangeList );
- pViewData->GetMarkData().FillRangeListWithMarks( aList, FALSE );
+ pViewData->GetMarkData().FillRangeListWithMarks( aList, false );
aList->Format( aStrRange, SCR_ABS, pDoc, eConv );
}
@@ -529,7 +529,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
{
if ( Impl_CheckRefStrings() )
{
- BOOL bDataChanged = FALSE;
+ sal_Bool bDataChanged = false;
String aStr;
SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
@@ -540,7 +540,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
//-------------------------
// first try the list box, if "Entite sheet" is selected
- BOOL bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
+ sal_Bool bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE);
SfxBoolItem aEntireSheet( FN_PARAM_4, bEntireSheet );
bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab );
@@ -562,7 +562,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
if ( bDataChanged )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( SID_CHANGE_PRINTAREA,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -610,13 +610,13 @@ IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr )
IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb )
{
- USHORT nSelPos = pLb->GetSelectEntryPos();
+ sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
Edit* pEd = NULL;
// list box positions of specific entries, default to "repeat row/column" list boxes
- USHORT nAllSheetPos = SC_AREASDLG_RR_NONE;
- USHORT nUserDefPos = SC_AREASDLG_RR_USER;
- USHORT nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
+ sal_uInt16 nAllSheetPos = SC_AREASDLG_RR_NONE;
+ sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
+ sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
// find edit field for list box, and list box positions
if( pLb == &aLbPrintArea )
@@ -652,8 +652,8 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
ListBox* pLb = NULL;
// list box positions of specific entries, default to "repeat row/column" list boxes
- USHORT nUserDefPos = SC_AREASDLG_RR_USER;
- USHORT nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
+ sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
+ sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
if( pEd == &aEdPrintArea )
{
@@ -669,16 +669,16 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
return 0;
// set list box selection according to edit field
- USHORT nEntryCount = pLb->GetEntryCount();
+ sal_uInt16 nEntryCount = pLb->GetEntryCount();
String aStrEd( pEd->GetText() );
String aEdUpper = aStrEd;
aEdUpper.ToUpperAscii();
if ( (nEntryCount > nFirstCustomPos) && aStrEd.Len() > 0 )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
String* pSymbol = NULL;
- USHORT i;
+ sal_uInt16 i;
for ( i=nFirstCustomPos; i<nEntryCount && !bFound; i++ )
{
@@ -711,7 +711,7 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal )
String aStr = rStr;
xub_StrLen nLen = aStr.Len();
SCCOLROW nNum = 0;
- BOOL bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) );
+ sal_Bool bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) );
if ( bStrOk )
{
@@ -726,7 +726,7 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal )
{
sal_Int32 n = aStr.ToInt32();
- if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != FALSE )
+ if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != false )
nNum = static_cast<SCCOLROW>(n - 1);
}
}
@@ -893,7 +893,7 @@ void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIs
const ScAddress& rStart = pRange->aStart;
const ScAddress& rEnd = pRange->aEnd;
- const USHORT nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE);
+ const sal_uInt16 nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE);
String aTmpStr;
rStart.Format(aTmpStr, nFmt, pDoc, eConv);
rStr += aTmpStr;
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 8ba49db77dfc..798cf65f85bc 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -65,7 +65,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP,
Window* pParent,
const SfxItemSet& rCoreSet,
const String& rPageStyle,
- USHORT nResIdP )
+ sal_uInt16 nResIdP )
: SfxTabDialog( pFrameP, pParent, ScResId( nResIdP ), &rCoreSet )
{
eNumType = ((const SvxPageItem&)rCoreSet.Get(ATTR_PAGE)).GetNumType();
@@ -135,7 +135,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP,
rCoreSet.Get(
rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) );
- BOOL bRightPage = ( SVX_PAGE_LEFT !=
+ sal_Bool bRightPage = ( SVX_PAGE_LEFT !=
SvxPageUsage(rPageItem.GetPageUsage()) );
if ( bRightPage )
@@ -147,13 +147,13 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP,
{
// #69193a# respect "shared" setting
- BOOL bShareHeader = IS_SHARE_HEADER(rCoreSet);
+ sal_Bool bShareHeader = IS_SHARE_HEADER(rCoreSet);
if ( bShareHeader )
AddTabPage( 1, ScRightHeaderEditPage::Create, NULL );
else
AddTabPage( 1, ScLeftHeaderEditPage::Create, NULL );
- BOOL bShareFooter = IS_SHARE_FOOTER(rCoreSet);
+ sal_Bool bShareFooter = IS_SHARE_FOOTER(rCoreSet);
if ( bShareFooter )
AddTabPage( 2, ScRightFooterEditPage::Create, NULL );
else
@@ -174,7 +174,7 @@ ScHFEditDlg::~ScHFEditDlg()
// -----------------------------------------------------------------------
-void ScHFEditDlg::PageCreated( USHORT /* nId */, SfxTabPage& rPage )
+void ScHFEditDlg::PageCreated( sal_uInt16 /* nId */, SfxTabPage& rPage )
{
// kann ja nur ne ScHFEditPage sein...
diff --git a/sc/source/ui/pagedlg/hfedtdlg.src b/sc/source/ui/pagedlg/hfedtdlg.src
index b82497877763..bcfdef66b613 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.src
+++ b/sc/source/ui/pagedlg/hfedtdlg.src
@@ -70,13 +70,13 @@ TabDialog RID_SCDLG_HFED_HEADER
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
};
};
@@ -102,13 +102,13 @@ TabDialog RID_SCDLG_HFED_FOOTER
{
Identifier = 1 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 2 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -137,25 +137,25 @@ TabDialog RID_SCDLG_HFEDIT_ALL
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
PageItem
{
Identifier = 3 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 4 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -181,19 +181,19 @@ TabDialog RID_SCDLG_HFEDIT_SHDR
{
Identifier = 1 ;
HEADER
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 3 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -219,19 +219,19 @@ TabDialog RID_SCDLG_HFEDIT_SFTR
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
PageItem
{
Identifier = 3 ;
FOOTER
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
};
};
@@ -257,13 +257,13 @@ TabDialog RID_SCDLG_HFEDIT
{
Identifier = 1 ;
HEADER
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
FOOTER
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
};
};
@@ -289,13 +289,13 @@ TabDialog RID_SCDLG_HFEDIT_HEADER
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
PageItem
{
Identifier = 2 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
};
};
@@ -321,13 +321,13 @@ TabDialog RID_SCDLG_HFEDIT_FOOTER
{
Identifier = 1 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
PageItem
{
Identifier = 2 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
@@ -353,7 +353,7 @@ TabDialog RID_SCDLG_HFEDIT_RIGHTHEADER
{
Identifier = 1 ;
HEADER_RIGHT
- PageResID = HID_SCPAGE_HFED_HR ;
+ PageResID = RID_SCPAGE_HFED_HR ;
};
};
};
@@ -379,7 +379,7 @@ TabDialog RID_SCDLG_HFEDIT_LEFTHEADER
{
Identifier = 1 ;
HEADER_LEFT
- PageResID = HID_SCPAGE_HFED_HL ;
+ PageResID = RID_SCPAGE_HFED_HL ;
};
};
};
@@ -405,7 +405,7 @@ TabDialog RID_SCDLG_HFEDIT_RIGHTFOOTER
{
Identifier = 1 ;
FOOTER_RIGHT
- PageResID = HID_SCPAGE_HFED_FR ;
+ PageResID = RID_SCPAGE_HFED_FR ;
};
};
};
@@ -431,7 +431,7 @@ TabDialog RID_SCDLG_HFEDIT_LEFTFOOTER
{
Identifier = 1 ;
FOOTER_LEFT
- PageResID = HID_SCPAGE_HFED_FL ;
+ PageResID = RID_SCPAGE_HFED_FL ;
};
};
};
diff --git a/sc/source/ui/pagedlg/pagedlg.src b/sc/source/ui/pagedlg/pagedlg.src
index d02432d94cd9..0a56d70f966a 100644
--- a/sc/source/ui/pagedlg/pagedlg.src
+++ b/sc/source/ui/pagedlg/pagedlg.src
@@ -60,6 +60,7 @@ ModelessDialog RID_SCDLG_AREAS
};
ListBox LB_PRINTAREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_PRINTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
@@ -74,12 +75,14 @@ ModelessDialog RID_SCDLG_AREAS
};
Edit ED_PRINTAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_PRINTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 14 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
};
ImageButton RB_PRINTAREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_PRINTAREA";
Pos = MAP_APPFONT ( 239 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -93,6 +96,7 @@ ModelessDialog RID_SCDLG_AREAS
};
ListBox LB_REPEATROW
{
+ HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_REPEATROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
@@ -105,12 +109,14 @@ ModelessDialog RID_SCDLG_AREAS
};
Edit ED_REPEATROW
{
+ HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_REPEATROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 43 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
};
ImageButton RB_REPEATROW
{
+ HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_REPEATROW";
Pos = MAP_APPFONT ( 239 , 42 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -124,6 +130,7 @@ ModelessDialog RID_SCDLG_AREAS
};
ListBox LB_REPEATCOL
{
+ HelpID = "sc:ListBox:RID_SCDLG_AREAS:LB_REPEATCOL";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 72 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
@@ -136,12 +143,14 @@ ModelessDialog RID_SCDLG_AREAS
};
Edit ED_REPEATCOL
{
+ HelpID = "sc:Edit:RID_SCDLG_AREAS:ED_REPEATCOL";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 72 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
};
ImageButton RB_REPEATCOL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_AREAS:RB_REPEATCOL";
Pos = MAP_APPFONT ( 239 , 71 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -158,6 +167,7 @@ TabPage RID_SCPAGE_TABLE
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_HEADER";
Pos = MAP_APPFONT ( 12 , 73 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Column and row headers" ;
@@ -165,6 +175,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_GRID
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_GRID";
Pos = MAP_APPFONT ( 12 , 87 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Grid" ;
@@ -172,6 +183,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_NOTES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_NOTES";
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -179,6 +191,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_OBJECTS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_OBJECTS";
Pos = MAP_APPFONT ( 12 , 115 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Objects/graphics" ;
@@ -186,6 +199,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_CHARTS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_CHARTS";
Pos = MAP_APPFONT ( 160 , 73 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "Ch~arts" ;
@@ -193,6 +207,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_DRAWINGS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_DRAWINGS";
Pos = MAP_APPFONT ( 160 , 87 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "~Drawing objects" ;
@@ -200,6 +215,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_FORMULAS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_FORMULAS";
Pos = MAP_APPFONT ( 160 , 101 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
@@ -207,6 +223,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_NULLVALS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_NULLVALS";
Pos = MAP_APPFONT ( 160 , 115 ) ;
Size = MAP_APPFONT ( 91 , 10 ) ;
Text [ en-US ] = "Zero ~values" ;
@@ -220,6 +237,7 @@ TabPage RID_SCPAGE_TABLE
};
RadioButton BTN_TOPDOWN
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_TABLE:BTN_TOPDOWN";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Top to bottom, then right" ;
@@ -227,6 +245,7 @@ TabPage RID_SCPAGE_TABLE
};
RadioButton BTN_LEFTRIGHT
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_TABLE:BTN_LEFTRIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
Text [ en-US ] = "~Left to right, then down" ;
@@ -249,6 +268,7 @@ TabPage RID_SCPAGE_TABLE
};
CheckBox BTN_PAGENO
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_PAGENO";
Pos = MAP_APPFONT ( 12 , 46 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "First ~page number" ;
@@ -256,6 +276,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_PAGENO
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_PAGENO";
Border = TRUE ;
Pos = MAP_APPFONT ( 106 , 44 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -280,6 +301,7 @@ TabPage RID_SCPAGE_TABLE
};
ListBox LB_SCALEMODE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_TABLE:LB_SCALEMODE";
Border = TRUE;
Pos = MAP_APPFONT( 12, 155 );
Size = MAP_APPFONT( 124, 60 );
@@ -293,6 +315,7 @@ TabPage RID_SCPAGE_TABLE
};
MetricField ED_SCALEALL
{
+ HelpID = "sc:MetricField:RID_SCPAGE_TABLE:ED_SCALEALL";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 155 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -309,6 +332,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_SCALEPAGEWIDTH
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGEWIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 144 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -322,6 +346,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_SCALEPAGEHEIGHT
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGEHEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 160 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -335,6 +360,7 @@ TabPage RID_SCPAGE_TABLE
};
NumericField ED_SCALEPAGENUM
{
+ HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGENUM";
Border = TRUE ;
Pos = MAP_APPFONT ( 218 , 155 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 3d57d39bbe17..dd47ce988480 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -69,19 +69,19 @@
// STATIC DATA -----------------------------------------------------------
-static USHORT pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT,
+static sal_uInt16 pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT,
SID_SCATTR_PAGE_HEADERRIGHT,
0 };
-static USHORT pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT,
+static sal_uInt16 pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT,
SID_SCATTR_PAGE_FOOTERRIGHT,
0 };
-static USHORT pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT,
+static sal_uInt16 pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT,
SID_SCATTR_PAGE_HEADERLEFT,
0 };
-static USHORT pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT,
+static sal_uInt16 pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT,
SID_SCATTR_PAGE_FOOTERLEFT,
0 };
@@ -94,9 +94,9 @@ static ScEditWindow* pActiveEdWnd = NULL;
//
ScHFEditPage::ScHFEditPage( Window* pParent,
- USHORT nResId,
+ sal_uInt16 nResId,
const SfxItemSet& rCoreAttrs,
- USHORT nWhichId,
+ sal_uInt16 nWhichId,
bool bHeader )
: SfxTabPage ( pParent, ScResId( nResId ), rCoreAttrs ),
@@ -208,7 +208,7 @@ void ScHFEditPage::Reset( const SfxItemSet& rCoreSet )
// -----------------------------------------------------------------------
-BOOL ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
{
ScPageHFItem aItem( nWhich );
EditTextObject* pLeft = aWndLeft .CreateTextObject();
@@ -224,7 +224,7 @@ BOOL ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet )
rCoreSet.Put( aItem );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -336,7 +336,7 @@ void ScHFEditPage::InitPreDefinedList()
void ScHFEditPage::InsertToDefinedList()
{
- USHORT nCount = maLbDefined.GetEntryCount();
+ sal_uInt16 nCount = maLbDefined.GetEntryCount();
if(nCount == eEntryCount)
{
String aCustomizedEntry(ScGlobal::GetRscString( STR_HF_CUSTOMIZED ) );
@@ -347,7 +347,7 @@ void ScHFEditPage::InsertToDefinedList()
void ScHFEditPage::RemoveFromDefinedList()
{
- USHORT nCount = maLbDefined.GetEntryCount();
+ sal_uInt16 nCount = maLbDefined.GetEntryCount();
if(nCount > eEntryCount )
maLbDefined.RemoveEntry( nCount-1);
}
@@ -374,8 +374,8 @@ void ScHFEditPage::SetSelectDefinedList()
bool bFound = false;
- USHORT i;
- USHORT nCount = maLbDefined.GetEntryCount();
+ sal_uInt16 i;
+ sal_uInt16 nCount = maLbDefined.GetEntryCount();
for(i = 0; i < nCount && !bFound; i++)
{
switch(static_cast<ScHFEntryId>(i))
@@ -542,7 +542,7 @@ void ScHFEditPage::SetSelectDefinedList()
if(eSelectEntry == eEntryCount)
InsertToDefinedList();
- maLbDefined.SelectEntryPos( sal::static_int_cast<USHORT>( eSelectEntry ) );
+ maLbDefined.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eSelectEntry ) );
}
bool ScHFEditPage::IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj)
@@ -925,7 +925,7 @@ ScRightHeaderEditPage::ScRightHeaderEditPage( Window* pParent, const SfxItemSet&
// -----------------------------------------------------------------------
-USHORT* ScRightHeaderEditPage::GetRanges()
+sal_uInt16* ScRightHeaderEditPage::GetRanges()
{ return pPageRightHeaderRanges; }
// -----------------------------------------------------------------------
@@ -945,7 +945,7 @@ ScLeftHeaderEditPage::ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& r
// -----------------------------------------------------------------------
-USHORT* ScLeftHeaderEditPage::GetRanges()
+sal_uInt16* ScLeftHeaderEditPage::GetRanges()
{ return pPageLeftHeaderRanges; }
// -----------------------------------------------------------------------
@@ -964,7 +964,7 @@ ScRightFooterEditPage::ScRightFooterEditPage( Window* pParent, const SfxItemSet&
// -----------------------------------------------------------------------
-USHORT* ScRightFooterEditPage::GetRanges()
+sal_uInt16* ScRightFooterEditPage::GetRanges()
{ return pPageRightFooterRanges; }
// -----------------------------------------------------------------------
@@ -983,7 +983,7 @@ ScLeftFooterEditPage::ScLeftFooterEditPage( Window* pParent, const SfxItemSet& r
// -----------------------------------------------------------------------
-USHORT* ScLeftFooterEditPage::GetRanges()
+sal_uInt16* ScLeftFooterEditPage::GetRanges()
{ return pPageLeftFooterRanges; }
// -----------------------------------------------------------------------
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 7e536683f4ff..824d64a0e287 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -60,15 +60,15 @@
// class ScHFPage
//==================================================================
-ScHFPage::ScHFPage( Window* pParent, USHORT nResId,
- const SfxItemSet& rSet, USHORT nSetId )
+ScHFPage::ScHFPage( Window* pParent, sal_uInt16 nResId,
+ const SfxItemSet& rSet, sal_uInt16 nSetId )
: SvxHFPage ( pParent, nResId, rSet, nSetId ),
aBtnEdit ( this, ScResId( RID_SCBTN_HFEDIT ) ),
aDataSet ( *rSet.GetPool(),
ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
ATTR_PAGE, ATTR_PAGE, 0 ),
- nPageUsage ( (USHORT)SVX_PAGE_ALL ),
+ nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ),
pStyleDlg ( NULL )
{
SetExchangeSupport();
@@ -101,6 +101,8 @@ ScHFPage::ScHFPage( Window* pParent, USHORT nResId,
aBtnEdit.SetHelpId( HID_SC_HEADER_EDIT );
else
aBtnEdit.SetHelpId( HID_SC_FOOTER_EDIT );
+
+ aBtnEdit.SetAccessibleRelationMemberOf(&aFrm);
}
//------------------------------------------------------------------
@@ -119,9 +121,9 @@ void ScHFPage::Reset( const SfxItemSet& rSet )
//------------------------------------------------------------------
-BOOL ScHFPage::FillItemSet( SfxItemSet& rOutSet )
+sal_Bool ScHFPage::FillItemSet( SfxItemSet& rOutSet )
{
- BOOL bResult = SvxHFPage::FillItemSet( rOutSet );
+ sal_Bool bResult = SvxHFPage::FillItemSet( rOutSet );
if ( nId == SID_ATTR_PAGE_HEADERSET )
{
@@ -141,7 +143,7 @@ BOOL ScHFPage::FillItemSet( SfxItemSet& rOutSet )
void ScHFPage::ActivatePage( const SfxItemSet& rSet )
{
- USHORT nPageWhich = GetWhich( SID_ATTR_PAGE );
+ sal_uInt16 nPageWhich = GetWhich( SID_ATTR_PAGE );
const SvxPageItem& rPageItem = (const SvxPageItem&)
rSet.Get(nPageWhich);
@@ -219,7 +221,7 @@ IMPL_LINK( ScHFPage, HFEditHdl, void*, EMPTYARG )
if ( aCntSharedBox.IsEnabled()
&& !aCntSharedBox.IsChecked() )
{
- USHORT nResId = ( nId == SID_ATTR_PAGE_HEADERSET )
+ sal_uInt16 nResId = ( nId == SID_ATTR_PAGE_HEADERSET )
? RID_SCDLG_HFED_HEADER
: RID_SCDLG_HFED_FOOTER;
@@ -238,7 +240,7 @@ IMPL_LINK( ScHFPage, HFEditHdl, void*, EMPTYARG )
{
String aText;
SfxSingleTabDialog* pDlg = new SfxSingleTabDialog( this, aDataSet, 42 );
- BOOL bRightPage = aCntSharedBox.IsChecked()
+ sal_Bool bRightPage = aCntSharedBox.IsChecked()
|| ( SVX_PAGE_LEFT != SvxPageUsage(nPageUsage) );
if ( nId == SID_ATTR_PAGE_HEADERSET )
@@ -298,7 +300,7 @@ SfxTabPage* ScHeaderPage::Create( Window* pParent, const SfxItemSet& rCoreSet )
//------------------------------------------------------------------
-USHORT* ScHeaderPage::GetRanges()
+sal_uInt16* ScHeaderPage::GetRanges()
{
return SvxHeaderPage::GetRanges();
}
@@ -321,7 +323,7 @@ SfxTabPage* ScFooterPage::Create( Window* pParent, const SfxItemSet& rCoreSet )
//------------------------------------------------------------------
-USHORT* ScFooterPage::GetRanges()
+sal_uInt16* ScFooterPage::GetRanges()
{
return SvxHeaderPage::GetRanges();
}
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 7769f39bcd30..3a8730b5b09b 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -95,7 +95,7 @@ ScEditWindow::ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLo
eLocation(eLoc),
pAcc(NULL)
{
- EnableRTL(FALSE);
+ EnableRTL(false);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
Color aBgColor = rStyleSettings.GetWindowColor();
@@ -107,7 +107,7 @@ ScEditWindow::ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLo
Size aSize( GetOutputSize() );
aSize.Height() *= 4;
- pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE );
+ pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True );
pEdEngine->SetPaperSize( aSize );
pEdEngine->SetRefDevice( this );
@@ -159,8 +159,8 @@ EditTextObject* ScEditWindow::CreateTextObject()
// (GetAttribs beim Format-Dialog-Aufruf gibt immer gesetzte Items zurueck)
const SfxItemSet& rEmpty = pEdEngine->GetEmptyItemSet();
- USHORT nParCnt = pEdEngine->GetParagraphCount();
- for (USHORT i=0; i<nParCnt; i++)
+ sal_uInt16 nParCnt = pEdEngine->GetParagraphCount();
+ for (sal_uInt16 i=0; i<nParCnt; i++)
pEdEngine->SetParaAttribs( i, rEmpty );
return pEdEngine->CreateTextObject();
@@ -212,7 +212,7 @@ void ScEditWindow::SetCharAttriutes()
if ( pDocSh && pViewSh )
{
- if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(TRUE);
+ if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(sal_True);
SfxItemSet aSet( pEdView->GetAttribs() );
@@ -230,7 +230,7 @@ void ScEditWindow::SetCharAttriutes()
pEdView->SetAttribs( aSet );
}
- if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(FALSE);
+ if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(false);
delete pDlg;
}
}
@@ -279,7 +279,7 @@ void ScEditWindow::MouseButtonUp( const MouseEvent& rMEvt )
void ScEditWindow::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nKey = rKEvt.GetKeyCode().GetModifier()
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetModifier()
+ rKEvt.GetKeyCode().GetCode();
if ( nKey == KEY_TAB || nKey == KEY_TAB + KEY_SHIFT )
@@ -362,7 +362,7 @@ ScExtIButton::ScExtIButton(Window* pParent, const ResId& rResId )
{
nSelected=0;
aTimer.SetTimeout(600);
- SetDropDown( TRUE);
+ SetDropDown( true);
}
void ScExtIButton::SetPopupMenu(ScPopupMenu* pPopUp)
@@ -370,7 +370,7 @@ void ScExtIButton::SetPopupMenu(ScPopupMenu* pPopUp)
pPopupMenu=pPopUp;
}
-USHORT ScExtIButton::GetSelected()
+sal_uInt16 ScExtIButton::GetSelected()
{
return nSelected;
}
@@ -405,7 +405,7 @@ void ScExtIButton::StartPopup()
if(pPopupMenu!=NULL)
{
- SetPressed( TRUE );
+ SetPressed( sal_True );
EndSelection();
Point aPoint(0,0);
aPoint.Y()=GetOutputSizePixel().Height();
@@ -416,13 +416,13 @@ void ScExtIButton::StartPopup()
{
aMLink.Call(this);
}
- SetPressed( FALSE);
+ SetPressed( false);
}
}
long ScExtIButton::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nSwitch=rNEvt.GetType();
+ sal_uInt16 nSwitch=rNEvt.GetType();
if(nSwitch==EVENT_MOUSEBUTTONUP)
{
MouseButtonUp(*rNEvt.GetMouseEvent());
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 56a37f438717..59d58f2913db 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -71,38 +71,38 @@ sal_Int64 EmptyNumericField::GetValue() const
// STATIC DATA -----------------------------------------------------------
-static USHORT pPageTableRanges[] =
+static sal_uInt16 pPageTableRanges[] =
{
ATTR_PAGE_NOTES, ATTR_PAGE_FIRSTPAGENO,
0
};
-BOOL lcl_PutVObjModeItem( USHORT nWhich,
+sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const CheckBox& rBtn );
-BOOL lcl_PutScaleItem( USHORT nWhich,
+sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const SpinField& rEd,
- UINT16 nValue );
+ sal_uInt16 nValue );
-BOOL lcl_PutScaleItem2( USHORT nWhich,
+sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const NumericField& rEd1,
const NumericField& rEd2 );
-BOOL lcl_PutBoolItem( USHORT nWhich,
+sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
- BOOL bIsChecked,
- BOOL bSavedValue );
+ sal_Bool bIsChecked,
+ sal_Bool bSavedValue );
//------------------------------------------------------------------------
@@ -110,9 +110,9 @@ BOOL lcl_PutBoolItem( USHORT nWhich,
#define PAGEDIR_HDL LINK(this,ScTablePage,PageDirHdl)
#define SCALE_HDL LINK(this,ScTablePage,ScaleHdl)
-#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),TRUE))
+#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),sal_True))
#define GET_BOOL(sid,set) ((const SfxBoolItem&)((set).Get(GetWhich((sid))))).GetValue()
-#define GET_USHORT(sid,set) (USHORT)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue()
+#define GET_USHORT(sid,set) (sal_uInt16)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue()
#define GET_SHOW(sid,set) ( ScVObjMode( ((const ScViewObjectModeItem&)((set).Get(GetWhich((sid))))).GetValue() ) \
== VOBJ_MODE_SHOW )
@@ -161,6 +161,9 @@ ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) :
aBmpPageDir.SetOutputSizePixel( aBmpSize );
FreeResource();
+
+ aEdPageNo.SetAccessibleName(aBtnPageNo.GetText());
+ aEdPageNo.SetAccessibleRelationLabeledBy(&aBtnPageNo);
}
// -----------------------------------------------------------------------
@@ -179,7 +182,7 @@ ScTablePage::~ScTablePage()
//------------------------------------------------------------------------
-USHORT* ScTablePage::GetRanges()
+sal_uInt16* ScTablePage::GetRanges()
{
return pPageTableRanges;
}
@@ -195,11 +198,11 @@ SfxTabPage* ScTablePage::Create( Window* pParent, const SfxItemSet& rCoreSet )
void ScTablePage::Reset( const SfxItemSet& rCoreSet )
{
- BOOL bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet );
- USHORT nWhich = 0;
+ sal_Bool bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet );
+ sal_uInt16 nWhich = 0;
//-----------
- // BOOL-Flags
+ // sal_Bool-Flags
//-----------
aBtnNotes .Check( GET_BOOL(SID_SCATTR_PAGE_NOTES,rCoreSet) );
aBtnGrid .Check( GET_BOOL(SID_SCATTR_PAGE_GRID,rCoreSet) );
@@ -212,7 +215,7 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
//------------------
// Erste Druckseite:
//------------------
- USHORT nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet);
+ sal_uInt16 nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet);
aBtnPageNo.Check( nPage != 0 );
aEdPageNo.SetValue( (nPage != 0) ? nPage : 1 );
PageNoHdl( NULL );
@@ -229,20 +232,20 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
//------------
nWhich = GetWhich(SID_SCATTR_PAGE_SCALE);
- if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE )
{
- USHORT nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
+ sal_uInt16 nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
if( nScale > 0 )
aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT );
aEdScaleAll.SetValue( (nScale > 0) ? nScale : 100 );
}
nWhich = GetWhich(SID_SCATTR_PAGE_SCALETO);
- if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE )
{
const ScPageScaleToItem& rItem = static_cast< const ScPageScaleToItem& >( rCoreSet.Get( nWhich ) );
- USHORT nWidth = rItem.GetWidth();
- USHORT nHeight = rItem.GetHeight();
+ sal_uInt16 nWidth = rItem.GetWidth();
+ sal_uInt16 nHeight = rItem.GetHeight();
/* width==0 and height==0 is invalid state, used as "not selected".
Dialog shows width=height=1 then. */
@@ -254,9 +257,9 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
}
nWhich = GetWhich(SID_SCATTR_PAGE_SCALETOPAGES);
- if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE )
{
- USHORT nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
+ sal_uInt16 nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue();
if( nPages > 0 )
aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_TO_PAGES );
aEdScalePageNum.SetValue( (nPages > 0) ? nPages : 1 );
@@ -295,14 +298,14 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet )
// -----------------------------------------------------------------------
-BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
{
const SfxItemSet& rOldSet = GetItemSet();
- USHORT nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO);
- BOOL bDataChanged = FALSE;
+ sal_uInt16 nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO);
+ sal_Bool bDataChanged = false;
//-----------
- // BOOL-Flags
+ // sal_Bool-Flags
//-----------
bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES),
@@ -338,7 +341,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
//------------------
// Erste Druckseite:
//------------------
- BOOL bUseValue = aBtnPageNo.IsChecked();
+ sal_Bool bUseValue = aBtnPageNo.IsChecked();
if ( WAS_DEFAULT(nWhichPageNo,rOldSet)
&& ( (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue())
@@ -349,12 +352,12 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
}
else
{
- UINT16 nPage = (UINT16)( aBtnPageNo.IsChecked()
+ sal_uInt16 nPage = (sal_uInt16)( aBtnPageNo.IsChecked()
? aEdPageNo.GetValue()
: 0 );
rCoreSet.Put( SfxUInt16Item( nWhichPageNo, nPage ) );
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
//-------------------
@@ -383,7 +386,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALE),
rCoreSet, rOldSet,
aLbScaleMode, SC_TPTABLE_SCALE_PERCENT,
- aEdScaleAll, (UINT16)aEdScaleAll.GetValue() );
+ aEdScaleAll, (sal_uInt16)aEdScaleAll.GetValue() );
bDataChanged |= lcl_PutScaleItem2( GetWhich(SID_SCATTR_PAGE_SCALETO),
rCoreSet, rOldSet,
@@ -393,7 +396,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALETOPAGES),
rCoreSet, rOldSet,
aLbScaleMode, SC_TPTABLE_SCALE_TO_PAGES,
- aEdScalePageNum, (UINT16)aEdScalePageNum.GetValue() );
+ aEdScalePageNum, (sal_uInt16)aEdScalePageNum.GetValue() );
return bDataChanged;
}
@@ -471,13 +474,13 @@ IMPL_LINK( ScTablePage, ScaleHdl, ListBox*, EMPTYARG )
// Hilfsfunktionen fuer FillItemSet:
//========================================================================
-BOOL lcl_PutBoolItem( USHORT nWhich,
+sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
- BOOL bIsChecked,
- BOOL bSavedValue )
+ sal_Bool bIsChecked,
+ sal_Bool bSavedValue )
{
- BOOL bDataChanged = ( bSavedValue == bIsChecked
+ sal_Bool bDataChanged = ( bSavedValue == bIsChecked
&& WAS_DEFAULT(nWhich,rOldSet) );
if ( bDataChanged )
@@ -490,13 +493,13 @@ BOOL lcl_PutBoolItem( USHORT nWhich,
//------------------------------------------------------------------------
-BOOL lcl_PutVObjModeItem( USHORT nWhich,
+sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const CheckBox& rBtn )
{
- BOOL bIsChecked = rBtn.IsChecked();
- BOOL bDataChanged = ( rBtn.GetSavedValue() == bIsChecked
+ sal_Bool bIsChecked = rBtn.IsChecked();
+ sal_Bool bDataChanged = ( rBtn.GetSavedValue() == bIsChecked
&& WAS_DEFAULT(nWhich,rOldSet) );
if ( bDataChanged )
@@ -511,16 +514,16 @@ BOOL lcl_PutVObjModeItem( USHORT nWhich,
//------------------------------------------------------------------------
-BOOL lcl_PutScaleItem( USHORT nWhich,
+sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const SpinField& rEd,
- UINT16 nValue )
+ sal_uInt16 nValue )
{
- BOOL bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
- BOOL bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
+ sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
+ sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
(rEd.GetSavedValue() != rEd.GetText()) ||
!WAS_DEFAULT( nWhich, rOldSet );
@@ -533,18 +536,18 @@ BOOL lcl_PutScaleItem( USHORT nWhich,
}
-BOOL lcl_PutScaleItem2( USHORT nWhich,
+sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich,
SfxItemSet& rCoreSet,
const SfxItemSet& rOldSet,
const ListBox& rListBox,
- USHORT nLBEntry,
+ sal_uInt16 nLBEntry,
const NumericField& rEd1,
const NumericField& rEd2 )
{
- UINT16 nValue1 = (UINT16)rEd1.GetValue();
- UINT16 nValue2 = (UINT16)rEd2.GetValue();
- BOOL bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
- BOOL bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
+ sal_uInt16 nValue1 = (sal_uInt16)rEd1.GetValue();
+ sal_uInt16 nValue2 = (sal_uInt16)rEd2.GetValue();
+ sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
+ sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
(rEd1.GetSavedValue() != rEd1.GetText()) ||
(rEd2.GetSavedValue() != rEd2.GetText()) ||
!WAS_DEFAULT( nWhich, rOldSet );
diff --git a/sc/source/ui/src/attrdlg.src b/sc/source/ui/src/attrdlg.src
index bcdf62261fc2..d228a0cb03cb 100644
--- a/sc/source/ui/src/attrdlg.src
+++ b/sc/source/ui/src/attrdlg.src
@@ -109,6 +109,7 @@ TabPage RID_SCPAGE_PROTECTION
Size = MAP_APPFONT ( 260 , 185 ) ;
TriStateBox BTN_PROTECTED
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_PROTECTED";
Pos = MAP_APPFONT ( 22 , 28 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Protected" ;
@@ -116,6 +117,7 @@ TabPage RID_SCPAGE_PROTECTION
};
TriStateBox BTN_HIDE_FORMULAR
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_HIDE_FORMULAR";
Pos = MAP_APPFONT ( 22 , 42 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Hide ~formula" ;
@@ -123,6 +125,7 @@ TabPage RID_SCPAGE_PROTECTION
};
TriStateBox BTN_HIDE_ALL
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_HIDE_ALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Hide ~all" ;
@@ -143,6 +146,7 @@ TabPage RID_SCPAGE_PROTECTION
};
TriStateBox BTN_HIDE_PRINT
{
+ HelpID = "sc:TriStateBox:RID_SCPAGE_PROTECTION:BTN_HIDE_PRINT";
Pos = MAP_APPFONT ( 12 , 87 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Hide ~when printing" ;
diff --git a/sc/source/ui/src/autofmt.src b/sc/source/ui/src/autofmt.src
index b000de47914f..b6405c9d8c91 100644
--- a/sc/source/ui/src/autofmt.src
+++ b/sc/source/ui/src/autofmt.src
@@ -30,7 +30,7 @@
ModalDialog RID_SCDLG_AUTOFORMAT
{
OutputSize = TRUE ;
- HelpId = SID_AUTOFORMAT ;
+ HelpId = CMD_SID_AUTOFORMAT ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 312 , 121 ) ;
Text [ en-US ] = "AutoFormat" ;
@@ -38,6 +38,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
Closeable = FALSE ;
ListBox LB_FORMAT
{
+ HelpID = "sc:ListBox:RID_SCDLG_AUTOFORMAT:LB_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 101 ) ;
@@ -57,6 +58,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_ADJUST
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_ADJUST";
Hide = TRUE ;
Pos = MAP_APPFONT ( 172 , 146 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -65,6 +67,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_BORDER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_BORDER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -73,6 +76,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_FONT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_FONT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 93 , 132 ) ;
Size = MAP_APPFONT ( 73 , 10 ) ;
@@ -81,6 +85,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_PATTERN
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_PATTERN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 93 , 146 ) ;
Size = MAP_APPFONT ( 73 , 10 ) ;
@@ -89,6 +94,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_ALIGNMENT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_ALIGNMENT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 172 , 132 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -97,6 +103,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
CheckBox BTN_NUMFORMAT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_NUMFORMAT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
@@ -125,6 +132,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_AUTOFORMAT:BTN_MORE";
Pos = MAP_APPFONT ( 256 , 101 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -133,6 +141,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_AUTOFORMAT:BTN_ADD";
Pos = MAP_APPFONT ( 256 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add..." ;
@@ -140,6 +149,7 @@ ModalDialog RID_SCDLG_AUTOFORMAT
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_AUTOFORMAT:BTN_REMOVE";
Pos = MAP_APPFONT ( 256 , 81 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
diff --git a/sc/source/ui/src/condfrmt.src b/sc/source/ui/src/condfrmt.src
index cacfef8298e6..accbbbc8a654 100644
--- a/sc/source/ui/src/condfrmt.src
+++ b/sc/source/ui/src/condfrmt.src
@@ -38,6 +38,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
Hide = TRUE ;
CheckBox CBX_COND1
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONDFORMAT:CBX_COND1";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -45,6 +46,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND1_1
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND1_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
Size = MAP_APPFONT ( 48 , 40 ) ;
@@ -58,6 +60,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND1_2
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND1_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 19 ) ;
Size = MAP_APPFONT ( 62 , 88 ) ;
@@ -79,6 +82,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND1_1
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND1_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 19 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -86,6 +90,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND1_1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND1_1";
Pos = MAP_APPFONT ( 167 , 18 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -100,6 +105,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND1_2
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND1_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 199 , 19 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -107,6 +113,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND1_2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND1_2";
Pos = MAP_APPFONT ( 242 , 18 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -121,6 +128,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND1_TEMPLATE
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND1_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 35 ) ;
Size = MAP_APPFONT ( 62 , 80 ) ;
@@ -130,6 +138,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
PushButton BTN_COND1_NEW
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONDFORMAT:BTN_COND1_NEW";
Pos = MAP_APPFONT ( 124 , 34 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -142,6 +151,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
CheckBox CBX_COND2
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONDFORMAT:CBX_COND2";
Pos = MAP_APPFONT ( 6 , 60 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -149,6 +159,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND2_1
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND2_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 73 ) ;
Size = MAP_APPFONT ( 48 , 40 ) ;
@@ -162,6 +173,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND2_2
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND2_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 73 ) ;
Size = MAP_APPFONT ( 62 , 88 ) ;
@@ -183,6 +195,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND2_1
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND2_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 73 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -190,6 +203,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND2_1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND2_1";
Pos = MAP_APPFONT ( 167 , 72 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -204,6 +218,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND2_2
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND2_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 199 , 73 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -211,6 +226,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND2_2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND2_2";
Pos = MAP_APPFONT ( 242 , 72 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -225,6 +241,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND2_TEMPLATE
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND2_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 89 ) ;
Size = MAP_APPFONT ( 62 , 80 ) ;
@@ -234,6 +251,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
PushButton BTN_COND2_NEW
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONDFORMAT:BTN_COND2_NEW";
Pos = MAP_APPFONT ( 124 , 88 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -246,6 +264,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
CheckBox CBX_COND3
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CONDFORMAT:CBX_COND3";
Pos = MAP_APPFONT ( 6 , 114 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
TabStop = TRUE ;
@@ -253,6 +272,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND3_1
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND3_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 127 ) ;
Size = MAP_APPFONT ( 48 , 40 ) ;
@@ -266,6 +286,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND3_2
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND3_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 127 ) ;
Size = MAP_APPFONT ( 62 , 88 ) ;
@@ -287,6 +308,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND3_1
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND3_1";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 127 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -294,6 +316,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND3_1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND3_1";
Pos = MAP_APPFONT ( 167 , 126 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -308,6 +331,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
Edit EDT_COND3_2
{
+ HelpID = "sc:Edit:RID_SCDLG_CONDFORMAT:EDT_COND3_2";
Border = TRUE ;
Pos = MAP_APPFONT ( 199 , 127 ) ;
Size = MAP_APPFONT ( 41 , 12 ) ;
@@ -315,6 +339,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ImageButton RB_COND3_2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_CONDFORMAT:RB_COND3_2";
Pos = MAP_APPFONT ( 242 , 126 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -329,6 +354,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
ListBox LB_COND3_TEMPLATE
{
+ HelpID = "sc:ListBox:RID_SCDLG_CONDFORMAT:LB_COND3_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 143 ) ;
Size = MAP_APPFONT ( 62 , 80 ) ;
@@ -338,6 +364,7 @@ ModelessDialog RID_SCDLG_CONDFORMAT
};
PushButton BTN_COND3_NEW
{
+ HelpID = "sc:PushButton:RID_SCDLG_CONDFORMAT:BTN_COND3_NEW";
Pos = MAP_APPFONT ( 124 , 142 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/crnrdlg.src b/sc/source/ui/src/crnrdlg.src
index f3560abede75..29ed6772d896 100644
--- a/sc/source/ui/src/crnrdlg.src
+++ b/sc/source/ui/src/crnrdlg.src
@@ -43,6 +43,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
ListBox LB_RANGE
{
+ HelpID = "sc:ListBox:RID_SCDLG_COLROWNAMERANGES:LB_RANGE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 179 , 85 ) ;
TabStop = TRUE ;
@@ -51,6 +52,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
Edit ED_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_COLROWNAMERANGES:ED_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 165 , 12 ) ;
@@ -58,6 +60,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
ImageButton RB_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_COLROWNAMERANGES:RB_AREA";
Pos = MAP_APPFONT ( 179 , 104 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -65,6 +68,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
RadioButton BTN_COLHEAD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLROWNAMERANGES:BTN_COLHEAD";
Pos = MAP_APPFONT ( 20 , 121 ) ;
Size = MAP_APPFONT ( 171 , 10 ) ;
TabStop = TRUE ;
@@ -72,6 +76,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
RadioButton BTN_ROWHEAD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLROWNAMERANGES:BTN_ROWHEAD";
Pos = MAP_APPFONT ( 20 , 135 ) ;
Size = MAP_APPFONT ( 171 , 10 ) ;
TabStop = TRUE ;
@@ -85,6 +90,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
Edit ED_DATA
{
+ HelpID = "sc:Edit:RID_SCDLG_COLROWNAMERANGES:ED_DATA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 162 ) ;
Size = MAP_APPFONT ( 165 , 12 ) ;
@@ -92,6 +98,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
ImageButton RB_DATA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_COLROWNAMERANGES:RB_DATA";
Pos = MAP_APPFONT ( 179 , 161 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -111,6 +118,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_COLROWNAMERANGES:BTN_ADD";
Pos = MAP_APPFONT ( 200 , 104 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -119,6 +127,7 @@ ModelessDialog RID_SCDLG_COLROWNAMERANGES
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_COLROWNAMERANGES:BTN_REMOVE";
Pos = MAP_APPFONT ( 200 , 122 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
diff --git a/sc/source/ui/src/dbnamdlg.src b/sc/source/ui/src/dbnamdlg.src
index c88491341310..88454229b5d4 100644
--- a/sc/source/ui/src/dbnamdlg.src
+++ b/sc/source/ui/src/dbnamdlg.src
@@ -28,7 +28,7 @@
ModelessDialog RID_SCDLG_DBNAMES
{
OutputSize = TRUE ;
- HelpId = SID_DEFINE_DBNAME ;
+ HelpId = CMD_SID_DEFINE_DBNAME ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 222 , 142 ) ;
@@ -43,6 +43,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
ComboBox ED_NAME
{
+ HelpID = "sc:ComboBox:RID_SCDLG_DBNAMES:ED_NAME";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 145 , 92 ) ;
TabStop = TRUE ;
@@ -56,6 +57,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
Edit ED_DBAREA
{
+ HelpID = "sc:Edit:RID_SCDLG_DBNAMES:ED_DBAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 123 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
@@ -63,6 +65,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
ImageButton RB_DBAREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_DBNAMES:RB_DBAREA";
Pos = MAP_APPFONT ( 145 , 122 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -77,6 +80,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_HEADER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 153 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -85,6 +89,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_SIZE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_SIZE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 167 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -93,6 +98,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_FORMAT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_FORMAT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 181 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -101,6 +107,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
CheckBox BTN_STRIPDATA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DBNAMES:BTN_STRIPDATA";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 195 ) ;
Size = MAP_APPFONT ( 145 , 10 ) ;
@@ -135,6 +142,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_DBNAMES:BTN_ADD";
Pos = MAP_APPFONT ( 166 , 74 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -143,6 +151,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_DBNAMES:BTN_REMOVE";
Pos = MAP_APPFONT ( 166 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -156,6 +165,7 @@ ModelessDialog RID_SCDLG_DBNAMES
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_DBNAMES:BTN_MORE";
Pos = MAP_APPFONT ( 166 , 122 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/filter.src b/sc/source/ui/src/filter.src
index 52ce38db1516..ed501b782a8d 100644
--- a/sc/source/ui/src/filter.src
+++ b/sc/source/ui/src/filter.src
@@ -28,7 +28,7 @@
ModelessDialog RID_SCDLG_FILTER
{
OutputSize = TRUE ;
- HelpId = SID_FILTER ;
+ HelpId = CMD_SID_FILTER ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 279 , 121 ) ;
@@ -61,6 +61,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP1
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -74,6 +75,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP2
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -87,6 +89,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP3
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -100,6 +103,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_OP4
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_OP4";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 73 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -113,6 +117,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD1
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD1";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -121,6 +126,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD2
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -129,6 +135,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD3
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD3";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -137,6 +144,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_FIELD4
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_FIELD4";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 73 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -145,6 +153,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND1
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND1";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 25 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -172,6 +181,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND2
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND2";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 41 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -199,6 +209,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND3
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND3";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 57 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -226,6 +237,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COND4
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COND4";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 73 ) ;
Size = MAP_APPFONT ( 75 , 145 ) ;
@@ -253,6 +265,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL1
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL1";
Pos = MAP_APPFONT ( 201 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -260,6 +273,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL2
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL2";
Pos = MAP_APPFONT ( 201 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -267,6 +281,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL3
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL3";
Pos = MAP_APPFONT ( 201 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -274,6 +289,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ComboBox ED_VAL4
{
+ HelpID = "sc:ComboBox:RID_SCDLG_FILTER:ED_VAL4";
Pos = MAP_APPFONT ( 201 , 73 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -295,6 +311,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_CASE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 130 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -303,6 +320,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_REGEXP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_REGEXP";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 130 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
@@ -311,6 +329,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_HEADER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 144 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -319,6 +338,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_UNIQUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_UNIQUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 144 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
@@ -327,6 +347,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_COPY_RESULT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_COPY_RESULT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 158 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -335,6 +356,7 @@ ModelessDialog RID_SCDLG_FILTER
};
CheckBox BTN_DEST_PERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_FILTER:BTN_DEST_PERS";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 158 ) ;
Size = MAP_APPFONT ( 94 , 10 ) ;
@@ -343,6 +365,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ListBox LB_COPY_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_FILTER:LB_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 21 , 170 ) ;
@@ -352,6 +375,7 @@ ModelessDialog RID_SCDLG_FILTER
};
Edit ED_COPY_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_FILTER:ED_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 136 , 170 ) ;
@@ -360,6 +384,7 @@ ModelessDialog RID_SCDLG_FILTER
};
ImageButton RB_COPY_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_FILTER:RB_COPY_AREA";
Pos = MAP_APPFONT ( 248 , 169 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -407,6 +432,7 @@ ModelessDialog RID_SCDLG_FILTER
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_FILTER:BTN_MORE";
Pos = MAP_APPFONT ( 6 , 101 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -423,7 +449,7 @@ ModelessDialog RID_SCDLG_FILTER
ModelessDialog RID_SCDLG_SPEC_FILTER
{
OutputSize = TRUE ;
- HelpId = SID_SPECIAL_FILTER ;
+ HelpId = CMD_SID_SPECIAL_FILTER ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 278 , 83 ) ;
@@ -438,6 +464,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ListBox LB_CRITERIA_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_SPEC_FILTER:LB_CRITERIA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 90 , 90 ) ;
@@ -446,6 +473,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
Edit ED_CRITERIA_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_SPEC_FILTER:ED_CRITERIA_AREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 14 ) ;
Size = MAP_APPFONT ( 99 , 12 ) ;
@@ -453,6 +481,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ImageButton RB_CRITERIA_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_CRITERIA_AREA";
Pos = MAP_APPFONT ( 201 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -460,6 +489,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_CASE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -468,6 +498,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_REGEXP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_REGEXP";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 43 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
@@ -476,6 +507,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_HEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_HEADER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -484,6 +516,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_UNIQUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_UNIQUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 57 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
@@ -492,6 +525,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_COPY_RESULT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_COPY_RESULT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 71 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
@@ -500,6 +534,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
CheckBox BTN_DEST_PERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_SPEC_FILTER:BTN_DEST_PERS";
Hide = TRUE ;
Pos = MAP_APPFONT ( 142 , 71 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
@@ -508,6 +543,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ListBox LB_COPY_AREA
{
+ HelpID = "sc:ListBox:RID_SCDLG_SPEC_FILTER:LB_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 20 , 83 ) ;
@@ -517,6 +553,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
Edit ED_COPY_AREA
{
+ HelpID = "sc:Edit:RID_SCDLG_SPEC_FILTER:ED_COPY_AREA";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 100 , 83 ) ;
@@ -525,6 +562,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
ImageButton RB_COPY_AREA
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_COPY_AREA";
Pos = MAP_APPFONT ( 201 , 82 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -573,6 +611,7 @@ ModelessDialog RID_SCDLG_SPEC_FILTER
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_SPEC_FILTER:BTN_MORE";
Pos = MAP_APPFONT ( 223 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -617,6 +656,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_OP1
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_OP1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -630,6 +670,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_OP2
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_OP2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
@@ -643,6 +684,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_FIELD1
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_FIELD1";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -651,6 +693,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_FIELD2
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_FIELD2";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -659,6 +702,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_FIELD3
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_FIELD3";
Border = TRUE ;
Pos = MAP_APPFONT ( 58 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -667,6 +711,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_COND1
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_COND1";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 25 ) ;
Size = MAP_APPFONT ( 47 , 65 ) ;
@@ -684,6 +729,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_COND2
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_COND2";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 41 ) ;
Size = MAP_APPFONT ( 47 , 65 ) ;
@@ -701,6 +747,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ListBox LB_COND3
{
+ HelpID = "sc:ListBox:RID_SCDLG_PIVOTFILTER:LB_COND3";
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 57 ) ;
Size = MAP_APPFONT ( 47 , 65 ) ;
@@ -718,6 +765,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ComboBox ED_VAL1
{
+ HelpID = "sc:ComboBox:RID_SCDLG_PIVOTFILTER:ED_VAL1";
Pos = MAP_APPFONT ( 173 , 25 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -725,6 +773,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ComboBox ED_VAL2
{
+ HelpID = "sc:ComboBox:RID_SCDLG_PIVOTFILTER:ED_VAL2";
Pos = MAP_APPFONT ( 173 , 41 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -732,6 +781,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
ComboBox ED_VAL3
{
+ HelpID = "sc:ComboBox:RID_SCDLG_PIVOTFILTER:ED_VAL3";
Pos = MAP_APPFONT ( 173 , 57 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
TabStop = TRUE ;
@@ -745,6 +795,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTFILTER:BTN_CASE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 221 , 10 ) ;
@@ -753,6 +804,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
CheckBox BTN_REGEXP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTFILTER:BTN_REGEXP";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 221 , 10 ) ;
@@ -761,6 +813,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
CheckBox BTN_UNIQUE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_PIVOTFILTER:BTN_UNIQUE";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 221 , 10 ) ;
@@ -810,6 +863,7 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_PIVOTFILTER:BTN_MORE";
Pos = MAP_APPFONT ( 242 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -818,3 +872,23 @@ ModalDialog RID_SCDLG_PIVOTFILTER
};
};
+String STR_COPY_AREA_TO
+{
+ Text [ en-US ] = "Copy results to" ;
+};
+String RID_FILTER_OPERATOR
+{
+ Text [ en-US ] = "Operator" ;
+};
+String RID_FILTER_FIELDNAME
+{
+ Text [ en-US ] = "Field Name" ;
+};
+String RID_FILTER_CONDITION
+{
+ Text [ en-US ] = "Condition" ;
+};
+String RID_FILTER_VALUE
+{
+ Text [ en-US ] = "Value" ;
+};
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 9c5caaee81d1..387b3ba14895 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -199,15 +199,15 @@ Resource RID_GLOBSTR
};
String STR_UNDO_PIVOT_NEW
{
- Text [ en-US ] = "Create DataPilot Table" ;
+ Text [ en-US ] = "Create pivot table" ;
};
String STR_UNDO_PIVOT_MODIFY
{
- Text [ en-US ] = "Edit DataPilot Table" ;
+ Text [ en-US ] = "Edit pivot table" ;
};
String STR_UNDO_PIVOT_DELETE
{
- Text [ en-US ] = "Delete DataPilot Table" ;
+ Text [ en-US ] = "Delete pivot table" ;
};
String STR_UNDO_CONSOLIDATE
{
@@ -523,7 +523,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_NODATA
{
- Text [ en-US ] = "The DataPilot table must contain at least one entry." ;
+ Text [ en-US ] = "The pivot table must contain at least one entry." ;
};
String STR_PIVOT_MOVENOTALLOWED
{
@@ -531,11 +531,11 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_ERROR
{
- Text [ en-US ] = "Error creating the Data Pilot Table." ;
+ Text [ en-US ] = "Error creating the pivot table." ;
};
String STR_PIVOT_OVERLAP
{
- Text [ en-US ] = "DataPilot tables can not overlap." ;
+ Text [ en-US ] = "Pivot tables can not overlap." ;
};
String STR_PIVOT_NOTEMPTY
{
@@ -547,7 +547,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_PROGRESS
{
- Text [ en-US ] = "Create DataPilot Table" ;
+ Text [ en-US ] = "Create Pivot Table" ;
};
String STR_PIVOT_TOTAL
{
@@ -695,7 +695,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_TABLE
{
- Text [ en-US ] = "DataPilot" ;
+ Text [ en-US ] = "Pivot Table" ;
};
// Text strings for captions of subtotal functions.
String STR_FUN_TEXT_SUM
@@ -740,7 +740,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_NOTFOUND
{
- Text [ en-US ] = "No DataPilot table found at this position." ;
+ Text [ en-US ] = "No pivot table found at this position." ;
};
String STR_EMPTYDATA
{
@@ -1039,7 +1039,7 @@ Resource RID_GLOBSTR
};
String STR_EXPORT_ASCII
{
- Text [ en-US ] = "Export of text files" ;
+ Text [ en-US ] = "Export Text File" ;
};
String STR_IMPORT_LOTUS
{
@@ -1472,27 +1472,27 @@ Resource RID_GLOBSTR
// Templates for data pilot tables.
String STR_PIVOT_STYLE_INNER
{
- Text [ en-US ] = "DataPilot Value" ;
+ Text [ en-US ] = "Pivot Table Value" ;
};
String STR_PIVOT_STYLE_RESULT
{
- Text [ en-US ] = "DataPilot Result" ;
+ Text [ en-US ] = "Pivot Table Result" ;
};
String STR_PIVOT_STYLE_CATEGORY
{
- Text [ en-US ] = "DataPilot Category" ;
+ Text [ en-US ] = "Pivot Table Category" ;
};
String STR_PIVOT_STYLE_TITLE
{
- Text [ en-US ] = "DataPilot Title" ;
+ Text [ en-US ] = "Pivot Table Title" ;
};
String STR_PIVOT_STYLE_FIELDNAME
{
- Text [ en-US ] = "DataPilot Field" ;
+ Text [ en-US ] = "Pivot Table Field" ;
};
String STR_PIVOT_STYLE_TOP
{
- Text [ en-US ] = "DataPilot Corner" ;
+ Text [ en-US ] = "Pivot Table Corner" ;
};
String STR_OPERATION_FILTER
{
@@ -1665,7 +1665,7 @@ Resource RID_GLOBSTR
String STR_ERR_DATAPILOT_INPUT
{
- Text[ en-US ] = "You cannot change this part of the DataPilot table.";
+ Text[ en-US ] = "You cannot change this part of the pivot table.";
};
String STR_RECALC_MANUAL
@@ -1801,7 +1801,7 @@ Resource RID_GLOBSTR
};
String STR_ERR_DATAPILOTSOURCE
{
- Text [ en-US ] = "DataPilot source data is invalid.";
+ Text [ en-US ] = "Pivot table source data is invalid.";
};
String STR_PIVOT_FIRSTROWEMPTYERR
{
@@ -1809,7 +1809,7 @@ Resource RID_GLOBSTR
};
String STR_PIVOT_ONLYONEROWERR
{
- Text [ en-US ] = "DataPilot table needs at least two rows of data to create or refresh." ;
+ Text [ en-US ] = "Pivot table needs at least two rows of data to create or refresh." ;
};
String STR_OPTIONS_WARN_SEPARATORS
{
diff --git a/sc/source/ui/src/hdrcont.src b/sc/source/ui/src/hdrcont.src
index 5162b5976091..d84a868dc9b4 100644
--- a/sc/source/ui/src/hdrcont.src
+++ b/sc/source/ui/src/hdrcont.src
@@ -32,7 +32,7 @@
MenuItem\
{\
Identifier = FID_CELL_FORMAT ; \
- HelpId = FID_CELL_FORMAT ; \
+ HelpId = CMD_FID_CELL_FORMAT ; \
Text [ en-US ] = "~Format Cells..." ; \
};
@@ -41,13 +41,13 @@
MenuItem\
{\
Identifier = SID_CUT ; \
- HelpId = SID_CUT ; \
+ HelpId = CMD_SID_CUT ; \
Text [ en-US ] = "Cu~t" ; \
};\
MenuItem\
{\
Identifier = SID_COPY ; \
- HelpId = SID_COPY ; \
+ HelpId = CMD_SID_COPY ; \
Text [ en-US ] = "~Copy" ; \
};\
MenuItem\
@@ -106,13 +106,13 @@ Menu RID_POPUP_ROWHEADER
MenuItem
{
Identifier = FID_ROW_HIDE ;
- HelpId = FID_ROW_HIDE ;
+ HelpId = CMD_FID_ROW_HIDE ;
Text [ en-US ] = "~Hide" ;
};
MenuItem
{
Identifier = FID_ROW_SHOW ;
- HelpId = FID_ROW_SHOW ;
+ HelpId = CMD_FID_ROW_SHOW ;
Text [ en-US ] = "~Show" ;
};
//------------------------------
@@ -122,7 +122,7 @@ Menu RID_POPUP_ROWHEADER
MenuItem
{
Identifier = SID_PASTE_SPECIAL ;
- HelpId = SID_PASTE_SPECIAL ;
+ HelpId = CMD_SID_PASTE_SPECIAL ;
Text [ en-US ] = "P~aste Special..." ;
};
};
@@ -141,13 +141,13 @@ Menu RID_POPUP_COLHEADER
MenuItem
{
Identifier = FID_COL_WIDTH ;
- HelpId = FID_COL_WIDTH ;
+ HelpId = CMD_FID_COL_WIDTH ;
Text [ en-US ] = "Col~umn Width..." ;
};
MenuItem
{
Identifier = FID_COL_OPT_WIDTH ;
- HelpId = FID_COL_OPT_WIDTH ;
+ HelpId = CMD_FID_COL_OPT_WIDTH ;
Text [ en-US ] = "O~ptimal Column Width..." ;
};
//------------------------------
@@ -177,13 +177,13 @@ Menu RID_POPUP_COLHEADER
MenuItem
{
Identifier = FID_COL_HIDE ;
- HelpId = FID_COL_HIDE ;
+ HelpId = CMD_FID_COL_HIDE ;
Text [ en-US ] = "~Hide" ;
};
MenuItem
{
Identifier = FID_COL_SHOW ;
- HelpId = FID_COL_SHOW ;
+ HelpId = CMD_FID_COL_SHOW ;
Text [ en-US ] = "~Show" ;
};
//------------------------------
@@ -193,7 +193,7 @@ Menu RID_POPUP_COLHEADER
MenuItem
{
Identifier = SID_PASTE_SPECIAL ;
- HelpId = SID_PASTE_SPECIAL ;
+ HelpId = CMD_SID_PASTE_SPECIAL ;
Text [ en-US ] = "Paste ~Special..." ;
};
};
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index 6da360c708dd..531970af1072 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -30,7 +30,7 @@
ModalDialog RID_SCDLG_DELCELL
{
OutputSize = TRUE ;
- HelpId = FID_DELETE_CELL ;
+ HelpId = CMD_FID_DELETE_CELL ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 70 ) ;
Text [ en-US ] = "Delete Cells" ;
@@ -57,6 +57,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_DELCOLS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_DELCOLS";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Delete entire ~column(s)" ;
@@ -64,6 +65,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_DELROWS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_DELROWS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Delete entire ~row(s)" ;
@@ -71,6 +73,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_CELLSLEFT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_CELLSLEFT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~left" ;
@@ -78,6 +81,7 @@ ModalDialog RID_SCDLG_DELCELL
};
RadioButton BTN_CELLSUP
{
+ HelpID = "sc:RadioButton:RID_SCDLG_DELCELL:BTN_CELLSUP";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~up" ;
@@ -94,7 +98,7 @@ ModalDialog RID_SCDLG_DELCELL
ModalDialog RID_SCDLG_INSCELL
{
OutputSize = TRUE ;
- HelpId = FID_INS_CELL ;
+ HelpId = CMD_FID_INS_CELL ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 70 ) ;
Text [ en-US ] = "Insert Cells" ;
@@ -121,6 +125,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_INSCOLS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSCOLS";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Entire ~column" ;
@@ -128,6 +133,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_INSROWS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSROWS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Entire ro~w" ;
@@ -135,6 +141,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_CELLSRIGHT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSRIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~right" ;
@@ -142,6 +149,7 @@ ModalDialog RID_SCDLG_INSCELL
};
RadioButton BTN_CELLSDOWN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSDOWN";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "Shift cells ~down" ;
@@ -158,7 +166,7 @@ ModalDialog RID_SCDLG_INSCELL
ModalDialog RID_SCDLG_DELCONT
{
OutputSize = TRUE ;
- HelpId = SID_DELETE ;
+ HelpId = CMD_SID_DELETE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 161 , 130 ) ;
Text [ en-US ] = "Delete Contents" ;
@@ -185,6 +193,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Delete ~all" ;
@@ -192,6 +201,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELSTRINGS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELSTRINGS";
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Text" ;
@@ -199,6 +209,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELNUMBERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELNUMBERS";
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Numbers" ;
@@ -206,6 +217,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELDATETIME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELDATETIME";
Pos = MAP_APPFONT ( 12 , 58 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Date & time" ;
@@ -213,6 +225,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELFORMULAS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELFORMULAS";
Pos = MAP_APPFONT ( 12 , 72 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
@@ -220,6 +233,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELATTRS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELATTRS";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "For~mats" ;
@@ -227,6 +241,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELNOTES
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELNOTES";
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -234,6 +249,7 @@ ModalDialog RID_SCDLG_DELCONT
};
CheckBox BTN_DELOBJECTS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_DELCONT:BTN_DELOBJECTS";
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Objects" ;
@@ -251,7 +267,7 @@ ModalDialog RID_SCDLG_DELCONT
ModalDialog RID_SCDLG_INSCONT
{
OutputSize = TRUE ;
- HelpId = FID_INS_CELL_CONTENTS ;
+ HelpId = CMD_FID_INS_CELL_CONTENTS ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 187 ) ;
Text [ en-US ] = "Paste Special" ;
@@ -278,6 +294,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSALL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Paste all" ;
@@ -285,6 +302,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSSTRINGS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSSTRINGS";
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "Te~xt" ;
@@ -292,6 +310,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSNUMBERS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSNUMBERS";
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Numbers" ;
@@ -299,6 +318,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSDATETIME
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSDATETIME";
Pos = MAP_APPFONT ( 12 , 58 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Date & time" ;
@@ -306,6 +326,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSFORMULAS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSFORMULAS";
Pos = MAP_APPFONT ( 12 , 72 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
@@ -313,6 +334,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSATTRS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSATTRS";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "For~mats" ;
@@ -320,6 +342,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSOBJECTS
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSOBJECTS";
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Objects" ;
@@ -327,6 +350,7 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_INSNOTES
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_INSNOTES";
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -340,30 +364,35 @@ ModalDialog RID_SCDLG_INSCONT
};
RadioButton BTN_OP_NOOP
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_NOOP";
Pos = MAP_APPFONT ( 111 , 14 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Non~e" ;
};
RadioButton BTN_OP_ADD
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_ADD";
Pos = MAP_APPFONT ( 111 , 30 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Add" ;
};
RadioButton BTN_OP_SUB
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_SUB";
Pos = MAP_APPFONT ( 111 , 44 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Subtract" ;
};
RadioButton BTN_OP_MUL
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_MUL";
Pos = MAP_APPFONT ( 111 , 58 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Multipl~y" ;
};
RadioButton BTN_OP_DIV
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_OP_DIV";
Pos = MAP_APPFONT ( 111 , 72 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Di~vide" ;
@@ -376,18 +405,21 @@ ModalDialog RID_SCDLG_INSCONT
};
CheckBox BTN_SKIP_EMPTY
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_SKIP_EMPTY";
Pos = MAP_APPFONT ( 12 , 141 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "S~kip empty cells" ;
};
CheckBox BTN_TRANSPOSE
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_TRANSPOSE";
Pos = MAP_APPFONT ( 12 , 155 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Transpose" ;
};
CheckBox BTN_LINK
{
+ HelpID = "sc:CheckBox:RID_SCDLG_INSCONT:BTN_LINK";
Pos = MAP_APPFONT ( 12 , 169 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "~Link" ;
@@ -400,18 +432,21 @@ ModalDialog RID_SCDLG_INSCONT
};
RadioButton BTN_MV_NONE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_MV_NONE";
Pos = MAP_APPFONT ( 111 , 141 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Don't sh~ift" ;
};
RadioButton BTN_MV_DOWN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_MV_DOWN";
Pos = MAP_APPFONT ( 111 , 155 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "Do~wn" ;
};
RadioButton BTN_MV_RIGHT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_INSCONT:BTN_MV_RIGHT";
Pos = MAP_APPFONT ( 111 , 169 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
Text [ en-US ] = "~Right" ;
@@ -437,7 +472,7 @@ ModalDialog RID_SCDLG_INSCONT
ModalDialog RID_SCDLG_MOVETAB
{
OutputSize = TRUE ;
- HelpId = FID_TAB_MOVE ;
+ HelpId = CMD_FID_TAB_MOVE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 158 , 236 ) ;
Text [ en-US ] = "Move/Copy Sheet" ;
@@ -501,6 +536,7 @@ ModalDialog RID_SCDLG_MOVETAB
};
ListBox LB_DEST
{
+ HelpID = "sc:ListBox:RID_SCDLG_MOVETAB:LB_DEST";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 65 ) ;
Size = MAP_APPFONT ( 134 , 60 ) ;
@@ -515,6 +551,7 @@ ModalDialog RID_SCDLG_MOVETAB
};
ListBox LB_INSERT
{
+ HelpID = "sc:ListBox:RID_SCDLG_MOVETAB:LB_INSERT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 93 ) ;
Size = MAP_APPFONT ( 134 , 62 ) ;
@@ -569,6 +606,7 @@ ModalDialog RID_SCDLG_MOVETAB
ModalDialog RID_SCDLG_STRINPUT
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_STRINPUT";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 178 , 63 ) ;
@@ -595,6 +633,7 @@ ModalDialog RID_SCDLG_STRINPUT
};
Edit ED_INPUT
{
+ HelpID = "sc:Edit:RID_SCDLG_STRINPUT:ED_INPUT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
@@ -609,6 +648,7 @@ ModalDialog RID_SCDLG_STRINPUT
ModalDialog RID_SCDLG_TAB_BG_COLOR
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_TAB_BG_COLOR";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 118 , 167 ) ;
@@ -656,7 +696,7 @@ ModalDialog RID_SCDLG_COL_MAN
{
Text [ en-US ] = "Column Width" ;
- HelpId = FID_COL_WIDTH ;
+ HelpId = CMD_FID_COL_WIDTH ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -689,6 +729,7 @@ ModalDialog RID_SCDLG_COL_MAN
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_COL_MAN:ED_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
Size = MAP_APPFONT ( 70 , 12 ) ;
@@ -698,6 +739,7 @@ ModalDialog RID_SCDLG_COL_MAN
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_COL_MAN:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -710,7 +752,7 @@ ModalDialog RID_SCDLG_COL_OPT
{
Text [ en-US ] = "Optimal Column Width" ;
- HelpId = FID_COL_OPT_WIDTH ;
+ HelpId = CMD_FID_COL_OPT_WIDTH ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -743,6 +785,7 @@ ModalDialog RID_SCDLG_COL_OPT
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_COL_OPT:ED_VALUE";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
@@ -753,6 +796,7 @@ ModalDialog RID_SCDLG_COL_OPT
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_COL_OPT:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -765,7 +809,7 @@ ModalDialog RID_SCDLG_ROW_MAN
{
Text [ en-US ] = "Row Height" ;
- HelpId = FID_ROW_HEIGHT ;
+ HelpId = CMD_FID_ROW_HEIGHT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -798,6 +842,7 @@ ModalDialog RID_SCDLG_ROW_MAN
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_ROW_MAN:ED_VALUE";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
@@ -808,6 +853,7 @@ ModalDialog RID_SCDLG_ROW_MAN
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ROW_MAN:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -820,7 +866,7 @@ ModalDialog RID_SCDLG_ROW_OPT
{
Text [ en-US ] = "Optimal Row Height" ;
- HelpId = FID_ROW_OPT_HEIGHT ;
+ HelpId = CMD_FID_ROW_OPT_HEIGHT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 190 , 63 ) ;
@@ -853,6 +899,7 @@ ModalDialog RID_SCDLG_ROW_OPT
};
MetricField ED_VALUE
{
+ HelpID = "sc:MetricField:RID_SCDLG_ROW_OPT:ED_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 6 ) ;
Size = MAP_APPFONT ( 70 , 12 ) ;
@@ -862,6 +909,7 @@ ModalDialog RID_SCDLG_ROW_OPT
};
CheckBox BTN_DEFVAL
{
+ HelpID = "sc:CheckBox:RID_SCDLG_ROW_OPT:BTN_DEFVAL";
// HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen
TabStop = TRUE ;
Pos = MAP_APPFONT ( 70 , 24 ) ;
@@ -876,7 +924,7 @@ ModalDialog RID_SCDLG_ROW_OPT
ModalDialog RID_SCDLG_SELECTDB
{
- HelpId = SID_SELECT_DB ;
+ HelpId = CMD_SID_SELECT_DB ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 168 , 100 ) ;
@@ -921,7 +969,7 @@ ModalDialog RID_SCDLG_SELECTDB
ModalDialog RID_SCDLG_SHOW_TAB
{
- HelpId = FID_TABLE_SHOW ;
+ HelpId = CMD_FID_TABLE_SHOW ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 168 , 100 ) ;
@@ -949,6 +997,7 @@ ModalDialog RID_SCDLG_SHOW_TAB
};
MultiListBox LB_ENTRYLIST
{
+ HelpID = "sc:MultiListBox:RID_SCDLG_SHOW_TAB:LB_ENTRYLIST";
SimpleMode = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
@@ -968,7 +1017,7 @@ ModalDialog RID_SCDLG_SHOW_TAB
ModalDialog RID_SCDLG_FILLSERIES
{
OutputSize = TRUE ;
- HelpId = FID_FILL_SERIES ;
+ HelpId = CMD_FID_FILL_SERIES ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 290 , 122 ) ;
Text [ en-US ] = "Fill Series" ;
@@ -976,6 +1025,7 @@ ModalDialog RID_SCDLG_FILLSERIES
Closeable = FALSE ;
RadioButton BTN_DAY
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DAY";
Pos = MAP_APPFONT ( 159 , 14 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "Da~y" ;
@@ -983,6 +1033,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_DAY_OF_WEEK
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DAY_OF_WEEK";
Pos = MAP_APPFONT ( 159 , 28 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "~Weekday" ;
@@ -990,6 +1041,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_MONTH
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_MONTH";
Pos = MAP_APPFONT ( 159 , 42 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "~Month" ;
@@ -997,6 +1049,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_YEAR
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_YEAR";
Pos = MAP_APPFONT ( 159 , 56 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "Y~ear" ;
@@ -1010,6 +1063,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_RIGHT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_RIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Right" ;
@@ -1017,6 +1071,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_LEFT
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_LEFT";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Left" ;
@@ -1024,6 +1079,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_TOP
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_TOP";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Up" ;
@@ -1031,6 +1087,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_BOTTOM
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_BOTTOM";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Down" ;
@@ -1044,6 +1101,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_ARITHMETIC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_ARITHMETIC";
Pos = MAP_APPFONT ( 78 , 14 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "Li~near" ;
@@ -1051,6 +1109,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_GEOMETRIC
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_GEOMETRIC";
Pos = MAP_APPFONT ( 78 , 28 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~Growth" ;
@@ -1058,6 +1117,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_DATE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DATE";
Pos = MAP_APPFONT ( 78 , 42 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "Da~te" ;
@@ -1065,6 +1125,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
RadioButton BTN_AUTOFILL
{
+ HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_AUTOFILL";
Pos = MAP_APPFONT ( 78 , 56 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~AutoFill" ;
@@ -1094,6 +1155,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
Edit ED_START_VALUES
{
+ HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_START_VALUES";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 72 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
@@ -1107,6 +1169,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
Edit ED_END_VALUES
{
+ HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_END_VALUES";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 88 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
@@ -1120,6 +1183,7 @@ ModalDialog RID_SCDLG_FILLSERIES
};
Edit ED_INCREMENT
{
+ HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_INCREMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 104 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
@@ -1160,6 +1224,7 @@ ModalDialog RID_SCDLG_FILLSERIES
ModalDialog RID_SCDLG_GROUP
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_GROUP";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 148 , 63 ) ;
@@ -1220,13 +1285,14 @@ ModalDialog RID_SCDLG_GROUP
};
// Ableitungen
-ModalDialog RID_SCDLG_GRP_MAKE < RID_SCDLG_GROUP { HelpId = SID_OUTLINE_MAKE ; };
-ModalDialog RID_SCDLG_GRP_KILL < RID_SCDLG_GROUP { HelpId = SID_OUTLINE_REMOVE ; };
+ModalDialog RID_SCDLG_GRP_MAKE < RID_SCDLG_GROUP { HelpId = CMD_SID_OUTLINE_MAKE ; };
+ModalDialog RID_SCDLG_GRP_KILL < RID_SCDLG_GROUP { HelpId = CMD_SID_OUTLINE_REMOVE ; };
// RID_SCDLG_COLORROW wird nur in der Optionen-Sortierlisten-Seite benutzt
ModalDialog RID_SCDLG_COLORROW
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_COLORROW";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 148 , 63 ) ;
@@ -1253,6 +1319,7 @@ ModalDialog RID_SCDLG_COLORROW
};
RadioButton BTN_GROUP_ROWS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLORROW:BTN_GROUP_ROWS";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 71 , 10 ) ;
TXT_ROWS
@@ -1260,6 +1327,7 @@ ModalDialog RID_SCDLG_COLORROW
};
RadioButton BTN_GROUP_COLS
{
+ HelpID = "sc:RadioButton:RID_SCDLG_COLORROW:BTN_GROUP_COLS";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 71 , 10 ) ;
TXT_COLS
@@ -1276,11 +1344,12 @@ ModalDialog RID_SCDLG_NAMES_CREATE
{
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = FID_USE_NAME ;
+ HelpID = CMD_FID_USE_NAME ;
Size = MAP_APPFONT ( 174 , 72 ) ;
Moveable = TRUE ;
CheckBox BTN_TOP
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_TOP";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1288,6 +1357,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
};
CheckBox BTN_LEFT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_LEFT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1295,6 +1365,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
};
CheckBox BTN_BOTTOM
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_BOTTOM";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1302,6 +1373,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
};
CheckBox BTN_RIGHT
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_RIGHT";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 93 , 10 ) ;
TabStop = TRUE ;
@@ -1338,7 +1410,7 @@ ModalDialog RID_SCDLG_NAMES_CREATE
ModalDialog RID_SCDLG_NAMES_PASTE
{
OutputSize = TRUE ;
- HelpId = FID_INSERT_NAME ;
+ HelpId = CMD_FID_INSERT_NAME ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 228 , 85 ) ;
Moveable = TRUE ;
@@ -1350,6 +1422,7 @@ ModalDialog RID_SCDLG_NAMES_PASTE
};
ListBox LB_ENTRYLIST
{
+ HelpID = "sc:ListBox:RID_SCDLG_NAMES_PASTE:LB_ENTRYLIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 160 , 65 ) ;
@@ -1378,6 +1451,7 @@ ModalDialog RID_SCDLG_NAMES_PASTE
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_NAMES_PASTE:BTN_ADD";
Pos = MAP_APPFONT ( 172 , 66 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -1388,18 +1462,21 @@ ModalDialog RID_SCDLG_NAMES_PASTE
ModalDialog RID_SCDLG_CHARTCOLROW
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_CHARTCOLROW";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 63 ) ;
Moveable = TRUE ;
CheckBox 1
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:1";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "First ~column as label" ;
};
CheckBox 2
{
+ HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:2";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
Text [ en-US ] = "First ~row as label" ;
diff --git a/sc/source/ui/src/namedlg.src b/sc/source/ui/src/namedlg.src
index 079144ca4631..ab8cd31088e8 100644
--- a/sc/source/ui/src/namedlg.src
+++ b/sc/source/ui/src/namedlg.src
@@ -29,7 +29,7 @@
ModelessDialog RID_SCDLG_NAMES
{
OutputSize = TRUE ;
- HelpId = FID_DEFINE_NAME ;
+ HelpId = CMD_FID_DEFINE_NAME ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 222 , 142 ) ;
@@ -56,6 +56,7 @@ ModelessDialog RID_SCDLG_NAMES
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCDLG_NAMES:BTN_ADD";
Pos = MAP_APPFONT ( 166 , 74 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -64,6 +65,7 @@ ModelessDialog RID_SCDLG_NAMES
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_NAMES:BTN_REMOVE";
Pos = MAP_APPFONT ( 166 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -77,6 +79,7 @@ ModelessDialog RID_SCDLG_NAMES
};
ComboBox ED_NAME
{
+ HelpID = "sc:ComboBox:RID_SCDLG_NAMES:ED_NAME";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 145 , 92 ) ;
TabStop = TRUE ;
@@ -91,6 +94,7 @@ ModelessDialog RID_SCDLG_NAMES
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_NAMES:ED_ASSIGN";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 123 ) ;
Size = MAP_APPFONT ( 131 , 12 ) ;
@@ -98,6 +102,7 @@ ModelessDialog RID_SCDLG_NAMES
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_NAMES:RB_ASSIGN";
Pos = MAP_APPFONT ( 145 , 122 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -105,6 +110,7 @@ ModelessDialog RID_SCDLG_NAMES
};
MoreButton BTN_MORE
{
+ HelpID = "sc:MoreButton:RID_SCDLG_NAMES:BTN_MORE";
Pos = MAP_APPFONT ( 166 , 122 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -119,6 +125,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_PRINTAREA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_PRINTAREA";
Pos = MAP_APPFONT ( 12 , 153 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Print range" ;
@@ -126,6 +133,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_CRITERIA
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_CRITERIA";
Pos = MAP_APPFONT ( 12 , 167 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Filter" ;
@@ -133,6 +141,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_ROWHEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_ROWHEADER";
Pos = MAP_APPFONT ( 75 , 167 ) ;
Size = MAP_APPFONT ( 82 , 10 ) ;
Text [ en-US ] = "Repeat ~row" ;
@@ -140,6 +149,7 @@ ModelessDialog RID_SCDLG_NAMES
};
CheckBox BTN_COLHEADER
{
+ HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_COLHEADER";
Pos = MAP_APPFONT ( 75 , 153 ) ;
Size = MAP_APPFONT ( 82 , 10 ) ;
Text [ en-US ] = "Repeat ~column" ;
diff --git a/sc/source/ui/src/opredlin.src b/sc/source/ui/src/opredlin.src
index 86a5fc6498d4..fc29e8b0a0a1 100644
--- a/sc/source/ui/src/opredlin.src
+++ b/sc/source/ui/src/opredlin.src
@@ -35,7 +35,7 @@ TabPage RID_SCPAGE_OPREDLINE
Size = MAP_APPFONT ( 260 , 185 ) ;
FixedText FT_CONTENT
{
- HelpID = 1 ;
+ HelpID = HID_SCPAGE_OPREDLINBE_FT_CONTENT ;
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Chan~ges" ;
@@ -66,6 +66,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_CONTENT
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_CONTENT";
Pos = MAP_APPFONT ( 90 , 14 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
@@ -73,6 +74,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_REMOVE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_REMOVE";
Pos = MAP_APPFONT ( 90 , 30 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
@@ -80,6 +82,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_INSERT
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_INSERT";
Pos = MAP_APPFONT ( 90 , 46 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
@@ -87,6 +90,7 @@ TabPage RID_SCPAGE_OPREDLINE
};
ListBox CLB_MOVE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_OPREDLINE:CLB_MOVE";
Pos = MAP_APPFONT ( 90 , 62 ) ;
Size = MAP_APPFONT ( 120 , 86 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index 65bba2a68846..f69d0febff4f 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -41,6 +41,7 @@ TabPage RID_SCPAGE_CALC
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox BTN_ITERATE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_ITERATE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Iterations" ;
@@ -60,6 +61,7 @@ TabPage RID_SCPAGE_CALC
};
NumericField ED_STEPS
{
+ HelpID = "sc:NumericField:RID_SCPAGE_CALC:ED_STEPS";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 26 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -70,6 +72,7 @@ TabPage RID_SCPAGE_CALC
};
Edit ED_EPS
{
+ HelpID = "sc:Edit:RID_SCPAGE_CALC:ED_EPS";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 42 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -82,6 +85,7 @@ TabPage RID_SCPAGE_CALC
};
RadioButton BTN_DATESTD
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_CALC:BTN_DATESTD";
Pos = MAP_APPFONT ( 139 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "12/30/1899 (defa~ult)" ;
@@ -89,6 +93,7 @@ TabPage RID_SCPAGE_CALC
};
RadioButton BTN_DATESC10
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_CALC:BTN_DATESC10";
Pos = MAP_APPFONT ( 139 , 28 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "01/01/1900 (Star~Calc 1.0)" ;
@@ -96,6 +101,7 @@ TabPage RID_SCPAGE_CALC
};
RadioButton BTN_DATE1904
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_CALC:BTN_DATE1904";
Pos = MAP_APPFONT ( 139 , 42 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~01/01/1904" ;
@@ -114,36 +120,42 @@ TabPage RID_SCPAGE_CALC
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_CASE";
Pos = MAP_APPFONT ( 12 , 77 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Text [ en-US ] = "Case se~nsitive" ;
};
CheckBox BTN_CALC
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_CALC";
Pos = MAP_APPFONT ( 12 , 91 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Precision as shown" ;
};
CheckBox BTN_MATCH
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_MATCH";
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Search criteria = and <> must apply to ~whole cells" ;
};
CheckBox BTN_REGEX
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_REGEX";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Enable regular expressions in formulas" ;
};
CheckBox BTN_LOOKUP
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_LOOKUP";
Pos = MAP_APPFONT ( 12 , 133 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Automatically find column and row labels " ;
};
CheckBox BTN_GENERAL_PREC
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CALC:BTN_GENERAL_PREC";
Pos = MAP_APPFONT ( 12 , 147 ) ;
Size = MAP_APPFONT ( 164 , 10 ) ;
Text [ en-US ] = "~Limit decimals for general number format" ;
@@ -157,6 +169,7 @@ TabPage RID_SCPAGE_CALC
};
NumericField ED_PREC
{
+ HelpID = "sc:NumericField:RID_SCPAGE_CALC:ED_PREC";
Border = TRUE ;
Pos = MAP_APPFONT ( 226 , 145 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
@@ -330,6 +343,7 @@ TabPage RID_SCPAGE_USERLISTS
};
ListBox LB_LISTS
{
+ HelpID = "sc:ListBox:RID_SCPAGE_USERLISTS:LB_LISTS";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 15 ) ;
Size = MAP_APPFONT ( 93 , 148 ) ;
@@ -342,6 +356,7 @@ TabPage RID_SCPAGE_USERLISTS
};
MultiLineEdit ED_ENTRIES
{
+ HelpID = "sc:MultiLineEdit:RID_SCPAGE_USERLISTS:ED_ENTRIES";
Border = TRUE ;
Pos = MAP_APPFONT ( 105 , 15 ) ;
Size = MAP_APPFONT ( 93 , 148 ) ;
@@ -350,6 +365,7 @@ TabPage RID_SCPAGE_USERLISTS
};
Edit ED_COPYFROM
{
+ HelpID = "sc:Edit:RID_SCPAGE_USERLISTS:ED_COPYFROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 167 ) ;
Size = MAP_APPFONT ( 128 , 12 ) ;
@@ -362,12 +378,14 @@ TabPage RID_SCPAGE_USERLISTS
};
PushButton BTN_NEW
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_NEW";
Pos = MAP_APPFONT ( 204 , 15 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~New" ;
};
PushButton BTN_ADD
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_ADD";
Pos = MAP_APPFONT ( 204 , 36 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -375,12 +393,14 @@ TabPage RID_SCPAGE_USERLISTS
};
PushButton BTN_REMOVE
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_REMOVE";
Pos = MAP_APPFONT ( 204 , 54 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
};
PushButton BTN_COPY
{
+ HelpID = "sc:PushButton:RID_SCPAGE_USERLISTS:BTN_COPY";
Pos = MAP_APPFONT ( 204 , 166 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Copy" ;
@@ -428,6 +448,7 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_GRID
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_GRID";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Grid lines" ;
@@ -440,6 +461,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_COLOR
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 26 ) ;
Size = MAP_APPFONT ( 70 , 86 ) ;
@@ -448,24 +470,28 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_PAGEBREAKS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_PAGEBREAKS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Page breaks" ;
};
CheckBox CB_GUIDELINE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_GUIDELINE";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Guides ~while moving";
};
CheckBox CB_HANDLES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_HANDLES";
Pos = MAP_APPFONT ( 12 , 70 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Simple handles";
};
CheckBox CB_BIGHANDLES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_BIGHANDLES";
Pos = MAP_APPFONT ( 12 , 84 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Large handles";
@@ -483,42 +509,49 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_FORMULA
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_FORMULA";
Pos = MAP_APPFONT ( 139 , 14 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Formulas" ;
};
CheckBox CB_NIL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_NIL";
Pos = MAP_APPFONT ( 139 , 27 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Zero val~ues" ;
};
CheckBox CB_ANNOT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_ANNOT";
Pos = MAP_APPFONT ( 139 , 40 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Comment indicator" ;
};
CheckBox CB_VALUE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_VALUE";
Pos = MAP_APPFONT ( 139 , 53 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Value h~ighlighting" ;
};
CheckBox CB_ANCHOR
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_ANCHOR";
Pos = MAP_APPFONT ( 139 , 66 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Anchor" ;
};
CheckBox CB_CLIP
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_CLIP";
Pos = MAP_APPFONT ( 139 , 79 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Te~xt overflow" ;
};
CheckBox CB_RFIND
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_RFIND";
Pos = MAP_APPFONT ( 139 , 92 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Show references in color" ;
@@ -537,6 +570,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_OBJGRF
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_OBJGRF";
Pos = MAP_APPFONT ( 84 , 111 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
Border = TRUE ;
@@ -555,6 +589,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_DIAGRAM
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_DIAGRAM";
Pos = MAP_APPFONT ( 84 , 127 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
Border = TRUE ;
@@ -574,6 +609,7 @@ TabPage RID_SCPAGE_CONTENT
};
ListBox LB_DRAW
{
+ HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_DRAW";
Pos = MAP_APPFONT ( 84 , 143 ) ;
Size = MAP_APPFONT ( 40 , 46 ) ;
Border = TRUE ;
@@ -593,6 +629,7 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_SYNCZOOM
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_SYNCZOOM";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "S~ynchronize sheets" ;
@@ -610,30 +647,35 @@ TabPage RID_SCPAGE_CONTENT
};
CheckBox CB_ROWCOLHEADER
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_ROWCOLHEADER";
Pos = MAP_APPFONT ( 139 , 119 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Colu~mn/row headers" ;
};
CheckBox CB_HSCROLL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_HSCROLL";
Pos = MAP_APPFONT ( 139 , 132 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Hori~zontal scroll bar" ;
};
CheckBox CB_VSCROLL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_VSCROLL";
Pos = MAP_APPFONT ( 139 , 145 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Vertical scroll bar" ;
};
CheckBox CB_TBLREG
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_TBLREG";
Pos = MAP_APPFONT ( 139 , 158 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Sh~eet tabs" ;
};
CheckBox CB_OUTLINE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_OUTLINE";
Pos = MAP_APPFONT ( 139 , 171 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "~Outline symbols" ;
@@ -668,6 +710,7 @@ TabPage RID_SCPAGE_LAYOUT
};
ListBox LB_UNIT
{
+ HelpID = "sc:ListBox:RID_SCPAGE_LAYOUT:LB_UNIT";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 14 ) ;
Size = MAP_APPFONT ( 46 , 52 ) ;
@@ -696,6 +739,7 @@ TabPage RID_SCPAGE_LAYOUT
};
MetricField MF_TAB
{
+ HelpID = "sc:MetricField:RID_SCPAGE_LAYOUT:MF_TAB";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 30 ) ;
Size = MAP_APPFONT ( 46 , 12 ) ;
@@ -729,6 +773,7 @@ TabPage RID_SCPAGE_LAYOUT
};
RadioButton RB_ALWAYS
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_LAYOUT:RB_ALWAYS";
Pos = MAP_APPFONT ( 139 , 25 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
TabStop = TRUE ;
@@ -736,6 +781,7 @@ TabPage RID_SCPAGE_LAYOUT
};
RadioButton RB_REQUEST
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_LAYOUT:RB_REQUEST";
Pos = MAP_APPFONT ( 139 , 39 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
TabStop = TRUE ;
@@ -743,6 +789,7 @@ TabPage RID_SCPAGE_LAYOUT
};
RadioButton RB_NEVER
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_LAYOUT:RB_NEVER";
Pos = MAP_APPFONT ( 139 , 53 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
TabStop = TRUE ;
@@ -756,12 +803,14 @@ TabPage RID_SCPAGE_LAYOUT
};
CheckBox CB_ALIGN
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_ALIGN";
Pos = MAP_APPFONT ( 12 , 82 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "Press Enter to ~move selection" ;
};
ListBox LB_ALIGN
{
+ HelpID = "sc:ListBox:RID_SCPAGE_LAYOUT:LB_ALIGN";
Pos = MAP_APPFONT ( 191 , 80 ) ;
Size = MAP_APPFONT ( 60 , 60 ) ;
Border = TRUE ;
@@ -777,36 +826,42 @@ TabPage RID_SCPAGE_LAYOUT
};
CheckBox CB_EDITMODE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_EDITMODE";
Pos = MAP_APPFONT ( 12 , 96 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Press Enter to switch to ~edit mode" ;
};
CheckBox CB_FORMAT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_FORMAT";
Pos = MAP_APPFONT ( 12 , 110 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Expand ~formatting" ;
};
CheckBox CB_EXPREF
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_EXPREF";
Pos = MAP_APPFONT ( 12 , 124 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Expand ~references when new columns/rows are inserted" ;
};
CheckBox CB_MARKHDR
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_MARKHDR";
Pos = MAP_APPFONT ( 12 , 138 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Highlight sele~ction in column/row headers" ;
};
CheckBox CB_TEXTFMT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_TEXTFMT";
Pos = MAP_APPFONT ( 12 , 152 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Use printer metrics for text formatting";
};
CheckBox CB_REPLWARN
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_LAYOUT:CB_REPLWARN";
Pos = MAP_APPFONT ( 12 , 166 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Show overwrite ~warning when pasting data";
@@ -834,6 +889,7 @@ TabPage RID_SCPAGE_PRINT
};
CheckBox BTN_SKIPEMPTYPAGES
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_PRINT:BTN_SKIPEMPTYPAGES";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Suppress output of empty pages";
@@ -846,6 +902,7 @@ TabPage RID_SCPAGE_PRINT
};
CheckBox BTN_SELECTEDSHEETS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_PRINT:BTN_SELECTEDSHEETS";
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Print only selected sheets";
diff --git a/sc/source/ui/src/optsolver.src b/sc/source/ui/src/optsolver.src
index 5ce6fa724475..e5954f51f0cd 100644
--- a/sc/source/ui/src/optsolver.src
+++ b/sc/source/ui/src/optsolver.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_OPTSOLVER
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_OPTSOLVER ;
+ HelpId = CMD_SID_OPENDLG_OPTSOLVER ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 230 , 210 ) ;
@@ -46,6 +46,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_OBJECTIVECELL
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_OBJECTIVECELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 67 , 6 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
@@ -53,6 +54,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_OBJECTIVECELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_OBJECTIVECELL";
Pos = MAP_APPFONT ( 199 , 5 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -67,6 +69,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
RadioButton RB_MAX
{
+ HelpID = "sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_MAX";
Pos = MAP_APPFONT ( 67 , 24 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Maximum" ;
@@ -74,6 +77,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
RadioButton RB_MIN
{
+ HelpID = "sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_MIN";
Pos = MAP_APPFONT ( 67 , 38 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Minimum" ;
@@ -81,6 +85,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
RadioButton RB_VALUE
{
+ HelpID = "sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_VALUE";
Pos = MAP_APPFONT ( 67 , 52 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Value of" ;
@@ -88,6 +93,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_TARGET
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_TARGET";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 50 ) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
@@ -95,6 +101,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_TARGET
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_TARGET";
Pos = MAP_APPFONT ( 199 , 49 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -109,6 +116,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_VARIABLECELLS
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_VARIABLECELLS";
Border = TRUE ;
Pos = MAP_APPFONT ( 67 , 66 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
@@ -116,6 +124,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_VARIABLECELLS
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_VARIABLECELLS";
Pos = MAP_APPFONT ( 199 , 65 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -150,6 +159,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT1
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -157,6 +167,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT1";
Pos = MAP_APPFONT ( 67 , 113 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -164,6 +175,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP1
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP1";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 114 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -180,6 +192,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT1
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 114 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -187,6 +200,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT1";
Pos = MAP_APPFONT ( 183 , 113 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -194,6 +208,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE1
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE1";
Pos = MAP_APPFONT ( 199 , 113 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -203,6 +218,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT2
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 129 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -210,6 +226,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT2";
Pos = MAP_APPFONT ( 67 , 128 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -217,6 +234,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP2
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP2";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 129 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -233,6 +251,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT2
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 129 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -240,6 +259,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT2";
Pos = MAP_APPFONT ( 183 , 128 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -247,6 +267,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE2
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE2";
Pos = MAP_APPFONT ( 199 , 128 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -256,6 +277,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT3
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 144 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -263,6 +285,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT3
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT3";
Pos = MAP_APPFONT ( 67 , 143 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -270,6 +293,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP3
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP3";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 144 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -286,6 +310,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT3
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT3";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 144 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -293,6 +318,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT3
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT3";
Pos = MAP_APPFONT ( 183 , 143 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -300,6 +326,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE3
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE3";
Pos = MAP_APPFONT ( 199 , 143 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -309,6 +336,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
Edit ED_LEFT4
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT4";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 159 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -316,6 +344,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_LEFT4
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_LEFT4";
Pos = MAP_APPFONT ( 67 , 158 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -323,6 +352,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ListBox LB_OP4
{
+ HelpID = "sc:ListBox:RID_SCDLG_OPTSOLVER:LB_OP4";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 159 ) ;
Size = MAP_APPFONT ( 38 , 56 ) ;
@@ -339,6 +369,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
Edit ED_RIGHT4
{
+ HelpID = "sc:Edit:RID_SCDLG_OPTSOLVER:ED_RIGHT4";
Border = TRUE ;
Pos = MAP_APPFONT ( 128 , 159 ) ;
Size = MAP_APPFONT ( 53 , 12 ) ;
@@ -346,6 +377,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_RIGHT4
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_RIGHT4";
Pos = MAP_APPFONT ( 183 , 158 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -353,6 +385,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
ImageButton IB_DELETE4
{
+ HelpID = "sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_DELETE4";
Pos = MAP_APPFONT ( 199 , 158 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = TRUE ;
@@ -375,6 +408,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
PushButton BTN_OPTIONS
{
+ HelpID = "sc:PushButton:RID_SCDLG_OPTSOLVER:BTN_OPTIONS";
Pos = MAP_APPFONT ( 6 , 190 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -395,6 +429,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER
};
PushButton BTN_SOLVE
{
+ HelpID = "sc:PushButton:RID_SCDLG_OPTSOLVER:BTN_SOLVE";
Pos = MAP_APPFONT ( 174 , 190 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index 065b05ff0fe9..f12667ebf818 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -52,7 +52,7 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = FID_CELL_FORMAT ;
- HelpId = FID_CELL_FORMAT ;
+ HelpId = CMD_FID_CELL_FORMAT ;
Text [ en-US ] = "~Format Cells..." ;
};
//------------------------------
@@ -61,19 +61,19 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = FID_INS_CELL ;
- HelpId = FID_INS_CELL ;
+ HelpId = CMD_FID_INS_CELL ;
Text [ en-US ] = "~Insert..." ;
};
MenuItem
{
Identifier = FID_DELETE_CELL ;
- HelpId = FID_DELETE_CELL ;
+ HelpId = CMD_FID_DELETE_CELL ;
Text [ en-US ] = "De~lete..." ;
};
MenuItem
{
Identifier = SID_DELETE ;
- HelpId = SID_DELETE ;
+ HelpId = CMD_SID_DELETE ;
Text [ en-US ] = "Delete C~ontents..." ;
};
//------------------------------
@@ -82,19 +82,19 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = SID_INSERT_POSTIT ;
- HelpId = SID_INSERT_POSTIT ;
+ HelpId = CMD_SID_INSERT_POSTIT ;
Text [ en-US ] = "Insert Co~mment" ;
};
MenuItem
{
Identifier = SID_DELETE_NOTE ;
- HelpId = SID_DELETE_NOTE ;
+ HelpId = CMD_SID_DELETE_NOTE ;
Text [ en-US ] = "D~elete Comment" ;
};
MenuItem
{
Identifier = FID_NOTE_VISIBLE ;
- HelpId = FID_NOTE_VISIBLE ;
+ HelpId = CMD_FID_NOTE_VISIBLE ;
Text [ en-US ] = "Sho~w Comment" ;
};
//------------------------------
@@ -104,27 +104,27 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = SID_CUT ;
- HelpId = SID_CUT ;
+ HelpId = CMD_SID_CUT ;
Text [ en-US ] = "Cu~t" ;
};
MenuItem
{
Identifier = SID_COPY ;
- HelpId = SID_COPY ;
+ HelpId = CMD_SID_COPY ;
Text [ en-US ] = "~Copy" ;
};
MenuItem
{
Identifier = SID_PASTE ;
- HelpID = SID_PASTE ;
+ HelpID = CMD_SID_PASTE ;
Text [ en-US ] = "~Paste" ;
};
MenuItem
{
Identifier = SID_PASTE_SPECIAL ;
- HelpId = SID_PASTE_SPECIAL ;
+ HelpId = CMD_SID_PASTE_SPECIAL ;
Text [ en-US ] = "P~aste Special..." ;
};
//------------------------------
@@ -133,7 +133,7 @@ Menu RID_POPUP_CELLS
MenuItem
{
Identifier = SID_DATA_SELECT ;
- HelpId = SID_DATA_SELECT ;
+ HelpId = CMD_SID_DATA_SELECT ;
Text [ en-US ] = "~Selection List..." ;
};
};
@@ -151,49 +151,49 @@ Menu RID_POPUP_TAB
MenuItem
{
Identifier = FID_INS_TABLE ;
- HelpId = FID_INS_TABLE ;
+ HelpId = CMD_FID_INS_TABLE ;
Text [ en-US ] = "~Insert Sheet..." ;
};
MenuItem
{
Identifier = FID_DELETE_TABLE ;
- HelpId = FID_DELETE_TABLE ;
+ HelpId = CMD_FID_DELETE_TABLE ;
Text [ en-US ] = "~Delete Sheet..." ;
};
MenuItem
{
Identifier = FID_TAB_MENU_RENAME ;
- HelpId = FID_TAB_MENU_RENAME ;
+ HelpId = CMD_FID_TAB_MENU_RENAME ;
Text [ en-US ] = "~Rename Sheet..." ;
};
MenuItem
{
Identifier = FID_TAB_MOVE ;
- HelpId = FID_TAB_MOVE ;
+ HelpId = CMD_FID_TAB_MOVE ;
Text [ en-US ] = "~Move/Copy Sheet..." ;
};
MenuItem
{
Identifier = FID_TAB_SELECTALL ;
- HelpId = FID_TAB_SELECTALL ;
+ HelpId = CMD_FID_TAB_SELECTALL ;
Text [ en-US ] = "Select All S~heets" ;
};
MenuItem
{
Identifier = FID_TAB_DESELECTALL ;
- HelpId = FID_TAB_DESELECTALL ;
+ HelpId = CMD_FID_TAB_DESELECTALL ;
Text [ en-US ] = "D~eselect All Sheets" ;
};
MenuItem
{
Identifier = FID_TAB_RTL ;
- HelpId = FID_TAB_RTL ;
+ HelpId = CMD_FID_TAB_RTL ;
Text [ en-US ] = "S~heet Right-To-Left" ;
};
MenuItem
{
Identifier = FID_TAB_EVENTS ;
- HelpId = FID_TAB_EVENTS ;
+ HelpId = CMD_FID_TAB_EVENTS ;
Text [ en-US ] = "Sheet E~vents..." ;
};
//------------------------------
@@ -202,7 +202,7 @@ Menu RID_POPUP_TAB
MenuItem
{
Identifier = FID_TAB_MENU_SET_TAB_BG_COLOR ;
- HelpId = FID_TAB_MENU_SET_TAB_BG_COLOR ;
+ HelpId = CMD_FID_TAB_MENU_SET_TAB_BG_COLOR ;
Text [ en-US ] = "~Tab Color..." ;
};
};
@@ -210,7 +210,7 @@ Menu RID_POPUP_TAB
String RID_POPUP_PIVOT
{
- Text [ en-US ] = "DataPilot pop-up menu" ;
+ Text [ en-US ] = "Pivot table pop-up menu" ;
};
Menu RID_POPUP_PIVOT
@@ -220,25 +220,25 @@ Menu RID_POPUP_PIVOT
MenuItem
{
Identifier = SID_OPENDLG_PIVOTTABLE ;
- HelpId = SID_OPENDLG_PIVOTTABLE ;
- Text [ en-US ] = "~Start..." ;
+ HelpId = CMD_SID_OPENDLG_PIVOTTABLE ;
+ Text [ en-US ] = "~Edit Layout..." ;
};
MenuItem
{
Identifier = SID_PIVOT_RECALC ;
- HelpId = SID_PIVOT_RECALC ;
+ HelpId = CMD_SID_PIVOT_RECALC ;
Text [ en-US ] = "~Refresh" ;
};
MenuItem
{
Identifier = SID_DP_FILTER ;
- HelpId = SID_DP_FILTER ;
+ HelpId = CMD_SID_DP_FILTER ;
Text [ en-US ] = "~Filter..." ;
};
MenuItem
{
Identifier = SID_PIVOT_KILL ;
- HelpId = SID_PIVOT_KILL ;
+ HelpId = CMD_SID_PIVOT_KILL ;
Text [ en-US ] = "~Delete" ;
};
};
@@ -256,32 +256,32 @@ Menu RID_POPUP_PREVIEW
MenuItem
{
Identifier = SID_PREVIEW_PREVIOUS ;
- HelpId = SID_PREVIEW_PREVIOUS ;
+ HelpId = CMD_SID_PREVIEW_PREVIOUS ;
Text [ en-US ] = "~Previous Page" ;
};
MenuItem
{
Identifier = SID_PREVIEW_NEXT ;
- HelpId = SID_PREVIEW_NEXT ;
+ HelpId = CMD_SID_PREVIEW_NEXT ;
Text [ en-US ] = "~Next Page" ;
};
MenuItem
{
Identifier = SID_FORMATPAGE ;
- HelpId = SID_FORMATPAGE ;
+ HelpId = CMD_SID_FORMATPAGE ;
Text [ en-US ] = "Pa~ge Layout..." ;
};
MenuItem
{
Identifier = SID_CLOSEWIN ;
- HelpId = SID_CLOSEWIN ;
+ HelpId = CMD_SID_CLOSEWIN ;
Text [ en-US ] = "~Close" ;
};
MenuItem { Separator = TRUE; };
MenuItem
{
Identifier = SID_PREVIEW_CLOSE ;
- HelpId = SID_PRINTPREVIEW ;
+ HelpId = CMD_SID_PRINTPREVIEW ;
Text [ en-US ] = "Close Pre~view" ;
};
};
@@ -300,7 +300,7 @@ Menu RID_POPUP_EDIT
MenuItem
{
Identifier = SID_CELL_FORMAT_RESET ;
- HelpId = SID_CELL_FORMAT_RESET ;
+ HelpId = CMD_SID_CELL_FORMAT_RESET ;
Text [ en-US ] = "~Default" ;
};
//------------------------------
@@ -324,7 +324,7 @@ Menu RID_POPUP_EDIT
{
Text [ en-US ] = "Style" ;
Identifier = RID_MN_FORMAT_STYLE ;
- HelpID = RID_MN_FORMAT_STYLE ;
+ HelpID = HID_MN_FORMAT_STYLE ;
SubMenu = Menu
{
ItemList =
@@ -348,7 +348,7 @@ Menu RID_POPUP_EDIT
MenuItem
{
Identifier = SID_ULINE_VAL_DOUBLE ;
- HelpID = SID_ULINE_VAL_DOUBLE ;
+ HelpID = CMD_SID_ULINE_VAL_DOUBLE ;
Text [ en-US ] = "Do~uble Underline" ;
};
MenuItem
@@ -370,13 +370,13 @@ Menu RID_POPUP_EDIT
MenuItem
{
Identifier = SID_SET_SUPER_SCRIPT ;
- HelpID = SID_SET_SUPER_SCRIPT ;
+ HelpID = CMD_SID_SET_SUPER_SCRIPT ;
Text [ en-US ] = "Su~perscript" ;
};
MenuItem
{
Identifier = SID_SET_SUB_SCRIPT ;
- HelpID = SID_SET_SUB_SCRIPT ;
+ HelpID = CMD_SID_SET_SUB_SCRIPT ;
Text [ en-US ] = "Su~bscript" ;
};
};
@@ -412,37 +412,37 @@ Menu RID_POPUP_AUDIT
MenuItem
{
Identifier = SID_FILL_ADD_PRED ;
- HelpId = SID_FILL_ADD_PRED ;
+ HelpId = CMD_SID_FILL_ADD_PRED ;
Text [ en-US ] = "Trace ~Precedent" ;
};
MenuItem
{
Identifier = SID_FILL_DEL_PRED ;
- HelpId = SID_FILL_DEL_PRED ;
+ HelpId = CMD_SID_FILL_DEL_PRED ;
Text [ en-US ] = "~Remove Precedent" ;
};
MenuItem
{
Identifier = SID_FILL_ADD_SUCC ;
- HelpId = SID_FILL_ADD_SUCC ;
+ HelpId = CMD_SID_FILL_ADD_SUCC ;
Text [ en-US ] = "~Trace Dependent" ;
};
MenuItem
{
Identifier = SID_FILL_DEL_SUCC ;
- HelpId = SID_FILL_DEL_SUCC ;
+ HelpId = CMD_SID_FILL_DEL_SUCC ;
Text [ en-US ] = "Remove Dependent" ;
};
MenuItem
{
Identifier = SID_DETECTIVE_DEL_ALL ;
- HelpId = SID_DETECTIVE_DEL_ALL ;
+ HelpId = CMD_SID_DETECTIVE_DEL_ALL ;
Text [ en-US ] = "Remove ~All Traces" ;
};
MenuItem
{
Identifier = SID_FILL_NONE ;
- HelpId = SID_FILL_NONE ;
+ HelpId = CMD_SID_FILL_NONE ;
Text [ en-US ] = "Exit Fill Mode" ;
};
};
@@ -460,7 +460,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = SID_CELL_FORMAT_RESET ;
- HelpId = SID_CELL_FORMAT_RESET ;
+ HelpId = CMD_SID_CELL_FORMAT_RESET ;
Text [ en-US ] = "~Default" ;
};
//------------------------------
@@ -469,7 +469,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = FID_CELL_FORMAT ;
- HelpId = FID_CELL_FORMAT ;
+ HelpId = CMD_FID_CELL_FORMAT ;
Text [ en-US ] = "~Format Cells..." ;
};
//------------------------------
@@ -478,25 +478,25 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = FID_INS_ROWBRK ;
- HelpId = FID_INS_ROWBRK ;
+ HelpId = CMD_FID_INS_ROWBRK ;
Text [ en-US ] = "Insert ~Row Break" ;
};
MenuItem
{
Identifier = FID_INS_COLBRK ;
- HelpId = FID_INS_COLBRK ;
+ HelpId = CMD_FID_INS_COLBRK ;
Text [ en-US ] = "Insert ~Column Break" ;
};
MenuItem
{
Identifier = FID_DEL_MANUALBREAKS ;
- HelpId = FID_DEL_MANUALBREAKS ;
+ HelpId = CMD_FID_DEL_MANUALBREAKS ;
Text [ en-US ] = "Delete All Manual Breaks" ;
};
MenuItem
{
Identifier = FID_RESET_PRINTZOOM ;
- HelpId = FID_RESET_PRINTZOOM ;
+ HelpId = CMD_FID_RESET_PRINTZOOM ;
Text [ en-US ] = "Reset Scale" ;
};
//------------------------------
@@ -505,19 +505,19 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = SID_DEFINE_PRINTAREA ;
- HelpId = SID_DEFINE_PRINTAREA ;
+ HelpId = CMD_SID_DEFINE_PRINTAREA ;
Text [ en-US ] = "Define Print Range" ;
};
MenuItem
{
Identifier = SID_ADD_PRINTAREA ;
- HelpId = SID_ADD_PRINTAREA ;
+ HelpId = CMD_SID_ADD_PRINTAREA ;
Text [ en-US ] = "Add Print Range" ;
};
MenuItem
{
Identifier = SID_DELETE_PRINTAREA ;
- HelpId = SID_DELETE_PRINTAREA ;
+ HelpId = CMD_SID_DELETE_PRINTAREA ;
Text [ en-US ] = "Undo Print Range" ;
};
//------------------------------
@@ -526,7 +526,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = SID_FORMATPAGE ;
- HelpId = SID_FORMATPAGE ;
+ HelpId = CMD_SID_FORMATPAGE ;
Text [ en-US ] = "Page Format..." ;
};
//------------------------------
@@ -535,7 +535,7 @@ Menu RID_POPUP_PAGEBREAK
MenuItem
{
Identifier = FID_NOTE_VISIBLE ;
- HelpId = FID_NOTE_VISIBLE ;
+ HelpId = CMD_FID_NOTE_VISIBLE ;
Text [ en-US ] = "Sho~w Comment" ;
};
};
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index 2f5a2d8c88fb..4f99f90b8437 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -72,7 +72,8 @@
*/
// Hack:
-#define U2S(x) ((x)-HID_START)
+//#define U2S(x) ((x)-HID_START)
+#define U2S(x) x
// Macro U2S: unsigned to signed
// is needed because the resource compiler only knows signed short int in
// ExtraData, but the HID_XXX are unsigned and exceed 32k. Code reading the
@@ -7893,7 +7894,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
{
String 1 // Description
{
- Text [ en-US ] = "Extracts value(s) from a DataPilot table.";
+ Text [ en-US ] = "Extracts value(s) from a pivot table.";
};
ExtraData =
{
@@ -7909,15 +7910,15 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
};
String 3 // Description of Parameter 1
{
- Text [ en-US ] = "The name of the data pilot field to extract.";
+ Text [ en-US ] = "The name of the pivot table field to extract.";
};
String 4 // Name of Parameter 2
{
- Text [ en-US ] = "DataPilot";
+ Text [ en-US ] = "Pivot Table";
};
String 5 // Description of Parameter 2
{
- Text [ en-US ] = "A reference to a cell or range in the DataPilot table.";
+ Text [ en-US ] = "A reference to a cell or range in the pivot table.";
};
String 6 // Name of Parameter 3
{
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index ac1458b66a61..eac7f317be6a 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -146,7 +146,7 @@ String SCSTR_PREVIEWSHELL
String SCSTR_PIVOTSHELL
{
- Text [ en-US ] = "Data Pilot Tables" ;
+ Text [ en-US ] = "Pivot Tables" ;
};
String SCSTR_AUDITSHELL
@@ -626,11 +626,6 @@ String STR_REPLCELLSWARN
Text [ en-US ] = "You are pasting data into cells that already contain data.\nDo you really want to overwrite the existing data?";
};
-String STR_PRINT_NOTHING
-{
- Text [ en-US ] = "There is nothing to print. The selected print range or sheet is empty.";
-};
-
String SCSTR_ALLFILTER
{
Text [ en-US ] = "All";
@@ -778,17 +773,17 @@ String STR_ACC_EDITCELL_DESCR
String STR_ACC_DATAPILOT_ROW_DESCR
{
- Text [ en-US ] = "Fields that you drop here will be displayed as rows in the final DataPilot table.";
+ Text [ en-US ] = "Fields that you drop here will be displayed as rows in the final pivot table.";
};
String STR_ACC_DATAPILOT_COL_DESCR
{
- Text [ en-US ] = "Fields that you drop here will be displayed as columns in the final DataPilot table.";
+ Text [ en-US ] = "Fields that you drop here will be displayed as columns in the final pivot table.";
};
String STR_ACC_DATAPILOT_DATA_DESCR
{
- Text [ en-US ] = "Fields that you drop here will be used for calculations in the final DataPilot table.";
+ Text [ en-US ] = "Fields that you drop here will be used for calculations in the final pivot table.";
};
String STR_ACC_DATAPILOT_SEL_DESCR
@@ -811,6 +806,23 @@ String RID_SCSTR_ONCLICK
Text [ en-US ] = "Mouse button pressed";
};
+String STR_ACC_TOOLBAR_FORMULA
+{
+ Text [ en-US ] = "Formula Tool Bar";
+};
+String STR_ACC_DOC_SPREADSHEET
+{
+ Text [ en-US ] = "%PRODUCTNAME Spreadsheets";
+};
+String STR_ACC_DOC_SPREADSHEET_READONLY
+{
+ Text [ en-US ] = "(read-only)";
+};
+String STR_ACC_DOC_PREVIEW_SUFFIX
+{
+ Text [ en-US ] = "(Preview mode)";
+};
+
String SCSTR_MOREBTN_MOREOPTIONS
{
Text [ en-US ] = "More ~Options";
@@ -827,22 +839,13 @@ StringArray SCSTR_PRINT_OPTIONS
{
< "Pages"; >;
< "~Include output of empty pages"; >;
- < "If checked empty pages that have no cell contents or draw objects are not printed."; >;
- < "Sheets"; >;
- < "Print ~only selected sheets"; >;
- < "If checked only contents from selected sheets are printed, even if you specify a wider range in the Format - Print Ranges dialog. Content from sheets that are not selected will not be printed."; >;
< "Print content"; >;
< "~All sheets"; >;
- < "The printout will be created from all sheets in the document."; >;
< "~Selected sheets"; >;
- < "The printout will be created only from the currently selected sheets."; >;
< "Selected cells"; >;
- < "The printout will be created only from the currently selected cells."; >;
< "Thereof print"; >;
< "All ~pages"; >;
- < "Print all pages of the printable content."; >;
< "Pa~ges"; >;
- < "Print only some pages of the printable content."; >;
< "%PRODUCTNAME %s"; >;
};
};
diff --git a/sc/source/ui/src/simpref.src b/sc/source/ui/src/simpref.src
index 2c8dfd665fcb..ce8c51318347 100644
--- a/sc/source/ui/src/simpref.src
+++ b/sc/source/ui/src/simpref.src
@@ -43,6 +43,7 @@ ModelessDialog RID_SCDLG_SIMPLEREF
};
Edit ED_ASSIGN
{
+ HelpID = "sc:Edit:RID_SCDLG_SIMPLEREF:ED_ASSIGN";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 6 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
@@ -51,6 +52,7 @@ ModelessDialog RID_SCDLG_SIMPLEREF
};
ImageButton RB_ASSIGN
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SIMPLEREF:RB_ASSIGN";
Pos = MAP_APPFONT ( 142 , 5 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
diff --git a/sc/source/ui/src/solveroptions.src b/sc/source/ui/src/solveroptions.src
index 87c75277f413..106382fb9c79 100644
--- a/sc/source/ui/src/solveroptions.src
+++ b/sc/source/ui/src/solveroptions.src
@@ -42,6 +42,7 @@ ModalDialog RID_SCDLG_SOLVEROPTIONS
};
ListBox LB_ENGINE
{
+ HelpID = "sc:ListBox:RID_SCDLG_SOLVEROPTIONS:LB_ENGINE";
Border = TRUE ;
Pos = MAP_APPFONT ( 67 , 6 ) ;
Size = MAP_APPFONT ( 145 , 90 ) ;
@@ -63,6 +64,7 @@ ModalDialog RID_SCDLG_SOLVEROPTIONS
};
PushButton BTN_EDIT
{
+ HelpID = "sc:PushButton:RID_SCDLG_SOLVEROPTIONS:BTN_EDIT";
Pos = MAP_APPFONT ( 6 , 108 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -111,6 +113,7 @@ ModalDialog RID_SCDLG_SOLVER_INTEGER
};
NumericField NF_VALUE
{
+ HelpID = "sc:NumericField:RID_SCDLG_SOLVER_INTEGER:NF_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 27 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -160,6 +163,7 @@ ModalDialog RID_SCDLG_SOLVER_DOUBLE
};
Edit ED_VALUE
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER_DOUBLE:ED_VALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 27 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
diff --git a/sc/source/ui/src/solvrdlg.src b/sc/source/ui/src/solvrdlg.src
index c90d746675aa..b1513ec8c2e1 100644
--- a/sc/source/ui/src/solvrdlg.src
+++ b/sc/source/ui/src/solvrdlg.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_SOLVER
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_SOLVE ;
+ HelpId = CMD_SID_OPENDLG_SOLVE ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 222 , 64 ) ;
@@ -45,6 +45,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
Edit ED_FORMULACELL
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER:ED_FORMULACELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 64 , 14 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
@@ -52,6 +53,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
ImageButton RB_FORMULACELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SOLVER:RB_FORMULACELL";
Pos = MAP_APPFONT ( 145 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -65,6 +67,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
Edit ED_TARGETVAL
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER:ED_TARGETVAL";
Border = TRUE ;
Pos = MAP_APPFONT ( 64 , 30 ) ;
Size = MAP_APPFONT ( 93 , 12 ) ;
@@ -78,6 +81,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
Edit ED_VARCELL
{
+ HelpID = "sc:Edit:RID_SCDLG_SOLVER:ED_VARCELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 64 , 46 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
@@ -85,6 +89,7 @@ ModelessDialog RID_SCDLG_SOLVER
};
ImageButton RB_VARCELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_SOLVER:RB_VARCELL";
Pos = MAP_APPFONT ( 145 , 45 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
diff --git a/sc/source/ui/src/sortdlg.src b/sc/source/ui/src/sortdlg.src
index 3eb7e43585d0..9dd8b6f17d29 100644
--- a/sc/source/ui/src/sortdlg.src
+++ b/sc/source/ui/src/sortdlg.src
@@ -34,6 +34,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
Size = MAP_APPFONT ( 260 , 185 ) ;
ListBox LB_SORT1
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT1";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 19 ) ;
Size = MAP_APPFONT ( 154 , 90 ) ;
@@ -42,6 +43,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_UP1
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP1";
Pos = MAP_APPFONT ( 172 , 14 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "~Ascending" ;
@@ -49,6 +51,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_DOWN1
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN1";
Pos = MAP_APPFONT ( 172 , 28 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "~Descending" ;
@@ -62,6 +65,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
ListBox LB_SORT2
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT2";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 60 ) ;
Size = MAP_APPFONT ( 154 , 90 ) ;
@@ -70,6 +74,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_UP2
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP2";
Pos = MAP_APPFONT ( 172 , 55 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "A~scending" ;
@@ -77,6 +82,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_DOWN2
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN2";
Pos = MAP_APPFONT ( 172 , 69 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "D~escending" ;
@@ -90,6 +96,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
ListBox LB_SORT3
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_FIELDS:LB_SORT3";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 154 , 90 ) ;
@@ -98,6 +105,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_UP3
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_UP3";
Pos = MAP_APPFONT ( 172 , 96 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "As~cending" ;
@@ -105,6 +113,7 @@ TabPage RID_SCPAGE_SORT_FIELDS
};
RadioButton BTN_DOWN3
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SORT_FIELDS:BTN_DOWN3";
Pos = MAP_APPFONT ( 172 , 110 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "Desce~nding" ;
@@ -127,6 +136,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox BTN_CASESENSITIVE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_CASESENSITIVE";
Pos = MAP_APPFONT ( 12 , 6 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Case ~sensitive" ;
@@ -134,6 +144,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
CheckBox BTN_LABEL
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_LABEL";
Pos = MAP_APPFONT ( 12 , 20 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -148,6 +159,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
CheckBox BTN_FORMATS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_FORMATS";
Pos = MAP_APPFONT ( 12 , 34 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Include ~formats" ;
@@ -155,6 +167,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
CheckBox BTN_NATURALSORT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_COPYRESULT";
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ de ] = "Enable ~natural sort" ;
@@ -173,6 +186,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_OUTAREA
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_OUTAREA";
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 73 ) ;
Size = MAP_APPFONT ( 93 , 90 ) ;
@@ -181,6 +195,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
Edit ED_OUTAREA
{
+ HelpID = "sc:Edit:RID_SCPAGE_SORT_OPTIONS:ED_OUTAREA";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 119 , 73 ) ;
@@ -196,6 +211,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_SORT_USER
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_SORT_USER";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 100 ) ;
@@ -211,6 +227,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_LANGUAGE
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_LANGUAGE";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 129 ) ;
Size = MAP_APPFONT ( 101 , 90 ) ;
@@ -226,6 +243,7 @@ TabPage RID_SCPAGE_SORT_OPTIONS
};
ListBox LB_ALGORITHM
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_ALGORITHM";
Border = TRUE ;
Pos = MAP_APPFONT ( 119 , 129 ) ;
Size = MAP_APPFONT ( 132 , 90 ) ;
@@ -311,6 +329,7 @@ TabDialog RID_SCDLG_SORT
ModalDialog RID_SCDLG_SORT_WARNING
{
+ HelpID = "sc:ModalDialog:RID_SCDLG_SORT_WARNING";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 180 , 91 ) ;
@@ -333,6 +352,7 @@ ModalDialog RID_SCDLG_SORT_WARNING
};
PushButton BTN_EXTSORT
{
+ HelpID = "sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_EXTSORT";
Pos = MAP_APPFONT ( 6 , 39 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
@@ -341,6 +361,7 @@ ModalDialog RID_SCDLG_SORT_WARNING
};
PushButton BTN_CURSORT
{
+ HelpID = "sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_CURSORT";
Pos = MAP_APPFONT ( 70 , 39 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
diff --git a/sc/source/ui/src/subtdlg.src b/sc/source/ui/src/subtdlg.src
index bca1d57b32f5..7f3d01e7d99b 100644
--- a/sc/source/ui/src/subtdlg.src
+++ b/sc/source/ui/src/subtdlg.src
@@ -41,6 +41,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_PAGEBREAK
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_PAGEBREAK";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Page break between groups" ;
@@ -48,6 +49,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_CASE
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_CASE";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Case sensitive" ;
@@ -55,6 +57,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_SORT
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_SORT";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "Pre-~sort area according to groups" ;
@@ -62,6 +65,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_FORMATS
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_FORMATS";
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "I~nclude formats" ;
@@ -69,6 +73,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
CheckBox BTN_USERDEF
{
+ HelpID = "sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_USERDEF";
Pos = MAP_APPFONT ( 12 , 115 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "C~ustom sort order" ;
@@ -76,6 +81,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
ListBox LB_USERDEF
{
+ HelpID = "sc:ListBox:RID_SCPAGE_SUBT_OPTIONS:LB_USERDEF";
Border = TRUE ;
Pos = MAP_APPFONT ( 20 , 127 ) ;
Size = MAP_APPFONT ( 231 , 90 ) ;
@@ -84,6 +90,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
RadioButton BTN_ASCENDING
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SUBT_OPTIONS:BTN_ASCENDING";
Pos = MAP_APPFONT ( 12 , 69 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "~Ascending" ;
@@ -91,6 +98,7 @@ TabPage RID_SCPAGE_SUBT_OPTIONS
};
RadioButton BTN_DESCENDING
{
+ HelpID = "sc:RadioButton:RID_SCPAGE_SUBT_OPTIONS:BTN_DESCENDING";
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 239 , 10 ) ;
Text [ en-US ] = "D~escending" ;
diff --git a/sc/source/ui/src/tabopdlg.src b/sc/source/ui/src/tabopdlg.src
index e4f99ab59596..d2c74783df8d 100644
--- a/sc/source/ui/src/tabopdlg.src
+++ b/sc/source/ui/src/tabopdlg.src
@@ -30,7 +30,7 @@
ModelessDialog RID_SCDLG_TABOP
{
OutputSize = TRUE ;
- HelpId = SID_OPENDLG_TABOP ;
+ HelpId = CMD_SID_OPENDLG_TABOP ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 240 , 64 ) ;
@@ -45,12 +45,14 @@ ModelessDialog RID_SCDLG_TABOP
};
Edit ED_FORMULARANGE
{
+ HelpID = "sc:Edit:RID_SCDLG_TABOP:ED_FORMULARANGE";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 14 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
};
ImageButton RB_FORMULARANGE
{
+ HelpID = "sc:ImageButton:RID_SCDLG_TABOP:RB_FORMULARANGE";
Pos = MAP_APPFONT ( 163 , 13 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -64,12 +66,14 @@ ModelessDialog RID_SCDLG_TABOP
};
Edit ED_ROWCELL
{
+ HelpID = "sc:Edit:RID_SCDLG_TABOP:ED_ROWCELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 30 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
};
ImageButton RB_ROWCELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_TABOP:RB_ROWCELL";
Pos = MAP_APPFONT ( 163 , 29 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -83,12 +87,14 @@ ModelessDialog RID_SCDLG_TABOP
};
Edit ED_COLCELL
{
+ HelpID = "sc:Edit:RID_SCDLG_TABOP:ED_COLCELL";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 46 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
};
ImageButton RB_COLCELL
{
+ HelpID = "sc:ImageButton:RID_SCDLG_TABOP:RB_COLCELL";
Pos = MAP_APPFONT ( 163 , 45 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 9efefdf6a460..6a596b1d2eb0 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -59,12 +59,12 @@
ScStyleDlg::ScStyleDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
- USHORT nRscId )
+ sal_uInt16 nRscId )
: SfxStyleDialog ( pParent,
ScResId( nRscId ),
rStyleBase,
- FALSE ),
+ false ),
nDlgRsc ( nRscId )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -137,7 +137,7 @@ ScStyleDlg::~ScStyleDlg()
// -----------------------------------------------------------------------
-void ScStyleDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
+void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
if ( nDlgRsc == RID_SCDLG_STYLES_PAR )
{
@@ -179,7 +179,7 @@ void ScStyleDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
switch ( nPageId )
{
case TP_PAGE_STD:
- aSet.Put (SfxAllEnumItem((const USHORT)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_CENTER));
+ aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_CENTER));
rTabPage.PageCreated(aSet);
break;
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index 56eb56508336..fab15bd8a996 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -74,7 +74,7 @@ ScDataObject* ScAreaLinkSaver::Clone() const
return new ScAreaLinkSaver( *this );
}
-BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
+sal_Bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
{
return ( aFileName == rCompare.GetFile() &&
aFilterName == rCompare.GetFilter() &&
@@ -83,7 +83,7 @@ BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
nRefresh == rCompare.GetRefreshDelay() );
}
-BOOL ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
+sal_Bool ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
{
return ( IsEqualSource( rCompare ) &&
aDestArea == rCompare.GetDestArea() );
@@ -105,11 +105,11 @@ void ScAreaLinkSaver::InsertNewLink( ScDocument* pDoc ) const
{
ScAreaLink* pLink = new ScAreaLink( pObjSh, aFileName, aFilterName, aOptions,
aSourceArea, aDestArea.aStart, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aDestArea );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName, &aSourceArea );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
}
}
@@ -133,7 +133,7 @@ ScDataObject* ScAreaLinkSaveCollection::Clone() const
return new ScAreaLinkSaveCollection( *this );
}
-BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
+sal_Bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
{
// IsEqual can be checked in sequence.
// Neither ref-update nor removing links will change the order.
@@ -141,31 +141,31 @@ BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager();
if (pLinkManager)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
{
if ( nPos >= GetCount() || !(*this)[nPos]->IsEqual( *(ScAreaLink*)pBase ) )
- return FALSE;
+ return false;
++nPos;
}
}
if ( nPos < GetCount() )
- return FALSE; // fewer links in the document than in the save collection
+ return false; // fewer links in the document than in the save collection
}
- return TRUE;
+ return sal_True;
}
ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver )
{
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if ( pBase->ISA(ScAreaLink) &&
@@ -188,8 +188,8 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc ) const
if (pLinkManager)
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nSaveCount = GetCount();
- for (USHORT nPos=0; nPos<nSaveCount; nPos++)
+ sal_uInt16 nSaveCount = GetCount();
+ for (sal_uInt16 nPos=0; nPos<nSaveCount; nPos++)
{
ScAreaLinkSaver* pSaver = (*this)[nPos];
ScAreaLink* pLink = lcl_FindLink( rLinks, *pSaver );
@@ -209,8 +209,8 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum
if (pLinkManager)
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index 3763dfc89f05..0376f7c7a9c4 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -167,7 +167,7 @@ void ScRefUndoData::DeleteUnchanged( const ScDocument* pDoc )
}
}
-void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
+void ScRefUndoData::DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst )
{
if (pDBCollection)
pDoc->SetDBCollection( new ScDBCollection(*pDBCollection) );
@@ -196,8 +196,8 @@ void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
if (pDBCollection || pRangeName)
{
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
pDoc->CompileAll();
pDoc->SetDirty();
pDoc->SetAutoCalc( bOldAutoCalc );
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 609c2eb05924..7f3e5f8e094b 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -67,14 +67,14 @@ ScSimpleUndo::~ScSimpleUndo()
delete pDetectiveUndo;
}
-BOOL ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
+sal_Bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
{
// Zu jeder Undo-Action kann eine SdrUndoGroup fuer das Aktualisieren
// der Detektiv-Pfeile gehoeren.
// DetectiveRefresh kommt immer hinterher, die SdrUndoGroup ist in
// eine ScUndoDraw Action verpackt.
// Nur beim automatischen Aktualisieren wird AddUndoAction mit
- // bTryMerg=TRUE gerufen.
+ // bTryMerg=sal_True gerufen.
if ( !pDetectiveUndo && pNextAction->ISA(ScUndoDraw) )
{
@@ -84,15 +84,15 @@ BOOL ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
ScUndoDraw* pCalcUndo = (ScUndoDraw*)pNextAction;
pDetectiveUndo = pCalcUndo->GetDrawUndo();
pCalcUndo->ForgetDrawUndo();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScSimpleUndo::BeginUndo()
{
- pDocShell->SetInUndo( TRUE );
+ pDocShell->SetInUndo( sal_True );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -115,12 +115,12 @@ void ScSimpleUndo::EndUndo()
pViewShell->ShowAllCursors();
}
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScSimpleUndo::BeginRedo()
{
- pDocShell->SetInUndo( TRUE ); //! eigenes Flag fuer Redo?
+ pDocShell->SetInUndo( sal_True ); //! eigenes Flag fuer Redo?
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -142,7 +142,7 @@ void ScSimpleUndo::EndRedo()
pViewShell->ShowAllCursors();
}
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScSimpleUndo::ShowTable( SCTAB nTab )
@@ -185,7 +185,7 @@ ScBlockUndo::~ScBlockUndo()
void ScBlockUndo::BeginUndo()
{
ScSimpleUndo::BeginUndo();
- EnableDrawAdjust( pDocShell->GetDocument(), FALSE );
+ EnableDrawAdjust( pDocShell->GetDocument(), false );
}
void ScBlockUndo::EndUndo()
@@ -193,7 +193,7 @@ void ScBlockUndo::EndUndo()
if (eMode == SC_UNDO_AUTOHEIGHT)
AdjustHeight();
- EnableDrawAdjust( pDocShell->GetDocument(), TRUE );
+ EnableDrawAdjust( pDocShell->GetDocument(), sal_True );
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
ShowBlock();
@@ -209,7 +209,7 @@ void ScBlockUndo::EndRedo()
ScSimpleUndo::EndRedo();
}
-BOOL ScBlockUndo::AdjustHeight()
+sal_Bool ScBlockUndo::AdjustHeight()
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -233,9 +233,9 @@ BOOL ScBlockUndo::AdjustHeight()
nPPTY = ScGlobal::nScreenPPTY;
}
- BOOL bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(),
+ sal_Bool bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(),
/*!*/ aBlockRange.aStart.Tab(), 0, &aVirtDev,
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
if (bRet)
pDocShell->PostPaint( 0, aBlockRange.aStart.Row(), aBlockRange.aStart.Tab(),
@@ -247,12 +247,15 @@ BOOL ScBlockUndo::AdjustHeight()
void ScBlockUndo::ShowBlock()
{
+ if ( IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
ShowTable( aBlockRange ); // bei mehreren Tabs im Range ist jede davon gut
pViewShell->MoveCursorAbs( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
ScRange aRange = aBlockRange;
aRange.aStart.SetTab( nTab );
@@ -290,7 +293,7 @@ void ScMoveUndo::UndoRef()
{
ScDocument* pDoc = pDocShell->GetDocument();
ScRange aRange(0,0,0, MAXCOL,MAXROW,pRefUndoDoc->GetTableCount()-1);
- pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, FALSE, pDoc, NULL, FALSE );
+ pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, false, pDoc, NULL, false );
if (pRefUndoData)
pRefUndoData->DoUndo( pDoc, (eMode == SC_UNDO_REFFIRST) );
// HACK: ScDragDropUndo ist der einzige mit REFFIRST.
@@ -302,7 +305,7 @@ void ScMoveUndo::BeginUndo()
{
ScSimpleUndo::BeginUndo();
- EnableDrawAdjust( pDocShell->GetDocument(), FALSE );
+ EnableDrawAdjust( pDocShell->GetDocument(), false );
if (pRefUndoDoc && eMode == SC_UNDO_REFFIRST)
UndoRef();
@@ -315,7 +318,7 @@ void ScMoveUndo::EndUndo()
if (pRefUndoDoc && eMode == SC_UNDO_REFLAST)
UndoRef();
- EnableDrawAdjust( pDocShell->GetDocument(), TRUE );
+ EnableDrawAdjust( pDocShell->GetDocument(), sal_True );
ScSimpleUndo::EndUndo();
}
@@ -354,7 +357,7 @@ void ScDBFuncUndo::EndUndo()
if ( pAutoDBRange )
{
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -389,7 +392,7 @@ void ScDBFuncUndo::BeginRedo()
{
// move the database range to this function's position again (see ScDocShell::GetDBData)
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -412,8 +415,8 @@ void ScDBFuncUndo::BeginRedo()
aOriginalRange.aStart.Col(), aOriginalRange.aStart.Row(),
aOriginalRange.aEnd.Col(), aOriginalRange.aEnd.Row() );
- pNoNameData->SetByRow( TRUE );
- pNoNameData->SetAutoFilter( FALSE );
+ pNoNameData->SetByRow( sal_True );
+ pNoNameData->SetAutoFilter( false );
// header is always set with the operation in redo
}
}
@@ -459,7 +462,7 @@ String ScUndoWrapper::GetRepeatComment(SfxRepeatTarget& rTarget) const
return String();
}
-USHORT ScUndoWrapper::GetId() const
+sal_uInt16 ScUndoWrapper::GetId() const
{
if (pWrappedUndo)
return pWrappedUndo->GetId();
@@ -467,26 +470,26 @@ USHORT ScUndoWrapper::GetId() const
return 0;
}
-BOOL ScUndoWrapper::IsLinked()
+sal_Bool ScUndoWrapper::IsLinked()
{
if (pWrappedUndo)
return pWrappedUndo->IsLinked();
else
- return FALSE;
+ return false;
}
-void ScUndoWrapper::SetLinked( BOOL bIsLinked )
+void ScUndoWrapper::SetLinked( sal_Bool bIsLinked )
{
if (pWrappedUndo)
pWrappedUndo->SetLinked(bIsLinked);
}
-BOOL ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
{
if (pWrappedUndo)
return pWrappedUndo->Merge(pNextAction);
else
- return FALSE;
+ return false;
}
void ScUndoWrapper::Undo()
@@ -507,12 +510,12 @@ void ScUndoWrapper::Repeat(SfxRepeatTarget& rTarget)
pWrappedUndo->Repeat(rTarget);
}
-BOOL ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (pWrappedUndo)
return pWrappedUndo->CanRepeat(rTarget);
else
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index a670f067c8d8..0e59c0a35f92 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -106,7 +106,7 @@ TYPEINIT1(ScUndoBorder, ScBlockUndo);
ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell,
const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bNewPartOfPaste ) :
+ sal_Bool bNewPartOfPaste ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ),
aEffRange( rRange ),
nCount( nNewCount ),
@@ -143,7 +143,7 @@ String ScUndoInsertCells::GetComment() const
return ScGlobal::GetRscString( pPasteUndo ? STR_UNDO_PASTE : STR_UNDO_INSERTCELLS );
}
-BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
{
// If a paste undo action has already been added, append (detective) action there.
if ( pPasteUndo )
@@ -160,7 +160,7 @@ BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
pPasteUndo = pWrappedAction;
pWrapper->ForgetWrappedUndo(); // pWrapper is deleted by UndoManager
- return TRUE;
+ return sal_True;
}
}
@@ -180,7 +180,7 @@ void ScUndoInsertCells::SetChangeTrack()
nEndChangeAction = 0;
}
-void ScUndoInsertCells::DoChange( const BOOL bUndo )
+void ScUndoInsertCells::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB i;
@@ -238,13 +238,13 @@ void ScUndoInsertCells::DoChange( const BOOL bUndo )
{
SCCOL nEndCol = aWorkRange.aEnd.Col();
SCROW nEndRow = aWorkRange.aEnd.Row();
- pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE );
+ pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True );
}
}
//? Undo fuer herausgeschobene Attribute ?
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
switch (eCmd)
{
@@ -301,7 +301,7 @@ void ScUndoInsertCells::Undo()
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -309,7 +309,7 @@ void ScUndoInsertCells::Redo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
if ( pPasteUndo )
@@ -328,11 +328,11 @@ void ScUndoInsertCells::Repeat(SfxRepeatTarget& rTarget)
pPasteUndo->Repeat( rTarget );
}
else
- ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, sal_True );
}
}
-BOOL ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -391,7 +391,7 @@ void ScUndoDeleteCells::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoDeleteCells::DoChange( const BOOL bUndo )
+void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB i;
@@ -442,7 +442,7 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
for( i=0; i<nCount && bUndo; i++ )
{
pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i],
- IDF_ALL | IDF_NOCAPTIONS, FALSE, pDoc );
+ IDF_ALL | IDF_NOCAPTIONS, false, pDoc );
}
ScRange aWorkRange( aEffRange );
@@ -474,12 +474,12 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
SCCOL nEndCol = aWorkRange.aEnd.Col();
SCROW nEndRow = aWorkRange.aEnd.Row();
- pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE );
+ pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True );
}
}
// Zeichnen
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
switch (eCmd)
{
case DEL_DELROWS:
@@ -533,7 +533,7 @@ void ScUndoDeleteCells::Undo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -552,7 +552,7 @@ void ScUndoDeleteCells::Redo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginRedo();
- DoChange( FALSE);
+ DoChange( false);
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -564,10 +564,10 @@ void ScUndoDeleteCells::Redo()
void ScUndoDeleteCells::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, sal_True );
}
-BOOL ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -579,7 +579,7 @@ BOOL ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoDeleteMulti::ScUndoDeleteMulti( ScDocShell* pNewDocShell,
- BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab,
+ sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab,
const SCCOLROW* pRng, SCCOLROW nRngCnt,
ScDocument* pUndoDocument, ScRefUndoData* pRefData ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ),
@@ -607,7 +607,7 @@ void ScUndoDeleteMulti::DoChange() const
{
SCCOL nStartCol;
SCROW nStartRow;
- USHORT nPaint;
+ sal_uInt16 nPaint;
if (bRows)
{
nStartCol = 0;
@@ -627,7 +627,7 @@ void ScUndoDeleteMulti::DoChange() const
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True );
}
pDocShell->PostPaint( nStartCol, nStartRow, nTab, MAXCOL, MAXROW, nTab, nPaint );
@@ -666,7 +666,7 @@ void ScUndoDeleteMulti::SetChangeTrack()
aRange.aStart.SetCol( static_cast<SCCOL>(nStart) );
aRange.aEnd.SetCol( static_cast<SCCOL>(nEnd) );
}
- ULONG nDummyStart;
+ sal_uLong nDummyStart;
pChangeTrack->AppendDeleteRange( aRange, pRefUndoDoc,
nDummyStart, nEndChangeAction );
}
@@ -702,10 +702,10 @@ void ScUndoDeleteMulti::Undo()
SCCOLROW nStart = *(pOneRange++);
SCCOLROW nEnd = *(pOneRange++);
if (bRows)
- pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pDoc );
+ pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false,pDoc );
else
pRefUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
- static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,FALSE,pDoc );
+ static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,false,pDoc );
}
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
@@ -757,10 +757,10 @@ void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget)
{
// DeleteCells, falls einfache Selektion
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, sal_True );
}
-BOOL ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -802,13 +802,13 @@ void ScUndoCut::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoCut::DoChange( const BOOL bUndo )
+void ScUndoCut::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
// do not undo/redo objects and note captions, they are handled via drawing undo
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
if (bUndo) // nur bei Undo
{
@@ -817,7 +817,7 @@ void ScUndoCut::DoChange( const BOOL bUndo )
ScRange aCopyRange = aExtendedRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, false, pDoc );
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
@@ -845,7 +845,7 @@ void ScUndoCut::DoChange( const BOOL bUndo )
void ScUndoCut::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -853,19 +853,19 @@ void ScUndoCut::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
}
void ScUndoCut::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, sal_True );
}
-BOOL ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -881,10 +881,10 @@ ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData,
void* /* pFill1 */, void* /* pFill2 */, void* /* pFill3 */,
- BOOL bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
+ sal_Bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -933,20 +933,20 @@ void ScUndoPaste::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoPaste::DoChange( const BOOL bUndo )
+void ScUndoPaste::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
// RefUndoData for redo is created before first undo
// (with DeleteUnchanged after the DoUndo call)
- BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
if ( bCreateRedoData )
pRefRedoData = new ScRefUndoData( pDoc );
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// fuer Undo immer alle oder keine Inhalte sichern
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -955,7 +955,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
// do not undo/redo objects and note captions, they are handled via drawing undo
(nUndoFlags &= ~IDF_OBJECTS) |= IDF_NOCAPTIONS;
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -967,8 +967,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
if (!pRedoDoc)
{
- BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
- BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+ sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
@@ -978,11 +978,11 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pRedoDoc );
- bRedoFilled = TRUE;
+ pDoc->CopyToDocument( aCopyRange, nUndoFlags, false, pRedoDoc );
+ bRedoFilled = sal_True;
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
aMarkData.MarkToMulti();
@@ -997,21 +997,21 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
aTabSelectRange.aStart.SetTab( nFirstSelected );
aTabSelectRange.aEnd.SetTab( nFirstSelected );
- pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
for (nTab=0; nTab<nTabCount; nTab++)
if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab))
{
aTabSelectRange.aStart.SetTab( nTab );
aTabSelectRange.aEnd.SetTab( nTab );
- pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
}
}
if (pWorkRefData)
{
- pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ pWorkRefData->DoUndo( pDoc, sal_True ); // sal_True = bSetChartRangeLists for SetChartListenerCollection
if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
- bPaintAll = TRUE;
+ bPaintAll = sal_True;
}
if ( bCreateRedoData && pRefRedoData )
@@ -1021,13 +1021,13 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
aTabSelectRange.aStart.SetTab( nFirstSelected );
aTabSelectRange.aEnd.SetTab( nFirstSelected );
- pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
for (nTab=0; nTab<nTabCount; nTab++)
if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab))
{
aTabSelectRange.aStart.SetTab( nTab );
aTabSelectRange.aEnd.SetTab( nTab );
- pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
}
}
@@ -1041,8 +1041,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
SetChangeTrack();
ScRange aDrawRange( aBlockRange );
- pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
- USHORT nPaint = PAINT_GRID;
+ pDoc->ExtendMerge( aDrawRange, sal_True ); // only needed for single sheet (text/rtf etc.)
+ sal_uInt16 nPaint = PAINT_GRID;
if (bPaintAll)
{
aDrawRange.aStart.SetCol(0);
@@ -1051,7 +1051,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
aDrawRange.aEnd.SetRow(MAXROW);
nPaint |= PAINT_TOP | PAINT_LEFT;
/*A*/ if (pViewShell)
- pViewShell->AdjustBlockHeight(FALSE);
+ pViewShell->AdjustBlockHeight(false);
}
else
{
@@ -1065,7 +1065,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
nPaint |= PAINT_LEFT;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
@@ -1089,7 +1089,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
void ScUndoPaste::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
ShowTable( aBlockRange );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -1099,9 +1099,9 @@ void ScUndoPaste::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
}
@@ -1119,12 +1119,12 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget)
pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(),
aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose,
aPasteOptions.bAsLink, aPasteOptions.eMoveMode, IDF_NONE,
- TRUE ); // allow warning dialog
+ sal_True ); // allow warning dialog
}
}
}
-BOOL ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1136,8 +1136,8 @@ BOOL ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell,
- const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut,
- ScDocument* pUndoDocument, ScRefUndoData* pRefData, BOOL bScenario ) :
+ const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut,
+ ScDocument* pUndoDocument, ScRefUndoData* pRefData, sal_Bool bScenario ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFFIRST ),
aSrcRange( rRange ),
bCut( bNewCut ),
@@ -1148,7 +1148,7 @@ ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell,
aDestEnd.IncCol(aSrcRange.aEnd.Col() - aSrcRange.aStart.Col());
aDestEnd.IncTab(aSrcRange.aEnd.Tab() - aSrcRange.aStart.Tab());
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// find number of non-filtered rows
@@ -1196,9 +1196,9 @@ void ScUndoDragDrop::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const
+void ScUndoDragDrop::PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const
{
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1211,7 +1211,7 @@ void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const
aRange.aStart.Tab(), 0, &aVirtDev,
pViewData->GetPPTX(), pViewData->GetPPTY(),
pViewData->GetZoomX(), pViewData->GetZoomY(),
- FALSE ) )
+ false ) )
{
aRange.aStart.SetCol(0);
aRange.aEnd.SetCol(MAXCOL);
@@ -1258,16 +1258,16 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) const
ScRange aPaintRange = aRange;
pDoc->ExtendMerge( aPaintRange ); // before deleting
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aPaintRange );
// do not undo objects and note captions, they are handled via drawing undo
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pDoc->DeleteAreaTab( aRange, nUndoFlags );
- pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, FALSE, pDoc );
+ pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, false, pDoc );
if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) )
- pDoc->ExtendMerge( aRange, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True );
aPaintRange.aEnd.SetCol( Max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) );
aPaintRange.aEnd.SetRow( Max( aPaintRange.aEnd.Row(), aRange.aEnd.Row() ) );
@@ -1293,10 +1293,10 @@ void ScUndoDragDrop::Redo()
ScDocument* pDoc = pDocShell->GetDocument();
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
// do not undo/redo objects and note captions, they are handled via drawing undo
- USHORT nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
/* TODO: Redoing note captions is quite tricky due to the fact that a
helper clip document is used. While (re-)pasting the contents to the
@@ -1314,7 +1314,7 @@ void ScUndoDragDrop::Redo()
SCTAB nTab;
ScMarkData aSourceMark;
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
- aSourceMark.SelectTable( nTab, TRUE );
+ aSourceMark.SelectTable( nTab, sal_True );
// do not clone objects and note captions into clipdoc (see above)
ScClipParam aClipParam(aSrcRange, bCut);
@@ -1324,7 +1324,7 @@ void ScUndoDragDrop::Redo()
{
ScRange aSrcPaintRange = aSrcRange;
pDoc->ExtendMerge( aSrcPaintRange ); // before deleting
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aSrcPaintRange );
pDoc->DeleteAreaTab( aSrcRange, nRedoFlags );
PaintArea( aSrcPaintRange, nExtFlags );
@@ -1332,11 +1332,11 @@ void ScUndoDragDrop::Redo()
ScMarkData aDestMark;
for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++)
- aDestMark.SelectTable( nTab, TRUE );
+ aDestMark.SelectTable( nTab, sal_True );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
// TODO: restore old note captions instead of cloning new captions...
- pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, sal_True, false, bIncludeFiltered );
if (bCut)
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
@@ -1345,14 +1345,14 @@ void ScUndoDragDrop::Redo()
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- pDocShell->GetDocFunc().UnmergeCells( aDestRange, FALSE, TRUE );
+ pDocShell->GetDocFunc().UnmergeCells( aDestRange, false, sal_True );
for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++)
{
SCCOL nEndCol = aDestRange.aEnd.Col();
SCROW nEndRow = aDestRange.aEnd.Row();
pDoc->ExtendMerge( aDestRange.aStart.Col(), aDestRange.aStart.Row(),
- nEndCol, nEndRow, nTab, TRUE );
+ nEndCol, nEndRow, nTab, sal_True );
PaintArea( ScRange( aDestRange.aStart.Col(), aDestRange.aStart.Row(), nTab,
nEndCol, nEndRow, nTab ), 0 );
}
@@ -1363,7 +1363,7 @@ void ScUndoDragDrop::Redo()
ShowTable( aDestRange.aStart.Tab() );
RedoSdrUndoAction( pDrawUndo ); //! include in ScBlockUndo?
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -1373,9 +1373,9 @@ void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
@@ -1409,7 +1409,7 @@ void ScUndoListNames::DoChange( ScDocument* pSrcDoc ) const
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aBlockRange, IDF_ALL );
- pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, FALSE, pDoc );
+ pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, false, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1437,7 +1437,7 @@ void ScUndoListNames::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->InsertNameList();
}
-BOOL ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1490,10 +1490,10 @@ void ScUndoUseScenario::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteSelection( IDF_ALL, aMarkData );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL, sal_True, pDoc, &aMarkData );
// Szenario-Tabellen
- BOOL bFrame = FALSE;
+ sal_Bool bFrame = false;
SCTAB nTab = aRange.aStart.Tab();
SCTAB nEndTab = nTab;
while ( pUndoDoc->HasTable(nEndTab+1) && pUndoDoc->IsScenario(nEndTab+1) )
@@ -1503,19 +1503,19 @@ void ScUndoUseScenario::Undo()
// Flags immer
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags );
pDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
- BOOL bActive = pUndoDoc->IsActiveScenario( i );
+ sal_Bool bActive = pUndoDoc->IsActiveScenario( i );
pDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
{
pDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, IDF_ALL );
- pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,false, pDoc );
}
if ( nScenFlags & SC_SCENARIO_SHOWFRAME )
- bFrame = TRUE;
+ bFrame = sal_True;
}
// Wenn sichtbare Rahmen, dann alles painten
@@ -1545,7 +1545,7 @@ void ScUndoUseScenario::Redo()
pViewShell->InitOwnBlockMode();
}
- pDocShell->UseScenario( nTab, aName, FALSE );
+ pDocShell->UseScenario( nTab, aName, false );
EndRedo();
}
@@ -1559,14 +1559,14 @@ void ScUndoUseScenario::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (rTarget.ISA(ScTabViewTarget))
{
ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData();
return !pViewData->GetDocument()->IsScenario( pViewData->GetTabNo() );
}
- return FALSE;
+ return false;
}
@@ -1600,19 +1600,17 @@ String ScUndoSelectionStyle::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_APPLYCELLSTYLE );
}
-void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
+void ScUndoSelectionStyle::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aWorkRange( aRange );
if ( pDoc->HasAttrib( aWorkRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
if (bUndo) // bei Undo alte Daten wieder reinschubsen
@@ -1621,7 +1619,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
ScRange aCopyRange = aWorkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
}
else // bei Redo Style wieder zuweisen
{
@@ -1638,6 +1636,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aWorkRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -1647,14 +1646,14 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
void ScUndoSelectionStyle::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoSelectionStyle::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1673,16 +1672,16 @@ void ScUndoSelectionStyle::Repeat(SfxRepeatTarget& rTarget)
}
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
- rViewShell.SetStyleSheetToMarked( pStyleSheet, TRUE );
+ rViewShell.SetStyleSheetToMarked( pStyleSheet, sal_True );
}
}
-BOOL ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
-USHORT ScUndoSelectionStyle::GetId() const
+sal_uInt16 ScUndoSelectionStyle::GetId() const
{
return STR_UNDO_APPLYCELLSTYLE;
}
@@ -1730,7 +1729,7 @@ void ScUndoEnterMatrix::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aBlockRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1773,7 +1772,7 @@ void ScUndoEnterMatrix::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1793,7 +1792,7 @@ ScRange lcl_GetMultiMarkRange( const ScMarkData& rMark )
}
ScUndoIndent::ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, BOOL bIncrement ) :
+ ScDocument* pNewUndoDoc, sal_Bool bIncrement ) :
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -1808,7 +1807,7 @@ ScUndoIndent::~ScUndoIndent()
String ScUndoIndent::GetComment() const
{
- USHORT nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
+ sal_uInt16 nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
return ScGlobal::GetRscString( nId );
}
@@ -1821,7 +1820,7 @@ void ScUndoIndent::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1844,7 +1843,7 @@ void ScUndoIndent::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->ChangeIndent( bIsIncrement );
}
-BOOL ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1882,7 +1881,7 @@ void ScUndoTransliterate::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1905,7 +1904,7 @@ void ScUndoTransliterate::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->TransliterateText( nTransliterationType );
}
-BOOL ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1916,7 +1915,7 @@ BOOL ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, const USHORT* pW ) :
+ ScDocument* pNewUndoDoc, const sal_uInt16* pW ) :
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -1924,11 +1923,11 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData&
{
DBG_ASSERT( pW, "ScUndoClearItems: Which-Pointer ist 0" );
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( pW[nCount] )
++nCount;
- pWhich = new USHORT[nCount+1];
- for (USHORT i=0; i<=nCount; i++)
+ pWhich = new sal_uInt16[nCount+1];
+ for (sal_uInt16 i=0; i<=nCount; i++)
pWhich[i] = pW[i];
}
@@ -1948,7 +1947,7 @@ void ScUndoClearItems::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1971,11 +1970,11 @@ void ScUndoClearItems::Repeat(SfxRepeatTarget& rTarget)
{
ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData();
ScDocFunc aFunc(*pViewData->GetDocShell());
- aFunc.ClearItems( pViewData->GetMarkData(), pWhich, FALSE );
+ aFunc.ClearItems( pViewData->GetMarkData(), pWhich, false );
}
}
-BOOL ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2010,9 +2009,9 @@ void ScUndoRemoveBreaks::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pDoc );
if (pViewShell)
- pViewShell->UpdatePageBreakData( TRUE );
+ pViewShell->UpdatePageBreakData( sal_True );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
EndUndo();
@@ -2028,7 +2027,7 @@ void ScUndoRemoveBreaks::Redo()
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
if (pViewShell)
- pViewShell->UpdatePageBreakData( TRUE );
+ pViewShell->UpdatePageBreakData( sal_True );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
EndRedo();
@@ -2043,7 +2042,7 @@ void ScUndoRemoveBreaks::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2087,7 +2086,7 @@ void ScUndoRemoveMerge::Undo()
// There is no need to extend merge area because it's already been extended.
ScRange aRange = maOption.getSingleRange(*itr);
pDoc->DeleteAreaTab(aRange, IDF_ATTRIB);
- pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, false, pDoc);
bool bDidPaint = false;
if ( pViewShell )
@@ -2132,11 +2131,11 @@ void ScUndoRemoveMerge::Redo()
maOption.mnEndCol, maOption.mnEndRow, nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge(aRange, TRUE, FALSE);
+ pDoc->ExtendMerge(aRange, true, false);
// Paint
- BOOL bDidPaint = FALSE;
+ sal_Bool bDidPaint = false;
if ( pViewShell )
{
pViewShell->SetTabNo(nTab);
@@ -2155,7 +2154,7 @@ void ScUndoRemoveMerge::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->RemoveMerge();
}
-BOOL ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2222,8 +2221,8 @@ void ScUndoBorder::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( *pRanges, FALSE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ aMarkData.MarkFromRangeList( *pRanges, false );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -2242,7 +2241,7 @@ void ScUndoBorder::Redo()
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
pDoc->ApplySelectionFrame( aMark, pOuter, pInner );
}
@@ -2257,9 +2256,9 @@ void ScUndoBorder::Repeat(SfxRepeatTarget& /* rTarget */)
//! spaeter (wenn die Funktion aus cellsuno nach docfunc gewandert ist)
}
-BOOL ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // s.o.
+ return false; // s.o.
}
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index fd5965acda0d..208a10d437cc 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -68,7 +68,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab,
ScDocument* pNewUndoDoc, SCCOLROW nNewCnt, SCCOLROW* pNewRanges,
ScOutlineTable* pNewUndoTab,
- ScSizeMode eNewMode, USHORT nNewSizeTwips, BOOL bNewWidth ) :
+ ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, sal_Bool bNewWidth ) :
ScSimpleUndo( pNewDocShell ),
aMarkData( rMark ),
nStart( nNewStart ),
@@ -114,18 +114,13 @@ void ScUndoWidthOrHeight::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCCOLROW nPaintStart = nStart > 0 ? nStart-1 : static_cast<SCCOLROW>(0);
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
+ if ( SetViewMarkData( aMarkData ) )
nPaintStart = 0; // paint all, because of changed selection
- }
}
//! outlines from all tables?
@@ -141,14 +136,14 @@ void ScUndoWidthOrHeight::Undo()
{
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE,
- FALSE, pDoc );
+ false, pDoc );
pDoc->UpdatePageBreaks( nTab );
pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, nTab,
MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP );
}
else // Height
{
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
pDocShell->PostPaint( 0, nPaintStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT );
}
@@ -156,6 +151,7 @@ void ScUndoWidthOrHeight::Undo()
DoSdrUndoAction( pDrawUndo, pDoc );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->UpdateScrollBars();
@@ -172,19 +168,14 @@ void ScUndoWidthOrHeight::Redo()
{
BeginRedo();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
-
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
- bPaintAll = TRUE; // paint all, because of changed selection
- }
+ if ( SetViewMarkData( aMarkData ) )
+ bPaintAll = sal_True; // paint all, because of changed selection
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -192,7 +183,7 @@ void ScUndoWidthOrHeight::Redo()
pViewShell->SetTabNo( nStartTab );
// SetWidthOrHeight aendert aktuelle Tabelle !
- pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData );
+ pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, false, true, &aMarkData );
}
// paint grid if selection was changed directly at the MarkData
@@ -205,10 +196,10 @@ void ScUndoWidthOrHeight::Redo()
void ScUndoWidthOrHeight::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, sal_True );
}
-BOOL ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index eb3987ff42d9..446e3dede1c6 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -95,8 +95,8 @@ TYPEINIT1(ScUndoUpdateAreaLink, SfxUndoAction);
ScUndoDeleteContents::ScUndoDeleteContents(
ScDocShell* pNewDocShell,
const ScMarkData& rMark, const ScRange& rRange,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
- USHORT nNewFlags, BOOL bObjects )
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
+ sal_uInt16 nNewFlags, sal_Bool bObjects )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -147,19 +147,17 @@ void ScUndoDeleteContents::SetChangeTrack()
//----------------------------------------------------------------------------
-void ScUndoDeleteContents::DoChange( const BOOL bUndo )
+void ScUndoDeleteContents::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if (bUndo) // nur Undo
{
- USHORT nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren
+ sal_uInt16 nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren
if (nFlags & IDF_CONTENTS) // (es sind nur die richtigen ins UndoDoc kopiert worden)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -191,13 +189,14 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
aMarkData.MarkToMulti();
RedoSdrUndoAction( pDrawUndo );
// do not delete objects and note captions, they have been removed via drawing undo
- USHORT nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pDoc->DeleteSelection( nRedoFlags, aMarkData );
aMarkData.MarkToSimple();
SetChangeTrack();
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -215,7 +214,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
void ScUndoDeleteContents::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
// #i97876# Spreadsheet data changes are not notified
@@ -234,7 +233,7 @@ void ScUndoDeleteContents::Undo()
void ScUndoDeleteContents::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
// #i97876# Spreadsheet data changes are not notified
@@ -253,13 +252,13 @@ void ScUndoDeleteContents::Redo()
void ScUndoDeleteContents::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -277,8 +276,8 @@ ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc,
- USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink )
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc,
+ sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -320,7 +319,7 @@ void ScUndoFillTable::SetChangeTrack()
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
ScRange aWorkRange(aRange);
nStartChangeAction = 0;
- ULONG nTmpAction;
+ sal_uLong nTmpAction;
for ( SCTAB i = 0; i < nTabCount; i++ )
{
if (i != nSrcTab && aMarkData.GetTableSelect(i))
@@ -341,13 +340,11 @@ void ScUndoFillTable::SetChangeTrack()
//----------------------------------------------------------------------------
-void ScUndoFillTable::DoChange( const BOOL bUndo )
+void ScUndoFillTable::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
if (bUndo) // nur Undo
{
@@ -382,6 +379,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
// CellContentChanged kommt mit der Markierung
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -398,7 +396,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
void ScUndoFillTable::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -408,7 +406,7 @@ void ScUndoFillTable::Undo()
void ScUndoFillTable::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -424,7 +422,7 @@ void ScUndoFillTable::Repeat(SfxRepeatTarget& rTarget)
//----------------------------------------------------------------------------
-BOOL ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -441,7 +439,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
const ScPatternAttr* pNewApply,
const SvxBoxItem* pNewOuter, const SvxBoxInfoItem* pNewInner )
//
@@ -491,19 +489,17 @@ ScEditDataArray* ScUndoSelectionAttr::GetDataArray()
//----------------------------------------------------------------------------
-void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
+void ScUndoSelectionAttr::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aEffRange( aRange );
if ( pDoc->HasAttrib( aEffRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
pDoc->ExtendMerge( aEffRange );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aEffRange );
ChangeEditData(bUndo);
@@ -526,6 +522,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
pDoc->ApplySelectionFrame( aMarkData, pLineOuter, pLineInner );
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aEffRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -556,7 +553,7 @@ void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
void ScUndoSelectionAttr::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -566,7 +563,7 @@ void ScUndoSelectionAttr::Undo()
void ScUndoSelectionAttr::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -579,16 +576,16 @@ void ScUndoSelectionAttr::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (pLineOuter)
- rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, TRUE );
+ rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, sal_True );
else
- rViewShell.ApplySelectionPattern( *pApplyPattern, TRUE );
+ rViewShell.ApplySelectionPattern( *pApplyPattern, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -606,7 +603,7 @@ ScUndoAutoFill::ScUndoAutoFill( ScDocShell* pNewDocShell,
ScDocument* pNewUndoDoc, const ScMarkData& rMark,
FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd,
double fNewStartValue, double fNewStepValue, double fNewMaxValue,
- USHORT nMaxShIndex )
+ sal_uInt16 nMaxShIndex )
//
: ScBlockUndo( pNewDocShell, rRange, SC_UNDO_AUTOHEIGHT ),
//
@@ -687,12 +684,12 @@ void ScUndoAutoFill::Undo()
aWorkRange.aStart.SetTab(nTab);
aWorkRange.aEnd.SetTab(nTab);
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
pDoc->DeleteAreaTab( aWorkRange, IDF_AUTOFILL );
- pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, pDoc );
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags );
}
}
@@ -791,17 +788,17 @@ void ScUndoAutoFill::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (eFillCmd==FILL_SIMPLE)
- rViewShell.FillSimple( eFillDir, TRUE );
+ rViewShell.FillSimple( eFillDir, sal_True );
else
rViewShell.FillSeries( eFillDir, eFillCmd, eFillDateCmd,
- fStartValue, fStepValue, fMaxValue, TRUE );
+ fStartValue, fStepValue, fMaxValue, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -891,7 +888,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const
if (bUndo && mpUndoDoc)
{
pDoc->DeleteAreaTab( aRange, IDF_CONTENTS|IDF_NOCAPTIONS );
- mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
}
// redo -> merge contents again
@@ -949,15 +946,15 @@ void ScUndoMerge::Repeat(SfxRepeatTarget& rTarget)
if (rTarget.ISA(ScTabViewTarget))
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
- BOOL bCont = FALSE;
- rViewShell.MergeCells( FALSE, bCont, TRUE );
+ sal_Bool bCont = false;
+ rViewShell.MergeCells( false, bCont, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -972,7 +969,7 @@ BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoAutoFormat::ScUndoAutoFormat( ScDocShell* pNewDocShell,
const ScRange& rRange, ScDocument* pNewUndoDoc,
- const ScMarkData& rMark, BOOL bNewSize, USHORT nNewFormatNo )
+ const ScMarkData& rMark, sal_Bool bNewSize, sal_uInt16 nNewFormatNo )
//
: ScBlockUndo( pNewDocShell, rRange, bNewSize ? SC_UNDO_MANUALHEIGHT : SC_UNDO_AUTOHEIGHT ),
//
@@ -1010,7 +1007,7 @@ void ScUndoAutoFormat::Undo()
// Attribute
// pDoc->DeleteAreaTab( aBlockRange, IDF_ATTRIB );
-// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, FALSE, pDoc );
+// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_False, pDoc );
SCTAB nTabCount = pDoc->GetTableCount();
pDoc->DeleteArea( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
@@ -1019,7 +1016,7 @@ void ScUndoAutoFormat::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pDoc, &aMarkData );
// Zellhoehen und -breiten (IDF_NONE)
if (bSize)
@@ -1032,9 +1029,9 @@ void ScUndoAutoFormat::Undo()
SCTAB nEndZ = aBlockRange.aEnd.Tab();
pUndoDoc->CopyToDocument( nStartX, 0, 0, nEndX, MAXROW, nTabCount-1,
- IDF_NONE, FALSE, pDoc, &aMarkData );
+ IDF_NONE, false, pDoc, &aMarkData );
pUndoDoc->CopyToDocument( 0, nStartY, 0, MAXCOL, nEndY, nTabCount-1,
- IDF_NONE, FALSE, pDoc, &aMarkData );
+ IDF_NONE, false, pDoc, &aMarkData );
pDocShell->PostPaint( 0, 0, nStartZ, MAXCOL, MAXROW, nEndZ,
PAINT_GRID | PAINT_LEFT | PAINT_TOP, SC_PF_LINES );
}
@@ -1084,7 +1081,7 @@ void ScUndoAutoFormat::Redo()
nPPTY = ScGlobal::nScreenPPTY;
}
- BOOL bFormula = FALSE; //! merken
+ sal_Bool bFormula = false; //! merken
for (SCTAB nTab=nStartZ; nTab<=nEndZ; nTab++)
{
@@ -1096,22 +1093,22 @@ void ScUndoAutoFormat::Redo()
// wie SC_SIZE_VISOPT
for (SCROW nRow=nStartY; nRow<=nEndY; nRow++)
{
- BYTE nOld = pDoc->GetRowFlags(nRow,nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab);
bool bHidden = pDoc->RowHidden(nRow, nTab);
if ( !bHidden && ( nOld & CR_MANUALSIZE ) )
pDoc->SetRowFlags( nRow, nTab, nOld & ~CR_MANUALSIZE );
}
pDoc->SetOptimalHeight( nStartY, nEndY, nTab, 0, &aVirtDev,
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
for (SCCOL nCol=nStartX; nCol<=nEndX; nCol++)
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab,
+ sal_uInt16 nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab,
&aVirtDev, nPPTX, nPPTY, aZoomX, aZoomY, bFormula,
&aDestMark );
pDoc->SetColWidth( nCol, nTab, nThisSize );
- pDoc->ShowCol( nCol, nTab, TRUE );
+ pDoc->ShowCol( nCol, nTab, sal_True );
}
}
@@ -1131,13 +1128,13 @@ void ScUndoAutoFormat::Redo()
void ScUndoAutoFormat::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1229,8 +1226,7 @@ void ScUndoReplace::Undo()
DBG_ASSERT(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL,
"ScUndoReplace:: Falscher Modus");
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
//! markierte Tabellen
//! Bereich merken ?
@@ -1238,10 +1234,10 @@ void ScUndoReplace::Undo()
// Undo-Dokument hat keine Zeilen-/Spalten-Infos, also mit bColRowFlags = FALSE
// kopieren, um Outline-Gruppen nicht kaputtzumachen.
- USHORT nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
+ sal_uInt16 nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
pUndoDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, MAXTAB,
- nUndoFlags, FALSE, pDoc, NULL, FALSE ); // ohne Row-Flags
+ nUndoFlags, false, pDoc, NULL, false ); // ohne Row-Flags
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetPattern() &&
@@ -1252,12 +1248,12 @@ void ScUndoReplace::Undo()
pSearchItem->SetReplaceString(aTempStr);
pDoc->ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- aMarkData, TRUE);
+ aMarkData, sal_True);
pSearchItem->SetReplaceString(pSearchItem->GetSearchString());
pSearchItem->SetSearchString(aTempStr);
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetCellType() == SVX_SEARCHIN_NOTE)
@@ -1268,7 +1264,7 @@ void ScUndoReplace::Undo()
pNote->SetText( aCursorPos, aUndoStr );
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
}
else
{
@@ -1279,7 +1275,7 @@ void ScUndoReplace::Undo()
pDoc->SetString( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aUndoStr );
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
pDocShell->PostPaintGridAll();
}
@@ -1302,14 +1298,14 @@ void ScUndoReplace::Redo()
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
if (pUndoDoc)
{
if (pViewShell)
{
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
- pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
+ pViewShell->SearchAndReplace( pSearchItem, false, sal_True );
}
}
else if (pSearchItem->GetPattern() &&
@@ -1317,12 +1313,12 @@ void ScUndoReplace::Redo()
{
pDoc->ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- aMarkData, TRUE);
+ aMarkData, sal_True);
pDocShell->PostPaintGridAll();
}
else
if (pViewShell)
- pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
+ pViewShell->SearchAndReplace( pSearchItem, false, sal_True );
SetChangeTrack();
@@ -1335,13 +1331,13 @@ void ScUndoReplace::Redo()
void ScUndoReplace::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, TRUE, FALSE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, sal_True, false );
}
//----------------------------------------------------------------------------
-BOOL ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1361,7 +1357,7 @@ ScUndoTabOp::ScUndoTabOp( ScDocShell* pNewDocShell,
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMd )
+ sal_uInt8 nMd )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -1400,12 +1396,12 @@ void ScUndoTabOp::Undo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aRange );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aRange );
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aRange,IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
pDocShell->PostPaint( aRange, PAINT_GRID, nExtFlags );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1430,7 +1426,7 @@ void ScUndoTabOp::Redo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->TabOp( aParam, FALSE);
+ pViewShell->TabOp( aParam, false);
EndRedo();
}
@@ -1445,9 +1441,9 @@ void ScUndoTabOp::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1530,14 +1526,12 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo
ScDocument* pDoc = pDocShell->GetDocument();
ShowTable( rCursorPos.Tab() );
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
SCTAB nTabCount = pDoc->GetTableCount();
// Undo/Redo-doc has only selected tables
- BOOL bMulti = aMarkData.IsMultiMarked();
+ sal_Bool bMulti = aMarkData.IsMultiMarked();
pRefDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, nTabCount-1,
IDF_CONTENTS, bMulti, pDoc, &aMarkData );
@@ -1579,13 +1573,13 @@ void ScUndoConversion::Redo()
void ScUndoConversion::Repeat( SfxRepeatTarget& rTarget )
{
if( rTarget.ISA( ScTabViewTarget ) )
- ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
{
return rTarget.ISA( ScTabViewTarget );
}
@@ -1600,7 +1594,7 @@ BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag) :
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag) :
ScSimpleUndo( pNewDocShell ),
aMarkData ( rMark ),
pUndoDoc ( pNewUndoDoc ),
@@ -1639,9 +1633,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
ShowTable(aRange);
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aCopyRange = aRange;
SCTAB nTabCount = pDoc->GetTableCount();
@@ -1650,6 +1642,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
pRefDoc->CopyToDocument( aCopyRange, nFlags, bMulti, pDoc, &aMarkData );
pDocShell->PostPaint( aRange, PAINT_GRID);
pDocShell->PostDataChanged();
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
pViewShell->CellContentChanged();
}
@@ -1679,7 +1672,7 @@ void ScUndoRefConversion::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->DoRefConversion();
}
-BOOL ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1724,11 +1717,11 @@ void ScUndoRefreshLink::Undo()
{
BeginUndo();
- BOOL bMakeRedo = !pRedoDoc;
+ sal_Bool bMakeRedo = !pRedoDoc;
if (bMakeRedo)
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
@@ -1738,11 +1731,11 @@ void ScUndoRefreshLink::Undo()
if (bMakeRedo)
{
if (bFirst)
- pRedoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pRedoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
else
- pRedoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE );
- bFirst = FALSE;
- pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pRedoDoc);
+ pRedoDoc->AddUndoTab( nTab, nTab, true, true );
+ bFirst = false;
+ pDoc->CopyToDocument(aRange, IDF_ALL, false, pRedoDoc);
pRedoDoc->SetLink( nTab,
pDoc->GetLinkMode(nTab),
pDoc->GetLinkDoc(nTab),
@@ -1753,7 +1746,7 @@ void ScUndoRefreshLink::Undo()
}
pDoc->DeleteAreaTab( aRange,IDF_ALL );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL, false, pDoc );
pDoc->SetLink( nTab, pUndoDoc->GetLinkMode(nTab), pUndoDoc->GetLinkDoc(nTab),
pUndoDoc->GetLinkFlt(nTab), pUndoDoc->GetLinkOpt(nTab),
pUndoDoc->GetLinkTab(nTab),
@@ -1782,7 +1775,7 @@ void ScUndoRefreshLink::Redo()
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
pDoc->DeleteAreaTab( aRange, IDF_ALL );
- pRedoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aRange, IDF_ALL, false, pDoc );
pDoc->SetLink( nTab,
pRedoDoc->GetLinkMode(nTab),
pRedoDoc->GetLinkDoc(nTab),
@@ -1808,9 +1801,9 @@ void ScUndoRefreshLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1821,8 +1814,8 @@ ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDo
const String& rSrc, const ScRange& rDest )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1846,7 +1839,7 @@ ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell,
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefresh )
+ sal_uLong nRefresh )
//
: ScSimpleUndo ( pShell ),
//
@@ -1900,11 +1893,11 @@ void ScUndoInsertAreaLink::Redo()
ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions,
aAreaName, aRange.aStart, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aRange );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
@@ -1920,9 +1913,9 @@ void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1936,7 +1929,7 @@ BOOL ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoRemoveAreaLink::ScUndoRemoveAreaLink( ScDocShell* pShell,
const String& rDoc, const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefresh )
+ sal_uLong nRefresh )
//
: ScSimpleUndo ( pShell ),
//
@@ -1974,11 +1967,11 @@ void ScUndoRemoveAreaLink::Undo()
ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions,
aAreaName, aRange.aStart, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aRange );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
@@ -2010,9 +2003,9 @@ void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -2025,10 +2018,10 @@ BOOL ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell,
const String& rOldD, const String& rOldF, const String& rOldO,
- const String& rOldA, const ScRange& rOldR, ULONG nOldRD,
+ const String& rOldA, const ScRange& rOldR, sal_uLong nOldRD,
const String& rNewD, const String& rNewF, const String& rNewO,
- const String& rNewA, const ScRange& rNewR, ULONG nNewRD,
- ScDocument* pUndo, ScDocument* pRedo, BOOL bDoInsert )
+ const String& rNewA, const ScRange& rNewR, sal_uLong nNewRD,
+ ScDocument* pUndo, ScDocument* pRedo, sal_Bool bDoInsert )
//
: ScSimpleUndo( pShell ),
//
@@ -2071,7 +2064,7 @@ String ScUndoUpdateAreaLink::GetComment() const
//----------------------------------------------------------------------------
-void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
+void ScUndoUpdateAreaLink::DoChange( const sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -2085,13 +2078,13 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
{
pDoc->FitBlock( aNewRange, aOldRange );
pDoc->DeleteAreaTab( aOldRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
}
else
@@ -2100,18 +2093,18 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
{
pDoc->FitBlock( aOldRange, aNewRange );
pDoc->DeleteAreaTab( aNewRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
}
ScRange aWorkRange( aNewRange.aStart, ScAddress( nEndX, nEndY, nEndZ ) );
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
// Paint
@@ -2145,7 +2138,7 @@ void ScUndoUpdateAreaLink::Undo()
pLink->SetRefreshDelay( nOldRefresh );
}
- DoChange(TRUE);
+ DoChange(sal_True);
}
@@ -2164,7 +2157,7 @@ void ScUndoUpdateAreaLink::Redo()
pLink->SetRefreshDelay( nNewRefresh );
}
- DoChange(FALSE);
+ DoChange(false);
}
@@ -2178,9 +2171,9 @@ void ScUndoUpdateAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index a57b0b137a9d..9743cf42c193 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -80,7 +80,7 @@ TYPEINIT1(ScUndoRangeNames, ScSimpleUndo);
ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, BOOL bAutomatic ) :
+ const ScPatternAttr* pApplyPat, sal_Bool bAutomatic ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
@@ -107,7 +107,7 @@ String ScUndoCursorAttr::GetComment() const
{
//! eigener Text fuer automatische Attributierung
- USHORT nId = STR_UNDO_CURSORATTR; // "Attribute"
+ sal_uInt16 nId = STR_UNDO_CURSORATTR; // "Attribute"
return ScGlobal::GetRscString( nId );
}
@@ -120,7 +120,7 @@ void ScUndoCursorAttr::SetEditData( EditTextObject* pOld, EditTextObject* pNew )
void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const shared_ptr<EditTextObject>& pEditData ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, TRUE );
+ pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, true );
ScBaseCell* pCell;
pDoc->GetCell(nCol, nRow, nTab, pCell);
@@ -131,16 +131,16 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
pViewShell->AdjustBlockHeight();
}
const SfxItemSet& rApplySet = pApplyPattern->GetItemSet();
- BOOL bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, TRUE ) != SFX_ITEM_DEFAULT ||
- rApplySet.GetItemState( ATTR_CONDITIONAL, TRUE ) != SFX_ITEM_DEFAULT );
- BOOL bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) != SFX_ITEM_DEFAULT );
+ sal_Bool bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, sal_True ) != SFX_ITEM_DEFAULT ||
+ rApplySet.GetItemState( ATTR_CONDITIONAL, sal_True ) != SFX_ITEM_DEFAULT );
+ sal_Bool bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) != SFX_ITEM_DEFAULT );
- USHORT nFlags = SC_PF_TESTMERGE;
+ sal_uInt16 nFlags = SC_PF_TESTMERGE;
if (bPaintExt)
nFlags |= SC_PF_LINES;
if (bPaintRows)
@@ -179,7 +179,7 @@ void ScUndoCursorAttr::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->ApplySelectionPattern( *pApplyPattern );
}
-BOOL ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -193,7 +193,7 @@ BOOL ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
SCTAB nNewCount, SCTAB* pNewTabs, ScBaseCell** ppOldData,
- BOOL* pHasForm, ULONG* pOldForm,
+ sal_Bool* pHasForm, sal_uLong* pOldForm,
const String& rNewStr, EditTextObject* pObj ) :
ScSimpleUndo( pNewDocShell ),
aNewString( rNewStr ),
@@ -212,7 +212,7 @@ ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell,
ScUndoEnterData::~ScUndoEnterData()
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (ppOldCells[i])
ppOldCells[i]->Delete();
delete[] ppOldCells;
@@ -233,14 +233,14 @@ void ScUndoEnterData::DoChange() const
{
// Zeilenhoehe anpassen
//! nur wenn noetig (alte oder neue EditZelle, oder Attribute) ??
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pDocShell->AdjustRowHeight( nRow, nRow, pTabs[i] );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
}
pDocShell->PostDataChanged();
@@ -253,10 +253,10 @@ void ScUndoEnterData::SetChangeTrack()
{
nEndChangeAction = pChangeTrack->GetActionMax() + 1;
ScAddress aPos( nCol, nRow, nTab );
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
aPos.SetTab( pTabs[i] );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if ( pHasFormat && pOldFormats )
{
if ( pHasFormat[i] )
@@ -276,7 +276,7 @@ void ScUndoEnterData::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScBaseCell* pNewCell = ppOldCells[i] ? ppOldCells[i]->CloneWithoutNote( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( nCol, nRow, pTabs[i], pNewCell );
@@ -290,14 +290,14 @@ void ScUndoEnterData::Undo()
{
ScPatternAttr aPattern( *pDoc->GetPattern( nCol, nRow, pTabs[i] ) );
aPattern.GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
- pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, TRUE );
+ pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, sal_True );
}
}
pDocShell->PostPaintCell( nCol, nRow, pTabs[i] );
}
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<ULONG>(nCount) )
+ if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<sal_uLong>(nCount) )
pChangeTrack->Undo( nEndChangeAction - nCount + 1, nEndChangeAction );
DoChange();
@@ -308,7 +308,7 @@ void ScUndoEnterData::Undo()
if ( pModelObj && pModelObj->HasChangesListeners() )
{
ScRangeList aChangeRanges;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) );
}
@@ -321,7 +321,7 @@ void ScUndoEnterData::Redo()
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if (pNewEditData)
pDoc->PutCell( nCol, nRow, pTabs[i], new ScEditCell( pNewEditData,
@@ -341,7 +341,7 @@ void ScUndoEnterData::Redo()
if ( pModelObj && pModelObj->HasChangesListeners() )
{
ScRangeList aChangeRanges;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) );
}
@@ -358,7 +358,7 @@ void ScUndoEnterData::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -370,7 +370,7 @@ BOOL ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoEnterValue::ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, double nVal, BOOL bHeight ) :
+ ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight ) :
ScSimpleUndo( pNewDocShell ),
aPos ( rNewPos ),
pOldCell ( pUndoCell ),
@@ -442,9 +442,9 @@ void ScUndoEnterValue::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -454,7 +454,7 @@ BOOL ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//
ScUndoPutCell::ScUndoPutCell( ScDocShell* pNewDocShell, const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight ) :
+ ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight ) :
ScSimpleUndo( pNewDocShell ),
aPos ( rNewPos ),
pOldCell ( pUndoCell ),
@@ -531,9 +531,9 @@ void ScUndoPutCell::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -544,7 +544,7 @@ BOOL ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoPageBreak::ScUndoPageBreak( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
- BOOL bNewColumn, BOOL bNewInsert ) :
+ sal_Bool bNewColumn, sal_Bool bNewInsert ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
@@ -572,19 +572,19 @@ String ScUndoPageBreak::GetComment() const
) );
}
-void ScUndoPageBreak::DoChange( BOOL bInsertP ) const
+void ScUndoPageBreak::DoChange( sal_Bool bInsertP ) const
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
if (bInsertP)
- pViewShell->InsertPageBreak(bColumn, FALSE);
+ pViewShell->InsertPageBreak(bColumn, false);
else
- pViewShell->DeletePageBreak(bColumn, FALSE);
+ pViewShell->DeletePageBreak(bColumn, false);
pDocShell->GetDocument()->InvalidatePageBreaks(nTab);
}
@@ -611,13 +611,13 @@ void ScUndoPageBreak::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bInsert)
- rViewShell.InsertPageBreak(bColumn, TRUE);
+ rViewShell.InsertPageBreak(bColumn, sal_True);
else
- rViewShell.DeletePageBreak(bColumn, TRUE);
+ rViewShell.DeletePageBreak(bColumn, sal_True);
}
}
-BOOL ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -628,7 +628,7 @@ BOOL ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoPrintZoom::ScUndoPrintZoom( ScDocShell* pNewDocShell,
- SCTAB nT, USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP ) :
+ SCTAB nT, sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP ) :
ScSimpleUndo( pNewDocShell ),
nTab( nT ),
nOldScale( nOS ),
@@ -647,10 +647,10 @@ String ScUndoPrintZoom::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_PRINTSCALE );
}
-void ScUndoPrintZoom::DoChange( BOOL bUndo )
+void ScUndoPrintZoom::DoChange( sal_Bool bUndo )
{
- USHORT nScale = bUndo ? nOldScale : nNewScale;
- USHORT nPages = bUndo ? nOldPages : nNewPages;
+ sal_uInt16 nScale = bUndo ? nOldScale : nNewScale;
+ sal_uInt16 nPages = bUndo ? nOldPages : nNewPages;
ScDocument* pDoc = pDocShell->GetDocument();
String aStyleName = pDoc->GetPageStyle( nTab );
@@ -671,14 +671,14 @@ void ScUndoPrintZoom::DoChange( BOOL bUndo )
void ScUndoPrintZoom::Undo()
{
BeginUndo();
- DoChange(TRUE);
+ DoChange(sal_True);
EndUndo();
}
void ScUndoPrintZoom::Redo()
{
BeginRedo();
- DoChange(FALSE);
+ DoChange(false);
EndRedo();
}
@@ -692,7 +692,7 @@ void ScUndoPrintZoom::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -751,7 +751,7 @@ void ScUndoThesaurus::SetChangeTrack( ScBaseCell* pOldCell )
nEndChangeAction = 0;
}
-void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
+void ScUndoThesaurus::DoChange( sal_Bool bUndo, const String& rStr,
const EditTextObject* pTObj )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -760,7 +760,7 @@ void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
}
if (pTObj)
@@ -798,7 +798,7 @@ void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
void ScUndoThesaurus::Undo()
{
BeginUndo();
- DoChange( TRUE, aUndoStr, pUndoTObject );
+ DoChange( sal_True, aUndoStr, pUndoTObject );
ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
if ( pChangeTrack )
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
@@ -808,17 +808,17 @@ void ScUndoThesaurus::Undo()
void ScUndoThesaurus::Redo()
{
BeginRedo();
- DoChange( FALSE, aRedoStr, pRedoTObject );
+ DoChange( false, aRedoStr, pRedoTObject );
EndRedo();
}
void ScUndoThesaurus::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( sal_True );
}
-BOOL ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -883,9 +883,9 @@ void ScUndoReplaceNote::Repeat( SfxRepeatTarget& /*rTarget*/ )
{
}
-BOOL ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
+sal_Bool ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
{
- return FALSE;
+ return false;
}
String ScUndoReplaceNote::GetComment() const
@@ -955,9 +955,9 @@ void ScUndoShowHideNote::Repeat( SfxRepeatTarget& /*rTarget*/ )
{
}
-BOOL ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
+sal_Bool ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
{
- return FALSE;
+ return false;
}
String ScUndoShowHideNote::GetComment() const
@@ -983,7 +983,7 @@ ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell,
bIsDelete = ( pOperation == NULL );
if (!bIsDelete)
{
- nAction = (USHORT) pOperation->GetOperation();
+ nAction = (sal_uInt16) pOperation->GetOperation();
aPos = pOperation->GetPos();
}
}
@@ -996,7 +996,7 @@ ScUndoDetective::~ScUndoDetective()
String ScUndoDetective::GetComment() const
{
- USHORT nId = STR_UNDO_DETDELALL;
+ sal_uInt16 nId = STR_UNDO_DETDELALL;
if ( !bIsDelete )
switch ( (ScDetOpType) nAction )
{
@@ -1030,7 +1030,7 @@ void ScUndoDetective::Undo()
ScDetOpList* pList = pDoc->GetDetOpList();
if (pList && pList->Count())
{
- USHORT nPos = pList->Count() - 1;
+ sal_uInt16 nPos = pList->Count() - 1;
ScDetOpData* pData = (*pList)[nPos];
if ( pData->GetOperation() == (ScDetOpType) nAction && pData->GetPos() == aPos )
pList->DeleteAndDestroy( nPos, 1 );
@@ -1073,9 +1073,9 @@ void ScUndoDetective::Repeat(SfxRepeatTarget& /* rTarget */)
// hammanich
}
-BOOL ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -1102,17 +1102,17 @@ String ScUndoRangeNames::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_RANGENAMES );
}
-void ScUndoRangeNames::DoChange( BOOL bUndo )
+void ScUndoRangeNames::DoChange( sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
if ( bUndo )
pDoc->SetRangeName( new ScRangeName( *pOldRanges ) );
else
pDoc->SetRangeName( new ScRangeName( *pNewRanges ) );
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
}
@@ -1120,14 +1120,14 @@ void ScUndoRangeNames::DoChange( BOOL bUndo )
void ScUndoRangeNames::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoRangeNames::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1136,9 +1136,9 @@ void ScUndoRangeNames::Repeat(SfxRepeatTarget& /* rTarget */)
// hammanich
}
-BOOL ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 83d37fda9e62..dc23ff8f6aeb 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -85,8 +85,8 @@ TYPEINIT1(ScUndoDataForm, SfxUndoAction); // amelia
ScUndoDoOutline::ScUndoDoOutline( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
- ScDocument* pNewUndoDoc, BOOL bNewColumns,
- USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow ) :
+ ScDocument* pNewUndoDoc, sal_Bool bNewColumns,
+ sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow ) :
ScSimpleUndo( pNewDocShell ),
nStart( nNewStart ),
nEnd( nNewEnd ),
@@ -127,17 +127,17 @@ void ScUndoDoOutline::Undo()
// inverse Funktion ausfuehren
if (bShow)
- pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE, FALSE );
+ pViewShell->HideOutline( bColumns, nLevel, nEntry, false, false );
else
- pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE, FALSE );
+ pViewShell->ShowOutline( bColumns, nLevel, nEntry, false, false );
// Original Spalten-/Zeilenstatus
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
@@ -159,9 +159,9 @@ void ScUndoDoOutline::Redo()
pViewShell->SetTabNo( nTab );
if (bShow)
- pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE );
+ pViewShell->ShowOutline( bColumns, nLevel, nEntry, false );
else
- pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE );
+ pViewShell->HideOutline( bColumns, nLevel, nEntry, false );
EndRedo();
}
@@ -170,9 +170,9 @@ void ScUndoDoOutline::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
//
@@ -182,7 +182,7 @@ BOOL ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoMakeOutline::ScUndoMakeOutline( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScOutlineTable* pNewUndoTab, BOOL bNewColumns, BOOL bNewMake ) :
+ ScOutlineTable* pNewUndoTab, sal_Bool bNewColumns, sal_Bool bNewMake ) :
ScSimpleUndo( pNewDocShell ),
aBlockStart( nStartX, nStartY, nStartZ ),
aBlockEnd( nEndX, nEndY, nEndZ ),
@@ -234,9 +234,9 @@ void ScUndoMakeOutline::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd );
if (bMake)
- pViewShell->MakeOutline( bColumns, FALSE );
+ pViewShell->MakeOutline( bColumns, false );
else
- pViewShell->RemoveOutline( bColumns, FALSE );
+ pViewShell->RemoveOutline( bColumns, false );
pDocShell->PostPaint(0,0,aBlockStart.Tab(),MAXCOL,MAXROW,aBlockEnd.Tab(),PAINT_GRID);
@@ -250,13 +250,13 @@ void ScUndoMakeOutline::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bMake)
- rViewShell.MakeOutline( bColumns, TRUE );
+ rViewShell.MakeOutline( bColumns, sal_True );
else
- rViewShell.RemoveOutline( bColumns, TRUE );
+ rViewShell.RemoveOutline( bColumns, sal_True );
}
}
-BOOL ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -268,7 +268,7 @@ BOOL ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoOutlineLevel::ScUndoOutlineLevel( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, USHORT nNewLevel ) :
+ sal_Bool bNewColumns, sal_uInt16 nNewLevel ) :
ScSimpleUndo( pNewDocShell ),
nStart( nNewStart ),
nEnd( nNewEnd ),
@@ -306,9 +306,9 @@ void ScUndoOutlineLevel::Undo()
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -335,7 +335,7 @@ void ScUndoOutlineLevel::Redo()
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );
- pViewShell->SelectLevel( bColumns, nLevel, FALSE );
+ pViewShell->SelectLevel( bColumns, nLevel, false );
EndRedo();
}
@@ -343,10 +343,10 @@ void ScUndoOutlineLevel::Redo()
void ScUndoOutlineLevel::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, sal_True );
}
-BOOL ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -358,7 +358,7 @@ BOOL ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoOutlineBlock::ScUndoOutlineBlock( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, BOOL bNewShow ) :
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, sal_Bool bNewShow ) :
ScSimpleUndo( pNewDocShell ),
aBlockStart( nStartX, nStartY, nStartZ ),
aBlockEnd( nEndX, nEndY, nEndZ ),
@@ -402,7 +402,7 @@ void ScUndoOutlineBlock::Undo()
if (!bShow)
{ // Groesse des ausgeblendeten Blocks
- USHORT nLevel;
+ sal_uInt16 nLevel;
pUndoTable->GetColArray()->FindTouchedLevel( nStartCol, nEndCol, nLevel );
pUndoTable->GetColArray()->ExtendBlock( nLevel, nStartCol, nEndCol );
pUndoTable->GetRowArray()->FindTouchedLevel( nStartRow, nEndRow, nLevel );
@@ -410,8 +410,8 @@ void ScUndoOutlineBlock::Undo()
}
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -434,9 +434,9 @@ void ScUndoOutlineBlock::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd );
if (bShow)
- pViewShell->ShowMarkedOutlines( FALSE );
+ pViewShell->ShowMarkedOutlines( false );
else
- pViewShell->HideMarkedOutlines( FALSE );
+ pViewShell->HideMarkedOutlines( false );
EndRedo();
}
@@ -448,13 +448,13 @@ void ScUndoOutlineBlock::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bShow)
- rViewShell.ShowMarkedOutlines( TRUE );
+ rViewShell.ShowMarkedOutlines( sal_True );
else
- rViewShell.HideMarkedOutlines( TRUE );
+ rViewShell.HideMarkedOutlines( sal_True );
}
}
-BOOL ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -505,8 +505,8 @@ void ScUndoRemoveAllOutlines::Undo()
SCROW nStartRow = aBlockStart.Row();
SCROW nEndRow = aBlockEnd.Row();
- pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -534,7 +534,7 @@ void ScUndoRemoveAllOutlines::Redo()
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );
- pViewShell->RemoveAllOutlines( FALSE );
+ pViewShell->RemoveAllOutlines( false );
EndRedo();
}
@@ -542,10 +542,10 @@ void ScUndoRemoveAllOutlines::Redo()
void ScUndoRemoveAllOutlines::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( sal_True );
}
-BOOL ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -601,9 +601,9 @@ void ScUndoAutoOutline::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -636,7 +636,7 @@ void ScUndoAutoOutline::Redo()
ScRange aRange( aBlockStart.Col(), aBlockStart.Row(), nTab,
aBlockEnd.Col(), aBlockEnd.Row(), nTab );
ScOutlineDocFunc aFunc( *pDocShell );
- aFunc.AutoOutline( aRange, FALSE, FALSE );
+ aFunc.AutoOutline( aRange, false, false );
// auf der View markieren
// Wenn's beim Aufruf eine Mehrfachselektion war, ist es jetzt der
@@ -651,10 +651,10 @@ void ScUndoAutoOutline::Redo()
void ScUndoAutoOutline::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( sal_True );
}
-BOOL ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -725,9 +725,9 @@ void ScUndoSubTotals::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -740,9 +740,9 @@ void ScUndoSubTotals::Undo()
pDoc->DeleteAreaTab( 0,aParam.nRow1+1, MAXCOL,aParam.nRow2, nTab, IDF_ALL );
pUndoDoc->CopyToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_NONE, FALSE, pDoc ); // Flags
+ IDF_NONE, false, pDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
@@ -750,7 +750,7 @@ void ScUndoSubTotals::Undo()
if (pUndoRange)
pDoc->SetRangeName( new ScRangeName( *pUndoRange ) );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
if ( nVisTab != nTab )
@@ -774,7 +774,7 @@ void ScUndoSubTotals::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
- pViewShell->DoSubTotals( aParam, FALSE );
+ pViewShell->DoSubTotals( aParam, false );
EndRedo();
}
@@ -783,9 +783,9 @@ void ScUndoSubTotals::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -794,7 +794,7 @@ BOOL ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell,
SCTAB nNewTab, const ScSortParam& rParam,
- BOOL bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
+ sal_Bool bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
const ScRange* pDest ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
@@ -803,11 +803,11 @@ ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell,
bRepeatQuery( bQuery ),
pUndoDoc( pNewUndoDoc ),
pUndoDB( pNewUndoDB ),
- bDestArea( FALSE )
+ bDestArea( false )
{
if ( pDest )
{
- bDestArea = TRUE;
+ bDestArea = sal_True;
aDestRange = *pDest;
}
}
@@ -850,23 +850,23 @@ void ScUndoSort::Undo()
// do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo)
pDoc->DeleteAreaTab( nStartCol,nStartRow, nEndCol,nEndRow, nSortTab, IDF_ALL|IDF_NOCAPTIONS );
pUndoDoc->CopyToDocument( nStartCol, nStartRow, nSortTab, nEndCol, nEndRow, nSortTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
if (bDestArea)
{
// do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo)
pDoc->DeleteAreaTab( aDestRange, IDF_ALL|IDF_NOCAPTIONS );
- pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
}
// Zeilenhoehen immer (wegen automatischer Anpassung)
//! auf ScBlockUndo umstellen
// if (bRepeatQuery)
pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab,
- IDF_NONE, FALSE, pDoc );
+ IDF_NONE, false, pDoc );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
if ( nVisTab != nSortTab )
@@ -891,7 +891,7 @@ void ScUndoSort::Redo()
pViewShell->MarkRange( ScRange( aSortParam.nCol1, aSortParam.nRow1, nTab,
aSortParam.nCol2, aSortParam.nRow2, nTab ) );
- pViewShell->Sort( aSortParam, FALSE );
+ pViewShell->Sort( aSortParam, false );
// Quellbereich painten wegen Markierung
if ( !aSortParam.bInplace )
@@ -905,9 +905,9 @@ void ScUndoSort::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -916,7 +916,7 @@ BOOL ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQueryParam& rParam,
ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
- const ScRange* pOld, BOOL bSize, const ScRange* pAdvSrc ) :
+ const ScRange* pOld, sal_Bool bSize, const ScRange* pAdvSrc ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
pDrawUndo( NULL ),
@@ -924,18 +924,18 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery
aQueryParam( rParam ),
pUndoDoc( pNewUndoDoc ),
pUndoDB( pNewUndoDB ),
- bIsAdvanced( FALSE ),
- bDestArea( FALSE ),
+ bIsAdvanced( false ),
+ bDestArea( false ),
bDoSize( bSize )
{
if ( pOld )
{
- bDestArea = TRUE;
+ bDestArea = sal_True;
aOldDest = *pOld;
}
if ( pAdvSrc )
{
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
aAdvSource = *pAdvSrc;
}
@@ -961,7 +961,7 @@ void ScUndoQuery::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- BOOL bCopy = !aQueryParam.bInplace;
+ sal_Bool bCopy = !aQueryParam.bInplace;
SCCOL nDestEndCol = 0;
SCROW nDestEndRow = 0;
if (bCopy)
@@ -970,7 +970,7 @@ void ScUndoQuery::Undo()
nDestEndRow = aQueryParam.nDestRow + ( aQueryParam.nRow2-aQueryParam.nRow1 );
ScDBData* pData = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pData)
{
ScRange aNewDest;
@@ -998,22 +998,22 @@ void ScUndoQuery::Undo()
pUndoDoc->CopyToDocument( aQueryParam.nDestCol, aQueryParam.nDestRow, aQueryParam.nDestTab,
nDestEndCol, nDestEndRow, aQueryParam.nDestTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Attribute werden immer mitkopiert (#49287#)
// Rest von altem Bereich
if ( bDestArea && !bDoSize )
{
pDoc->DeleteAreaTab( aOldDest, IDF_ALL );
- pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, false, pDoc );
}
}
else
pUndoDoc->CopyToDocument( 0, aQueryParam.nRow1, nTab, MAXCOL, aQueryParam.nRow2, nTab,
- IDF_NONE, FALSE, pDoc );
+ IDF_NONE, false, pDoc );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
if (!bCopy)
{
@@ -1068,9 +1068,9 @@ void ScUndoQuery::Redo()
pViewShell->SetTabNo( nTab );
if ( bIsAdvanced )
- pViewShell->Query( aQueryParam, &aAdvSource, FALSE );
+ pViewShell->Query( aQueryParam, &aAdvSource, false );
else
- pViewShell->Query( aQueryParam, NULL, FALSE );
+ pViewShell->Query( aQueryParam, NULL, false );
EndRedo();
}
@@ -1079,9 +1079,9 @@ void ScUndoQuery::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -1089,7 +1089,7 @@ BOOL ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//
ScUndoAutoFilter::ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
- const String& rName, BOOL bSet ) :
+ const String& rName, sal_Bool bSet ) :
ScDBFuncUndo( pNewDocShell, rRange ),
aDBName( rName ),
bFilterSet( bSet )
@@ -1105,11 +1105,11 @@ String ScUndoAutoFilter::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_QUERY ); // same as ScUndoQuery
}
-void ScUndoAutoFilter::DoChange( BOOL bUndo )
+void ScUndoAutoFilter::DoChange( sal_Bool bUndo )
{
- BOOL bNewFilter = bUndo ? !bFilterSet : bFilterSet;
+ sal_Bool bNewFilter = bUndo ? !bFilterSet : bFilterSet;
- USHORT nIndex;
+ sal_uInt16 nIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( aDBName, nIndex ) )
@@ -1136,14 +1136,14 @@ void ScUndoAutoFilter::DoChange( BOOL bUndo )
void ScUndoAutoFilter::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoAutoFilter::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1151,9 +1151,9 @@ void ScUndoAutoFilter::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//
@@ -1185,11 +1185,11 @@ void ScUndoDBData::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), TRUE );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // unnoetige Berechnungen vermeiden
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), sal_True );
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pDoc->SetAutoCalc( bOldAutoCalc );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1203,11 +1203,11 @@ void ScUndoDBData::Redo()
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), TRUE );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // unnoetige Berechnungen vermeiden
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), sal_True );
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pDoc->SetAutoCalc( bOldAutoCalc );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1219,9 +1219,9 @@ void ScUndoDBData::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
//
@@ -1243,7 +1243,7 @@ ScUndoImportData::ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab,
pUndoDBData( pNewUndoData ),
pRedoDBData( pNewRedoData ),
nFormulaCols( nNewFormula ),
- bRedoFilled( FALSE )
+ bRedoFilled( false )
{
// redo doc doesn't contain imported data (but everything else)
}
@@ -1287,20 +1287,20 @@ void ScUndoImportData::Undo()
// imported data is deleted later anyway,
// so now delete each column after copying to save memory (#41216#)
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // outside of the loop
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // outside of the loop
for (SCCOL nCopyCol = nCol1; nCopyCol <= nCol2; nCopyCol++)
{
pDoc->CopyToDocument( nCopyCol,nRow1,nTab, nCopyCol,nRow2,nTab,
- IDF_CONTENTS & ~IDF_NOTE, FALSE, pRedoDoc );
+ IDF_CONTENTS & ~IDF_NOTE, false, pRedoDoc );
pDoc->DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS & ~IDF_NOTE );
pDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 );
}
pDoc->SetAutoCalc( bOldAutoCalc );
- bRedoFilled = TRUE;
+ bRedoFilled = sal_True;
}
}
- BOOL bMoveCells = pUndoDBData && pRedoDBData &&
+ sal_Bool bMoveCells = pUndoDBData && pRedoDBData &&
pRedoDBData->IsDoSize(); // in alt und neu gleich
if (bMoveCells)
{
@@ -1315,7 +1315,7 @@ void ScUndoImportData::Undo()
aOld.aEnd.SetCol( aOld.aEnd.Col() + nFormulaCols ); // FitBlock auch fuer Formeln
aNew.aEnd.SetCol( aNew.aEnd.Col() + nFormulaCols );
- pDoc->FitBlock( aNew, aOld, FALSE ); // rueckwaerts
+ pDoc->FitBlock( aNew, aOld, false ); // rueckwaerts
}
else
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
@@ -1323,7 +1323,7 @@ void ScUndoImportData::Undo()
pUndoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
nEndCol+nFormulaCols,nEndRow,nTab,
- IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ IDF_ALL & ~IDF_NOTE, false, pDoc );
if (pCurrentData)
{
@@ -1370,7 +1370,7 @@ void ScUndoImportData::Redo()
pCurrentData = ScUndoUtil::GetOldDBData( pUndoDBData, pDoc, nTab,
nCol1, nRow1, nCol2, nRow2 );
}
- BOOL bMoveCells = pUndoDBData && pRedoDBData &&
+ sal_Bool bMoveCells = pUndoDBData && pRedoDBData &&
pRedoDBData->IsDoSize(); // in alt und neu gleich
if (bMoveCells)
{
@@ -1387,14 +1387,14 @@ void ScUndoImportData::Redo()
pDoc->DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); // incl. Formeln
+ pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, false, pDoc ); // incl. Formeln
}
else
{
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
pRedoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
if (pCurrentData)
@@ -1437,14 +1437,14 @@ void ScUndoImportData::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
{
// Repeat nur fuer Import per DB-Bereich, dann ist pUndoDBData gesetzt
if (pUndoDBData)
return (rTarget.ISA(ScTabViewTarget));
else
- return FALSE; // Adressbuch
+ return false; // Adressbuch
}
//
@@ -1466,13 +1466,13 @@ ScUndoRepeatDB::ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab,
pUndoTable( pNewUndoTab ),
pUndoRange( pNewUndoRange ),
pUndoDB( pNewUndoDB ),
- bQuerySize( FALSE )
+ bQuerySize( false )
{
if ( pOldQ && pNewQ )
{
aOldQuery = *pOldQ;
aNewQuery = *pNewQ;
- bQuerySize = TRUE;;
+ bQuerySize = sal_True;;
}
}
@@ -1499,7 +1499,7 @@ void ScUndoRepeatDB::Undo()
if (bQuerySize)
{
- pDoc->FitBlock( aNewQuery, aOldQuery, FALSE );
+ pDoc->FitBlock( aNewQuery, aOldQuery, false );
if ( aNewQuery.aEnd.Col() == aOldQuery.aEnd.Col() )
{
@@ -1517,7 +1517,7 @@ void ScUndoRepeatDB::Undo()
aOldForm.aEnd.SetCol( aOldQuery.aEnd.Col() + nFormulaCols );
ScRange aNewForm = aOldForm;
aNewForm.aEnd.SetRow( aNewQuery.aEnd.Row() );
- pDoc->FitBlock( aNewForm, aOldForm, FALSE );
+ pDoc->FitBlock( aNewForm, aOldForm, false );
}
}
}
@@ -1549,9 +1549,9 @@ void ScUndoRepeatDB::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -1564,9 +1564,9 @@ void ScUndoRepeatDB::Undo()
MAXCOL, aBlockEnd.Row(), nTab, IDF_ALL );
pUndoDoc->CopyToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_NONE, FALSE, pDoc ); // Flags
+ IDF_NONE, false, pDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart.Col(),aBlockStart.Row(),nTab,
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
@@ -1574,7 +1574,7 @@ void ScUndoRepeatDB::Undo()
if (pUndoRange)
pDoc->SetRangeName( new ScRangeName( *pUndoRange ) );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
// erack! it's broadcasted
// pDoc->SetDirty();
@@ -1604,7 +1604,7 @@ void ScUndoRepeatDB::Redo()
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
pViewShell->SetCursor( aCursorPos.Col(), aCursorPos.Row() );
- pViewShell->RepeatDB( FALSE );
+ pViewShell->RepeatDB( false );
EndRedo();
}
@@ -1612,10 +1612,10 @@ void ScUndoRepeatDB::Redo()
void ScUndoRepeatDB::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( sal_True );
}
-BOOL ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1626,7 +1626,7 @@ BOOL ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell,
ScDocument* pOldDoc, ScDocument* pNewDoc,
- const ScDPObject* pOldObj, const ScDPObject* pNewObj, BOOL bMove ) :
+ const ScDPObject* pOldObj, const ScDPObject* pNewObj, sal_Bool bMove ) :
ScSimpleUndo( pNewDocShell ),
pOldUndoDoc( pOldDoc ),
pNewUndoDoc( pNewDoc ),
@@ -1650,7 +1650,7 @@ ScUndoDataPilot::~ScUndoDataPilot()
String ScUndoDataPilot::GetComment() const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pOldUndoDoc && pNewUndoDoc )
nIndex = STR_UNDO_PIVOT_MODIFY;
else if ( pNewUndoDoc )
@@ -1674,13 +1674,13 @@ void ScUndoDataPilot::Undo()
{
aNewRange = pNewDPObject->GetOutRange();
pDoc->DeleteAreaTab( aNewRange, IDF_ALL );
- pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, FALSE, pDoc );
+ pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, false, pDoc );
}
if ( pOldDPObject && pOldUndoDoc )
{
aOldRange = pOldDPObject->GetOutRange();
pDoc->DeleteAreaTab( aOldRange, IDF_ALL );
- pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, FALSE, pDoc );
+ pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, false, pDoc );
}
// update objects in collection
@@ -1717,7 +1717,7 @@ void ScUndoDataPilot::Undo()
// re-insert deleted object
ScDPObject* pDestObj = new ScDPObject( *pOldDPObject );
- pDestObj->SetAlive(TRUE);
+ pDestObj->SetAlive(sal_True);
if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) )
{
OSL_FAIL("cannot insert DPObject");
@@ -1768,7 +1768,7 @@ void ScUndoDataPilot::Redo()
}
ScDBDocFunc aFunc( *pDocShell );
- aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, FALSE, FALSE, bAllowMove ); // no new undo action
+ aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, false, false, bAllowMove ); // no new undo action
EndRedo();
}
@@ -1778,10 +1778,10 @@ void ScUndoDataPilot::Repeat(SfxRepeatTarget& /* rTarget */)
//! allow deletion
}
-BOOL ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
//! allow deletion
- return FALSE;
+ return false;
}
@@ -1791,7 +1791,7 @@ BOOL ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoConsolidate::ScUndoConsolidate( ScDocShell* pNewDocShell, const ScArea& rArea,
const ScConsolidateParam& rPar, ScDocument* pNewUndoDoc,
- BOOL bReference, SCROW nInsCount, ScOutlineTable* pTab,
+ sal_Bool bReference, SCROW nInsCount, ScOutlineTable* pTab,
ScDBData* pData ) :
ScSimpleUndo( pNewDocShell ),
aDestArea( rArea ),
@@ -1836,19 +1836,19 @@ void ScUndoConsolidate::Undo()
pDoc->SetOutlineTable( nTab, pUndoTab );
// Zeilenstatus
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pDoc );
// Daten & Referenzen
pDoc->DeleteAreaTab( 0,aDestArea.nRowStart, MAXCOL,aDestArea.nRowEnd, nTab, IDF_ALL );
pUndoDoc->UndoToDocument( 0, aDestArea.nRowStart, nTab,
MAXCOL, aDestArea.nRowEnd, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Original-Bereich
if (pUndoData)
{
pDoc->DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, pDoc);
}
pDocShell->PostPaint( 0,aDestArea.nRowStart,nTab, MAXCOL,MAXROW,nTab,
@@ -1860,13 +1860,13 @@ void ScUndoConsolidate::Undo()
aDestArea.nColEnd,aDestArea.nRowEnd, nTab, IDF_ALL );
pUndoDoc->CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Original-Bereich
if (pUndoData)
{
pDoc->DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, pDoc);
}
SCCOL nEndX = aDestArea.nColEnd;
@@ -1888,7 +1888,7 @@ void ScUndoConsolidate::Undo()
ScDBCollection* pColl = pDoc->GetDBCollection();
if (pColl)
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (pColl->SearchName( pUndoData->GetName(), nIndex ))
{
ScDBData* pDocData = (*pColl)[nIndex];
@@ -1917,7 +1917,7 @@ void ScUndoConsolidate::Redo()
{
BeginRedo();
- pDocShell->DoConsolidate( aParam, FALSE );
+ pDocShell->DoConsolidate( aParam, false );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -1934,9 +1934,9 @@ void ScUndoConsolidate::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1952,8 +1952,8 @@ void ScUndoChartData::Init()
}
ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
- const ScRange& rNew, BOOL bColHdr, BOOL bRowHdr,
- BOOL bAdd ) :
+ const ScRange& rNew, sal_Bool bColHdr, sal_Bool bRowHdr,
+ sal_Bool bAdd ) :
ScSimpleUndo( pNewDocShell ),
aChartName( rName ),
bNewColHeaders( bColHdr ),
@@ -1967,8 +1967,8 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
}
ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
- const ScRangeListRef& rNew, BOOL bColHdr, BOOL bRowHdr,
- BOOL bAdd ) :
+ const ScRangeListRef& rNew, sal_Bool bColHdr, sal_Bool bRowHdr,
+ sal_Bool bAdd ) :
ScSimpleUndo( pNewDocShell ),
aChartName( rName ),
aNewRangeListRef( rNew ),
@@ -1993,7 +1993,7 @@ void ScUndoChartData::Undo()
BeginUndo();
pDocShell->GetDocument()->UpdateChartArea( aChartName, aOldRangeListRef,
- bOldColHeaders, bOldRowHeaders, FALSE );
+ bOldColHeaders, bOldRowHeaders, false );
EndUndo();
}
@@ -2012,9 +2012,9 @@ void ScUndoChartData::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// Amelia Wang
@@ -2023,10 +2023,10 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData,
void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
- BOOL bRedoIsFilled ) :
+ sal_Bool bRedoIsFilled ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -2076,7 +2076,7 @@ void ScUndoDataForm::SetChangeTrack()
void ScUndoDataForm::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( true );
ShowTable( aBlockRange );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -2086,9 +2086,9 @@ void ScUndoDataForm::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, true ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
}
@@ -2097,31 +2097,31 @@ void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
{
}
-BOOL ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
-void ScUndoDataForm::DoChange( const BOOL bUndo )
+void ScUndoDataForm::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
// RefUndoData for redo is created before first undo
// (with DeleteUnchanged after the DoUndo call)
- BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
if ( bCreateRedoData )
pRefRedoData = new ScRefUndoData( pDoc );
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// fuer Undo immer alle oder keine Inhalte sichern
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
nUndoFlags |= IDF_ATTRIB;
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -2130,8 +2130,8 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
{
if (!pRedoDoc)
{
- BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
- BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+ sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
@@ -2141,11 +2141,11 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, 1, FALSE, pRedoDoc );
- bRedoFilled = TRUE;
+ pDoc->CopyToDocument( aCopyRange, 1, false, pRedoDoc );
+ bRedoFilled = true;
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
for ( sal_uInt16 i=0; i <= ( aBlockRange.aEnd.Col() - aBlockRange.aStart.Col() ); i++ )
@@ -2157,9 +2157,9 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
if (pWorkRefData)
{
- pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ pWorkRefData->DoUndo( pDoc, true ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
- bPaintAll = TRUE;
+ bPaintAll = true;
}
if ( bCreateRedoData && pRefRedoData )
@@ -2175,8 +2175,8 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
SetChangeTrack();
ScRange aDrawRange( aBlockRange );
- pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
- USHORT nPaint = PAINT_GRID;
+ pDoc->ExtendMerge( aDrawRange, true ); // only needed for single sheet (text/rtf etc.)
+ sal_uInt16 nPaint = PAINT_GRID;
if (bPaintAll)
{
aDrawRange.aStart.SetCol(0);
@@ -2185,7 +2185,7 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
aDrawRange.aEnd.SetRow(MAXROW);
nPaint |= PAINT_TOP | PAINT_LEFT;
/*A*/ if (pViewShell)
- pViewShell->AdjustBlockHeight(FALSE);
+ pViewShell->AdjustBlockHeight(false);
}
else
{
@@ -2199,7 +2199,7 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
nPaint |= PAINT_LEFT;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index cfc83b6592ac..8a263080ae1d 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -131,7 +131,7 @@ String ScUndoDraw::GetRepeatComment(SfxRepeatTarget& rTarget) const
return String();
}
-USHORT ScUndoDraw::GetId() const
+sal_uInt16 ScUndoDraw::GetId() const
{
if (pDrawUndo)
return pDrawUndo->GetId();
@@ -139,26 +139,26 @@ USHORT ScUndoDraw::GetId() const
return 0;
}
-BOOL ScUndoDraw::IsLinked()
+sal_Bool ScUndoDraw::IsLinked()
{
if (pDrawUndo)
return pDrawUndo->IsLinked();
else
- return FALSE;
+ return false;
}
-void ScUndoDraw::SetLinked( BOOL bIsLinked )
+void ScUndoDraw::SetLinked( sal_Bool bIsLinked )
{
if (pDrawUndo)
pDrawUndo->SetLinked(bIsLinked);
}
-BOOL ScUndoDraw::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoDraw::Merge( SfxUndoAction* pNextAction )
{
if (pDrawUndo)
return pDrawUndo->Merge(pNextAction);
else
- return FALSE;
+ return false;
}
void ScUndoDraw::Undo()
@@ -185,12 +185,12 @@ void ScUndoDraw::Repeat(SfxRepeatTarget& rTarget)
pDrawUndo->Repeat(rTarget);
}
-BOOL ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (pDrawUndo)
return pDrawUndo->CanRepeat(rTarget);
else
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index 31c96cb0b061..843c275ef0cb 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -92,7 +92,7 @@ void DeleteSdrUndoAction( SdrUndoAction* pUndoAction )
delete pUndoAction;
}
-void EnableDrawAdjust( ScDocument* pDoc, BOOL bEnable )
+void EnableDrawAdjust( ScDocument* pDoc, sal_Bool bEnable )
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer();
if (pLayer)
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 619736f8f188..f8286ed4b264 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -119,13 +119,13 @@ ScUndoModifyStyle::~ScUndoModifyStyle()
String ScUndoModifyStyle::GetComment() const
{
- USHORT nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
+ sal_uInt16 nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
STR_UNDO_EDITCELLSTYLE :
STR_UNDO_EDITPAGESTYLE;
return ScGlobal::GetRscString( nId );
}
-void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, BOOL bRemoved )
+void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, sal_Bool bRemoved )
{
//! move to document or docshell
@@ -147,8 +147,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
ScDocument* pDoc = pDocSh->GetDocument();
ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
String aNewName = rData.GetName();
- BOOL bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style
- BOOL bNew = ( rName.Len() == 0 && !bDelete ); // creating new style
+ sal_Bool bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style
+ sal_Bool bNew = ( rName.Len() == 0 && !bDelete ); // creating new style
SfxStyleSheetBase* pStyle = NULL;
if ( rName.Len() )
@@ -177,7 +177,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
if ( bDelete )
{
if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
- lcl_DocStyleChanged( pDoc, pStyle, TRUE ); // TRUE: remove usage of style
+ lcl_DocStyleChanged( pDoc, pStyle, sal_True ); // TRUE: remove usage of style
else
pDoc->RemovePageStyleInUse( rName );
@@ -196,11 +196,11 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
const SfxItemSet* pNewSet = rData.GetItems();
DBG_ASSERT( pNewSet, "no ItemSet for style" );
if (pNewSet)
- rStyleSet.Set( *pNewSet, FALSE );
+ rStyleSet.Set( *pNewSet, false );
if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
{
- lcl_DocStyleChanged( pDoc, pStyle, FALSE ); // cell styles: row heights
+ lcl_DocStyleChanged( pDoc, pStyle, false ); // cell styles: row heights
}
else
{
@@ -212,7 +212,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
if (pNewSet)
pDoc->ModifyStyleSheet( *pStyle, *pNewSet );
- pDocSh->PageStyleModified( aNewName, TRUE );
+ pDocSh->PageStyleModified( aNewName, sal_True );
}
}
}
@@ -241,9 +241,9 @@ void ScUndoModifyStyle::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // no repeat possible
+ return false; // no repeat possible
}
// -----------------------------------------------------------------------
@@ -303,9 +303,9 @@ void ScUndoApplyPageStyle::Repeat(SfxRepeatTarget& /* rTarget */)
//! set same page style to current tab
}
-BOOL ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0af08d48593c..97f2549711e1 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -59,7 +59,7 @@
#include <vector>
-extern BOOL bDrawIsInUndo; //! irgendwo als Member !!!
+extern sal_Bool bDrawIsInUndo; //! irgendwo als Member !!!
using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
@@ -94,7 +94,7 @@ TYPEINIT1(ScUndoTabColor, SfxUndoAction);
ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
const String& rNewName) :
ScSimpleUndo( pNewDocShell ),
sNewName( rNewName ),
@@ -137,11 +137,11 @@ void ScUndoInsertTab::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
pViewShell->SetTabNo(nTab);
- pDocShell->SetInUndo( TRUE ); //! BeginUndo
- bDrawIsInUndo = TRUE;
- pViewShell->DeleteTable( nTab, FALSE );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndUndo
+ pDocShell->SetInUndo( sal_True ); //! BeginUndo
+ bDrawIsInUndo = sal_True;
+ pViewShell->DeleteTable( nTab, false );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndUndo
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
@@ -149,7 +149,7 @@ void ScUndoInsertTab::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -159,17 +159,17 @@ void ScUndoInsertTab::Redo()
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
if (bAppend)
- pViewShell->AppendTable( sNewName, FALSE );
+ pViewShell->AppendTable( sNewName, false );
else
{
pViewShell->SetTabNo(nTab);
- pViewShell->InsertTable( sNewName, nTab, FALSE );
+ pViewShell->InsertTable( sNewName, nTab, false );
}
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndRedo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndRedo
SetChangeTrack();
}
@@ -181,7 +181,7 @@ void ScUndoInsertTab::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -193,7 +193,7 @@ BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,SvStrings *pNewNameList) :
+ sal_Bool bApp,SvStrings *pNewNameList) :
ScSimpleUndo( pNewDocShell ),
pDrawUndo( NULL ),
nTab( nTabNum ),
@@ -212,7 +212,7 @@ ScUndoInsertTables::~ScUndoInsertTables()
{
for(int i=0;i<pNameList->Count();i++)
{
- pStr=pNameList->GetObject(sal::static_int_cast<USHORT>(i));
+ pStr=pNameList->GetObject(sal::static_int_cast<sal_uInt16>(i));
delete pStr;
}
pNameList->Remove(0,pNameList->Count());
@@ -251,19 +251,19 @@ void ScUndoInsertTables::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
pViewShell->SetTabNo(nTab);
- pDocShell->SetInUndo( TRUE ); //! BeginUndo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginUndo
+ bDrawIsInUndo = sal_True;
vector<SCTAB> TheTabs;
for(int i=0; i<pNameList->Count(); ++i)
{
TheTabs.push_back(nTab+i);
}
- pViewShell->DeleteTables( TheTabs, FALSE );
+ pViewShell->DeleteTables( TheTabs, false );
TheTabs.clear();
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndUndo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndUndo
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
@@ -271,7 +271,7 @@ void ScUndoInsertTables::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -281,13 +281,13 @@ void ScUndoInsertTables::Redo()
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
pViewShell->SetTabNo(nTab);
- pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),FALSE );
+ pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),false );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndRedo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndRedo
SetChangeTrack();
}
@@ -299,7 +299,7 @@ void ScUndoInsertTables::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -333,7 +333,7 @@ void ScUndoDeleteTab::SetChangeTrack()
ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
if ( pChangeTrack )
{
- ULONG nTmpChangeAction;
+ sal_uLong nTmpChangeAction;
nStartChangeAction = pChangeTrack->GetActionMax() + 1;
nEndChangeAction = 0;
ScRange aRange( 0, 0, 0, MAXCOL, MAXROW, 0 );
@@ -363,7 +363,7 @@ void ScUndoDeleteTab::Undo()
unsigned int i=0;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLink = FALSE;
+ sal_Bool bLink = false;
String aName;
for(i=0; i<theTabs.size(); ++i)
@@ -371,33 +371,33 @@ void ScUndoDeleteTab::Undo()
SCTAB nTab = theTabs[i];
pRefUndoDoc->GetName( nTab, aName );
- bDrawIsInUndo = TRUE;
- BOOL bOk = pDoc->InsertTab( nTab, aName );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = sal_True;
+ sal_Bool bOk = pDoc->InsertTab( nTab, aName );
+ bDrawIsInUndo = false;
if (bOk)
{
- pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pDoc );
+ pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pDoc );
String aOldName;
pRefUndoDoc->GetName( nTab, aOldName );
- pDoc->RenameTab( nTab, aOldName, FALSE );
+ pDoc->RenameTab( nTab, aOldName, false );
if (pRefUndoDoc->IsLinked(nTab))
{
pDoc->SetLink( nTab, pRefUndoDoc->GetLinkMode(nTab), pRefUndoDoc->GetLinkDoc(nTab),
pRefUndoDoc->GetLinkFlt(nTab), pRefUndoDoc->GetLinkOpt(nTab),
pRefUndoDoc->GetLinkTab(nTab), pRefUndoDoc->GetLinkRefreshDelay(nTab) );
- bLink = TRUE;
+ bLink = sal_True;
}
if ( pRefUndoDoc->IsScenario(nTab) )
{
- pDoc->SetScenario( nTab, TRUE );
+ pDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pRefUndoDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pRefUndoDoc->IsActiveScenario( nTab );
pDoc->SetActiveScenario( nTab, bActive );
}
pDoc->SetVisible( nTab, pRefUndoDoc->IsVisible( nTab ) );
@@ -430,28 +430,28 @@ void ScUndoDeleteTab::Undo()
pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_ALL ); // incl. Extras
- // nicht ShowTable wegen SetTabNo(..., TRUE):
+ // nicht ShowTable wegen SetTabNo(..., sal_True):
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), TRUE );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), true );
}
void ScUndoDeleteTab::Redo()
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs[0] ) );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs.front() ) );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
- pViewShell->DeleteTables( theTabs, FALSE );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( TRUE ); //! EndRedo
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
+ pViewShell->DeleteTables( theTabs, false );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( sal_True ); //! EndRedo
SetChangeTrack();
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -460,11 +460,11 @@ void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget)
if (rTarget.ISA(ScTabViewTarget))
{
ScTabViewShell* pViewShell = ((ScTabViewTarget&)rTarget).GetViewShell();
- pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), TRUE );
+ pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), sal_True );
}
}
-BOOL ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -527,9 +527,9 @@ void ScUndoRenameTab::Repeat(SfxRepeatTarget& /* rTarget */)
// Repeat macht keinen Sinn
}
-BOOL ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -563,7 +563,7 @@ String ScUndoMoveTab::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_MOVE_TAB );
}
-void ScUndoMoveTab::DoChange( BOOL bUndo ) const
+void ScUndoMoveTab::DoChange( sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -579,7 +579,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
pDoc->MoveTab( nDestTab, nOldTab );
pViewShell->GetViewData()->MoveTab( nDestTab, nOldTab );
- pViewShell->SetTabNo( nOldTab, TRUE );
+ pViewShell->SetTabNo( nOldTab, true );
if (mpOldNames)
{
const OUString& rOldName = (*mpOldNames)[i-1];
@@ -599,7 +599,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
pDoc->MoveTab( nOldTab, nNewTab );
pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
- pViewShell->SetTabNo( nDestTab, TRUE );
+ pViewShell->SetTabNo( nDestTab, true );
if (mpNewNames)
{
const OUString& rNewName = (*mpNewNames)[i];
@@ -617,28 +617,28 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
void ScUndoMoveTab::Undo()
{
- DoChange( TRUE );
+ DoChange( sal_True );
}
void ScUndoMoveTab::Redo()
{
- DoChange( FALSE );
+ DoChange( false );
}
void ScUndoMoveTab::Repeat(SfxRepeatTarget& /* rTarget */)
{
- // kein Repeat ! ? !
+ // No Repeat ! ? !
}
-BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------------
//
-// Tabelle kopieren
+// Copy table
//
ScUndoCopyTab::ScUndoCopyTab(
@@ -673,7 +673,7 @@ void ScUndoCopyTab::DoChange() const
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo((*mpOldTabs)[0],TRUE);
+ pViewShell->SetTabNo((*mpOldTabs)[0],true);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
@@ -695,9 +695,9 @@ void ScUndoCopyTab::Undo()
if (nDestTab > MAXTAB) // append?
nDestTab = pDoc->GetTableCount() - 1;
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->DeleteTab(nDestTab);
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
}
// ScTablesHint broadcasts after all sheets have been deleted,
@@ -729,9 +729,9 @@ void ScUndoCopyTab::Redo()
if (nDestTab > MAXTAB) // angehaengt ?
nDestTab = pDoc->GetTableCount() - 1;
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->CopyTab( nOldTab, nNewTab );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
@@ -741,15 +741,15 @@ void ScUndoCopyTab::Redo()
if ( pDoc->IsScenario(nAdjSource) )
{
- pDoc->SetScenario(nNewTab, TRUE );
+ pDoc->SetScenario(nNewTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags );
pDoc->SetScenarioData(nNewTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario(nAdjSource);
+ sal_Bool bActive = pDoc->IsActiveScenario(nAdjSource);
pDoc->SetActiveScenario(nNewTab, bActive );
- BOOL bVisible=pDoc->IsVisible(nAdjSource);
+ sal_Bool bVisible=pDoc->IsVisible(nAdjSource);
pDoc->SetVisible(nNewTab,bVisible );
}
@@ -765,7 +765,7 @@ void ScUndoCopyTab::Redo()
RedoSdrUndoAction( pDrawUndo ); // after the sheets are inserted
- pViewShell->SetTabNo( nDestTab, TRUE ); // after draw-undo
+ pViewShell->SetTabNo( nDestTab, sal_True ); // after draw-undo
DoChange();
@@ -776,9 +776,9 @@ void ScUndoCopyTab::Repeat(SfxRepeatTarget& /* rTarget */)
// kein Repeat ! ? !
}
-BOOL ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------------------
@@ -849,9 +849,9 @@ void ScUndoTabColor::Repeat(SfxRepeatTarget& /* rTarget */)
// No Repeat
}
-BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -862,7 +862,7 @@ BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
SCTAB nSrc, SCTAB nDest,
const String& rN, const String& rC,
- const Color& rCol, USHORT nF,
+ const Color& rCol, sal_uInt16 nF,
const ScMarkData& rMark ) :
ScSimpleUndo( pNewDocShell ),
nSrcTab( nSrc ),
@@ -891,11 +891,11 @@ void ScUndoMakeScenario::Undo()
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDocShell->SetInUndo( TRUE );
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True );
+ bDrawIsInUndo = sal_True;
pDoc->DeleteTab( nDestTab );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false );
DoSdrUndoAction( pDrawUndo, pDoc );
@@ -904,32 +904,31 @@ void ScUndoMakeScenario::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( nSrcTab, TRUE );
+ pViewShell->SetTabNo( nSrcTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
void ScUndoMakeScenario::Redo()
{
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE );
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True );
+ bDrawIsInUndo = sal_True;
- pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, FALSE );
+ pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, false );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( nDestTab, TRUE );
+ pViewShell->SetTabNo( nDestTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
}
@@ -942,7 +941,7 @@ void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -954,7 +953,7 @@ BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoImportTab::ScUndoImportTab( ScDocShell* pShell,
- SCTAB nNewTab, SCTAB nNewCount, BOOL bNewLink ) :
+ SCTAB nNewTab, SCTAB nNewCount, sal_Bool bNewLink ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
nCount( nNewCount ),
@@ -985,11 +984,11 @@ void ScUndoImportTab::DoChange() const
{
if(nTab<nTabCount)
{
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
}
else
{
- pViewShell->SetTabNo(nTab-1,TRUE);
+ pViewShell->SetTabNo(nTab-1,sal_True);
}
}
@@ -1004,32 +1003,32 @@ void ScUndoImportTab::Undo()
SCTAB i;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bMakeRedo = !pRedoDoc;
+ sal_Bool bMakeRedo = !pRedoDoc;
if (bMakeRedo)
{
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, TRUE,TRUE );
+ pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True );
String aOldName;
for (i=0; i<nCount; i++)
{
SCTAB nTabPos=nTab+i;
- pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pRedoDoc );
+ pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pRedoDoc );
pDoc->GetName( nTabPos, aOldName );
- pRedoDoc->RenameTab( nTabPos, aOldName, FALSE );
+ pRedoDoc->RenameTab( nTabPos, aOldName, false );
if ( pDoc->IsScenario(nTabPos) )
{
- pRedoDoc->SetScenario(nTabPos, TRUE );
+ pRedoDoc->SetScenario(nTabPos, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
pRedoDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario(nTabPos);
+ sal_Bool bActive = pDoc->IsActiveScenario(nTabPos);
pRedoDoc->SetActiveScenario(nTabPos, bActive );
- BOOL bVisible=pDoc->IsVisible(nTabPos);
+ sal_Bool bVisible=pDoc->IsVisible(nTabPos);
pRedoDoc->SetVisible(nTabPos,bVisible );
}
@@ -1041,10 +1040,10 @@ void ScUndoImportTab::Undo()
DoSdrUndoAction( pDrawUndo, pDoc ); // before the sheets are deleted
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
for (i=0; i<nCount; i++)
pDoc->DeleteTab( nTab );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
DoChange();
}
@@ -1064,26 +1063,26 @@ void ScUndoImportTab::Redo()
{
SCTAB nTabPos=nTab+i;
pRedoDoc->GetName(nTabPos,aName);
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->InsertTab(nTabPos,aName);
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
}
for (i=0; i<nCount; i++) // then copy into inserted sheets
{
SCTAB nTabPos=nTab+i;
- pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pDoc );
+ pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pDoc );
if ( pRedoDoc->IsScenario(nTabPos) )
{
- pDoc->SetScenario(nTabPos, TRUE );
+ pDoc->SetScenario(nTabPos, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
pDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
- BOOL bActive = pRedoDoc->IsActiveScenario(nTabPos);
+ sal_Bool bActive = pRedoDoc->IsActiveScenario(nTabPos);
pDoc->SetActiveScenario(nTabPos, bActive );
- BOOL bVisible=pRedoDoc->IsVisible(nTabPos);
+ sal_Bool bVisible=pRedoDoc->IsVisible(nTabPos);
pDoc->SetVisible(nTabPos,bVisible );
}
@@ -1103,7 +1102,7 @@ void ScUndoImportTab::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1122,12 +1121,12 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
pTabs = new SCTAB[nTabCount];
- pModes = new BYTE[nTabCount];
+ pModes = new sal_uInt8[nTabCount];
pTabNames = new String[nTabCount];
for (SCTAB i=0; i<nTabCount; i++)
{
- BYTE nMode = pDoc->GetLinkMode(i);
+ sal_uInt8 nMode = pDoc->GetLinkMode(i);
if (nMode)
if (pDoc->GetLinkDoc(i) == aDocName)
{
@@ -1163,11 +1162,11 @@ String ScUndoRemoveLink::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_REMOVELINK );
}
-void ScUndoRemoveLink::DoChange( BOOL bLink ) const
+void ScUndoRemoveLink::DoChange( sal_Bool bLink ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
String aEmpty;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (bLink) // establish link
pDoc->SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay );
else // remove link
@@ -1177,12 +1176,12 @@ void ScUndoRemoveLink::DoChange( BOOL bLink ) const
void ScUndoRemoveLink::Undo()
{
- DoChange( TRUE );
+ DoChange( sal_True );
}
void ScUndoRemoveLink::Redo()
{
- DoChange( FALSE );
+ DoChange( false );
}
void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */)
@@ -1190,9 +1189,9 @@ void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1201,7 +1200,7 @@ BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
// Tabellen ein-/ausblenden
//
-ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewShow ) :
+ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewShow ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
bShow( bNewShow )
@@ -1212,14 +1211,14 @@ ScUndoShowHideTab::~ScUndoShowHideTab()
{
}
-void ScUndoShowHideTab::DoChange( BOOL bShowP ) const
+void ScUndoShowHideTab::DoChange( sal_Bool bShowP ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->SetVisible( nTab, bShowP );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocShell->SetDocumentModified();
@@ -1243,14 +1242,14 @@ void ScUndoShowHideTab::Repeat(SfxRepeatTarget& rTarget)
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
String ScUndoShowHideTab::GetComment() const
{
- USHORT nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
+ sal_uInt16 nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
return ScGlobal::GetRscString( nId );
}
@@ -1287,7 +1286,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect)
if (pViewShell)
{
pViewShell->UpdateLayerLocks();
- pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann
+ pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann
}
pDocShell->PostPaintGridAll();
@@ -1312,14 +1311,14 @@ void ScUndoDocProtect::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoDocProtect::GetComment() const
{
- USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
+ sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
return ScGlobal::GetRscString( nId );
}
@@ -1357,7 +1356,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
if (pViewShell)
{
pViewShell->UpdateLayerLocks();
- pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann
+ pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann
}
pDocShell->PostPaintGridAll();
@@ -1382,14 +1381,14 @@ void ScUndoTabProtect::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoTabProtect::GetComment() const
{
- USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
+ sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
return ScGlobal::GetRscString( nId );
}
@@ -1413,7 +1412,7 @@ ScUndoPrintRange::~ScUndoPrintRange()
delete pNewRanges;
}
-void ScUndoPrintRange::DoChange(BOOL bUndo)
+void ScUndoPrintRange::DoChange(sal_Bool bUndo)
{
ScDocument* pDoc = pDocShell->GetDocument();
if (bUndo)
@@ -1433,14 +1432,14 @@ void ScUndoPrintRange::DoChange(BOOL bUndo)
void ScUndoPrintRange::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoPrintRange::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1449,9 +1448,9 @@ void ScUndoPrintRange::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoPrintRange::GetComment() const
@@ -1469,7 +1468,7 @@ String ScUndoPrintRange::GetComment() const
ScUndoScenarioFlags::ScUndoScenarioFlags( ScDocShell* pNewDocShell, SCTAB nT,
const String& rON, const String& rNN, const String& rOC, const String& rNC,
- const Color& rOCol, const Color& rNCol, USHORT nOF, USHORT nNF ) :
+ const Color& rOCol, const Color& rNCol, sal_uInt16 nOF, sal_uInt16 nNF ) :
ScSimpleUndo( pNewDocShell ),
nTab ( nT ),
aOldName ( rON ),
@@ -1531,9 +1530,9 @@ void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */)
// Repeat macht keinen Sinn
}
-BOOL ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1568,8 +1567,8 @@ SdrObject* ScUndoRenameObject::GetObject()
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if ( pDrawLayer )
{
- USHORT nCount = pDrawLayer->GetPageCount();
- for (USHORT nTab=0; nTab<nCount; nTab++)
+ sal_uInt16 nCount = pDrawLayer->GetPageCount();
+ for (sal_uInt16 nTab=0; nTab<nCount; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
DBG_ASSERT(pPage,"Page ?");
@@ -1614,9 +1613,9 @@ void ScUndoRenameObject::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -1624,7 +1623,7 @@ BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
// Switch sheet between left-to-right and right-to-left
//
-ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL ) :
+ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
bRTL( bNewRTL )
@@ -1635,20 +1634,20 @@ ScUndoLayoutRTL::~ScUndoLayoutRTL()
{
}
-void ScUndoLayoutRTL::DoChange( BOOL bNew )
+void ScUndoLayoutRTL::DoChange( sal_Bool bNew )
{
- pDocShell->SetInUndo( TRUE );
+ pDocShell->SetInUndo( sal_True );
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->SetLayoutRTL( nTab, bNew );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
pDocShell->SetDocumentModified();
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScUndoLayoutRTL::Undo()
@@ -1668,7 +1667,7 @@ void ScUndoLayoutRTL::Repeat(SfxRepeatTarget& rTarget)
Execute( FID_TAB_RTL, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 6d6fcc770a1f..9668e5b0d4ac 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -44,10 +44,13 @@
#include "globstr.hrc"
#include "global.hxx"
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
+void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ )
{
+ if ( pDocShell->IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
@@ -56,7 +59,7 @@ void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
pViewShell->SetTabNo( nStartZ );
pViewShell->DoneBlockMode();
- pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, false, false );
pViewShell->InitOwnBlockMode();
pViewShell->GetViewData()->GetMarkData().
SetMarkArea( ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ) );
@@ -90,25 +93,25 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB
if (!pRet)
{
- BOOL bWasTemp = FALSE;
+ sal_Bool bWasTemp = false;
if ( pUndoData )
{
String aName;
pUndoData->GetName( aName );
if ( aName == ScGlobal::GetRscString( STR_DB_NONAME ) )
- bWasTemp = TRUE;
+ bWasTemp = sal_True;
}
DBG_ASSERT(bWasTemp, "Undo: didn't find database range");
(void)bWasTemp;
- USHORT nIndex;
+ sal_uInt16 nIndex;
ScDBCollection* pColl = pDoc->GetDBCollection();
if (pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nIndex ))
pRet = (*pColl)[nIndex];
else
{
pRet = new ScDBData( ScGlobal::GetRscString( STR_DB_NONAME ), nTab,
- nCol1,nRow1, nCol2,nRow2, TRUE,
+ nCol1,nRow1, nCol2,nRow2, sal_True,
pDoc->HasColHeader( nCol1,nRow1,nCol2,nRow2,nTab ) );
pColl->Insert( pRet );
}
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 4b4a0381e18f..029be6720869 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -73,13 +73,13 @@ void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv )
{
if (!pDocShell)
- return sal_False;
+ return false;
ScDocument* pDoc = pDocShell->GetDocument();
- sal_Bool bSuccess = sal_False;
+ sal_Bool bSuccess = false;
if ( bIsRange )
{
- USHORT nResult = aRange.ParseAny( rUIString, pDoc, eConv );
+ sal_uInt16 nResult = aRange.ParseAny( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -93,7 +93,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formu
}
else
{
- USHORT nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
+ sal_uInt16 nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -120,6 +120,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
@@ -134,6 +135,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
@@ -149,7 +151,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
if ( !pDocShell )
throw uno::RuntimeException();
- sal_Bool bSuccess = sal_False;
+ sal_Bool bSuccess = false;
String aNameStr(aPropertyName);
if ( aNameStr.EqualsAscii( SC_UNONAME_ADDRESS ) )
{
@@ -262,7 +264,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
{
// generate UI representation string - include sheet only if different from ref sheet
String aFormatStr;
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
if ( aRange.aStart.Tab() != nRefSheet )
nFlags |= SCA_TAB_3D;
if ( bIsRange )
@@ -284,7 +286,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
// manually concatenate range so both parts always have the sheet name
aFormatStr.Append( (sal_Unicode) ':' );
String aSecond;
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
if( eConv != ::formula::FormulaGrammar::CONV_XL_A1 )
nFlags |= SCA_TAB_3D;
aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, eConv );
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index b391bee219a5..18d3acc0887c 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -181,7 +181,7 @@ sal_Bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, const String& rN
return sal_True;
}
}
- return sal_False; // is nich
+ return false; // is nich
}
//------------------------------------------------------------------------
@@ -251,7 +251,7 @@ void SAL_CALL ScAutoFormatsObj::insertByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
if ( xInterface.is() )
@@ -422,7 +422,7 @@ sal_Bool SAL_CALL ScAutoFormatsObj::hasByName( const rtl::OUString& aName )
sal_uInt16 nDummy;
return lcl_FindAutoFormatIndex( *pFormats, aString, nDummy );
}
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
@@ -670,7 +670,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const rtl::OUString& aPrope
DBG_ASSERT(pData,"AutoFormat Daten nicht da");
sal_Bool bValue;
- sal_Bool bError = sal_False;
+ sal_Bool bError = false;
String aPropString(aPropertyName);
if (aPropString.EqualsAscii( SC_UNONAME_INCBACK ))
@@ -745,7 +745,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
{
if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) )
{
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
switch( pEntry->nWID )
{
@@ -757,18 +757,18 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
switch( eOrient )
{
case table::CellOrientation_STANDARD:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
break;
case table::CellOrientation_TOPBOTTOM:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
break;
case table::CellOrientation_BOTTOMTOP:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
break;
case table::CellOrientation_STACKED:
- pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, TRUE ) );
+ pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_True ) );
break;
default:
{
@@ -841,7 +841,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a
{
const SfxInt32Item* pRotItem = (const SfxInt32Item*)pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE );
sal_Int32 nRot = pRotItem ? pRotItem->GetValue() : 0;
- BOOL bStacked = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bStacked = ((const SfxBoolItem*)pItem)->GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aVal );
}
break;
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 76c894fae0ae..bdafcadfb4f3 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -207,111 +207,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * /* pServiceManager */, registry::XRegistryKey * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- lcl_WriteInfo( pRegistryKey,
- ScSpreadsheetSettings::getImplementationName_Static(),
- ScSpreadsheetSettings::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScRecentFunctionsObj::getImplementationName_Static(),
- ScRecentFunctionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionListObj::getImplementationName_Static(),
- ScFunctionListObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScAutoFormatsObj::getImplementationName_Static(),
- ScAutoFormatsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionAccess::getImplementationName_Static(),
- ScFunctionAccess::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFilterOptionsObj::getImplementationName_Static(),
- ScFilterOptionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_getImplementationName(),
- ScXMLImport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Meta_getImplementationName(),
- ScXMLImport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Styles_getImplementationName(),
- ScXMLImport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Content_getImplementationName(),
- ScXMLImport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Settings_getImplementationName(),
- ScXMLImport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_getImplementationName(),
- ScXMLOOoExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Meta_getImplementationName(),
- ScXMLOOoExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Styles_getImplementationName(),
- ScXMLOOoExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Content_getImplementationName(),
- ScXMLOOoExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Settings_getImplementationName(),
- ScXMLOOoExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_getImplementationName(),
- ScXMLOasisExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Meta_getImplementationName(),
- ScXMLOasisExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Styles_getImplementationName(),
- ScXMLOasisExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Content_getImplementationName(),
- ScXMLOasisExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Settings_getImplementationName(),
- ScXMLOasisExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScDocument_getImplementationName(),
- ScDocument_getSupportedServiceNames() );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException&)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
@@ -538,74 +433,74 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
ScModule* pScMod = SC_MOD();
ScAppOptions aAppOpt(pScMod->GetAppOptions());
ScInputOptions aInpOpt(pScMod->GetInputOptions());
- BOOL bSaveApp = FALSE;
- BOOL bSaveInp = FALSE;
+ sal_Bool bSaveApp = false;
+ sal_Bool bSaveInp = false;
// print options aren't loaded until needed
if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP ))
{
aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_ENTERED ))
{
aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_EXPREF ))
{
aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_EXTFMT ))
{
aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_LINKUPD ))
{
aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_MARKHDR ))
{
aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_MOVESEL ))
{
aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN ))
{
aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_USETABCOL ))
{
aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS ))
{
aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_REPLWARN ))
{
aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_METRIC ))
{
aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR ))
{
aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveInp = TRUE;
+ bSaveInp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_SCALE ))
{
@@ -626,12 +521,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
aAppOpt.SetZoom( nVal );
aAppOpt.SetZoomType( SVX_ZOOM_PERCENT );
}
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_STBFUNC ))
{
aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) );
- bSaveApp = TRUE;
+ bSaveApp = sal_True;
}
else if (aString.EqualsAscii( SC_UNONAME_ULISTS ))
{
@@ -643,16 +538,16 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
// mehr tut ScGlobal::SetUserList auch nicht
pUserList->FreeAll(); // alle Eintraege raus
- USHORT nCount = (USHORT)aSeq.getLength();
+ sal_uInt16 nCount = (sal_uInt16)aSeq.getLength();
const rtl::OUString* pAry = aSeq.getConstArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
String aEntry = pAry[i];
ScUserListData* pData = new ScUserListData(aEntry);
if (!pUserList->Insert(pData)) // hinten anhaengen
delete pData; // sollte nicht vorkommen
}
- bSaveApp = TRUE; // Liste wird mit den App-Optionen gespeichert
+ bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert
}
}
else if (aString.EqualsAscii( SC_UNONAME_PRALLSH ))
@@ -704,7 +599,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString&
else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc();
else if (aString.EqualsAscii( SC_UNONAME_SCALE ))
{
- INT16 nZoomVal = 0;
+ sal_Int16 nZoomVal = 0;
switch ( aAppOpt.GetZoomType() )
{
case SVX_ZOOM_PERCENT: nZoomVal = aAppOpt.GetZoom(); break;
@@ -723,10 +618,10 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString&
ScUserList* pUserList = ScGlobal::GetUserList();
if (pUserList)
{
- USHORT nCount = pUserList->GetCount();
+ sal_uInt16 nCount = pUserList->GetCount();
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
String aEntry((*pUserList)[i]->GetString());
pAry[i] = aEntry;
@@ -785,13 +680,13 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds()
{
SolarMutexGuard aGuard;
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
- USHORT nCount = rOpt.GetLRUFuncListCount();
- const USHORT* pFuncs = rOpt.GetLRUFuncList();
+ sal_uInt16 nCount = rOpt.GetLRUFuncListCount();
+ const sal_uInt16* pFuncs = rOpt.GetLRUFuncList();
if (pFuncs)
{
uno::Sequence<sal_Int32> aSeq(nCount);
sal_Int32* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pAry[i] = pFuncs[i];
return aSeq;
}
@@ -803,12 +698,12 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX );
+ sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX );
const INT32* pAry = aRecentFunctionIds.getConstArray();
- USHORT* pFuncs = nCount ? new USHORT[nCount] : NULL;
- for (USHORT i=0; i<nCount; i++)
- pFuncs[i] = (USHORT)pAry[i]; //! auf gueltige Werte testen?
+ sal_uInt16* pFuncs = nCount ? new sal_uInt16[nCount] : NULL;
+ for (sal_uInt16 i=0; i<nCount; i++)
+ pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen?
ScModule* pScMod = SC_MOD();
ScAppOptions aNewOpts(pScMod->GetAppOptions());
@@ -885,10 +780,10 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
pArray[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_ARGUMENTS ));
if (rDesc.ppDefArgNames && rDesc.ppDefArgDescs && rDesc.pDefArgFlags )
{
- USHORT nCount = rDesc.nArgCount;
+ sal_uInt16 nCount = rDesc.nArgCount;
if (nCount >= VAR_ARGS)
nCount -= VAR_ARGS - 1;
- USHORT nSeqCount = rDesc.GetSuppressedArgCount();
+ sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount();
if (nSeqCount >= VAR_ARGS)
nSeqCount -= VAR_ARGS - 1;
@@ -896,7 +791,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
{
uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount);
sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
- for (USHORT i=0, j=0; i<nCount; i++)
+ for (sal_uInt16 i=0, j=0; i<nCount; i++)
{
if (!rDesc.pDefArgFlags[i].bSuppress)
{
@@ -925,8 +820,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
- USHORT nCount = (USHORT)pFuncList->GetCount();
- for (USHORT nIndex=0; nIndex<nCount; nIndex++)
+ sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount();
+ for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
if ( pDesc && pDesc->nFIndex == nId )
@@ -954,8 +849,8 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName )
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
- USHORT nCount = (USHORT)pFuncList->GetCount();
- for (USHORT nIndex=0; nIndex<nCount; nIndex++)
+ sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount();
+ for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
{
const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
//! Case-insensitiv ???
@@ -1069,7 +964,7 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName )
return sal_True;
}
}
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index 95f7755c6781..ce9586d1c9e2 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -81,7 +81,7 @@ namespace calc
,OCellListSource_PBase( OCellListSource_Base::rBHelper )
,m_xDocument( _rxDocument )
,m_aListEntryListeners( m_aMutex )
- ,m_bInitialized( sal_False )
+ ,m_bInitialized( false )
{
DBG_CTOR( OCellListSource, checkConsistency_static );
@@ -200,7 +200,7 @@ namespace calc
if ( *pLookup++ == _rServiceName )
return sal_True;
- return sal_False;
+ return false;
}
//--------------------------------------------------------------------
@@ -365,7 +365,7 @@ namespace calc
// get the cell address
CellRangeAddress aRangeAddress;
- sal_Bool bFoundAddress = sal_False;
+ sal_Bool bFoundAddress = false;
const Any* pLoop = _rArguments.getConstArray();
const Any* pLoopEnd = _rArguments.getConstArray() + _rArguments.getLength();
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 6a2b3e5e3a5d..4d8d263895ab 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -866,8 +866,8 @@ void lcl_CopyProperties( beans::XPropertySet& rDest, beans::XPropertySet& rSourc
{
uno::Sequence<beans::Property> aSeq(xInfo->getProperties());
const beans::Property* pAry = aSeq.getConstArray();
- ULONG nCount = aSeq.getLength();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = aSeq.getLength();
+ for (sal_uLong i=0; i<nCount; i++)
{
rtl::OUString aName(pAry[i].Name);
rDest.setPropertyValue( aName, rSource.getPropertyValue( aName ) );
@@ -885,16 +885,16 @@ SCTAB lcl_FirstTab( const ScRangeList& rRanges )
return 0; // soll nicht sein
}
-BOOL lcl_WholeSheet( const ScRangeList& rRanges )
+sal_Bool lcl_WholeSheet( const ScRangeList& rRanges )
{
if ( rRanges.size() == 1 )
{
const ScRange* pRange = rRanges[0];
if ( pRange && pRange->aStart.Col() == 0 && pRange->aEnd.Col() == MAXCOL &&
pRange->aStart.Row() == 0 && pRange->aEnd.Row() == MAXROW )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -953,9 +953,9 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con
{
// Calc braucht Twips, im Uno-Struct sind 1/100mm
- rLine.SetOutWidth( (USHORT)HMMToTwips( rStruct.OuterLineWidth ) );
- rLine.SetInWidth( (USHORT)HMMToTwips( rStruct.InnerLineWidth ) );
- rLine.SetDistance( (USHORT)HMMToTwips( rStruct.LineDistance ) );
+ rLine.SetOutWidth( (sal_uInt16)HMMToTwips( rStruct.OuterLineWidth ) );
+ rLine.SetInWidth( (sal_uInt16)HMMToTwips( rStruct.InnerLineWidth ) );
+ rLine.SetDistance( (sal_uInt16)HMMToTwips( rStruct.LineDistance ) );
rLine.SetColor( ColorData( rStruct.Color ) );
if ( rLine.GetOutWidth() || rLine.GetInWidth() || rLine.GetDistance() )
@@ -967,7 +967,7 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con
void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const table::TableBorder& rBorder )
{
SvxBorderLine aLine;
- rOuter.SetDistance( (USHORT)HMMToTwips( rBorder.Distance ) );
+ rOuter.SetDistance( (sal_uInt16)HMMToTwips( rBorder.Distance ) );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.TopLine ), BOX_LINE_TOP );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.BottomLine ), BOX_LINE_BOTTOM );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.LeftLine ), BOX_LINE_LEFT );
@@ -981,7 +981,7 @@ void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner
rInner.SetValid( VALID_HORI, rBorder.IsHorizontalLineValid );
rInner.SetValid( VALID_VERT, rBorder.IsVerticalLineValid );
rInner.SetValid( VALID_DISTANCE, rBorder.IsDistanceValid );
- rInner.SetTable( TRUE );
+ rInner.SetTable( sal_True );
}
void ScHelperFunctions::FillBorderLine( table::BorderLine& rStruct, const SvxBorderLine* pLine )
@@ -1026,7 +1026,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScDocument* pUndoDoc = NULL;
if (bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1042,12 +1042,12 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
pUndoDoc->InitUndo( pDoc, nTab, nTab );
else
pUndoDoc->AddUndoTab( nTab, nTab );
- pDoc->CopyToDocument( aRange, IDF_ATTRIB, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ATTRIB, false, pUndoDoc );
}
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
pDoc->ApplySelectionFrame( aMark, &rOuter, &rInner );
// RowHeight bei Umrandung alleine nicht noetig
@@ -1068,7 +1068,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
//! move lcl_PutDataArray to docfunc?
//! merge loop with ScFunctionAccess::callFunction
-BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
+sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
const uno::Sequence< uno::Sequence<uno::Any> >& aData )
{
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1077,12 +1077,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) )
{
//! error message
- return FALSE;
+ return false;
}
long nCols = 0;
@@ -1094,7 +1094,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 )
{
//! error message?
- return FALSE;
+ return false;
}
ScDocument* pUndoDoc = NULL;
@@ -1102,12 +1102,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, false, pUndoDoc );
}
pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
- BOOL bError = FALSE;
+ sal_Bool bError = false;
SCROW nDocRow = nStartRow;
for (long nRow=0; nRow<nRows; nRow++)
{
@@ -1147,18 +1147,18 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
pDoc->PutCell( nDocCol, nDocRow, nTab, new ScStringCell( aUStr ) );
}
else
- bError = TRUE; // invalid type
+ bError = sal_True; // invalid type
++nDocCol;
}
}
else
- bError = TRUE; // wrong size
+ bError = sal_True; // wrong size
++nDocRow;
}
- BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
+ sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
if ( pUndoDoc )
{
@@ -1167,7 +1167,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark,
- pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) );
+ pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, false ) );
}
if (!bHeight)
@@ -1178,7 +1178,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
return !bError;
}
-BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
+sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
const uno::Sequence< uno::Sequence<rtl::OUString> >& aData,
const ::rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
@@ -1188,12 +1188,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) )
{
//! error message
- return FALSE;
+ return false;
}
long nCols = 0;
@@ -1205,7 +1205,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 )
{
//! error message?
- return FALSE;
+ return false;
}
ScDocument* pUndoDoc = NULL;
@@ -1213,14 +1213,14 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( rRange, IDF_CONTENTS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_CONTENTS, false, pUndoDoc );
}
pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
ScDocFunc aFunc( rDocShell ); // for InterpretEnglishString
- BOOL bError = FALSE;
+ sal_Bool bError = false;
SCROW nDocRow = nStartRow;
for (long nRow=0; nRow<nRows; nRow++)
{
@@ -1240,12 +1240,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
}
}
else
- bError = TRUE; // wrong size
+ bError = sal_True; // wrong size
++nDocRow;
}
- BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
+ sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab );
if ( pUndoDoc )
{
@@ -1254,7 +1254,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark,
- pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) );
+ pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, false ) );
}
if (!bHeight)
@@ -1266,7 +1266,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
}
// used in ScCellRangeObj::getFormulaArray and ScCellObj::GetInputString_Impl
-String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, BOOL bEnglish )
+String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, sal_Bool bEnglish )
{
String aVal;
if ( pDoc )
@@ -1339,10 +1339,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
pNoDfltCurrentDataSet( NULL ),
pMarkData( NULL ),
nObjectId( 0 ),
- bChartColAsHdr( FALSE ),
- bChartRowAsHdr( FALSE ),
- bCursorOnly( FALSE ),
- bGotDataChangedHint( FALSE ),
+ bChartColAsHdr( false ),
+ bChartRowAsHdr( false ),
+ bCursorOnly( false ),
+ bGotDataChangedHint( false ),
aValueListeners( 0 )
{
ScRange aCellRange(rR);
@@ -1368,10 +1368,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) :
pMarkData( NULL ),
aRanges( rR ),
nObjectId( 0 ),
- bChartColAsHdr( FALSE ),
- bChartRowAsHdr( FALSE ),
- bCursorOnly( FALSE ),
- bGotDataChangedHint( FALSE ),
+ bChartColAsHdr( false ),
+ bChartRowAsHdr( false ),
+ bCursorOnly( false ),
+ bGotDataChangedHint( false ),
aValueListeners( 0 )
{
if (pDocShell) // Null if created with createInstance
@@ -1426,7 +1426,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat()
if ( !pCurrentFlat && pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), FALSE );
+ pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), false );
}
return pCurrentFlat;
}
@@ -1438,7 +1438,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsDeep()
if ( !pCurrentDeep && pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), TRUE );
+ pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), sal_True );
}
return pCurrentDeep;
}
@@ -1464,7 +1464,7 @@ const ScMarkData* ScCellRangesBase::GetMarkData()
if (!pMarkData)
{
pMarkData = new ScMarkData();
- pMarkData->MarkFromRangeList( aRanges, FALSE );
+ pMarkData->MarkFromRangeList( aRanges, false );
}
return pMarkData;
}
@@ -1502,7 +1502,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// any change of the range address is broadcast to value (modify) listeners
if ( aValueListeners.Count() )
- bGotDataChangedHint = TRUE;
+ bGotDataChangedHint = sal_True;
if ( pUndoRanges )
pDoc->AddUnoRefChange( nObjectId, *pUndoRanges );
@@ -1512,7 +1512,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
ForgetCurrentAttrs();
@@ -1524,7 +1524,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aValueListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ )
(*aValueListeners[n])->disposing( aEvent );
aValueListeners.DeleteAndDestroy( 0, aValueListeners.Count() );
@@ -1554,10 +1554,10 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// the EventObject holds a Ref to this object until after the listener calls
ScDocument* pDoc = pDocShell->GetDocument();
- for ( USHORT n=0; n<aValueListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ )
pDoc->AddUnoListenerCall( *aValueListeners[n], aEvent );
- bGotDataChangedHint = FALSE;
+ bGotDataChangedHint = false;
}
}
else if ( nId == SC_HINT_CALCALL )
@@ -1566,7 +1566,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
// (SFX_HINT_DATACHANGED follows separately)
if ( aValueListeners.Count() )
- bGotDataChangedHint = TRUE;
+ bGotDataChangedHint = sal_True;
}
}
else if ( rHint.ISA( ScUnoRefUndoHint ) )
@@ -1580,7 +1580,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
RefChanged();
if ( aValueListeners.Count() )
- bGotDataChangedHint = TRUE; // need to broadcast the undo, too
+ bGotDataChangedHint = sal_True; // need to broadcast the undo, too
}
}
}
@@ -1652,7 +1652,7 @@ void ScCellRangesBase::SetNewRanges(const ScRangeList& rNew)
RefChanged();
}
-void ScCellRangesBase::SetCursorOnly( BOOL bSet )
+void ScCellRangesBase::SetCursorOnly( sal_Bool bSet )
{
// set for a selection object that is created from the cursor position
// without anything selected (may contain several sheets)
@@ -1731,7 +1731,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellRangesBase::getImplementationId()
// ---
-void ScCellRangesBase::PaintRanges_Impl( USHORT nPart )
+void ScCellRangesBase::PaintRanges_Impl( sal_uInt16 nPart )
{
for (size_t i = 0, nCount = aRanges.size(); i < nCount; ++i)
pDocShell->PostPaint( *aRanges[ i ], nPart );
@@ -1746,7 +1746,7 @@ double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunct
ScMarkData aMark(*GetMarkData());
aMark.MarkToSimple();
if (!aMark.IsMarked())
- aMark.SetMarkNegative(TRUE); // um Dummy Position angeben zu koennen
+ aMark.SetMarkNegative(sal_True); // um Dummy Position angeben zu koennen
ScAddress aDummy; // wenn nicht Marked, ignoriert wegen Negative
double fVal;
@@ -1766,12 +1766,12 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u
if ( !aRanges.empty() )
{
// only for clearContents: EDITATTR is only used if no contents are deleted
- USHORT nDelFlags = static_cast< USHORT >( nContentFlags & IDF_ALL );
+ sal_uInt16 nDelFlags = static_cast< sal_uInt16 >( nContentFlags & IDF_ALL );
if ( ( nContentFlags & IDF_EDITATTR ) && ( nContentFlags & IDF_CONTENTS ) == 0 )
nDelFlags |= IDF_EDITATTR;
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteContents( *GetMarkData(), nDelFlags, TRUE, TRUE );
+ aFunc.DeleteContents( *GetMarkData(), nDelFlags, sal_True, sal_True );
}
// sonst ist nichts zu tun
}
@@ -1784,7 +1784,7 @@ const SfxItemPropertyMap* ScCellRangesBase::GetItemPropertyMap()
}
void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry,
- USHORT& rItemWhich )
+ sal_uInt16& rItemWhich )
{
// Which-ID des betroffenen Items, auch wenn das Item die Property
// nicht alleine behandeln kann
@@ -1813,7 +1813,7 @@ void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry,
}
-beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry )
+beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry )
{
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
if ( nItemWhich ) // item wid (from map or special case)
@@ -1825,10 +1825,10 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c
const ScPatternAttr* pPattern = GetCurrentAttrsFlat();
if ( pPattern )
{
- SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, FALSE );
+ SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, false );
if ( nItemWhich == ATTR_VALUE_FORMAT && eState == SFX_ITEM_DEFAULT )
- eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, FALSE );
+ eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, false );
if ( eState == SFX_ITEM_SET )
eRet = beans::PropertyState_DIRECT_VALUE;
@@ -1869,7 +1869,7 @@ beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState( const rtl::OUS
throw uno::RuntimeException();
const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName );
lcl_GetPropertyWhich( pEntry, nItemWhich );
return GetOnePropertyState( nItemWhich, pEntry );
@@ -1885,9 +1885,9 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates
uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
- for(INT32 i = 0; i < aPropertyNames.getLength(); i++)
+ for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++)
{
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
lcl_GetPropertyWhich( pEntry, nItemWhich );
pStates[i] = GetOnePropertyState(nItemWhich, pEntry);
@@ -1902,7 +1902,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
if ( pDocShell )
{
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName );
lcl_GetPropertyWhich( pEntry, nItemWhich );
if ( nItemWhich ) // item wid (from map or special case)
@@ -1916,7 +1916,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
// //! for ATTR_ROTATE_VALUE, also reset ATTR_ORIENTATION?
- USHORT aWIDs[3];
+ sal_uInt16 aWIDs[3];
aWIDs[0] = nItemWhich;
if ( nItemWhich == ATTR_VALUE_FORMAT )
{
@@ -1925,19 +1925,19 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
}
else
aWIDs[1] = 0;
- aFunc.ClearItems( *GetMarkData(), aWIDs, TRUE );
+ aFunc.ClearItems( *GetMarkData(), aWIDs, sal_True );
}
}
else if ( pEntry )
{
if ( pEntry->nWID == SC_WID_UNO_CHCOLHDR )
- bChartColAsHdr = FALSE;
+ bChartColAsHdr = false;
else if ( pEntry->nWID == SC_WID_UNO_CHROWHDR )
- bChartRowAsHdr = FALSE;
+ bChartRowAsHdr = false;
else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), TRUE, TRUE );
+ aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), sal_True, sal_True );
}
}
}
@@ -1986,7 +1986,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
{
case SC_WID_UNO_CHCOLHDR:
case SC_WID_UNO_CHROWHDR:
- ScUnoHelpFunctions::SetBoolInAny( aAny, FALSE );
+ ScUnoHelpFunctions::SetBoolInAny( aAny, false );
break;
case SC_WID_UNO_CELLSTYL:
aAny <<= rtl::OUString( ScStyleNameConversion::DisplayToProgrammaticName(
@@ -2009,8 +2009,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
case SC_WID_UNO_CONDLOC:
case SC_WID_UNO_CONDXML:
{
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2023,8 +2023,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
case SC_WID_UNO_VALILOC:
case SC_WID_UNO_VALIXML:
{
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2058,7 +2058,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySe
void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rValue,
ScPatternAttr& rPattern, ScDocument* pDoc,
- USHORT& rFirstItemId, USHORT& rSecondItemId )
+ sal_uInt16& rFirstItemId, sal_uInt16& rSecondItemId )
{
rFirstItemId = rEntry.nWID;
rSecondItemId = 0;
@@ -2070,14 +2070,14 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
{
// language for number formats
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- ULONG nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue();
+ sal_uLong nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
nOldFormat = pFormatter->GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
sal_Int32 nIntVal = 0;
if ( rValue >>= nIntVal )
{
- ULONG nNewFormat = (ULONG)nIntVal;
+ sal_uLong nNewFormat = (sal_uLong)nIntVal;
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
const SvNumberformat* pNewEntry = pFormatter->GetEntry( nNewFormat );
@@ -2089,7 +2089,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
// if only language is changed,
// don't touch number format attribute
- ULONG nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET;
+ sal_uLong nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET;
if ( nNewMod == ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) &&
nNewMod <= SV_MAX_ANZ_STANDARD_FORMATE )
{
@@ -2107,7 +2107,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
{
sal_Int16 nIntVal = 0;
if ( rValue >>= nIntVal )
- rSet.Put( SfxUInt16Item( rEntry.nWID, (USHORT)HMMToTwips(nIntVal) ) );
+ rSet.Put( SfxUInt16Item( rEntry.nWID, (sal_uInt16)HMMToTwips(nIntVal) ) );
else
throw lang::IllegalArgumentException();
}
@@ -2136,20 +2136,20 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A
switch( eOrient )
{
case table::CellOrientation_STANDARD:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
break;
case table::CellOrientation_TOPBOTTOM:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
rSecondItemId = ATTR_ROTATE_VALUE;
break;
case table::CellOrientation_BOTTOMTOP:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
rSecondItemId = ATTR_ROTATE_VALUE;
break;
case table::CellOrientation_STACKED:
- rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) );
break;
default:
{
@@ -2208,14 +2208,14 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
SfxItemSet& rSet = aPattern.GetItemSet();
rSet.ClearInvalidItems();
- USHORT nFirstItem, nSecondItem;
+ sal_uInt16 nFirstItem, nSecondItem;
lcl_SetCellProperty( *pEntry, aValue, aPattern, pDoc, nFirstItem, nSecondItem );
- for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
+ for (sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
if ( nWhich != nFirstItem && nWhich != nSecondItem )
rSet.ClearItem(nWhich);
- aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
}
}
else // implemented here
@@ -2269,7 +2269,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
String aString(ScStyleNameConversion::ProgrammaticToDisplayName(
aStrVal, SFX_STYLE_FAMILY_PARA ));
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyStyle( *GetMarkData(), aString, TRUE, TRUE );
+ aFunc.ApplyStyle( *GetMarkData(), aString, sal_True, sal_True );
}
break;
case SC_WID_UNO_TBLBORD:
@@ -2297,8 +2297,8 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (pFormat)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2307,13 +2307,13 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
pFormat->FillFormat( aNew, pDoc, eGrammar );
ScRangeListRef pRanges = new ScRangeList( aRanges );
aNew.AddRangeInfo( pRanges );
- ULONG nIndex = pDoc->AddCondFormat( aNew );
+ sal_uLong nIndex = pDoc->AddCondFormat( aNew );
ScDocFunc aFunc(*pDocShell);
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nIndex ) );
- aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
}
}
}
@@ -2330,22 +2330,22 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (pValidObj)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
ScValidationData* pNewData =
pValidObj->CreateValidationData( pDoc, eGrammar );
- ULONG nIndex = pDoc->AddValidationEntry( *pNewData );
+ sal_uLong nIndex = pDoc->AddValidationEntry( *pNewData );
delete pNewData;
ScDocFunc aFunc(*pDocShell);
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
- aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
}
}
}
@@ -2391,7 +2391,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
{
ScDocument* pDoc = pDocShell->GetDocument();
- ULONG nOldFormat = ((const SfxUInt32Item&)
+ sal_uLong nOldFormat = ((const SfxUInt32Item&)
pDataSet->Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)
pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
@@ -2407,7 +2407,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
case ATTR_STACKED:
{
sal_Int32 nRot = ((const SfxInt32Item&)pDataSet->Get(ATTR_ROTATE_VALUE)).GetValue();
- BOOL bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue();
+ sal_Bool bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( rAny );
}
break;
@@ -2447,7 +2447,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
ScDocument* pDoc = pDocShell->GetDocument();
ScMarkData aMark;
aMark.SetMarkArea( *pFirst );
- aMark.SelectTable( pFirst->aStart.Tab(), TRUE );
+ aMark.SelectTable( pFirst->aStart.Tab(), sal_True );
pDoc->GetSelectionFrame( aMark, aOuter, aInner );
table::TableBorder aBorder;
@@ -2464,12 +2464,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( pPattern )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
- ULONG nIndex = ((const SfxUInt32Item&)
+ sal_uLong nIndex = ((const SfxUInt32Item&)
pPattern->GetItem(ATTR_CONDITIONAL)).GetValue();
rAny <<= uno::Reference<sheet::XSheetConditionalEntries>(
new ScTableConditionalFormat( pDoc, nIndex, eGrammar ));
@@ -2484,12 +2484,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( pPattern )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
+ sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
- ULONG nIndex = ((const SfxUInt32Item&)
+ sal_uLong nIndex = ((const SfxUInt32Item&)
pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
rAny <<= uno::Reference<beans::XPropertySet>(
new ScTableValidationObj( pDoc, nIndex, eGrammar ));
@@ -2622,7 +2622,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
// collect items in pNewPattern, apply with one call after the loop
- USHORT nFirstItem, nSecondItem;
+ sal_uInt16 nFirstItem, nSecondItem;
lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
// put only affected items into new set
@@ -2642,7 +2642,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
if ( pNewPattern && !aRanges.empty() )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True );
}
delete pNewPattern;
@@ -2661,7 +2661,7 @@ uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues(
uno::Sequence<uno::Any> aRet(aPropertyNames.getLength());
uno::Any* pProperties = aRet.getArray();
- for(INT32 i = 0; i < aPropertyNames.getLength(); i++)
+ for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++)
{
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
GetOnePropertyValue( pEntry, pProperties[i] );
@@ -2698,7 +2698,7 @@ IMPL_LINK( ScCellRangesBase, ValueListenerHdl, SfxHint*, pHint )
// in the range are notified. So only a flag is set that is checked when
// SFX_HINT_DATACHANGED is received.
- bGotDataChangedHint = TRUE;
+ bGotDataChangedHint = sal_True;
}
return 0;
}
@@ -2773,7 +2773,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
// collect items in pNewPattern, apply with one call after the loop
- USHORT nFirstItem, nSecondItem;
+ sal_uInt16 nFirstItem, nSecondItem;
try
{
lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
@@ -2817,7 +2817,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
if ( pNewPattern && !aRanges.empty() )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True );
}
delete pNewPattern;
@@ -2842,7 +2842,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- for(INT32 i = 0; i < nCount; i++)
+ for(sal_Int32 i = 0; i < nCount; i++)
{
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
if (!pEntry)
@@ -2851,7 +2851,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get
}
else
{
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
lcl_GetPropertyWhich( pEntry, nItemWhich );
pReturns[i].State = GetOnePropertyState( nItemWhich, pEntry );
GetOnePropertyValue( pEntry, pReturns[i].Value );
@@ -2872,8 +2872,8 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- INT32 j = 0;
- for(INT32 i = 0; i < nCount; i++)
+ sal_Int32 j = 0;
+ for(sal_Int32 i = 0; i < nCount; i++)
{
const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
if (!pEntry)
@@ -2882,7 +2882,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas
}
else
{
- USHORT nItemWhich = 0;
+ sal_uInt16 nItemWhich = 0;
lcl_GetPropertyWhich( pEntry, nItemWhich );
pReturns[j].State = GetOnePropertyState( nItemWhich, pEntry );
if (pReturns[j].State == beans::PropertyState_DIRECT_VALUE)
@@ -2910,7 +2910,7 @@ void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::R
//#97041#; put only MultiMarked ScMarkData in ChangeIndent
ScMarkData aMarkData(*GetMarkData());
aMarkData.MarkToMulti();
- aFunc.ChangeIndent( aMarkData, FALSE, TRUE );
+ aFunc.ChangeIndent( aMarkData, false, sal_True );
}
}
@@ -2923,7 +2923,7 @@ void SAL_CALL ScCellRangesBase::incrementIndent() throw(::com::sun::star::uno::R
//#97041#; put only MultiMarked ScMarkData in ChangeIndent
ScMarkData aMarkData(*GetMarkData());
aMarkData.MarkToMulti();
- aFunc.ChangeIndent( aMarkData, TRUE, TRUE );
+ aFunc.ChangeIndent( aMarkData, sal_True, sal_True );
}
}
@@ -3044,7 +3044,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
long nRowCount = aData.getLength();
long nColCount = nRowCount ? aData[0].getLength() : 0;
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount );
@@ -3084,7 +3084,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
PaintRanges_Impl( PAINT_GRID );
pDocShell->SetDocumentModified();
ForceChartListener_Impl(); // call listeners for this object synchronously
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -3117,7 +3117,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bChartColAsHdr )
{
long nRowCount = aRowDescriptions.getLength();
@@ -3151,7 +3151,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
PaintRanges_Impl( PAINT_GRID );
pDocShell->SetDocumentModified();
ForceChartListener_Impl(); // call listeners for this object synchronously
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -3185,7 +3185,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bChartRowAsHdr )
{
long nColCount = aColumnDescriptions.getLength();
@@ -3219,7 +3219,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
PaintRanges_Impl( PAINT_GRID );
pDocShell->SetDocumentModified();
ForceChartListener_Impl(); // call listeners for this object synchronously
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -3239,8 +3239,8 @@ void ScCellRangesBase::ForceChartListener_Impl()
ScChartListenerCollection* pColl = pDocShell->GetDocument()->GetChartListenerCollection();
if ( pColl )
{
- USHORT nCollCount = pColl->GetCount();
- for ( USHORT nIndex = 0; nIndex < nCollCount; nIndex++ )
+ sal_uInt16 nCollCount = pColl->GetCount();
+ for ( sal_uInt16 nIndex = 0; nIndex < nCollCount; nIndex++ )
{
ScChartListener* pChartListener = (ScChartListener*)pColl->At(nIndex);
if ( pChartListener &&
@@ -3255,16 +3255,16 @@ void ScCellRangesBase::ForceChartListener_Impl()
String lcl_UniqueName( ScStrCollection& rColl, const String& rPrefix )
{
long nNumber = 1;
- USHORT nCollCount = rColl.GetCount();
- while (TRUE)
+ sal_uInt16 nCollCount = rColl.GetCount();
+ while (sal_True)
{
String aName(rPrefix);
aName += String::CreateFromInt32( nNumber );
- BOOL bFound = FALSE;
- for (USHORT i=0; i<nCollCount; i++)
+ sal_Bool bFound = false;
+ for (sal_uInt16 i=0; i<nCollCount; i++)
if ( rColl[i]->GetString() == aName )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
if (!bFound)
@@ -3355,8 +3355,8 @@ void SAL_CALL ScCellRangesBase::removeModifyListener( const uno::Reference<util:
acquire(); // in case the listeners have the last ref - released below
- USHORT nCount = aValueListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aValueListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XModifyListener> *pObj = aValueListeners[n];
if ( *pObj == aListener )
@@ -3413,7 +3413,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
}
ScRangeList aNewRanges;
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges );
}
@@ -3443,7 +3443,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel
if ( !pCell->IsBlank() )
aMarkData.SetMultiMarkArea(
ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ),
- FALSE );
+ false );
pCell = aIter.GetNext();
}
@@ -3452,7 +3452,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel
ScRangeList aNewRanges;
// IsMultiMarked reicht hier nicht (wird beim deselektieren nicht zurueckgesetzt)
if (aMarkData.HasAnyMultiMarks())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3480,33 +3480,33 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
ScBaseCell* pCell = aIter.GetFirst();
while (pCell)
{
- BOOL bAdd = FALSE;
+ sal_Bool bAdd = false;
if ( pCell->HasNote() && ( nContentFlags & sheet::CellFlags::ANNOTATION ) )
- bAdd = TRUE;
+ bAdd = sal_True;
else
switch ( pCell->GetCellType() )
{
case CELLTYPE_STRING:
if ( nContentFlags & sheet::CellFlags::STRING )
- bAdd = TRUE;
+ bAdd = sal_True;
break;
case CELLTYPE_EDIT:
if ( (nContentFlags & sheet::CellFlags::STRING) || (nContentFlags & sheet::CellFlags::FORMATTED) )
- bAdd = TRUE;
+ bAdd = sal_True;
break;
case CELLTYPE_FORMULA:
if ( nContentFlags & sheet::CellFlags::FORMULA )
- bAdd = TRUE;
+ bAdd = sal_True;
break;
case CELLTYPE_VALUE:
if ( (nContentFlags & (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME))
== (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME) )
- bAdd = TRUE;
+ bAdd = sal_True;
else
{
// Date/Time Erkennung
- ULONG nIndex = (ULONG)((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = (sal_uLong)((SfxUInt32Item*)pDoc->GetAttr(
aIter.GetCol(), aIter.GetRow(), aIter.GetTab(),
ATTR_VALUE_FORMAT ))->GetValue();
short nTyp = pDoc->GetFormatTable()->GetType(nIndex);
@@ -3514,12 +3514,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
(nTyp == NUMBERFORMAT_DATETIME))
{
if ( nContentFlags & sheet::CellFlags::DATETIME )
- bAdd = TRUE;
+ bAdd = sal_True;
}
else
{
if ( nContentFlags & sheet::CellFlags::VALUE )
- bAdd = TRUE;
+ bAdd = sal_True;
}
}
break;
@@ -3532,7 +3532,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
if (bAdd)
aMarkData.SetMultiMarkArea(
ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ),
- TRUE );
+ sal_True );
pCell = aIter.GetNext();
}
@@ -3540,7 +3540,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
ScRangeList aNewRanges;
if (aMarkData.IsMultiMarked())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3571,27 +3571,27 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
- BOOL bAdd = FALSE;
+ sal_Bool bAdd = false;
if (pFCell->GetErrCode())
{
if ( nResultFlags & sheet::FormulaResult::ERROR )
- bAdd = TRUE;
+ bAdd = sal_True;
}
else if (pFCell->IsValue())
{
if ( nResultFlags & sheet::FormulaResult::VALUE )
- bAdd = TRUE;
+ bAdd = sal_True;
}
else // String
{
if ( nResultFlags & sheet::FormulaResult::STRING )
- bAdd = TRUE;
+ bAdd = sal_True;
}
if (bAdd)
aMarkData.SetMultiMarkArea(
ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ),
- TRUE );
+ sal_True );
}
pCell = aIter.GetNext();
@@ -3600,7 +3600,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
ScRangeList aNewRanges;
if (aMarkData.IsMultiMarked())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3609,7 +3609,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
}
uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
- const table::CellAddress& aCompare, BOOL bColumnDiff)
+ const table::CellAddress& aCompare, sal_Bool bColumnDiff)
{
if (pDocShell)
{
@@ -3686,7 +3686,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
if ( !ScBaseCell::CellEqual( pCell, pOtherCell ) )
aMarkData.SetMultiMarkArea( aOneRange );
else
- aMarkData.SetMultiMarkArea( aOneRange, FALSE ); // deselect
+ aMarkData.SetMultiMarkArea( aOneRange, false ); // deselect
pCell = aIter.GetNext();
}
@@ -3694,7 +3694,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
ScRangeList aNewRanges;
if (aMarkData.IsMultiMarked())
- aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, false );
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
@@ -3705,14 +3705,14 @@ uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnD
const table::CellAddress& aCompare ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- return QueryDifferences_Impl( aCompare, TRUE );
+ return QueryDifferences_Impl( aCompare, true );
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryRowDifferences(
const table::CellAddress& aCompare ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- return QueryDifferences_Impl( aCompare, FALSE );
+ return QueryDifferences_Impl( aCompare, false );
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersection(
@@ -3749,14 +3749,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
ScDocument* pDoc = pDocShell->GetDocument();
ScRangeList aNewRanges(aRanges);
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
+ bFound = false;
// aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( aNewRanges, FALSE );
+ aMarkData.MarkFromRangeList( aNewRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
for (size_t nR = 0, nCount = aNewRanges.size(); nR<nCount; ++nR)
@@ -3775,15 +3775,15 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
while ( aRefIter.GetNextRef( aRefRange) )
{
if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aRefRange ) )
- bFound = TRUE;
- aMarkData.SetMultiMarkArea( aRefRange, TRUE );
+ bFound = sal_True;
+ aMarkData.SetMultiMarkArea( aRefRange, sal_True );
}
}
pCell = aIter.GetNext();
}
}
- aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True );
}
while ( bRecursive && bFound );
@@ -3802,14 +3802,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
ScDocument* pDoc = pDocShell->GetDocument();
ScRangeList aNewRanges(aRanges);
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
+ bFound = false;
// aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( aNewRanges, FALSE );
+ aMarkData.MarkFromRangeList( aNewRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
SCTAB nTab = lcl_FirstTab(aNewRanges); //! alle Tabellen
@@ -3820,7 +3820,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
{
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- BOOL bMark = FALSE;
+ sal_Bool bMark = false;
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRefRange;
while ( aIter.GetNextRef( aRefRange) )
@@ -3830,7 +3830,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
{
ScRange aRange( *aNewRanges[ nR ] );
if (aRange.Intersects(aRefRange))
- bMark = TRUE; // von Teil des Ranges abhaengig
+ bMark = sal_True; // von Teil des Ranges abhaengig
}
}
if (bMark)
@@ -3839,14 +3839,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
aCellIter.GetRow(),
aCellIter.GetTab() );
if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aCellRange ) )
- bFound = TRUE;
- aMarkData.SetMultiMarkArea( aCellRange, TRUE );
+ bFound = sal_True;
+ aMarkData.SetMultiMarkArea( aCellRange, sal_True );
}
}
pCell = aCellIter.GetNext();
}
- aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE );
+ aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True );
}
while ( bRecursive && bFound );
@@ -3890,12 +3890,12 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll(
SCCOL nCol = 0;
SCROW nRow = 0;
SCTAB nTab = 0;
- BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
+ sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
aMark, aDummyUndo, NULL );
if (bFound)
{
ScRangeList aNewRanges;
- aMark.FillRangeListWithMarks( &aNewRanges, TRUE );
+ aMark.FillRangeListWithMarks( &aNewRanges, sal_True );
// bei findAll immer CellRanges, egal wieviel gefunden wurde
xRet.set(new ScCellRangesObj( pDocShell, aNewRanges ));
}
@@ -3937,7 +3937,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl(
}
String aDummyUndo;
- BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
+ sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
aMark, aDummyUndo, NULL );
if (bFound)
{
@@ -4003,7 +4003,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
if (pSearchItem)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE_ALL );
// immer nur innerhalb dieses Objekts
pSearchItem->SetSelection( !lcl_WholeSheet(aRanges) );
@@ -4011,10 +4011,10 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
ScMarkData aMark(*GetMarkData());
SCTAB nTabCount = pDoc->GetTableCount();
- BOOL bProtected = !pDocShell->IsEditable();
+ sal_Bool bProtected = !pDocShell->IsEditable();
for (SCTAB i=0; i<nTabCount; i++)
if ( aMark.GetTableSelect(i) && pDoc->IsTabProtected(i) )
- bProtected = TRUE;
+ bProtected = sal_True;
if (bProtected)
{
//! Exception, oder was?
@@ -4039,7 +4039,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
if (bUndo)
pUndoMark = new ScMarkData(aMark);
- BOOL bFound(FALSE);
+ sal_Bool bFound(false);
if (bUndo)
bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab,
aMark, aUndoStr, pUndoDoc );
@@ -4270,8 +4270,8 @@ void SAL_CALL ScCellRangesObj::addRangeAddress( const table::CellRangeAddress& r
void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange )
{
- USHORT nCount = rNamedEntries.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = rNamedEntries.Count();
+ for ( sal_uInt16 n=nCount; n--; )
if ( rNamedEntries[n]->GetRange() == rRange )
rNamedEntries.DeleteAndDestroy( n );
}
@@ -4297,7 +4297,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
}
}
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( aSheetRanges, FALSE );
+ aMarkData.MarkFromRangeList( aSheetRanges, false );
ScRange aRange(static_cast<SCCOL>(rRange.StartColumn),
static_cast<SCROW>(rRange.StartRow),
static_cast<SCTAB>(rRange.Sheet),
@@ -4309,7 +4309,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
aMarkData.MarkToMulti();
if (aMarkData.IsAllMarked( aRange ) )
{
- aMarkData.SetMultiMarkArea( aRange, FALSE );
+ aMarkData.SetMultiMarkArea( aRange, false );
lcl_RemoveNamedEntry(aNamedEntries, aRange);
}
else
@@ -4317,10 +4317,10 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
}
SetNewRanges(aNotSheetRanges);
ScRangeList aNew;
- aMarkData.FillRangeListWithMarks( &aNew, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNew, false );
for ( size_t j = 0; j < aNew.size(); ++j)
{
- AddRange(*aNew[ j ], sal_False);
+ AddRange(*aNew[ j ], false);
}
}
@@ -4366,8 +4366,8 @@ void SAL_CALL ScCellRangesObj::removeRangeAddresses( const uno::Sequence<table::
void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const String& rName )
{
- USHORT nCount = rNamedEntries.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = rNamedEntries.Count();
+ for ( sal_uInt16 n=nCount; n--; )
if ( rNamedEntries[n]->GetName() == rName )
rNamedEntries.DeleteAndDestroy( n );
}
@@ -4378,7 +4378,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
{
SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
//! Type of aElement can be some specific interface instead of XInterface
@@ -4393,8 +4393,8 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
String aNamStr(aName);
if ( aNamStr.Len() )
{
- USHORT nNamedCount = aNamedEntries.Count();
- for (USHORT n=0; n<nNamedCount; n++)
+ sal_uInt16 nNamedCount = aNamedEntries.Count();
+ for (sal_uInt16 n=0; n<nNamedCount; n++)
if ( aNamedEntries[n]->GetName() == aNamStr )
throw container::ElementExistException();
}
@@ -4405,7 +4405,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
for ( size_t i = 0; i < nAddCount; i++ )
aNew.Join( *rAddRanges[ i ] );
SetNewRanges(aNew);
- bDone = TRUE;
+ bDone = sal_True;
if ( aName.getLength() && nAddCount == 1 )
{
@@ -4426,7 +4426,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
}
}
-BOOL lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh,
+sal_Bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh,
const String& rName, size_t& rIndex )
{
if (pDocSh)
@@ -4439,14 +4439,14 @@ BOOL lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh,
if ( aRangeStr == rName )
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE; // nicht gefunden
+ return false; // nicht gefunden
}
-BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
+sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
const ScRangeList& rRanges, ScDocShell* pDocSh,
const String& rName, ScRange& rFound )
{
@@ -4456,22 +4456,22 @@ BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
if ( lcl_FindRangeByName( rRanges, pDocSh, rName, nIndex ) )
{
rFound = *rRanges[ nIndex ];
- return TRUE;
+ return true;
}
// range contained in selection? (sheet must be specified)
ScRange aCellRange;
- USHORT nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() );
+ sal_uInt16 nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() );
if ( ( nParse & ( SCA_VALID | SCA_TAB_3D ) ) == ( SCA_VALID | SCA_TAB_3D ) )
{
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
if ( aMarkData.IsAllMarked( aCellRange ) )
{
rFound = aCellRange;
- return TRUE;
+ return sal_True;
}
}
@@ -4479,24 +4479,24 @@ BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries,
if ( rNamedEntries.Count() )
{
- for ( USHORT n=0; n<rNamedEntries.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rNamedEntries.Count(); n++ )
if ( rNamedEntries[n]->GetName() == rName )
{
// test if named entry is contained in rRanges
const ScRange& rComp = rNamedEntries[n]->GetRange();
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
aMarkData.MarkToMulti(); // needed for IsAllMarked
if ( aMarkData.IsAllMarked( rComp ) )
{
rFound = rComp;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE; // not found
+ return false; // not found
}
void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
@@ -4504,7 +4504,7 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
String aNameStr(aName);
ScDocShell* pDocSh = GetDocShell();
const ScRangeList& rRanges = GetRangeList();
@@ -4517,41 +4517,41 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
if (i != nIndex)
aNew.Append( *rRanges[ i ] );
SetNewRanges(aNew);
- bDone = TRUE;
+ bDone = sal_True;
}
else if (pDocSh)
{
// deselect any ranges (parsed or named entry)
ScRangeList aDiff;
- BOOL bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0;
+ sal_Bool bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0;
if ( !bValid && aNamedEntries.Count() )
{
- USHORT nCount = aNamedEntries.Count();
- for (USHORT n=0; n<nCount && !bValid; n++)
+ sal_uInt16 nCount = aNamedEntries.Count();
+ for (sal_uInt16 n=0; n<nCount && !bValid; n++)
if (aNamedEntries[n]->GetName() == aNameStr)
{
aDiff.RemoveAll();
aDiff.Append( aNamedEntries[n]->GetRange() );
- bValid = TRUE;
+ bValid = sal_True;
}
}
if ( bValid )
{
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
for ( size_t i = 0, nDiffCount = aDiff.size(); i < nDiffCount; i++ )
{
ScRange* pDiffRange = aDiff[ i ];
if (aMarkData.GetTableSelect( pDiffRange->aStart.Tab() ))
- aMarkData.SetMultiMarkArea( *pDiffRange, FALSE );
+ aMarkData.SetMultiMarkArea( *pDiffRange, false );
}
ScRangeList aNew;
- aMarkData.FillRangeListWithMarks( &aNew, FALSE );
+ aMarkData.FillRangeListWithMarks( &aNew, false );
SetNewRanges(aNew);
- bDone = TRUE; //! error if range was not selected before?
+ bDone = sal_True; //! error if range was not selected before?
}
}
@@ -4601,17 +4601,17 @@ uno::Any SAL_CALL ScCellRangesObj::getByName( const rtl::OUString& aName )
return aRet;
}
-BOOL lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries,
+sal_Bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries,
const ScRange& rRange, String& rName )
{
- USHORT nCount = rNamedEntries.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rNamedEntries.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if (rNamedEntries[i]->GetRange() == rRange)
{
rName = rNamedEntries[i]->GetName();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames()
@@ -4932,9 +4932,9 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName(
SCTAB nTab = aRange.aStart.Tab();
ScRange aCellRange;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
String aString(aName);
- USHORT nParse = aCellRange.ParseAny( aString, pDoc, rDetails );
+ sal_uInt16 nParse = aCellRange.ParseAny( aString, pDoc, rDetails );
if ( nParse & SCA_VALID )
{
if ( !(nParse & SCA_TAB_3D) ) // keine Tabelle angegeben -> auf dieser Tabelle
@@ -4942,20 +4942,20 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName(
aCellRange.aStart.SetTab(nTab);
aCellRange.aEnd.SetTab(nTab);
}
- bFound = TRUE;
+ bFound = sal_True;
}
else
{
ScRangeUtil aRangeUtil;
if ( aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_NAMES ) ||
aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_DBASE ) )
- bFound = TRUE;
+ bFound = sal_True;
}
if (bFound) // valid only if within this object's range
{
if (!aRange.In(aCellRange))
- bFound = FALSE;
+ bFound = false;
}
if (bFound)
@@ -5069,15 +5069,15 @@ void ScCellRangeObj::SetArrayFormula_Impl( const rtl::OUString& rFormula,
throw uno::RuntimeException();
}
- aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, TRUE, TRUE, rFormulaNmsp, eGrammar );
+ aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, sal_True, sal_True, rFormulaNmsp, eGrammar );
}
else
{
// empty string -> erase array formula
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( aRange.aStart.Tab(), TRUE );
- aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE );
+ aMark.SelectTable( aRange.aStart.Tab(), sal_True );
+ aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True );
}
}
}
@@ -5154,15 +5154,15 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula
// Actually GRAM_PODF_A1 is a don't-care here because of the token
// array being set, it fits with other API compatibility grammars
// though.
- aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, TRUE, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, sal_True, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
else
{
// empty sequence -> erase array formula
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( aRange.aStart.Tab(), TRUE );
- aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE );
+ aMark.SelectTable( aRange.aStart.Tab(), sal_True );
+ aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True );
}
}
}
@@ -5185,7 +5185,7 @@ uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray()
{
uno::Any aAny;
// bAllowNV = TRUE: errors as void
- if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, TRUE ) )
+ if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, sal_True ) )
{
uno::Sequence< uno::Sequence<uno::Any> > aSeq;
if ( aAny >>= aSeq )
@@ -5202,7 +5202,7 @@ void SAL_CALL ScCellRangeObj::setDataArray(
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5246,7 +5246,7 @@ uno::Sequence< uno::Sequence<rtl::OUString> > SAL_CALL ScCellRangeObj::getFormul
rtl::OUString* pColAry = aColSeq.getArray();
for (SCCOL nColIndex = 0; nColIndex < nColCount; nColIndex++)
pColAry[nColIndex] = lcl_GetInputString( pDocSh->GetDocument(),
- ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), TRUE );
+ ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), sal_True );
pRowAry[nRowIndex] = aColSeq;
}
@@ -5263,7 +5263,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray(
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5289,20 +5289,20 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
- BOOL bError = FALSE;
+ sal_Bool bError = false;
ScTabOpParam aParam;
aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn,
(SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn,
(SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column,
(SCROW)aRowCell.Row, aRowCell.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column,
(SCROW)aColumnCell.Row, aColumnCell.Sheet,
- FALSE, FALSE, FALSE );
+ false, false, false );
switch (nMode)
{
case sheet::TableOperationMode_COLUMN:
@@ -5315,13 +5315,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
aParam.nMode = 2;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if (!bError)
{
ScDocFunc aFunc(*pDocSh);
- aFunc.TabOp( aRange, NULL, aParam, TRUE, TRUE );
+ aFunc.TabOp( aRange, NULL, aParam, sal_True, sal_True );
}
}
}
@@ -5340,9 +5340,9 @@ void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeExcepti
aRange.aEnd.Col(), aRange.aEnd.Row(), false);
aMergeOption.maTabs.insert(aRange.aStart.Tab());
if ( bMerge )
- aFunc.MergeCells( aMergeOption, FALSE, TRUE, TRUE );
+ aFunc.MergeCells( aMergeOption, false, true, true );
else
- aFunc.UnmergeCells( aMergeOption, TRUE, TRUE );
+ aFunc.UnmergeCells( aMergeOption, true, true );
//! Fehler abfangen?
}
@@ -5365,7 +5365,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bError = FALSE;
+ sal_Bool bError = false;
FillDir eDir = FILL_TO_BOTTOM;
switch (nFillDirection)
@@ -5383,7 +5383,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
eDir = FILL_TO_LEFT;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
FillCmd eCmd = FILL_SIMPLE;
@@ -5405,7 +5405,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
eCmd = FILL_AUTO;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
FillDateCmd eDateCmd = FILL_DAY;
@@ -5424,14 +5424,14 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
eDateCmd = FILL_YEAR;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if (!bError)
{
ScDocFunc aFunc(*pDocSh);
aFunc.FillSeries( aRange, NULL, eDir, eCmd, eDateCmd,
- MAXDOUBLE, fStep, fEndValue, TRUE, TRUE );
+ MAXDOUBLE, fStep, fEndValue, sal_True, sal_True );
}
}
}
@@ -5446,7 +5446,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
ScRange aSourceRange(aRange);
SCsCOLROW nCount = 0; // "Dest-Count"
FillDir eDir = FILL_TO_BOTTOM;
- BOOL bError = FALSE;
+ sal_Bool bError = false;
switch (nFillDirection)
{
case sheet::FillDirection_TO_BOTTOM:
@@ -5470,15 +5470,15 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
eDir = FILL_TO_LEFT;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if (nCount < 0 || nCount > MAXROW) // overflow
- bError = TRUE;
+ bError = sal_True;
if (!bError)
{
ScDocFunc aFunc(*pDocSh);
- aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, TRUE, TRUE );
+ aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, sal_True, sal_True );
}
}
}
@@ -5494,8 +5494,8 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName )
if ( pDocSh && pAutoFormat )
{
String aNameString(aName);
- USHORT nCount = pAutoFormat->GetCount();
- USHORT nIndex;
+ sal_uInt16 nCount = pAutoFormat->GetCount();
+ sal_uInt16 nIndex;
String aCompare;
for (nIndex=0; nIndex<nCount; nIndex++)
{
@@ -5506,7 +5506,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName )
if (nIndex<nCount)
{
ScDocFunc aFunc(*pDocSh);
- aFunc.AutoFormat( aRange, NULL, nIndex, TRUE, TRUE );
+ aFunc.AutoFormat( aRange, NULL, nIndex, sal_True, sal_True );
}
else
throw lang::IllegalArgumentException();
@@ -5535,7 +5535,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createSortDescripto
SCCOLROW nFieldStart = aParam.bByRow ?
static_cast<SCCOLROW>(aDBRange.aStart.Col()) :
static_cast<SCCOLROW>(aDBRange.aStart.Row());
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart )
aParam.nField[i] -= nFieldStart;
}
@@ -5553,7 +5553,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
- USHORT i;
+ sal_uInt16 i;
ScSortParam aParam;
ScDBData* pData = pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
if (pData)
@@ -5587,7 +5587,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein
- aFunc.Sort( nTab, aParam, TRUE, TRUE, TRUE );
+ aFunc.Sort( nTab, aParam, sal_True, sal_True, sal_True );
}
}
@@ -5690,7 +5690,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
//! if created by createFilterDescriptorByObject ???
ScDBDocFunc aFunc(*pDocSh);
- aFunc.Query( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein
+ aFunc.Query( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein
}
}
@@ -5717,7 +5717,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
ScFilterDescriptor* pNew = new ScFilterDescriptor(pDocSh); //! stattdessen vom Objekt?
ScQueryParam aParam = pNew->GetParam();
- aParam.bHasHeader = TRUE;
+ aParam.bHasHeader = sal_True;
table::CellRangeAddress aDataAddress(xAddr->getRangeAddress());
aParam.nCol1 = (SCCOL)aDataAddress.StartColumn;
@@ -5727,7 +5727,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
aParam.nTab = aDataAddress.Sheet;
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bOk = pDoc->CreateQueryParam(
+ sal_Bool bOk = pDoc->CreateQueryParam(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
aRange.aStart.Tab(), aParam );
@@ -5779,7 +5779,7 @@ uno::Reference<sheet::XSubTotalDescriptor> SAL_CALL ScCellRangeObj::createSubTot
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOL nFieldStart = aDBRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( aParam.bGroupActive[i] )
{
@@ -5815,7 +5815,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
// im SubTotalDescriptor sind die Fields innerhalb des Bereichs gezaehlt
SCCOL nFieldStart = aRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( aParam.bGroupActive[i] )
{
@@ -5836,7 +5836,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DoSubTotals( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein
+ aFunc.DoSubTotals( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein
}
}
@@ -5852,7 +5852,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException)
if (pData)
pData->GetSubTotalParam(aParam); // auch bei Remove die Feld-Eintraege behalten
- aParam.bRemoveOnly = TRUE;
+ aParam.bRemoveOnly = sal_True;
SCTAB nTab = aRange.aStart.Tab();
aParam.nCol1 = aRange.aStart.Col();
@@ -5863,7 +5863,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException)
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DoSubTotals( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein
+ aFunc.DoSubTotals( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein
}
}
@@ -5908,7 +5908,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein
- aFunc.DoImport( nTab, aParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag als Parameter
+ aFunc.DoImport( nTab, aParam, xResultSet, NULL, sal_True, false ); //! Api-Flag als Parameter
}
}
@@ -6064,7 +6064,7 @@ SvxUnoText& ScCellObj::GetUnoText()
ScSharedCellEditSource* pEditSource =
static_cast<ScSharedCellEditSource*> (pUnoText->GetEditSource());
if (pEditSource)
- pEditSource->SetDoUpdateData(sal_False);
+ pEditSource->SetDoUpdateData(false);
}
}
return *pUnoText;
@@ -6155,7 +6155,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellObj::getImplementationId() throw(uno::Run
// Hilfsfunktionen
-String ScCellObj::GetInputString_Impl(BOOL bEnglish) const // fuer getFormula / FormulaLocal
+String ScCellObj::GetInputString_Impl(sal_Bool bEnglish) const // fuer getFormula / FormulaLocal
{
if (GetDocShell())
return lcl_GetInputString( GetDocShell()->GetDocument(), aCellPos, bEnglish );
@@ -6188,7 +6188,7 @@ String ScCellObj::GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aCellP
{
// wie in GetString am Dokument (column)
Color* pColor;
- ULONG nNumFmt = pDoc->GetNumberFormat( aCellPos );
+ sal_uLong nNumFmt = pDoc->GetNumberFormat( aCellPos );
ScCellFormat::GetString( pCell, nNumFmt, aVal, &pColor, *pDoc->GetFormatTable() );
}
}
@@ -6205,14 +6205,14 @@ String ScCellObj::GetOutputString_Impl() const
return aVal;
}
-void ScCellObj::SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish)
+void ScCellObj::SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish)
{
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
ScDocFunc aFunc(*pDocSh);
// GRAM_PODF_A1 for API compatibility.
- (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -6231,7 +6231,7 @@ void ScCellObj::SetValue_Impl(double fValue)
if ( pDocSh )
{
ScDocFunc aFunc(*pDocSh);
- (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), TRUE );
+ (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), sal_True );
}
}
@@ -6266,7 +6266,54 @@ void ScCellObj::SetFormulaWithGrammar( const ::rtl::OUString& rFormula,
if ( pDocSh )
{
ScDocFunc aFunc(*pDocSh);
- aFunc.SetCellText( aCellPos, rFormula, TRUE, TRUE, TRUE, rFormulaNmsp, eGrammar);
+ aFunc.SetCellText( aCellPos, rFormula, sal_True, sal_True, sal_True, rFormulaNmsp, eGrammar);
+ }
+}
+
+void ScCellObj::InputEnglishString( const ::rtl::OUString& rText )
+{
+ // This is like a mixture of setFormula and property FormulaLocal:
+ // The cell's number format is checked for "text", a new cell format may be set,
+ // but all parsing is in English.
+
+ ScDocShell* pDocSh = GetDocShell();
+ if ( pDocSh )
+ {
+ String aString(rText);
+ ScDocument* pDoc = pDocSh->GetDocument();
+ SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
+ sal_uInt32 nOldFormat = pDoc->GetNumberFormat( aCellPos );
+ if ( pFormatter->GetType( nOldFormat ) == NUMBERFORMAT_TEXT )
+ {
+ SetString_Impl(aString, false, false); // text cell
+ }
+ else
+ {
+ ScDocFunc aFunc(*pDocSh);
+ short nFormatType = 0;
+ ScBaseCell* pNewCell = aFunc.InterpretEnglishString( aCellPos, aString,
+ EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1, &nFormatType );
+ if (pNewCell)
+ {
+ if ( ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 && nFormatType != 0 )
+ {
+ // apply a format for the recognized type and the old format's language
+ sal_uInt32 nNewFormat = ScGlobal::GetStandardFormat( *pFormatter, nOldFormat, nFormatType );
+ if ( nNewFormat != nOldFormat )
+ {
+ ScPatternAttr aPattern( pDoc->GetPool() );
+ aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
+ // ATTR_LANGUAGE_FORMAT remains unchanged
+ aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True );
+ }
+ }
+ // put the cell into the document
+ // (after applying the format, so possible formula recalculation already uses the new format)
+ (void)aFunc.PutCell( aCellPos, pNewCell, sal_True );
+ }
+ else
+ SetString_Impl(aString, false, false); // no cell from InterpretEnglishString, probably empty string
+ }
}
}
@@ -6312,7 +6359,7 @@ void SAL_CALL ScCellObj::setString( const rtl::OUString& aText ) throw(uno::Runt
{
SolarMutexGuard aGuard;
String aString(aText);
- SetString_Impl(aString, FALSE, FALSE); // immer Text
+ SetString_Impl(aString, false, false); // immer Text
// don't create pUnoText here if not there
if (pUnoText)
@@ -6448,14 +6495,14 @@ rtl::OUString SAL_CALL ScCellObj::getFormula() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
// TRUE = englisch
- return GetInputString_Impl(TRUE);
+ return GetInputString_Impl(true);
}
void SAL_CALL ScCellObj::setFormula( const rtl::OUString& aFormula ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
String aString(aFormula);
- SetString_Impl(aString, TRUE, TRUE); // englisch interpretieren
+ SetString_Impl(aString, sal_True, sal_True); // englisch interpretieren
}
double SAL_CALL ScCellObj::getValue() throw(uno::RuntimeException)
@@ -6510,7 +6557,7 @@ table::CellContentType ScCellObj::GetResultType_Impl()
ScBaseCell* pCell = pDocSh->GetDocument()->GetCell(aCellPos);
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
{
- BOOL bValue = ((ScFormulaCell*)pCell)->IsValue();
+ sal_Bool bValue = ((ScFormulaCell*)pCell)->IsValue();
return bValue ? table::CellContentType_VALUE : table::CellContentType_TEXT;
}
}
@@ -6520,7 +6567,7 @@ table::CellContentType ScCellObj::GetResultType_Impl()
sal_Int32 SAL_CALL ScCellObj::getError() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nError = 0;
+ sal_uInt16 nError = 0;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -6570,7 +6617,7 @@ void SAL_CALL ScCellObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rT
ScDocFunc aFunc( *pDocSh );
ScBaseCell* pNewCell = new ScFormulaCell( pDoc, aCellPos, &aTokenArray );
- (void)aFunc.PutCell( aCellPos, pNewCell, TRUE );
+ (void)aFunc.PutCell( aCellPos, pNewCell, sal_True );
}
}
@@ -6641,7 +6688,7 @@ void ScCellObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, c
rtl::OUString aStrVal;
aValue >>= aStrVal;
String aString(aStrVal);
- SetString_Impl(aString, TRUE, FALSE); // lokal interpretieren
+ SetString_Impl(aString, sal_True, false); // lokal interpretieren
}
else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
{
@@ -6661,8 +6708,8 @@ void ScCellObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
{
if ( pEntry->nWID == SC_WID_UNO_FORMLOC )
{
- // FALSE = lokal
- rAny <<= rtl::OUString( GetInputString_Impl(FALSE) );
+ // sal_False = lokal
+ rAny <<= rtl::OUString( GetInputString_Impl(false) );
}
else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
{
@@ -6736,7 +6783,7 @@ void SAL_CALL ScCellObj::addActionLock() throw(uno::RuntimeException)
ScSharedCellEditSource* pEditSource =
static_cast<ScSharedCellEditSource*> (pUnoText->GetEditSource());
if (pEditSource)
- pEditSource->SetDoUpdateData(sal_False);
+ pEditSource->SetDoUpdateData(false);
}
}
nActionLockCount++;
@@ -6785,7 +6832,7 @@ void SAL_CALL ScCellObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeExc
sal_Int16 SAL_CALL ScCellObj::resetActionLocks() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nRet(nActionLockCount);
+ sal_uInt16 nRet(nActionLockCount);
if (pUnoText)
{
ScSharedCellEditSource* pEditSource =
@@ -7059,7 +7106,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPage
sheet::TablePageBreakData aData;
uno::Sequence<sheet::TablePageBreakData> aSeq(nCount);
sheet::TablePageBreakData* pAry = aSeq.getArray();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
for (nCol=0; nCol<=MAXCOL; nCol++)
{
ScBreakType nBreak = pDoc->HasColBreak(nCol, nTab);
@@ -7109,14 +7156,14 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
//! docfunc Funktion, auch fuer ScViewFunc::RemoveManualBreaks
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
SCTAB nTab = GetTab_Impl();
if (bUndo)
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pUndoDoc );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) );
}
@@ -7124,7 +7171,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
- //? UpdatePageBreakData( TRUE );
+ //? UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
}
@@ -7151,7 +7198,7 @@ void SAL_CALL ScTableSheetObj::setName( const rtl::OUString& aNewName )
{
String aString(aNewName);
ScDocFunc aFunc( *pDocSh );
- aFunc.RenameTable( GetTab_Impl(), aString, TRUE, TRUE );
+ aFunc.RenameTable( GetTab_Impl(), aString, sal_True, sal_True );
}
}
@@ -7188,18 +7235,18 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
InsCellCmd eCmd = INS_NONE;
switch (nMode)
{
- case sheet::CellInsertMode_NONE: bDo = FALSE; break;
+ case sheet::CellInsertMode_NONE: bDo = false; break;
case sheet::CellInsertMode_DOWN: eCmd = INS_CELLSDOWN; break;
case sheet::CellInsertMode_RIGHT: eCmd = INS_CELLSRIGHT; break;
case sheet::CellInsertMode_ROWS: eCmd = INS_INSROWS; break;
case sheet::CellInsertMode_COLUMNS: eCmd = INS_INSCOLS; break;
default:
OSL_FAIL("insertCells: falscher Mode");
- bDo = FALSE;
+ bDo = false;
}
if (bDo)
@@ -7208,7 +7255,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
ScDocFunc aFunc(*pDocSh);
- aFunc.InsertCells( aScRange, NULL, eCmd, TRUE, TRUE );
+ aFunc.InsertCells( aScRange, NULL, eCmd, sal_True, sal_True );
}
}
}
@@ -7220,18 +7267,18 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
DelCellCmd eCmd = DEL_NONE;
switch (nMode)
{
- case sheet::CellDeleteMode_NONE: bDo = FALSE; break;
+ case sheet::CellDeleteMode_NONE: bDo = false; break;
case sheet::CellDeleteMode_UP: eCmd = DEL_CELLSUP; break;
case sheet::CellDeleteMode_LEFT: eCmd = DEL_CELLSLEFT; break;
case sheet::CellDeleteMode_ROWS: eCmd = DEL_DELROWS; break;
case sheet::CellDeleteMode_COLUMNS: eCmd = DEL_DELCOLS; break;
default:
OSL_FAIL("deleteCells: falscher Mode");
- bDo = FALSE;
+ bDo = false;
}
if (bDo)
@@ -7240,7 +7287,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
ScDocFunc aFunc(*pDocSh);
- aFunc.DeleteCells( aScRange, NULL, eCmd, TRUE, TRUE );
+ aFunc.DeleteCells( aScRange, NULL, eCmd, sal_True, sal_True );
}
}
}
@@ -7258,7 +7305,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination
ScUnoConversion::FillScRange( aSourceRange, aSource );
ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet );
ScDocFunc aFunc(*pDocSh);
- aFunc.MoveBlock( aSourceRange, aDestPos, TRUE, TRUE, TRUE, TRUE );
+ aFunc.MoveBlock( aSourceRange, aDestPos, sal_True, sal_True, sal_True, sal_True );
}
}
@@ -7275,7 +7322,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination
ScUnoConversion::FillScRange( aSourceRange, aSource );
ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet );
ScDocFunc aFunc(*pDocSh);
- aFunc.MoveBlock( aSourceRange, aDestPos, FALSE, TRUE, TRUE, TRUE );
+ aFunc.MoveBlock( aSourceRange, aDestPos, false, sal_True, sal_True, sal_True );
}
}
@@ -7289,7 +7336,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges )
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
SCTAB nTab = GetTab_Impl();
ScPrintRangeSaver* pNewRanges = pDoc->CreatePrintRangeSaver();
@@ -7320,12 +7367,12 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScTableSheetObj::getPrintAreas()
{
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- USHORT nCount = pDoc->GetPrintRangeCount( nTab );
+ sal_uInt16 nCount = pDoc->GetPrintRangeCount( nTab );
table::CellRangeAddress aRangeAddress;
uno::Sequence<table::CellRangeAddress> aSeq(nCount);
table::CellRangeAddress* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const ScRange* pRange = pDoc->GetPrintRange( nTab, i );
DBG_ASSERT(pRange,"wo ist der Druckbereich");
@@ -7354,13 +7401,13 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver();
- USHORT nCount = (USHORT) aPrintAreas.getLength();
+ sal_uInt16 nCount = (sal_uInt16) aPrintAreas.getLength();
pDoc->ClearPrintRanges( nTab );
if (nCount)
{
ScRange aPrintRange;
const table::CellRangeAddress* pAry = aPrintAreas.getConstArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScUnoConversion::FillScRange( aPrintRange, pAry[i] );
pDoc->AddPrintRange( nTab, aPrintRange );
@@ -7381,7 +7428,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce
SCTAB nTab = GetTab_Impl();
return ( pDoc->GetRepeatColRange(nTab) != NULL );
}
- return FALSE;
+ return false;
}
void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns )
@@ -7462,7 +7509,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti
SCTAB nTab = GetTab_Impl();
return ( pDoc->GetRepeatRowRange(nTab) != NULL );
}
- return FALSE;
+ return false;
}
void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows )
@@ -7542,7 +7589,7 @@ sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeE
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BYTE nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() );
+ sal_uInt8 nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() );
if ( nMode == SC_LINK_NORMAL )
eRet = sheet::SheetLinkMode_NORMAL;
else if ( nMode == SC_LINK_VALUE )
@@ -7631,19 +7678,19 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr
aFileString = ScGlobal::GetAbsDocName( aFileString, pDocSh );
if ( !aFilterString.Len() )
- ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, TRUE, FALSE );
+ ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, sal_True, false );
// remove application prefix from filter name here, so the filter options
// aren't reset when the filter name is changed in ScTableLink::DataChanged
ScDocumentLoader::RemoveAppPrefix( aFilterString );
- BYTE nLinkMode = SC_LINK_NONE;
+ sal_uInt8 nLinkMode = SC_LINK_NONE;
if ( nMode == sheet::SheetLinkMode_NORMAL )
nLinkMode = SC_LINK_NORMAL;
else if ( nMode == sheet::SheetLinkMode_VALUE )
nLinkMode = SC_LINK_VALUE;
- ULONG nRefresh = 0;
+ sal_uLong nRefresh = 0;
pDoc->SetLink( nTab, nLinkMode, aFileString, aFilterString, aOptString, aSheetString, nRefresh );
pDocSh->UpdateLinks(); // ggf. Link eintragen oder loeschen
@@ -7659,8 +7706,8 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr
//! Update nur fuer die betroffene Tabelle???
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
- USHORT nCount = pLinkManager->GetLinks().Count();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScTableLink))
@@ -7693,7 +7740,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveDelSucc( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPosition )
@@ -7709,7 +7756,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveDelPred( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPosition )
@@ -7725,7 +7772,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddSucc( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPosition )
@@ -7741,7 +7788,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPo
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddPred( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPosition )
@@ -7757,7 +7804,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPositi
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveAddError( aPos );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException)
@@ -7769,7 +7816,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException)
ScDocFunc aFunc(*pDocSh);
return aFunc.DetectiveMarkInvalid( GetTab_Impl() );
}
- return FALSE;
+ return false;
}
void SAL_CALL ScTableSheetObj::clearArrows() throw(uno::RuntimeException)
@@ -7793,11 +7840,11 @@ void SAL_CALL ScTableSheetObj::group( const table::CellRangeAddress& rGroupRange
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
+ sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
ScRange aGroupRange;
ScUnoConversion::FillScRange( aGroupRange, rGroupRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.MakeOutline( aGroupRange, bColumns, TRUE, TRUE );
+ aFunc.MakeOutline( aGroupRange, bColumns, sal_True, sal_True );
}
}
@@ -7809,11 +7856,11 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
+ sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
ScRange aGroupRange;
ScUnoConversion::FillScRange( aGroupRange, rGroupRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.RemoveOutline( aGroupRange, bColumns, TRUE, TRUE );
+ aFunc.RemoveOutline( aGroupRange, bColumns, sal_True, sal_True );
}
}
@@ -7827,7 +7874,7 @@ void SAL_CALL ScTableSheetObj::autoOutline( const table::CellRangeAddress& rCell
ScRange aFormulaRange;
ScUnoConversion::FillScRange( aFormulaRange, rCellRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.AutoOutline( aFormulaRange, TRUE, TRUE );
+ aFunc.AutoOutline( aFormulaRange, sal_True, sal_True );
}
}
@@ -7839,7 +7886,7 @@ void SAL_CALL ScTableSheetObj::clearOutline() throw(uno::RuntimeException)
{
SCTAB nTab = GetTab_Impl();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.RemoveAllOutlines( nTab, TRUE, TRUE );
+ aFunc.RemoveAllOutlines( nTab, sal_True, sal_True );
}
}
@@ -7853,7 +7900,7 @@ void SAL_CALL ScTableSheetObj::hideDetail( const table::CellRangeAddress& rCellR
ScRange aMarkRange;
ScUnoConversion::FillScRange( aMarkRange, rCellRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.HideMarkedOutlines( aMarkRange, TRUE, TRUE );
+ aFunc.HideMarkedOutlines( aMarkRange, sal_True, sal_True );
}
}
@@ -7867,7 +7914,7 @@ void SAL_CALL ScTableSheetObj::showDetail( const table::CellRangeAddress& rCellR
ScRange aMarkRange;
ScUnoConversion::FillScRange( aMarkRange, rCellRange );
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.ShowMarkedOutlines( aMarkRange, TRUE, TRUE );
+ aFunc.ShowMarkedOutlines( aMarkRange, sal_True, sal_True );
}
}
@@ -7878,10 +7925,10 @@ void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientat
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
+ sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
SCTAB nTab = GetTab_Impl();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.SelectLevel( nTab, bColumns, nLevel, TRUE, TRUE, TRUE );
+ aFunc.SelectLevel( nTab, bColumns, nLevel, sal_True, sal_True, sal_True );
}
}
@@ -7897,7 +7944,7 @@ void SAL_CALL ScTableSheetObj::protect( const rtl::OUString& aPassword )
{
String aString(aPassword);
ScDocFunc aFunc(*pDocSh);
- aFunc.Protect( GetTab_Impl(), aString, TRUE );
+ aFunc.Protect( GetTab_Impl(), aString, sal_True );
}
}
@@ -7910,7 +7957,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const rtl::OUString& aPassword )
{
String aString(aPassword);
ScDocFunc aFunc(*pDocSh);
- BOOL bDone = aFunc.Unprotect( GetTab_Impl(), aString, TRUE );
+ sal_Bool bDone = aFunc.Unprotect( GetTab_Impl(), aString, sal_True );
if (!bDone)
throw lang::IllegalArgumentException();
}
@@ -7924,7 +7971,7 @@ sal_Bool SAL_CALL ScTableSheetObj::isProtected() throw(uno::RuntimeException)
return pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() );
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return FALSE;
+ return false;
}
// XScenario
@@ -7936,7 +7983,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getIsScenario() throw(uno::RuntimeException)
if ( pDocSh )
return pDocSh->GetDocument()->IsScenario( GetTab_Impl() );
- return FALSE;
+ return false;
}
rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeException)
@@ -7947,7 +7994,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags );
return aComment;
}
@@ -7967,7 +8014,7 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -7990,13 +8037,13 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
if (pDoc->IsScenario(nTab))
{
ScMarkData aMarkData;
- aMarkData.SelectTable( nTab, TRUE );
+ aMarkData.SelectTable( nTab, sal_True );
- USHORT nRangeCount = (USHORT)rScenRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)rScenRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = rScenRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" );
ScRange aOneRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab,
@@ -8009,9 +8056,9 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
// Szenario-Ranges sind durch Attribut gekennzeichnet
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
ScDocFunc aFunc(*pDocSh);
- aFunc.ApplyAttributes( aMarkData, aPattern, TRUE, TRUE );
+ aFunc.ApplyAttributes( aMarkData, aPattern, sal_True, sal_True );
}
}
}
@@ -8086,7 +8133,7 @@ void ScTableSheetObj::setExternalName( const ::rtl::OUString& aUrl, const ::rtl:
const SCTAB nTab = GetTab_Impl();
const String aAbsDocName( ScGlobal::GetAbsDocName( aUrl, pDocSh ) );
const String aDocTabName( ScGlobal::GetDocTabName( aAbsDocName, aSheetName ) );
- if ( !pDoc->RenameTab( nTab, aDocTabName, FALSE /*bUpdateRef*/, TRUE /*bExternalDocument*/ ) )
+ if ( !pDoc->RenameTab( nTab, aDocTabName, false /*bUpdateRef*/, sal_True /*bExternalDocument*/ ) )
{
throw container::ElementExistException( ::rtl::OUString(), *this );
}
@@ -8169,8 +8216,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
- aFunc.SetTableVisible( nTab, bVis, TRUE );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ aFunc.SetTableVisible( nTab, bVis, sal_True );
}
else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE )
{
@@ -8187,7 +8234,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8204,10 +8251,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8237,10 +8284,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8270,10 +8317,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8303,10 +8350,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8336,10 +8383,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8369,10 +8416,10 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aName );
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
- sal_Bool bModify(sal_False);
+ sal_Bool bModify(false);
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
{
@@ -8403,12 +8450,12 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
if (nValue == com::sun::star::text::WritingMode2::RL_TB)
aFunc.SetLayoutRTL(nTab, sal_True, sal_True);
else
- aFunc.SetLayoutRTL(nTab, sal_False, sal_True);
+ aFunc.SetLayoutRTL(nTab, false, sal_True);
}
}
else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT )
{
- BOOL bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bAutoPrint)
pDoc->SetPrintEntireSheet( nTab ); // clears all print ranges
else
@@ -8458,7 +8505,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = pDoc->IsVisible( nTab );
+ sal_Bool bVis = pDoc->IsVisible( nTab );
ScUnoHelpFunctions::SetBoolInAny( rAny, bVis );
}
else if ( pEntry->nWID == SC_WID_UNO_LINKDISPBIT )
@@ -8482,7 +8529,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
rAny <<= static_cast<sal_Int32>(aColor.GetColor());
@@ -8494,7 +8541,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PROTECT) != 0 );
@@ -8506,7 +8553,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_SHOWFRAME) != 0 );
@@ -8518,7 +8565,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PRINTFRAME) != 0 );
@@ -8530,7 +8577,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_TWOWAY) != 0 );
@@ -8542,7 +8589,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_ATTRIB) != 0 );
@@ -8554,7 +8601,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
ScUnoHelpFunctions::SetBoolInAny( rAny, !(nFlags & SC_SCENARIO_VALUE));
@@ -8569,7 +8616,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
}
else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT )
{
- BOOL bAutoPrint = pDoc->IsPrintEntireSheet( nTab );
+ sal_Bool bAutoPrint = pDoc->IsPrintEntireSheet( nTab );
ScUnoHelpFunctions::SetBoolInAny( rAny, bAutoPrint );
}
else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR )
@@ -8791,32 +8838,32 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
{
// property is 1/100mm, column width is twips
nNewWidth = HMMToTwips(nNewWidth);
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)nNewWidth, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)nNewWidth, sal_True, sal_True );
}
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
}
else if ( pEntry->nWID == SC_WID_UNO_OWIDTH )
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab,
- SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE );
- // FALSE bei Spalten momentan ohne Auswirkung
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab,
+ SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True );
+ // sal_False bei Spalten momentan ohne Auswirkung
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE )
{
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bSet)
- aFunc.InsertPageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True );
}
else
ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
@@ -8842,9 +8889,9 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( pEntry->nWID == SC_WID_UNO_CELLWID )
{
// for hidden column, return original height
- USHORT nWidth = pDoc->GetOriginalWidth( nCol, nTab );
+ sal_uInt16 nWidth = pDoc->GetOriginalWidth( nCol, nTab );
// property is 1/100mm, column width is twips
- nWidth = (USHORT) TwipsToHMM(nWidth);
+ nWidth = (sal_uInt16) TwipsToHMM(nWidth);
rAny <<= (sal_Int32)( nWidth );
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
@@ -8855,7 +8902,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
else if ( pEntry->nWID == SC_WID_UNO_OWIDTH )
{
//! momentan immer gesetzt ??!?!
- BOOL bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt );
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE )
@@ -8935,42 +8982,42 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
{
// property is 1/100mm, row height is twips
nNewHeight = HMMToTwips(nNewHeight);
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)nNewHeight, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)nNewHeight, sal_True, sal_True );
}
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
}
else if ( pEntry->nWID == SC_WID_UNO_CELLFILT )
{
- BOOL bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
pDoc->SetRowFiltered(nRow, nRow, nTab, bFil);
}
else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT )
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True );
else
{
// set current height again manually
- USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab );
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, TRUE, TRUE );
+ sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, sal_True, sal_True );
}
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE )
{
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bSet)
- aFunc.InsertPageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( false, rRange.aStart, sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( false, rRange.aStart, sal_True, sal_True, sal_True );
}
else
ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
@@ -8995,9 +9042,9 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
if ( pEntry->nWID == SC_WID_UNO_CELLHGT )
{
// for hidden row, return original height
- USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab );
+ sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab );
// property is 1/100mm, row height is twips
- nHeight = (USHORT) TwipsToHMM(nHeight);
+ nHeight = (sal_uInt16) TwipsToHMM(nHeight);
rAny <<= (sal_Int32)( nHeight );
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
@@ -9012,7 +9059,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
}
else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT )
{
- BOOL bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt );
}
else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE )
@@ -9085,7 +9132,7 @@ uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException)
sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bHas = FALSE;
+ sal_Bool bHas = false;
if ( pDocShell )
{
//! schneller selber testen?
@@ -9102,13 +9149,13 @@ ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR
pDocShell( pDocSh ),
aRanges( rR ),
pMark( NULL ),
- bAtEnd( FALSE )
+ bAtEnd( false )
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->AddUnoObject(*this);
if ( aRanges.empty() )
- bAtEnd = TRUE;
+ bAtEnd = true;
else
{
SCTAB nTab = 0;
@@ -9124,7 +9171,7 @@ void ScCellsEnumeration::CheckPos_Impl()
{
if (pDocShell)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScDocument* pDoc = pDocShell->GetDocument();
ScBaseCell* pCell = pDoc->GetCell(aPos);
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE )
@@ -9132,7 +9179,7 @@ void ScCellsEnumeration::CheckPos_Impl()
if (!pMark)
{
pMark = new ScMarkData;
- pMark->MarkFromRangeList( aRanges, FALSE );
+ pMark->MarkFromRangeList( aRanges, false );
pMark->MarkToMulti(); // needed for GetNextMarkedCell
}
bFound = pMark->IsCellMarked( aPos.Col(), aPos.Row() );
@@ -9155,18 +9202,18 @@ void ScCellsEnumeration::Advance_Impl()
if (!pMark)
{
pMark = new ScMarkData;
- pMark->MarkFromRangeList( aRanges, FALSE );
+ pMark->MarkFromRangeList( aRanges, false );
pMark->MarkToMulti(); // needed for GetNextMarkedCell
}
SCCOL nCol = aPos.Col();
SCROW nRow = aPos.Row();
SCTAB nTab = aPos.Tab();
- BOOL bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark );
+ sal_Bool bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark );
if (bFound)
aPos.Set( nCol, nRow, nTab );
else
- bAtEnd = TRUE; // kommt nix mehr
+ bAtEnd = sal_True; // kommt nix mehr
}
void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -9355,8 +9402,8 @@ ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScR
pDocShell( pDocSh ),
nTab( rRange.aStart.Tab() ),
pIter( NULL ),
- bAtEnd( FALSE ),
- bDirty( FALSE )
+ bAtEnd( false ),
+ bDirty( false )
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->AddUnoObject(*this);
@@ -9386,7 +9433,7 @@ void ScCellFormatsEnumeration::Advance_Impl()
if ( bDirty )
{
pIter->DataChanged(); // AttrArray-Index neu suchen
- bDirty = FALSE;
+ bDirty = false;
}
SCCOL nCol1, nCol2;
@@ -9394,10 +9441,10 @@ void ScCellFormatsEnumeration::Advance_Impl()
if ( pIter->GetNext( nCol1, nCol2, nRow1, nRow2 ) )
aNext = ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
else
- bAtEnd = TRUE; // kommt nix mehr
+ bAtEnd = sal_True; // kommt nix mehr
}
else
- bAtEnd = TRUE; // Dok weggekommen oder so
+ bAtEnd = sal_True; // Dok weggekommen oder so
}
ScCellRangeObj* ScCellFormatsEnumeration::NextObject_Impl()
@@ -9422,7 +9469,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // ungueltig geworden
@@ -9431,7 +9478,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( nId == SFX_HINT_DATACHANGED )
{
- bDirty = TRUE; // AttrArray-Index evtl. ungueltig geworden
+ bDirty = sal_True; // AttrArray-Index evtl. ungueltig geworden
}
}
}
@@ -9485,7 +9532,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
pDocShell = NULL; // ungueltig geworden
}
@@ -9751,7 +9798,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
pDocShell = NULL; // ungueltig geworden
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 7eeb66573ca9..31d5417bf99e 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -88,7 +88,7 @@ namespace calc
,OCellValueBinding_PBase( OCellValueBinding_Base::rBHelper )
,m_xDocument( _rxDocument )
,m_aModifyListeners( m_aMutex )
- ,m_bInitialized( sal_False )
+ ,m_bInitialized( false )
,m_bListPos( _bListPos )
{
DBG_CTOR( OCellValueBinding, checkConsistency_static );
@@ -224,7 +224,7 @@ namespace calc
if ( aType.equals( *pTypes++ ) )
return sal_True;
- return sal_False;
+ return false;
}
//--------------------------------------------------------------------
@@ -252,7 +252,7 @@ namespace calc
{
// check if the cell has a numeric value (this might go into a helper function):
- sal_Bool bHasValue = sal_False;
+ sal_Bool bHasValue = false;
CellContentType eCellType = m_xCell->getType();
if ( eCellType == CellContentType_VALUE )
bHasValue = sal_True;
@@ -343,7 +343,7 @@ namespace calc
// boolean is stored as values 0 or 1
// TODO: set the number format to boolean if no format is set?
- sal_Bool bValue( sal_False );
+ sal_Bool bValue( false );
aValue >>= bValue;
double nCellValue = bValue ? 1.0 : 0.0;
@@ -413,7 +413,7 @@ namespace calc
if ( xTypes.is() )
{
Locale aLocale;
- sal_Bool bWasBoolean = sal_False;
+ sal_Bool bWasBoolean = false;
sal_Int32 nOldIndex = ::comphelper::getINT32( xCellProp->getPropertyValue( sPropName ) );
Reference<XPropertySet> xOldFormat;
@@ -497,7 +497,7 @@ namespace calc
if ( *pLookup++ == _rServiceName )
return sal_True;
- return sal_False;
+ return false;
}
//--------------------------------------------------------------------
@@ -582,7 +582,7 @@ namespace calc
// get the cell address
CellAddress aAddress;
- sal_Bool bFoundAddress = sal_False;
+ sal_Bool bFoundAddress = false;
const Any* pLoop = _rArguments.getConstArray();
const Any* pLoopEnd = _rArguments.getConstArray() + _rArguments.getLength();
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 98c21cbf760d..bac0a8f76d03 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1099,7 +1099,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens,
SCROW nMaxRow = 0;
SCTAB nTab = 0;
- USHORT nFileId = 0;
+ sal_uInt16 nFileId = 0;
String aExtTabName;
bool bExternal = false;
@@ -2496,7 +2496,7 @@ void ScChart2DataSequence::BuildDataCache()
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nErr = pFCell->GetErrCode();
+ sal_uInt16 nErr = pFCell->GetErrCode();
if (nErr)
break;
@@ -2712,7 +2712,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
+ sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId ==SFX_HINT_DYING )
{
m_pDocument = NULL;
@@ -2729,7 +2729,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
if( m_pDocument )
{
- for ( USHORT n=0; n<m_aValueListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<m_aValueListeners.Count(); n++ )
m_pDocument->AddUnoListenerCall( *m_aValueListeners[n], aEvent );
}
@@ -3288,8 +3288,8 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
acquire(); // in case the listeners have the last ref - released below
- USHORT nCount = m_aValueListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = m_aValueListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XModifyListener> *pObj = m_aValueListeners[n];
if ( *pObj == aListener )
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index fd5b97c88fde..db07ccda9d38 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -208,11 +208,11 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
}
ScRangeList* pList = new ScRangeList;
- USHORT nRangeCount = (USHORT)aRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = aRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet,
static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet );
@@ -232,7 +232,8 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
// Rechteck anpassen
//! Fehler/Exception, wenn leer/ungueltig ???
Point aRectPos( aRect.X, aRect.Y );
- if (aRectPos.X() < 0) aRectPos.X() = 0;
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ if ( ( aRectPos.X() < 0 && !bLayoutRTL ) || ( aRectPos.X() > 0 && bLayoutRTL ) ) aRectPos.X() = 0;
if (aRectPos.Y() < 0) aRectPos.Y() = 0;
Size aRectSize( aRect.Width, aRect.Height );
if (aRectSize.Width() <= 0) aRectSize.Width() = 5000; // Default-Groesse
@@ -314,7 +315,7 @@ void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName )
ScDrawLayer* pModel = pDoc->GetDrawLayer(); // ist nicht 0
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); // ist nicht 0
- pModel->AddUndo( new SdrUndoRemoveObj( *pObj ) ); //! Undo-Kommentar?
+ pModel->AddUndo( new SdrUndoDelObj( *pObj ) );
pPage->RemoveObject( pObj->GetOrdNum() );
//! Notify etc.???
@@ -547,14 +548,14 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
pDocShell->GetUndoManager()->AddUndoAction(
- new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ) );
+ new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, false ) );
}
- pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, FALSE );
+ pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, false );
}
}
@@ -608,7 +609,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con
if ( pDoc )
{
ScRange aEmptyRange;
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
ScChartListener aSearcher( aChartName, pDoc, aEmptyRange );
ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection();
if ( pCollection && pCollection->Search( &aSearcher, nIndex ) )
@@ -683,7 +684,7 @@ void SAL_CALL ScChartObj::setHasColumnHeaders( sal_Bool bHasColumnHeaders )
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
- if ( bOldColHeaders != (bHasColumnHeaders != sal_False) )
+ if ( bOldColHeaders != (bHasColumnHeaders != false) )
Update_Impl( xRanges, bHasColumnHeaders, bOldRowHeaders );
}
@@ -703,7 +704,7 @@ void SAL_CALL ScChartObj::setHasRowHeaders( sal_Bool bHasRowHeaders )
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
- if ( bOldRowHeaders != (bHasRowHeaders != sal_False) )
+ if ( bOldRowHeaders != (bHasRowHeaders != false) )
Update_Impl( xRanges, bOldColHeaders, bHasRowHeaders );
}
@@ -748,11 +749,11 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress
GetData_Impl( xOldRanges, bColHeaders, bRowHeaders );
ScRangeList* pList = new ScRangeList;
- USHORT nRangeCount = (USHORT)aRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = aRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet,
static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet );
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 5fbbe2a007f5..fc05a9a4401e 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -143,7 +143,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
ScDocument* pDoc = pDocShell->GetDocument();
if (pDoc)
{
- sal_Bool bUpdateHeights = sal_False;
+ sal_Bool bUpdateHeights = false;
ScViewOptions aViewOpt(pDoc->GetViewOptions());
@@ -243,7 +243,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
{
// Int16 contains CharacterCompressionType values
sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue );
- pDoc->SetAsianCompression( (BYTE) nUno );
+ pDoc->SetAsianCompression( (sal_uInt8) nUno );
bUpdateHeights = sal_True;
}
else if ( aPropertyName.compareToAscii( SC_UNO_ASIANKERN ) == 0 )
@@ -253,7 +253,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
else if ( aPropertyName.compareToAscii( SCSAVEVERSION ) == 0)
{
- sal_Bool bTmp=sal_False;
+ sal_Bool bTmp=false;
if ( aValue >>= bTmp )
pDocShell->SetSaveVersionOnClose( bTmp );
}
@@ -265,13 +265,13 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
}
else if ( aPropertyName.compareToAscii( SC_UNO_LOADREADONLY ) == 0 )
{
- sal_Bool bTmp=sal_False;
+ sal_Bool bTmp=false;
if ( aValue >>= bTmp )
pDocShell->SetLoadReadonly( bTmp );
}
else if ( aPropertyName.compareToAscii( SC_UNO_SHAREDOC ) == 0 )
{
- sal_Bool bDocShared = sal_False;
+ sal_Bool bDocShared = false;
if ( aValue >>= bDocShared )
{
pDocShell->SetSharedXMLFlag( bDocShared );
@@ -378,7 +378,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString
{
// #i75610# don't create the printer, return empty string if no printer created yet
// (as in SwXDocumentSettings)
- SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE );
+ SfxPrinter* pPrinter = pDoc->GetPrinter( false );
if (pPrinter)
aRet <<= rtl::OUString ( pPrinter->GetName());
else
@@ -388,7 +388,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString
{
// #i75610# don't create the printer, return empty sequence if no printer created yet
// (as in SwXDocumentSettings)
- SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE );
+ SfxPrinter* pPrinter = pDoc->GetPrinter( false );
if (pPrinter)
{
SvMemoryStream aStream;
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index d6139cd578bb..553ba56e6cd4 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -134,7 +134,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep
SCTAB nTab = aOneRange.aStart.Tab();
pDocSh->GetDocument()->GetDataArea(
- nTab, nStartCol, nStartRow, nEndCol, nEndRow, TRUE, false );
+ nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, false );
ScRange aNew( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
SetNewRange( aNew );
@@ -332,7 +332,7 @@ void SAL_CALL ScCellCursorObj::gotoStart() throw(uno::RuntimeException)
SCTAB nTab = aOneRange.aStart.Tab();
pDocSh->GetDocument()->GetDataArea(
- nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false );
+ nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, false );
ScRange aNew( nStartCol, nStartRow, nTab );
SetNewRange( aNew );
@@ -360,7 +360,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException)
SCTAB nTab = aOneRange.aStart.Tab();
pDocSh->GetDocument()->GetDataArea(
- nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false );
+ nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, false );
ScRange aNew( nEndCol, nEndRow, nTab );
SetNewRange( aNew );
@@ -383,7 +383,7 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException)
SCTAB nTab = aCursor.Tab();
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
- pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, FALSE,TRUE, aMark );
+ pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, false,sal_True, aMark );
//! sonst Exception oder so
SetNewRange( ScRange( nNewX, nNewY, nTab ) );
@@ -405,7 +405,7 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException)
SCTAB nTab = aCursor.Tab();
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
- pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, FALSE,TRUE, aMark );
+ pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, false,sal_True, aMark );
//! sonst Exception oder so
SetNewRange( ScRange( nNewX, nNewY, nTab ) );
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c675d5217771..71b5e5359945 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -176,7 +176,7 @@ bool lclCheckMinMaxStep( const DataPilotFieldGroupInfo& rInfo )
lclCheckValidDouble( rInfo.Start, rInfo.HasAutoStart ) &&
lclCheckValidDouble( rInfo.End, rInfo.HasAutoEnd ) &&
(rInfo.HasAutoStart || rInfo.HasAutoEnd || (rInfo.Start <= rInfo.End)) &&
- lclCheckValidDouble( rInfo.Step, sal_False ) &&
+ lclCheckValidDouble( rInfo.Step, false ) &&
(0.0 <= rInfo.Step);
}
@@ -203,7 +203,7 @@ SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupItemObj, "ScDataPilotFieldGroupItem
//------------------------------------------------------------------------
-GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits )
+GeneralFunction ScDataPilotConversion::FirstFunc( sal_uInt16 nBits )
{
if ( nBits & PIVOT_FUNC_SUM ) return GeneralFunction_SUM;
if ( nBits & PIVOT_FUNC_COUNT ) return GeneralFunction_COUNT;
@@ -220,9 +220,9 @@ GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits )
return GeneralFunction_NONE;
}
-USHORT ScDataPilotConversion::FunctionBit( GeneralFunction eFunc )
+sal_uInt16 ScDataPilotConversion::FunctionBit( GeneralFunction eFunc )
{
- USHORT nRet = PIVOT_FUNC_NONE; // 0
+ sal_uInt16 nRet = PIVOT_FUNC_NONE; // 0
switch (eFunc)
{
case GeneralFunction_SUM: nRet = PIVOT_FUNC_SUM; break;
@@ -298,7 +298,7 @@ sal_Int32 lcl_GetObjectIndex( ScDPObject* pDPObj, const ScFieldIdentifier& rFiel
sal_Int32 nCount = pDPObj->GetDimCount();
for ( sal_Int32 nDim = 0; nDim < nCount; ++nDim )
{
- BOOL bIsDataLayout = FALSE;
+ sal_Bool bIsDataLayout = false;
OUString aDimName( pDPObj->GetDimName( nDim, bIsDataLayout ) );
if ( rFieldId.mbDataLayout ? bIsDataLayout : (aDimName == rFieldId.maFieldName) )
return nDim;
@@ -431,7 +431,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
if ( aNewName.getLength() && hasByName( aNewName ) )
throw RuntimeException(); // no other exceptions specified
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDataPilotDescriptorBase* pImp = ScDataPilotDescriptorBase::getImplementation( xDescriptor );
if ( pDocShell && pImp )
{
@@ -452,7 +452,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
// todo: handle double fields (for more information see ScDPObject
ScDBDocFunc aFunc(*pDocShell);
- bDone = aFunc.DataPilotUpdate( NULL, pNewObj, TRUE, TRUE );
+ bDone = aFunc.DataPilotUpdate( NULL, pNewObj, sal_True, sal_True );
}
}
@@ -469,7 +469,7 @@ void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName )
if (pDPObj && pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
- aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, TRUE ); // remove - incl. undo etc.
+ aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, sal_True ); // remove - incl. undo etc.
}
else
throw RuntimeException(); // no other exceptions specified
@@ -498,7 +498,7 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException)
// api only handles sheet data at this time
//! allow all data sources!!!
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
size_t nCount = pColl->GetCount();
for (size_t i=0; i<nCount; ++i)
{
@@ -561,7 +561,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
// api only handles sheet data at this time
//! allow all data sources!!!
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
size_t nCount = pColl->GetCount();
size_t i;
for (i=0; i<nCount; ++i)
@@ -571,7 +571,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
++nFound;
}
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
Sequence<OUString> aSeq(nFound);
OUString* pAry = aSeq.getArray();
for (i=0; i<nCount; ++i)
@@ -607,11 +607,11 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName )
ScDPObject* pDPObj = (*pColl)[i];
if ( pDPObj->GetOutRange().aStart.Tab() == nTab &&
pDPObj->GetName() == aNamStr )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -842,7 +842,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
ScImportParam aParam;
ScImportDescriptor::FillImportParam( aParam, aArgSeq );
- USHORT nNewType = sheet::DataImportMode_NONE;
+ sal_uInt16 nNewType = sheet::DataImportMode_NONE;
if ( aParam.bImport )
{
if ( aParam.bSql )
@@ -983,7 +983,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
aParam.aStatement = pImportDesc->aObject;
aParam.bNative = pImportDesc->bNative;
aParam.bSql = ( pImportDesc->nType == sheet::DataImportMode_SQL );
- aParam.nType = static_cast<BYTE>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable);
+ aParam.nType = static_cast<sal_uInt8>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable);
uno::Sequence<beans::PropertyValue> aSeq( ScImportDescriptor::GetPropertyCount() );
ScImportDescriptor::FillProperties( aSeq, aParam );
@@ -1200,7 +1200,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject )
if ( pDPObj && pDocSh )
{
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DataPilotUpdate( pDPObj, pDPObject, TRUE, TRUE );
+ aFunc.DataPilotUpdate( pDPObj, pDPObject, sal_True, sal_True );
}
}
@@ -1284,7 +1284,7 @@ void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException)
{
ScDPObject* pNew = new ScDPObject(*pDPObj);
ScDBDocFunc aFunc(*GetDocShell());
- aFunc.DataPilotUpdate( pDPObj, pNew, TRUE, TRUE );
+ aFunc.DataPilotUpdate( pDPObj, pNew, true, true );
delete pNew; // DataPilotUpdate copies settings from "new" object
}
}
@@ -1365,8 +1365,8 @@ void SAL_CALL ScDataPilotTableObj::removeModifyListener( const uno::Reference<ut
acquire(); // in case the listeners have the last ref - released below
- USHORT nCount = aModifyListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aModifyListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XModifyListener> *pObj = aModifyListeners[n];
if ( *pObj == aListener )
@@ -1392,6 +1392,23 @@ void ScDataPilotTableObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
Refreshed_Impl();
}
+ else if ( rHint.ISA( ScUpdateRefHint ) )
+ {
+ ScRange aRange( 0, 0, nTab );
+ ScRangeList aRanges;
+ aRanges.Append( aRange );
+ const ScUpdateRefHint& rRef = static_cast< const ScUpdateRefHint& >( rHint );
+ if ( aRanges.UpdateReference( rRef.GetMode(), GetDocShell()->GetDocument(), rRef.GetRange(),
+ rRef.GetDx(), rRef.GetDy(), rRef.GetDz() ) &&
+ aRanges.Count() == 1 )
+ {
+ const ScRange* pRange = aRanges.GetObject( 0 );
+ if ( pRange )
+ {
+ nTab = pRange->aStart.Tab();
+ }
+ }
+ }
ScDataPilotDescriptorBase::Notify( rBC, rHint );
}
@@ -1404,7 +1421,7 @@ void ScDataPilotTableObj::Refreshed_Impl()
// the EventObject holds a Ref to this object until after the listener calls
ScDocument* pDoc = GetDocShell()->GetDocument();
- for ( USHORT n=0; n<aModifyListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aModifyListeners.Count(); n++ )
pDoc->AddUnoListenerCall( *aModifyListeners[n], aEvent );
}
@@ -1419,8 +1436,8 @@ ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
// set defaults like in ScPivotParam constructor
aSaveData.SetColumnGrand( sal_True );
aSaveData.SetRowGrand( sal_True );
- aSaveData.SetIgnoreEmptyRows( sal_False );
- aSaveData.SetRepeatIfEmpty( sal_False );
+ aSaveData.SetIgnoreEmptyRows( false );
+ aSaveData.SetRepeatIfEmpty( false );
mpDPObject->SetSaveData(aSaveData);
ScSheetSourceDesc aSheetDesc(pDocSh ? pDocSh->GetDocument() : NULL);
mpDPObject->SetSheetDesc(aSheetDesc);
@@ -1608,10 +1625,10 @@ sal_Int32 lcl_GetFieldCount( const Reference<XDimensionsSupplier>& rSource, cons
return nRet;
}
-BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource,
+sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource,
const Any& rOrient, SCSIZE nIndex, ScFieldIdentifier& rFieldId )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
SCSIZE nPos = 0;
sal_Int32 nDimIndex = 0;
@@ -1686,13 +1703,13 @@ BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource,
rFieldId.mnFieldIdx = nRepeat;
}
else
- bOk = sal_False;
+ bOk = false;
}
return bOk;
}
-BOOL lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId )
+sal_Bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId )
{
// "By name" is always the first match.
// The name "Data" always refers to the data layout field.
@@ -2102,7 +2119,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
pDim = pNewDim;
}
- pDim->SetOrientation(sal::static_int_cast<USHORT>(eNew));
+ pDim->SetOrientation(sal::static_int_cast<sal_uInt16>(eNew));
// move changed field behind all other fields (make it the last field in dimension)
pSaveData->SetPosition( pDim, pSaveData->GetDimensions().size() );
@@ -2146,12 +2163,12 @@ void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc)
pDim->SetSubTotals( 0, NULL );
else
{
- USHORT nFunc = sal::static_int_cast<USHORT>( eNewFunc );
+ sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( eNewFunc );
pDim->SetSubTotals( 1, &nFunc );
}
}
else
- pDim->SetFunction( sal::static_int_cast<USHORT>( eNewFunc ) );
+ pDim->SetFunction( sal::static_int_cast<sal_uInt16>( eNewFunc ) );
SetDPObject( pDPObj );
}
}
@@ -2193,21 +2210,21 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
pDim->SetSubTotals( 0, NULL );
else
{
- USHORT nFunc = sal::static_int_cast<USHORT>( rSubtotals[ 0 ] );
+ sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( rSubtotals[ 0 ] );
pDim->SetSubTotals( 1, &nFunc );
}
}
else if( nCount > 1 )
{
// set multiple functions, ignore NONE and AUTO in this case
- ::std::vector< USHORT > aSubt;
+ ::std::vector< sal_uInt16 > aSubt;
for( sal_Int32 nIdx = 0; nIdx < nCount; ++nIdx )
{
GeneralFunction eFunc = rSubtotals[ nIdx ];
if( (eFunc != GeneralFunction_NONE) && (eFunc != GeneralFunction_AUTO) )
{
// do not insert functions twice
- USHORT nFunc = static_cast< USHORT >( eFunc );
+ sal_uInt16 nFunc = static_cast< sal_uInt16 >( eFunc );
if( ::std::find( aSubt.begin(), aSubt.end(), nFunc ) == aSubt.end() )
aSubt.push_back( nFunc );
}
@@ -2369,7 +2386,7 @@ sal_Bool ScDataPilotFieldObj::hasGroupInfo()
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
return pDimData->GetNamedGroupDim( pDim->GetName() ) || pDimData->GetNumGroupDim( pDim->GetName() );
- return sal_False;
+ return false;
}
DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
@@ -2527,7 +2544,7 @@ void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
sal_Bool ScDataPilotFieldObj::HasString(const Sequence< OUString >& rItems, const OUString& aString)
{
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = false;
sal_Int32 nCount(rItems.getLength());
sal_Int32 nItem(0);
@@ -3270,7 +3287,7 @@ Any SAL_CALL ScDataPilotItemsObj::getByName( const OUString& aName )
{
Reference<XIndexAccess> xMembersIndex(new ScNameToIndexAccess( xMembers ));
sal_Int32 nCount = xMembersIndex->getCount();
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
sal_Int32 nItem = 0;
while (nItem < nCount && !bFound )
{
@@ -3299,7 +3316,7 @@ sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName )
throw(RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Bool bFound = sal_False;
+ sal_Bool bFound = false;
Reference<XNameAccess> xMembers = GetMembers();
if (xMembers.is())
{
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 1728c7002165..d279fff0d020 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -283,25 +283,25 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ
switch (eMode)
{
case sheet::DataImportMode_NONE:
- rParam.bImport = FALSE;
+ rParam.bImport = false;
break;
case sheet::DataImportMode_SQL:
- rParam.bImport = TRUE;
- rParam.bSql = TRUE;
+ rParam.bImport = sal_True;
+ rParam.bSql = sal_True;
break;
case sheet::DataImportMode_TABLE:
- rParam.bImport = TRUE;
- rParam.bSql = FALSE;
+ rParam.bImport = sal_True;
+ rParam.bSql = false;
rParam.nType = ScDbTable;
break;
case sheet::DataImportMode_QUERY:
- rParam.bImport = TRUE;
- rParam.bSql = FALSE;
+ rParam.bImport = sal_True;
+ rParam.bSql = false;
rParam.nType = ScDbQuery;
break;
default:
OSL_FAIL("falscher Mode");
- rParam.bImport = FALSE;
+ rParam.bImport = false;
}
}
}
@@ -331,7 +331,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq
aOutPos.Column = rParam.nDestCol;
aOutPos.Row = rParam.nDestRow;
- USHORT nSortCount = 0;
+ sal_uInt16 nSortCount = 0;
while ( nSortCount < MAXSORT && rParam.bDoSort[nSortCount] )
++nSortCount;
@@ -339,7 +339,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq
if (nSortCount)
{
table::TableSortField* pFieldArray = aFields.getArray();
- for (USHORT i=0; i<nSortCount; i++)
+ for (sal_uInt16 i=0; i<nSortCount; i++)
{
pFieldArray[i].Field = rParam.nField[i];
pFieldArray[i].IsAscending = rParam.bAscending[i];
@@ -431,10 +431,10 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
rParam.bAscending[i] = pFieldArray[i].SortAscending;
// FieldType wird ignoriert
- rParam.bDoSort[i] = TRUE;
+ rParam.bDoSort[i] = sal_True;
}
for (i=nCount; i<MAXSORT; i++)
- rParam.bDoSort[i] = FALSE;
+ rParam.bDoSort[i] = false;
}
else if ( rProp.Value >>= aNewSeq )
{
@@ -457,10 +457,10 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
rParam.aCollatorAlgorithm = pFieldArray[i].CollatorAlgorithm;
// FieldType wird ignoriert
- rParam.bDoSort[i] = TRUE;
+ rParam.bDoSort[i] = sal_True;
}
for (i=nCount; i<MAXSORT; i++)
- rParam.bDoSort[i] = FALSE;
+ rParam.bDoSort[i] = false;
}
}
else if (aPropName.EqualsAscii( SC_UNONAME_ISCASE ))
@@ -487,7 +487,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
{
sal_Int32 nVal = 0;
if ( rProp.Value >>= nVal )
- rParam.nUserIndex = (USHORT)nVal;
+ rParam.nUserIndex = (sal_uInt16)nVal;
}
else if (aPropName.EqualsAscii( SC_UNONAME_COLLLOC ))
{
@@ -504,7 +504,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b
//------------------------------------------------------------------------
-ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, USHORT nP ) :
+ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP ) :
xRef( pDesc ), // Objekt festhalten
rParent( *pDesc ),
nPos( nP )
@@ -565,8 +565,8 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns(
ScSubTotalParam aParam;
rParent.GetData(aParam);
- UINT32 nColCount = aSubTotalColumns.getLength();
- if ( nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) )
+ sal_uInt32 nColCount = aSubTotalColumns.getLength();
+ if ( nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) )
{
SCCOL nCount = static_cast<SCCOL>(nColCount);
aParam.nSubTotals[nPos] = nCount;
@@ -619,7 +619,7 @@ void ScSubTotalDescriptorBase::PutData( const ScSubTotalParam& /* rParam */ )
// XSubTotalDesctiptor
-ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(USHORT nIndex)
+ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 nIndex)
{
if ( nIndex < getCount() )
return new ScSubTotalFieldObj( this, nIndex );
@@ -632,8 +632,8 @@ void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException)
ScSubTotalParam aParam;
GetData(aParam);
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
- aParam.bGroupActive[i] = FALSE;
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
+ aParam.bGroupActive[i] = false;
//! Notify oder so fuer die Field-Objekte???
@@ -648,15 +648,15 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew(
ScSubTotalParam aParam;
GetData(aParam);
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < MAXSUBTOTAL && aParam.bGroupActive[nPos] )
++nPos;
- UINT32 nColCount = aSubTotalColumns.getLength();
+ sal_uInt32 nColCount = aSubTotalColumns.getLength();
- if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) )
+ if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) )
{
- aParam.bGroupActive[nPos] = TRUE;
+ aParam.bGroupActive[nPos] = sal_True;
aParam.nField[nPos] = static_cast<SCCOL>(nGroupColumn);
delete aParam.pSubTotals[nPos];
@@ -708,7 +708,7 @@ sal_Int32 SAL_CALL ScSubTotalDescriptorBase::getCount() throw(uno::RuntimeExcept
ScSubTotalParam aParam;
GetData(aParam);
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( nCount < MAXSUBTOTAL && aParam.bGroupActive[nCount] )
++nCount;
return nCount;
@@ -719,7 +719,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xField.is())
return uno::makeAny(xField);
else
@@ -779,7 +779,7 @@ void SAL_CALL ScSubTotalDescriptorBase::setPropertyValue(
{
sal_Int32 nVal = 0;
if ( aValue >>= nVal )
- aParam.nUserIndex = (USHORT)nVal;
+ aParam.nUserIndex = (sal_uInt16)nVal;
}
else if (aString.EqualsAscii( SC_UNONAME_MAXFLD ))
{
@@ -954,13 +954,13 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScConsolidationDescriptor::getSo
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aParam.nDataAreaCount;
+ sal_uInt16 nCount = aParam.nDataAreaCount;
if (!aParam.ppDataAreas)
nCount = 0;
table::CellRangeAddress aRange;
uno::Sequence<table::CellRangeAddress> aSeq(nCount);
table::CellRangeAddress* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScArea* pArea = aParam.ppDataAreas[i];
if (pArea)
@@ -981,12 +981,12 @@ void SAL_CALL ScConsolidationDescriptor::setSources(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = (USHORT)aSources.getLength();
+ sal_uInt16 nCount = (sal_uInt16)aSources.getLength();
if (nCount)
{
const table::CellRangeAddress* pAry = aSources.getConstArray();
ScArea** pNew = new ScArea*[nCount];
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<nCount; i++)
pNew[i] = new ScArea( pAry[i].Sheet,
static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow,
@@ -1082,7 +1082,7 @@ void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocSh = NULL; // invalid
@@ -1256,7 +1256,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
if (!rEntry.pStr)
rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein)
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR;
rEntry.nField = pAry[i].Field;
rEntry.bQueryByString = !pAry[i].IsNumeric;
@@ -1284,7 +1284,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1292,7 +1292,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1304,7 +1304,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized
for (i=nCount; i<nParamCount; i++)
- aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen
+ aParam.GetEntry(i).bDoQuery = false; // ueberzaehlige Felder zuruecksetzen
PutData(aParam);
}
@@ -1330,7 +1330,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
if (!rEntry.pStr)
rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein)
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR;
rEntry.nField = pAry[i].Field;
rEntry.bQueryByString = !pAry[i].IsNumeric;
@@ -1364,7 +1364,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_EMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1372,7 +1372,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
{
rEntry.eOp = SC_EQUAL;
rEntry.nVal = SC_NONEMPTYFIELDS;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = false;
*rEntry.pStr = EMPTY_STRING;
}
break;
@@ -1384,7 +1384,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized
for (i=nCount; i<nParamCount; i++)
- aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen
+ aParam.GetEntry(i).bDoQuery = false; // ueberzaehlige Felder zuruecksetzen
PutData(aParam);
}
@@ -1639,7 +1639,7 @@ ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const
ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection();
if (pNames)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pNames->SearchName( aName, nPos ))
pRet = (*pNames)[nPos];
}
@@ -1663,7 +1663,7 @@ void SAL_CALL ScDatabaseRangeObj::setName( const rtl::OUString& aNewName )
{
ScDBDocFunc aFunc(*pDocShell);
String aNewStr(aNewName);
- BOOL bOk = aFunc.RenameDBRange( aName, aNewStr, TRUE );
+ sal_Bool bOk = aFunc.RenameDBRange( aName, aNewStr, sal_True );
if (bOk)
aName = aNewStr;
}
@@ -1701,7 +1701,7 @@ void SAL_CALL ScDatabaseRangeObj::setDataArea( const table::CellRangeAddress& aD
aNewData.SetArea( aDataArea.Sheet, (SCCOL)aDataArea.StartColumn, (SCROW)aDataArea.StartRow,
(SCCOL)aDataArea.EndColumn, (SCROW)aDataArea.EndRow );
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
@@ -1719,7 +1719,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getSortDescript
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOLROW nFieldStart = aParam.bByRow ? static_cast<SCCOLROW>(aDBRange.aStart.Col()) : static_cast<SCCOLROW>(aDBRange.aStart.Row());
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart )
aParam.nField[i] -= nFieldStart;
}
@@ -1773,7 +1773,7 @@ void ScDatabaseRangeObj::SetQueryParam(const ScQueryParam& rQueryParam)
aNewData.SetQueryParam(aParam);
aNewData.SetHeader(aParam.bHasHeader); // not in ScDBData::SetQueryParam
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
@@ -1795,7 +1795,7 @@ void ScDatabaseRangeObj::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOL nFieldStart = aDBRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( rSubTotalParam.bGroupActive[i] )
{
@@ -1820,7 +1820,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
ScRange aDBRange;
pData->GetArea(aDBRange);
SCCOL nFieldStart = aDBRange.aStart.Col();
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
if ( aParam.bGroupActive[i] )
{
@@ -1833,7 +1833,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
ScDBData aNewData( *pData );
aNewData.SetSubTotalParam(aParam);
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
@@ -1869,7 +1869,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException)
ScDBDocFunc aFunc(*pDocShell);
// Import zu wiederholen?
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScImportParam aImportParam;
pData->GetImportParam( aImportParam );
if (aImportParam.bImport && !pData->HasImportSelection())
@@ -1879,12 +1879,12 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException)
SCROW nDummyRow;
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
uno::Reference< sdbc::XResultSet > xResultSet;
- bContinue = aFunc.DoImport( nTab, aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag als Parameter
+ bContinue = aFunc.DoImport( nTab, aImportParam, xResultSet, NULL, sal_True, false ); //! Api-Flag als Parameter
}
// interne Operationen (sort, query, subtotal) nur, wenn kein Fehler
if (bContinue)
- aFunc.RepeatDB( pData->GetName(), TRUE, TRUE );
+ aFunc.RepeatDB( pData->GetName(), sal_True, sal_True );
}
}
@@ -1907,8 +1907,8 @@ void SAL_CALL ScDatabaseRangeObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -1925,7 +1925,7 @@ void ScDatabaseRangeObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -1972,7 +1972,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
if ( pDocShell && pData )
{
ScDBData aNewData( *pData );
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
String aString(aPropertyName);
if ( aString.EqualsAscii( SC_UNONAME_KEEPFORM ) )
@@ -2044,12 +2044,12 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
{
}
else
- bDo = FALSE;
+ bDo = false;
if (bDo)
{
ScDBDocFunc aFunc(*pDocShell);
- aFunc.ModifyDBData(aNewData, TRUE);
+ aFunc.ModifyDBData(aNewData, sal_True);
}
}
}
@@ -2180,7 +2180,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XDatabaseRanges
-ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(USHORT nIndex)
+ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
{
if (pDocShell)
{
@@ -2207,7 +2207,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName,
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
@@ -2215,7 +2215,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName,
String aString(aName);
ScRange aNameRange( (SCCOL)aRange.StartColumn, (SCROW)aRange.StartRow, aRange.Sheet,
(SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet );
- bDone = aFunc.AddDBRange( aString, aNameRange, TRUE );
+ bDone = aFunc.AddDBRange( aString, aNameRange, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2225,12 +2225,12 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
String aString(aName);
- bDone = aFunc.DeleteDBRange( aString, TRUE );
+ bDone = aFunc.DeleteDBRange( aString, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2267,7 +2267,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xRange.is())
return uno::makeAny(xRange);
else
@@ -2313,11 +2313,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDatabaseRangesObj::getElementNames()
ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection();
if (pNames)
{
- USHORT nCount = pNames->GetCount();
+ sal_uInt16 nCount = pNames->GetCount();
String aName;
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pAry[i] = (*pNames)[i]->GetName();
return aSeq;
@@ -2339,12 +2339,12 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const rtl::OUString& aName )
if (pNames)
{
String aString(aName);
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pNames->SearchName( aString, nPos ))
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 68ad542e3ec0..71193ff7f2fe 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -303,7 +303,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const rtl::OUS
beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE;
- USHORT nWID = pEntry->nWID;
+ sal_uInt16 nWID = pEntry->nWID;
if ( nWID == ATTR_FONT || nWID == ATTR_CJK_FONT || nWID == ATTR_CTL_FONT || !nWID )
{
// static default for font is system-dependent,
@@ -378,7 +378,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const rtl::OUString& aPr
if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- const SfxPoolItem* pItem = pPool->GetItem( pEntry->nWID, SFX_ITEMS_STATICDEFAULT );
+ const SfxPoolItem* pItem = pPool->GetItem2( pEntry->nWID, SFX_ITEMS_DEFAULT );
if (pItem)
pItem->QueryValue( aRet, pEntry->nMemberId );
}
diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx
index da87ca9e3644..388a652e32eb 100644
--- a/sc/source/ui/unoobj/detreg.cxx
+++ b/sc/source/ui/unoobj/detreg.cxx
@@ -50,27 +50,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */ ,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey(xKey->createKey( aDelimiter + ScFilterDetect::impl_getStaticImplementationName() +
- aUnoServices ));
-
- Sequence< OUString > aServices(ScFilterDetect::impl_getStaticSupportedServiceNames());
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /* pRegistryKey */ )
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 3420281600aa..12699b5f0e08 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -216,7 +216,7 @@ void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject&
ScDispatch::ScDispatch(ScTabViewShell* pViewSh) :
pViewShell( pViewSh ),
- bListeningToView( FALSE )
+ bListeningToView( false )
{
if (pViewShell)
StartListening(*pViewShell);
@@ -250,7 +250,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL,
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) )
{
ScViewData* pViewData = pViewShell->GetViewData();
@@ -322,7 +322,7 @@ void SAL_CALL ScDispatch::addStatusListener(
bListeningToView = sal_True;
}
- ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD);
+ ScDBData* pDBData = pViewShell->GetDBData(false,SC_DB_OLD);
if ( pDBData )
pDBData->GetImportParam( aLastImport );
lcl_FillDataSource( aEvent, aLastImport ); // modifies State, IsEnabled
@@ -341,8 +341,8 @@ void SAL_CALL ScDispatch::removeStatusListener(
if ( !aURL.Complete.compareToAscii(cURLDocDataSource) )
{
- USHORT nCount = aDataSourceListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aDataSourceListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<frame::XStatusListener> *pObj = aDataSourceListeners[n];
if ( *pObj == xListener )
@@ -357,7 +357,7 @@ void SAL_CALL ScDispatch::removeStatusListener(
uno::Reference<view::XSelectionSupplier> xSupplier(lcl_GetSelectionSupplier( pViewShell ));
if ( xSupplier.is() )
xSupplier->removeSelectionChangeListener(this);
- bListeningToView = sal_False;
+ bListeningToView = false;
}
}
}
@@ -372,7 +372,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO
if ( pViewShell )
{
ScImportParam aNewImport;
- ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD);
+ ScDBData* pDBData = pViewShell->GetDBData(false,SC_DB_OLD);
if ( pDBData )
pDBData->GetImportParam( aNewImport );
@@ -389,7 +389,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO
lcl_FillDataSource( aEvent, aNewImport ); // modifies State, IsEnabled
- for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ )
(*aDataSourceListeners[n])->statusChanged( aEvent );
aLastImport = aNewImport;
@@ -404,11 +404,11 @@ void SAL_CALL ScDispatch::disposing( const ::com::sun::star::lang::EventObject&
{
uno::Reference<view::XSelectionSupplier> xSupplier(rSource.Source, uno::UNO_QUERY);
xSupplier->removeSelectionChangeListener(this);
- bListeningToView = sal_False;
+ bListeningToView = false;
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ )
(*aDataSourceListeners[n])->disposing( aEvent );
pViewShell = NULL;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 98e52213ac3b..e84f6756757e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -227,15 +227,15 @@ ScPrintUIOptions::ScPrintUIOptions()
sal_Bool bSuppress = rPrintOpt.GetSkipEmpty();
ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) );
- DBG_ASSERT( aStrings.Count() >= 19, "resource incomplete" );
- if( aStrings.Count() < 19 ) // bad resource ?
+ DBG_ASSERT( aStrings.Count() >= 10, "resource incomplete" );
+ if( aStrings.Count() < 10 ) // bad resource ?
return;
m_aUIProperties.realloc( 8 );
// create Section for spreadsheet (results in an extra tab page in dialog)
SvtModuleOptions aOpt;
- String aAppGroupname( aStrings.GetString( 18 ) );
+ String aAppGroupname( aStrings.GetString( 9 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) );
m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
@@ -245,35 +245,35 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a bool option for empty pages
m_aUIProperties[2].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 1 ) ),
- rtl::OUString( aStrings.GetString( 2 ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsIncludeEmptyPages:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsIncludeEmptyPages" ) ),
! bSuppress
);
// create Subgroup for print content
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
- m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
+ m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 2 ) ),
rtl::OUString(),
aPrintRangeOpt
);
// create a choice for the content to create
- uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpTexts( 3 );
- aChoices[0] = aStrings.GetString( 7 );
- aHelpTexts[0] = aStrings.GetString( 8 );
- aChoices[1] = aStrings.GetString( 9 );
- aHelpTexts[1] = aStrings.GetString( 10 );
- aChoices[2] = aStrings.GetString( 11 );
- aHelpTexts[2] = aStrings.GetString( 12 );
+ uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpIds( 3 );
+ aChoices[0] = aStrings.GetString( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 4 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aChoices[2] = aStrings.GetString( 5 );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
m_aUIProperties[4].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ),
aChoices,
nContent );
// create Subgroup for print range
aPrintRangeOpt.mbInternalOnly = sal_True;
- m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 13 ) ),
+ m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
rtl::OUString(),
aPrintRangeOpt
);
@@ -281,13 +281,13 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a choice for the range to print
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aChoices.realloc( 2 );
- aHelpTexts.realloc( 2 );
- aChoices[0] = aStrings.GetString( 14 );
- aHelpTexts[0] = aStrings.GetString( 15 );
- aChoices[1] = aStrings.GetString( 16 );
- aHelpTexts[1] = aStrings.GetString( 17 );
+ aHelpIds.realloc( 2 );
+ aChoices[0] = aStrings.GetString( 7 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 8 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1" ) );
m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintRangeName,
aChoices,
0 );
@@ -295,7 +295,7 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
m_aUIProperties[7].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
rtl::OUString(),
aPageRangeOpt
@@ -437,6 +437,12 @@ ScSheetSaveData* ScModelObj::GetSheetSaveData()
return NULL;
}
+void ScModelObj::RepaintRange( const ScRange& rRange )
+{
+ if (pDocShell)
+ pDocShell->PostPaint( rRange, PAINT_GRID );
+}
+
uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException)
{
@@ -555,7 +561,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // has become invalid
@@ -578,13 +584,26 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DELETEZ( pPrintFuncCache );
// handle "OnCalculate" sheet events (search also for VBA event handlers)
- if ( pDocShell && pDocShell->GetDocument()->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true ) )
- HandleCalculateEvents();
+ if ( pDocShell )
+ {
+ ScDocument* pDoc = pDocShell->GetDocument();
+ if ( pDoc->GetVbaEventProcessor().is() )
+ {
+ // If the VBA event processor is set, HasAnyCalcNotification is much faster than HasAnySheetEventScript
+ if ( pDoc->HasAnyCalcNotification() && pDoc->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true ) )
+ HandleCalculateEvents();
+ }
+ else
+ {
+ if ( pDoc->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE ) )
+ HandleCalculateEvents();
+ }
+ }
}
}
else if ( rHint.ISA( ScPointerChangedHint ) )
{
- USHORT nFlags = ((const ScPointerChangedHint&)rHint).GetFlags();
+ sal_uInt16 nFlags = ((const ScPointerChangedHint&)rHint).GetFlags();
if (nFlags & SC_POINTERCHANGED_NUMFMT)
{
// NumberFormatter-Pointer am Uno-Objekt neu setzen
@@ -735,7 +754,7 @@ bool lcl_ParseTarget( const String& rTarget, ScRange& rTargetRange, Rectangle& r
return bRangeValid;
}
-BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
+sal_Bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
const uno::Sequence< beans::PropertyValue >& rOptions,
ScMarkData& rMark,
ScPrintSelectionStatus& rStatus, String& rPagesStr ) const
@@ -743,12 +762,12 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
DBG_ASSERT( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" );
DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" );
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
uno::Reference<frame::XController> xView;
// defaults when no options are passed: all sheets, include empty pages
- sal_Bool bSelectedSheetsOnly = sal_False;
+ sal_Bool bSelectedSheetsOnly = false;
sal_Bool bIncludeEmptyPages = sal_True;
bool bHasPrintContent = false;
@@ -796,11 +815,11 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
if ( pSelObj && pSelObj->GetDocShell() == pDocShell )
{
- BOOL bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
- BOOL bCursor = pSelObj->IsCursorOnly();
+ sal_Bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
+ sal_Bool bCursor = pSelObj->IsCursorOnly();
const ScRangeList& rRanges = pSelObj->GetRangeList();
- rMark.MarkFromRangeList( rRanges, FALSE );
+ rMark.MarkFromRangeList( rRanges, false );
rMark.MarkToSimple();
if ( rMark.IsMultiMarked() )
@@ -826,7 +845,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
rStatus.SetMode( SC_PRINTSEL_RANGE );
rStatus.SetRanges( rRanges );
- bDone = TRUE;
+ bDone = sal_True;
}
// multi selection isn't supported
}
@@ -855,7 +874,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
if( rMark.IsMarked() && !rMark.IsMultiMarked() )
{
rStatus.SetMode( SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -869,9 +888,9 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
- rMark.SelectTable( nTab, TRUE );
+ rMark.SelectTable( nTab, sal_True );
rStatus.SetMode( SC_PRINTSEL_DOCUMENT );
- bDone = TRUE;
+ bDone = sal_True;
}
// other selection types aren't supported
}
@@ -889,7 +908,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
if (!rViewMark.GetTableSelect(nTab))
- rMark.SelectTable( nTab, FALSE );
+ rMark.SelectTable( nTab, false );
}
}
}
@@ -1024,7 +1043,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
}
ScPrintFunc aFunc( pDocShell, pDocShell->GetPrinter(), nTab,
pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() );
- aFunc.SetRenderFlag( TRUE );
+ aFunc.SetRenderFlag( sal_True );
Range aPageRange( nRenderer+1, nRenderer+1 );
MultiSelection aPage( aPageRange );
@@ -1034,10 +1053,10 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, FALSE, NULL, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, NULL );
ScRange aCellRange;
- BOOL bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
+ sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
Size aTwips = aFunc.GetPageSize();
awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM( aTwips.Height() ) );
@@ -1109,7 +1128,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
{
pDrawView = new FmFormView( pModel, pDev );
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetPrintPreview( sal_True );
}
ScRange aRange;
@@ -1125,7 +1144,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
ScPrintFunc aFunc( pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() );
aFunc.SetDrawView( pDrawView );
- aFunc.SetRenderFlag( TRUE );
+ aFunc.SetRenderFlag( sal_True );
if( aStatus.GetMode() == SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS )
aFunc.SetExclusivelyDrawOleAndDrawObjects();
@@ -1163,7 +1182,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
}
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, TRUE, NULL, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_True, NULL, NULL );
// resolve the hyperlinks for PDF export
@@ -1258,6 +1277,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
rBookmarks.clear();
}
+ if ( pDrawView )
+ pDrawView->HideSdrPage();
delete pDrawView;
}
@@ -1276,7 +1297,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno
sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bLocked = FALSE;
+ sal_Bool bLocked = false;
if (pDocShell)
bLocked = ( pDocShell->GetLockCount() != 0 );
return bLocked;
@@ -1306,7 +1327,7 @@ void SAL_CALL ScModelObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeEx
sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if (pDocShell)
{
nRet = pDocShell->GetLockCount();
@@ -1340,7 +1361,7 @@ void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
if (pDocShell)
- pDocShell->DoRecalc(TRUE);
+ pDocShell->DoRecalc(sal_True);
else
{
OSL_FAIL("keine DocShell"); //! Exception oder so?
@@ -1351,7 +1372,7 @@ void SAL_CALL ScModelObj::calculateAll() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
if (pDocShell)
- pDocShell->DoHardRecalc(TRUE);
+ pDocShell->DoHardRecalc(sal_True);
else
{
OSL_FAIL("keine DocShell"); //! Exception oder so?
@@ -1365,7 +1386,7 @@ sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime
return pDocShell->GetDocument()->GetAutoCalc();
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return FALSE;
+ return false;
}
void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled )
@@ -1398,7 +1419,7 @@ void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword ) throw(uno::R
String aString(aPassword);
ScDocFunc aFunc(*pDocShell);
- aFunc.Protect( TABLEID_DOC, aString, TRUE );
+ aFunc.Protect( TABLEID_DOC, aString, sal_True );
}
}
@@ -1411,7 +1432,7 @@ void SAL_CALL ScModelObj::unprotect( const rtl::OUString& aPassword )
String aString(aPassword);
ScDocFunc aFunc(*pDocShell);
- BOOL bDone = aFunc.Unprotect( TABLEID_DOC, aString, TRUE );
+ sal_Bool bDone = aFunc.Unprotect( TABLEID_DOC, aString, sal_True );
if (!bDone)
throw lang::IllegalArgumentException();
}
@@ -1424,7 +1445,7 @@ sal_Bool SAL_CALL ScModelObj::isProtected() throw(uno::RuntimeException)
return pDocShell->GetDocument()->IsDocProtected();
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return FALSE;
+ return false;
}
// XDrawPagesSupplier
@@ -1456,7 +1477,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
String aGoalString(aGoalValue);
ScDocument* pDoc = pDocShell->GetDocument();
double fValue = 0.0;
- BOOL bFound = pDoc->Solver(
+ sal_Bool bFound = pDoc->Solver(
(SCCOL)aFormulaPosition.Column, (SCROW)aFormulaPosition.Row, aFormulaPosition.Sheet,
(SCCOL)aVariablePosition.Column, (SCROW)aVariablePosition.Row, aVariablePosition.Sheet,
aGoalString, fValue );
@@ -1505,7 +1526,7 @@ void SAL_CALL ScModelObj::consolidate(
if (pDocShell)
{
const ScConsolidateParam& rParam = aImpl.GetParam();
- pDocShell->DoConsolidate( rParam, TRUE );
+ pDocShell->DoConsolidate( rParam, sal_True );
pDocShell->GetDocument()->SetConsolidateDlgData( &rParam );
}
}
@@ -1581,7 +1602,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
ScDocOptions aNewOpt = rOldOpt;
- BOOL bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue );
+ sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue );
if (bOpt)
{
// done...
@@ -1651,10 +1672,10 @@ void SAL_CALL ScModelObj::setPropertyValue(
}
else if ( aString.EqualsAscii( SC_UNO_ISUNDOENABLED ) )
{
- BOOL bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
pDoc->EnableUndo( bUndoEnabled );
- USHORT nCount = ( bUndoEnabled ?
- static_cast< USHORT >( SvtUndoOptions().GetUndoCount() ) : 0 );
+ sal_uInt16 nCount = ( bUndoEnabled ?
+ static_cast< sal_uInt16 >( SvtUndoOptions().GetUndoCount() ) : 0 );
pDocShell->GetUndoManager()->SetMaxUndoActionCount( nCount );
}
else if ( aString.EqualsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) )
@@ -1695,7 +1716,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
// Recalculation after loading is handled separately.
//! Recalc only for options that need it?
if ( !pDoc->IsImportingXML() )
- pDocShell->DoHardRecalc( TRUE );
+ pDocShell->DoHardRecalc( sal_True );
pDocShell->SetDocumentModified();
}
}
@@ -1761,11 +1782,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
}
else if ( aString.EqualsAscii( SC_UNO_COLLABELRNG ) )
{
- aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, TRUE ));
+ aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, sal_True ));
}
else if ( aString.EqualsAscii( SC_UNO_ROWLABELRNG ) )
{
- aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, FALSE ));
+ aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, false ));
}
else if ( aString.EqualsAscii( SC_UNO_AREALINKS ) )
{
@@ -1794,7 +1815,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
// default for no model is FALSE
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- sal_Bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : sal_False;
+ sal_Bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : false;
ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoControlFocus );
}
else if ( aString.EqualsAscii( SC_UNO_FORBIDDEN ) )
@@ -1883,7 +1904,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
SolarMutexGuard aGuard;
uno::Reference<uno::XInterface> xRet;
String aNameStr(aServiceSpecifier);
- USHORT nType = ScServiceProvider::GetProviderType(aNameStr);
+ sal_uInt16 nType = ScServiceProvider::GetProviderType(aNameStr);
if ( nType != SC_SERVICE_INVALID )
{
// drawing layer tables must be kept as long as the model is alive
@@ -1897,6 +1918,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
case SC_SERVICE_MARKERTAB: xRet.set(xDrawMarkerTab); break;
case SC_SERVICE_DASHTAB: xRet.set(xDrawDashTab); break;
case SC_SERVICE_CHDATAPROV: xRet.set(xChartDataProv); break;
+ case SC_SERVICE_VBAOBJECTPROVIDER: xRet.set(xObjProvider); break;
}
// #i64497# If a chart is in a temporary document during clipoard paste,
@@ -1922,6 +1944,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
case SC_SERVICE_MARKERTAB: xDrawMarkerTab.set(xRet); break;
case SC_SERVICE_DASHTAB: xDrawDashTab.set(xRet); break;
case SC_SERVICE_CHDATAPROV: xChartDataProv.set(xRet); break;
+ case SC_SERVICE_VBAOBJECTPROVIDER: xObjProvider.set(xRet); break;
}
}
}
@@ -2156,7 +2179,7 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange
if ( rOperation.compareToAscii("cell-change") == 0 && pDocShell )
{
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( rRanges, FALSE );
+ aMarkData.MarkFromRangeList( rRanges, false );
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
@@ -2274,7 +2297,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
-uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 nIndex) const
+uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
{
if (pDocShell)
{
@@ -2282,7 +2305,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 n
DBG_ASSERT(pDrawLayer,"kann Draw-Layer nicht anlegen");
if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument()->GetTableCount() )
{
- SdrPage* pPage = pDrawLayer->GetPage((USHORT)nIndex);
+ SdrPage* pPage = pDrawLayer->GetPage((sal_uInt16)nIndex);
DBG_ASSERT(pPage,"Draw-Page nicht gefunden");
if (pPage)
{
@@ -2305,7 +2328,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa
String aNewName;
pDocShell->GetDocument()->CreateValidTabName(aNewName);
ScDocFunc aFunc(*pDocShell);
- if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, TRUE, TRUE ) )
+ if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, sal_True, sal_True ) )
xRet.set(GetObjectByIndex_Impl( nPos ));
}
return xRet;
@@ -2323,7 +2346,7 @@ void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>&
{
SCTAB nPageNum = static_cast<SCTAB>(pPage->GetPageNum());
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteTable( nPageNum, TRUE, TRUE );
+ aFunc.DeleteTable( nPageNum, sal_True, sal_True );
}
}
}
@@ -2413,12 +2436,12 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const rtl::OUString& aName, sal
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
String aNamStr(aName);
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE );
+ bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2428,13 +2451,13 @@ void SAL_CALL ScTableSheetsObj::moveByName( const rtl::OUString& aName, sal_Int1
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
String aNamStr(aName);
SCTAB nSource;
if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) )
- bDone = pDocShell->MoveTable( nSource, nDestination, FALSE, TRUE );
+ bDone = pDocShell->MoveTable( nSource, nDestination, false, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2445,7 +2468,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
String aNamStr(aName);
@@ -2453,7 +2476,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
SCTAB nSource;
if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) )
{
- bDone = pDocShell->MoveTable( nSource, nDestination, TRUE, TRUE );
+ bDone = pDocShell->MoveTable( nSource, nDestination, sal_True, sal_True );
if (bDone)
{
// #i92477# any index past the last sheet means "append" in MoveTable
@@ -2463,7 +2486,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
nResultTab = nTabCount - 1;
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.RenameTable( nResultTab, aNewStr, TRUE, TRUE );
+ bDone = aFunc.RenameTable( nResultTab, aNewStr, sal_True, sal_True );
}
}
}
@@ -2476,8 +2499,8 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
- BOOL bIllArg = FALSE;
+ sal_Bool bDone = false;
+ sal_Bool bIllArg = false;
//! Type of aElement can be some specific interface instead of XInterface
@@ -2501,17 +2524,17 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const
{
SCTAB nPosition = pDoc->GetTableCount();
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE );
+ bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True );
if (bDone)
pSheetObj->InitInsertSheet( pDocShell, nPosition );
// Dokument und neuen Range am Objekt setzen
}
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
if (!bDone)
@@ -2528,8 +2551,8 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
- BOOL bIllArg = FALSE;
+ sal_Bool bDone = false;
+ sal_Bool bIllArg = false;
//! Type of aElement can be some specific interface instead of XInterface
@@ -2546,10 +2569,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
if ( pDocShell->GetDocument()->GetTable( aNamStr, nPosition ) )
{
ScDocFunc aFunc(*pDocShell);
- if ( aFunc.DeleteTable( nPosition, TRUE, TRUE ) )
+ if ( aFunc.DeleteTable( nPosition, sal_True, sal_True ) )
{
// InsertTable kann jetzt eigentlich nicht schiefgehen...
- bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE );
+ bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True );
if (bDone)
pSheetObj->InitInsertSheet( pDocShell, nPosition );
}
@@ -2561,10 +2584,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
}
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
else
- bIllArg = TRUE;
+ bIllArg = sal_True;
}
if (!bDone)
@@ -2581,7 +2604,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
SCTAB nIndex;
@@ -2589,7 +2612,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName )
if ( pDocShell->GetDocument()->GetTable( aString, nIndex ) )
{
ScDocFunc aFunc(*pDocShell);
- bDone = aFunc.DeleteTable( nIndex, TRUE, TRUE );
+ bDone = aFunc.DeleteTable( nIndex, sal_True, sal_True );
}
else
{
@@ -2608,7 +2631,7 @@ uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition( sal
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet)));
+ uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
if (! xSheet.is())
throw lang::IndexOutOfBoundsException();
@@ -2619,7 +2642,7 @@ uno::Reference< table::XCellRange > SAL_CALL ScTableSheetsObj::getCellRangeByPos
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet)));
+ uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
if (! xSheet.is())
throw lang::IndexOutOfBoundsException();
@@ -2742,9 +2765,9 @@ sal_Bool SAL_CALL ScTableSheetsObj::hasByName( const rtl::OUString& aName )
{
SCTAB nIndex;
if ( pDocShell->GetDocument()->GetTable( String(aName), nIndex ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
@@ -2803,14 +2826,14 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartCol+nPosition <= nEndCol &&
nStartCol+nPosition+nCount-1 <= MAXCOL )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab,
(SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab );
- bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, TRUE, TRUE );
+ bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2820,14 +2843,14 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
// Der zu loeschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartCol+nIndex+nCount-1 <= nEndCol )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab,
(SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab );
- bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, TRUE, TRUE );
+ bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -2907,9 +2930,9 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const rtl::OUString& aName )
String aString(aName);
if ( ::AlphaToCol( nCol, aString) )
if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
- return TRUE;
+ return sal_True;
- return FALSE; // nicht gefunden
+ return false; // nicht gefunden
}
// XPropertySet
@@ -2943,33 +2966,33 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue(
{
sal_Int32 nNewWidth = 0;
if ( aValue >>= nNewWidth )
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)HMMToTwips(nNewWidth), TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)HMMToTwips(nNewWidth), sal_True, sal_True );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT with size 0: hide
}
else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) )
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab,
- SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE );
- // FALSE for columns currently has no effect
+ aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab,
+ SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True );
+ // sal_False for columns currently has no effect
}
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE ) )
{
//! single function to set/remove all breaks?
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
if (bSet)
- aFunc.InsertPageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True );
}
}
@@ -2990,7 +3013,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro
if ( aNameString.EqualsAscii( SC_UNONAME_CELLWID ) )
{
// for hidden column, return original height
- USHORT nWidth = pDoc->GetOriginalWidth( nStartCol, nTab );
+ sal_uInt16 nWidth = pDoc->GetOriginalWidth( nStartCol, nTab );
aAny <<= (sal_Int32)TwipsToHMM(nWidth);
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
@@ -3000,7 +3023,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro
}
else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) )
{
- BOOL bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) )
@@ -3064,14 +3087,14 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartRow+nPosition <= nEndRow &&
nStartRow+nPosition+nCount-1 <= MAXROW )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab,
MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab );
- bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, TRUE, TRUE );
+ bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3081,14 +3104,14 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
// Der zu loeschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartRow+nIndex+nCount-1 <= nEndRow )
{
ScDocFunc aFunc(*pDocShell);
ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab,
MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab );
- bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, TRUE, TRUE );
+ bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, sal_True, sal_True );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3172,13 +3195,13 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
// TODO: It's probably cleaner to use a different property name
// for this.
- pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (USHORT)HMMToTwips(nNewHeight) );
+ pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (sal_uInt16)HMMToTwips(nNewHeight) );
}
else
{
- BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True );
else
{
//! manually set old heights again?
@@ -3189,14 +3212,14 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
{
sal_Int32 nNewHeight = 0;
if ( aValue >>= nNewHeight )
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
- (USHORT)HMMToTwips(nNewHeight), TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL,
+ (sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
{
- BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True );
// SC_SIZE_DIRECT with size 0: hide
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLFILT ) )
@@ -3210,12 +3233,12 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE) )
{
//! single function to set/remove all breaks?
- BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
if (bSet)
- aFunc.InsertPageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE );
+ aFunc.InsertPageBreak( false, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True );
else
- aFunc.RemovePageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE );
+ aFunc.RemovePageBreak( false, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLBACK ) || aNameString.EqualsAscii( SC_UNONAME_CELLTRAN ) )
{
@@ -3248,7 +3271,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper
if ( aNameString.EqualsAscii( SC_UNONAME_CELLHGT ) )
{
// for hidden row, return original height
- USHORT nHeight = pDoc->GetOriginalHeight( nStartRow, nTab );
+ sal_uInt16 nHeight = pDoc->GetOriginalHeight( nStartRow, nTab );
aAny <<= (sal_Int32)TwipsToHMM(nHeight);
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) )
@@ -3264,7 +3287,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper
}
else if ( aNameString.EqualsAscii( SC_UNONAME_OHEIGHT ) )
{
- BOOL bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE);
+ sal_Bool bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt );
}
else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) )
@@ -3412,7 +3435,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
ScDocFunc aFunc( *pDocShell );
- aFunc.ReplaceNote( aPos, rText, 0, 0, TRUE );
+ aFunc.ReplaceNote( aPos, rText, 0, 0, sal_True );
}
}
@@ -3425,11 +3448,11 @@ void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Run
if ( GetAddressByIndex_Impl( nIndex, aPos ) )
{
ScMarkData aMarkData;
- aMarkData.SelectTable( aPos.Tab(), TRUE );
+ aMarkData.SelectTable( aPos.Tab(), sal_True );
aMarkData.SetMultiMarkArea( ScRange(aPos) );
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteContents( aMarkData, IDF_NOTE, TRUE, TRUE );
+ aFunc.DeleteContents( aMarkData, IDF_NOTE, sal_True, sal_True );
}
}
}
@@ -3450,7 +3473,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera
sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
if (pDocShell)
{
ScCellIterator aCellIter( pDocShell->GetDocument(), 0,0, nTab, MAXCOL,MAXROW, nTab );
@@ -3515,7 +3538,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XScenarios
-BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex )
+sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex )
{
//! Case-insensitiv ????
@@ -3531,16 +3554,16 @@ BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& r
if ( aTabName == aString )
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
- USHORT nCount = (USHORT)getCount();
+ sal_uInt16 nCount = (sal_uInt16)getCount();
if ( pDocShell && nIndex >= 0 && nIndex < nCount )
return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 );
@@ -3565,13 +3588,13 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
if ( pDocShell )
{
ScMarkData aMarkData;
- aMarkData.SelectTable( nTab, TRUE );
+ aMarkData.SelectTable( nTab, sal_True );
- USHORT nRangeCount = (USHORT)aRanges.getLength();
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength();
if (nRangeCount)
{
const table::CellRangeAddress* pAry = aRanges.getConstArray();
- for (USHORT i=0; i<nRangeCount; i++)
+ for (sal_uInt16 i=0; i<nRangeCount; i++)
{
DBG_ASSERT( pAry[i].Sheet == nTab, "addScenario mit falscher Tab" );
ScRange aRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab,
@@ -3585,7 +3608,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
String aCommStr(aComment);
Color aColor( COL_LIGHTGRAY ); // Default
- USHORT nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT;
+ sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT;
pDocShell->MakeScenario( nTab, aNameStr, aCommStr, aColor, nFlags, aMarkData );
}
@@ -3599,7 +3622,7 @@ void SAL_CALL ScScenariosObj::removeByName( const rtl::OUString& aName )
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
{
ScDocFunc aFunc(*pDocShell);
- aFunc.DeleteTable( nTab+nIndex+1, TRUE, TRUE );
+ aFunc.DeleteTable( nTab+nIndex+1, sal_True, sal_True );
}
}
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index f9cc38e1e747..c7e241b90f0e 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -56,7 +56,7 @@
TYPEINIT1( ScHeaderFooterChangedHint, SfxHint );
-ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(USHORT nP) :
+ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(sal_uInt16 nP) :
nPart( nP )
{
}
@@ -104,13 +104,13 @@ ScEditEngineDefaulter* ScSharedHeaderFooterEditSource::GetEditEngine()
// each ScHeaderFooterEditSource object has its own ScHeaderFooterTextData
ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj* pContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( *pContent, nP ) )
{
}
ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj& rContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( rContent, nP ) )
{
}
@@ -197,7 +197,7 @@ ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddre
aCellPos( rP ),
pEditEngine( NULL ),
pForwarder( NULL ),
- bDataValid( FALSE )
+ bDataValid( false )
{
if (pDocShell)
pDocShell->GetDocument()->AddUnoObject(*this);
@@ -238,7 +238,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScEditEngineDefaulter( pEnginePool, TRUE );
+ pEditEngine = new ScEditEngineDefaulter( pEnginePool, sal_True );
}
pForwarder = new SvxEditEngineForwarder(*pEditEngine);
}
@@ -251,7 +251,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder()
if ( const EditTextObject* pEditObj = pNote->GetEditTextObject() )
pEditEngine->SetText( *pEditObj ); // incl. Umbrueche
- bDataValid = TRUE;
+ bDataValid = sal_True;
return pForwarder;
}
@@ -287,7 +287,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // ungueltig geworden
@@ -296,7 +296,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
DELETEZ( pEditEngine ); // EditEngine uses document's pool
}
else if ( nId == SFX_HINT_DATACHANGED )
- bDataValid = FALSE; // Text muss neu geholt werden
+ bDataValid = false; // Text muss neu geholt werden
}
}
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index ee5a3c6d2aef..fa0f28f30bed 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -192,7 +192,7 @@ sal_Bool SAL_CALL ScSheetEventsObj::hasElements() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
if (mpDocShell)
return sal_True;
- return sal_False;
+ return false;
}
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 4c55d48fcff3..56af26ed5313 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -127,26 +127,26 @@ enum ScUnoCollectMode
class ScUnoEditEngine : public ScEditEngineDefaulter
{
ScUnoCollectMode eMode;
- USHORT nFieldCount;
+ sal_uInt16 nFieldCount;
TypeId aFieldType;
SvxFieldData* pFound; // lokale Kopie
- USHORT nFieldPar;
+ sal_uInt16 nFieldPar;
xub_StrLen nFieldPos;
- USHORT nFieldIndex;
+ sal_uInt16 nFieldIndex;
public:
ScUnoEditEngine(ScEditEngineDefaulter* pSource);
~ScUnoEditEngine();
//! nPos should be xub_StrLen
- virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+ virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos,
Color*& rTxtColor, Color*& rFldColor );
- USHORT CountFields(TypeId aType);
- SvxFieldData* FindByIndex(USHORT nIndex, TypeId aType);
- SvxFieldData* FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType);
+ sal_uInt16 CountFields(TypeId aType);
+ SvxFieldData* FindByIndex(sal_uInt16 nIndex, TypeId aType);
+ SvxFieldData* FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType);
- USHORT GetFieldPar() const { return nFieldPar; }
+ sal_uInt16 GetFieldPar() const { return nFieldPar; }
xub_StrLen GetFieldPos() const { return nFieldPos; }
};
@@ -171,7 +171,7 @@ ScUnoEditEngine::~ScUnoEditEngine()
}
String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor )
+ sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor )
{
String aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor ));
if (eMode != SC_UNO_COLLECT_NONE)
@@ -200,7 +200,7 @@ String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
return aRet;
}
-USHORT ScUnoEditEngine::CountFields(TypeId aType)
+sal_uInt16 ScUnoEditEngine::CountFields(TypeId aType)
{
eMode = SC_UNO_COLLECT_COUNT;
aFieldType = aType;
@@ -212,7 +212,7 @@ USHORT ScUnoEditEngine::CountFields(TypeId aType)
return nFieldCount;
}
-SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType)
+SvxFieldData* ScUnoEditEngine::FindByIndex(sal_uInt16 nIndex, TypeId aType)
{
eMode = SC_UNO_COLLECT_FINDINDEX;
nFieldIndex = nIndex;
@@ -225,7 +225,7 @@ SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType)
return pFound;
}
-SvxFieldData* ScUnoEditEngine::FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType)
+SvxFieldData* ScUnoEditEngine::FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType)
{
eMode = SC_UNO_COLLECT_FINDPOS;
nFieldPar = nPar;
@@ -290,15 +290,15 @@ void ScCellFieldsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XIndexAccess (via XTextFields)
-ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
+ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const
{
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter* pEditEngine = ((ScCellEditSource*)pEditSource)->GetEditEngine();
ScUnoEditEngine aTempEngine(pEditEngine);
- if ( aTempEngine.FindByIndex( (USHORT)Index, NULL ) ) // in der Zelle ist der Typ egal
+ if ( aTempEngine.FindByIndex( (sal_uInt16)Index, NULL ) ) // in der Zelle ist der Typ egal
{
- USHORT nPar = aTempEngine.GetFieldPar();
+ sal_uInt16 nPar = aTempEngine.GetFieldPar();
xub_StrLen nPos = aTempEngine.GetFieldPos();
ESelection aSelection( nPar, nPos, nPar, nPos+1 ); // Feld ist 1 Zeichen
return new ScCellFieldObj( pDocShell, aCellPos, aSelection );
@@ -620,7 +620,7 @@ void SAL_CALL ScCellFieldObj::attach( const uno::Reference<text::XTextRange>& xT
uno::Reference<text::XText> xText(xTextRange->getText());
if (xText.is())
{
- xText->insertTextContent( xTextRange, this, TRUE );
+ xText->insertTextContent( xTextRange, this, sal_True );
}
}
}
@@ -686,7 +686,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue(
{
SvxURLField* pURL = (SvxURLField*)pField; // ist eine Kopie in der ScUnoEditEngine
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if ( aNameString.EqualsAscii( SC_UNONAME_URL ) )
{
if (aValue >>= aStrVal)
@@ -703,7 +703,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue(
pURL->SetTargetFrame( aStrVal );
}
else
- bOk = FALSE;
+ bOk = false;
if (bOk)
{
@@ -854,7 +854,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellFieldObj::getSupportedServiceNames()
//------------------------------------------------------------------------
-ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, USHORT nP, USHORT nT) :
+ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, sal_uInt16 nT) :
pContentObj( pContent ),
nPart( nP ),
nType( nT ),
@@ -895,7 +895,7 @@ ScHeaderFieldsObj::~ScHeaderFieldsObj()
// XIndexAccess (via XTextFields)
-ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
+ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const
{
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)pEditSource)->GetEditEngine();
@@ -913,13 +913,13 @@ ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
case SC_SERVICE_SHEETFIELD: aTypeId = TYPE(SvxTableField); break;
// bei SC_SERVICE_INVALID bleibt TypeId Null
}
- SvxFieldData* pData = aTempEngine.FindByIndex( (USHORT)Index, aTypeId );
+ SvxFieldData* pData = aTempEngine.FindByIndex( (sal_uInt16)Index, aTypeId );
if ( pData )
{
- USHORT nPar = aTempEngine.GetFieldPar();
+ sal_uInt16 nPar = aTempEngine.GetFieldPar();
xub_StrLen nPos = aTempEngine.GetFieldPos();
- USHORT nFieldType = nType;
+ sal_uInt16 nFieldType = nType;
if ( nFieldType == SC_SERVICE_INVALID )
{
if ( pData->ISA( SvxPageField ) ) nFieldType = SC_SERVICE_PAGEFIELD;
@@ -1092,8 +1092,8 @@ sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue )
}
}
-ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, USHORT nP,
- USHORT nT, const ESelection& rSel) :
+ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP,
+ sal_uInt16 nT, const ESelection& rSel) :
OComponentHelper( getMutex() ),
pPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertySet() : lcl_GetHeaderFieldPropertySet() ),
pContentObj( pContent ),
@@ -1175,7 +1175,7 @@ void SAL_CALL ScHeaderFieldObj::release() throw()
OComponentHelper::release();
}
-void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, USHORT nP,
+void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, sal_uInt16 nP,
const ESelection& rSel )
{
if ( pContent && !pEditSource )
@@ -1294,7 +1294,7 @@ void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>&
uno::Reference<text::XText> xText(xTextRange->getText());
if (xText.is())
{
- xText->insertTextContent( xTextRange, this, TRUE );
+ xText->insertTextContent( xTextRange, this, sal_True );
}
}
}
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 257489993850..9ca2f29ffccc 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -71,7 +71,7 @@ SC_SIMPLE_SERVICE_INFO( ScFilterOptionsObj, SCFILTEROPTIONSOBJ_IMPLNAME, SCFILTE
//------------------------------------------------------------------------
ScFilterOptionsObj::ScFilterOptionsObj() :
- bExport( sal_False )
+ bExport( false )
{
}
@@ -209,8 +209,8 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
else
{
sal_Bool bMultiByte = sal_True;
- sal_Bool bDBEnc = sal_False;
- sal_Bool bAscii = sal_False;
+ sal_Bool bDBEnc = false;
+ sal_Bool bAscii = false;
sal_Unicode cStrDel = '"';
sal_Unicode cAsciiDel = ';';
@@ -300,7 +300,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
void SAL_CALL ScFilterOptionsObj::setTargetDocument( const uno::Reference<lang::XComponent>& /* xDoc */ )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- bExport = sal_False;
+ bExport = false;
}
// XExporter
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index aa3f03cab80a..1fea8e338cca 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -184,7 +184,7 @@ ScCondFormatEntryItem::ScCondFormatEntryItem() :
//------------------------------------------------------------------------
ScTableConditionalFormat::ScTableConditionalFormat(
- ScDocument* pDoc, ULONG nKey, FormulaGrammar::Grammar eGrammar)
+ ScDocument* pDoc, sal_uLong nKey, FormulaGrammar::Grammar eGrammar)
{
// Eintrag aus dem Dokument lesen...
@@ -200,8 +200,8 @@ ScTableConditionalFormat::ScTableConditionalFormat(
if (pDoc->IsInExternalReferenceMarking())
pFormat->MarkUsedExternalReferences();
- USHORT nEntryCount = pFormat->Count();
- for (USHORT i=0; i<nEntryCount; i++)
+ sal_uInt16 nEntryCount = pFormat->Count();
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
{
ScCondFormatEntryItem aItem;
const ScCondFormatEntry* pFormatEntry = pFormat->GetEntry(i);
@@ -277,19 +277,14 @@ ScTableConditionalFormat::~ScTableConditionalFormat()
void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry)
{
- ScTableConditionalEntry* pNew = new ScTableConditionalEntry(this, aEntry);
+ ScTableConditionalEntry* pNew = new ScTableConditionalEntry(aEntry);
pNew->acquire();
aEntries.push_back(pNew);
}
-void ScTableConditionalFormat::DataChanged()
-{
- // wenn's mal das "lebende Objekt" ist, muss hier was passieren...
-}
-
// XSheetConditionalFormat
-ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(USHORT nIndex) const
+ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
return aEntries[nIndex];
}
@@ -388,7 +383,6 @@ void SAL_CALL ScTableConditionalFormat::addNew(
}
AddEntry_Impl(aEntry);
- DataChanged();
}
void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
@@ -439,7 +433,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xEntry.is())
return uno::makeAny(xEntry);
else
@@ -479,7 +473,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const rtl::OUString& aNam
for (long i=0; i<nCount; i++)
if ( aName == lcl_GetEntryNameFromIndex(i) )
{
- xEntry.set(GetObjectByIndex_Impl((USHORT)i));
+ xEntry.set(GetObjectByIndex_Impl((sal_uInt16)i));
break;
}
@@ -511,9 +505,9 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const rtl::OUString& aNam
long nCount = aEntries.size();
for (long i=0; i<nCount; i++)
if ( aName == lcl_GetEntryNameFromIndex(i) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
// XUnoTunnel
@@ -563,14 +557,11 @@ ScTableConditionalEntry::ScTableConditionalEntry(ScTableConditionalFormat* pPar,
pParent( pPar ),
aData( aItem )
{
- if (pParent)
- pParent->acquire();
+ // #i113668# only store the settings, keep no reference to parent object
}
ScTableConditionalEntry::~ScTableConditionalEntry()
{
- if (pParent)
- pParent->release();
}
void ScTableConditionalEntry::GetData(ScCondFormatEntryItem& rData) const
@@ -592,8 +583,6 @@ void SAL_CALL ScTableConditionalEntry::setOperator( sheet::ConditionOperator nOp
{
SolarMutexGuard aGuard;
aData.meMode = lcl_ConditionOperatorToMode( nOperator );
- if (pParent)
- pParent->DataChanged();
}
sal_Int32 SAL_CALL ScTableConditionalEntry::getConditionOperator()
@@ -623,8 +612,6 @@ void SAL_CALL ScTableConditionalEntry::setFormula1( const rtl::OUString& aFormul
{
SolarMutexGuard aGuard;
aData.maExpr1 = String( aFormula1 );
- if (pParent)
- pParent->DataChanged();
}
rtl::OUString SAL_CALL ScTableConditionalEntry::getFormula2() throw(uno::RuntimeException)
@@ -638,8 +625,6 @@ void SAL_CALL ScTableConditionalEntry::setFormula2( const rtl::OUString& aFormul
{
SolarMutexGuard aGuard;
aData.maExpr2 = String( aFormula2 );
- if (pParent)
- pParent->DataChanged();
}
table::CellAddress SAL_CALL ScTableConditionalEntry::getSourcePosition() throw(uno::RuntimeException)
@@ -657,8 +642,6 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
{
SolarMutexGuard aGuard;
aData.maPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
- if (pParent)
- pParent->DataChanged();
}
// XSheetConditionalEntry
@@ -674,36 +657,34 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const rtl::OUString& aStyle
{
SolarMutexGuard aGuard;
aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
- if (pParent)
- pParent->DataChanged();
}
//------------------------------------------------------------------------
-ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey,
+ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
const formula::FormulaGrammar::Grammar eGrammar) :
aPropSet( lcl_GetValidatePropertyMap() )
{
// Eintrag aus dem Dokument lesen...
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( pDoc && nKey )
{
const ScValidationData* pData = pDoc->GetValidationEntry( nKey );
if (pData)
{
- nMode = sal::static_int_cast<USHORT>( pData->GetOperation() );
+ nMode = sal::static_int_cast<sal_uInt16>( pData->GetOperation() );
aSrcPos = pData->GetValidSrcPos(); // valid pos for expressions
aExpr1 = pData->GetExpression( aSrcPos, 0, 0, eGrammar );
aExpr2 = pData->GetExpression( aSrcPos, 1, 0, eGrammar );
meGrammar1 = meGrammar2 = eGrammar;
- nValMode = sal::static_int_cast<USHORT>( pData->GetDataMode() );
+ nValMode = sal::static_int_cast<sal_uInt16>( pData->GetDataMode() );
bIgnoreBlank = pData->IsIgnoreBlank();
nShowList = pData->GetListType();
bShowInput = pData->GetInput( aInputTitle, aInputMessage );
ScValidErrorStyle eStyle;
bShowError = pData->GetErrMsg( aErrorTitle, aErrorMessage, eStyle );
- nErrorStyle = sal::static_int_cast<USHORT>( eStyle );
+ nErrorStyle = sal::static_int_cast<sal_uInt16>( eStyle );
// During save to XML, sheet::ValidationType_ANY formulas are not
// saved, even if in the list, see
@@ -712,7 +693,7 @@ ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey,
if (nValMode != SC_VALID_ANY && pDoc->IsInExternalReferenceMarking())
pData->MarkUsedExternalReferences();
- bFound = TRUE;
+ bFound = sal_True;
}
}
if (!bFound)
@@ -767,10 +748,10 @@ void ScTableValidationObj::ClearData_Impl()
{
nMode = SC_COND_NONE;
nValMode = SC_VALID_ANY;
- bIgnoreBlank = TRUE;
+ bIgnoreBlank = sal_True;
nShowList = sheet::TableValidationVisibility::UNSORTED;
- bShowInput = FALSE;
- bShowError = FALSE;
+ bShowInput = false;
+ bShowError = false;
nErrorStyle = SC_VALERR_STOP;
aSrcPos.Set(0,0,0);
aExpr1.Erase();
@@ -788,11 +769,6 @@ ScTableValidationObj::~ScTableValidationObj()
{
}
-void ScTableValidationObj::DataChanged()
-{
- // wenn's mal das "lebende Objekt" ist, muss hier was passieren...
-}
-
// XSheetCondition
sheet::ConditionOperator SAL_CALL ScTableValidationObj::getOperator()
@@ -806,7 +782,7 @@ void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOpera
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToMode( nOperator ) );
+ nMode = sal::static_int_cast<sal_uInt16>( lcl_ConditionOperatorToMode( nOperator ) );
DataChanged();
}
@@ -821,7 +797,7 @@ void SAL_CALL ScTableValidationObj::setConditionOperator( sal_Int32 nOperator )
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToModeNew( nOperator ) );
+ nMode = sal::static_int_cast<sal_uInt16>( lcl_ConditionOperatorToModeNew( nOperator ) );
DataChanged();
}
@@ -836,7 +812,6 @@ void SAL_CALL ScTableValidationObj::setFormula1( const rtl::OUString& aFormula1
{
SolarMutexGuard aGuard;
aExpr1 = String( aFormula1 );
- DataChanged();
}
rtl::OUString SAL_CALL ScTableValidationObj::getFormula2() throw(uno::RuntimeException)
@@ -850,7 +825,6 @@ void SAL_CALL ScTableValidationObj::setFormula2( const rtl::OUString& aFormula2
{
SolarMutexGuard aGuard;
aExpr2 = String( aFormula2 );
- DataChanged();
}
table::CellAddress SAL_CALL ScTableValidationObj::getSourcePosition() throw(uno::RuntimeException)
@@ -868,7 +842,6 @@ void SAL_CALL ScTableValidationObj::setSourcePosition( const table::CellAddress&
{
SolarMutexGuard aGuard;
aSrcPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
- DataChanged();
}
uno::Sequence<sheet::FormulaToken> SAL_CALL ScTableValidationObj::getTokens( sal_Int32 nIndex )
@@ -1027,8 +1000,6 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= nVal )
meGrammar2 = static_cast< FormulaGrammar::Grammar >(nVal);
}
-
- DataChanged();
}
uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const rtl::OUString& aPropertyName )
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index f4b8633d0964..5ebe9942ab37 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -104,7 +104,7 @@ ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) :
pTempDoc = CreateDocument();
else
{
- rCache.SetInUse( TRUE );
+ rCache.SetInUse( sal_True );
if ( !rCache.GetDocument() )
rCache.SetDocument( CreateDocument() );
}
@@ -115,7 +115,7 @@ ScTempDocSource::~ScTempDocSource()
if ( pTempDoc )
delete pTempDoc;
else
- rCache.SetInUse( FALSE );
+ rCache.SetInUse( false );
}
ScDocument* ScTempDocSource::GetDocument()
@@ -130,7 +130,7 @@ ScDocument* ScTempDocSource::GetDocument()
ScTempDocCache::ScTempDocCache() :
pDoc( NULL ),
- bInUse( FALSE )
+ bInUse( false )
{
}
@@ -159,7 +159,7 @@ void ScTempDocCache::Clear()
//! merge this with ScAreaLink::Refresh
//! copy directly without a clipboard document?
-BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
+sal_Bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScDocument* pDestDoc, const ScAddress& rDestPos )
{
SCTAB nSrcTab = rSrcRange.aStart.Tab();
@@ -199,7 +199,7 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
if ( nErrCode == 0 && pFCell->IsValue() )
{
sal_uInt32 nNewFormat = pFCell->GetStandardFormat( *pClipDoc->GetFormatTable(), nFormat );
@@ -215,10 +215,10 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewRange );
- pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, FALSE );
+ pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, false );
delete pClipDoc;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -328,7 +328,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
// options aren't initialized from configuration - always get the same default behaviour
- BOOL bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue );
+ sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue );
if (!bDone)
throw beans::UnknownPropertyException();
}
@@ -355,7 +355,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess )
// XFunctionAccess
-BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler )
+sal_Bool lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler )
{
// function names are always case-insensitive
String aUpper( ScGlobal::pCharClass->upper( rName ) );
@@ -367,28 +367,28 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,cons
if ( eOp != ocNone )
{
rArray.AddOpCode( eOp );
- return TRUE;
+ return sal_True;
}
// 2. old add in functions
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
{
rArray.AddExternal( aUpper.GetBuffer() );
- return TRUE;
+ return sal_True;
}
// 3. new (uno) add in functions
- String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
+ String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, false ));
if (aIntName.Len())
{
rArray.AddExternal( aIntName.GetBuffer() ); // international name
- return TRUE;
+ return sal_True;
}
- return FALSE; // no valid function name
+ return false; // no valid function name
}
void lcl_AddRef( ScTokenArray& rArray, long nStartRow, long nColCount, long nRowCount )
@@ -520,7 +520,7 @@ class ArrayOfArrayProc
{
public:
static void processSequences( ScDocument* pDoc, const uno::Any& rArg, ScTokenArray& rTokenArr,
- long& rDocRow, BOOL& rArgErr, BOOL& rOverflow )
+ long& rDocRow, sal_Bool& rArgErr, sal_Bool& rOverflow )
{
SequencesContainer< T > aContainer( rArg, rTokenArr, rDocRow, pDoc );
aContainer.process();
@@ -576,8 +576,8 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
// add arguments to token array
//
- BOOL bArgErr = FALSE;
- BOOL bOverflow = FALSE;
+ sal_Bool bArgErr = false;
+ sal_Bool bOverflow = false;
long nDocRow = 0;
long nArgCount = aArguments.getLength();
const uno::Any* pArgArr = aArguments.getConstArray();
@@ -653,12 +653,12 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
long nRowCount = aSrcRange.aEnd.Row() - aSrcRange.aStart.Row() + 1;
if ( nStartRow + nRowCount > MAXROWCOUNT )
- bOverflow = TRUE;
+ bOverflow = sal_True;
else
{
// copy data
if ( !lcl_CopyData( pSrcDoc, aSrcRange, pDoc, ScAddress( 0, (SCROW)nDocRow, 0 ) ) )
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
nDocRow += nRowCount;
@@ -666,13 +666,13 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
lcl_AddRef( aTokenArr, nStartRow, nColCount, nRowCount );
}
else
- bArgErr = TRUE;
+ bArgErr = sal_True;
}
else
- bArgErr = TRUE;
+ bArgErr = sal_True;
}
else
- bArgErr = TRUE; // invalid type
+ bArgErr = sal_True; // invalid type
}
aTokenArr.AddOpCode(ocClose);
aTokenArr.AddOpCode(ocStop);
@@ -688,14 +688,14 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
// GRAM_PODF_A1 doesn't really matter for the token array but fits with
// other API compatibility grammars.
ScFormulaCell* pFormula = new ScFormulaCell( pDoc, aFormulaPos,
- &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (BYTE)(mbArray ? MM_FORMULA : MM_NONE) );
+ &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (sal_uInt8)(mbArray ? MM_FORMULA : MM_NONE) );
pDoc->PutCell( aFormulaPos, pFormula ); //! necessary?
// call GetMatrix before GetErrCode because GetMatrix always recalculates
// if there is no matrix result
const ScMatrix* pMat = mbArray ? pFormula->GetMatrix() : 0;
- USHORT nErrCode = pFormula->GetErrCode();
+ sal_uInt16 nErrCode = pFormula->GetErrCode();
if ( nErrCode == 0 )
{
if ( pMat )
@@ -723,7 +723,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
else
{
// any other error: IllegalArgumentException
- bArgErr = TRUE;
+ bArgErr = sal_True;
}
pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, IDF_ALL );
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index a7385c5b72c0..430252b688ae 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -130,8 +130,8 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const
if (pDocShell)
{
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager();
- USHORT nCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScTableLink))
@@ -188,8 +188,8 @@ void SAL_CALL ScSheetLinkObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -206,7 +206,7 @@ void ScSheetLinkObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -214,7 +214,7 @@ void ScSheetLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
{
ScTableLink* pLink = GetLink_Impl();
if( pLink )
- pLink->SetRefreshDelay( (ULONG) nRefresh );
+ pLink->SetRefreshDelay( (sal_uLong) nRefresh );
}
// XPropertySet
@@ -418,11 +418,11 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XSheetLinks
-ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(INT32 nIndex)
+ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (pDocShell)
{
- INT32 nCount = 0;
+ sal_Int32 nCount = 0;
ScStrCollection aNames; // um doppelte wegzulassen
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
@@ -556,10 +556,10 @@ sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const rtl::OUString& aName )
//! case-insensitiv ???
String aLinkDoc(pDoc->GetLinkDoc( nTab ));
if ( aLinkDoc == aNameStr )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(uno::RuntimeException)
@@ -574,10 +574,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u
SCTAB nTabCount = pDoc->GetTableCount();
String aName;
- INT32 nLinkCount = getCount();
+ sal_Int32 nLinkCount = getCount();
uno::Sequence<rtl::OUString> aSeq(nLinkCount);
rtl::OUString* pAry = aSeq.getArray();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
if (pDoc->IsLinked(nTab))
@@ -598,14 +598,14 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u
//------------------------------------------------------------------------
-ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos )
+ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, sal_uInt16 nPos )
{
if (pDocShell)
{
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager();
- USHORT nTotalCount = pLinkManager->GetLinks().Count();
- USHORT nAreaCount = 0;
- for (USHORT i=0; i<nTotalCount; i++)
+ sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count();
+ sal_uInt16 nAreaCount = 0;
+ for (sal_uInt16 i=0; i<nTotalCount; i++)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScAreaLink))
@@ -619,7 +619,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos )
return NULL; // nicht gefunden
}
-ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, USHORT nP) :
+ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, sal_uInt16 nP) :
aPropSet( lcl_GetSheetLinkMap() ),
pDocShell( pDocSh ),
nPos( nP )
@@ -670,7 +670,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr
String aOptions (pLink->GetOptions());
String aSource (pLink->GetSource());
ScRange aDest (pLink->GetDestArea());
- ULONG nRefresh = pLink->GetRefreshDelay();
+ sal_uLong nRefresh = pLink->GetRefreshDelay();
//! Undo fuer Loeschen
//! Undo zusammenfassen
@@ -679,7 +679,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr
pLinkManager->Remove( pLink );
pLink = NULL; // bei Remove geloescht
- BOOL bFitBlock = TRUE; // verschieben, wenn durch Update Groesse geaendert
+ sal_Bool bFitBlock = sal_True; // verschieben, wenn durch Update Groesse geaendert
if (pNewFile)
{
aFile = String( *pNewFile );
@@ -694,11 +694,11 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr
if (pNewDest)
{
ScUnoConversion::FillScRange( aDest, *pNewDest );
- bFitBlock = FALSE; // neuer Bereich angegeben -> keine Inhalte verschieben
+ bFitBlock = false; // neuer Bereich angegeben -> keine Inhalte verschieben
}
ScDocFunc aFunc(*pDocShell);
- aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, TRUE );
+ aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, sal_True );
}
}
@@ -706,7 +706,7 @@ void ScAreaLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
{
ScAreaLink* pLink = lcl_GetAreaLink( pDocShell, nPos );
if( pLink )
- pLink->SetRefreshDelay( (ULONG) nRefresh );
+ pLink->SetRefreshDelay( (sal_uLong) nRefresh );
}
// XRefreshable
@@ -738,8 +738,8 @@ void SAL_CALL ScAreaLinkObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -756,7 +756,7 @@ void ScAreaLinkObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -960,10 +960,10 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XAreaLinks
-ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(INT32 nIndex)
+ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if ( pDocShell && nIndex >= 0 && nIndex < getCount() )
- return new ScAreaLinkObj( pDocShell, (USHORT)nIndex );
+ return new ScAreaLinkObj( pDocShell, (sal_uInt16)nIndex );
return NULL; // nicht gefunden
}
@@ -989,14 +989,14 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP
ScDocFunc aFunc(*pDocShell);
aFunc.InsertAreaLink( aFileStr, aFilterStr, aOptionStr,
aSourceStr, ScRange(aDestAddr),
- 0, FALSE, TRUE ); // keine Inhalte verschieben
+ 0, false, sal_True ); // keine Inhalte verschieben
}
}
void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (USHORT)nIndex);
+ ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (sal_uInt16)nIndex);
if (pLink)
{
//! SetAddUndo oder so
@@ -1024,8 +1024,8 @@ sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException)
if (pDocShell)
{
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager();
- USHORT nTotalCount = pLinkManager->GetLinks().Count();
- for (USHORT i=0; i<nTotalCount; i++)
+ sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nTotalCount; i++)
{
::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i];
if (pBase->ISA(ScAreaLink))
@@ -1181,8 +1181,8 @@ void SAL_CALL ScDDELinkObj::removeRefreshListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRefreshListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRefreshListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n];
if ( *pObj == xListener )
@@ -1209,7 +1209,7 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( )
ScDocument* pDoc = pDocShell->GetDocument();
if ( pDoc )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) )
{
const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix( nPos );
@@ -1247,7 +1247,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >&
ScDocument* pDoc = pDocShell->GetDocument();
if ( pDoc )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) )
{
uno::Any aAny;
@@ -1270,7 +1270,7 @@ void ScDDELinkObj::Refreshed_Impl()
{
lang::EventObject aEvent;
aEvent.Source.set((cppu::OWeakObject*)this);
- for ( USHORT n=0; n<aRefreshListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ )
(*aRefreshListeners[n])->refreshed( aEvent );
}
@@ -1301,13 +1301,13 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XDDELinks
-ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(INT32 nIndex)
+ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (pDocShell)
{
String aAppl, aTopic, aItem;
if ( nIndex <= USHRT_MAX &&
- pDocShell->GetDocument()->GetDdeLinkData( (USHORT)nIndex, aAppl, aTopic, aItem ) )
+ pDocShell->GetDocument()->GetDdeLinkData( (sal_uInt16)nIndex, aAppl, aTopic, aItem ) )
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
}
return NULL;
@@ -1321,8 +1321,8 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const rtl::OUString& aName)
String aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nCount = pDoc->GetDdeLinkCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pDoc->GetDdeLinkCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem );
if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr )
@@ -1396,11 +1396,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno
String aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nCount = pDoc->GetDdeLinkCount();
+ sal_uInt16 nCount = pDoc->GetDdeLinkCount();
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem );
pAry[i] = lcl_BuildDDEName(aAppl, aTopic, aItem);
@@ -1420,15 +1420,15 @@ sal_Bool SAL_CALL ScDDELinksObj::hasByName( const rtl::OUString& aName )
String aAppl, aTopic, aItem;
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nCount = pDoc->GetDdeLinkCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pDoc->GetDdeLinkCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem );
if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return false;
}
// XDDELinks
@@ -1446,7 +1446,7 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink(
ScDocument* pDoc = pDocShell->GetDocument();
if ( pDoc )
{
- BYTE nMod = SC_DDE_DEFAULT;
+ sal_uInt8 nMod = SC_DDE_DEFAULT;
switch ( nMode )
{
case sheet::DDELinkMode_DEFAULT:
diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx
index 8a65a908979f..df961ae45a46 100644
--- a/sc/source/ui/unoobj/miscuno.cxx
+++ b/sc/source/ui/unoobj/miscuno.cxx
@@ -152,7 +152,7 @@ sal_Bool ScUnoHelpFunctions::GetBoolFromAny( const uno::Any& aAny )
{
if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN )
return *(sal_Bool*)aAny.getValue();
- return FALSE;
+ return false;
}
sal_Int16 ScUnoHelpFunctions::GetInt16FromAny( const uno::Any& aAny )
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index b7ca0b69aae3..0fd04cd5263f 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -558,7 +558,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName,
if ( nUnoType & sheet::NamedRangeFlag::COLUMN_HEADER ) nNewType |= RT_COLHEADER;
if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -573,7 +573,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName,
{
ScDocFunc aFunc(*pDocShell);
aFunc.SetNewRangeNames(pNewRanges, mbModifyAndBroadcast);
- bDone = TRUE;
+ bDone = true;
}
else
{
@@ -791,19 +791,19 @@ sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const rtl::OUString& aName )
return sal_True;
}
}
- return sal_False;
+ return false;
}
/** called from the XActionLockable interface methods on initial locking */
void ScNamedRangesObj::lock()
{
- pDocShell->GetDocument()->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDocShell->GetDocument()->CompileNameFormula( sal_True ); // CreateFormulaString
}
/** called from the XActionLockable interface methods on final unlock */
void ScNamedRangesObj::unlock()
{
- pDocShell->GetDocument()->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDocShell->GetDocument()->CompileNameFormula( false ); // CompileFormulaString
}
// document::XActionLockable
@@ -1077,7 +1077,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1101,7 +1101,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
pDoc->CompileColRowNameFormula();
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
pDocShell->SetDocumentModified();
- bDone = TRUE;
+ bDone = sal_True;
//! Undo ?!?! (hier und aus Dialog)
}
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index e8a5f535a35c..c8ba4ed5bd6f 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -72,7 +72,7 @@ sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions,
const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName(aPropertyName );
if( !pEntry || !pEntry->nWID )
- return sal_False;
+ return false;
switch( pEntry->nWID )
{
case PROP_UNO_CALCASSHOWN :
@@ -95,7 +95,7 @@ sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions,
{
sal_Int32 nIntVal = 0;
if ( aValue >>= nIntVal )
- rOptions.SetIterCount( (USHORT)nIntVal );
+ rOptions.SetIterCount( (sal_uInt16)nIntVal );
}
break;
case PROP_UNO_ITEREPSILON :
@@ -173,7 +173,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue(
break;
case PROP_UNO_NULLDATE:
{
- USHORT nD, nM, nY;
+ sal_uInt16 nD, nM, nY;
rOptions.GetDate( nD, nM, nY );
util::Date aDate( nD, nM, nY );
aRet <<= aDate;
@@ -213,7 +213,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue(
{
SolarMutexGuard aGuard;
- BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue );
+ sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue );
if (!bDone)
ScModelObj::setPropertyValue( aPropertyName, aValue );
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index faf3a7eb3d68..89a358ad1408 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -125,7 +125,7 @@ static const sal_Char pFilterHtmlWeb[] = "calc_HTML_WebQuery";
static const sal_Char pFilterRtf[] = "Rich Text Format (StarCalc)";
-static BOOL lcl_MayBeAscii( SvStream& rStream )
+static sal_Bool lcl_MayBeAscii( SvStream& rStream )
{
// ASCII/CSV is considered possible if there are no null bytes, or a Byte
// Order Mark is present, or if, for Unicode UCS2/UTF-16, all null bytes
@@ -136,12 +136,12 @@ static BOOL lcl_MayBeAscii( SvStream& rStream )
const size_t nBufSize = 2048;
sal_uInt16 aBuffer[ nBufSize ];
sal_uInt8* pByte = reinterpret_cast<sal_uInt8*>(aBuffer);
- ULONG nBytesRead = rStream.Read( pByte, nBufSize*2);
+ sal_uLong nBytesRead = rStream.Read( pByte, nBufSize*2);
if ( nBytesRead >= 2 && (aBuffer[0] == 0xfffe || aBuffer[0] == 0xfeff) )
{
// Unicode BOM file may contain null bytes.
- return TRUE;
+ return sal_True;
}
const sal_uInt16* p = aBuffer;
@@ -159,13 +159,13 @@ static BOOL lcl_MayBeAscii( SvStream& rStream )
return nMask != 0;
}
-static BOOL lcl_MayBeDBase( SvStream& rStream )
+static sal_Bool lcl_MayBeDBase( SvStream& rStream )
{
// Look for dbf marker, see connectivity/source/inc/dbase/DTable.hxx
// DBFType for values.
- const BYTE nValidMarks[] = {
+ const sal_uInt8 nValidMarks[] = {
0x03, 0x04, 0x05, 0x30, 0x43, 0xB3, 0x83, 0x8b, 0x8e, 0xf5 };
- BYTE nMark;
+ sal_uInt8 nMark;
rStream.Seek(STREAM_SEEK_TO_BEGIN);
rStream >> nMark;
bool bValidMark = false;
@@ -175,24 +175,24 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
bValidMark = true;
}
if ( !bValidMark )
- return FALSE;
+ return false;
const size_t nHeaderBlockSize = 32;
// Empty dbf is >= 32*2+1 bytes in size.
const size_t nEmptyDbf = nHeaderBlockSize * 2 + 1;
rStream.Seek(STREAM_SEEK_TO_END);
- ULONG nSize = rStream.Tell();
+ sal_uLong nSize = rStream.Tell();
if ( nSize < nEmptyDbf )
- return FALSE;
+ return false;
// length of header starts at 8
rStream.Seek(8);
- USHORT nHeaderLen;
+ sal_uInt16 nHeaderLen;
rStream >> nHeaderLen;
if ( nHeaderLen < nEmptyDbf || nSize < nHeaderLen )
- return FALSE;
+ return false;
// Last byte of header must be 0x0d, this is how it's specified.
// #i9581#,#i26407# but some applications don't follow the specification
@@ -200,8 +200,8 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// even boundary. Some (#i88577# ) even pad more or pad using a 0x1a ^Z
// control character (#i8857#). This results in:
// Last byte of header must be 0x0d on 32 bytes boundary.
- USHORT nBlocks = (nHeaderLen - 1) / nHeaderBlockSize;
- BYTE nEndFlag = 0;
+ sal_uInt16 nBlocks = (nHeaderLen - 1) / nHeaderBlockSize;
+ sal_uInt8 nEndFlag = 0;
while ( nBlocks > 1 && nEndFlag != 0x0d ) {
rStream.Seek( nBlocks-- * nHeaderBlockSize );
rStream >> nEndFlag;
@@ -225,11 +225,11 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// opening as template is done when a parameter tells to do so and a template filter can be detected
// (otherwise no valid filter would be found) or if the detected filter is a template filter and
// there is no parameter that forbids to open as template
- sal_Bool bOpenAsTemplate = sal_False;
- sal_Bool bWasReadOnly = sal_False, bReadOnly = sal_False;
+ sal_Bool bOpenAsTemplate = false;
+ sal_Bool bWasReadOnly = false, bReadOnly = false;
- sal_Bool bRepairPackage = sal_False;
- sal_Bool bRepairAllowed = sal_False;
+ sal_Bool bRepairPackage = false;
+ sal_Bool bRepairAllowed = false;
// now some parameters that can already be in the array, but may be overwritten or new inserted here
// remember their indices in the case new values must be added to the array
@@ -294,7 +294,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
SfxAllItemSet *pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, false );
bWasReadOnly = pItem && pItem->GetValue();
@@ -317,10 +317,10 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
pFilter = aMatcher.GetFilter4EA( aTypeName );
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, false, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -332,7 +332,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// maybe that IsStorage() already created an error!
if ( bIsStorage )
{
- uno::Reference < embed::XStorage > xStorage(aMedium.GetStorage( sal_False ));
+ uno::Reference < embed::XStorage > xStorage(aMedium.GetStorage( false ));
if ( aMedium.GetLastStorageCreationState() != ERRCODE_NONE )
{
// error during storage creation means _here_ that the medium
@@ -364,7 +364,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
String aFilterName;
if ( pFilter )
aFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : FALSE, &aFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : false, &aFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -384,20 +384,16 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -430,22 +426,22 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
pFilter = 0;
if ( pStream )
{
- SotStorageRef aStorage = new SotStorage ( pStream, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStream, false );
if ( !aStorage->GetError() )
{
// Excel-5: detect through contained streams
// there are some "excel" formats from 3rd party vendors that need to be distinguished
String aStreamName(RTL_CONSTASCII_USTRINGPARAM("Workbook"));
- BOOL bExcel97Stream = ( aStorage->IsStream( aStreamName ) );
+ sal_Bool bExcel97Stream = ( aStorage->IsStream( aStreamName ) );
aStreamName = String(RTL_CONSTASCII_USTRINGPARAM("Book"));
- BOOL bExcel5Stream = ( aStorage->IsStream( aStreamName ) );
+ sal_Bool bExcel5Stream = ( aStorage->IsStream( aStreamName ) );
if ( bExcel97Stream || bExcel5Stream )
{
if ( bExcel97Stream )
{
String aOldName;
- BOOL bIsCalcFilter = TRUE;
+ sal_Bool bIsCalcFilter = sal_True;
if ( pPreselectedFilter )
{
// cross filter; now this should be a type detection only, not a filter detection
@@ -474,7 +470,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
else if ( bExcel5Stream )
{
String aOldName;
- BOOL bIsCalcFilter = TRUE;
+ sal_Bool bIsCalcFilter = sal_True;
if ( pPreselectedFilter )
{
// cross filter; now this should be a type detection only, not a filter detection
@@ -518,18 +514,18 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
#define M_ALT(ANZ) (0x0200+(ANZ))
#define M_ENDE 0x8000
- static const UINT16 pLotus[] = // Lotus 1/1A/2
+ static const sal_uInt16 pLotus[] = // Lotus 1/1A/2
{ 0x0000, 0x0000, 0x0002, 0x0000,
M_ALT(2), 0x0004, 0x0006,
0x0004, M_ENDE };
- static const UINT16 pLotusNew[] = // Lotus >= 9.7
+ static const sal_uInt16 pLotusNew[] = // Lotus >= 9.7
{ 0x0000, 0x0000, M_DC, 0x0000, // Rec# + Len (0x1a)
M_ALT(3), 0x0003, 0x0004, 0x0005, // File Revision Code 97->ME
0x0010, 0x0004, 0x0000, 0x0000,
M_ENDE };
- static const UINT16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4
+ static const sal_uInt16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4
{ 0x09, // lobyte of BOF rec ID (0x0009, 0x0209, 0x0409)
M_ALT(3), 0x00, 0x02, 0x04, // hibyte of BOF rec ID (0x0009, 0x0209, 0x0409)
M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16)
@@ -539,7 +535,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x00, // hibyte of data type (0x0010, 0x0020, 0x0040)
M_ENDE };
- static const UINT16 pExcel2[] = // Excel BIFF4 Workspace
+ static const sal_uInt16 pExcel2[] = // Excel BIFF4 Workspace
{ 0x09, // lobyte of BOF rec ID (0x0409)
0x04, // hibyte of BOF rec ID (0x0409)
M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16)
@@ -549,7 +545,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x01, // hibyte of data type (0x0100)
M_ENDE };
- static const UINT16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream)
+ static const sal_uInt16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream)
{ 0x09, // lobyte of BOF rec ID (0x0809)
0x08, // hibyte of BOF rec ID (0x0809)
M_ALT(4), 4, 6, 8, 16, // lobyte of BOF rec size
@@ -559,7 +555,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x00, // hibyte of data type
M_ENDE };
- static const UINT16 pSc10[] = // StarCalc 1.0 Dokumente
+ static const sal_uInt16 pSc10[] = // StarCalc 1.0 Dokumente
{ 'B', 'l', 'a', 'i', 's', 'e', '-', 'T', 'a', 'b', 'e', 'l', 'l',
'e', 0x000A, 0x000D, 0x0000, // Sc10CopyRight[16]
M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC,
@@ -568,21 +564,21 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
0x0000,
M_ENDE };
- static const UINT16 pLotus2[] = // Lotus >3
+ static const sal_uInt16 pLotus2[] = // Lotus >3
{ 0x0000, 0x0000, 0x001A, 0x0000, // Rec# + Len (26)
M_ALT(2), 0x0000, 0x0002, // File Revision Code
0x0010,
0x0004, 0x0000, // File Revision Subcode
M_ENDE };
- static const UINT16 pQPro[] =
+ static const sal_uInt16 pQPro[] =
{ 0x0000, 0x0000, 0x0002, 0x0000,
M_ALT(4), 0x0001, 0x0002, // WB1, WB2
0x0006, 0x0007, // QPro 6/7 (?)
0x0010,
M_ENDE };
- static const UINT16 pDIF1[] = // DIF mit CR-LF
+ static const sal_uInt16 pDIF1[] = // DIF mit CR-LF
{
'T', 'A', 'B', 'L', 'E',
M_DC, M_DC,
@@ -591,7 +587,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
'\"',
M_ENDE };
- static const UINT16 pDIF2[] = // DIF mit CR oder LF
+ static const sal_uInt16 pDIF2[] = // DIF mit CR oder LF
{
'T', 'A', 'B', 'L', 'E',
M_DC,
@@ -600,13 +596,13 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
'\"',
M_ENDE };
- static const UINT16 pSylk[] = // Sylk
+ static const sal_uInt16 pSylk[] = // Sylk
{
'I', 'D', ';',
M_ALT(3), 'P', 'N', 'E', // 'P' plus undocumented Excel extensions 'N' and 'E'
M_ENDE };
- static const UINT16 *ppFilterPatterns[] = // Arrays mit Suchmustern
+ static const sal_uInt16 *ppFilterPatterns[] = // Arrays mit Suchmustern
{
pLotus,
pExcel1,
@@ -640,38 +636,38 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
// suchen Sie jetzt!
// ... realisiert ueber 'Mustererkennung'
- BYTE nAkt;
- BOOL bSync; // Datei und Muster stimmen ueberein
- USHORT nFilter; // Zaehler ueber alle Filter
- const UINT16 *pSearch; // aktuelles Musterwort
+ sal_uInt8 nAkt;
+ sal_Bool bSync; // Datei und Muster stimmen ueberein
+ sal_uInt16 nFilter; // Zaehler ueber alle Filter
+ const sal_uInt16 *pSearch; // aktuelles Musterwort
for ( nFilter = 0 ; nFilter < nFilterCount ; nFilter++ )
{
rStr.Seek( 0 ); // am Anfang war alles Uebel...
rStr >> nAkt;
pSearch = ppFilterPatterns[ nFilter ];
- bSync = TRUE;
+ bSync = sal_True;
while( !rStr.IsEof() && bSync )
{
- register UINT16 nMuster = *pSearch;
+ register sal_uInt16 nMuster = *pSearch;
if( nMuster < 0x0100 )
{ // direkter Byte-Vergleich
- if( ( BYTE ) nMuster != nAkt )
- bSync = FALSE;
+ if( ( sal_uInt8 ) nMuster != nAkt )
+ bSync = false;
}
else if( nMuster & M_DC )
{ // don't care
}
else if( nMuster & M_ALT(0) )
{ // alternative Bytes
- BYTE nAnzAlt = ( BYTE ) nMuster;
- bSync = FALSE; // zunaechst unsynchron
+ sal_uInt8 nAnzAlt = ( sal_uInt8 ) nMuster;
+ bSync = false; // zunaechst unsynchron
while( nAnzAlt > 0 )
{
pSearch++;
- if( ( BYTE ) *pSearch == nAkt )
- bSync = TRUE; // jetzt erst Synchronisierung
+ if( ( sal_uInt8 ) *pSearch == nAkt )
+ bSync = sal_True; // jetzt erst Synchronisierung
nAnzAlt--;
}
}
@@ -687,7 +683,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
{ // gefundenen Filter einstellen
pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterName[ nFilter ]) );
}
- bSync = FALSE; // leave inner loop
+ bSync = false; // leave inner loop
nFilter = nFilterCount; // leave outer loop
}
else
@@ -868,7 +864,7 @@ sal_Bool SAL_CALL ScFilterDetect::supportsService( const UNOOUSTRING& sServiceNa
return sal_True ;
}
}
- return sal_False ;
+ return false ;
}
/* XServiceInfo */
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 220a4db28df4..d906b5210ccf 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
#include <tools/debug.hxx>
#include <sal/macros.h>
#include <svtools/unoimap.hxx>
@@ -63,6 +61,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/document/XCodeNameQuery.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
@@ -387,7 +386,7 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName)
}
}
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<SC_SERVICE_COUNT; i++)
{
DBG_ASSERT( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash");
@@ -588,6 +587,11 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
if ( pAppMgr )
pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
+
+ // create the VBA document event processor
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents(
+ ::ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBASpreadsheetEventProcessor", aArgs ), uno::UNO_QUERY );
+ pDocShell->GetDocument()->SetVbaEventProcessor( xVbaEvents );
}
}
break;
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 73f039def74e..ab64c329e5c7 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -90,7 +90,7 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
return aMacroDescriptionsImpl;
}
// #i66550 HLINK_FOR_SHAPES
-ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate = FALSE )
+ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, sal_Bool bCreate = false )
{
if( pShape )
if( SdrObject* pObj = pShape->GetSdrObject() )
@@ -115,7 +115,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
pShapePropertySet(NULL),
pShapePropertyState(NULL),
pImplementationId(NULL),
- bIsTextShape(FALSE),
+ bIsTextShape(false),
bInitializedNotifier(false)
{
comphelper::increment( m_refCount );
@@ -262,22 +262,22 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo(
return mxPropSetInfo;
}
-BOOL lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
+sal_Bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum )
{
- USHORT nCount = rModel.GetPageCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rModel.GetPageCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( rModel.GetPage(i) == pPage )
{
rNum = static_cast<SCTAB>(i);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint )
+sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
rtl::OUString sType(xShape->getShapeType());
sal_Bool bCaptionShape(sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape")));
if (bCaptionShape)
@@ -286,7 +286,7 @@ BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point&
if (xShapeProp.is())
{
xShapeProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" )) ) >>= rCaptionPoint;
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
return bReturn;
@@ -660,7 +660,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(
aNameString.EqualsAscii( SC_UNONAME_URL) )
{
rtl::OUString sHlink;
- ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this, TRUE);
+ ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this, true);
if ( ( aValue >>= sHlink ) && pInfo )
pInfo->SetHlink( sHlink );
}
@@ -1388,7 +1388,7 @@ class ShapeUnoEventAccessImpl : public ShapeUnoEventAcess_BASE
private:
ScShapeObj* mpShape;
- ScMacroInfo* getInfo( BOOL bCreate = FALSE )
+ ScMacroInfo* getInfo( sal_Bool bCreate = false )
{
return lcl_getShapeHyperMacroInfo( mpShape, bCreate );
}
@@ -1421,7 +1421,7 @@ public:
rtl::OUString sValue;
if ( pProperties->Value >>= sValue )
{
- ScMacroInfo* pInfo = getInfo( TRUE );
+ ScMacroInfo* pInfo = getInfo( sal_True );
DBG_ASSERT( pInfo, "shape macro info could not be created!" );
if ( !pInfo )
break;
@@ -1504,7 +1504,7 @@ ScShapeObj::getEvents( ) throw(uno::RuntimeException)
)
if ( _ServiceName == *pSupported )
return sal_True;
- return sal_False;
+ return false;
}
uno::Sequence< ::rtl::OUString > SAL_CALL ScShapeObj::getSupportedServiceNames( ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index 6bc561ec4201..6b8a6b71030d 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -86,21 +86,21 @@ ScCellSearchObj::ScCellSearchObj() :
{
pSearchItem = new SvxSearchItem( SCITEM_SEARCHDATA );
// Defaults:
- pSearchItem->SetWordOnly(FALSE);
- pSearchItem->SetExact(FALSE);
- pSearchItem->SetMatchFullHalfWidthForms(FALSE);
- pSearchItem->SetUseAsianOptions(FALSE); // or all asian bits would have to be handled
- pSearchItem->SetBackward(FALSE);
- pSearchItem->SetSelection(FALSE);
- pSearchItem->SetRegExp(FALSE);
- pSearchItem->SetPattern(FALSE);
- pSearchItem->SetLevenshtein(FALSE);
- pSearchItem->SetLEVRelaxed(FALSE);
+ pSearchItem->SetWordOnly(false);
+ pSearchItem->SetExact(false);
+ pSearchItem->SetMatchFullHalfWidthForms(false);
+ pSearchItem->SetUseAsianOptions(false); // or all asian bits would have to be handled
+ pSearchItem->SetBackward(false);
+ pSearchItem->SetSelection(false);
+ pSearchItem->SetRegExp(false);
+ pSearchItem->SetPattern(false);
+ pSearchItem->SetLevenshtein(false);
+ pSearchItem->SetLEVRelaxed(false);
pSearchItem->SetLEVOther(2);
pSearchItem->SetLEVShorter(2);
pSearchItem->SetLEVLonger(2);
// Calc-Flags
- pSearchItem->SetRowDirection(FALSE);
+ pSearchItem->SetRowDirection(false);
pSearchItem->SetCellType(SVX_SEARCHIN_FORMULA);
// Selection-Flag wird beim Aufruf gesetzt
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 62db21fdfb11..0a15aa2578ff 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -380,7 +380,7 @@ const SfxItemPropertyMap* lcl_GetFooterStyleMap()
#define SC_FAMILYNAME_CELL "CellStyles"
#define SC_FAMILYNAME_PAGE "PageStyles"
-static UINT16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
+static sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
//------------------------------------------------------------------------
@@ -421,11 +421,11 @@ struct ScDisplayNameMap
String aProgName;
};
-const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
+const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
{
if ( nType == SFX_STYLE_FAMILY_PARA )
{
- static BOOL bCellMapFilled = FALSE;
+ static sal_Bool bCellMapFilled = false;
static ScDisplayNameMap aCellMap[6];
if ( !bCellMapFilled )
{
@@ -446,13 +446,13 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
// last entry remains empty
- bCellMapFilled = TRUE;
+ bCellMapFilled = sal_True;
}
return aCellMap;
}
else if ( nType == SFX_STYLE_FAMILY_PAGE )
{
- static BOOL bPageMapFilled = FALSE;
+ static sal_Bool bPageMapFilled = false;
static ScDisplayNameMap aPageMap[3];
if ( !bPageMapFilled )
{
@@ -464,7 +464,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
// last entry remains empty
- bPageMapFilled = TRUE;
+ bPageMapFilled = sal_True;
}
return aPageMap;
}
@@ -478,7 +478,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType )
#define SC_SUFFIX_USER " (user)"
#define SC_SUFFIX_USER_LEN 7
-BOOL lcl_EndsWithUser( const String& rString )
+sal_Bool lcl_EndsWithUser( const String& rString )
{
const sal_Unicode *pChar = rString.GetBuffer();
xub_StrLen nLen = rString.Len();
@@ -494,7 +494,7 @@ BOOL lcl_EndsWithUser( const String& rString )
String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName, UINT16 nType )
{
- BOOL bDisplayIsProgrammatic = FALSE;
+ sal_Bool bDisplayIsProgrammatic = false;
const ScDisplayNameMap* pNames = lcl_GetStyleNameMap( nType );
if (pNames)
@@ -504,7 +504,7 @@ String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName
if (pNames->aDispName == rDispName)
return pNames->aProgName;
else if (pNames->aProgName == rDispName)
- bDisplayIsProgrammatic = TRUE; // display name matches any programmatic name
+ bDisplayIsProgrammatic = sal_True; // display name matches any programmatic name
}
while( (++pNames)->aDispName.Len() );
}
@@ -551,7 +551,7 @@ sal_Bool lcl_AnyTabProtected( ScDocument& rDoc )
for (SCTAB i=0; i<nTabCount; i++)
if (rDoc.IsTabProtected(i))
return sal_True;
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
@@ -581,7 +581,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XStyleFamilies
-ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const
+ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const
{
if ( pDocShell )
{
@@ -594,7 +594,7 @@ ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const
return NULL;
}
-ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(UINT32 nIndex) const
+ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) const
{
if ( nIndex < SC_STYLE_FAMILY_COUNT )
return GetObjectByType_Impl(aStyleFamilyTypes[nIndex]);
@@ -700,9 +700,9 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const rtl::OUString& aURL,
{
// collect options
- BOOL bLoadReplace = TRUE; // defaults
- BOOL bLoadCellStyles = TRUE;
- BOOL bLoadPageStyles = TRUE;
+ sal_Bool bLoadReplace = sal_True; // defaults
+ sal_Bool bLoadCellStyles = sal_True;
+ sal_Bool bLoadPageStyles = sal_True;
const beans::PropertyValue* pPropArray = aOptions.getConstArray();
long nPropCount = aOptions.getLength();
@@ -733,13 +733,13 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderO
beans::PropertyValue* pArray = aSequence.getArray();
pArray[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_OVERWSTL ));
- ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, TRUE );
+ ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, true );
pArray[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_LOADCELL ));
- ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, TRUE );
+ ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, true );
pArray[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_LOADPAGE ));
- ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, TRUE );
+ ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, true );
return aSequence;
}
@@ -772,7 +772,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XStyleFamily
-ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex)
+ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(sal_uInt32 nIndex)
{
if ( pDocShell )
{
@@ -782,7 +782,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex)
SfxStyleSheetIterator aIter( pStylePool, eFamily );
if ( nIndex < aIter.Count() )
{
- SfxStyleSheetBase* pStyle = aIter[(USHORT)nIndex];
+ SfxStyleSheetBase* pStyle = aIter[(sal_uInt16)nIndex];
if ( pStyle )
{
return new ScStyleObj( pDocShell, eFamily, String (pStyle->GetName()) );
@@ -811,7 +811,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
if ( xInterface.is() )
@@ -820,7 +820,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const
if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
!pStyleObj->IsInserted() ) // noch nicht eingefuegt?
{
- String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
+ String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
ScDocument* pDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
@@ -867,10 +867,10 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if ( pDocShell )
{
- String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
+ String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
ScDocument* pDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
@@ -881,7 +881,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily );
if (pStyle)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( eFamily == SFX_STYLE_FAMILY_PARA )
{
// wie ScViewFunc::RemoveStyleSheetInUse
@@ -890,7 +890,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -966,7 +966,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const rtl::OUString& aName )
{
SolarMutexGuard aGuard;
uno::Reference< style::XStyle > xObj(
- GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ) ));
+ GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) ));
if (xObj.is())
return uno::makeAny(xObj);
else
@@ -984,19 +984,19 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetIterator aIter( pStylePool, eFamily );
- UINT16 nCount = aIter.Count();
+ sal_uInt16 nCount = aIter.Count();
String aName;
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
SfxStyleSheetBase* pStyle = aIter.First();
- UINT16 nPos = 0;
+ sal_uInt16 nPos = 0;
while (pStyle)
{
DBG_ASSERT( nPos<nCount, "Anzahl durcheinandergekommen" );
if (nPos<nCount)
pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName(
- pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) );
+ pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
pStyle = aIter.Next();
}
return aSeq;
@@ -1010,14 +1010,14 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const rtl::OUString& aName )
SolarMutexGuard aGuard;
if ( pDocShell )
{
- String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
+ String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
ScDocument* pDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
if ( pStylePool->Find( aString, eFamily ) )
return sal_True;
}
- return sal_False;
+ return false;
}
// XPropertySet
@@ -1052,7 +1052,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const ::rtl::OUString& sPr
}
if ( nResId > 0 )
{
- ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< USHORT >( nResId ) ) );
+ ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< sal_uInt16 >( nResId ) ) );
aRet = uno::makeAny( sDisplayName );
}
}
@@ -1186,7 +1186,7 @@ sal_Bool SAL_CALL ScStyleObj::isUserDefined() throw(uno::RuntimeException)
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return pStyle->IsUserDefined();
- return sal_False;
+ return false;
}
sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException)
@@ -1195,7 +1195,7 @@ sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException)
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return pStyle->IsUsed();
- return sal_False;
+ return false;
}
rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
@@ -1203,7 +1203,7 @@ rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<UINT16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) );
return rtl::OUString();
}
@@ -1221,7 +1221,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle )
//! DocFunc-Funktion??
//! Undo ?????????????
- String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<UINT16>(eFamily) ));
+ String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) ));
sal_Bool bOk = pStyle->SetParent( aString );
if (bOk)
{
@@ -1237,7 +1237,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle )
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1259,7 +1259,7 @@ rtl::OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException)
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
return rtl::OUString();
}
@@ -1288,7 +1288,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
pDoc->GetPool()->CellStyleCreated( aString );
// Zellvorlagen = 2, Seitenvorlagen = 4
- UINT16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
+ sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;
SfxBindings* pBindings = pDocShell->GetViewBindings();
if (pBindings)
@@ -1302,7 +1302,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
{
- SvxNumRule aRule( 0, 0, TRUE ); // nothing supported
+ SvxNumRule aRule( 0, 0, sal_True ); // nothing supported
return SvxCreateNumRule( &aRule );
}
@@ -1355,14 +1355,14 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const rtl::OUString&
if ( pItemSet && pResultEntry )
{
- USHORT nWhich = pResultEntry->nWID;
+ sal_uInt16 nWhich = pResultEntry->nWID;
if ( nWhich == SC_WID_UNO_TBLBORD )
{
nWhich = ATTR_BORDER;
}
if ( IsScItemWid( nWhich ) )
{
- SfxItemState eState = pItemSet->GetItemState( nWhich, sal_False );
+ SfxItemState eState = pItemSet->GetItemState( nWhich, false );
// // if no rotate value is set, look at orientation
// //! also for a fixed value of 0 (in case orientation is ambiguous)?
@@ -1425,7 +1425,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
if ( pStyleSet && pResultEntry )
{
- USHORT nWhich = pResultEntry->nWID;
+ sal_uInt16 nWhich = pResultEntry->nWID;
if ( IsScItemWid( nWhich ) )
{
@@ -1435,7 +1435,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
// Default-Items mit falscher Slot-ID funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
if ( aEmptySet.GetPool()->GetSlotId(nWhich) == nWhich &&
- aEmptySet.GetItemState(nWhich, sal_False) == SFX_ITEM_DEFAULT )
+ aEmptySet.GetItemState(nWhich, false) == SFX_ITEM_DEFAULT )
{
aEmptySet.Put( aEmptySet.Get( nWhich ) );
}
@@ -1491,9 +1491,9 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
SvxBoxInfoItem aInner( ATTR_BORDER_INNER );
table::TableBorder aBorder;
ScHelperFunctions::FillTableBorder( aBorder, aOuter, aInner );
- aBorder.IsHorizontalLineValid = sal_False;
- aBorder.IsVerticalLineValid = sal_False;
- aBorder.IsDistanceValid = sal_False;
+ aBorder.IsHorizontalLineValid = false;
+ aBorder.IsVerticalLineValid = false;
+ aBorder.IsDistanceValid = false;
aAny <<= aBorder;
}
}
@@ -1600,7 +1600,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1610,9 +1610,9 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti
// #i22448# apply the default BoxInfoItem for page styles again
// (same content as in ScStyleSheet::GetItemSet, to control the dialog)
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetTable( FALSE );
- aBoxInfoItem.SetDist( TRUE );
- aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
+ aBoxInfoItem.SetTable( false );
+ aBoxInfoItem.SetDist( sal_True );
+ aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True );
rSet.Put( aBoxInfoItem );
pDocShell->PageStyleModified( aStyleName, sal_True );
@@ -1694,7 +1694,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet(); // direkt im lebenden Style aendern...
- sal_Bool bDone = sal_False;
+ sal_Bool bDone = false;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
if(pEntry->nWID == SC_WID_UNO_HEADERSET)
@@ -1741,14 +1741,14 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
// language for number formats
SvNumberFormatter* pFormatter =
pDocShell->GetDocument()->GetFormatTable();
- UINT32 nOldFormat = ((const SfxUInt32Item&)
+ sal_uInt32 nOldFormat = ((const SfxUInt32Item&)
rSet.Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)
rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
nOldFormat = pFormatter->
GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
- UINT32 nNewFormat = 0;
+ sal_uInt32 nNewFormat = 0;
*pValue >>= nNewFormat;
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
@@ -1765,7 +1765,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
{
sal_Int16 nVal = 0;
*pValue >>= nVal;
- rSet.Put( SfxUInt16Item( pEntry->nWID, (USHORT)HMMToTwips(nVal) ) );
+ rSet.Put( SfxUInt16Item( pEntry->nWID, (sal_uInt16)HMMToTwips(nVal) ) );
}
break;
case ATTR_ROTATE_VALUE:
@@ -1789,18 +1789,18 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
switch( eOrient )
{
case table::CellOrientation_STANDARD:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
break;
case table::CellOrientation_TOPBOTTOM:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
break;
case table::CellOrientation_BOTTOMTOP:
- rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
break;
case table::CellOrientation_STACKED:
- rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) );
+ rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) );
break;
default:
{
@@ -1832,7 +1832,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
case ATTR_PAGE_OBJECTS:
case ATTR_PAGE_DRAWINGS:
{
- sal_Bool bBool = sal_False;
+ sal_Bool bBool = false;
*pValue >>= bBool;
//! sal_Bool-MID fuer ScViewObjectModeItem definieren?
rSet.Put( ScViewObjectModeItem( pEntry->nWID,
@@ -1841,26 +1841,26 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
break;
case ATTR_PAGE_PAPERBIN:
{
- BYTE nTray = PAPERBIN_PRINTER_SETTINGS;
- BOOL bFound = FALSE;
+ sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS;
+ sal_Bool bFound = false;
rtl::OUString aName;
if ( *pValue >>= aName )
{
if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_PAPERBIN_DEFAULTNAME ) ) )
- bFound = TRUE;
+ bFound = sal_True;
else
{
Printer* pPrinter = pDocShell->GetPrinter();
if (pPrinter)
{
String aNameStr = aName;
- USHORT nCount = pPrinter->GetPaperBinCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pPrinter->GetPaperBinCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( aNameStr == pPrinter->GetPaperBinName(i) )
{
- nTray = (BYTE) i;
- bFound = TRUE;
+ nTray = (sal_uInt8) i;
+ bFound = sal_True;
break;
}
}
@@ -1893,7 +1893,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
// funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
if ( rSet.GetPool()->GetSlotId(pEntry->nWID) == pEntry->nWID &&
- rSet.GetItemState(pEntry->nWID, sal_False) == SFX_ITEM_DEFAULT )
+ rSet.GetItemState(pEntry->nWID, false) == SFX_ITEM_DEFAULT )
{
rSet.Put( rSet.Get(pEntry->nWID) );
}
@@ -1951,7 +1951,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
- pDoc->StyleSheetChanged( pStyle, sal_False, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
+ pDoc->StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1986,7 +1986,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
if ( pItemSet && pResultEntry )
{
- USHORT nWhich = pResultEntry->nWID;
+ sal_uInt16 nWhich = pResultEntry->nWID;
if ( IsScItemWid( nWhich ) )
{
@@ -1995,7 +1995,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
case ATTR_VALUE_FORMAT:
if ( pDocShell )
{
- UINT32 nOldFormat = ((const SfxUInt32Item&)
+ sal_uInt32 nOldFormat = ((const SfxUInt32Item&)
pItemSet->Get( ATTR_VALUE_FORMAT )).GetValue();
LanguageType eOldLang = ((const SvxLanguageItem&)
pItemSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
@@ -2011,7 +2011,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
case ATTR_STACKED:
{
sal_Int32 nRot = ((const SfxInt32Item&)pItemSet->Get(ATTR_ROTATE_VALUE)).GetValue();
- BOOL bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue();
+ sal_Bool bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aAny );
}
break;
@@ -2031,7 +2031,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
// property PrinterPaperTray is the name of the tray
- BYTE nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue();
+ sal_uInt8 nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue();
rtl::OUString aName;
if ( nValue == PAPERBIN_PRINTER_SETTINGS )
aName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_PAPERBIN_DEFAULTNAME ));
@@ -2058,7 +2058,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
// funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
if ( pItemSet->GetPool()->GetSlotId(nWhich) == nWhich &&
- pItemSet->GetItemState(nWhich, sal_False) == SFX_ITEM_DEFAULT )
+ pItemSet->GetItemState(nWhich, false) == SFX_ITEM_DEFAULT )
{
SfxItemSet aNoEmptySet( *pItemSet );
aNoEmptySet.Put( aNoEmptySet.Get( nWhich ) );
@@ -2081,9 +2081,9 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
SvxBoxInfoItem aInner( ATTR_BORDER_INNER );
table::TableBorder aBorder;
ScHelperFunctions::FillTableBorder( aBorder, aOuter, aInner );
- aBorder.IsHorizontalLineValid = sal_False;
- aBorder.IsVerticalLineValid = sal_False;
- aBorder.IsDistanceValid = sal_False;
+ aBorder.IsHorizontalLineValid = false;
+ aBorder.IsVerticalLineValid = false;
+ aBorder.IsDistanceValid = false;
aAny <<= aBorder;
}
}
@@ -2108,7 +2108,7 @@ rtl::OUString SAL_CALL ScStyleObj::getImplementationName() throw(uno::RuntimeExc
sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName )
throw(uno::RuntimeException)
{
- BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+ sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )||
rServiceName.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE ));
@@ -2117,7 +2117,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName
uno::Sequence<rtl::OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
throw(uno::RuntimeException)
{
- BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+ sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
uno::Sequence<rtl::OUString> aRet(2);
rtl::OUString* pArray = aRet.getArray();
pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCSTYLE_SERVICE ));
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index acc15fa8825c..972c64013498 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -136,7 +136,7 @@ sal_Bool SAL_CALL ScLinkTargetTypesObj::hasByName(const rtl::OUString& aName) th
for (sal_uInt16 i=0; i<SC_LINKTARGETTYPE_COUNT; i++)
if ( aNames[i] == aNameStr )
return sal_True;
- return sal_False;
+ return false;
}
// container::XElementAccess
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 411da9b4d562..4e21b587294d 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -76,7 +76,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet()
SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties
{0,0,0,0,0,0}
};
- static BOOL bTwipsSet = FALSE;
+ static sal_Bool bTwipsSet = false;
if (!bTwipsSet)
{
@@ -96,7 +96,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet()
++pEntry;
}
- bTwipsSet = TRUE;
+ bTwipsSet = sal_True;
}
static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
return &aHdFtPropertySet_Impl;
@@ -141,7 +141,7 @@ void ScHeaderFooterContentObj::RemoveListener( SfxListener& rListener )
rListener.EndListening( aBC );
}
-void ScHeaderFooterContentObj::UpdateText( USHORT nPart, EditEngine& rSource )
+void ScHeaderFooterContentObj::UpdateText( sal_uInt16 nPart, EditEngine& rSource )
{
EditTextObject* pNew = rSource.CreateTextObject();
switch (nPart)
@@ -230,13 +230,13 @@ ScHeaderFooterContentObj* ScHeaderFooterContentObj::getImplementation(
//------------------------------------------------------------------------
ScHeaderFooterTextData::ScHeaderFooterTextData( ScHeaderFooterContentObj& rContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
rContentObj( rContent ),
nPart( nP ),
pEditEngine( NULL ),
pForwarder( NULL ),
- bDataValid( FALSE ),
- bInUpdate( FALSE )
+ bDataValid( false ),
+ bInUpdate( false )
{
rContentObj.acquire(); // must not go away
rContentObj.AddListener( *this );
@@ -261,7 +261,7 @@ void ScHeaderFooterTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( ((const ScHeaderFooterChangedHint&)rHint).GetPart() == nPart )
{
if (!bInUpdate) // not for own updates
- bDataValid = FALSE; // text has to be fetched again
+ bDataValid = false; // text has to be fetched again
}
}
}
@@ -272,9 +272,9 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, TRUE );
+ ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, sal_True );
- pHdrEngine->EnableUndo( FALSE );
+ pHdrEngine->EnableUndo( false );
pHdrEngine->SetRefMapMode( MAP_TWIP );
// default font must be set, independently of document
@@ -312,7 +312,7 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder()
if (pData)
pEditEngine->SetText(*pData);
- bDataValid = TRUE;
+ bDataValid = sal_True;
return pForwarder;
}
@@ -320,18 +320,18 @@ void ScHeaderFooterTextData::UpdateData()
{
if ( pEditEngine )
{
- bInUpdate = TRUE; // don't reset bDataValid during UpdateText
+ bInUpdate = sal_True; // don't reset bDataValid during UpdateText
rContentObj.UpdateText( nPart, *pEditEngine );
- bInUpdate = FALSE;
+ bInUpdate = false;
}
}
//------------------------------------------------------------------------
ScHeaderFooterTextObj::ScHeaderFooterTextObj( ScHeaderFooterContentObj& rContent,
- USHORT nP ) :
+ sal_uInt16 nP ) :
aTextData( rContent, nP ),
pUnoText( NULL )
{
@@ -400,7 +400,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce
rtl::OUString aRet;
const EditTextObject* pData;
- USHORT nPart = aTextData.GetPart();
+ sal_uInt16 nPart = aTextData.GetPart();
ScHeaderFooterContentObj& rContentObj = aTextData.GetContentObj();
if (nPart == SC_HDFT_LEFT)
@@ -412,7 +412,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce
if (pData)
{
// for pure text, no font info is needed in pool defaults
- ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE );
+ ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True );
ScHeaderFieldData aData;
FillDummyFieldData( aData );
@@ -430,7 +430,7 @@ void SAL_CALL ScHeaderFooterTextObj::setString( const rtl::OUString& aText ) thr
String aString(aText);
// for pure text, no font info is needed in pool defaults
- ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE );
+ ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True );
aEditEngine.SetText( aString );
aTextData.GetContentObj().UpdateText( aTextData.GetPart(), aEditEngine );
@@ -929,7 +929,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM );
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); // TRUE: become owner of pool
+ pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); // TRUE: become owner of pool
pForwarder = new SvxEditEngineForwarder( *pEditEngine );
pOriginalSource = new ScSimpleEditSource( pForwarder );
}
@@ -974,10 +974,10 @@ ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) :
pEditEngine( NULL ),
pForwarder( NULL ),
pOriginalSource( NULL ),
- bDataValid( FALSE ),
- bInUpdate( FALSE ),
- bDirty( FALSE ),
- bDoUpdate( TRUE )
+ bDataValid( false ),
+ bInUpdate( false ),
+ bDirty( false ),
+ bDoUpdate( sal_True )
{
if (pDocShell)
pDocShell->GetDocument()->AddUnoObject(*this);
@@ -1029,12 +1029,12 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE );
+ pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True );
}
- // currently, GetPortions doesn't work if UpdateMode is FALSE,
+ // currently, GetPortions doesn't work if UpdateMode is sal_False,
// this will be fixed (in EditEngine) by src600
-// pEditEngine->SetUpdateMode( FALSE );
- pEditEngine->EnableUndo( FALSE );
+// pEditEngine->SetUpdateMode( sal_False );
+ pEditEngine->EnableUndo( false );
if (pDocShell)
pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
else
@@ -1072,7 +1072,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
}
}
- bDataValid = TRUE;
+ bDataValid = sal_True;
return pForwarder;
}
@@ -1087,17 +1087,17 @@ void ScCellTextData::UpdateData()
// or things like attributes after the text would be lost
// (are not stored in the cell)
- bInUpdate = TRUE; // prevents bDataValid from being reset
+ bInUpdate = sal_True; // prevents bDataValid from being reset
ScDocFunc aFunc(*pDocShell);
- aFunc.PutData( aCellPos, *pEditEngine, FALSE, TRUE ); // always as text
+ aFunc.PutData( aCellPos, *pEditEngine, false, sal_True ); // always as text
- bInUpdate = FALSE;
- bDirty = FALSE;
+ bInUpdate = false;
+ bDirty = false;
}
}
else
- bDirty = TRUE;
+ bDirty = sal_True;
}
void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -1110,7 +1110,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
else if ( rHint.ISA( SfxSimpleHint ) )
{
- ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
pDocShell = NULL; // invalid now
@@ -1121,7 +1121,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( nId == SFX_HINT_DATACHANGED )
{
if (!bInUpdate) // not for own UpdateData calls
- bDataValid = FALSE; // text has to be read from the cell again
+ bDataValid = false; // text has to be read from the cell again
}
}
}
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index d94767067ebd..adeb0e7a3a6d 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -115,6 +115,7 @@ const SfxItemPropertyMapEntry* lcl_GetViewOptPropertyMap()
{MAP_CHAR_LEN(SC_UNO_VISAREA), 0, &getCppuType((awt::Rectangle*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ZOOMTYPE), 0, &getCppuType((sal_Int16*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ZOOMVALUE), 0, &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_VISAREASCREEN),0, &getCppuType((awt::Rectangle*)0), 0, 0},
{0,0,0,0,0,0}
};
return aViewOptPropertyMap_Impl;
@@ -136,7 +137,7 @@ SC_SIMPLE_SERVICE_INFO( ScViewPaneBase, "ScViewPaneObj", "com.sun.star.sheet.Spr
//------------------------------------------------------------------------
-ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP) :
+ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP) :
pViewShell( pViewSh ),
nPane( nP )
{
@@ -322,7 +323,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells()
namespace
{
- bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, USHORT _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView )
+ bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, sal_uInt16 _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView )
{
if ( !_pViewShell )
return false;
@@ -419,10 +420,15 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const
ScAddress aCell(pViewShell->GetViewData()->GetPosX(eWhichH),
pViewShell->GetViewData()->GetPosY(eWhichV),
pViewShell->GetViewData()->GetTabNo());
- Rectangle aVisRect(pDoc->GetMMRect(aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab()));
-
- aVisRect.SetSize(pWindow->PixelToLogic(pWindow->GetSizePixel(), pWindow->GetDrawMapMode(sal_True)));
-
+ Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) );
+ Size aVisSize( pWindow->PixelToLogic( pWindow->GetSizePixel(), pWindow->GetDrawMapMode( sal_True ) ) );
+ Point aVisPos( aCellRect.TopLeft() );
+ if ( pDoc->IsLayoutRTL( aCell.Tab() ) )
+ {
+ aVisPos = aCellRect.TopRight();
+ aVisPos.X() -= aVisSize.Width();
+ }
+ Rectangle aVisRect( aVisPos, aVisSize );
aVisArea = AWTRectangle(aVisRect);
}
}
@@ -431,7 +437,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const
//------------------------------------------------------------------------
-ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, USHORT nP) :
+ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP) :
ScViewPaneBase( pViewSh, nP )
{
}
@@ -487,7 +493,7 @@ public:
};
ScTabViewEventListener::ScTabViewEventListener(ScTabViewObj* pObj, uno::Reference< script::vba::XVBAEventProcessor >& rVbaEventsHelper):
- pViewObj( pObj ),xVbaEventsHelper( rVbaEventsHelper ), bDelaySelectionEvent( sal_False ), bSelectionChangeOccurred( sal_False )
+ pViewObj( pObj ),xVbaEventsHelper( rVbaEventsHelper ), bDelaySelectionEvent( false ), bSelectionChangeOccurred( false )
{
}
@@ -513,15 +519,15 @@ void ScTabViewEventListener::fireSelectionChangeEvent()
{
}
}
- bDelaySelectionEvent = sal_False;
- bSelectionChangeOccurred = sal_False;
+ bDelaySelectionEvent = false;
+ bSelectionChangeOccurred = false;
}
sal_Bool SAL_CALL ScTabViewEventListener::mousePressed( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException)
{
// Delay to fire the selection change event if clicking the left mouse button to do selection.
- bDelaySelectionEvent = ( e.Buttons == ::com::sun::star::awt::MouseButton::RIGHT ) ? sal_False : sal_True;
- bSelectionChangeOccurred = sal_False;
+ bDelaySelectionEvent = ( e.Buttons == ::com::sun::star::awt::MouseButton::RIGHT ) ? false : sal_True;
+ bSelectionChangeOccurred = false;
// ScTabViewObj::MousePressed should handle process BeforeDoubleClick and BeforeRightClick events
return sal_True;
@@ -557,7 +563,7 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) :
aMouseClickHandlers( 0 ),
aActivationListeners( 0 ),
nPreviousTab( 0 ),
- bDrawSelModeSet(sal_False)
+ bDrawSelModeSet(false)
{
if (pViewSh)
{
@@ -662,7 +668,7 @@ void lcl_CallActivate( ScDocShell* pDocSh, SCTAB nTab, sal_Int32 nEvent )
}
}
-void ScTabViewObj::SheetChanged()
+void ScTabViewObj::SheetChanged( bool bSameTabButMoved )
{
if ( !GetViewShell() )
return;
@@ -676,7 +682,7 @@ void ScTabViewObj::SheetChanged()
uno::Reference< uno::XInterface > xSource(xView, uno::UNO_QUERY);
aEvent.Source = xSource;
aEvent.ActiveSheet = new ScTableSheetObj(pDocSh, pViewData->GetTabNo());
- for ( USHORT n=0; n<aActivationListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aActivationListeners.Count(); n++ )
{
try
{
@@ -690,9 +696,10 @@ void ScTabViewObj::SheetChanged()
}
}
- // handle sheet events
+ /* Handle sheet events, but do not trigger event handlers, if the old
+ active sheet gets re-activated after inserting/deleting/moving a sheet. */
SCTAB nNewTab = pViewData->GetTabNo();
- if ( nNewTab != nPreviousTab )
+ if ( !bSameTabButMoved && (nNewTab != nPreviousTab) )
{
lcl_CallActivate( pDocSh, nPreviousTab, SC_SHEETEVENT_UNFOCUS );
lcl_CallActivate( pDocSh, nNewTab, SC_SHEETEVENT_FOCUS );
@@ -753,25 +760,25 @@ uno::Sequence<sal_Int8> SAL_CALL ScTabViewObj::getImplementationId()
// XDocumentView
-BOOL lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges )
+sal_Bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges )
{
for (size_t i = 0, nCount = rRanges.size(); i < nCount; ++i)
{
const ScRange* pRange = rRanges[ i ];
if ( nTab >= pRange->aStart.Tab() && nTab <= pRange->aEnd.Tab() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* pSelObj )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCTAB nObjectTab = 0;
SdrModel* pModel = rDrawView.GetModel();
- USHORT nPageCount = pModel->GetPageCount();
- for (USHORT i=0; i<nPageCount && !bFound; i++)
+ sal_uInt16 nPageCount = pModel->GetPageCount();
+ for (sal_uInt16 i=0; i<nPageCount && !bFound; i++)
{
SdrPage* pPage = pModel->GetPage(i);
if (pPage)
@@ -782,7 +789,7 @@ void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject*
{
if ( pObject == pSelObj )
{
- bFound = TRUE;
+ bFound = sal_True;
nObjectTab = static_cast<SCTAB>(i);
}
pObject = aIter.Next();
@@ -804,11 +811,11 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
ScTabViewShell* pViewSh = GetViewShell();
if ( !pViewSh )
- return FALSE;
+ return false;
//! Type of aSelection can be some specific interface instead of XInterface
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY);
if ( !xInterface.is() ) //clear all selections
{
@@ -820,14 +827,14 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
}
else //#102232#; if there is no DrawView remove range selection
pViewSh->Unmark();
- bRet = TRUE;
+ bRet = sal_True;
}
if (bDrawSelModeSet) // remove DrawSelMode if set by API; if necessary it will be set again later
{
- pViewSh->SetDrawSelMode(sal_False);
+ pViewSh->SetDrawSelMode(false);
pViewSh->UpdateLayerLocks();
- bDrawSelModeSet = sal_False;
+ bDrawSelModeSet = false;
}
if (bRet)
@@ -861,8 +868,8 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
if (pDisp)
pDisp->Execute( pFunc->GetSlotID(), SFX_CALLMODE_SYNCHRON );
}
- pViewSh->SetDrawShell(FALSE);
- pViewSh->SetDrawSelMode(FALSE); // nach dem Dispatcher-Execute
+ pViewSh->SetDrawShell(false);
+ pViewSh->SetDrawSelMode(false); // nach dem Dispatcher-Execute
// Ranges selektieren
@@ -882,7 +889,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
pViewSh->SetTabNo( pFirst->aStart.Tab() );
pViewSh->DoneBlockMode();
pViewSh->InitOwnBlockMode();
- pViewData->GetMarkData().MarkFromRangeList( rRanges, TRUE );
+ pViewData->GetMarkData().MarkFromRangeList( rRanges, sal_True );
pViewSh->MarkDataChanged();
pViewData->GetDocShell()->PostPaintGridAll(); // Markierung (alt&neu)
if ( pFirst )
@@ -894,7 +901,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
//! Methode an der View, um RangeList zu selektieren
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( pShapeImp || xShapeColl.is() ) // Drawing-Layer
@@ -915,7 +922,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
if ( pPV && pObj->GetPage() == pPV->GetPage() )
{
pDrawView->MarkObj( pObj, pPV );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -957,21 +964,21 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
if (pDrawView->IsObjMarkable( pObj, pPV ))
pDrawView->MarkObj( pObj, pPV );
else
- bAllMarked = sal_False;
+ bAllMarked = false;
}
}
}
}
}
if (bAllMarked)
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE; // empty XShapes (all shapes are deselected)
+ bRet = sal_True; // empty XShapes (all shapes are deselected)
}
if (bRet)
- pViewSh->SetDrawShell(TRUE);
+ pViewSh->SetDrawShell(sal_True);
}
}
@@ -994,7 +1001,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
if (pDrawView)
{
const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if (nMarkCount)
{
// ShapeCollection erzeugen (wie in SdXImpressView::getSelection im Draw)
@@ -1003,7 +1010,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
SvxShapeCollection* pShapes = new SvxShapeCollection();
uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pShapes));
- for (ULONG i=0; i<nMarkCount; i++)
+ for (sal_uLong i=0; i<nMarkCount; i++)
{
SdrObject* pDrawObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if (pDrawObj)
@@ -1039,7 +1046,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
ScMarkData aFilteredMark( rMark );
ScViewUtil::UnmarkFiltered( aFilteredMark, pDocSh->GetDocument());
ScRangeList aRangeList;
- aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE);
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, false);
// Theoretically a selection may start and end on a filtered row.
switch ( aRangeList.size() )
{
@@ -1079,7 +1086,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
// remember if the selection was from the cursor position without anything selected
// (used when rendering the selection)
- pObj->SetCursorOnly( TRUE );
+ pObj->SetCursorOnly( sal_True );
}
}
@@ -1101,7 +1108,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getCount() throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
- USHORT nPanes = 0;
+ sal_uInt16 nPanes = 0;
if (pViewSh)
{
nPanes = 1;
@@ -1119,7 +1126,7 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
- uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((USHORT)nIndex));
+ uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (xPane.is())
return uno::makeAny(xPane);
else
@@ -1141,7 +1148,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasElements() throw(uno::RuntimeException)
// XSpreadsheetView
-ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
+ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
static ScSplitPos ePosHV[4] =
{ SC_SPLIT_TOPLEFT, SC_SPLIT_BOTTOMLEFT, SC_SPLIT_TOPRIGHT, SC_SPLIT_BOTTOMRIGHT };
@@ -1150,22 +1157,22 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
if (pViewSh)
{
ScSplitPos eWhich = SC_SPLIT_BOTTOMLEFT; // default Position
- BOOL bError = FALSE;
+ sal_Bool bError = false;
ScViewData* pViewData = pViewSh->GetViewData();
- BOOL bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE );
- BOOL bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE );
if ( bHor && bVer )
{
// links oben, links unten, rechts oben, rechts unten - wie in Excel
if ( nIndex < 4 )
eWhich = ePosHV[nIndex];
else
- bError = TRUE;
+ bError = sal_True;
}
else if ( bHor )
{
if ( nIndex > 1 )
- bError = TRUE;
+ bError = sal_True;
else if ( nIndex == 1 )
eWhich = SC_SPLIT_BOTTOMRIGHT;
// sonst SC_SPLIT_BOTTOMLEFT
@@ -1173,16 +1180,16 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
else if ( bVer )
{
if ( nIndex > 1 )
- bError = TRUE;
+ bError = sal_True;
else if ( nIndex == 0 )
eWhich = SC_SPLIT_TOPLEFT;
// sonst SC_SPLIT_BOTTOMLEFT
}
else if ( nIndex > 0 )
- bError = TRUE; // nicht geteilt: nur 0 gueltig
+ bError = sal_True; // nicht geteilt: nur 0 gueltig
if (!bError)
- return new ScViewPaneObj( pViewSh, sal::static_int_cast<USHORT>(eWhich) );
+ return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) );
}
return NULL;
@@ -1268,11 +1275,11 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
Window* pActiveWin = pData->GetActiveWin();
Point aPos = pActiveWin->PixelToLogic(rPoint);
- USHORT nHitLog = (USHORT) pActiveWin->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pActiveWin->PixelToLogic(
Size(pDrawView->GetHitTolerancePixel(),0)).Width();
sal_uInt32 nCount(pDrawPage->GetObjCount());
- sal_Bool bFound(sal_False);
+ sal_Bool bFound(false);
sal_uInt32 i(0);
while (i < nCount && !bFound)
{
@@ -1307,7 +1314,7 @@ bool ScTabViewObj::IsMouseListening() const
sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
throw (::uno::RuntimeException)
{
- sal_Bool bReturn(sal_False);
+ sal_Bool bReturn(false);
uno::Reference< uno::XInterface > xTarget = GetClickedObject(Point(e.X, e.Y));
if (aMouseClickHandlers.Count() && xTarget.is())
@@ -1321,7 +1328,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
aMouseEvent.PopupTrigger = e.PopupTrigger;
aMouseEvent.Target = xTarget;
- for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ )
{
try
{
@@ -1365,7 +1372,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
/*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
// look for a boolean return value of true
- sal_Bool bRetValue = sal_False;
+ sal_Bool bRetValue = false;
if (aRet >>= bRetValue)
{
if (bRetValue)
@@ -1398,7 +1405,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
sal_Bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e )
throw (uno::RuntimeException)
{
- sal_Bool bReturn(sal_False);
+ sal_Bool bReturn(false);
if (aMouseClickHandlers.Count())
{
@@ -1415,7 +1422,7 @@ sal_Bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e )
aMouseEvent.PopupTrigger = e.PopupTrigger;
aMouseEvent.Target = xTarget;
- for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ )
{
try
{
@@ -1441,10 +1448,10 @@ void ScTabViewObj::StartMouseListening()
void ScTabViewObj::EndMouseListening()
{
- USHORT nCount(aMouseClickHandlers.Count());
+ sal_uInt16 nCount(aMouseClickHandlers.Count());
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
try
{
@@ -1463,10 +1470,10 @@ void ScTabViewObj::StartActivationListening()
void ScTabViewObj::EndActivationListening()
{
- USHORT nCount = aActivationListeners.Count();
+ sal_uInt16 nCount = aActivationListeners.Count();
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
try
{
@@ -1486,7 +1493,7 @@ void SAL_CALL ScTabViewObj::addEnhancedMouseClickHandler( const uno::Reference<
if (aListener.is())
{
- USHORT nCount = aMouseClickHandlers.Count();
+ sal_uInt16 nCount = aMouseClickHandlers.Count();
uno::Reference<awt::XEnhancedMouseClickHandler> *pObj =
new uno::Reference<awt::XEnhancedMouseClickHandler>( aListener );
aMouseClickHandlers.Insert( pObj, nCount );
@@ -1500,8 +1507,8 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc
throw (uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aMouseClickHandlers.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aMouseClickHandlers.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<awt::XEnhancedMouseClickHandler> *pObj = aMouseClickHandlers[n];
if ( *pObj == aListener )
@@ -1520,7 +1527,7 @@ void SAL_CALL ScTabViewObj::addActivationEventListener( const uno::Reference< sh
if (aListener.is())
{
- USHORT nCount = aActivationListeners.Count();
+ sal_uInt16 nCount = aActivationListeners.Count();
uno::Reference<sheet::XActivationEventListener> *pObj =
new uno::Reference<sheet::XActivationEventListener>( aListener );
aActivationListeners.Insert( pObj, nCount );
@@ -1534,8 +1541,8 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference<
throw (uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aActivationListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aActivationListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<sheet::XActivationEventListener> *pObj = aActivationListeners[n];
if ( *pObj == aListener )
@@ -1551,12 +1558,12 @@ INT16 ScTabViewObj::GetZoom(void) const
if (pViewSh)
{
const Fraction& rZoomY = pViewSh->GetViewData()->GetZoomY(); // Y wird angezeigt
- return (INT16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator());
+ return (sal_Int16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator());
}
return 0;
}
-void ScTabViewObj::SetZoom(INT16 nZoom)
+void ScTabViewObj::SetZoom(sal_Int16 nZoom)
{
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
@@ -1573,7 +1580,7 @@ void ScTabViewObj::SetZoom(INT16 nZoom)
}
}
Fraction aFract( nZoom, 100 );
- pViewSh->SetZoom( aFract, aFract, TRUE );
+ pViewSh->SetZoom( aFract, aFract, sal_True );
pViewSh->PaintGrid();
pViewSh->PaintTop();
pViewSh->PaintLeft();
@@ -1582,9 +1589,9 @@ void ScTabViewObj::SetZoom(INT16 nZoom)
}
}
-INT16 ScTabViewObj::GetZoomType(void) const
+sal_Int16 ScTabViewObj::GetZoomType(void) const
{
- INT16 aZoomType = view::DocumentZoomType::OPTIMAL;
+ sal_Int16 aZoomType = view::DocumentZoomType::OPTIMAL;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1611,7 +1618,7 @@ INT16 ScTabViewObj::GetZoomType(void) const
return aZoomType;
}
-void ScTabViewObj::SetZoomType(INT16 aZoomType)
+void ScTabViewObj::SetZoomType(sal_Int16 aZoomType)
{
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
@@ -1654,11 +1661,11 @@ void ScTabViewObj::SetZoomType(INT16 aZoomType)
{
case SVX_ZOOM_WHOLEPAGE:
case SVX_ZOOM_PAGEWIDTH:
- pView->SetZoomType( eZoomType, TRUE );
+ pView->SetZoomType( eZoomType, sal_True );
break;
default:
- pView->SetZoomType( SVX_ZOOM_PERCENT, TRUE );
+ pView->SetZoomType( SVX_ZOOM_PERCENT, sal_True );
}
SetZoom( nZoom );
}
@@ -1678,7 +1685,7 @@ sal_Bool SAL_CALL ScTabViewObj::getIsWindowSplit() throw(uno::RuntimeException)
pViewData->GetVSplitMode() == SC_SPLIT_NORMAL );
}
- return FALSE;
+ return false;
}
sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException)
@@ -1694,7 +1701,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException)
pViewData->GetVSplitMode() == SC_SPLIT_FIX );
}
- return FALSE;
+ return false;
}
sal_Int32 SAL_CALL ScTabViewObj::getSplitHorizontal() throw(uno::RuntimeException)
@@ -1740,7 +1747,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn() throw(uno::RuntimeException)
SCsCOL nCol;
SCsROW nRow;
- pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, FALSE );
+ pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, false );
if ( nCol > 0 )
return nCol;
}
@@ -1762,7 +1769,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitRow() throw(uno::RuntimeException)
ScSplitPos ePos = SC_SPLIT_TOPLEFT; // es ist vertikal geteilt
SCsCOL nCol;
SCsROW nRow;
- pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, FALSE );
+ pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, false );
if ( nRow > 0 )
return nRow;
}
@@ -1777,8 +1784,8 @@ void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixel
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
- pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), TRUE, TRUE );
- pViewSh->FreezeSplitters( FALSE );
+ pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), sal_True, sal_True );
+ pViewSh->FreezeSplitters( false );
pViewSh->InvalidateSplit();
}
}
@@ -1800,11 +1807,11 @@ void SAL_CALL ScTabViewObj::freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRow
aWinStart = pWin->GetPosPixel();
ScViewData* pViewData = pViewSh->GetViewData();
- Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, TRUE ));
+ Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, sal_True ));
aSplit += aWinStart;
- pViewSh->SplitAtPixel( aSplit, TRUE, TRUE );
- pViewSh->FreezeSplitters( TRUE );
+ pViewSh->SplitAtPixel( aSplit, sal_True, sal_True );
+ pViewSh->FreezeSplitters( sal_True );
pViewSh->InvalidateSplit();
}
}
@@ -1824,8 +1831,8 @@ void SAL_CALL ScTabViewObj::removeSelectionChangeListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aSelectionListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aSelectionListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<view::XSelectionChangeListener> *pObj = aSelectionListeners[n];
if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface?
@@ -1840,7 +1847,7 @@ void ScTabViewObj::SelectionChanged()
{
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aSelectionListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aSelectionListeners.Count(); n++ )
(*aSelectionListeners[n])->selectionChanged( aEvent );
// handle sheet events
@@ -2053,6 +2060,16 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty
else if ( aString.EqualsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea();
else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType();
else if ( aString.EqualsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom();
+ else if ( aString.EqualsAscii( SC_UNO_VISAREASCREEN ) )
+ {
+ ScViewData* pViewData = pViewSh->GetViewData();
+ Window* pActiveWin = ( pViewData ? pViewData->GetActiveWin() : NULL );
+ if ( pActiveWin )
+ {
+ Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL );
+ aRet <<= AWTRectangle( aRect );
+ }
+ }
}
return aRet;
@@ -2077,8 +2094,8 @@ void SAL_CALL ScTabViewObj::removePropertyChangeListener( const ::rtl::OUString&
uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aPropertyChgListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aPropertyChgListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<beans::XPropertyChangeListener> *pObj = aPropertyChgListeners[n];
if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface?
@@ -2109,7 +2126,7 @@ void ScTabViewObj::VisAreaChanged()
{
beans::PropertyChangeEvent aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- for ( USHORT n=0; n<aPropertyChgListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aPropertyChgListeners.Count(); n++ )
(*aPropertyChgListeners[n])->propertyChange( aEvent );
}
@@ -2124,9 +2141,9 @@ void SAL_CALL ScTabViewObj::startRangeSelection(
if (pViewSh)
{
String aInitVal, aTitle;
- BOOL bCloseOnButtonUp = FALSE;
- BOOL bSingleCell = FALSE;
- BOOL bMultiSelection = FALSE;
+ sal_Bool bCloseOnButtonUp = false;
+ sal_Bool bSingleCell = false;
+ sal_Bool bMultiSelection = false;
rtl::OUString aStrVal;
const beans::PropertyValue* pPropArray = aArguments.getConstArray();
@@ -2181,8 +2198,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRangeSelListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRangeSelListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<sheet::XRangeSelectionListener> *pObj = aRangeSelListeners[n];
if ( *pObj == xListener )
@@ -2208,8 +2225,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionChangeListener(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- USHORT nCount = aRangeChgListeners.Count();
- for ( USHORT n=nCount; n--; )
+ sal_uInt16 nCount = aRangeChgListeners.Count();
+ for ( sal_uInt16 n=nCount; n--; )
{
uno::Reference<sheet::XRangeSelectionChangeListener> *pObj = aRangeChgListeners[n];
if ( *pObj == xListener )
@@ -2226,7 +2243,7 @@ void ScTabViewObj::RangeSelDone( const String& rText )
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.RangeDescriptor = rtl::OUString( rText );
- for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ )
(*aRangeSelListeners[n])->done( aEvent );
}
@@ -2236,7 +2253,7 @@ void ScTabViewObj::RangeSelAborted( const String& rText )
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.RangeDescriptor = rtl::OUString( rText );
- for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ )
(*aRangeSelListeners[n])->aborted( aEvent );
}
@@ -2246,7 +2263,7 @@ void ScTabViewObj::RangeSelChanged( const String& rText )
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.RangeDescriptor = rtl::OUString( rText );
- for ( USHORT n=0; n<aRangeChgListeners.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aRangeChgListeners.Count(); n++ )
(*aRangeChgListeners[n])->descriptorChanged( aEvent );
}
@@ -2345,7 +2362,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref
SolarMutexGuard aGuard;
ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
if (pShell)
- pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), FALSE );
+ pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), false );
else
{
ScDrawTextObjectBar* pTextShell = PTR_CAST( ScDrawTextObjectBar, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
@@ -2356,7 +2373,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
if ( pOutView )
{
- pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), FALSE );
+ pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), false );
return;
}
}
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 99fda2b57a81..5ec8fd16c80d 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -25,8 +25,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <docuno.hxx>
+
#include "excelvbahelper.hxx"
+
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/sheet/XSheetCellRange.hpp>
+#include "docuno.hxx"
#include "tabvwsh.hxx"
#include "transobj.hxx"
#include "scmod.hxx"
@@ -40,12 +44,7 @@
using namespace ::com::sun::star;
using namespace ::ooo::vba;
-namespace ooo
-{
-namespace vba
-{
-namespace excel
-{
+// ============================================================================
uno::Reference< sheet::XDatabaseRanges >
GetDataBaseRanges( ScDocShell* pShell ) throw ( uno::RuntimeException )
@@ -79,7 +78,7 @@ GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet, rtl::OUString& sName ) t
dbAddress = xDBRange->getDataArea();
if ( dbAddress.Sheet == nSheet )
{
- sal_Bool bHasAuto = sal_False;
+ sal_Bool bHasAuto = false;
uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW );
xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ) ) >>= bHasAuto;
if ( bHasAuto )
@@ -169,7 +168,7 @@ private:
bool getReplaceCellsWarning() throw ( uno::RuntimeException )
{
- sal_Bool res = sal_False;
+ sal_Bool res = false;
getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res;
return ( res == sal_True );
}
@@ -217,7 +216,14 @@ implnCopy( const uno::Reference< frame::XModel>& xModel )
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
+ {
pViewShell->CopyToClip(NULL,false,false,true);
+
+ // mark the copied transfer object so it is used in ScVbaRange::Insert
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ if (pClipObj)
+ pClipObj->SetUseInApi( true );
+ }
}
void
@@ -225,13 +231,20 @@ implnCut( const uno::Reference< frame::XModel>& xModel )
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
- pViewShell->CutToClip( NULL, TRUE );
+ {
+ pViewShell->CutToClip( NULL, sal_True );
+
+ // mark the copied transfer object so it is used in ScVbaRange::Insert
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ if (pClipObj)
+ pClipObj->SetUseInApi( true );
+ }
}
-void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
+void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
{
PasteCellsWarningReseter resetWarningBox;
- sal_Bool bAsLink(sal_False), bOtherDoc(sal_False);
+ sal_Bool bAsLink(false), bOtherDoc(false);
InsCellCmd eMoveMode = INS_NONE;
ScTabViewShell* pTabViewShell = getBestViewShell( xModel );
@@ -251,7 +264,7 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFl
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, TRUE );
+ eMoveMode, IDF_NONE, sal_True );
pTabViewShell->CellContentChanged();
}
}
@@ -264,7 +277,7 @@ void implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
{
- pViewShell->CopyToClip( NULL, rRange, FALSE, TRUE, TRUE );
+ pViewShell->CopyToClip( NULL, rRange, false, true, true );
}
}
@@ -309,20 +322,19 @@ sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const rtl::OUString& sRangeStr )
{
ScRangeList aCellRanges;
String sAddress( sRangeStr );
- USHORT nMask = SCA_VALID;
- USHORT rResFlags = aCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_R1C1 );
+ sal_uInt16 nMask = SCA_VALID;
+ sal_uInt16 rResFlags = aCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_R1C1 );
if ( rResFlags & SCA_VALID )
{
return sal_True;
}
- return sal_False;
+ return false;
}
uno::Reference< XHelperInterface >
getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException )
{
- uno::Reference< sheet::XSheetCellRange > xSheetRange( xRange, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xProps( xSheetRange->getSpreadsheet(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xSheet, uno::UNO_QUERY_THROW );
rtl::OUString sCodeName;
xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CodeName") ) ) >>= sCodeName;
// #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible
@@ -330,8 +342,7 @@ getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw
// are *NO* special document module objects ( of course being able to switch between vba/non vba mode at
// the document in the future could fix this, especially IF the switching of the vba mode takes care to
// create the special document module objects if they don't exist.
- uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xRange ) ), uno::UNO_QUERY );
-
+ uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xSheet ) ), uno::UNO_QUERY );
return xParent;
}
@@ -348,9 +359,9 @@ formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAd
ScTokenArray* pCode = aCompiler.CompileString( sFormula );
if ( pCode )
{
- USHORT nLen = pCode->GetLen();
+ sal_uInt16 nLen = pCode->GetLen();
formula::FormulaToken** pTokens = pCode->GetArray();
- for ( USHORT nPos = 0; nPos < nLen; nPos++ )
+ for ( sal_uInt16 nPos = 0; nPos < nLen; nPos++ )
{
const formula::FormulaToken& rToken = *pTokens[nPos];
switch ( rToken.GetType() )
@@ -397,13 +408,13 @@ void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, Stri
{
return;
}
- USHORT nLen = pCode->GetLen();
+ sal_uInt16 nLen = pCode->GetLen();
formula::FormulaToken** pTokens = pCode->GetArray();
- for ( USHORT nPos = 0; nPos < nLen && pTokens[nPos]; nPos++ )
+ for ( sal_uInt16 nPos = 0; nPos < nLen && pTokens[nPos]; nPos++ )
{
String rFormula;
formula::FormulaToken* pToken = pTokens[nPos];
- aCompiler.CreateStringFromToken( rFormula, pToken, TRUE );
+ aCompiler.CreateStringFromToken( rFormula, pToken, true );
if ( pToken->GetOpCode() == ocSep )
{
// Excel formula separator is ",".
@@ -419,16 +430,33 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& x
uno::Reference< container::XEnumerationAccess > xEnumAccess( xRanges, uno::UNO_QUERY_THROW );
uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
uno::Reference< table::XCellRange > xRange( xEnum->nextElement(), uno::UNO_QUERY_THROW );
-
return getUnoSheetModuleObj( xRange );
}
+uno::Reference< XHelperInterface >
+getUnoSheetModuleObj( const uno::Reference< table::XCell >& xCell ) throw ( uno::RuntimeException )
+{
+ uno::Reference< sheet::XSheetCellRange > xSheetRange( xCell, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XSpreadsheet > xSheet( xSheetRange->getSpreadsheet(), uno::UNO_SET_THROW );
+ return getUnoSheetModuleObj( xSheet );
+}
+
+uno::Reference< XHelperInterface >
+getUnoSheetModuleObj( const uno::Reference< frame::XModel >& xModel, SCTAB nTab ) throw ( uno::RuntimeException )
+{
+ uno::Reference< sheet::XSpreadsheetDocument > xDoc( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xSheets( xDoc->getSheets(), uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XSpreadsheet > xSheet( xSheets->getByIndex( nTab ), uno::UNO_QUERY_THROW );
+ return getUnoSheetModuleObj( xSheet );
+}
+
SfxItemSet*
ScVbaCellRangeAccess::GetDataSet( ScCellRangesBase* pRangeObj )
{
return pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : 0;
}
+// ============================================================================
} //excel
} //vba
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index 7eff6768aa96..13e7bf985d32 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -34,12 +34,42 @@
#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <ooo/vba/XHelperInterface.hpp>
#include <formula/grammar.hxx>
class ScCellRangesBase;
-namespace ooo
+namespace ooo {
+namespace vba {
+namespace excel {
+
+// ============================================================================
+
+// nTabs empty means apply zoom to all sheets
+void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs );
+void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
+void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
+void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
+void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
+ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
+ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
+ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
+
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCell >& xCell ) throw ( css::uno::RuntimeException );
+css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::frame::XModel >& xModel, SCTAB nTab ) throw ( css::uno::RuntimeException );
+
+ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+ScDocument* GetDocumentFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+css::uno::Reference< css::frame::XModel > GetModelFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+
+// ============================================================================
+
+class ScVbaCellRangeAccess
{
namespace vba
{
diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk
index a937849d3ed4..67d600116b0c 100644
--- a/sc/source/ui/vba/makefile.mk
+++ b/sc/source/ui/vba/makefile.mk
@@ -123,15 +123,3 @@ SLOFILES= \
.INCLUDE : target.mk
-.IF "$(L10N_framework)"==""
-
-ALLTAR : \
- $(MISC)$/$(TARGET).don \
-
-$(SLOFILES) : $(MISC)$/$(TARGET).don
-
-$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
- +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
- echo $@
-
-.ENDIF
diff --git a/sc/source/ui/vba/testvba/makefile.mk b/sc/source/ui/vba/testvba/makefile.mk
index 20bdeca5271c..c75f6f63296c 100644
--- a/sc/source/ui/vba/testvba/makefile.mk
+++ b/sc/source/ui/vba/testvba/makefile.mk
@@ -36,11 +36,6 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
DLLPRE =
-.IF "$(ENABLE_VBA)"!="YES"
-dummy:
- @echo "not building vba..."
-.ENDIF
-
INCPRE=$(INCCOM)$/$(TARGET)
CDEFS+=-DVBA_OOBUILD_HACK
diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx
index d93f2515cc35..4a318098684e 100644
--- a/sc/source/ui/vba/testvba/testvba.cxx
+++ b/sc/source/ui/vba/testvba/testvba.cxx
@@ -132,7 +132,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
// Loading the wanted document
Sequence< PropertyValue > propertyValues(1);
propertyValues[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" ));
- propertyValues[0].Value <<= sal_False;
+ propertyValues[0].Value <<= false;
rtl::OUString sfileUrl = convertToURL( sUrl );
printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -208,7 +208,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
// if only one frame and model, click a button which related will colse.
// will make a crash. It related with window listener.
// so, for run all test cases, it should not close the document at this moment.
- xCloseable->close(sal_False);
+ xCloseable->close(false);
printf("closed\n");
}
else
@@ -237,7 +237,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "not a directory: ")).concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 );
}
// Getting all files and directories in the current directory
- Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False );
+ Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, false );
// Iterating for each file and directory
printf( "Entries %d\n", (int)entries.getLength() );
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index d54ea2bdff59..59bf41d21cd1 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -82,6 +82,7 @@
#include "appoptio.hxx"
#include <osl/file.hxx>
+#include <rtl/instance.hxx>
#include <map>
@@ -149,11 +150,32 @@ public:
ActiveWorkbook( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook( xParent, xContext ){}
};
+// ============================================================================
+
+/** Global application settings shared by all open workbooks. */
+struct ScVbaAppSettings
+{
+ sal_Int32 mnCalculation;
+ sal_Bool mbDisplayAlerts;
+ sal_Bool mbEnableEvents;
+
+ explicit ScVbaAppSettings();
+};
+
+ScVbaAppSettings::ScVbaAppSettings() :
+ mnCalculation( excel::XlCalculation::xlCalculationAutomatic ),
+ mbDisplayAlerts( sal_True ),
+ mbEnableEvents( sal_True )
+{
+}
+
+struct ScVbaStaticAppSettings : public ::rtl::Static< ScVbaAppSettings, ScVbaStaticAppSettings > {};
+
+// ============================================================================
+
ScVbaApplication::ScVbaApplication( const uno::Reference<uno::XComponentContext >& xContext ) :
ScVbaApplication_BASE( xContext ),
- m_xCalculation( excel::XlCalculation::xlCalculationAutomatic ),
- m_bDisplayAlerts( sal_True ),
- m_bEnableEvents( sal_True )
+ mrAppSettings( ScVbaStaticAppSettings::get() )
{
}
@@ -301,7 +323,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
OUString aPropName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_FILTERED_RANGE_SELECTION ) );
uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
uno::Any any;
- any <<= sal_False;
+ any <<= false;
xPropSet->setPropertyValue( aPropName, any );
uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
xSelSupp->getSelection() );
@@ -457,7 +479,7 @@ ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
}
else
{
- result <<= sal_False;
+ result <<= false;
}
return result;
}
@@ -466,7 +488,7 @@ void SAL_CALL
ScVbaApplication::setCutCopyMode( const uno::Any& _cutcopymode ) throw (uno::RuntimeException)
{
// According to Excel's behavior, no matter what is the value of _cutcopymode, always releases the clip object.
- sal_Bool bCutCopyMode = sal_False;
+ sal_Bool bCutCopyMode = false;
if ( ( _cutcopymode >>= bCutCopyMode ) )
{
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
@@ -514,19 +536,21 @@ void SAL_CALL
ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::RuntimeException)
{
rtl::OUString sText;
- sal_Bool bDefault = sal_False;
+ sal_Bool bDefault = false;
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_QUERY_THROW );
if( _statusbar >>= sText )
{
setDisplayStatusBar( sal_True );
- xStatusIndicator->start( sText, 100 );
- //xStatusIndicator->setText( sText );
+ if ( sText.getLength() )
+ xStatusIndicator->start( sText, 100 );
+ else
+ xStatusIndicator->end(); // restore normal state for empty text
}
else if( _statusbar >>= bDefault )
{
- if( bDefault == sal_False )
+ if( bDefault == false )
{
xStatusIndicator->end();
setDisplayStatusBar( sal_True );
@@ -540,6 +564,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
::sal_Int32 SAL_CALL
ScVbaApplication::getCalculation() throw (uno::RuntimeException)
{
+ // TODO: in Excel, this is an application-wide setting
uno::Reference<sheet::XCalculatable> xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
if(xCalc->isAutomaticCalculationEnabled())
return excel::XlCalculation::xlCalculationAutomatic;
@@ -550,11 +575,12 @@ ScVbaApplication::getCalculation() throw (uno::RuntimeException)
void SAL_CALL
ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) throw (uno::RuntimeException)
{
+ // TODO: in Excel, this is an application-wide setting
uno::Reference< sheet::XCalculatable > xCalc(getCurrentDocument(), uno::UNO_QUERY_THROW);
switch(_calculation)
{
case excel::XlCalculation::xlCalculationManual:
- xCalc->enableAutomaticCalculation(sal_False);
+ xCalc->enableAutomaticCalculation(false);
break;
case excel::XlCalculation::xlCalculationAutomatic:
case excel::XlCalculation::xlCalculationSemiautomatic:
@@ -575,7 +601,6 @@ void SAL_CALL
ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
{
StarBASIC* pBasic = SFX_APP()->GetBasic();
- SFX_APP()->EnterBasicCall();
SbxArrayRef aArgs = new SbxArray;
SbxVariableRef aRef = new SbxVariable;
aRef->PutDouble( time );
@@ -589,8 +614,6 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
// forces a broadcast
SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth));
}
- SFX_APP()->LeaveBasicCall();
-
}
uno::Any SAL_CALL
@@ -656,12 +679,12 @@ void SAL_CALL
ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) throw (uno::RuntimeException)
{
//test Scroll is a boolean
- sal_Bool bScroll = sal_False;
+ sal_Bool bScroll = false;
//R1C1-style string or a string of procedure name.
if( Scroll.hasValue() )
{
- sal_Bool aScroll = sal_False;
+ sal_Bool aScroll = false;
if( Scroll >>= aScroll )
{
bScroll = aScroll;
@@ -783,7 +806,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
case excel::XlMousePointer::xlNorthwestArrow:
{
const Pointer& rPointer( POINTER_ARROW );
- setCursorHelper( xModel, rPointer, sal_False );
+ setCursorHelper( xModel, rPointer, false );
break;
}
case excel::XlMousePointer::xlWait:
@@ -797,7 +820,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
case excel::XlMousePointer::xlDefault:
{
const Pointer& rPointer( POINTER_NULL );
- setCursorHelper( xModel, rPointer, sal_False );
+ setCursorHelper( xModel, rPointer, false );
break;
}
default:
@@ -831,25 +854,25 @@ ScVbaApplication::getName() throw (uno::RuntimeException)
void SAL_CALL
ScVbaApplication::setDisplayAlerts(sal_Bool displayAlerts) throw (uno::RuntimeException)
{
- m_bDisplayAlerts = displayAlerts;
+ mrAppSettings.mbDisplayAlerts = displayAlerts;
}
sal_Bool SAL_CALL
ScVbaApplication::getDisplayAlerts() throw (uno::RuntimeException)
{
- return m_bDisplayAlerts;
+ return mrAppSettings.mbDisplayAlerts;
}
void SAL_CALL
ScVbaApplication::setEnableEvents(sal_Bool bEnable) throw (uno::RuntimeException)
{
- m_bEnableEvents = bEnable;
+ mrAppSettings.mbEnableEvents = bEnable;
}
sal_Bool SAL_CALL
ScVbaApplication::getEnableEvents() throw (uno::RuntimeException)
{
- return m_bEnableEvents;
+ return mrAppSettings.mbEnableEvents;
}
sal_Bool SAL_CALL
@@ -1317,7 +1340,7 @@ ScVbaApplication::Volatile( const uno::Any& aVolatile ) throw ( uno::RuntimeExc
::sal_Bool SAL_CALL
ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
{
- sal_Bool bRes = sal_False;
+ sal_Bool bRes = false;
ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
if ( pViewShell )
{
@@ -1327,7 +1350,7 @@ ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
pViewShell->GetState( reqList );
const SfxPoolItem *pItem=0;
- if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, sal_False, &pItem ) == SFX_ITEM_SET )
+ if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, false, &pItem ) == SFX_ITEM_SET )
bRes = ((SfxBoolItem*)pItem)->GetValue();
}
return bRes;
@@ -1350,7 +1373,6 @@ uno::Any SAL_CALL
ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException )
{
StarBASIC* pBasic = SFX_APP()->GetBasic();
- SFX_APP()->EnterBasicCall();
SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD );
uno::Any aRet;
if ( pMeth )
@@ -1361,14 +1383,13 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep
OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() );
aRet = sbxToUnoValue( pNew );
}
- SFX_APP()->LeaveBasicCall();
return aRet;
}
uno::Any SAL_CALL
ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& FilterIndex, const uno::Any& Title, const uno::Any& ButtonText, const uno::Any& MultiSelect) throw (uno::RuntimeException)
{
- uno::Any aRet = uno::makeAny( sal_False );
+ uno::Any aRet = uno::makeAny( false );
try
{
const rtl::OUString sServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
@@ -1426,7 +1447,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
ButtonText >>= sButtonText;
xPickerControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, sButtonText );
}
- sal_Bool bMultiSelect = sal_False;
+ sal_Bool bMultiSelect = false;
if ( xFilePicker.is() && MultiSelect.hasValue() )
{
MultiSelect >>= bMultiSelect;
@@ -1435,7 +1456,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
if ( xFilePicker.is() && xFilePicker->execute() )
{
- sal_Bool bUseXFilePicker2 = sal_False;
+ sal_Bool bUseXFilePicker2 = false;
uno::Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
if ( xServiceInfo.is() )
{
@@ -1604,7 +1625,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
sal_Int16 nRet = xFilePicker->execute();
if (nRet == 0)
{
- strRet <<= sal_False;
+ strRet <<= false;
}
else
{
@@ -1636,7 +1657,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
}
else
{
- sal_Bool bValidFilter = sal_False;
+ sal_Bool bValidFilter = false;
FileFilterMap::const_iterator aIt = mFilterNameMap.begin();
while ( aIt != mFilterNameMap.end() )
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index bc047b82c7b9..84816902088d 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -39,12 +39,13 @@
typedef cppu::ImplInheritanceHelper1< VbaApplicationBase, ov::excel::XApplication > ScVbaApplication_BASE;
+struct ScVbaAppSettings;
+
class ScVbaApplication : public ScVbaApplication_BASE
{
private:
- sal_Int32 m_xCalculation;
- sal_Bool m_bDisplayAlerts;
- sal_Bool m_bEnableEvents;
+ // note: member variables moved to struct "ScVbaAppSettings", see cxx file, to be shared by all application instances
+ ScVbaAppSettings& mrAppSettings;
rtl::OUString getOfficePath( const rtl::OUString& sPath ) throw ( css::uno::RuntimeException );
css::uno::Reference< ov::XFileSearch > m_xFileSearch;
@@ -56,6 +57,9 @@ public:
ScVbaApplication( const css::uno::Reference< css::uno::XComponentContext >& m_xContext );
virtual ~ScVbaApplication();
+ /** Returns true, if VBA document events are enabled. */
+ static bool getDocumentEventsEnabled();
+
virtual SfxObjectShell* GetDocShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
// XExactName
diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx
index 126719c6fd56..3c91b9cde00b 100644
--- a/sc/source/ui/vba/vbaassistant.cxx
+++ b/sc/source/ui/vba/vbaassistant.cxx
@@ -41,7 +41,7 @@ using namespace ooo::vba::office::MsoAnimationType;
ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext ): ScVbaAssistantImpl_BASE( xParent, xContext ),
m_sName( RTL_CONSTASCII_USTRINGPARAM( "Clippit" ) )
{
- m_bIsVisible = sal_False;
+ m_bIsVisible = false;
m_nPointsLeft = 795;
m_nPointsTop = 248;
m_nAnimation = msoAnimationIdle;
@@ -66,7 +66,7 @@ sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException)
if( SvtHelpOptions().IsHelpAgentAutoStartMode() )
return sal_True;
else
- return sal_False;
+ return false;
}
void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 9005ffdf6069..ae182c8a795e 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -168,7 +168,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup)
// bodgy helperapi port bits
sal_Int32 nAxisGroup = xlPrimary;
sal_Int32 nType = -1;
- if ( !_nType.hasValue() || ( ( _nType >>= nType ) == sal_False ) )
+ if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) )
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Axes::Item Failed to extract type" )), uno::Reference< uno::XInterface >() );
if ( _oAxisGroup.hasValue() )
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index 3cab8e7cea53..3d599b25a599 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -61,7 +61,7 @@ ScVbaAxis::isValueAxis() throw( script::BasicErrorException )
return sal_True;
}
-ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False )
+ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( false )
{
oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) );
moChartParent.set( xParent, uno::UNO_QUERY_THROW );
@@ -132,23 +132,23 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio
{
case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point.
mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny( sal_True ) );
- bCrossesAreCustomized = sal_False;
+ bCrossesAreCustomized = false;
return;
case xlAxisCrossesMinimum: // The axis crosses at the minimum value.
mxPropertySet->getPropertyValue(VBA_MIN) >>= fNum;
setCrossesAt( fNum );
- bCrossesAreCustomized = sal_False;
+ bCrossesAreCustomized = false;
break;
case xlAxisCrossesMaximum: // The axis crosses at the maximum value.
mxPropertySet->getPropertyValue(VBA_MAX) >>= fNum;
setCrossesAt(fNum);
- bCrossesAreCustomized = sal_False;
+ bCrossesAreCustomized = false;
break;
default: //xlAxisCrossesCustom
bCrossesAreCustomized = sal_True;
break;
}
- mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(sal_False) );
+ mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(false) );
}
catch (uno::Exception& )
{
@@ -161,7 +161,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept
sal_Int32 nCrosses = xlAxisCrossesCustom;
try
{
- sal_Bool bisAutoOrigin = sal_False;
+ sal_Bool bisAutoOrigin = false;
mxPropertySet->getPropertyValue(AUTOORIGIN) >>= bisAutoOrigin;
if (bisAutoOrigin)
nCrosses = xlAxisCrossesAutomatic;
@@ -194,8 +194,8 @@ ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException
{
try
{
- setMaximumScaleIsAuto( sal_False );
- setMinimumScaleIsAuto( sal_False );
+ setMaximumScaleIsAuto( false );
+ setMinimumScaleIsAuto( false );
mxPropertySet->setPropertyValue(ORIGIN, uno::makeAny(_fCrossesAt));
}
catch (uno::Exception& e)
@@ -260,7 +260,7 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti
::sal_Bool SAL_CALL
ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bHasTitle = sal_False;
+ sal_Bool bHasTitle = false;
try
{
ScVbaChart* pChart = getChartPtr();
@@ -331,7 +331,7 @@ ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::Bas
::sal_Bool SAL_CALL
ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -356,7 +356,7 @@ ScVbaAxis::setReversePlotOrder( ::sal_Bool /*ReversePlotOrder*/ ) throw (script:
ScVbaAxis::getReversePlotOrder( ) throw (script::BasicErrorException, uno::RuntimeException)
{
DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString());
- return sal_False;
+ return false;
}
void SAL_CALL
@@ -410,7 +410,7 @@ ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::Bas
::sal_Bool SAL_CALL
ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -479,7 +479,7 @@ ScVbaAxis::setMaximumScaleIsAuto( ::sal_Bool _bMaximumScaleIsAuto ) throw (scrip
::sal_Bool SAL_CALL
ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -541,7 +541,7 @@ ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (scrip
::sal_Bool SAL_CALL
ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bIsAuto = sal_False;
+ sal_Bool bIsAuto = false;
try
{
if (isValueAxis())
@@ -572,7 +572,7 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorExce
switch (_nScaleType)
{
case xlScaleLinear:
- mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( sal_False ) );
+ mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( false ) );
break;
case xlScaleLogarithmic:
mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( sal_True ) );
@@ -597,7 +597,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce
{
if (isValueAxis())
{
- sal_Bool bisLogarithmic = sal_False;
+ sal_Bool bisLogarithmic = false;
mxPropertySet->getPropertyValue( rtl::OUString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Logarithmic"))) ) >>= bisLogarithmic;
if (bisLogarithmic)
nScaleType = xlScaleLogarithmic;
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 011b0a4a72e1..2b163afc2a74 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -47,8 +47,8 @@ ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xPar
{
if ( ( nStart + 1 ) > m_xSimpleText->getString().getLength() )
//nStart = m_xSimpleText->getString().getLength();
- xTextCursor->gotoEnd( sal_False );
- xTextCursor->goRight( nStart, sal_False );
+ xTextCursor->gotoEnd( false );
+ xTextCursor->goRight( nStart, false );
}
if ( nLength < 0 ) // expand to end
xTextCursor->gotoEnd( sal_True );
diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx
index df2fcf348619..b9711fcb86df 100644
--- a/sc/source/ui/vba/vbacharacters.hxx
+++ b/sc/source/ui/vba/vbacharacters.hxx
@@ -49,7 +49,7 @@ private:
// Add becuase of MSO has diferent behavior.
sal_Bool bReplace;
public:
- ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = sal_False ) throw ( css::lang::IllegalArgumentException );
+ ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, sal_Bool bReplace = false ) throw ( css::lang::IllegalArgumentException );
virtual ~ScVbaCharacters() {}
// Attributes
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index c46569a8c44d..16893723a19a 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -166,7 +166,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce
}
else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.StockDiagram"))))
{
- sal_Bool bVolume = sal_False;
+ sal_Bool bVolume = false;
mxDiagramPropertySet->getPropertyValue(VOLUME) >>= bVolume;
if (bVolume)
{
@@ -179,7 +179,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce
}
else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.XYDiagram"))))
{
- sal_Bool bHasLines = sal_False;
+ sal_Bool bHasLines = false;
mxDiagramPropertySet->getPropertyValue(LINES) >>= bHasLines;
sal_Int32 nSplineType = 0;
mxDiagramPropertySet->getPropertyValue(SPLINETYPE) >>= nSplineType;
@@ -331,7 +331,7 @@ try
case xlXYScatter:
case xlBubble: // not possible
case xlBubble3DEffect: // not possible
- mxDiagramPropertySet->setPropertyValue(LINES, uno::makeAny( sal_False ));
+ mxDiagramPropertySet->setPropertyValue(LINES, uno::makeAny( false ));
break;
case xlXYScatterLines:
case xlXYScatterLinesNoMarkers:
@@ -385,7 +385,7 @@ try
default:
if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(DEEP))
{
- mxDiagramPropertySet->setPropertyValue(DEEP, uno::makeAny( sal_False));
+ mxDiagramPropertySet->setPropertyValue(DEEP, uno::makeAny( false));
}
break;
}
@@ -455,7 +455,7 @@ try
default:
if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(VERTICAL))
{
- mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::makeAny(sal_False));
+ mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::makeAny(false));
}
break;
}
@@ -476,7 +476,7 @@ try
case xlConeBarStacked:
case xlPyramidColStacked:
case xlPyramidBarStacked:
- mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( sal_False ));
+ mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( false ));
mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( sal_True ));
break;
case xlPyramidColStacked100:
@@ -497,8 +497,8 @@ try
mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( sal_True ));
break;
default:
- mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( sal_False));
- mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( sal_False));
+ mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( false));
+ mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( false));
break;
}
switch (_nChartType)
@@ -542,7 +542,7 @@ try
default:
if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(DIM3D))
{
- mxDiagramPropertySet->setPropertyValue(DIM3D, uno::makeAny( sal_False));
+ mxDiagramPropertySet->setPropertyValue(DIM3D, uno::makeAny( false));
}
break;
}
@@ -583,8 +583,8 @@ ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange
mxTableChart->setRanges(mRangeAddresses);
- sal_Bool bsetRowHeaders = sal_False;
- sal_Bool bsetColumnHeaders = sal_False;
+ sal_Bool bsetRowHeaders = false;
+ sal_Bool bsetColumnHeaders = false;
ScVbaRange* pRange = static_cast< ScVbaRange* >( _xCalcRange.get() );
if ( pRange )
@@ -822,7 +822,7 @@ ScVbaChart::setLocation( ::sal_Int32 /*where*/, const css::uno::Any& /*Name*/ )
sal_Bool SAL_CALL
ScVbaChart::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bHasTitle = sal_False;
+ sal_Bool bHasTitle = false;
try
{
mxChartPropertySet->getPropertyValue(HASMAINTITLE) >>= bHasTitle;
@@ -851,7 +851,7 @@ ScVbaChart::setHasTitle( ::sal_Bool bTitle ) throw (script::BasicErrorException,
::sal_Bool SAL_CALL
ScVbaChart::getHasLegend( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- sal_Bool bHasLegend = sal_False;
+ sal_Bool bHasLegend = false;
try
{
mxChartPropertySet->getPropertyValue(HASLEGEND) >>= bHasLegend;
@@ -897,7 +897,7 @@ bool
ScVbaChart::is3D() throw ( uno::RuntimeException )
{
// #TODO perhaps provide limited Debughelper functionality
- sal_Bool is3d = sal_False;
+ sal_Bool is3d = false;
mxDiagramPropertySet->getPropertyValue(DIM3D) >>= is3d;
return is3d;
}
@@ -921,7 +921,7 @@ bool
ScVbaChart::isStacked() throw ( uno::RuntimeException )
{
// #TODO perhaps provide limited Debughelper functionality
- sal_Bool bStacked = sal_False;
+ sal_Bool bStacked = false;
mxDiagramPropertySet->getPropertyValue(STACKED) >>= bStacked;
return bStacked;
}
@@ -930,7 +930,7 @@ bool
ScVbaChart::is100PercentStacked() throw ( uno::RuntimeException )
{
// #TODO perhaps provide limited Debughelper functionality
- sal_Bool b100Percent = sal_False;
+ sal_Bool b100Percent = false;
mxDiagramPropertySet->getPropertyValue(PERCENT) >>= b100Percent;
return b100Percent;
}
@@ -971,7 +971,7 @@ ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _
sal_Int32
ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (script::BasicErrorException)
{
- sal_Bool bUpDown = sal_False;
+ sal_Bool bUpDown = false;
try
{
mxDiagramPropertySet->getPropertyValue(UPDOWN) >>= bUpDown;
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index f707fad1eb13..402d9e9e1667 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -202,14 +202,14 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
if ( bOverwrite )
{
xTextCursor->collapseToStart();
- xTextCursor->gotoStart( sal_False );
- xTextCursor->goRight( nStart - 1, sal_False );
+ xTextCursor->gotoStart( false );
+ xTextCursor->goRight( nStart - 1, false );
xTextCursor->gotoEnd( sal_True );
}
else
{
xTextCursor->collapseToStart();
- xTextCursor->gotoStart( sal_False );
+ xTextCursor->gotoStart( false );
xTextCursor->goRight( nStart - 1 , sal_True );
}
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 7cbcc8592721..f1c706a7a091 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -49,6 +49,7 @@
#include "cellsuno.hxx"
#include "convuno.hxx"
+#include "vbaapplication.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::script::vba::VBAEventId;
@@ -56,6 +57,51 @@ using namespace ::ooo::vba;
// ============================================================================
+namespace {
+
+/** Extracts a sheet index from the specified element of the passed sequence.
+ The element may be an integer, a Calc range or ranges object, or a VBA Range object. */
+SCTAB lclGetTabFromArgs( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException)
+{
+ VbaEventsHelperBase::checkArgument( rArgs, nIndex );
+
+ // first try to extract a sheet index
+ SCTAB nTab = -1;
+ if( rArgs[ nIndex ] >>= nTab )
+ return nTab;
+
+ // try VBA Range object
+ uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
+ if( xVbaRange.is() )
+ {
+ uno::Reference< XHelperInterface > xVbaHelper( xVbaRange, uno::UNO_QUERY_THROW );
+ // TODO: in the future, the parent may be an excel::XChart (chart sheet) -> will there be a common base interface?
+ uno::Reference< excel::XWorksheet > xVbaSheet( xVbaHelper->getParent(), uno::UNO_QUERY_THROW );
+ // VBA sheet index is 1-based
+ return static_cast< SCTAB >( xVbaSheet->getIndex() - 1 );
+ }
+
+ // try single UNO range object
+ uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable = getXSomethingFromArgs< sheet::XCellRangeAddressable >( rArgs, nIndex );
+ if( xCellRangeAddressable.is() )
+ return xCellRangeAddressable->getRangeAddress().Sheet;
+
+ // at last, try UNO range list
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
+ if( xRanges.is() )
+ {
+ uno::Sequence< table::CellRangeAddress > aRangeAddresses = xRanges->getRangeAddresses();
+ if( aRangeAddresses.getLength() > 0 )
+ return aRangeAddresses[ 0 ].Sheet;
+ }
+
+ throw lang::IllegalArgumentException();
+}
+
+} // namespace
+
+// ============================================================================
+
typedef ::cppu::WeakImplHelper4<
awt::XWindowListener, util::XCloseListener, frame::XBorderResizeListener, util::XChangesListener > ScVbaEventsListener_BASE;
@@ -91,7 +137,6 @@ private:
uno::Reference< awt::XWindow > getContainerWindow();
bool isMouseReleased();
DECL_LINK( fireResizeMacro, void* );
- void processWindowResizeMacro();
private:
::osl::Mutex maMutex;
@@ -288,7 +333,7 @@ void SAL_CALL ScVbaEventsListener::changesOccurred( const util::ChangesEvent& aE
aChange.ReplacedElement >>= xRangeObj;
if( xRangeObj.is() )
{
- uno::Sequence< uno::Any > aArgs(1);
+ uno::Sequence< uno::Any > aArgs( 1 );
aArgs[0] <<= xRangeObj;
mrVbaEvents.processVbaEvent( WORKSHEET_CHANGE, aArgs );
}
@@ -363,8 +408,14 @@ bool ScVbaEventsListener::isMouseReleased()
IMPL_LINK( ScVbaEventsListener, fireResizeMacro, void*, EMPTYARG )
{
- if( !mbDisposed && isMouseReleased() )
- processWindowResizeMacro();
+ if( !mbDisposed && isMouseReleased() ) try
+ {
+ mrVbaEvents.processVbaEvent( WORKBOOK_WINDOWRESIZE, uno::Sequence< uno::Any >() );
+ }
+ catch( uno::Exception& )
+ {
+ // #163419# do not throw exceptions into application core
+ }
release();
return 0;
}
@@ -450,43 +501,19 @@ void SAL_CALL ScVbaEventsHelper::disposing( const lang::EventObject& rSource ) t
// protected ------------------------------------------------------------------
-bool ScVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException)
+bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs ) throw (uno::RuntimeException)
{
// document and document shell are needed during event processing
- if( !mpDocShell || !mpDoc )
+ if( !mpShell || !mpDoc )
throw uno::RuntimeException();
- // get Application object and check if events are enabled (this is an Excel-only attribute)
- uno::Reference< excel::XApplication > xApplication( mxApplication.get(), uno::UNO_QUERY );
- if( !xApplication.is() && mpShell )
- {
- uno::Any aVBAGlobals;
- mpShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aVBAGlobals );
- uno::Reference< XHelperInterface > xHelperInterface( aVBAGlobals, uno::UNO_QUERY );
- if( xHelperInterface.is() )
- {
- xApplication.set( xHelperInterface->Application(), uno::UNO_QUERY );
- mxApplication = xApplication;
- }
- }
- if( !xApplication.is() )
- throw uno::RuntimeException();
+ // framework and Calc fire a few events before 'opened', ignore them
+ bool bExecuteEvent = mbOpened;
- // return whether event processing is enabled
- return xApplication->getEnableEvents();
-}
-
-bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
- const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs ) throw (uno::RuntimeException)
-{
- // check preconditions for some events, add more events if needed
- bool bExecuteEvent = true;
+ // special handling for some events
switch( rInfo.mnEventId )
{
- case WORKBOOK_ACTIVATE:
- // while loading, framework fires this before 'opened' event, delay it
- bExecuteEvent = mbOpened;
- break;
case WORKBOOK_OPEN:
bExecuteEvent = !mbOpened;
if( bExecuteEvent )
@@ -499,15 +526,25 @@ bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
break;
case WORKSHEET_SELECTIONCHANGE:
// if selection is not changed, then do not fire the event
- bExecuteEvent = mbOpened && isSelectionChanged( rArgs, 0 );
+ bExecuteEvent = bExecuteEvent && isSelectionChanged( rArgs, 0 );
break;
}
- // add workbook event associated to a sheet event
- bool bSheetEvent = false;
- rInfo.maUserData >>= bSheetEvent;
- if( bSheetEvent && bExecuteEvent )
- rEventQueue.push_back( EventQueueEntry( rInfo.mnEventId + USERDEFINED_START, rArgs ) );
+ if( bExecuteEvent )
+ {
+ // add workbook event associated to a sheet event
+ bool bSheetEvent = false;
+ if( (rInfo.maUserData >>= bSheetEvent) && bSheetEvent )
+ rEventQueue.push_back( EventQueueEntry( rInfo.mnEventId + USERDEFINED_START, rArgs ) );
+
+ /* For document events: check if events are enabled via the
+ Application.EnableEvents symbol (this is an Excel-only attribute).
+ Check this again for every event, as the event handler may change
+ the state of the EnableEvents symbol. Global events such as
+ AUTO_OPEN and AUTO_CLOSE are always enabled. */
+ if( rInfo.meType == EVENTHANDLER_DOCUMENT )
+ bExecuteEvent = ScVbaApplication::getDocumentEventsEnabled();
+ }
return bExecuteEvent;
}
@@ -631,7 +668,7 @@ void ScVbaEventsHelper::implPostProcessEvent( EventQueue& rEventQueue,
{
bool bSheetEvent = false;
rInfo.maUserData >>= bSheetEvent;
- SCTAB nTab = bSheetEvent ? getTabFromArgs( rArgs, 0 ) : -1;
+ SCTAB nTab = bSheetEvent ? lclGetTabFromArgs( rArgs, 0 ) : -1;
if( bSheetEvent && (nTab < 0) )
throw lang::IllegalArgumentException();
@@ -645,34 +682,31 @@ void ScVbaEventsHelper::implPostProcessEvent( EventQueue& rEventQueue,
// private --------------------------------------------------------------------
-SCTAB ScVbaEventsHelper::getTabFromArgs( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException)
-{
- checkArgument( rArgs, nIndex );
+namespace {
- // first try to extract a sheet index
- SCTAB nTab = -1;
- if( rArgs[ nIndex ] >>= nTab )
- return nTab;
+/** Compares the passed range lists representing sheet selections. Ignores
+ selections that refer to different sheets (returns false in this case). */
+bool lclSelectionChanged( const ScRangeList& rLeft, const ScRangeList& rRight )
+{
+ // one of the range lists empty? -> return false, if both lists empty
+ bool bLeftEmpty = rLeft.Count() == 0;
+ bool bRightEmpty = rRight.Count() == 0;
+ if( bLeftEmpty || bRightEmpty )
+ return !(bLeftEmpty && bRightEmpty);
- // next, try single range object
- uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable = getXSomethingFromArgs< sheet::XCellRangeAddressable >( rArgs, nIndex );
- if( xCellRangeAddressable.is() )
- return xCellRangeAddressable->getRangeAddress().Sheet;
+ // check sheet indexes of the range lists (assuming that all ranges in a list are on the same sheet)
+ if( rLeft.GetObject( 0 )->aStart.Tab() != rRight.GetObject( 0 )->aStart.Tab() )
+ return false;
- // at last, try range list
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
- if( xRanges.is() )
- {
- uno::Sequence< table::CellRangeAddress > aRangeAddresses = xRanges->getRangeAddresses();
- if( aRangeAddresses.getLength() > 0 )
- return aRangeAddresses[ 0 ].Sheet;
- }
-
- throw lang::IllegalArgumentException();
+ // compare all ranges
+ return rLeft != rRight;
}
+} // namespace
+
bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException, uno::RuntimeException)
{
+ uno::Reference< uno::XInterface > xOldSelection( maOldSelection, uno::UNO_QUERY );
uno::Reference< uno::XInterface > xNewSelection = getXSomethingFromArgs< uno::XInterface >( rArgs, nIndex, false );
if( ScCellRangesBase* pNewCellRanges = ScCellRangesBase::getImplementation( xNewSelection ) )
{
@@ -687,53 +721,46 @@ bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rAr
uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- // Eventually we will be able to pull the Workbook/Worksheet objects
- // directly from basic and register them as listeners
-
// extract sheet index, will throw, if parameter is invalid
- SCTAB nTab = getTabFromArgs( rArgs, nIndex );
-
- // create Workbook
- uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= uno::Reference< uno::XInterface >();
- aArgs[ 1 ] <<= mxModel;
- uno::Reference< uno::XInterface > xWorkbook( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Workbook", aArgs ), uno::UNO_SET_THROW );
-
- // create WorkSheet
- String aSheetName;
- mpDoc->GetName( nTab, aSheetName );
- aArgs = uno::Sequence< uno::Any >( 3 );
- aArgs[ 0 ] <<= xWorkbook;
- aArgs[ 1 ] <<= mxModel;
- aArgs[ 2 ] <<= ::rtl::OUString( aSheetName );
- uno::Reference< uno::XInterface > xWorksheet( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Worksheet", aArgs ), uno::UNO_SET_THROW );
- return uno::Any( xWorksheet );
+ SCTAB nTab = lclGetTabFromArgs( rArgs, nIndex );
+ return uno::Any( excel::getUnoSheetModuleObj( mxModel, nTab ) );
}
uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
- uno::Reference< table::XCellRange > xRange = getXSomethingFromArgs< table::XCellRange >( rArgs, nIndex );
- if ( !xRanges.is() && !xRange.is() )
- throw lang::IllegalArgumentException();
+ // it is possible to pass an existing VBA Range object
+ uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
+ if( !xVbaRange.is() )
+ {
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
+ uno::Reference< table::XCellRange > xRange = getXSomethingFromArgs< table::XCellRange >( rArgs, nIndex );
+ if ( !xRanges.is() && !xRange.is() )
+ throw lang::IllegalArgumentException();
- uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); // dummy parent
- if ( xRanges.is() )
- aArgs[ 1 ] <<= xRanges;
- else
- aArgs[ 1 ] <<= xRange;
- uno::Reference< uno::XInterface > xVbaRange( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Range", aArgs ), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs( 2 );
+ if ( xRanges.is() )
+ {
+ aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xRanges );
+ aArgs[ 1 ] <<= xRanges;
+ }
+ else
+ {
+ aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xRange );
+ aArgs[ 1 ] <<= xRange;
+ }
+ xVbaRange.set( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Range", aArgs ), uno::UNO_QUERY_THROW );
+ }
return uno::Any( xVbaRange );
}
uno::Any ScVbaEventsHelper::createHyperlink( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
+ uno::Reference< table::XCell > xCell = getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); // dummy parent
- aArgs[ 1 ] <<= getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
+ aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xCell );
+ aArgs[ 1 ] <<= xCell;
uno::Reference< uno::XInterface > xHyperlink( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Hyperlink", aArgs ), uno::UNO_SET_THROW );
return uno::Any( xHyperlink );
}
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index f0c73dd88d7f..f299afd7ac6c 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -34,8 +34,6 @@
#include "excelvbahelper.hxx"
#include "rangelst.hxx"
-namespace ooo { namespace vba { namespace excel { class XApplication; } } }
-
class ScVbaEventsListener;
// ============================================================================
@@ -52,16 +50,12 @@ public:
virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) throw (css::uno::RuntimeException);
protected:
- virtual bool implEventsEnabled() throw (css::uno::RuntimeException);
virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException);
virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException);
virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException);
private:
- /** Extracts a sheet index from the first element of the passed sequence. The
- element may be an integer, or a Calc range or ranges object. */
- static SCTAB getTabFromArgs( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException);
/** Checks if selection has been changed compared to selection of last call.
@return true, if the selection has been changed. */
bool isSelectionChanged( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
@@ -76,11 +70,10 @@ private:
css::uno::Any createWindow() const throw (css::uno::RuntimeException);
private:
- mutable css::uno::WeakReference< ov::excel::XApplication > mxApplication;
::rtl::Reference< ScVbaEventsListener > mxListener;
+ css::uno::Any maOldSelection;
ScDocShell* mpDocShell;
ScDocument* mpDoc;
- ScRangeList maOldSelection;
bool mbOpened;
};
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index fcb561e2d414..1c5e7382c926 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -103,7 +103,7 @@ ScVbaFileDialog::Show( ) throw (::com::sun::star::uno::RuntimeException)
xFilePicker->setMultiSelectionMode(sal_True);
if ( xFilePicker->execute() )
{
- sal_Bool bUseXFilePicker2 = sal_False;
+ sal_Bool bUseXFilePicker2 = false;
Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
if (xServiceInfo.is())
{
diff --git a/sc/source/ui/vba/vbafiledialogselecteditems.cxx b/sc/source/ui/vba/vbafiledialogselecteditems.cxx
index d8ebc937b489..547841a2c987 100644
--- a/sc/source/ui/vba/vbafiledialogselecteditems.cxx
+++ b/sc/source/ui/vba/vbafiledialogselecteditems.cxx
@@ -139,7 +139,7 @@ throw (uno::RuntimeException)
{
return sal_True;
}
- return sal_False;
+ return false;
}
uno::Any SAL_CALL
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 68ade5207674..216b0b7232c4 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -104,7 +104,7 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio
xCell.set( xCellRange->getCellByPosition( 0,0 ) );
uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- sal_Bool bValue = sal_False;
+ sal_Bool bValue = false;
aValue >>= bValue;
sal_Int16 nValue = NORMAL;
sal_Int8 nValue2 = NORMALHEIGHT;
@@ -176,7 +176,7 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException
xCell.set( xCellRange->getCellByPosition( 0,0 ) );
uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell );
- sal_Bool bValue = sal_False;
+ sal_Bool bValue = false;
aValue >>= bValue;
sal_Int16 nValue = NORMAL;
sal_Int8 nValue2 = NORMALHEIGHT;
@@ -230,7 +230,7 @@ uno::Any SAL_CALL
ScVbaFont::getSize() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getSize();
}
@@ -257,7 +257,7 @@ uno::Any SAL_CALL
ScVbaFont::getColorIndex() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getColorIndex();
}
@@ -304,8 +304,8 @@ ScVbaFont::getStandardFont() throw ( uno::RuntimeException )
void SAL_CALL
ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException )
{
- sal_Bool bBold = sal_False;
- sal_Bool bItalic = sal_False;
+ sal_Bool bBold = false;
+ sal_Bool bItalic = false;
rtl::OUString aStyles;
aValue >>= aStyles;
@@ -337,7 +337,7 @@ uno::Any SAL_CALL
ScVbaFont::getFontStyle() throw ( uno::RuntimeException )
{
rtl::OUStringBuffer aStyles;
- sal_Bool bValue = sal_False;
+ sal_Bool bValue = false;
getBold() >>= bValue;
if( bValue )
aStyles.appendAscii("Bold");
@@ -356,7 +356,7 @@ uno::Any SAL_CALL
ScVbaFont::getBold() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getBold();
}
@@ -399,7 +399,7 @@ uno::Any SAL_CALL
ScVbaFont::getUnderline() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
sal_Int32 nValue = awt::FontUnderline::NONE;
@@ -426,7 +426,7 @@ uno::Any SAL_CALL
ScVbaFont::getStrikethrough() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getStrikethrough();
}
@@ -435,7 +435,7 @@ uno::Any SAL_CALL
ScVbaFont::getShadow() throw (uno::RuntimeException)
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getShadow();
}
@@ -444,7 +444,7 @@ uno::Any SAL_CALL
ScVbaFont::getItalic() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getItalic();
@@ -454,7 +454,7 @@ uno::Any SAL_CALL
ScVbaFont::getName() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return ScVbaFont_BASE::getName();
}
@@ -477,7 +477,7 @@ uno::Any SAL_CALL
ScVbaFont::getOutlineFont() throw (uno::RuntimeException)
{
if ( GetDataSet() )
- if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, TRUE, NULL) == SFX_ITEM_DONTCARE )
+ if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, sal_True, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) );
}
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index a493bac28e05..853ddaff2484 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star;
#define LOCALE "Locale"
template< typename Ifc1 >
-ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False )
+ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( false )
{
try
{
@@ -534,7 +534,7 @@ ScVbaFormat<Ifc1>::setLocked( const uno::Any& _aLocked ) throw (script::BasicErr
{
try
{
- sal_Bool bIsLocked = sal_False;
+ sal_Bool bIsLocked = false;
if ( !( _aLocked >>= bIsLocked ) )
throw uno::RuntimeException();
util::CellProtection aCellProtection;
@@ -555,7 +555,7 @@ ScVbaFormat<Ifc1>::setFormulaHidden( const uno::Any& FormulaHidden ) throw (scri
{
try
{
- sal_Bool bIsFormulaHidden = sal_False;
+ sal_Bool bIsFormulaHidden = false;
FormulaHidden >>= bIsFormulaHidden;
util::CellProtection aCellProtection;
rtl::OUString sCellProt( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLPRO ) );
@@ -583,8 +583,8 @@ ScVbaFormat<Ifc1>::getLocked( ) throw (script::BasicErrorException, uno::Runtim
SfxItemSet* pDataSet = getCurrentDataSet();
if ( pDataSet )
{
- const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, TRUE);
- SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, TRUE, NULL);
+ const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, sal_True);
+ SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, sal_True, NULL);
if(eState != SFX_ITEM_DONTCARE)
aCellProtection = uno::makeAny(rProtAttr.GetProtection());
}
@@ -616,8 +616,8 @@ ScVbaFormat<Ifc1>::getFormulaHidden( ) throw (script::BasicErrorException, uno:
SfxItemSet* pDataSet = getCurrentDataSet();
if ( pDataSet )
{
- const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, TRUE);
- SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, TRUE, NULL);
+ const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, sal_True);
+ SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, sal_True, NULL);
if(eState != SFX_ITEM_DONTCARE)
aBoolRet = uno::makeAny(rProtAttr.GetHideFormula());
}
diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx
index deed22ab287e..9874a44c2618 100644
--- a/sc/source/ui/vba/vbaformatcondition.cxx
+++ b/sc/source/ui/vba/vbaformatcondition.cxx
@@ -63,7 +63,7 @@ ScVbaFormatCondition::Modify( ::sal_Int32 _nType, const uno::Any& _aOperator, co
try
{
ScVbaFormatConditions* pFormatConditions = lcl_getScVbaFormatConditionsPtr( moFormatConditions );
- pFormatConditions->removeFormatCondition(msStyleName, sal_False);
+ pFormatConditions->removeFormatCondition(msStyleName, false);
pFormatConditions->Add(_nType, _aOperator, _aFormula1, _aFormula2, mxStyle);
}
catch (uno::Exception& )
diff --git a/sc/source/ui/vba/vbafoundfiles.cxx b/sc/source/ui/vba/vbafoundfiles.cxx
index 9d3af947e1dd..efbddd3451b1 100644
--- a/sc/source/ui/vba/vbafoundfiles.cxx
+++ b/sc/source/ui/vba/vbafoundfiles.cxx
@@ -83,7 +83,7 @@ sal_Bool SAL_CALL VbaFoundFilesEnum::hasMoreElements() throw (css::uno::RuntimeE
{
return sal_True;
}
- return sal_False;
+ return false;
}
css::uno::Any SAL_CALL VbaFoundFilesEnum::nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index 8178608eb3af..adc7b2493b88 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -131,7 +131,7 @@ private:
bool getReplaceCellsWarning() throw ( uno::RuntimeException )
{
- sal_Bool res = sal_False;
+ sal_Bool res = false;
getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res;
return ( res == sal_True );
}
@@ -161,7 +161,7 @@ public:
}
};
-void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall)
+void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nSlot, SfxCallMode nCall)
{
ScTabViewShell* pViewShell = getBestViewShell( xModel );
SfxViewFrame* pViewFrame = NULL;
@@ -203,13 +203,13 @@ implnCut()
{
ScTabViewShell* pViewShell = getCurrentBestViewShell();
if ( pViewShell )
- pViewShell->CutToClip( NULL, TRUE );
+ pViewShell->CutToClip( NULL, sal_True );
}
-void implnPasteSpecial(USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
+void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
{
PasteCellsWarningReseter resetWarningBox;
- sal_Bool bAsLink(sal_False), bOtherDoc(sal_False);
+ sal_Bool bAsLink(false), bOtherDoc(false);
InsCellCmd eMoveMode = INS_NONE;
ScTabViewShell* pTabViewShell = ScTabViewShell::GetActiveViewShell();
@@ -232,7 +232,7 @@ void implnPasteSpecial(USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_B
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, TRUE );
+ eMoveMode, IDF_NONE, sal_True );
pTabViewShell->CellContentChanged();
}
}
@@ -271,7 +271,7 @@ getCurrentDocument() throw (uno::RuntimeException)
if ( pCompVar )
{
aModel = sbxToUnoValue( pCompVar );
- if ( sal_False == ( aModel >>= xModel ) ||
+ if ( false == ( aModel >>= xModel ) ||
!xModel.is() )
{
// trying last gasp try the current component
@@ -394,8 +394,8 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
sal_Int16 nCopies = 1;
- sal_Bool bPreview = sal_False;
- sal_Bool bCollate = sal_False;
+ sal_Bool bPreview = false;
+ sal_Bool bCollate = false;
sal_Bool bSelection = bUseSelection;
From >>= nFrom;
To >>= nTo;
@@ -444,7 +444,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
}
SfxBoolItem sfxSelection( SID_SELECTION, bSelection );
aArgs.Put( sfxSelection, sfxSelection.Which() );
- SfxBoolItem sfxAsync( SID_ASYNCHRON, sal_False );
+ SfxBoolItem sfxAsync( SID_ASYNCHRON, false );
aArgs.Put( sfxAsync, sfxAsync.Which() );
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
@@ -461,7 +461,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
}
}
else
- pDispatcher->Execute( (USHORT)SID_PRINTDOC, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs );
+ pDispatcher->Execute( (sal_uInt16)SID_PRINTDOC, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs );
}
}
@@ -491,7 +491,7 @@ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeEx
{
case uno::TypeClass_BOOLEAN:
{
- sal_Bool bBool = sal_False;
+ sal_Bool bBool = false;
pvargItem >>= bBool;
sString = rtl::OUString::valueOf( bBool );
break;
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index 2f3c5703203f..0a8f8463e390 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -100,7 +100,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch
// insert the text field into the document
xText->setString( OUString() );
uno::Reference< text::XTextRange > xRange( xText->createTextCursor(), uno::UNO_QUERY_THROW );
- xText->insertTextContent( xRange, xUrlField, sal_False );
+ xText->insertTextContent( xRange, xUrlField, false );
}
else
{
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 8379ebafcbc4..1e104e7ff5f4 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -229,7 +229,7 @@ uno::Reference< container::XEnumeration >
ScVbaNames::createEnumeration() throw (uno::RuntimeException)
{
uno::Reference< container::XEnumerationAccess > xEnumAccess( mxNames, uno::UNO_QUERY_THROW );
- return new NamesEnumeration( this, mxContext, xEnumAccess->createEnumeration(), mxModel , mxNames );
+ return new NamesEnumeration( getParent(), mxContext, xEnumAccess->createEnumeration(), mxModel , mxNames );
}
uno::Any
diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx
index 8c28aada76f4..fa75e96f6954 100644
--- a/sc/source/ui/vba/vbapagebreak.cxx
+++ b/sc/source/ui/vba/vbapagebreak.cxx
@@ -46,7 +46,7 @@ template< typename Ifc1 >
sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException)
{
uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )));
- sal_Bool hasPageBreak = sal_False;
+ sal_Bool hasPageBreak = false;
aValue >>= hasPageBreak;
if( !hasPageBreak )
@@ -70,7 +70,7 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException)
if( type == excel::XlPageBreak::xlPageBreakNone )
{
- mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
+ mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(false));
return;
}
@@ -78,13 +78,13 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException)
if( type == excel::XlPageBreak::xlPageBreakManual )
maTablePageBreakData.ManualBreak = sal_True;
else
- maTablePageBreakData.ManualBreak = sal_False;
+ maTablePageBreakData.ManualBreak = false;
}
template< typename Ifc1 >
void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException)
{
- mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False));
+ mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(false));
}
template< typename Ifc1 >
diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index d8a574d5837d..18d785924c8c 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -205,7 +205,7 @@ public:
ScVbaHPageBreaks::ScVbaHPageBreaks( const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak) throw (uno::RuntimeException):
- ScVbaHPageBreaks_BASE( xParent,xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, sal_False )),
+ ScVbaHPageBreaks_BASE( xParent,xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, false )),
mxSheetPageBreak( xSheetPageBreak )
{
}
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index f03ee70b9231..f01e06a64a50 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -81,7 +81,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeEx
if( nCount )
{
ScAddress::Details aDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
ScRangeList aRangeList;
for( sal_Int32 i=0; i<nCount; i++ )
@@ -153,7 +153,7 @@ uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeEx
void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
{
- USHORT scaleToPageY = 0;
+ sal_uInt16 scaleToPageY = 0;
try
{
sal_Bool aValue;
@@ -176,10 +176,10 @@ uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeEx
void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
{
- USHORT scaleToPageX = 0;
+ sal_uInt16 scaleToPageX = 0;
try
{
- sal_Bool aValue = sal_False;
+ sal_Bool aValue = false;
if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
{
fitToPagesWide >>= scaleToPageX;
@@ -199,12 +199,12 @@ uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
{
- USHORT pageScale = 0;
+ sal_uInt16 pageScale = 0;
try
{
if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
{
- sal_Bool aValue = sal_False;
+ sal_Bool aValue = false;
zoom >>= aValue;
if( aValue )
{
@@ -221,7 +221,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru
}
// these only exist in S08
- USHORT nScale = 0;
+ sal_uInt16 nScale = 0;
mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
@@ -463,7 +463,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
- sal_Bool bPrintDownFirst = sal_False;
+ sal_Bool bPrintDownFirst = false;
aValue >>= bPrintDownFirst;
if( !bPrintDownFirst )
order = excel::XlOrder::xlOverThenDown;
@@ -483,7 +483,7 @@ void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::Runtim
case excel::XlOrder::xlDownThenOver:
break;
case excel::XlOrder::xlOverThenDown:
- bOrder = sal_False;
+ bOrder = false;
break;
default:
DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
@@ -538,7 +538,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) thr
sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::RuntimeException)
{
- sal_Bool centerVertically = sal_False;
+ sal_Bool centerVertically = false;
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
@@ -563,7 +563,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) th
sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::RuntimeException)
{
- sal_Bool centerHorizontally = sal_False;
+ sal_Bool centerHorizontally = false;
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
@@ -588,7 +588,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally
sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
{
- sal_Bool printHeadings = sal_False;
+ sal_Bool printHeadings = false;
try
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
@@ -691,7 +691,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getPaperSize() throw (css::uno::RuntimeExcept
{
uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")));
aValue >>= size;
- ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, TRUE);
+ ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, true);
}
catch( uno::Exception& )
{
diff --git a/sc/source/ui/vba/vbaquerytable.cxx b/sc/source/ui/vba/vbaquerytable.cxx
index 305c14262d3a..159c7b75adf2 100644
--- a/sc/source/ui/vba/vbaquerytable.cxx
+++ b/sc/source/ui/vba/vbaquerytable.cxx
@@ -67,9 +67,9 @@ ScVbaQueryTable::Refresh( const ::com::sun::star::uno::Any& /*aBackgroundQuery*/
//Get link info
sfx2::LinkManager *pLinkMng = m_pDocument->GetLinkManager();
const ::sfx2::SvBaseLinks &rLinks = pLinkMng->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 3dd34ca7854e..af6336eb39ea 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -25,6 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
+#include "vbarange.hxx"
+
#include <vbahelper/helperdecl.hxx>
#include <comphelper/unwrapargs.hxx>
@@ -32,6 +35,8 @@
#include <sfx2/objsh.hxx>
#include <com/sun/star/script/ArrayWrapper.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
#include <com/sun/star/sheet/XGoalSeek.hpp>
@@ -147,7 +152,7 @@
#include <unonames.hxx>
#include <tools/stream.hxx>
-#include "vbarange.hxx"
+#include "vbaapplication.hxx"
#include "vbafont.hxx"
#include "vbacomment.hxx"
#include "vbainterior.hxx"
@@ -192,6 +197,9 @@ using namespace ::ooo::vba;
using namespace ::com::sun::star;
using ::std::vector;
+// difference between VBA and file format width, in character units
+const double fExtraWidth = 182.0 / 256.0;
+
// * 1 point = 1/72 inch = 20 twips
// * 1 inch = 72 points = 1440 twips
// * 1 cm = 567 twips
@@ -199,13 +207,13 @@ double lcl_hmmToPoints( double nVal ) { return ( (double)((nVal /1000 ) * 567 )
static const sal_Int16 supportedIndexTable[] = { excel::XlBordersIndex::xlEdgeLeft, excel::XlBordersIndex::xlEdgeTop, excel::XlBordersIndex::xlEdgeBottom, excel::XlBordersIndex::xlEdgeRight, excel::XlBordersIndex::xlDiagonalDown, excel::XlBordersIndex::xlDiagonalUp, excel::XlBordersIndex::xlInsideVertical, excel::XlBordersIndex::xlInsideHorizontal };
-USHORT lcl_pointsToTwips( double nVal )
+sal_uInt16 lcl_pointsToTwips( double nVal )
{
nVal = nVal * static_cast<double>(20);
short nTwips = static_cast<short>(nVal);
return nTwips;
}
-double lcl_TwipsToPoints( USHORT nVal )
+double lcl_TwipsToPoints( sal_uInt16 nVal )
{
double nPoints = nVal;
return nPoints / 20;
@@ -279,6 +287,26 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
return pDataSet;
}
+void ScVbaRange::fireChangeEvent()
+{
+ if( ScVbaApplication::getDocumentEventsEnabled() )
+ {
+ if( ScDocument* pDoc = getScDocument() )
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVBAEvents = pDoc->GetVbaEventProcessor();
+ if( xVBAEvents.is() ) try
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= uno::Reference< excel::XRange >( this );
+ xVBAEvents->processVbaEvent( script::vba::VBAEventId::WORKSHEET_CHANGE, aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ }
+}
+
class SingleRangeEnumeration : public EnumerationHelper_BASE
{
uno::Reference< XHelperInterface > m_xParent;
@@ -486,7 +514,7 @@ public:
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
- SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, TRUE, NULL);
+ SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, true, NULL);
// one of the cells in the range is not like the other ;-)
// so return a zero length format to indicate that
if ( eState == SFX_ITEM_DONTCARE )
@@ -509,7 +537,7 @@ public:
return nType;
}
- bool setNumberFormat( const rtl::OUString& rFormat )
+ bool setNumberFormat( const rtl::OUString& rFormat )
{
lang::Locale aLocale;
uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
@@ -517,7 +545,12 @@ public:
sal_Int32 nNewIndex = mxFormats->queryKey(rFormat, aLocale, false );
if ( nNewIndex == -1 ) // format not defined
{
- nNewIndex = mxFormats->addNew( rFormat, aLocale );
+ lang::Locale aLocale;
+ uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
+ xNumProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Locale" ) ) ) >>= aLocale;
+ nNewIndex = mxFormats->queryKey( rFormat, aLocale, false );
+ if ( nNewIndex == -1 ) // format not defined
+ nNewIndex = mxFormats->addNew( rFormat, aLocale );
}
mxRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat") ), uno::makeAny( nNewIndex ) );
return true;
@@ -681,7 +714,7 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab
{
case uno::TypeClass_BOOLEAN:
{
- sal_Bool bState = sal_False;
+ sal_Bool bState = false;
if ( aValue >>= bState )
{
uno::Reference< table::XCellRange > xRange( xCell, uno::UNO_QUERY_THROW );
@@ -699,8 +732,26 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab
rtl::OUString aString;
if ( aValue >>= aString )
{
- uno::Reference< text::XTextRange > xTextRange( xCell, uno::UNO_QUERY_THROW );
- xTextRange->setString( aString );
+ // The required behavior for a string value is:
+ // 1. If the first character is a single quote, use the rest as a string cell, regardless of the cell's number format.
+ // 2. Otherwise, if the cell's number format is "text", use the string value as a string cell.
+ // 3. Otherwise, parse the string value in English locale, and apply a corresponding number format with the cell's locale
+ // if the cell's number format was "General".
+ // Case 1 is handled here, the rest in ScCellObj::InputEnglishString
+
+ if ( aString.toChar() == '\'' ) // case 1 - handle with XTextRange
+ {
+ rtl::OUString aRemainder( aString.copy(1) ); // strip the quote
+ uno::Reference< text::XTextRange > xTextRange( xCell, uno::UNO_QUERY_THROW );
+ xTextRange->setString( aRemainder );
+ }
+ else
+ {
+ // call implementation method InputEnglishString
+ ScCellObj* pCellObj = dynamic_cast< ScCellObj* >( xCell.get() );
+ if ( pCellObj )
+ pCellObj->InputEnglishString( aString );
+ }
}
else
isExtracted = false;
@@ -760,7 +811,7 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference<
if ( sFormula.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("=TRUE()") ) ) )
aValue <<= sal_True;
else if ( sFormula.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("=FALSE()") ) ) )
- aValue <<= sal_False;
+ aValue <<= false;
else
{
uno::Reference< beans::XPropertySet > xProp( xCell, uno::UNO_QUERY_THROW );
@@ -1076,7 +1127,7 @@ public:
};
bool
-getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 )
+getCellRangesForAddress( sal_uInt16& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 )
{
ScDocument* pDoc = NULL;
@@ -1084,7 +1135,7 @@ getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDoc
{
pDoc = pDocSh->GetDocument();
String aString(sAddress);
- USHORT nMask = SCA_VALID;
+ sal_uInt16 nMask = SCA_VALID;
rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, cDelimiter );
if ( rResFlags & SCA_VALID )
{
@@ -1149,7 +1200,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
aChar = ';';
}
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( !getCellRangesForAddress( nFlags, sAddress, pDocSh, aCellRanges, eConv, aChar ) )
return false;
@@ -1252,7 +1303,7 @@ void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange,
{
uno::Reference< util::XMergeable > xMerge( lclExpandToMerged( rxCellRange, true ), uno::UNO_QUERY_THROW );
// Calc cannot merge over merged ranges, always unmerge first
- xMerge->merge( sal_False );
+ xMerge->merge( false );
if( bMerge )
{
// clear all contents of the covered cells (not the top-left cell)
@@ -1399,7 +1450,7 @@ void lcl_NotifyRangeChanges( const uno::Reference< frame::XModel >& xModel, ScCe
}
ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
- uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), excel::GetModelFromRange( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
+ uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), excel::GetModelFromRange( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( false ), mbIsColumns( false )
{
mxRange.set( mxPropertySet, uno::UNO_QUERY );
mxRanges.set( mxPropertySet, uno::UNO_QUERY );
@@ -1533,7 +1584,7 @@ ScVbaRange::getValue( ValueGetter& valueGetter) throw (uno::RuntimeException)
// multi cell range ( return array )
Dim2ArrayValueGetter arrayGetter( nRowCount, nColCount, valueGetter );
visitArray( arrayGetter );
- return uno::makeAny( script::ArrayWrapper( sal_False, arrayGetter.getValue() ) );
+ return uno::makeAny( script::ArrayWrapper( false, arrayGetter.getValue() ) );
}
uno::Any SAL_CALL
@@ -1591,6 +1642,7 @@ ScVbaRange::setValue( const uno::Any &aValue, ValueSetter& valueSetter ) thro
{
visitArray( valueSetter );
}
+ if( bFireEvent ) fireChangeEvent();
}
void SAL_CALL
@@ -1611,7 +1663,7 @@ ScVbaRange::setValue( const uno::Any &aValue ) throw (uno::RuntimeException)
lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
-void
+void SAL_CALL
ScVbaRange::Clear() throw (uno::RuntimeException)
{
using namespace ::com::sun::star::sheet::CellFlags;
@@ -1624,7 +1676,7 @@ ScVbaRange::Clear() throw (uno::RuntimeException)
//helper ClearContent
void
-ScVbaRange::ClearContents( sal_Int32 nFlags ) throw (uno::RuntimeException)
+ScVbaRange::ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (uno::RuntimeException)
{
// #TODO code within the test below "if ( m_Areas.... " can be removed
// Test is performed only because m_xRange is NOT set to be
@@ -1640,20 +1692,24 @@ ScVbaRange::ClearContents( sal_Int32 nFlags ) throw (uno::RuntimeException)
if ( pRange )
pRange->ClearContents( nFlags );
}
+ // fire change event for the entire range list
+ if( bFireEvent ) fireChangeEvent();
return;
}
uno::Reference< sheet::XSheetOperation > xSheetOperation(mxRange, uno::UNO_QUERY_THROW);
xSheetOperation->clearContents( nFlags );
+ if( bFireEvent ) fireChangeEvent();
}
-void
+
+void SAL_CALL
ScVbaRange::ClearComments() throw (uno::RuntimeException)
{
- ClearContents( sheet::CellFlags::ANNOTATION );
+ ClearContents( sheet::CellFlags::ANNOTATION, false );
}
-void
+void SAL_CALL
ScVbaRange::ClearContents() throw (uno::RuntimeException)
{
sal_Int32 nClearFlags = ( sheet::CellFlags::VALUE |
@@ -1665,7 +1721,7 @@ ScVbaRange::ClearContents() throw (uno::RuntimeException)
lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
-void
+void SAL_CALL
ScVbaRange::ClearFormats() throw (uno::RuntimeException)
{
//FIXME: need to check if we need to combine sheet::CellFlags::FORMATTED
@@ -1677,7 +1733,7 @@ ScVbaRange::ClearFormats() throw (uno::RuntimeException)
}
void
-ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::Grammar eGram ) throw (uno::RuntimeException)
+ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::Grammar eGram, bool bFireEvent ) throw (uno::RuntimeException)
{
// If this is a multiple selection apply setFormula over all areas
if ( m_Areas->getCount() > 1 )
@@ -1727,7 +1783,7 @@ ScVbaRange::getFormulaR1C1() throw (::com::sun::star::uno::RuntimeException)
void
ScVbaRange::setFormulaR1C1(const uno::Any& rFormula ) throw (uno::RuntimeException)
{
- setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
+ setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1, true );
}
uno::Any
@@ -1821,7 +1877,7 @@ ScVbaRange::HasFormula() throw (uno::RuntimeException)
ScCellRangesBase* pFormulaRanges = dynamic_cast< ScCellRangesBase * > ( xRanges.get() );
// check if there are no formula cell, return false
if ( pFormulaRanges->GetRangeList().empty() )
- return uno::makeAny(sal_False);
+ return uno::makeAny(false);
// chech if there are holes (where some cells are not formulas)
// or returned range is not equal to this range
@@ -2069,7 +2125,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
// force external to be false
// only first address should have the
// document and sheet specifications
- aExternalCopy = uno::makeAny(sal_False);
+ aExternalCopy = uno::makeAny(false);
}
sAddress += xRange->Address( RowAbsolute, ColumnAbsolute, ReferenceStyle, aExternalCopy, RelativeTo );
}
@@ -2084,7 +2140,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
if ( refStyle == excel::XlReferenceStyle::xlR1C1 )
dDetails = ScAddress::Details( formula::FormulaGrammar::CONV_XL_R1C1, 0, 0 );
}
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
ScDocShell* pDocShell = getScDocShell();
ScDocument* pDoc = pDocShell->GetDocument();
@@ -2092,8 +2148,8 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
String sRange;
- USHORT ROW_ABSOLUTE = ( SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE );
- USHORT COL_ABSOLUTE = ( SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE );
+ sal_uInt16 ROW_ABSOLUTE = ( SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE );
+ sal_uInt16 COL_ABSOLUTE = ( SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE );
// default
nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
if ( RowAbsolute.hasValue() )
@@ -2110,7 +2166,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
if ( !bVal )
nFlags &= ~COL_ABSOLUTE;
}
- sal_Bool bLocal = sal_False;
+ sal_Bool bLocal = false;
if ( External.hasValue() )
{
External >>= bLocal;
@@ -2165,6 +2221,18 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
return xRange->Cells( nRowIndex, nColumnIndex );
}
+ // Performance: Use a common helper method for ScVbaRange::Cells and ScVbaWorksheet::Cells,
+ // instead of creating a new ScVbaRange object in often-called ScVbaWorksheet::Cells
+ return CellsHelper( mxParent, mxContext, mxRange, nRowIndex, nColumnIndex );
+}
+
+// static
+uno::Reference< excel::XRange >
+ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
+ const uno::Reference< uno::XComponentContext >& xContext,
+ const uno::Reference< css::table::XCellRange >& xRange,
+ const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) throw(uno::RuntimeException)
+{
sal_Int32 nRow = 0, nColumn = 0;
sal_Bool bIsIndex = nRowIndex.hasValue();
@@ -2185,7 +2253,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
}
else if ( aRowIndexAny.hasValue() && !( aRowIndexAny >>= nRow ) )
{
- uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
uno::Any aConverted;
try
{
@@ -2205,7 +2273,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
{
ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
ScRange tmpRange;
- USHORT flags = tmpRange.ParseCols( sCol, excel::GetDocumentFromRange( mxRange ), dDetails );
+ sal_uInt16 flags = tmpRange.ParseCols( sCol, excel::GetDocumentFromRange( mxRange ), dDetails );
if ( ( flags & 0x200 ) != 0x200 )
throw uno::RuntimeException();
nColumn = tmpRange.aStart.Col() + 1;
@@ -2238,12 +2306,12 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
if( !bIsIndex && !bIsColumnIndex ) // .Cells
// #FIXE needs proper parent ( Worksheet )
- return uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, mxRange ) );
+ return uno::Reference< excel::XRange >( new ScVbaRange( xParent, xContext, xRange ) );
sal_Int32 nIndex = --nRow;
if( bIsIndex && !bIsColumnIndex ) // .Cells(n)
{
- uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, ::uno::UNO_QUERY_THROW);
+ uno::Reference< table::XColumnRowRange > xColumnRowRange(xRange, ::uno::UNO_QUERY_THROW);
sal_Int32 nColCount = xColumnRowRange->getColumns()->getCount();
if ( !nIndex || nIndex < 0 )
@@ -2305,7 +2373,7 @@ void setCursor( const SCCOL& nCol, const SCROW& nRow, const uno::Reference< fra
if ( bInSel )
pShell->SetCursor( nCol, nRow );
else
- pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, FALSE, FALSE, TRUE, FALSE );
+ pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, false, false, sal_True, false );
}
}
@@ -2682,7 +2750,7 @@ ScVbaRange::getWrapText() throw (script::BasicErrorException, uno::RuntimeExcept
SfxItemSet* pDataSet = getCurrentDataSet();
- SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, TRUE, NULL);
+ SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, true, NULL);
if ( eState == SFX_ITEM_DONTCARE )
return aNULL();
@@ -2822,10 +2890,10 @@ uno::Any ScVbaRange::getCellRange( const uno::Reference< excel::XRange >& rxRang
throw uno::RuntimeException();
}
-static USHORT
+static sal_uInt16
getPasteFlags (sal_Int32 Paste)
{
- USHORT nFlags = IDF_NONE;
+ sal_uInt16 nFlags = IDF_NONE;
switch (Paste) {
case excel::XlPasteType::xlPasteComments:
nFlags = IDF_NOTE;break;
@@ -2853,10 +2921,10 @@ getPasteFlags (sal_Int32 Paste)
return nFlags;
}
-static USHORT
+static sal_uInt16
getPasteFormulaBits( sal_Int32 Operation)
{
- USHORT nFormulaBits = PASTE_NOFUNC ;
+ sal_uInt16 nFormulaBits = PASTE_NOFUNC ;
switch (Operation)
{
case excel::XlPasteSpecialOperation::xlPasteSpecialOperationAdd:
@@ -2889,8 +2957,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
// set up defaults
sal_Int32 nPaste = excel::XlPasteType::xlPasteAll;
sal_Int32 nOperation = excel::XlPasteSpecialOperation::xlPasteSpecialOperationNone;
- sal_Bool bTranspose = sal_False;
- sal_Bool bSkipBlanks = sal_False;
+ sal_Bool bTranspose = false;
+ sal_Bool bSkipBlanks = false;
if ( Paste.hasValue() )
Paste >>= nPaste;
@@ -2901,8 +2969,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
if ( Transpose.hasValue() )
Transpose >>= bTranspose;
- USHORT nFlags = getPasteFlags(nPaste);
- USHORT nFormulaBits = getPasteFormulaBits(nOperation);
+ sal_uInt16 nFlags = getPasteFlags(nPaste);
+ sal_uInt16 nFormulaBits = getPasteFormulaBits(nOperation);
excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose);
}
@@ -3072,7 +3140,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
sal_Int16 nLook = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole;
sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
- sal_Bool bMatchCase = sal_False;
+ sal_Bool bMatchCase = false;
uno::Reference< util::XReplaceable > xReplace( mxRange, uno::UNO_QUERY );
if ( xReplace.is() )
{
@@ -3086,9 +3154,9 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
{
// sets SearchWords ( true is Cell match )
nLook = ::comphelper::getINT16( LookAt );
- sal_Bool bSearchWords = sal_False;
+ sal_Bool bSearchWords = false;
if ( nLook == excel::XlLookAt::xlPart )
- bSearchWords = sal_False;
+ bSearchWords = false;
else if ( nLook == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
@@ -3102,9 +3170,9 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
if ( SearchOrder.hasValue() )
{
nSearchOrder = ::comphelper::getINT16( SearchOrder );
- sal_Bool bSearchByRow = sal_False;
+ sal_Bool bSearchByRow = false;
if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
- bSearchByRow = sal_False;
+ bSearchByRow = false;
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
@@ -3222,9 +3290,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if ( LookAt.hasValue() )
{
nLookAt = ::comphelper::getINT16( LookAt );
- sal_Bool bSearchWords = sal_False;
+ sal_Bool bSearchWords = false;
if ( nLookAt == excel::XlLookAt::xlPart )
- bSearchWords = sal_False;
+ bSearchWords = false;
else if ( nLookAt == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
@@ -3237,9 +3305,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if ( SearchOrder.hasValue() )
{
nSearchOrder = ::comphelper::getINT16( SearchOrder );
- sal_Bool bSearchByRow = sal_False;
+ sal_Bool bSearchByRow = false;
if ( nSearchOrder == excel::XlSearchOrder::xlByColumns )
- bSearchByRow = sal_False;
+ bSearchByRow = false;
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
@@ -3255,9 +3323,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
sal_Int32 nSearchDirection = 0;
if( SearchDirection >>= nSearchDirection )
{
- sal_Bool bSearchBackwards = sal_False;
+ sal_Bool bSearchBackwards = false;
if ( nSearchDirection == excel::XlSearchDirection::xlNext )
- bSearchBackwards = sal_False;
+ bSearchBackwards = false;
else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
bSearchBackwards = sal_True;
else
@@ -3268,7 +3336,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
}
// MatchCase
- sal_Bool bMatchCase = sal_False;
+ sal_Bool bMatchCase = false;
if ( MatchCase.hasValue() )
{
// SearchCaseSensitive
@@ -3375,7 +3443,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
if ( nOrder == excel::XlSortOrder::xlAscending )
aTableField.IsAscending = sal_True;
else
- aTableField.IsAscending = sal_False;
+ aTableField.IsAscending = false;
}
else
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal Key param" ) ), uno::Reference< uno::XInterface >() );
@@ -3391,7 +3459,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal;
- sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;;
+ sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;
sal_Int16 nDataOption3 = excel::XlSortDataOption::xlSortNormal;
ScDocument* pDoc = getScDocument();
@@ -3436,13 +3504,13 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
nOrientation = ::comphelper::getINT16( Orientation );
// persist new option to be next calls default
if ( nOrientation == excel::XlSortOrientation::xlSortRows )
- aSortParam.bByRow = FALSE;
+ aSortParam.bByRow = false;
else
- aSortParam.bByRow = TRUE;
+ aSortParam.bByRow = sal_True;
}
- sal_Bool bIsSortColumns=sal_False; // sort by row
+ sal_Bool bIsSortColumns=false; // sort by row
if ( nOrientation == excel::XlSortOrientation::xlSortRows )
bIsSortColumns = sal_True;
@@ -3450,7 +3518,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
#ifdef VBA_OOBUILD_HACK
nHeader = aSortParam.nCompatHeader;
#endif
- sal_Bool bContainsHeader = sal_False;
+ sal_Bool bContainsHeader = false;
if ( Header.hasValue() )
{
@@ -3498,26 +3566,26 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
{
nOrder1 = ::comphelper::getINT16(Order1);
if ( nOrder1 == excel::XlSortOrder::xlAscending )
- aSortParam.bAscending[0] = TRUE;
+ aSortParam.bAscending[0] = true;
else
- aSortParam.bAscending[0] = FALSE;
+ aSortParam.bAscending[0] = false;
}
if ( Order2.hasValue() )
{
nOrder2 = ::comphelper::getINT16(Order2);
if ( nOrder2 == excel::XlSortOrder::xlAscending )
- aSortParam.bAscending[1] = TRUE;
+ aSortParam.bAscending[1] = true;
else
- aSortParam.bAscending[1] = FALSE;
+ aSortParam.bAscending[1] = false;
}
if ( Order3.hasValue() )
{
nOrder3 = ::comphelper::getINT16(Order3);
if ( nOrder3 == excel::XlSortOrder::xlAscending )
- aSortParam.bAscending[2] = TRUE;
+ aSortParam.bAscending[2] = true;
else
- aSortParam.bAscending[2] = FALSE;
+ aSortParam.bAscending[2] = false;
}
uno::Reference< table::XCellRange > xKey1;
@@ -3696,7 +3764,7 @@ ScVbaRange::hasElements() throw (uno::RuntimeException)
if ( xColumnRowRange->getRows()->getCount() ||
xColumnRowRange->getColumns()->getCount() )
return sal_True;
- return sal_False;
+ return false;
}
// XEnumerationAccess
@@ -3740,7 +3808,7 @@ double
ScVbaRange::getCalcColWidth( const table::CellRangeAddress& rAddress) throw (uno::RuntimeException)
{
ScDocument* pDoc = getScDocument();
- USHORT nWidth = pDoc->GetOriginalWidth( static_cast< SCCOL >( rAddress.StartColumn ), static_cast< SCTAB >( rAddress.Sheet ) );
+ sal_uInt16 nWidth = pDoc->GetOriginalWidth( static_cast< SCCOL >( rAddress.StartColumn ), static_cast< SCTAB >( rAddress.Sheet ) );
double nPoints = lcl_TwipsToPoints( nWidth );
nPoints = lcl_Round2DecPlaces( nPoints );
return nPoints;
@@ -3750,7 +3818,7 @@ double
ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (uno::RuntimeException)
{
ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
- USHORT nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet );
+ sal_uInt16 nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet );
double nPoints = lcl_TwipsToPoints( nWidth );
nPoints = lcl_Round2DecPlaces( nPoints );
return nPoints;
@@ -3779,7 +3847,7 @@ double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) thro
double nPixelsPerMeter = xDevice->getInfo().PixelPerMeterX;
double nCharWidth = nCharPixelWidth / nPixelsPerMeter;
nCharWidth = nCharWidth * (double)56700;// in twips
- return lcl_TwipsToPoints( (USHORT)nCharWidth );
+ return lcl_TwipsToPoints( (sal_uInt16)nCharWidth );
}
uno::Any SAL_CALL
@@ -3797,24 +3865,24 @@ ScVbaRange::getColumnWidth() throw (uno::RuntimeException)
if ( pShell )
{
uno::Reference< frame::XModel > xModel = pShell->GetModel();
- double defaultCharWidth = getDefaultCharWidth( xModel );
+ double defaultCharWidth = getDefaultCharWidth( pShell );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
sal_Int32 nStartCol = thisAddress.StartColumn;
sal_Int32 nEndCol = thisAddress.EndColumn;
- USHORT nColTwips = 0;
+ sal_uInt16 nColTwips = 0;
for( sal_Int32 nCol = nStartCol ; nCol <= nEndCol; ++nCol )
{
thisAddress.StartColumn = nCol;
- USHORT nCurTwips = pShell->GetDocument()->GetOriginalWidth( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCTAB >( thisAddress.Sheet ) );
+ sal_uInt16 nCurTwips = pShell->GetDocument()->GetOriginalWidth( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCTAB >( thisAddress.Sheet ) );
if ( nCol == nStartCol )
nColTwips = nCurTwips;
if ( nColTwips != nCurTwips )
return aNULL();
}
- nColWidth = lcl_Round2DecPlaces( lcl_TwipsToPoints( nColTwips ) );
- if ( xModel.is() )
- nColWidth = nColWidth / defaultCharWidth;
+ nColWidth = lcl_TwipsToPoints( nColTwips );
+ if ( nColWidth != 0.0 )
+ nColWidth = ( nColWidth / defaultCharWidth ) - fExtraWidth;
}
nColWidth = lcl_Round2DecPlaces( nColWidth );
return uno::makeAny( nColWidth );
@@ -3846,17 +3914,16 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeEx
nColWidth = ( nColWidth * getDefaultCharWidth( xModel ) );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- USHORT nTwips = lcl_pointsToTwips( nColWidth );
+ sal_uInt16 nTwips = lcl_pointsToTwips( nColWidth );
ScDocFunc aFunc(*pDocShell);
SCCOLROW nColArr[2];
nColArr[0] = thisAddress.StartColumn;
nColArr[1] = thisAddress.EndColumn;
- aFunc.SetWidthOrHeight( TRUE, 1, nColArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
- nTwips, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( true, 1, nColArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
+ nTwips, true, true );
}
- }
}
uno::Any SAL_CALL
@@ -3946,7 +4013,7 @@ ScVbaRange::BorderAround( const css::uno::Any& LineStyle, const css::uno::Any& W
case excel::XlBordersIndex::xlDiagonalUp:
break;
default:
- return uno::makeAny( sal_False );
+ return uno::makeAny( false );
}
}
return uno::makeAny( sal_True );
@@ -3969,7 +4036,7 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException)
sal_Int32 nStartRow = thisAddress.StartRow;
sal_Int32 nEndRow = thisAddress.EndRow;
- USHORT nRowTwips = 0;
+ sal_uInt16 nRowTwips = 0;
// #TODO probably possible to use the SfxItemSet ( and see if
// SFX_ITEM_DONTCARE is set ) to improve performance
// #CHECKME looks like this is general behaviour not just row Range specific
@@ -3980,7 +4047,7 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException)
for ( sal_Int32 nRow = nStartRow ; nRow <= nEndRow; ++nRow )
{
thisAddress.StartRow = nRow;
- USHORT nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet );
+ sal_uInt16 nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet );
if ( nRow == nStartRow )
nRowTwips = nCurTwips;
if ( nRowTwips != nCurTwips )
@@ -4009,15 +4076,15 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) throw (uno::RuntimeExcepti
nHeight = lcl_Round2DecPlaces( nHeight );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- USHORT nTwips = lcl_pointsToTwips( nHeight );
+ sal_uInt16 nTwips = lcl_pointsToTwips( nHeight );
ScDocShell* pDocShell = excel::GetDocShellFromRange( mxRange );
ScDocFunc aFunc(*pDocShell);
SCCOLROW nRowArr[2];
nRowArr[0] = thisAddress.StartRow;
nRowArr[1] = thisAddress.EndRow;
- aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
- nTwips, TRUE, TRUE );
+ aFunc.SetWidthOrHeight( false, 1, nRowArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
+ nTwips, true, true );
}
uno::Any SAL_CALL
@@ -4029,10 +4096,10 @@ ScVbaRange::getPageBreak() throw (uno::RuntimeException)
{
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- BOOL bColumn = FALSE;
+ sal_Bool bColumn = false;
if (thisAddress.StartRow==0)
- bColumn = TRUE;
+ bColumn = true;
uno::Reference< frame::XModel > xModel = pShell->GetModel();
if ( xModel.is() )
@@ -4069,10 +4136,10 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
if ((thisAddress.StartColumn==0) && (thisAddress.StartRow==0))
return;
- BOOL bColumn = FALSE;
+ sal_Bool bColumn = false;
if (thisAddress.StartRow==0)
- bColumn = TRUE;
+ bColumn = true;
ScAddress aAddr( static_cast<SCCOL>(thisAddress.StartColumn), thisAddress.StartRow, thisAddress.Sheet );
uno::Reference< frame::XModel > xModel = pShell->GetModel();
@@ -4080,9 +4147,9 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti
{
ScTabViewShell* pViewShell = excel::getBestViewShell( xModel );
if ( nPageBreak == excel::XlPageBreak::xlPageBreakManual )
- pViewShell->InsertPageBreak( bColumn, TRUE, &aAddr);
+ pViewShell->InsertPageBreak( bColumn, sal_True, &aAddr);
else if ( nPageBreak == excel::XlPageBreak::xlPageBreakNone )
- pViewShell->DeletePageBreak( bColumn, TRUE, &aAddr);
+ pViewShell->DeletePageBreak( bColumn, sal_True, &aAddr);
}
}
}
@@ -4257,7 +4324,7 @@ ScDBData* lcl_GetDBData_Impl( ScDocShell* pDocShell, sal_Int16 nSheet )
ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection();
if (pNames)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (pNames->SearchName( sName , nPos ))
pRet = (*pNames)[nPos];
}
@@ -4273,7 +4340,7 @@ void lcl_SelectAll( ScDocShell* pDocShell, ScQueryParam& aParam )
if ( pViewData )
{
OSL_TRACE("Pushing out SelectAll query");
- pViewData->GetView()->Query( aParam, NULL, TRUE );
+ pViewData->GetView()->Query( aParam, NULL, sal_True );
}
}
}
@@ -4413,7 +4480,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
sal_Int16 nSheet = thisAddress.Sheet;
ScDocShell* pShell = getScDocShell();
- sal_Bool bHasAuto = sal_False;
+ sal_Bool bHasAuto = false;
rtl::OUString sAutofiltRangeName;
uno::Reference< sheet::XDatabaseRange > xDataBaseRange = excel::GetAutoFiltRange( pShell, nSheet, sAutofiltRangeName );
if ( xDataBaseRange.is() )
@@ -4446,6 +4513,20 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
{
RangeHelper multiCellRange( mxRange );
autoFiltAddress = multiCellRange.getCellRangeAddressable()->getRangeAddress();
+ // #163530# Filter box shows only entry of first row
+ ScDocument* pDocument = ( pShell ? pShell->GetDocument() : NULL );
+ if ( pDocument )
+ {
+ SCCOL nStartCol = autoFiltAddress.StartColumn;
+ SCROW nStartRow = autoFiltAddress.StartRow;
+ SCCOL nEndCol = autoFiltAddress.EndColumn;
+ SCROW nEndRow = autoFiltAddress.EndRow;
+ pDocument->GetDataArea( autoFiltAddress.Sheet, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, true );
+ autoFiltAddress.StartColumn = nStartCol;
+ autoFiltAddress.StartRow = nStartRow;
+ autoFiltAddress.EndColumn = nEndCol;
+ autoFiltAddress.EndRow = nEndRow;
+ }
}
uno::Reference< sheet::XDatabaseRanges > xDBRanges = excel::GetDataBaseRanges( pShell );
@@ -4467,10 +4548,10 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(sal_True) );
// set header
uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
- sal_Bool bHasColHeader = sal_False;
+ sal_Bool bHasColHeader = false;
ScDocument* pDoc = pShell ? pShell->GetDocument() : NULL;
- bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? sal_True : sal_False;
+ bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? sal_True : false;
xFiltProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader") ), uno::Any( bHasColHeader ) );
}
@@ -4483,12 +4564,12 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
VisibleDropDown >>= bVisible;
if ( bVisible == bHasAuto ) // dropdown is displayed/notdisplayed as required
- bVisible = sal_False;
+ bVisible = false;
sheet::FilterConnection nConn = sheet::FilterConnection_AND;
double nCriteria1 = 0;
bool bHasCritValue = Criteria1.hasValue();
- bool bCritHasNumericValue = sal_False; // not sure if a numeric criteria is possible
+ bool bCritHasNumericValue = false; // not sure if a numeric criteria is possible
if ( bHasCritValue )
bCritHasNumericValue = ( Criteria1 >>= nCriteria1 );
@@ -4608,7 +4689,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
{
uno::Reference< beans::XPropertySet > xProps;
lcl_setTableFieldsFromCriteria( sCriteria2, xProps, sTabFilts[1] );
- sTabFilts[1].IsNumeric = sal_False;
+ sTabFilts[1].IsNumeric = false;
}
}
else // numeric
@@ -4661,8 +4742,6 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
void SAL_CALL
ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (uno::RuntimeException)
{
- sal_Bool bCopyOrigin = sal_True;
- CopyOrigin >>= bCopyOrigin;
// It appears ( from the web ) that the undocumented CopyOrigin
// param should contain member of enum XlInsertFormatOrigin
// which can have values xlFormatFromLeftOrAbove or xlFormatFromRightOrBelow
@@ -4697,7 +4776,11 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (u
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
xCellRangeMove->insertCells( thisAddress, mode );
- if ( bCopyOrigin )
+
+ // Paste from clipboard only if the clipboard content was copied via VBA, and not already pasted via VBA again.
+ // "Insert" behavior should not depend on random clipboard content previously copied by the user.
+ ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
+ if ( pClipObj && pClipObj->GetUseInApi() )
{
// After the insert ( this range ) actually has moved
ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
@@ -4735,15 +4818,15 @@ ScVbaRange::Autofit() throw (uno::RuntimeException)
SCCOLROW nColArr[2];
nColArr[0] = thisAddress.StartColumn;
nColArr[1] = thisAddress.EndColumn;
- BOOL bDirection = TRUE;
+ sal_Bool bDirection = sal_True;
if ( mbIsRows )
{
- bDirection = FALSE;
+ bDirection = false;
nColArr[0] = thisAddress.StartRow;
nColArr[1] = thisAddress.EndRow;
}
aFunc.SetWidthOrHeight( bDirection, 1, nColArr, thisAddress.Sheet, SC_SIZE_OPTIMAL,
- 0, TRUE, TRUE );
+ 0, true, true );
}
}
@@ -4795,7 +4878,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set TextQualifier\n");
}
- sal_Bool bConsecutiveDelimiter = sal_False;
+ sal_Bool bConsecutiveDelimiter = false;
if( ConsecutiveDelimiter.hasValue() )
{
if( !( ConsecutiveDelimiter >>= bConsecutiveDelimiter ) )
@@ -4804,7 +4887,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set ConsecutiveDelimiter\n");
}
- sal_Bool bTab = sal_False;
+ sal_Bool bTab = false;
if( Tab.hasValue() && bDilimited )
{
if( !( Tab >>= bTab ) )
@@ -4813,7 +4896,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set Tab\n");
}
- sal_Bool bSemicolon = sal_False;
+ sal_Bool bSemicolon = false;
if( Semicolon.hasValue() && bDilimited )
{
if( !( Semicolon >>= bSemicolon ) )
@@ -4821,7 +4904,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Semicolon\n");
}
- sal_Bool bComma = sal_False;
+ sal_Bool bComma = false;
if( Comma.hasValue() && bDilimited )
{
if( !( Comma >>= bComma ) )
@@ -4829,7 +4912,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Comma\n");
}
- sal_Bool bSpace = sal_False;
+ sal_Bool bSpace = false;
if( Space.hasValue() && bDilimited )
{
if( !( Space >>= bSpace ) )
@@ -4837,7 +4920,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Space\n");
}
- sal_Bool bOther = sal_False;
+ sal_Bool bOther = false;
rtl::OUString sOtherChar;
if( Other.hasValue() && bDilimited )
{
@@ -4888,15 +4971,15 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
}
// Parse the value of parameter FieldInfo.
- USHORT nRealCount = 0;
+ sal_uInt16 nRealCount = 0;
xub_StrLen* pColumns = NULL;
- BYTE* pFormats = NULL;
+ sal_uInt8* pFormats = NULL;
if ( sFieldInfo.getLength() > 0 )
{
- USHORT nCount = sFieldInfo.getLength();
+ sal_uInt16 nCount = sFieldInfo.getLength();
pColumns = new xub_StrLen[nCount];
- pFormats = new BYTE[nCount];
- USHORT nFormat = 1;
+ pFormats = new sal_uInt8[nCount];
+ sal_uInt16 nFormat = 1;
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
@@ -4907,7 +4990,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
{
uno::Any aConverted = xConverter->convertTo( sFieldInfo[nIndex][0], getCppuType((xub_StrLen*)0) );
aConverted >>= pColumns[nRealCount];
- aConverted = xConverter->convertTo( sFieldInfo[nIndex][1], getCppuType((USHORT*)0) );
+ aConverted = xConverter->convertTo( sFieldInfo[nIndex][1], getCppuType((sal_uInt16*)0) );
aConverted >>= nFormat;
}
catch( const uno::Exception& )
@@ -5107,7 +5190,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
if( m_Areas->getCount() > 1 )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
- sal_Bool bShowDetail = sal_False;
+ sal_Bool bShowDetail = false;
RangeHelper helper( mxRange );
uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
@@ -5120,7 +5203,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
if( (thisAddress.StartRow == thisAddress.EndRow && thisAddress.EndRow == aOutlineAddress.EndRow ) ||
(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
{
- sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? sal_False:sal_True;
+ sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:sal_True;
ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), sal_True);
const ScOutlineArray* pOutlineArray = bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray();
@@ -5239,7 +5322,7 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
sal_Int32 nCol;
sal_Int32 nMaxRows = 0;
sal_Int32 nMaxColumns = 0;
- sal_Bool bEof = sal_False;
+ sal_Bool bEof = false;
long lColCnt = 0;
if (MaxColumns.hasValue())
{
@@ -5478,7 +5561,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
}
ScDocFunc aFunc(*pDocSh);
#ifdef VBA_OOBUILD_HACK
- aFunc.FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, nCount, fStep, fEndValue, TRUE, TRUE );
+ aFunc.FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, nCount, fStep, fEndValue, sal_True, sal_True );
#endif
}
sal_Bool SAL_CALL
@@ -5504,10 +5587,10 @@ ScVbaRange::GoalSeek( const uno::Any& Goal, const uno::Reference< excel::XRange
// but... if it detects 0 is the value it requires then it will use that
// e.g. divergence & result both = 0.0 does NOT mean there is an error
if ( ( res.Divergence != 0.0 ) && ( res.Result == 0.0 ) )
- bRes = sal_False;
+ bRes = false;
}
else
- bRes = sal_False;
+ bRes = false;
return bRes;
}
@@ -5619,7 +5702,7 @@ ScVbaRange::Merge( const uno::Any& Across ) throw (script::BasicErrorException,
return;
}
uno::Reference< table::XCellRange > oCellRange;
- sal_Bool bAcross = sal_False;
+ sal_Bool bAcross = false;
Across >>= bAcross;
if ( !bAcross )
lcl_mergeCellsOfRange( mxRange );
@@ -5629,7 +5712,7 @@ ScVbaRange::Merge( const uno::Any& Across ) throw (script::BasicErrorException,
// #TODO #FIXME this seems incredibly lame, this can't be right
for (sal_Int32 i=1; i <= oRangeRowsImpl->getCount();i++)
{
- oRangeRowsImpl->Cells( uno::makeAny( i ), uno::Any() )->Merge( uno::makeAny( sal_False ) );
+ oRangeRowsImpl->Cells( uno::makeAny( i ), uno::Any() )->Merge( uno::makeAny( false ) );
}
}
}
@@ -5647,7 +5730,7 @@ ScVbaRange::UnMerge( ) throw (script::BasicErrorException, uno::RuntimeExceptio
}
return;
}
- lcl_mergeCellsOfRange( mxRange, sal_False);
+ lcl_mergeCellsOfRange( mxRange, false);
}
uno::Any SAL_CALL
@@ -5697,7 +5780,7 @@ ScVbaRange::PreviousNext( bool bIsPrevious )
SCTAB nTab = refRange.aStart.Tab();
ScDocument* pDoc = getScDocument();
- pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, TRUE,TRUE, markedRange );
+ pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, true,true, markedRange );
refRange.aStart.SetCol( nNewX );
refRange.aStart.SetRow( nNewY );
refRange.aStart.SetTab( nTab );
@@ -5907,9 +5990,9 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno::
{
try
{
- sal_Bool bDoReplace = sal_False;
+ sal_Bool bDoReplace = false;
aReplace >>= bDoReplace;
- sal_Bool bAddPageBreaks = sal_False;
+ sal_Bool bAddPageBreaks = false;
PageBreaks >>= bAddPageBreaks;
uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW );
@@ -6076,7 +6159,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
// Unique
if ( xPropertySet.is() )
{
- sal_Bool bUnique = sal_False;
+ sal_Bool bUnique = false;
uno::Any aUnique;
try
{
@@ -6171,7 +6254,7 @@ ScVbaRange::getServiceNames()
sal_Bool SAL_CALL
ScVbaRange::hasError() throw (uno::RuntimeException)
{
- double dResult = sal_False;
+ double dResult = false;
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
@@ -6184,7 +6267,7 @@ ScVbaRange::hasError() throw (uno::RuntimeException)
xInvoc->invoke( FunctionName, Params, OutParamIndex, OutParam ) >>= dResult;
if ( dResult > 0.0 )
return sal_True;
- return sal_False;
+ return false;
}
namespace range
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 3bec144fe57f..687128b98757 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -110,11 +110,14 @@ class ScVbaRange : public ScVbaRange_BASE
void fillSeries( css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException );
- void ClearContents( sal_Int32 nFlags ) throw (css::uno::RuntimeException);
- virtual void setValue( const css::uno::Any& aValue, ValueSetter& setter) throw ( css::uno::RuntimeException);
- virtual css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
- virtual css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
- virtual void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
+ void ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (css::uno::RuntimeException);
+
+ css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
+ void setValue( const css::uno::Any& aValue, ValueSetter& setter, bool bFireEvent ) throw ( css::uno::RuntimeException);
+
+ css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
+ void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar, bool bFireEvent ) throw ( css::uno::RuntimeException);
+
css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException );
ScCellRangeObj* getCellRangeObj( ) throw ( css::uno::RuntimeException );
css::uno::Reference< ov::XCollection >& getBorders();
@@ -122,6 +125,10 @@ class ScVbaRange : public ScVbaRange_BASE
css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious );
css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
css::awt::Point getPosition() throw ( css::uno::RuntimeException );
+
+ /** Fires a Worksheet_Change event for this range or range list. */
+ void fireChangeEvent();
+
protected:
virtual ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException );
virtual SfxItemSet* getCurrentDataSet( ) throw ( css::uno::RuntimeException );
@@ -152,6 +159,12 @@ public:
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( css::uno::RuntimeException );
css::table::CellAddress getLeftUpperCellAddress();
+ static css::uno::Reference< ov::excel::XRange > CellsHelper(
+ const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::table::XCellRange >& xRange,
+ const css::uno::Any &nRowIndex, const css::uno::Any &nColumnIndex ) throw(css::uno::RuntimeException);
+
// Attributes
virtual css::uno::Any SAL_CALL getName() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 652c8e4f87b1..f7582d9a25a2 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -39,7 +39,9 @@
#include <rtl/ustrbuf.hxx>
#include <filter/msfilter/msvbahelper.hxx>
#include <oox/helper/helper.hxx>
+#include <svx/unoshape.hxx>
#include "vbafont.hxx"
+#include "drwlayer.hxx"
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -238,13 +240,38 @@ void SAL_CALL ScVbaSheetObjectBase::setName( const OUString& rName ) throw (uno:
sal_Int32 SAL_CALL ScVbaSheetObjectBase::getPlacement() throw (uno::RuntimeException)
{
- // TODO
- return excel::XlPlacement::xlMoveAndSize;
+ sal_Int32 nRet = excel::XlPlacement::xlMoveAndSize;
+ SvxShape* pShape = SvxShape::getImplementation( mxShape );
+ if(pShape)
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+ if (pObj)
+ {
+ ScAnchorType eType = ScDrawLayer::GetAnchor(pObj);
+ if (eType == SCA_PAGE)
+ nRet = excel::XlPlacement::xlFreeFloating;
+ }
+ }
+ return nRet;
}
-void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 /*nPlacement*/ ) throw (uno::RuntimeException)
+void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 nPlacement ) throw (uno::RuntimeException)
{
- // TODO
+ SvxShape* pShape = SvxShape::getImplementation( mxShape );
+ if(pShape)
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+ if (pObj)
+ {
+ ScAnchorType eType = SCA_CELL;
+ if ( nPlacement == excel::XlPlacement::xlFreeFloating )
+ eType = SCA_PAGE;
+
+ // xlMove is not supported, treated as SCA_CELL (xlMoveAndSize)
+
+ ScDrawLayer::SetAnchor(pObj, eType);
+ }
+ }
}
sal_Bool SAL_CALL ScVbaSheetObjectBase::getPrintObject() throw (uno::RuntimeException)
@@ -351,14 +378,14 @@ void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName )
// if a macro name has been passed, try to attach it to the event
if( rMacroName.getLength() > 0 )
{
- VBAMacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
- if( !aResolvedMacro.IsResolved() )
+ MacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
+ if( !aResolvedMacro.mbFound )
throw uno::RuntimeException();
script::ScriptEventDescriptor aDescriptor;
aDescriptor.ListenerType = maListenerType;
aDescriptor.EventMethod = maEventMethod;
aDescriptor.ScriptType = CREATE_OUSTRING( "Script" );
- aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.ResolvedMacro() );
+ aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.msResolvedMacro );
xEventMgr->registerScriptEvent( nIndex, aDescriptor );
}
}
@@ -378,7 +405,7 @@ void SAL_CALL ScVbaControlObjectBase::setPrintObject( sal_Bool bPrintObject ) th
sal_Bool SAL_CALL ScVbaControlObjectBase::getAutoSize() throw (uno::RuntimeException)
{
// not supported
- return sal_False;
+ return false;
}
void SAL_CALL ScVbaControlObjectBase::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 126b03577887..2c52556b23a9 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -72,7 +72,7 @@ lcl_getValidationProps( const uno::Reference< table::XCellRange >& xRange )
ScVbaValidation::getIgnoreBlank() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) );
- sal_Bool bBlank = sal_False;
+ sal_Bool bBlank = false;
xProps->getPropertyValue( IGNOREBLANK ) >>= bBlank;
return bBlank;
}
@@ -91,13 +91,13 @@ ScVbaValidation::getInCellDropdown() throw (uno::RuntimeException)
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
sal_Int32 nShowList = 0;
xProps->getPropertyValue( SHOWLIST ) >>= nShowList;
- return ( nShowList ? sal_True : sal_False );
+ return ( nShowList ? sal_True : false );
}
void SAL_CALL
ScVbaValidation::setInCellDropdown( ::sal_Bool _incelldropdown ) throw (uno::RuntimeException)
{
- sal_Int32 nDropDown = sal_False;
+ sal_Int32 nDropDown = false;
if ( _incelldropdown )
nDropDown = 1;
uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps(m_xRange) );
@@ -109,7 +109,7 @@ ScVbaValidation::setInCellDropdown( ::sal_Bool _incelldropdown ) throw (uno::R
ScVbaValidation::getShowInput() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
- sal_Bool bShowInput = sal_False;
+ sal_Bool bShowInput = false;
xProps->getPropertyValue( SHOWINPUT ) >>= bShowInput;
return bShowInput;
}
@@ -126,7 +126,7 @@ ScVbaValidation:: setShowInput( ::sal_Bool _showinput ) throw (uno::RuntimeExcep
ScVbaValidation::getShowError() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
- sal_Bool bShowError = sal_False;
+ sal_Bool bShowError = false;
xProps->getPropertyValue( SHOWERROR ) >>= bShowError;
return bShowError;
}
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index e79985db92a6..761671727e9c 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -683,14 +683,14 @@ double SAL_CALL
ScVbaWindow::getSplitVertical() throw (uno::RuntimeException)
{
double fSplitVertical = m_xViewSplitable->getSplitVertical();
- double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, sal_False );
+ double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, false );
return fVertiPoints;
}
void SAL_CALL
ScVbaWindow::setSplitVertical(double _splitvertical ) throw (uno::RuntimeException)
{
- double fVertiPixels = PointsToPixels( m_xDevice, _splitvertical, sal_False );
+ double fVertiPixels = PointsToPixels( m_xDevice, _splitvertical, false );
m_xViewSplitable->splitAtPosition( 0, static_cast<sal_Int32>( fVertiPixels ) );
}
@@ -761,7 +761,7 @@ ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
{
sal_Int32 nWindowView = excel::XlWindowView::xlNormalView;
_view >>= nWindowView;
- USHORT nSlot = FID_NORMALVIEWMODE;
+ sal_uInt16 nSlot = FID_NORMALVIEWMODE;
switch ( nWindowView )
{
case excel::XlWindowView::xlNormalView:
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 53063bd0e4fc..bf880e473af3 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -382,18 +382,16 @@ ScVbaWorkbook::Styles( const::uno::Any& Item ) throw (uno::RuntimeException)
}
uno::Any SAL_CALL
-ScVbaWorkbook::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
+ScVbaWorkbook::Names( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< frame::XModel > xModel( getModel() );
+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW );
uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW );
uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
- uno::Reference< XCollection > xNames( new ScVbaNames( this , mxContext , xNamedRanges , xModel ));
- if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
- {
+ uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) );
+ if ( aIndex.hasValue() )
+ return uno::Any( xNames->Item( aIndex, uno::Any() ) );
return uno::Any( xNames );
}
- return uno::Any( xNames->Item( aIndex, uno::Any() ) );
-}
rtl::OUString&
ScVbaWorkbook::getServiceImplName()
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index ee947f1a757e..86b24c3dec92 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -47,7 +47,9 @@
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/uri/XUriReference.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
@@ -74,15 +76,19 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
ScDocShell* pShell = excel::getDocShell( xModel );
if ( pShell )
{
+ String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ pShell->GetBasicManager()->SetName( aPrjName );
+
+ /* Set library container to VBA compatibility mode. This will create
+ the VBA Globals object and store it in the Basic manager of the
+ document. */
uno::Reference<script::XLibraryContainer> xLibContainer = pShell->GetBasicContainer();
uno::Reference<script::vba::XVBACompatibility> xVBACompat( xLibContainer, uno::UNO_QUERY_THROW );
xVBACompat->setVBACompatibilityMode( sal_True );
- String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- pShell->GetBasicManager()->SetName( aPrjName );
if( xLibContainer.is() )
{
- if( !xLibContainer->hasByName( aPrjName ) )
+ if( !xLibContainer->hasByName( aPrjName ) )
xLibContainer->createLibrary( aPrjName );
uno::Any aLibAny = xLibContainer->getByName( aPrjName );
uno::Reference< container::XNameContainer > xLib;
@@ -91,8 +97,6 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
{
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW );
uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW);
- // bootstrap vbaglobals
- xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals")));
uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY_THROW );
// set up the module info for the workbook and sheets in the nealy created
// spreadsheet
@@ -131,6 +135,18 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
}
}
}
+
+ /* Trigger the Workbook_Open event, event processor will register
+ itself as listener for specific events. */
+ try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pShell->GetDocument()->GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( script::vba::VBAEventId::WORKBOOK_OPEN, aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
}
}
@@ -201,9 +217,41 @@ ScVbaWorkbooks::createCollectionObject( const css::uno::Any& aSource )
uno::Any SAL_CALL
-ScVbaWorkbooks::Add() throw (uno::RuntimeException)
+ScVbaWorkbooks::Add( const uno::Any& Template ) throw (uno::RuntimeException)
{
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XSpreadsheetDocument > xSpreadDoc;
+ sal_Int32 nWorkbookType = 0;
+ ::rtl::OUString aTemplateFileName;
+ if( Template >>= nWorkbookType )
+ {
+ // nWorkbookType is a constant from XlWBATemplate (added in Excel 2007)
+ // TODO: create chart-sheet if supported by Calc
+
+ xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
+ // create a document with one sheet only
+ uno::Reference< sheet::XSpreadsheets > xSheets( xSpreadDoc->getSheets(), uno::UNO_SET_THROW );
+ uno::Reference< container::XIndexAccess > xSheetsIA( xSheets, uno::UNO_QUERY_THROW );
+ while( xSheetsIA->getCount() > 1 )
+ {
+ uno::Reference< container::XNamed > xSheetName( xSheetsIA->getByIndex( xSheetsIA->getCount() - 1 ), uno::UNO_QUERY_THROW );
+ xSheets->removeByName( xSheetName->getName() );
+ }
+ }
+ else if( Template >>= aTemplateFileName )
+ {
+ // TODO: create document from template
+ xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
+ }
+ else if( !Template.hasValue() )
+ {
+ // regular spreadsheet document with configured number of sheets
+ xSpreadDoc.set( createDocument(), uno::UNO_QUERY_THROW );
+ }
+ else
+ {
+ // illegal argument
+ throw uno::RuntimeException();
+ }
// need to set up the document modules ( and vba mode ) here
setUpDocumentModules( xSpreadDoc );
@@ -212,10 +260,10 @@ ScVbaWorkbooks::Add() throw (uno::RuntimeException)
return uno::Any();
}
-void
+void SAL_CALL
ScVbaWorkbooks::Close() throw (uno::RuntimeException)
{
- VbaDocumentsBase::Close();
+ closeDocuments();
}
bool
@@ -255,7 +303,7 @@ ScVbaWorkbooks::getFileFilterType( const rtl::OUString& rFileName )
}
// #TODO# #FIXME# can any of the unused params below be used?
-uno::Any
+uno::Any SAL_CALL
ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLinks*/, const uno::Any& ReadOnly, const uno::Any& Format, const uno::Any& /*Password*/, const uno::Any& /*WriteResPassword*/, const uno::Any& /*IgnoreReadOnlyRecommended*/, const uno::Any& /*Origin*/, const uno::Any& Delimiter, const uno::Any& /*Editable*/, const uno::Any& /*Notify*/, const uno::Any& /*Converter*/, const uno::Any& /*AddToMru*/ ) throw (uno::RuntimeException)
{
// we need to detect if this is a URL, if not then assume its a file path
@@ -334,7 +382,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
else if ( !isSpreadSheetFile( sType ) )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() );
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Open( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent );
uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY );
if ( xWBook.is() )
@@ -342,12 +390,6 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
return aRet;
}
-uno::Any
-ScVbaWorkbooks::Open( const rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException)
-{
- return VbaDocumentsBase::Open( Filename, ReadOnly, rProps );
-}
-
rtl::OUString&
ScVbaWorkbooks::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx
index a195bb8d3cd0..51273b180cf1 100644
--- a/sc/source/ui/vba/vbaworkbooks.hxx
+++ b/sc/source/ui/vba/vbaworkbooks.hxx
@@ -61,12 +61,9 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XWorkbooks
- virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& UpdateLinks, const css::uno::Any& ReadOnly, const css::uno::Any& Format, const css::uno::Any& Password, const css::uno::Any& WriteResPassword, const css::uno::Any& IgnoreReadOnlyRecommended, const css::uno::Any& Origin, const css::uno::Any& Delimiter, const css::uno::Any& Editable, const css::uno::Any& Notify, const css::uno::Any& Converter, const css::uno::Any& AddToMru ) throw (css::uno::RuntimeException);
-
- // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
- virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException);
};
#endif /* SC_VBA_WORKBOOKS_HXX */
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 51a2292c2bf2..7b889b4603c7 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/sheet/XSheetOutline.hpp>
#include <com/sun/star/sheet/XSheetPageBreak.hpp>
#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
+#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
@@ -62,6 +63,7 @@
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <ooo/vba/excel/XlEnableSelection.hpp>
+#include <ooo/vba/excel/XlSheetVisibility.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
#include <ooo/vba/XControlProvider.hpp>
#include <ooo/vba/excel/XlSheetVisibility.hpp>
@@ -182,7 +184,7 @@ openNewDoc(rtl::OUString aSheetName )
return xModel;
}
-ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext )
+ScVbaWorksheet::ScVbaWorksheet( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : WorksheetImpl_BASE( xParent, xContext ), mbVeryHidden( false )
{
}
@@ -193,9 +195,9 @@ ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< XHelperInterface >& xParent
}
ScVbaWorksheet::ScVbaWorksheet( uno::Sequence< uno::Any> const & args,
- uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : WorksheetImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
+ uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : WorksheetImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) ), mbVeryHidden( false )
{
- if ( args.getLength() < 2 )
+ if ( args.getLength() < 3 )
throw lang::IllegalArgumentException();
rtl::OUString sSheetName;
@@ -245,6 +247,25 @@ ScVbaWorksheet::getVisible() throw (uno::RuntimeException)
void
ScVbaWorksheet::setVisible( ::sal_Int32 _Visible ) throw (uno::RuntimeException)
{
+ using namespace ::ooo::vba::excel::XlSheetVisibility;
+ bool bVisible = true;
+ switch( nVisible )
+ {
+ case xlSheetVisible: case 1: // Excel accepts -1 and 1 for visible sheets
+ bVisible = true;
+ mbVeryHidden = false;
+ break;
+ case xlSheetHidden:
+ bVisible = false;
+ mbVeryHidden = false;
+ break;
+ case xlSheetVeryHidden:
+ bVisible = false;
+ mbVeryHidden = true;
+ break;
+ default:
+ throw uno::RuntimeException();
+ }
uno::Reference< beans::XPropertySet > xProps( getSheet(), uno::UNO_QUERY_THROW );
sal_Bool bVisible = true;
@@ -279,8 +300,8 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
- sal_Bool bLockedCells = sal_False;
- sal_Bool bUnlockedCells = sal_False;
+ sal_Bool bLockedCells = false;
+ sal_Bool bUnlockedCells = false;
if( pProtect )
{
bLockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS);
@@ -318,8 +339,8 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
// default is xlNoSelection
- sal_Bool bLockedCells = sal_False;
- sal_Bool bUnlockedCells = sal_False;
+ sal_Bool bLockedCells = false;
+ sal_Bool bUnlockedCells = false;
if( nSelection == excel::XlEnableSelection::xlNoRestrictions )
{
bLockedCells = sal_True;
@@ -362,7 +383,7 @@ uno::Reference< beans::XPropertySet > ScVbaWorksheet::getFirstDBRangeProperties(
sal_Bool SAL_CALL ScVbaWorksheet::getAutoFilterMode() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xDBRangeProps = getFirstDBRangeProperties();
- sal_Bool bAutoFilterMode = sal_False;
+ sal_Bool bAutoFilterMode = false;
return
xDBRangeProps.is() &&
(xDBRangeProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoFilter" ) ) ) >>= bAutoFilterMode) &&
@@ -436,7 +457,7 @@ ScVbaWorksheet::getStandardHeight() throw (uno::RuntimeException)
sal_Bool
ScVbaWorksheet::getProtectionMode() throw (uno::RuntimeException)
{
- return sal_False;
+ return false;
}
sal_Bool
@@ -461,13 +482,13 @@ ScVbaWorksheet::getProtectDrawingObjects() throw (uno::RuntimeException)
if ( pProtect )
return pProtect->isOptionEnabled( ScTableProtection::OBJECTS );
}
- return sal_False;
+ return false;
}
sal_Bool
ScVbaWorksheet::getProtectScenarios() throw (uno::RuntimeException)
{
- return sal_False;
+ return false;
}
void
@@ -592,7 +613,7 @@ ScVbaWorksheet::Copy( const uno::Any& Before, const uno::Any& After ) throw (uno
ScDocShell* pDestDocShell = excel::getDocShell( pDestSheet->getModel() );
ScDocShell* pSrcDocShell = excel::getDocShell( getModel() );
if ( pDestDocShell && pSrcDocShell )
- pDestDocShell->TransferTab( *pSrcDocShell, static_cast<SCTAB>(nSrc), static_cast<SCTAB>(nDest), TRUE, TRUE );
+ pDestDocShell->TransferTab( *pSrcDocShell, static_cast<SCTAB>(nSrc), static_cast<SCTAB>(nDest), true, true );
}
}
// active the new sheet
@@ -729,7 +750,10 @@ uno::Reference< excel::XRange >
ScVbaWorksheet::Cells( const ::uno::Any &nRow, const ::uno::Any &nCol )
throw (uno::RuntimeException)
{
- return getSheetRange()->Cells( nRow, nCol );
+ // Performance optimization for often-called Cells method:
+ // Use a common helper method instead of creating a new ScVbaRange object
+ uno::Reference< table::XCellRange > xRange( getSheet(), uno::UNO_QUERY_THROW );
+ return ScVbaRange::CellsHelper( this, mxContext, xRange, nRow, nCol );
}
uno::Reference< excel::XRange >
@@ -806,8 +830,15 @@ ScVbaWorksheet::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeExceptio
uno::Any SAL_CALL
ScVbaWorksheet::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< excel::XWorkbook > xWorkbook( getParent(), uno::UNO_QUERY_THROW );
- return xWorkbook->Names( aIndex );
+ // fake sheet-local names by returning all global names
+ // #163498# initialize Names object with correct parent (this worksheet)
+ // TODO: real sheet-local names...
+ uno::Reference< beans::XPropertySet > xProps( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) );
+ if ( aIndex.hasValue() )
+ return uno::Any( xNames->Item( aIndex, uno::Any() ) );
+ return uno::Any( xNames );
}
uno::Any SAL_CALL
@@ -962,7 +993,7 @@ ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::U
::sal_Bool SAL_CALL
ScVbaWorksheet::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
{
- return sal_False;
+ return false;
}
uno::Reference< container::XNameAccess >
@@ -993,7 +1024,7 @@ ScVbaWorksheet::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeE
uno::Reference< container::XNameAccess > xFormControls( getFormControls() );
if ( xFormControls.is() )
return xFormControls->hasByName( aName );
- return sal_False;
+ return false;
}
uno::Any
@@ -1081,9 +1112,9 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
sal_Int16 nCopies = 1;
- sal_Bool bCollate = sal_False;
- sal_Bool bSelection = sal_False;
- sal_Bool bIgnorePrintAreas = sal_False;
+ sal_Bool bCollate = false;
+ sal_Bool bSelection = false;
+ sal_Bool bIgnorePrintAreas = false;
From >>= nFrom;
To >>= nTo;
Copies >>= nCopies;
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index 3328c3c5b807..df490655d9ba 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -64,6 +64,7 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
css::uno::Reference< ov::excel::XChartObjects > mxCharts;
css::uno::Reference< ov::excel::XHyperlinks > mxHlinks;
::rtl::Reference< ScVbaSheetObjectsBase > mxButtons;
+ bool mbVeryHidden;
css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
css::uno::Reference< ov::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index ed0cc73171cb..680b5ae6b600 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -267,7 +267,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
aStringSheet = xBeforeAfterSheet->getName();
else
After >>= aStringSheet;
- bBefore = sal_False;
+ bBefore = false;
}
if (!aStringSheet.getLength())
{
@@ -339,8 +339,8 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno::
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
sal_Int16 nCopies = 1;
- sal_Bool bCollate = sal_False;
- sal_Bool bSelection = sal_False;
+ sal_Bool bCollate = false;
+ sal_Bool bSelection = false;
From >>= nFrom;
To >>= nTo;
Copies >>= nCopies;
@@ -362,9 +362,9 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException)
while ( xEnum->hasMoreElements() )
{
uno::Reference< excel::XWorksheet > xSheet( xEnum->nextElement(), uno::UNO_QUERY_THROW );
- if ( xSheet->getVisible() == sal_False )
+ if ( xSheet->getVisible() == false )
{
- bVisible = sal_False;
+ bVisible = false;
break;
}
}
@@ -374,7 +374,7 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException)
void SAL_CALL
ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeException)
{
- sal_Bool bState = sal_False;
+ sal_Bool bState = false;
if ( _visible >>= bState )
{
uno::Reference< container::XEnumeration > xEnum( createEnumeration(), uno::UNO_QUERY_THROW );
@@ -416,7 +416,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException)
bSelectSingle = false;
}
else
- rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), TRUE );
+ rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), sal_True );
}
}
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index b87ec852b9a5..685377da4324 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -63,7 +63,7 @@ void lclConvertDoubleToBoolean( uno::Any& rAny )
void lclConvertBooleanToDouble( uno::Any& rAny )
{
- sal_Bool bValue( sal_False );
+ sal_Bool bValue( false );
if ( rAny >>= bValue )
{
if ( bValue )
@@ -268,7 +268,7 @@ ScVbaWSFunction::getValue(const rtl::OUString& /*PropertyName*/) throw(beans::Un
sal_Bool SAL_CALL
ScVbaWSFunction::hasMethod(const rtl::OUString& Name) throw(uno::RuntimeException)
{
- sal_Bool bIsFound = sal_False;
+ sal_Bool bIsFound = false;
try
{
// the function name contained in the com.sun.star.sheet.FunctionDescription service is alwayse localized.
@@ -288,7 +288,7 @@ ScVbaWSFunction::hasMethod(const rtl::OUString& Name) throw(uno::RuntimeExcepti
sal_Bool SAL_CALL
ScVbaWSFunction::hasProperty(const rtl::OUString& /*Name*/) throw(uno::RuntimeException)
{
- return sal_False;
+ return false;
}
::rtl::OUString SAL_CALL
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 115055b2f136..b35be06c4e5a 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -69,7 +69,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) :
nFunction( SID_FILL_ADD_PRED )
{
SetPool( &pViewData->GetViewShell()->GetPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -90,7 +90,7 @@ ScAuditingShell::~ScAuditingShell()
void ScAuditingShell::Execute( SfxRequest& rReq )
{
SfxBindings& rBindings = pViewData->GetBindings();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_FILL_ADD_PRED:
@@ -105,7 +105,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
break;
case SID_CANCEL: // Escape
case SID_FILL_NONE:
- pViewData->GetViewShell()->SetAuditShell( FALSE );
+ pViewData->GetViewShell()->SetAuditShell( false );
break;
case SID_FILL_SELECT:
@@ -115,15 +115,15 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pXItem;
const SfxPoolItem* pYItem;
- if ( pReqArgs->GetItemState( SID_RANGE_COL, TRUE, &pXItem ) == SFX_ITEM_SET
- && pReqArgs->GetItemState( SID_RANGE_ROW, TRUE, &pYItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_RANGE_COL, sal_True, &pXItem ) == SFX_ITEM_SET
+ && pReqArgs->GetItemState( SID_RANGE_ROW, sal_True, &pYItem ) == SFX_ITEM_SET )
{
DBG_ASSERT( pXItem->ISA(SfxInt16Item) && pYItem->ISA(SfxInt32Item),
"falsche Items" );
SCsCOL nCol = static_cast<SCsCOL>(((const SfxInt16Item*) pXItem)->GetValue());
SCsROW nRow = static_cast<SCsROW>(((const SfxInt32Item*) pYItem)->GetValue());
ScViewFunc* pView = pViewData->GetView();
- pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, FALSE, FALSE );
+ pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, false, false );
switch ( nFunction )
{
case SID_FILL_ADD_PRED:
@@ -150,7 +150,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
void ScAuditingShell::GetState( SfxItemSet& rSet )
{
- rSet.Put( SfxBoolItem( nFunction, TRUE ) ); // aktive Funktion markieren
+ rSet.Put( SfxBoolItem( nFunction, sal_True ) ); // aktive Funktion markieren
}
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 1b991b6ce057..209fff0eae38 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -72,9 +72,6 @@
#define CellMovement
#include "scslots.hxx"
-#define SearchSettings
-#include <svx/svxslots.hxx>
-
TYPEINIT1( ScCellShell, ScFormatShell );
SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) )
@@ -89,7 +86,7 @@ SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) )
ScCellShell::ScCellShell(ScViewData* pData) :
ScFormatShell(pData),
pImpl( new CellShell_Impl() ),
- bPastePossible(FALSE)
+ bPastePossible(false)
{
SetHelpId(HID_SCSHELL_CELLSH);
SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Cell")));
@@ -99,7 +96,7 @@ ScCellShell::~ScCellShell()
{
if ( pImpl->m_pClipEvtLstnr )
{
- pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), FALSE );
+ pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), false );
// The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -120,9 +117,9 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
ScRange aMarkRange;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aMarkRange );
- BOOL bSimpleArea = (eMarkType == SC_MARK_SIMPLE);
- BOOL bOnlyNotBecauseOfMatrix;
- BOOL bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix );
+ sal_Bool bSimpleArea = (eMarkType == SC_MARK_SIMPLE);
+ sal_Bool bOnlyNotBecauseOfMatrix;
+ sal_Bool bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix );
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocShell = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -134,11 +131,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
nRow2 = aMarkRange.aEnd.Row();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- BOOL bDisable = FALSE;
- BOOL bNeedEdit = TRUE; // muss Selektion editierbar sein?
+ sal_Bool bDisable = false;
+ sal_Bool bNeedEdit = sal_True; // muss Selektion editierbar sein?
switch ( nWhich )
{
case FID_FILL_TO_BOTTOM: // Fuellen oben/unten
@@ -172,7 +169,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case FID_FILL_SERIES: // Block fuellen
case SID_OPENDLG_TABOP: // Mehrfachoperationen, mind. 2 Zellen markiert?
if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP)
- bDisable = TRUE;
+ bDisable = sal_True;
else
bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2);
@@ -210,7 +207,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
//! muss man leben.. wird in Copy-Routine abgefangen, sonst
//! muesste hier nochmal Aufwand getrieben werden
if ( !(!bEditable && bOnlyNotBecauseOfMatrix) )
- bNeedEdit = FALSE; // erlaubt, wenn geschuetzt/ReadOnly
+ bNeedEdit = false; // erlaubt, wenn geschuetzt/ReadOnly
break;
case SID_AUTOFORMAT: // Autoformat, mind. 3x3 selektiert
@@ -222,11 +219,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
{
if ( !bEditable && bOnlyNotBecauseOfMatrix )
{
- bNeedEdit = FALSE;
+ bNeedEdit = false;
}
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -237,14 +234,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case SID_ENABLE_HYPHENATION :
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
if ( !bEditable && bOnlyNotBecauseOfMatrix )
- bNeedEdit = FALSE;
+ bNeedEdit = false;
break;
case FID_VALIDATION:
{
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -257,14 +254,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
break;
}
if (!bDisable && bNeedEdit && !bEditable)
- bDisable = TRUE;
+ bDisable = sal_True;
if (bDisable)
rSet.DisableItem(nWhich);
else if (nWhich == SID_ENABLE_HYPHENATION)
{
// toggle slots need a bool item
- rSet.Put( SfxBoolItem( nWhich, FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, false ) );
}
nWhich = aIter.NextWhich();
}
@@ -282,11 +279,11 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
GetViewData()->GetTabNo() );
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- BOOL bDisable = FALSE;
- BOOL bNeedEdit = TRUE; // muss Cursorposition editierbar sein?
+ sal_Bool bDisable = false;
+ sal_Bool bNeedEdit = sal_True; // muss Cursorposition editierbar sein?
switch ( nWhich )
{
case SID_THESAURUS:
@@ -296,7 +293,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!bDisable)
{
// test for available languages
- USHORT nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor );
+ sal_uInt16 nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor );
bDisable = !ScModule::HasThesaurusLanguage( nLang );
}
}
@@ -312,9 +309,9 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!pDoc->IsBlockEditable( aCursor.Tab(), aRange.aStart.Col(),aRange.aStart.Row(),
aRange.aEnd.Col(),aRange.aEnd.Row() ))
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
- bNeedEdit=FALSE;
+ bNeedEdit=false;
}
}
@@ -323,7 +320,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
{
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -331,7 +328,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!bDisable && bNeedEdit)
if (!pDoc->IsBlockEditable( aCursor.Tab(), aCursor.Col(),aCursor.Row(),
aCursor.Col(),aCursor.Row() ))
- bDisable = TRUE;
+ bDisable = sal_True;
if (bDisable)
rSet.DisableItem(nWhich);
nWhich = aIter.NextWhich();
@@ -369,13 +366,13 @@ sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHe
return sal_True;
}
- return sal_False;
+ return false;
}
void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats )
{
Window* pWin = GetViewData()->GetActiveWin();
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
@@ -403,11 +400,11 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats )
// Einfuegen, Inhalte einfuegen
-BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData )
+sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
{
- BOOL bPossible = FALSE;
+ sal_Bool bPossible = false;
if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) )
- bPossible = TRUE;
+ bPossible = sal_True;
else
{
if ( rData.HasFormat( SOT_FORMAT_BITMAP ) ||
@@ -427,7 +424,7 @@ BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData )
rData.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) ||
rData.HasFormat( SOT_FORMATSTR_ID_DIF ) )
{
- bPossible = TRUE;
+ bPossible = sal_True;
}
}
return bPossible;
@@ -460,14 +457,14 @@ void ScCellShell::GetClipState( SfxItemSet& rSet )
pImpl->m_pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScCellShell, ClipboardChanged ) );
pImpl->m_pClipEvtLstnr->acquire();
Window* pWin = GetViewData()->GetActiveWin();
- pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
bPastePossible = lcl_IsCellPastePossible( aDataHelper );
}
- BOOL bDisable = !bPastePossible;
+ sal_Bool bDisable = !bPastePossible;
// Zellschutz / Multiselektion
@@ -478,11 +475,11 @@ void ScCellShell::GetClipState( SfxItemSet& rSet )
SCTAB nTab = GetViewData()->GetTabNo();
ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument();
if (!pDoc->IsBlockEditable( nTab, nCol,nRow, nCol,nRow ))
- bDisable = TRUE;
+ bDisable = sal_True;
ScRange aDummy;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy);
if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
- bDisable = TRUE;
+ bDisable = sal_True;
}
if (bDisable)
@@ -532,7 +529,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -548,7 +545,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( pData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
{
String aStr;
- USHORT nFlags = SCA_VALID | SCA_TAB_3D;
+ sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D;
aRange.Format(aStr,nFlags,pDoc);
rSet.Put( SfxStringItem( nWhich, aStr ) );
}
@@ -612,7 +609,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
* 1: ER Click erweitert Selektion
* 2: ERG Click definiert weitere Selektion
*/
- USHORT nMode = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nMode = pTabViewShell->GetLockedModifiers();
switch ( nMode )
{
@@ -654,7 +651,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")) ) );
else
{
- USHORT nErrCode = 0;
+ sal_uInt16 nErrCode = 0;
ScBaseCell* pCell;
pDoc->GetCell( nPosX, nPosY, nTab, pCell );
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -745,7 +742,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( !pDoc->IsScenario(nTab) )
{
String aStr;
- USHORT nFlags;
+ sal_uInt16 nFlags;
SCTAB nScTab = nTab + 1;
String aProtect;
bool bSheetProtected = pDoc->IsTabProtected(nTab);
@@ -756,7 +753,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
aList.Insert( new String( aStr ), LIST_APPEND );
pDoc->GetScenarioData( nScTab, aStr, aDummyCol, nFlags );
aList.Insert( new String( aStr ), LIST_APPEND );
- // Protection is TRUE if both Sheet and Scenario are protected
+ // Protection is sal_True if both Sheet and Scenario are protected
aProtect = (bSheetProtected && (nFlags & SC_SCENARIO_PROTECT)) ? '1' : '0';
aList.Insert( new String( aProtect), LIST_APPEND );
++nScTab;
@@ -765,7 +762,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
else
{
String aComment;
- USHORT nDummyFlags;
+ sal_uInt16 nDummyFlags;
pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags );
DBG_ASSERT( aList.Count() == 0, "List not empty!" );
aList.Insert( new String( aComment ) );
@@ -773,8 +770,8 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.Put( SfxStringListItem( nWhich, &aList ) );
- ULONG nCount = aList.Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = aList.Count();
+ for ( sal_uLong i=0; i<nCount; i++ )
delete (String*) aList.GetObject(i);
}
break;
@@ -809,7 +806,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (!pTabViewShell->OutlinePossible(FALSE))
+ else if (!pTabViewShell->OutlinePossible(false))
rSet.DisableItem( nWhich );
break;
@@ -819,7 +816,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (!pTabViewShell->OutlinePossible(TRUE))
+ else if (!pTabViewShell->OutlinePossible(sal_True))
rSet.DisableItem( nWhich );
break;
@@ -832,7 +829,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
else
{
- BOOL bCol, bRow;
+ sal_Bool bCol, bRow;
pTabViewShell->TestRemoveOutline( bCol, bRow );
if ( !bCol && !bRow )
rSet.DisableItem( nWhich );
@@ -888,21 +885,21 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_DELETE_NOTE:
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = false;
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
if ( pDoc->IsSelectionEditable( rMark ) )
{
// look for at least one note in selection
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
size_t nCount = aRanges.size();
for (size_t nPos = 0; nPos < nCount && !bEnable; ++nPos)
{
ScCellIterator aCellIter(pDoc, *aRanges[nPos]);
for( ScBaseCell* pCell = aCellIter.GetFirst(); pCell && !bEnable; pCell = aCellIter.GetNext() )
if ( pCell->HasNote() )
- bEnable = TRUE; // note found
+ bEnable = sal_True; // note found
}
}
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 059d27fa2649..c5cb779ee2a4 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -105,7 +105,7 @@
#include <svx/dialogs.hrc>
#include "scabstdlg.hxx"
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -127,7 +127,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -218,7 +218,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bTheFlag=(pDoc->GetChangeTrack()!=NULL);
+ sal_Bool bTheFlag=(pDoc->GetChangeTrack()!=NULL);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -289,7 +289,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
ScRange aRange;
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bTheFlag=GetViewData()->IsMultiMarked() ||
+ sal_Bool bTheFlag=GetViewData()->IsMultiMarked() ||
(GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE_FILTERED) ||
(pDoc->GetChangeTrack() != NULL);
@@ -342,7 +342,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_DELETE:
{
- USHORT nFlags = IDF_NONE;
+ sal_uInt16 nFlags = IDF_NONE;
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
@@ -353,7 +353,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
aFlags.ToUpperAscii();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ )
{
@@ -361,7 +361,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
case 'A': // Alle
nFlags |= IDF_ALL;
- bCont = FALSE; // nicht mehr weitermachen!
+ bCont = false; // nicht mehr weitermachen!
break;
case 'S': nFlags |= IDF_STRING; break;
case 'V': nFlags |= IDF_VALUE; break;
@@ -453,10 +453,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_FILL_TAB:
{
- USHORT nFlags = IDF_NONE;
- USHORT nFunction = PASTE_NOFUNC;
- BOOL bSkipEmpty = FALSE;
- BOOL bAsLink = FALSE;
+ sal_uInt16 nFlags = IDF_NONE;
+ sal_uInt16 nFunction = PASTE_NOFUNC;
+ sal_Bool bSkipEmpty = false;
+ sal_Bool bAsLink = false;
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
@@ -467,7 +467,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
aFlags.ToUpperAscii();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ )
{
@@ -475,7 +475,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
case 'A': // Alle
nFlags |= IDF_ALL;
- bCont = FALSE; // nicht mehr weitermachen!
+ bCont = false; // nicht mehr weitermachen!
break;
case 'S': nFlags |= IDF_STRING; break;
case 'V': nFlags |= IDF_VALUE; break;
@@ -495,7 +495,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
RID_SCDLG_INSCONT, 0, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB));
DBG_ASSERT(pDlg, "Dialog create fail!");
- pDlg->SetFillMode(TRUE);
+ pDlg->SetFillMode(true);
if (pDlg->Execute() == RET_OK)
{
@@ -545,14 +545,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SCCOL nEndCol;
SCROW nEndRow;
SCTAB nEndTab;
- USHORT nPossDir = FDS_OPT_NONE;
+ sal_uInt16 nPossDir = FDS_OPT_NONE;
FillDir eFillDir = FILL_TO_BOTTOM;
FillCmd eFillCmd = FILL_LINEAR;
FillDateCmd eFillDateCmd = FILL_DAY;
double fStartVal = MAXDOUBLE;
double fIncVal = 1;
double fMaxVal = MAXDOUBLE;
- BOOL bDoIt = FALSE;
+ sal_Bool bDoIt = false;
GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab );
@@ -580,7 +580,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
sal_uInt32 nKey;
double fTmpVal;
- bDoIt=FALSE;
+ bDoIt=false;
if( IS_AVAILABLE( FID_FILL_SERIES, &pItem ) )
aFillDir = ((const SfxStringItem*)pItem)->GetValue();
@@ -635,7 +635,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( pFormatter->IsNumberFormat( aFillMax, nKey, fTmpVal ))
fMaxVal = fTmpVal;
- bDoIt = TRUE;
+ bDoIt = sal_True;
}
else // (pReqArgs == NULL) => Dialog hochziehen
@@ -735,7 +735,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( nStartCol != nEndCol && nStartRow != nEndRow )
{
- pDlg->SetEdStartValEnabled(FALSE);
+ pDlg->SetEdStartValEnabled(false);
}
if ( pDlg->Execute() == RET_OK )
@@ -753,7 +753,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
fStartVal = pDlg->GetStart();
fIncVal = pDlg->GetStep();
fMaxVal = pDlg->GetMax();
- bDoIt = TRUE;
+ bDoIt = sal_True;
}
delete pDlg;
}
@@ -799,7 +799,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
rReq.AppendItem( SfxStringItem( FN_PARAM_2, aPara ) );
- ULONG nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER,
+ sal_uLong nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER,
ScGlobal::eLnge );
pFormatter->GetOutputString( fIncVal, nFormatKey, aPara, &pColor );
@@ -935,7 +935,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OUTLINE_HIDE:
if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
- pTabViewShell->SetDataPilotDetails( FALSE );
+ pTabViewShell->SetDataPilotDetails( false );
else
pTabViewShell->HideMarkedOutlines();
rReq.Done();
@@ -948,7 +948,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDPObj )
{
Sequence<sheet::DataPilotFieldFilter> aFilters;
- USHORT nOrientation;
+ sal_uInt16 nOrientation;
if ( pTabViewShell->HasSelectionForDrillDown( nOrientation ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -960,7 +960,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
String aNewDimName( pDlg->GetDimensionName() );
- pTabViewShell->SetDataPilotDetails( TRUE, &aNewDimName );
+ pTabViewShell->SetDataPilotDetails( sal_True, &aNewDimName );
}
}
else if ( !pDPObj->IsServiceData() &&
@@ -969,7 +969,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFilters ) )
pTabViewShell->ShowDataPilotSourceData( *pDPObj, aFilters );
else
- pTabViewShell->SetDataPilotDetails( TRUE );
+ pTabViewShell->SetDataPilotDetails( sal_True );
}
else
pTabViewShell->ShowMarkedOutlines();
@@ -979,8 +979,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OUTLINE_MAKE:
{
- BOOL bColumns = FALSE;
- BOOL bOk = TRUE;
+ sal_Bool bColumns = false;
+ sal_Bool bOk = sal_True;
if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
@@ -1018,12 +1018,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
pTabViewShell->GroupDataPilot();
- bOk = FALSE;
+ bOk = false;
}
else if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
- bOk = FALSE;
+ bOk = false;
if( IS_AVAILABLE( SID_OUTLINE_MAKE, &pItem ) )
{
@@ -1032,28 +1032,28 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch( aCol.GetChar(0) )
{
- case 'R': bColumns=FALSE; bOk = TRUE;break;
- case 'C': bColumns=TRUE; bOk = TRUE;break;
+ case 'R': bColumns=false; bOk = sal_True;break;
+ case 'C': bColumns=sal_True; bOk = sal_True;break;
}
}
}
else // Dialog, wenn nicht ganze Zeilen/Spalten markiert
{
if ( GetViewData()->SimpleColMarked() && !GetViewData()->SimpleRowMarked() )
- bColumns = TRUE;
+ bColumns = sal_True;
else if ( !GetViewData()->SimpleColMarked() && GetViewData()->SimpleRowMarked() )
- bColumns = FALSE;
+ bColumns = false;
else
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,FALSE);
+ AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,false);
DBG_ASSERT(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
else
- bOk = FALSE;
+ bOk = false;
delete pDlg;
}
}
@@ -1073,19 +1073,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OUTLINE_REMOVE:
{
- BOOL bColumns = FALSE;
- BOOL bOk = TRUE;
+ sal_Bool bColumns = false;
+ sal_Bool bOk = sal_True;
if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) )
{
pTabViewShell->UngroupDataPilot();
- bOk = FALSE;
+ bOk = false;
}
else if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
- bOk = FALSE;
+ bOk = false;
if( IS_AVAILABLE( SID_OUTLINE_REMOVE, &pItem ) )
{
@@ -1094,34 +1094,34 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch( aCol.GetChar(0) )
{
- case 'R': bColumns=FALSE; bOk = TRUE;break;
- case 'C': bColumns=TRUE; bOk = TRUE;break;
+ case 'R': bColumns=false; bOk = sal_True;break;
+ case 'C': bColumns=sal_True; bOk = sal_True;break;
}
}
}
else // Dialog nur, wenn Aufheben fuer Zeilen und Spalten moeglich
{
- BOOL bColPoss, bRowPoss;
+ sal_Bool bColPoss, bRowPoss;
pTabViewShell->TestRemoveOutline( bColPoss, bRowPoss );
if ( bColPoss && bRowPoss )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,TRUE);
+ AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,true);
DBG_ASSERT(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
else
- bOk = FALSE;
+ bOk = false;
delete pDlg;
}
else if ( bColPoss )
- bColumns = TRUE;
+ bColumns = sal_True;
else if ( bRowPoss )
- bColumns = FALSE;
+ bColumns = false;
else
- bOk = FALSE;
+ bOk = false;
}
if (bOk)
{
@@ -1145,7 +1145,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_COPY: // fuer Grafiken in DrawShell
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- pTabViewShell->CopyToClip( NULL, FALSE, FALSE, TRUE );
+ pTabViewShell->CopyToClip( NULL, false, false, sal_True );
rReq.Done();
GetViewData()->SetPasteMode( (ScPasteFlags) (SC_PASTE_MODE | SC_PASTE_BORDER) );
pTabViewShell->ShowCursor();
@@ -1156,7 +1156,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CUT: // fuer Grafiken in DrawShell
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- pTabViewShell->CutToClip( NULL, TRUE );
+ pTabViewShell->CutToClip( NULL, sal_True );
rReq.Done();
GetViewData()->SetPasteMode( SC_PASTE_MODE );
pTabViewShell->UpdateCopySourceOverlay();
@@ -1174,10 +1174,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -1186,9 +1186,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( nFormat )
{
Window* pWin = GetViewData()->GetActiveWin();
- BOOL bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL );
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
- BOOL bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE );
+ sal_Bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE );
if ( bCells && bOle )
pTabViewShell->PasteFromSystem();
@@ -1207,16 +1207,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_INS_CELL_CONTENTS:
{
- USHORT nFlags = IDF_NONE;
- USHORT nFunction = PASTE_NOFUNC;
- BOOL bSkipEmpty = FALSE;
- BOOL bTranspose = FALSE;
- BOOL bAsLink = FALSE;
+ sal_uInt16 nFlags = IDF_NONE;
+ sal_uInt16 nFunction = PASTE_NOFUNC;
+ sal_Bool bSkipEmpty = false;
+ sal_Bool bTranspose = false;
+ sal_Bool bAsLink = false;
InsCellCmd eMoveMode = INS_NONE;
Window* pWin = GetViewData()->GetActiveWin();
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bOtherDoc = !pDoc->IsClipboardSource();
+ sal_Bool bOtherDoc = !pDoc->IsClipboardSource();
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
if ( pOwnClip )
{
@@ -1231,7 +1231,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
aFlags.ToUpperAscii();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ )
{
@@ -1239,7 +1239,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
case 'A': // Alle
nFlags |= IDF_ALL;
- bCont = FALSE; // nicht mehr weitermachen!
+ bCont = false; // nicht mehr weitermachen!
break;
case 'S': nFlags |= IDF_STRING; break;
case 'V': nFlags |= IDF_VALUE; break;
@@ -1250,11 +1250,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
}
- SFX_REQUEST_ARG( rReq, pFuncItem, SfxUInt16Item, FN_PARAM_1, sal_False );
- SFX_REQUEST_ARG( rReq, pSkipItem, SfxBoolItem, FN_PARAM_2, sal_False );
- SFX_REQUEST_ARG( rReq, pTransposeItem, SfxBoolItem, FN_PARAM_3, sal_False );
- SFX_REQUEST_ARG( rReq, pLinkItem, SfxBoolItem, FN_PARAM_4, sal_False );
- SFX_REQUEST_ARG( rReq, pMoveItem, SfxInt16Item, FN_PARAM_5, sal_False );
+ SFX_REQUEST_ARG( rReq, pFuncItem, SfxUInt16Item, FN_PARAM_1, false );
+ SFX_REQUEST_ARG( rReq, pSkipItem, SfxBoolItem, FN_PARAM_2, false );
+ SFX_REQUEST_ARG( rReq, pTransposeItem, SfxBoolItem, FN_PARAM_3, false );
+ SFX_REQUEST_ARG( rReq, pLinkItem, SfxBoolItem, FN_PARAM_4, false );
+ SFX_REQUEST_ARG( rReq, pMoveItem, SfxInt16Item, FN_PARAM_5, false );
if ( pFuncItem )
nFunction = pFuncItem->GetValue();
if ( pSkipItem )
@@ -1296,7 +1296,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SCROW nClipStartY, nClipSizeY;
pOwnClip->GetDocument()->GetClipStart( nClipStartX, nClipStartY );
// for CutMode, filtered rows can always be included
- pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, TRUE );
+ pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, sal_True );
int nDisableShift = 0;
if ( nClipStartX <= nPosX + nClipSizeX &&
nPosX <= nClipStartX + nClipSizeX )
@@ -1333,7 +1333,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
pTabViewShell->PasteFromClip( nFlags, pOwnClip->GetDocument(),
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, TRUE ); // allow warning dialog
+ eMoveMode, IDF_NONE, sal_True ); // allow warning dialog
}
if( !pReqArgs )
@@ -1377,18 +1377,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// Clipboard-ID als Parameter angegeben? Basic "PasteSpecial(Format)"
const SfxPoolItem* pItem=NULL;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
- ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
- BOOL bRet=TRUE;
+ sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_Bool bRet=sal_True;
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE )
pTabViewShell->PasteDraw();
else
- bRet = pTabViewShell->PasteFromSystem(nFormat, TRUE); // TRUE: keine Fehlermeldungen
+ bRet = pTabViewShell->PasteFromSystem(nFormat, sal_True); // TRUE: keine Fehlermeldungen
}
if ( bRet )
@@ -1411,21 +1411,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else // Zeichenobjekte oder fremde Daten
{
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS );
GetPossibleClipboardFormats( aFormats );
- USHORT nFormatCount = aFormats.Count();
+ sal_uInt16 nFormatCount = aFormats.Count();
if ( nFormatCount )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( pTabViewShell->GetDialogParent() );
if ( pDlg )
{
- for (USHORT i=0; i<nFormatCount; i++)
+ for (sal_uInt16 i=0; i<nFormatCount; i++)
{
- ULONG nFormatId = aFormats.GetClipbrdFormatId( i );
+ sal_uLong nFormatId = aFormats.GetClipbrdFormatId( i );
String aName = aFormats.GetClipbrdFormatName( i );
// special case for paste dialog: '*' is replaced by object type
if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE )
@@ -1435,7 +1435,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
if (nFormat > 0)
{
{
@@ -1471,22 +1471,22 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
//
case FID_INS_ROWBRK:
- pTabViewShell->InsertPageBreak( FALSE );
+ pTabViewShell->InsertPageBreak( false );
rReq.Done();
break;
case FID_INS_COLBRK:
- pTabViewShell->InsertPageBreak( TRUE );
+ pTabViewShell->InsertPageBreak( sal_True );
rReq.Done();
break;
case FID_DEL_ROWBRK:
- pTabViewShell->DeletePageBreak( FALSE );
+ pTabViewShell->DeletePageBreak( false );
rReq.Done();
break;
case FID_DEL_COLBRK:
- pTabViewShell->DeletePageBreak( TRUE );
+ pTabViewShell->DeletePageBreak( sal_True );
rReq.Done();
break;
@@ -1640,15 +1640,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_DEC_INDENT:
- pTabViewShell->ChangeIndent( FALSE );
+ pTabViewShell->ChangeIndent( false );
break;
case SID_INC_INDENT:
- pTabViewShell->ChangeIndent( TRUE );
+ pTabViewShell->ChangeIndent( sal_True );
break;
case FID_USE_NAME:
{
- USHORT nFlags = pTabViewShell->GetCreateNameFlags();
+ sal_uInt16 nFlags = pTabViewShell->GetCreateNameFlags();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -1670,7 +1670,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, TRUE, &pItem ) )
+ pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, sal_True, &pItem ) )
{
const ScConsolidateParam& rParam =
((const ScConsolidateItem*)pItem)->GetData();
@@ -1731,29 +1731,29 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else
{
- USHORT nId = ScNameDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_DEFINE_COLROWNAMERANGES:
{
- USHORT nId = ScColRowNameRangesDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScColRowNameRangesDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_UPDATECHART:
{
- BOOL bAll = FALSE;
+ sal_Bool bAll = false;
if( pReqArgs )
{
@@ -1822,7 +1822,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pScMod->InputKeyEvent( KeyEvent('=',KeyCode()) );
String aName = pDlg->GetSelectedName();
- pHdl->InsertFunction( aName, FALSE ); // ohne "()"
+ pHdl->InsertFunction( aName, false ); // ohne "()"
}
}
break;
@@ -1868,7 +1868,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
bool bShow;
const SfxPoolItem* pItem;
- if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, TRUE, &pItem ) == SFX_ITEM_SET) )
+ if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, sal_True, &pItem ) == SFX_ITEM_SET) )
bShow = ((const SfxBoolItem*) pItem)->GetValue();
else
bShow = !pNote->IsCaptionShown();
@@ -1898,14 +1898,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if ( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, pItem );
if ( pStringItem )
aChars = pStringItem->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
aFontName = pFontItem->GetValue();
@@ -1933,7 +1933,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pTabViewShell->GetSelectionScriptType() );
SfxAllItemSet aSet( GetPool() );
- aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
@@ -1941,8 +1941,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, false );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, false );
if ( pItem && pFontItem )
{
@@ -1993,7 +1993,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const String& rName = pHyper->GetName();
const String& rURL = pHyper->GetURL();
const String& rTarget = pHyper->GetTargetFrame();
- USHORT nType = (USHORT) pHyper->GetInsertMode();
+ sal_uInt16 nType = (sal_uInt16) pHyper->GetInsertMode();
pTabViewShell->InsertURL( rName, rURL, rTarget, nType );
rReq.Done();
@@ -2030,21 +2030,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
String aFilter;
String aOptions;
String aSource;
- ULONG nRefresh=0;
+ sal_uLong nRefresh=0;
- SFX_REQUEST_ARG( rReq, pFile, SfxStringItem, SID_FILE_NAME, sal_False );
- SFX_REQUEST_ARG( rReq, pSource, SfxStringItem, FN_PARAM_1, sal_False );
+ SFX_REQUEST_ARG( rReq, pFile, SfxStringItem, SID_FILE_NAME, false );
+ SFX_REQUEST_ARG( rReq, pSource, SfxStringItem, FN_PARAM_1, false );
if ( pFile && pSource )
{
aFile = pFile->GetValue();
aSource = pSource->GetValue();
- SFX_REQUEST_ARG( rReq, pFilter, SfxStringItem, SID_FILTER_NAME, sal_False );
+ SFX_REQUEST_ARG( rReq, pFilter, SfxStringItem, SID_FILTER_NAME, false );
if ( pFilter )
aFilter = pFilter->GetValue();
- SFX_REQUEST_ARG( rReq, pOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False );
+ SFX_REQUEST_ARG( rReq, pOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, false );
if ( pOptions )
aOptions = pOptions->GetValue();
- SFX_REQUEST_ARG( rReq, pRefresh, SfxUInt32Item, FN_PARAM_2, sal_False );
+ SFX_REQUEST_ARG( rReq, pRefresh, SfxUInt32Item, FN_PARAM_2, false );
if ( pRefresh )
nRefresh = pRefresh->GetValue();
}
@@ -2090,12 +2090,12 @@ void ScCellShell::ExecuteTrans( SfxRequest& rReq )
void ScCellShell::ExecuteExternalSource(
const String& _rFile, const String& _rFilter, const String& _rOptions,
- const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest )
+ const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest )
{
if ( _rFile.Len() && _rSource.Len() ) // filter may be empty
{
ScRange aLinkRange;
- BOOL bMove = FALSE;
+ sal_Bool bMove = false;
ScViewData* pData = GetViewData();
ScMarkData& rMark = pData->GetMarkData();
@@ -2103,14 +2103,14 @@ void ScCellShell::ExecuteExternalSource(
if ( rMark.IsMarked() )
{
rMark.GetMarkArea( aLinkRange );
- bMove = TRUE; // insert/delete cells to fit range
+ bMove = sal_True; // insert/delete cells to fit range
}
else
aLinkRange = ScRange( pData->GetCurX(), pData->GetCurY(), pData->GetTabNo() );
ScDocFunc aFunc(*pData->GetDocShell());
aFunc.InsertAreaLink( _rFile, _rFilter, _rOptions, _rSource,
- aLinkRange, _nRefresh, bMove, FALSE );
+ aLinkRange, _nRefresh, bMove, false );
_rRequest.Done();
}
else
@@ -2137,10 +2137,10 @@ void ScCellShell::ExecuteDataPilotDialog()
else // create new table
{
// select database range or data
- pTabViewShell->GetDBData( TRUE, SC_DB_OLD );
+ pTabViewShell->GetDBData( true, SC_DB_OLD );
ScMarkData& rMark = GetViewData()->GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
- pTabViewShell->MarkDataArea( FALSE );
+ pTabViewShell->MarkDataArea( false );
// output to cursor position for non-sheet data
ScAddress aDestPos( pData->GetCurX(), pData->GetCurY(),
@@ -2271,10 +2271,10 @@ void ScCellShell::ExecuteDataPilotDialog()
{
// start layout dialog
- USHORT nId = ScPivotLayoutWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScPivotLayoutWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : true );
}
}
@@ -2283,7 +2283,7 @@ IMPL_LINK( ScCellShell, DialogClosed, AbstractScLinkedAreaDlg*, EMPTYARG )
DBG_ASSERT( pImpl->m_pLinkedDlg, "ScCellShell::DialogClosed(): invalid request" );
DBG_ASSERT( pImpl->m_pRequest, "ScCellShell::DialogClosed(): invalid request" );
String sFile, sFilter, sOptions, sSource;
- ULONG nRefresh = 0;
+ sal_uLong nRefresh = 0;
if ( pImpl->m_pLinkedDlg->GetResult() == RET_OK )
{
@@ -2327,12 +2327,12 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
SCCOL nClipEndX;
SCROW nClipEndY;
pClipDoc->GetClipStart( nClipStartX, nClipStartY );
- pClipDoc->GetClipArea( nClipEndX, nClipEndY, TRUE );
+ pClipDoc->GetClipArea( nClipEndX, nClipEndY, sal_True );
nClipEndX = nClipEndX + nClipStartX;
nClipEndY = nClipEndY + nClipStartY; // GetClipArea returns the difference
ScRange aSource( nClipStartX, nClipStartY, nSourceTab, nClipEndX, nClipEndY, nSourceTab );
- BOOL bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() );
+ sal_Bool bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() );
if ( !bDone )
pTabViewShell->ErrorMessage( STR_ERR_DATAPILOT_INPUT );
}
@@ -2351,7 +2351,7 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
nFlags &= ~IDF_FORMULA;
pTabViewShell->PasteFromClip( nFlags, pClipDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bShowDialog ); // allow warning dialog
}
}
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 3440a4fae7ae..4cb71cc45bd4 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -77,7 +77,7 @@
using namespace com::sun::star;
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
//------------------------------------------------------------------
@@ -121,14 +121,14 @@ bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange )
return bRet;
}
-BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
+sal_Bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
{
ScTabViewShell* pTabViewShell = pData->GetViewShell();
ScDBData* pDBData = pTabViewShell->GetDBData();
ScDocument* pDoc = pData->GetDocument();
SCTAB nTab = pData->GetTabNo();
ScDirection eFillDir = DIR_TOP;
- BOOL bSort = TRUE;
+ sal_Bool bSort = sal_True;
ScRange aExternalRange;
if( rSortParam.nCol1 != rSortParam.nCol2 )
@@ -147,7 +147,7 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
SCCOL nStartCol = aExternalRange.aStart.Col();
SCROW nEndRow = aExternalRange.aEnd.Row();
SCCOL nEndCol = aExternalRange.aEnd.Col();
- pDoc->GetDataArea( aExternalRange.aStart.Tab(), nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false );
+ pDoc->GetDataArea( aExternalRange.aStart.Tab(), nStartCol, nStartRow, nEndCol, nEndRow, false, false );
aExternalRange.aStart.SetRow( nStartRow );
aExternalRange.aStart.SetCol( nStartCol );
aExternalRange.aEnd.SetRow( nEndRow );
@@ -156,7 +156,7 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
if(( rSortParam.nCol1 == rSortParam.nCol2 && aExternalRange.aStart.Col() != aExternalRange.aEnd.Col() ) ||
( rSortParam.nRow1 == rSortParam.nRow2 && aExternalRange.aStart.Row() != aExternalRange.aEnd.Row() ) )
{
- USHORT nFmt = SCA_VALID;
+ sal_uInt16 nFmt = SCA_VALID;
String aExtendStr,aCurrentStr;
pTabViewShell->AddHighlightRange( aExternalRange,Color( COL_LIGHTBLUE ) );
@@ -176,13 +176,13 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
{
if( bResult == BTN_EXTEND_RANGE )
{
- pTabViewShell->MarkRange( aExternalRange, FALSE );
+ pTabViewShell->MarkRange( aExternalRange, false );
pDBData->SetArea( nTab, aExternalRange.aStart.Col(), aExternalRange.aStart.Row(), aExternalRange.aEnd.Col(), aExternalRange.aEnd.Row() );
}
}
else
{
- bSort = FALSE;
+ bSort = false;
pData->GetDocShell()->CancelAutoDBRange();
}
@@ -205,7 +205,7 @@ namespace
void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
ScModule* pScMod = SC_MOD();
@@ -224,14 +224,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
// check if database beamer is open
SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
- BOOL bWasOpen = FALSE;
+ sal_Bool bWasOpen = false;
{
uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")),
frame::FrameSearchFlag::CHILDREN);
if ( xBeamerFrame.is() )
- bWasOpen = TRUE;
+ bWasOpen = sal_True;
}
if ( bWasOpen )
@@ -244,12 +244,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
// show database beamer: SfxViewFrame call must be synchronous
- pViewFrame->ExecuteSlot( rReq, (BOOL) FALSE ); // FALSE = synchronous
+ pViewFrame->ExecuteSlot( rReq, (sal_Bool) false ); // sal_False = synchronous
// select current database in database beamer
ScImportParam aImportParam;
- ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD); // don't create if none found
+ ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD); // don't create if none found
if (pDBData)
pDBData->GetImportParam( aImportParam );
@@ -261,8 +261,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_REIMPORT_DATA:
{
- BOOL bOk = FALSE;
- ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD);
+ sal_Bool bOk = false;
+ ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD);
if (pDBData)
{
ScImportParam aImportParam;
@@ -271,7 +271,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
pTabViewShell->ImportData( aImportParam );
pDBData->SetImportParam( aImportParam ); //! Undo ??
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -285,12 +285,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_REFRESH_DBAREA:
{
- ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD);
+ ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD);
if (pDBData)
{
// Import wiederholen wie SID_REIMPORT_DATA
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
if (aImportParam.bImport && !pDBData->HasImportSelection())
@@ -360,7 +360,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDBData* pDBData = pTabViewShell->GetDBData();
pDBData->GetSubTotalParam( aSubTotalParam );
- aSubTotalParam.bRemoveOnly = FALSE;
+ aSubTotalParam.bRemoveOnly = false;
aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -387,8 +387,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
else // if (bResult == SCRET_REMOVE)
{
pOutSet = &aArgSet;
- aSubTotalParam.bRemoveOnly = TRUE;
- aSubTotalParam.bReplace = TRUE;
+ aSubTotalParam.bRemoveOnly = sal_True;
+ aSubTotalParam.bReplace = sal_True;
aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA,
GetViewData(),
&aSubTotalParam ) );
@@ -424,7 +424,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDocument* pDoc = GetViewData()->GetDocument();
pDBData->GetSortParam( aSortParam );
- BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab );
+ sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab );
if( nCol < aSortParam.nCol1 )
nCol = aSortParam.nCol1;
@@ -432,17 +432,17 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
nCol = aSortParam.nCol2;
aSortParam.bHasHeader = bHasHeader;
- aSortParam.bByRow = TRUE;
- aSortParam.bCaseSens = FALSE;
- aSortParam.bNaturalSort = FALSE;
- aSortParam.bIncludePattern = TRUE;
- aSortParam.bInplace = TRUE;
- aSortParam.bDoSort[0] = TRUE;
+ aSortParam.bByRow = true;
+ aSortParam.bCaseSens = false;
+ aSortParam.bNaturalSort = false;
+ aSortParam.bIncludePattern = true;
+ aSortParam.bInplace = true;
+ aSortParam.bDoSort[0] = true;
aSortParam.nField[0] = nCol;
aSortParam.bAscending[0] = (nSlotId == SID_SORT_ASCENDING);
- for ( USHORT i=1; i<MAXSORT; i++ )
- aSortParam.bDoSort[i] = FALSE;
+ for ( sal_uInt16 i=1; i<MAXSORT; i++ )
+ aSortParam.bDoSort[i] = false;
aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) );
@@ -473,51 +473,51 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScDocument* pDoc = GetViewData()->GetDocument();
pDBData->GetSortParam( aSortParam );
- BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
+ sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
if( bHasHeader )
aSortParam.bHasHeader = bHasHeader;
- aSortParam.bInplace = TRUE; // von Basic immer
+ aSortParam.bInplace = sal_True; // von Basic immer
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( SID_SORT_BYROW, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_BYROW, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bByRow = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_HASHEADER, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_HASHEADER, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bHasHeader = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_CASESENS, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_CASESENS, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bCaseSens = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_NATURALSORT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_NATURALSORT, true, &pItem ) == SFX_ITEM_SET )
aSortParam.bNaturalSort = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_ATTRIBS, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_ATTRIBS, true, &pItem ) == SFX_ITEM_SET )
aSortParam.bIncludePattern = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pArgs->GetItemState( SID_SORT_USERDEF, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( SID_SORT_USERDEF, sal_True, &pItem ) == SFX_ITEM_SET )
{
- USHORT nUserIndex = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nUserIndex = ((const SfxUInt16Item*)pItem)->GetValue();
aSortParam.bUserDef = ( nUserIndex != 0 );
if ( nUserIndex )
aSortParam.nUserIndex = nUserIndex - 1; // Basic: 1-basiert
}
SCCOLROW nField0 = 0;
- if ( pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
nField0 = ((const SfxInt32Item*)pItem)->GetValue();
aSortParam.bDoSort[0] = ( nField0 != 0 );
aSortParam.nField[0] = nField0 > 0 ? (nField0-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bAscending[0] = ((const SfxBoolItem*)pItem)->GetValue();
SCCOLROW nField1 = 0;
- if ( pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem ) == SFX_ITEM_SET )
nField1 = ((const SfxInt32Item*)pItem)->GetValue();
aSortParam.bDoSort[1] = ( nField1 != 0 );
aSortParam.nField[1] = nField1 > 0 ? (nField1-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bAscending[1] = ((const SfxBoolItem*)pItem)->GetValue();
SCCOLROW nField2 = 0;
- if ( pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem ) == SFX_ITEM_SET )
nField2 = ((const SfxInt32Item*)pItem)->GetValue();
aSortParam.bDoSort[2] = ( nField2 != 0 );
aSortParam.nField[2] = nField2 > 0 ? (nField2-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem ) == SFX_ITEM_SET )
aSortParam.bAscending[2] = ((const SfxBoolItem*)pItem)->GetValue();
// Teilergebnisse bei Bedarf neu
@@ -540,7 +540,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxItemSet aArgSet( GetPool(), SCITEM_SORTDATA, SCITEM_SORTDATA );
pDBData->GetSortParam( aSortParam );
- BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
+ sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
if( bHasHeader )
aSortParam.bHasHeader = bHasHeader;
@@ -574,7 +574,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
rOutParam.bNaturalSort ) );
rReq.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
rOutParam.bIncludePattern ) );
- USHORT nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
+ sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
rReq.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
if ( rOutParam.bDoSort[0] )
{
@@ -617,16 +617,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_FILTER with arguments?");
pTabViewShell->Query( ((const ScQueryItem&)
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, TRUE );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, sal_True );
rReq.Done();
}
else
{
- USHORT nId = ScFilterDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScFilterDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
}
break;
@@ -638,16 +638,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_SPECIAL_FILTER with arguments?");
pTabViewShell->Query( ((const ScQueryItem&)
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, TRUE );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, sal_True );
rReq.Done();
}
else
{
- USHORT nId = ScSpecialFilterDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSpecialFilterDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
}
break;
@@ -656,7 +656,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState( SCITEM_QUERYDATA, TRUE, &pItem ) )
+ pReqArgs->GetItemState( SCITEM_QUERYDATA, sal_True, &pItem ) )
{
const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(*pItem);
@@ -674,9 +674,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScRange aAdvSource;
if (rQueryItem.GetAdvancedQuerySource(aAdvSource))
- pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, TRUE );
+ pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, sal_True );
else
- pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, TRUE );
+ pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, sal_True );
rReq.Done( *pReqArgs );
}
}
@@ -690,9 +690,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
pDBData->GetQueryParam( aParam );
SCSIZE nEC = aParam.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
- aParam.GetEntry(i).bDoQuery = FALSE;
- aParam.bDuplicate = TRUE;
- pTabViewShell->Query( aParam, NULL, TRUE );
+ aParam.GetEntry(i).bDoQuery = false;
+ aParam.bDuplicate = sal_True;
+ pTabViewShell->Query( aParam, NULL, sal_True );
rReq.Done();
}
break;
@@ -711,7 +711,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState( SCITEM_PIVOTDATA, TRUE, &pItem ) )
+ pReqArgs->GetItemState( SCITEM_PIVOTDATA, sal_True, &pItem ) )
{
SCTAB nCurTab = GetViewData()->GetTabNo();
SCTAB nRefTab = GetViewData()->GetRefTabNo();
@@ -747,11 +747,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_DEFINE_DBNAME:
{
- USHORT nId = ScDbNameDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScDbNameDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -782,11 +782,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) );
List aList;
- USHORT nDBCount = pDBCol->GetCount();
+ sal_uInt16 nDBCount = pDBCol->GetCount();
ScDBData* pDbData = NULL;
String* pDBName = NULL;
- for ( USHORT i=0; i < nDBCount; i++ )
+ for ( sal_uInt16 i=0; i < nDBCount; i++ )
{
pDbData = (ScDBData*)(pDBCol->At( i ));
if ( pDbData )
@@ -850,11 +850,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScValidationMode eMode = SC_VALID_ANY;
ScConditionMode eOper = SC_COND_EQUAL;
String aExpr1, aExpr2;
- BOOL bBlank = TRUE;
+ sal_Bool bBlank = sal_True;
sal_Int16 nListType = ValidListType::UNSORTED;
- BOOL bShowHelp = FALSE;
+ sal_Bool bShowHelp = false;
String aHelpTitle, aHelpText;
- BOOL bShowError = FALSE;
+ sal_Bool bShowError = false;
ScValidErrorStyle eErrStyle = SC_VALERR_STOP;
String aErrTitle, aErrText;
@@ -863,7 +863,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SCROW nCurY = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aCursorPos( nCurX, nCurY, nTab );
- ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
nCurX, nCurY, nTab, ATTR_VALIDDATA ))->GetValue();
if ( nIndex )
{
@@ -872,7 +872,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
eMode = pOldData->GetDataMode();
eOper = pOldData->GetOperation();
- ULONG nNumFmt = 0;
+ sal_uLong nNumFmt = 0;
if ( eMode == SC_VALID_DATE || eMode == SC_VALID_TIME )
{
short nType = ( eMode == SC_VALID_DATE ) ? NUMBERFORMAT_DATE
@@ -888,8 +888,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
bShowHelp = pOldData->GetInput( aHelpTitle, aHelpText );
bShowError = pOldData->GetErrMsg( aErrTitle, aErrText, eErrStyle );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<USHORT>(eMode) ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>(eOper) ) );
+ aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) );
+ aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE1, aExpr1 ) );
aArgSet.Put( SfxStringItem( FID_VALID_VALUE2, aExpr2 ) );
aArgSet.Put( SfxBoolItem( FID_VALID_BLANK, bBlank ) );
@@ -898,7 +898,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aHelpTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aHelpText ) );
aArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, bShowError ) );
- aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<USHORT>(eErrStyle) ) );
+ aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aErrTitle ) );
aArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aErrText ) );
}
@@ -915,11 +915,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- if ( pOutSet->GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET )
eMode = (ScValidationMode) ((const SfxAllEnumItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET )
eOper = (ScConditionMode) ((const SfxAllEnumItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET )
{
String aTemp1 = ((const SfxStringItem*)pItem)->GetValue();
if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME)
@@ -929,14 +929,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (pDoc->GetFormatTable()->IsNumberFormat(aTemp1, nNumIndex, nVal))
aExpr1 =String( ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
- ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE));
+ ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True));
else
aExpr1 = aTemp1;
}
else
aExpr1 = aTemp1;
}
- if ( pOutSet->GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET )
{
String aTemp2 = ((const SfxStringItem*)pItem)->GetValue();
if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME)
@@ -946,7 +946,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (pDoc->GetFormatTable()->IsNumberFormat(aTemp2, nNumIndex, nVal))
aExpr2 =String( ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
- ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE));
+ ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True));
else
aExpr2 = aTemp2;
}
@@ -954,25 +954,25 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
aExpr2 = aTemp2;
}
- if ( pOutSet->GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET )
bBlank = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET )
nListType = ((const SfxInt16Item*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET )
bShowHelp = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aHelpTitle = ((const SfxStringItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aHelpText = ((const SfxStringItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET )
bShowError = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET )
eErrStyle = (ScValidErrorStyle) ((const SfxAllEnumItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET )
aErrTitle = ((const SfxStringItem*)pItem)->GetValue();
- if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET )
aErrText = ((const SfxStringItem*)pItem)->GetValue();
ScValidationData aData( eMode, eOper, aExpr1, aExpr2, pDoc, aCursorPos );
@@ -1061,11 +1061,11 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
SCROW nPosY = pData->GetCurY();
SCTAB nTab = pData->GetTabNo();
- BOOL bAutoFilter = FALSE;
- BOOL bAutoFilterTested = FALSE;
+ sal_Bool bAutoFilter = false;
+ sal_Bool bAutoFilterTested = false;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -1074,8 +1074,8 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
{
// importierte Daten ohne Selektion
// oder Filter,Sortierung,Teilergebis (auch ohne Import)
- BOOL bOk = FALSE;
- ScDBData* pDBData = pTabViewShell->GetDBData(FALSE,SC_DB_OLD);
+ sal_Bool bOk = false;
+ ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
if (pDBData && pDoc->GetChangeTrack() == NULL)
{
if ( pDBData->HasImportParam() )
@@ -1125,7 +1125,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
case SID_REIMPORT_DATA:
{
// nur importierte Daten ohne Selektion
- ScDBData* pDBData = pTabViewShell->GetDBData(FALSE,SC_DB_OLD);
+ ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
if (!pDBData || !pDBData->HasImportParam() || pDBData->HasImportSelection() ||
pDoc->GetChangeTrack()!=NULL)
{
@@ -1137,7 +1137,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
case SID_VIEW_DATA_SOURCE_BROWSER:
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
- rSet.Put(SfxVisibilityItem(nWhich, sal_False));
+ rSet.Put(SfxVisibilityItem(nWhich, false));
else
// get state (BoolItem) from SfxViewFrame
pTabViewShell->GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
@@ -1145,9 +1145,9 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
break;
case SID_SBA_BRW_INSERT:
{
- // SBA will ein BOOL-Item, damit ueberhaupt enabled
+ // SBA will ein sal_Bool-Item, damit ueberhaupt enabled
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
rSet.Put(SfxBoolItem(nWhich, bEnable));
}
break;
@@ -1158,7 +1158,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
if (!bAutoFilterTested)
{
bAutoFilter = pDoc->HasAutoFilter( nPosX, nPosY, nTab );
- bAutoFilterTested = TRUE;
+ bAutoFilterTested = sal_True;
}
if ( nWhich == SID_AUTO_FILTER )
{
@@ -1186,16 +1186,16 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
SCTAB nStartTab, nEndTab;
- BOOL bAnyQuery = FALSE;
+ sal_Bool bAnyQuery = false;
- BOOL bSelected = (GetViewData()->GetSimpleArea(
+ sal_Bool bSelected = (GetViewData()->GetSimpleArea(
nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab )
== SC_MARK_SIMPLE);
if ( bSelected )
{
if (nStartCol==nEndCol && nStartRow==nEndRow)
- bSelected = FALSE;
+ bSelected = false;
}
else
{
@@ -1213,7 +1213,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
ScQueryParam aParam;
pDBData->GetQueryParam( aParam );
if ( aParam.GetEntry(0).bDoQuery )
- bAnyQuery = TRUE;
+ bAnyQuery = sal_True;
}
if ( !bAnyQuery )
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index ee5285e8ffea..06c960a8ac0a 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -73,7 +73,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
ScModule* pScMod = SC_MOD();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -88,7 +88,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
// inplace macht die EditShell Aerger...
//! kann nicht immer umgeschaltet werden ????
if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace())
- pTabViewShell->SetDontSwitch(TRUE); // EditShell nicht abschalten
+ pTabViewShell->SetDontSwitch(sal_True); // EditShell nicht abschalten
// kein break
case FID_CELL_FORMAT:
@@ -101,7 +101,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pScMod->InputEnterHandler();
pTabViewShell->UpdateInputHandler();
- pTabViewShell->SetDontSwitch(FALSE);
+ pTabViewShell->SetDontSwitch(false);
break;
@@ -125,7 +125,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
* 1: ER Click erweitert Selektion
* 2: ERG Click definiert weitere Selektion
*/
- UINT16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue();
+ sal_uInt16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue();
switch ( nMode )
{
@@ -143,7 +143,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
// no arguments (also executed by double click on the status bar controller):
// advance to next selection mode
- USHORT nModifiers = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nModifiers = pTabViewShell->GetLockedModifiers();
switch ( nModifiers )
{
case KEY_SHIFT: nModifiers = KEY_MOD1; break; // EXT -> ADD
@@ -247,7 +247,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else if ( aString.Len() > 0 && ( aString.GetChar(0) == '=' || aString.GetChar(0) == '+' || aString.GetChar(0) == '-' ) )
{
- pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, TRUE, pData );
+ pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, sal_True, pData );
}
else
{
@@ -302,22 +302,22 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_FUNCTION:
{
- USHORT nId = SID_OPENDLG_FUNCTION;
+ sal_uInt16 nId = SID_OPENDLG_FUNCTION;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
rReq.Ignore();
}
break;
case SID_OPENDLG_CONSOLIDATE:
{
- USHORT nId = ScConsolidateDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScConsolidateDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -339,10 +339,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
ATTR_PATTERN_END );
const SfxPoolItem* pAttr = NULL;
- USHORT nWhich = 0;
+ sal_uInt16 nWhich = 0;
for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ )
- if ( pReqArgs->GetItemState( nWhich, TRUE, &pAttr ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nWhich, sal_True, &pAttr ) == SFX_ITEM_SET )
pNewSet->Put( *pAttr );
pTabViewShell->ApplyAttributes( pNewSet, pEmptySet );
@@ -365,31 +365,31 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_SOLVE:
{
- USHORT nId = ScSolverDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSolverDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_OPENDLG_OPTSOLVER:
{
- USHORT nId = ScOptSolverDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScOptSolverDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
case SID_OPENDLG_TABOP:
{
- USHORT nId = ScTabOpDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScTabOpDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -431,7 +431,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
String aName;
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetName( nTab, aBaseName );
aBaseName += '_';
@@ -440,13 +440,13 @@ void ScCellShell::Execute( SfxRequest& rReq )
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
- BOOL bPrefix = pDoc->ValidTabName( aBaseName );
+ sal_Bool bPrefix = pDoc->ValidTabName( aBaseName );
DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
while ( pDoc->IsScenario(nTab+i) )
i++;
- BOOL bValid;
+ sal_Bool bValid;
SCTAB nDummy;
do
{
@@ -465,9 +465,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
String aArgName;
String aArgComment;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_SCENARIOS, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_SCENARIOS, sal_True, &pItem ) == SFX_ITEM_SET )
aArgName = ((const SfxStringItem*)pItem)->GetValue();
- if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, sal_True, &pItem ) == SFX_ITEM_SET )
aArgComment = ((const SfxStringItem*)pItem)->GetValue();
aColor = Color( COL_LIGHTGRAY ); // Default
@@ -479,11 +479,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else
{
- BOOL bSheetProtected = pDoc->IsTabProtected(nTab);
+ sal_Bool bSheetProtected = pDoc->IsTabProtected(nTab);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, FALSE,bSheetProtected);
+ AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, false,bSheetProtected);
DBG_ASSERT(pNewDlg, "Dialog create fail!");
if ( pNewDlg->Execute() == RET_OK )
{
@@ -522,8 +522,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_ROW_HEIGHT );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
if( ! rReq.IsAPI() )
rReq.Done();
}
@@ -531,7 +531,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
ScViewData* pData = GetViewData();
FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
- USHORT nCurHeight = pData->GetDocument()->
+ sal_uInt16 nCurHeight = pData->GetDocument()->
GetRowHeight( pData->GetCurY(),
pData->GetTabNo() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -549,10 +549,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT, (sal_uInt16)nVal );
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_ROW_HEIGHT, (USHORT)TwipsToEvenHMM(nVal) ) );
+ rReq.AppendItem( SfxUInt16Item( FID_ROW_HEIGHT, (sal_uInt16)TwipsToEvenHMM(nVal) ) );
rReq.Done();
}
@@ -568,8 +568,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_ROW_OPT_HEIGHT );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_OPTIMAL,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_OPTIMAL,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
ScGlobal::nLastRowHeightExtra = rUInt16Item.GetValue();
if( ! rReq.IsAPI() )
@@ -594,11 +594,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_OPTIMAL, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_OPTIMAL, (sal_uInt16)nVal );
ScGlobal::nLastRowHeightExtra = nVal;
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_ROW_OPT_HEIGHT, (USHORT)TwipsToEvenHMM(nVal) ) );
+ rReq.AppendItem( SfxUInt16Item( FID_ROW_OPT_HEIGHT, (sal_uInt16)TwipsToEvenHMM(nVal) ) );
rReq.Done();
}
@@ -614,8 +614,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_COL_WIDTH );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
if( ! rReq.IsAPI() )
rReq.Done();
}
@@ -623,7 +623,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
ScViewData* pData = GetViewData();
- USHORT nCurHeight = pData->GetDocument()->
+ sal_uInt16 nCurHeight = pData->GetDocument()->
GetColWidth( pData->GetCurX(),
pData->GetTabNo() );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -641,10 +641,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, (sal_uInt16)nVal );
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_COL_WIDTH, (USHORT)TwipsToEvenHMM(nVal)) );
+ rReq.AppendItem( SfxUInt16Item( FID_COL_WIDTH, (sal_uInt16)TwipsToEvenHMM(nVal)) );
rReq.Done();
}
@@ -660,8 +660,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_COL_OPT_WIDTH );
// #101390#; the value of the macro is in HMM so use HMMToTwips to convert
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL,
- sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL,
+ sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) );
ScGlobal::nLastColWidthExtra = rUInt16Item.GetValue();
if( ! rReq.IsAPI() )
@@ -685,11 +685,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
long nVal = pDlg->GetInputValue();
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, (USHORT)nVal );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, (sal_uInt16)nVal );
ScGlobal::nLastColWidthExtra = nVal;
// #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert
- rReq.AppendItem( SfxUInt16Item( FID_COL_OPT_WIDTH, (USHORT)TwipsToEvenHMM(nVal) ) );
+ rReq.AppendItem( SfxUInt16Item( FID_COL_OPT_WIDTH, (sal_uInt16)TwipsToEvenHMM(nVal) ) );
rReq.Done();
}
delete pDlg;
@@ -698,24 +698,24 @@ void ScCellShell::Execute( SfxRequest& rReq )
break;
case FID_COL_OPT_DIRECT:
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH );
rReq.Done();
break;
case FID_ROW_HIDE:
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT, 0 );
rReq.Done();
break;
case FID_ROW_SHOW:
- pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_SHOW, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_SHOW, 0 );
rReq.Done();
break;
case FID_COL_HIDE:
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, 0 );
rReq.Done();
break;
case FID_COL_SHOW:
- pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_SHOW, 0 );
+ pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_SHOW, 0 );
rReq.Done();
break;
@@ -737,7 +737,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
// test whether to merge or to split
bool bMerge = false;
- BOOL bCenter = FALSE;
+ sal_Bool bCenter = false;
switch( nSlot )
{
case FID_MERGE_ON:
@@ -748,7 +748,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
break;
case FID_MERGE_TOGGLE:
{
- bCenter = TRUE;
+ bCenter = true;
SfxPoolItem* pItem = 0;
if( rBindings.QueryState( nSlot, pItem ) >= SFX_ITEM_DEFAULT )
bMerge = !static_cast< SfxBoolItem* >( pItem )->GetValue();
@@ -759,17 +759,17 @@ void ScCellShell::Execute( SfxRequest& rReq )
if( bMerge )
{
// merge - check if to move contents of covered cells
- BOOL bMoveContents = FALSE;
- BOOL bApi = rReq.IsAPI();
+ sal_Bool bMoveContents = false;
+ sal_Bool bApi = rReq.IsAPI();
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
{
DBG_ASSERT(pItem && pItem->ISA(SfxBoolItem), "falsches Item");
bMoveContents = ((const SfxBoolItem*)pItem)->GetValue();
}
- if (pTabViewShell->MergeCells( bApi, bMoveContents, TRUE, bCenter ))
+ if (pTabViewShell->MergeCells( bApi, bMoveContents, true, bCenter ))
{
if (!bApi && bMoveContents) // "ja" im Dialog geklickt
rReq.AppendItem( SfxBoolItem( nSlot, bMoveContents ) );
@@ -803,7 +803,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
- pTabViewShell->MarkDataArea( TRUE );
+ pTabViewShell->MarkDataArea( sal_True );
GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab,
nEndCol,nEndRow,nEndTab );
@@ -815,7 +815,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
{
const SfxStringItem& rNameItem = (const SfxStringItem&)pReqArgs->Get( SID_AUTOFORMAT );
ScAutoFormat* pFormat = ScGlobal::GetAutoFormat();
- USHORT nIndex = pFormat->FindIndexPerName( rNameItem.GetValue() );
+ sal_uInt16 nIndex = pFormat->FindIndexPerName( rNameItem.GetValue() );
pTabViewShell->AutoFormat( nIndex );
@@ -881,7 +881,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_DETECTIVE_FILLMODE:
{
- BOOL bOldMode = pTabViewShell->IsAuditShell();
+ sal_Bool bOldMode = pTabViewShell->IsAuditShell();
pTabViewShell->SetAuditShell( !bOldMode );
pTabViewShell->Invalidate( nSlot );
}
@@ -889,11 +889,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_CONDFRMT:
{
- USHORT nId = ScCondFormatDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index cf8a0fcb330d..d5062793940d 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -55,7 +55,7 @@
//------------------------------------------------------------------
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
void ScCellShell::ExecuteCursor( SfxRequest& rReq )
@@ -63,10 +63,10 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
ScViewData* pData = GetViewData();
ScTabViewShell* pTabViewShell = pData->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
SCsCOLROW nRepeat = 1;
- BOOL bSel = FALSE;
- BOOL bKeep = FALSE;
+ sal_Bool bSel = false;
+ sal_Bool bKeep = false;
if ( pReqArgs != NULL )
{
@@ -80,13 +80,13 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
{
// evaluate locked selection mode
- USHORT nLocked = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers();
if ( nLocked & KEY_SHIFT )
- bSel = TRUE; // EXT
+ bSel = sal_True; // EXT
else if ( nLocked & KEY_MOD1 )
{
// ADD mode: keep the selection, start a new block when marking with shift again
- bKeep = TRUE;
+ bKeep = true;
}
}
@@ -280,7 +280,7 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
void ScCellShell::ExecuteMove( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
if(nSlotId != SID_CURSORTOPOFSCREEN && nSlotId != SID_CURSORENDOFSCREEN)
pTabViewShell->ExecuteInputDirect();
@@ -300,25 +300,25 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
// weil das ScSbxRange-Objekt bei Eingaben die Markierung veraendert
case SID_NEXT_UNPROTECT:
- pTabViewShell->FindNextUnprot( FALSE, !rReq.IsAPI() );
+ pTabViewShell->FindNextUnprot( false, !rReq.IsAPI() );
break;
case SID_PREV_UNPROTECT:
- pTabViewShell->FindNextUnprot( TRUE, !rReq.IsAPI() );
+ pTabViewShell->FindNextUnprot( sal_True, !rReq.IsAPI() );
break;
case SID_CURSORENTERUP:
if (rReq.IsAPI())
- pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, false );
else
- pTabViewShell->MoveCursorEnter( TRUE );
+ pTabViewShell->MoveCursorEnter( sal_True );
break;
case SID_CURSORENTERDOWN:
if (rReq.IsAPI())
- pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, false );
else
- pTabViewShell->MoveCursorEnter( FALSE );
+ pTabViewShell->MoveCursorEnter( false );
break;
case SID_SELECT_COL:
@@ -362,11 +362,11 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
break;
case SID_CURSORTOPOFSCREEN:
- pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, false );
break;
case SID_CURSORENDOFSCREEN:
- pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, FALSE );
+ pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, false );
break;
default:
@@ -379,7 +379,7 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
void ScCellShell::ExecutePageSel( SfxRequest& rReq )
{
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
switch ( nSlotId )
{
case SID_CURSORHOME_SEL: rReq.SetSlot( SID_CURSORHOME ); break;
@@ -390,7 +390,7 @@ void ScCellShell::ExecutePageSel( SfxRequest& rReq )
OSL_FAIL("Unbekannte Message bei ViewShell (ExecutePageSel)");
return;
}
- rReq.AppendItem( SfxBoolItem(FN_PARAM_2, TRUE) );
+ rReq.AppendItem( SfxBoolItem(FN_PARAM_2, sal_True) );
ExecuteSlot( rReq, GetInterface() );
}
@@ -398,9 +398,9 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bSel = FALSE;
- BOOL bKeep = FALSE;
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bSel = false;
+ sal_Bool bKeep = false;
if ( pReqArgs != NULL )
{
@@ -412,13 +412,13 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
{
// evaluate locked selection mode
- USHORT nLocked = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers();
if ( nLocked & KEY_SHIFT )
- bSel = TRUE; // EXT
+ bSel = sal_True; // EXT
else if ( nLocked & KEY_MOD1 )
{
// ADD mode: keep the selection, start a new block when marking with shift again
- bKeep = TRUE;
+ bKeep = true;
}
}
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 79ea4b61b2ef..0f24a98e2bf4 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -85,7 +85,7 @@ ScColBar::~ScColBar()
{
}
-inline BOOL ScColBar::UseNumericHeader() const
+inline sal_Bool ScColBar::UseNumericHeader() const
{
return pViewData->GetDocument()->GetAddressConvention() == formula::FormulaGrammar::CONV_XL_R1C1;
}
@@ -95,14 +95,14 @@ SCCOLROW ScColBar::GetPos()
return pViewData->GetPosX(eWhich);
}
-USHORT ScColBar::GetEntrySize( SCCOLROW nEntryNo )
+sal_uInt16 ScColBar::GetEntrySize( SCCOLROW nEntryNo )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
if (pDoc->ColHidden(static_cast<SCCOL>(nEntryNo), nTab))
return 0;
else
- return (USHORT) ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() );
+ return (sal_uInt16) ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() );
}
String ScColBar::GetEntryText( SCCOLROW nEntryNo )
@@ -112,9 +112,9 @@ String ScColBar::GetEntryText( SCCOLROW nEntryNo )
: ScColToAlpha( static_cast<SCCOL>(nEntryNo) );
}
-void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
+void ScColBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize )
{
- USHORT nSizeTwips;
+ sal_uInt16 nSizeTwips;
ScSizeMode eMode = SC_SIZE_DIRECT;
if (nNewSize>0 && nNewSize<10) nNewSize=10; // (Pixel)
@@ -124,7 +124,7 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
eMode = SC_SIZE_OPTIMAL;
}
else
- nSizeTwips = (USHORT) ( nNewSize / pViewData->GetPPTX() );
+ nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTX() );
ScMarkData& rMark = pViewData->GetMarkData();
@@ -160,7 +160,7 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
nRangeCnt = 1;
}
- pViewData->GetView()->SetWidthOrHeight( TRUE, nRangeCnt, pRanges, eMode, nSizeTwips );
+ pViewData->GetView()->SetWidthOrHeight( sal_True, nRangeCnt, pRanges, eMode, nSizeTwips );
delete[] pRanges;
}
@@ -169,10 +169,10 @@ void ScColBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd )
SCCOLROW nRange[2];
nRange[0] = nStart;
nRange[1] = nEnd;
- pViewData->GetView()->SetWidthOrHeight( TRUE, 1, nRange, SC_SIZE_DIRECT, 0 );
+ pViewData->GetView()->SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, 0 );
}
-void ScColBar::SetMarking( BOOL bSet )
+void ScColBar::SetMarking( sal_Bool bSet )
{
pViewData->GetMarkData().SetMarking( bSet );
if (!bSet)
@@ -201,19 +201,19 @@ void ScColBar::SelectWindow()
}
pViewSh->ActivatePart( eActive );
- pFuncSet->SetColumn( TRUE );
+ pFuncSet->SetColumn( sal_True );
pFuncSet->SetWhich( eActive );
pViewSh->ActiveGrabFocus();
}
-BOOL ScColBar::IsDisabled()
+sal_Bool ScColBar::IsDisabled()
{
ScModule* pScMod = SC_MOD();
return pScMod->IsFormulaMode() || pScMod->IsModalMode();
}
-BOOL ScColBar::ResizeAllowed()
+sal_Bool ScColBar::ResizeAllowed()
{
return !pViewData->HasEditView( pViewData->GetActivePart() );
}
@@ -233,7 +233,7 @@ String ScColBar::GetDragHelp( long nVal )
return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_WIDTH) );
}
-BOOL ScColBar::IsLayoutRTL() // overloaded only for columns
+sal_Bool ScColBar::IsLayoutRTL() // overloaded only for columns
{
return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
}
@@ -260,7 +260,7 @@ SCCOLROW ScRowBar::GetPos()
return pViewData->GetPosY(eWhich);
}
-USHORT ScRowBar::GetEntrySize( SCCOLROW nEntryNo )
+sal_uInt16 ScRowBar::GetEntrySize( SCCOLROW nEntryNo )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
@@ -268,7 +268,7 @@ USHORT ScRowBar::GetEntrySize( SCCOLROW nEntryNo )
if (pDoc->RowHidden(nEntryNo, nTab, NULL, &nLastRow))
return 0;
else
- return (USHORT) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo,
+ return (sal_uInt16) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo,
nTab ), pViewData->GetPPTY() );
}
@@ -277,9 +277,9 @@ String ScRowBar::GetEntryText( SCCOLROW nEntryNo )
return String::CreateFromInt32( nEntryNo + 1 );
}
-void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
+void ScRowBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize )
{
- USHORT nSizeTwips;
+ sal_uInt16 nSizeTwips;
ScSizeMode eMode = SC_SIZE_DIRECT;
if (nNewSize>0 && nNewSize<10) nNewSize=10; // (Pixel)
@@ -289,7 +289,7 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
eMode = SC_SIZE_OPTIMAL;
}
else
- nSizeTwips = (USHORT) ( nNewSize / pViewData->GetPPTY() );
+ nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTY() );
ScMarkData& rMark = pViewData->GetMarkData();
@@ -325,7 +325,7 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
nRangeCnt = 1;
}
- pViewData->GetView()->SetWidthOrHeight( FALSE, nRangeCnt, pRanges, eMode, nSizeTwips );
+ pViewData->GetView()->SetWidthOrHeight( false, nRangeCnt, pRanges, eMode, nSizeTwips );
delete[] pRanges;
}
@@ -334,10 +334,10 @@ void ScRowBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd )
SCCOLROW nRange[2];
nRange[0] = nStart;
nRange[1] = nEnd;
- pViewData->GetView()->SetWidthOrHeight( FALSE, 1, nRange, SC_SIZE_DIRECT, 0 );
+ pViewData->GetView()->SetWidthOrHeight( false, 1, nRange, SC_SIZE_DIRECT, 0 );
}
-void ScRowBar::SetMarking( BOOL bSet )
+void ScRowBar::SetMarking( sal_Bool bSet )
{
pViewData->GetMarkData().SetMarking( bSet );
if (!bSet)
@@ -366,19 +366,19 @@ void ScRowBar::SelectWindow()
}
pViewSh->ActivatePart( eActive );
- pFuncSet->SetColumn( FALSE );
+ pFuncSet->SetColumn( false );
pFuncSet->SetWhich( eActive );
pViewSh->ActiveGrabFocus();
}
-BOOL ScRowBar::IsDisabled()
+sal_Bool ScRowBar::IsDisabled()
{
ScModule* pScMod = SC_MOD();
return pScMod->IsFormulaMode() || pScMod->IsModalMode();
}
-BOOL ScRowBar::ResizeAllowed()
+sal_Bool ScRowBar::ResizeAllowed()
{
return !pViewData->HasEditView( pViewData->GetActivePart() );
}
@@ -407,7 +407,7 @@ SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo )
return pDoc->GetHiddenRowCount( nEntryNo, nTab );
}
-BOOL ScRowBar::IsMirrored() // overloaded only for rows
+sal_Bool ScRowBar::IsMirrored() // overloaded only for rows
{
return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
}
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 98b81701b805..3607a8dc7a2a 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -71,7 +71,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
ScDocument* pDoc = GetViewData()->GetDocument();
ScDBCollection* pDBCol = pDoc->GetDBCollection();
- USHORT nFoundAt = 0;
+ sal_uInt16 nFoundAt = 0;
if ( pDBCol->SearchName( rDBName, nFoundAt ) )
{
ScDBData* pData = (*pDBCol)[nFoundAt];
@@ -89,7 +89,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
SetTabNo( nTab );
MoveCursorAbs( nStartCol, nStartRow, ScFollowMode( SC_FOLLOW_JUMP ),
- FALSE, FALSE ); // bShift,bControl
+ false, false ); // bShift,bControl
DoneBlockMode();
InitBlockMode( nStartCol, nStartRow, nTab );
MarkCursor( nEndCol, nEndRow, nTab );
@@ -100,7 +100,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
// aktuellen Datenbereich fuer Sortieren / Filtern suchen
-ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows )
+ScDBData* ScDBFunc::GetDBData( sal_Bool bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDBData* pData = NULL;
@@ -191,7 +191,7 @@ ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection e
{
ScRange aFound;
pData->GetArea(aFound, bExpandRows);
- MarkRange( aFound, FALSE );
+ MarkRange( aFound, false );
}
return pData;
}
@@ -207,7 +207,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List&
ScDBCollection* pOldColl = pDoc->GetDBCollection();
ScDBCollection* pUndoColl = NULL;
ScDBCollection* pRedoColl = NULL;
- const BOOL bRecord (pDoc->IsUndoEnabled());
+ const sal_Bool bRecord (pDoc->IsUndoEnabled());
long nDelCount = rDelAreaList.Count();
for (long nDelPos=0; nDelPos<nDelCount; nDelPos++)
@@ -231,9 +231,9 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List&
// neue Targets am SBA anmelden nicht mehr noetig
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
pDoc->SetDBCollection( new ScDBCollection( rNewColl ) );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pOldColl = NULL;
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID );
aModificator.SetDocumentModified();
@@ -253,7 +253,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List&
// Sortieren
-void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord )
+void ScDBFunc::UISort( const ScSortParam& rSortParam, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -280,12 +280,12 @@ void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord )
}
}
-void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::Sort( const ScSortParam& rSortParam, sal_Bool bRecord, sal_Bool bPaint )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
ScDBDocFunc aDBDocFunc( *pDocSh );
- BOOL bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, FALSE );
+ sal_Bool bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, false );
if ( bSuccess && !rSortParam.bInplace )
{
// Ziel markieren
@@ -299,23 +299,23 @@ void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint )
// Filtern
-void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, BOOL bRecord )
+void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
ScDBDocFunc aDBDocFunc( *pDocSh );
- BOOL bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, FALSE );
+ sal_Bool bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, false );
if (bSuccess)
{
- BOOL bCopy = !rQueryParam.bInplace;
+ sal_Bool bCopy = !rQueryParam.bInplace;
if (bCopy)
{
// Zielbereich markieren (DB-Bereich wurde ggf. angelegt)
ScDocument* pDoc = pDocSh->GetDocument();
ScDBData* pDestData = pDoc->GetDBAtCursor(
rQueryParam.nDestCol, rQueryParam.nDestRow,
- rQueryParam.nDestTab, TRUE );
+ rQueryParam.nDestTab, sal_True );
if (pDestData)
{
ScRange aDestRange;
@@ -345,17 +345,17 @@ void ScDBFunc::ToggleAutoFilter()
ScDocument* pDoc = GetViewData()->GetDocument();
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, SC_DBSEL_ROW_DOWN, false, true);
- pDBData->SetByRow( TRUE ); //! Undo, vorher abfragen ??
+ pDBData->SetByRow( sal_True ); //! Undo, vorher abfragen ??
pDBData->GetQueryParam( aParam );
SCCOL nCol;
SCROW nRow = aParam.nRow1;
SCTAB nTab = GetViewData()->GetTabNo();
- INT16 nFlag;
- BOOL bHasAuto = TRUE;
- BOOL bHeader = pDBData->HasHeader();
- BOOL bPaint = FALSE;
+ sal_Int16 nFlag;
+ sal_Bool bHasAuto = sal_True;
+ sal_Bool bHeader = pDBData->HasHeader();
+ sal_Bool bPaint = false;
//! stattdessen aus DB-Bereich abfragen?
@@ -365,7 +365,7 @@ void ScDBFunc::ToggleAutoFilter()
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue();
if ( (nFlag & SC_MF_AUTO) == 0 )
- bHasAuto = FALSE;
+ bHasAuto = false;
}
if (bHasAuto) // aufheben
@@ -387,21 +387,21 @@ void ScDBFunc::ToggleAutoFilter()
ScRange aRange;
pDBData->GetArea( aRange );
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) );
+ new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), false ) );
- pDBData->SetAutoFilter(FALSE);
+ pDBData->SetAutoFilter(false);
// Filter aufheben (incl. Paint / Undo)
SCSIZE nEC = aParam.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
- aParam.GetEntry(i).bDoQuery = FALSE;
- aParam.bDuplicate = TRUE;
- Query( aParam, NULL, TRUE );
+ aParam.GetEntry(i).bDoQuery = false;
+ aParam.bDuplicate = sal_True;
+ Query( aParam, NULL, sal_True );
pDocSh->GetUndoManager()->LeaveListAction();
- bPaint = TRUE;
+ bPaint = sal_True;
}
else // Filterknoepfe einblenden
{
@@ -416,17 +416,17 @@ void ScDBFunc::ToggleAutoFilter()
ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile?
).Execute() == RET_YES )
{
- pDBData->SetHeader( TRUE ); //! Undo ??
- bHeader = TRUE;
+ pDBData->SetHeader( sal_True ); //! Undo ??
+ bHeader = sal_True;
}
}
ScRange aRange;
pDBData->GetArea( aRange );
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), TRUE ) );
+ new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), sal_True ) );
- pDBData->SetAutoFilter(TRUE);
+ pDBData->SetAutoFilter(sal_True);
for (nCol=aParam.nCol1; nCol<=aParam.nCol2; nCol++)
{
@@ -436,7 +436,7 @@ void ScDBFunc::ToggleAutoFilter()
}
pDocSh->PostPaint( aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab,
PAINT_GRID );
- bPaint = TRUE;
+ bPaint = sal_True;
}
else
{
@@ -466,7 +466,7 @@ void ScDBFunc::HideAutoFilter()
ScDocument* pDoc = pDocSh->GetDocument();
ScQueryParam aParam;
- ScDBData* pDBData = GetDBData( FALSE );
+ ScDBData* pDBData = GetDBData( false );
SCTAB nTab;
SCCOL nCol1, nCol2;
@@ -475,7 +475,7 @@ void ScDBFunc::HideAutoFilter()
for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++)
{
- INT16 nFlag = ((ScMergeFlagAttr*) pDoc->
+ sal_Int16 nFlag = ((ScMergeFlagAttr*) pDoc->
GetAttr( nCol, nRow1, nTab, ATTR_MERGE_FLAG ))->GetValue();
pDoc->ApplyAttr( nCol, nRow1, nTab, ScMergeFlagAttr( nFlag & ~SC_MF_AUTO ) );
}
@@ -483,9 +483,9 @@ void ScDBFunc::HideAutoFilter()
ScRange aRange;
pDBData->GetArea( aRange );
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) );
+ new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), false ) );
- pDBData->SetAutoFilter(FALSE);
+ pDBData->SetAutoFilter(false);
pDocSh->PostPaint( nCol1,nRow1,nTab, nCol2,nRow1,nTab, PAINT_GRID );
aModificator.SetDocumentModified();
@@ -497,7 +497,7 @@ void ScDBFunc::HideAutoFilter()
// Re-Import
-BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord )
+sal_Bool ScDBFunc::ImportData( const ScImportParam& rParam, sal_Bool bRecord )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScEditableTester aTester( pDoc, GetViewData()->GetTabNo(), rParam.nCol1,rParam.nRow1,
@@ -505,7 +505,7 @@ BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord )
if ( !aTester.IsEditable() )
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScDBDocFunc aDBDocFunc( *GetViewData()->GetDocShell() );
diff --git a/sc/source/ui/view/dbfunc2.cxx b/sc/source/ui/view/dbfunc2.cxx
index f789daea996d..5753eb1367c2 100644
--- a/sc/source/ui/view/dbfunc2.cxx
+++ b/sc/source/ui/view/dbfunc2.cxx
@@ -54,9 +54,9 @@
class ScDrawLayer;
class ScChartCollection;
-void ScDBFunc::UpdateCharts( BOOL bAllCharts )
+void ScDBFunc::UpdateCharts( sal_Bool bAllCharts )
{
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
ScViewData* pViewData = GetViewData();
ScDocument* pDoc = pViewData->GetDocument();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index cc4efa6f416b..8e64cc7f7f86 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -111,14 +111,14 @@ using ::std::vector;
// Outline-Gruppierung erzeugen
-void ScDBFunc::MakeOutline( BOOL bColumns, BOOL bRecord )
+void ScDBFunc::MakeOutline( sal_Bool bColumns, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.MakeOutline( aRange, bColumns, bRecord, FALSE );
+ aFunc.MakeOutline( aRange, bColumns, bRecord, false );
}
else
ErrorMessage(STR_NOMULTISELECT);
@@ -126,14 +126,14 @@ void ScDBFunc::MakeOutline( BOOL bColumns, BOOL bRecord )
// Outline-Gruppierung loeschen
-void ScDBFunc::RemoveOutline( BOOL bColumns, BOOL bRecord )
+void ScDBFunc::RemoveOutline( sal_Bool bColumns, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.RemoveOutline( aRange, bColumns, bRecord, FALSE );
+ aFunc.RemoveOutline( aRange, bColumns, bRecord, false );
}
else
ErrorMessage(STR_NOMULTISELECT);
@@ -141,10 +141,10 @@ void ScDBFunc::RemoveOutline( BOOL bColumns, BOOL bRecord )
// Menue-Status: Outlines loeschen
-void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
+void ScDBFunc::TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow )
{
- BOOL bColFound = FALSE;
- BOOL bRowFound = FALSE;
+ sal_Bool bColFound = false;
+ sal_Bool bRowFound = false;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
@@ -160,8 +160,8 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
ScOutlineEntry* pEntry;
SCCOLROW nStart;
SCCOLROW nEnd;
- BOOL bColMarked = ( nStartRow == 0 && nEndRow == MAXROW );
- BOOL bRowMarked = ( nStartCol == 0 && nEndCol == MAXCOL );
+ sal_Bool bColMarked = ( nStartRow == 0 && nEndRow == MAXROW );
+ sal_Bool bRowMarked = ( nStartCol == 0 && nEndCol == MAXCOL );
// Spalten
@@ -174,7 +174,7 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
if ( nStartCol<=static_cast<SCCOL>(nEnd) && nEndCol>=static_cast<SCCOL>(nStart) )
- bColFound = TRUE;
+ bColFound = sal_True;
}
}
@@ -189,7 +189,7 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
if ( nStartRow<=nEnd && nEndRow>=nStart )
- bRowFound = TRUE;
+ bRowFound = sal_True;
}
}
}
@@ -199,14 +199,14 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow )
rRow = bRowFound;
}
-void ScDBFunc::RemoveAllOutlines( BOOL bRecord )
+void ScDBFunc::RemoveAllOutlines( sal_Bool bRecord )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.RemoveAllOutlines( nTab, bRecord, FALSE );
+ sal_Bool bOk = aFunc.RemoveAllOutlines( nTab, bRecord, false );
ShowCursor();
if (bOk)
@@ -215,7 +215,7 @@ void ScDBFunc::RemoveAllOutlines( BOOL bRecord )
// Auto-Outlines
-void ScDBFunc::AutoOutline( BOOL bRecord )
+void ScDBFunc::AutoOutline( sal_Bool bRecord )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScRange aRange( 0,0,nTab, MAXCOL,MAXROW,nTab ); // ganze Tabelle, wenn nichts markiert
@@ -228,19 +228,19 @@ void ScDBFunc::AutoOutline( BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- aFunc.AutoOutline( aRange, bRecord, FALSE );
+ aFunc.AutoOutline( aRange, bRecord, false );
}
// Outline-Ebene auswaehlen
-void ScDBFunc::SelectLevel( BOOL bColumns, USHORT nLevel, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel, sal_Bool bRecord, sal_Bool bPaint )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint, FALSE );
+ sal_Bool bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint, false );
ShowCursor();
if (bOk)
@@ -249,14 +249,14 @@ void ScDBFunc::SelectLevel( BOOL bColumns, USHORT nLevel, BOOL bRecord, BOOL bPa
// einzelne Outline-Gruppe einblenden
-void ScDBFunc::ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bRecord, sal_Bool bPaint )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, FALSE );
+ sal_Bool bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, false );
ShowCursor();
if ( bOk && bPaint )
@@ -265,14 +265,14 @@ void ScDBFunc::ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bR
// einzelne Outline-Gruppe ausblenden
-void ScDBFunc::HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bRecord, BOOL bPaint )
+void ScDBFunc::HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bRecord, sal_Bool bPaint )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bOk = aFunc.HideOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, FALSE );
+ sal_Bool bOk = aFunc.HideOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, false );
ShowCursor();
if ( bOk && bPaint )
@@ -281,9 +281,9 @@ void ScDBFunc::HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bR
// Menue-Status: markierten Bereich ein-/ausblenden
-BOOL ScDBFunc::OutlinePossible(BOOL bHide)
+sal_Bool ScDBFunc::OutlinePossible(sal_Bool bHide)
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = false;
SCCOL nStartCol;
SCROW nStartRow;
@@ -316,13 +316,13 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide)
{
if ( nStartCol<=static_cast<SCCOL>(nEnd) && nEndCol>=static_cast<SCCOL>(nStart) )
if (!pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
else
{
if ( nStart>=nStartCol && nEnd<=nEndCol )
if (pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
}
@@ -338,13 +338,13 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide)
{
if ( nStartRow<=nEnd && nEndRow>=nStart )
if (!pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
else
{
if ( nStart>=nStartRow && nEnd<=nEndRow )
if (pEntry->IsHidden())
- bEnable = TRUE;
+ bEnable = sal_True;
}
}
}
@@ -355,7 +355,7 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide)
// markierten Bereich einblenden
-void ScDBFunc::ShowMarkedOutlines( BOOL bRecord )
+void ScDBFunc::ShowMarkedOutlines( sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
@@ -363,7 +363,7 @@ void ScDBFunc::ShowMarkedOutlines( BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bDone = aFunc.ShowMarkedOutlines( aRange, bRecord, FALSE );
+ sal_Bool bDone = aFunc.ShowMarkedOutlines( aRange, bRecord, false );
ShowCursor();
if (bDone)
UpdateScrollBars();
@@ -374,7 +374,7 @@ void ScDBFunc::ShowMarkedOutlines( BOOL bRecord )
// markierten Bereich ausblenden
-void ScDBFunc::HideMarkedOutlines( BOOL bRecord )
+void ScDBFunc::HideMarkedOutlines( sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
@@ -382,7 +382,7 @@ void ScDBFunc::HideMarkedOutlines( BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
HideCursor();
- BOOL bDone = aFunc.HideMarkedOutlines( aRange, bRecord, FALSE );
+ sal_Bool bDone = aFunc.HideMarkedOutlines( aRange, bRecord, false );
ShowCursor();
if (bDone)
UpdateScrollBars();
@@ -397,17 +397,17 @@ void ScDBFunc::HideMarkedOutlines( BOOL bRecord )
// Teilergebnisse
//
-void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
+void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord,
const ScSortParam* pForceNewSort )
{
- BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen
+ sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTab = GetViewData()->GetTabNo();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1,
rParam.nCol2, rParam.nRow2 );
@@ -432,7 +432,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
}
WaitObject aWait( GetViewData()->GetDialogParent() );
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if (rParam.bReplace)
if (pDoc->TestRemoveSubTotals( nTab, rParam ))
{
@@ -455,7 +455,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
if (bRecord) // alte Daten sichern
{
- BOOL bOldFilter = bDo && rParam.bDoSort;
+ sal_Bool bOldFilter = bDo && rParam.bDoSort;
SCTAB nTabCount = pDoc->GetTableCount();
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab );
@@ -470,20 +470,20 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, bOldFilter );
// Datenbereich sichern - incl. Filter-Ergebnis
pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -500,7 +500,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
if (rParam.bReplace)
pDoc->RemoveSubTotals( nTab, aNewParam );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if (bDo)
{
// Sortieren
@@ -514,7 +514,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
ScSortParam aOldSort;
pDBData->GetSortParam( aOldSort );
ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort );
- Sort( aSortParam, FALSE, FALSE );
+ Sort( aSortParam, false, false );
}
bSuccess = pDoc->DoSubTotals( nTab, aNewParam );
@@ -562,11 +562,11 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
// Consolidate
//
-void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, BOOL bRecord )
+void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord )
{
ScDocShell* pDocShell = GetViewData()->GetDocShell();
pDocShell->DoConsolidate( rParam, bRecord );
- SetTabNo( rParam.nTab, TRUE );
+ SetTabNo( rParam.nTab, sal_True );
}
//
@@ -580,8 +580,8 @@ String lcl_MakePivotTabName( const String& rPrefix, SCTAB nNumber )
return aName;
}
-bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable,
- const ScDPObject& rSource, BOOL bApi )
+bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable,
+ const ScDPObject& rSource, sal_Bool bApi )
{
// error message if no fields are set
// this must be removed when drag&drop of fields from a toolbox is available
@@ -594,7 +594,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = GetViewData()->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScRange aDestRange = rDest;
if ( bNewTable )
@@ -615,7 +615,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
while ( !pDoc->InsertTab( nNewTab, lcl_MakePivotTabName( aName, i ) ) && i <= MAXTAB )
i++;
- BOOL bAppend = ( nNewTab+1 == pDoc->GetTableCount() );
+ sal_Bool bAppend = ( nNewTab+1 == pDoc->GetTableCount() );
if (bUndo)
{
pDocSh->GetUndoManager()->AddUndoAction(
@@ -623,7 +623,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
}
GetViewData()->InsertTab( nNewTab );
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
aDestRange = ScRange( 0, 0, nNewTab );
}
@@ -653,7 +653,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest,
bool bAllowMove = (pDPObj != NULL); // allow re-positioning when editing existing table
ScDBDocFunc aFunc( *pDocSh );
- bool bSuccess = aFunc.DataPilotUpdate( pDPObj, &aObj, TRUE, FALSE, bAllowMove );
+ bool bSuccess = aFunc.DataPilotUpdate( pDPObj, &aObj, sal_True, false, bAllowMove );
CursorPosChanged(); // shells may be switched
@@ -676,7 +676,7 @@ void ScDBFunc::DeletePivotTable()
if ( pDPObj )
{
ScDBDocFunc aFunc( *pDocSh );
- aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, false );
CursorPosChanged(); // shells may be switched
}
else
@@ -696,7 +696,7 @@ void ScDBFunc::RecalcPivotTable()
if ( pDPObj )
{
ScDBDocFunc aFunc( *pDocSh );
- aFunc.DataPilotUpdate( pDPObj, pDPObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pDPObj, true, false );
CursorPosChanged(); // shells may be switched
}
else
@@ -717,7 +717,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
ScRangeListRef xRanges;
GetViewData()->GetMultiArea( xRanges ); // incl. cursor if nothing is selected
size_t nRangeCount = xRanges->size();
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = true;
for (size_t nRangePos=0; nRangePos < nRangeCount && bContinue; nRangePos++)
{
@@ -734,7 +734,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
sheet::DataPilotTableHeaderData aData;
pDPObj->GetHeaderPositionData(ScAddress(nCol, nRow, nTab), aData);
if ( aData.Dimension < 0 )
- bContinue = FALSE; // not part of any dimension
+ bContinue = false; // not part of any dimension
else
{
if ( nStartDimension < 0 ) // first member?
@@ -747,7 +747,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
aData.Hierarchy != nStartHierarchy ||
aData.Level != nStartLevel )
{
- bContinue = FALSE; // cannot mix dimensions
+ bContinue = false; // cannot mix dimensions
}
}
if ( bContinue )
@@ -769,11 +769,11 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio
rEntries.FreeAll(); // remove all if not valid
}
-BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts )
+sal_Bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts )
{
// determine if the date group dialog has to be shown for the current selection
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nCurX = GetViewData()->GetCurX();
SCROW nCurY = GetViewData()->GetCurY();
@@ -789,12 +789,12 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
String aBaseDimName( aDimName );
- BOOL bInGroupDim = FALSE;
- BOOL bFoundParts = FALSE;
+ sal_Bool bInGroupDim = false;
+ sal_Bool bFoundParts = false;
ScDPDimensionSaveData* pDimData =
const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() );
@@ -812,7 +812,7 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
// (parts are collected below)
rOldInfo = pNumGroupDim->GetDateInfo();
- bFound = TRUE;
+ bFound = sal_True;
}
else if ( pNumGroupDim->GetInfo().DateValues )
{
@@ -821,10 +821,10 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
rOldInfo = pNumGroupDim->GetInfo();
rParts = com::sun::star::sheet::DataPilotFieldGroupBy::DAYS; // not found in CollectDateParts
- bFoundParts = TRUE;
- bFound = TRUE;
+ bFoundParts = sal_True;
+ bFound = sal_True;
}
- bInGroupDim = TRUE;
+ bInGroupDim = sal_True;
}
else if ( pGroupDim )
{
@@ -837,9 +837,9 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
rOldInfo = pGroupDim->GetDateInfo();
aBaseDimName = pGroupDim->GetSourceDimName();
- bFound = TRUE;
+ bFound = sal_True;
}
- bInGroupDim = TRUE;
+ bInGroupDim = sal_True;
}
}
if ( bFound && !bFoundParts )
@@ -861,12 +861,12 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
SCTAB nSelTab = aSelRange.aStart.Tab();
if ( pDoc->HasValueData( nSelCol, nSelRow, nSelTab ) )
{
- ULONG nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
+ sal_uLong nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
nSelCol, nSelRow, nSelTab, ATTR_VALUE_FORMAT))->GetValue();
short nType = pDoc->GetFormatTable()->GetType(nIndex);
if ( nType == NUMBERFORMAT_DATE || nType == NUMBERFORMAT_TIME || nType == NUMBERFORMAT_DATETIME )
{
- bFound = TRUE;
+ bFound = sal_True;
// use currently selected value for automatic limits
if( rOldInfo.AutoStart )
rOldInfo.Start = pDoc->GetValue( aSelRange.aStart );
@@ -882,11 +882,11 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
return bFound;
}
-BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
+sal_Bool ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
{
// determine if the numeric group dialog has to be shown for the current selection
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
SCCOL nCurX = GetViewData()->GetCurX();
SCROW nCurY = GetViewData()->GetCurY();
@@ -902,10 +902,10 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
- BOOL bInGroupDim = FALSE;
+ sal_Bool bInGroupDim = false;
ScDPDimensionSaveData* pDimData =
const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() );
@@ -918,10 +918,10 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
// -> edit settings of this dimension
rOldInfo = pNumGroupDim->GetInfo();
- bFound = TRUE;
+ bFound = sal_True;
}
else if ( pDimData->GetNamedGroupDim( aDimName ) )
- bInGroupDim = TRUE; // in a group dimension
+ bInGroupDim = sal_True; // in a group dimension
}
if ( !bFound && !bInGroupDim )
{
@@ -935,7 +935,7 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
if ( pDoc->HasValueData( aSelRange.aStart.Col(), aSelRange.aStart.Row(),
aSelRange.aStart.Tab() ) )
{
- bFound = TRUE;
+ bFound = sal_True;
// use currently selected value for automatic limits
if( rOldInfo.AutoStart )
rOldInfo.Start = pDoc->GetValue( aSelRange.aStart );
@@ -962,7 +962,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
@@ -1016,7 +1016,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
ScDPNumGroupInfo aEmpty;
bool bFirst = true;
sal_Int32 nMask = 1;
- for (USHORT nBit=0; nBit<32; nBit++)
+ for (sal_uInt16 nBit=0; nBit<32; nBit++)
{
if ( nParts & nMask )
{
@@ -1071,7 +1071,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1092,7 +1092,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo )
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
@@ -1115,7 +1115,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo )
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1136,7 +1136,7 @@ void ScDBFunc::GroupDataPilot()
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
@@ -1157,8 +1157,8 @@ void ScDBFunc::GroupDataPilot()
// remove the selected items from their groups
// (empty groups are removed, too)
- USHORT nEntryCount = aEntries.GetCount();
- USHORT nEntry;
+ sal_uInt16 nEntryCount = aEntries.GetCount();
+ sal_uInt16 nEntry;
if ( pGroupDimension )
{
for (nEntry=0; nEntry<nEntryCount; nEntry++)
@@ -1203,7 +1203,7 @@ void ScDBFunc::GroupDataPilot()
const ScDPSaveGroupItem* pBaseGroup = pBaseGroupDim->GetGroupByIndex( nGroup );
StrData aStrData( pBaseGroup->GetGroupName() );
- USHORT nCollIndex;
+ sal_uInt16 nCollIndex;
if ( !aEntries.Search( &aStrData, nCollIndex ) ) //! ignore case?
{
// add an additional group for each item that is not in the selection
@@ -1259,7 +1259,7 @@ void ScDBFunc::GroupDataPilot()
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1280,14 +1280,14 @@ void ScDBFunc::UngroupDataPilot()
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
ScDPSaveData aData( *pDPObj->GetSaveData() );
ScDPDimensionSaveData* pDimData = aData.GetDimensionData(); // created if not there
//! test first if DimensionData exists?
- BOOL bApply = FALSE;
+ sal_Bool bApply = false;
ScDPSaveGroupDimension* pGroupDim = pDimData->GetNamedGroupDimAcc( aDimName );
const ScDPSaveNumGroupDimension* pNumGroupDim = pDimData->GetNumGroupDim( aDimName );
@@ -1303,8 +1303,8 @@ void ScDBFunc::UngroupDataPilot()
}
else if ( pGroupDim )
{
- USHORT nEntryCount = aEntries.GetCount();
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ sal_uInt16 nEntryCount = aEntries.GetCount();
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aEntryName = aEntries[nEntry]->GetString();
pGroupDim->RemoveGroup( aEntryName );
@@ -1326,14 +1326,14 @@ void ScDBFunc::UngroupDataPilot()
// also remove SaveData settings for the dimension that no longer exists
aData.RemoveDimensionByName( aDimName );
}
- bApply = TRUE;
+ bApply = sal_True;
}
else if ( pNumGroupDim )
{
// remove the numerical grouping
pDimData->RemoveNumGroupDimension( aDimName );
// SaveData settings can remain unchanged - the same dimension still exists
- bApply = TRUE;
+ bApply = sal_True;
}
if ( bApply )
@@ -1342,7 +1342,7 @@ void ScDBFunc::UngroupDataPilot()
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -1417,13 +1417,13 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
return;
}
- USHORT nErrorId = 0;
+ sal_uInt16 nErrorId = 0;
pDPObj->BuildAllDimensionMembers();
ScDPSaveData aData( *pDPObj->GetSaveData() );
- BOOL bChange = FALSE;
+ sal_Bool bChange = false;
- USHORT nOrient = DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( rPos, nOrient );
if ( nField >= 0 )
{
@@ -1445,7 +1445,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
ScDPSaveDimension* pSaveDim = aData.GetDimensionByName( aOldText );
pSaveDim->SetName( aNewName );
- bChange = TRUE;
+ bChange = sal_True;
}
else
nErrorId = STR_INVALIDNAME;
@@ -1453,7 +1453,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
}
else if (nOrient == DataPilotFieldOrientation_COLUMN || nOrient == DataPilotFieldOrientation_ROW)
{
- BOOL bDataLayout = false;
+ sal_Bool bDataLayout = false;
String aDimName = pDPObj->GetDimName(nField, bDataLayout);
ScDPSaveDimension* pDim = bDataLayout ? aData.GetDataLayoutDimension() : aData.GetDimensionByName(aDimName);
if (pDim)
@@ -1513,7 +1513,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
{
if ( aData.GetExistingDimensionData() && !(aPosData.Flags & MemberResultFlags::SUBTOTAL))
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aPosData.Dimension, bIsDataLayout );
ScDPDimensionSaveData* pDimData = aData.GetDimensionData();
@@ -1541,7 +1541,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
if ( pSaveMember )
pSaveMember->SetName( aNewName );
- bChange = TRUE;
+ bChange = sal_True;
}
else
nErrorId = STR_INVALIDNAME;
@@ -1554,7 +1554,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
}
else if (aPosData.Dimension >= 0 && aPosData.MemberName.getLength() > 0)
{
- BOOL bDataLayout = false;
+ sal_Bool bDataLayout = false;
String aDimName = pDPObj->GetDimName(static_cast<long>(aPosData.Dimension), bDataLayout);
if (bDataLayout)
{
@@ -1661,7 +1661,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
}
else
@@ -1708,13 +1708,13 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
if ( pUserListId )
pDPObj->BuildAllDimensionMembers();
- USHORT nOrientation;
+ sal_uInt16 nOrientation;
long nDimIndex = pDPObj->GetHeaderDim(rPos, nOrientation);
if (nDimIndex < 0)
// Invalid dimension index. Bail out.
return false;
- BOOL bDataLayout;
+ sal_Bool bDataLayout;
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
if (!pSaveData)
return false;
@@ -1840,9 +1840,9 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
return aFunc.DataPilotUpdate(pDPObj, pNewObj.get(), true, false);
}
-BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
+sal_Bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDocument* pDoc = GetViewData()->GetDocument();
ScDPObject* pDPObj = pDoc->GetDPAtCursor( rSource.aStart.Col(), rSource.aStart.Row(), rSource.aStart.Tab() );
if ( pDPObj && pDPObj == pDoc->GetDPAtCursor( rDest.Col(), rDest.Row(), rDest.Tab() ) )
@@ -1876,7 +1876,7 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
if ( bValid )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -1923,12 +1923,12 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); //! bApi for drag&drop?
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false ); //! bApi for drag&drop?
delete pNewObj;
Unmark(); // entry was moved - no use in leaving the old cell selected
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1936,9 +1936,9 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
return bRet;
}
-BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
+sal_Bool ScDBFunc::HasSelectionForDrillDown( sal_uInt16& rOrientation )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
@@ -1950,7 +1950,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -1958,12 +1958,12 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
ScDPSaveDimension* pDim = pSaveData->GetExistingDimensionByName( aDimName );
if ( pDim )
{
- USHORT nDimOrient = pDim->GetOrientation();
+ sal_uInt16 nDimOrient = pDim->GetOrientation();
ScDPSaveDimension* pInner = pSaveData->GetInnermostDimension( nDimOrient );
if ( pDim == pInner )
{
rOrientation = nDimOrient;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1973,7 +1973,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
return bRet;
}
-void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName )
+void ScDBFunc::SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName )
{
ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
@@ -1985,7 +1985,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
if ( aEntries.GetCount() > 0 )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -2005,7 +2005,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
pDuplicated = aData.DuplicateDimension( *pNewDimensionName );
}
- USHORT nOrientation = pDim->GetOrientation();
+ sal_uInt16 nOrientation = pDim->GetOrientation();
pNewDim->SetOrientation( nOrientation );
long nPosition = LONG_MAX;
@@ -2032,17 +2032,17 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
ScStrCollection aVisibleEntries;
pDPObj->GetMemberResultNames( aVisibleEntries, nSelectDimension );
- USHORT nVisCount = aVisibleEntries.GetCount();
- for (USHORT nVisPos=0; nVisPos<nVisCount; nVisPos++)
+ sal_uInt16 nVisCount = aVisibleEntries.GetCount();
+ for (sal_uInt16 nVisPos=0; nVisPos<nVisCount; nVisPos++)
{
String aVisName = aVisibleEntries[nVisPos]->GetString();
ScDPSaveMember* pMember = pDim->GetMemberByName( aVisName );
- pMember->SetShowDetails( FALSE );
+ pMember->SetShowDetails( false );
}
}
- USHORT nEntryCount = aEntries.GetCount();
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ sal_uInt16 nEntryCount = aEntries.GetCount();
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aEntryName = aEntries[nEntry]->GetString();
ScDPSaveMember* pMember = pDim->GetMemberByName( aEntryName );
@@ -2053,7 +2053,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
ScDBDocFunc aFunc( *GetViewData()->GetDocShell() );
ScDPObject* pNewObj = new ScDPObject( *pDPObj );
pNewObj->SetSaveData( aData );
- aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, false );
delete pNewObj;
// unmark cell selection
@@ -2121,7 +2121,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
continue;
ScPatternAttr aPattern( pInsDoc->GetPool() );
- aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<UINT32>(nNumFmt)) );
+ aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<sal_uInt32>(nNumFmt)) );
pInsDoc->ApplyPatternAreaTab(nCol, 1, nCol, nRowSize-1, nNewTab, aPattern);
}
@@ -2130,7 +2130,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
pInsDoc->GetCellArea( nNewTab, nEndCol, nEndRow );
pInsDoc->SetClipArea( ScRange( 0, 0, nNewTab, nEndCol, nEndRow, nNewTab ) );
- SfxUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
String aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE );
pMgr->EnterListAction( aUndo, aUndo );
@@ -2146,7 +2146,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
// DB-Operationen (Sortieren, Filtern, Teilergebnisse) wiederholen
//
-void ScDBFunc::RepeatDB( BOOL bRecord )
+void ScDBFunc::RepeatDB( sal_Bool bRecord )
{
SCCOL nCurX = GetViewData()->GetCurX();
SCROW nCurY = GetViewData()->GetCurY();
@@ -2154,33 +2154,33 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
ScDocument* pDoc = GetViewData()->GetDocument();
ScDBData* pDBData = GetDBData();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
- BOOL bQuery = aQueryParam.GetEntry(0).bDoQuery;
+ sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery;
ScSortParam aSortParam;
pDBData->GetSortParam( aSortParam );
- BOOL bSort = aSortParam.bDoSort[0];
+ sal_Bool bSort = aSortParam.bDoSort[0];
ScSubTotalParam aSubTotalParam;
pDBData->GetSubTotalParam( aSubTotalParam );
- BOOL bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
+ sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly;
if ( bQuery || bSort || bSubTotal )
{
- BOOL bQuerySize = FALSE;
+ sal_Bool bQuerySize = false;
ScRange aOldQuery;
ScRange aNewQuery;
if (bQuery && !aQueryParam.bInplace)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest && pDest->IsDoSize())
{
pDest->GetArea( aOldQuery );
- bQuerySize = TRUE;
+ bQuerySize = sal_True;
}
}
@@ -2214,18 +2214,18 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol );
pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
}
else
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
// Datenbereich sichern - incl. Filter-Ergebnis
- pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
@@ -2240,14 +2240,14 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
{
// Sortieren ohne SubTotals
- aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt
- DoSubTotals( aSubTotalParam, FALSE );
+ aSubTotalParam.bRemoveOnly = sal_True; // wird unten wieder zurueckgesetzt
+ DoSubTotals( aSubTotalParam, false );
}
if (bSort)
{
pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben
- Sort( aSortParam, FALSE, FALSE);
+ Sort( aSortParam, false, false);
}
if (bQuery)
{
@@ -2259,10 +2259,10 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
aAdvSource.aStart.Col(), aAdvSource.aStart.Row(),
aAdvSource.aEnd.Col(), aAdvSource.aEnd.Row(),
aAdvSource.aStart.Tab(), aQueryParam );
- Query( aQueryParam, &aAdvSource, FALSE );
+ Query( aQueryParam, &aAdvSource, false );
}
else
- Query( aQueryParam, NULL, FALSE );
+ Query( aQueryParam, NULL, false );
// bei nicht-inplace kann die Tabelle umgestellt worden sein
if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -2271,8 +2271,8 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
if (bSubTotal)
{
pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
- aSubTotalParam.bRemoveOnly = FALSE;
- DoSubTotals( aSubTotalParam, FALSE );
+ aSubTotalParam.bRemoveOnly = false;
+ DoSubTotals( aSubTotalParam, false );
}
if (bRecord)
@@ -2287,7 +2287,7 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
if (bQuerySize)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pDest)
{
pDest->GetArea( aNewQuery );
diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx
index 940ffa5a37d6..f395cb741221 100644
--- a/sc/source/ui/view/dbfunc4.cxx
+++ b/sc/source/ui/view/dbfunc4.cxx
@@ -53,16 +53,16 @@ using namespace com::sun::star;
//==================================================================
-USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts )
+sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return 0;
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
- USHORT nPageCount = pModel->GetPageCount();
- for (USHORT nPageNo=0; nPageNo<nPageCount; nPageNo++)
+ sal_uInt16 nPageCount = pModel->GetPageCount();
+ for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++)
{
SdrPage* pPage = pModel->GetPage(nPageNo);
DBG_ASSERT(pPage,"Page ?");
@@ -74,12 +74,12 @@ USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL b
if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) )
{
String aName = ((SdrOle2Obj*)pObject)->GetPersistName();
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
if ( !bAllCharts )
{
ScRangeList aRanges;
- BOOL bColHeaders = FALSE;
- BOOL bRowHeaders = FALSE;
+ sal_Bool bColHeaders = false;
+ sal_Bool bRowHeaders = false;
pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders );
bHit = aRanges.In( rPos );
}
diff --git a/sc/source/ui/view/drawattr.cxx b/sc/source/ui/view/drawattr.cxx
index 01809fd60e2e..7067b0d711eb 100644
--- a/sc/source/ui/view/drawattr.cxx
+++ b/sc/source/ui/view/drawattr.cxx
@@ -42,7 +42,7 @@ String SvxDrawToolItem::GetValueText() const
//------------------------------------------------------------------------
-String SvxDrawToolItem::GetValueText( USHORT nVal ) const
+String SvxDrawToolItem::GetValueText( sal_uInt16 nVal ) const
{
const sal_Char* p;
@@ -72,9 +72,9 @@ SfxPoolItem* SvxDrawToolItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-SfxPoolItem* SvxDrawToolItem::Create( SvStream& rStream, USHORT nVer ) const
+SfxPoolItem* SvxDrawToolItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
return new SvxDrawToolItem(nVal);
}
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index 4270170e099a..54b4ef95dd83 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -63,7 +63,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
long nTwipsY = 0;
for (SCCOL i=nStartCol; i<nEndCol; i++)
{
- USHORT nWidth = pDoc->GetColWidth(i,nTab);
+ sal_uInt16 nWidth = pDoc->GetColWidth(i,nTab);
nTwipsX += (long) nWidth;
nPixelX += ScViewData::ToPixel( nWidth, nPPTX );
}
@@ -77,7 +77,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
continue;
}
- USHORT nHeight = pDoc->GetRowHeight(nRow, nTab);
+ sal_uInt16 nHeight = pDoc->GetRowHeight(nRow, nTab);
nTwipsY += static_cast<long>(nHeight);
nPixelY += ScViewData::ToPixel(nHeight, nPPTY);
}
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 4d6c8d84b380..400384a38712 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -49,7 +49,7 @@
void ScIMapDlgSet( const Graphic& rGraphic, const ImageMap* pImageMap,
const TargetList* pTargetList, void* pEditingObj ); // imapwrap
-USHORT ScIMapChildWindowId();
+sal_uInt16 ScIMapChildWindowId();
// STATIC DATA -----------------------------------------------------------
@@ -61,7 +61,7 @@ ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData ) :
nTab( pData->GetTabNo() ),
pDropMarker( NULL ),
pDropMarkObj( NULL ),
- bInConstruct( TRUE )
+ bInConstruct( true )
{
// #i73602# Use default from the configuration
SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_Calc());
@@ -80,8 +80,8 @@ void ScDrawView::SetPageAnchored()
if( AreObjectsMarked() )
{
const SdrMarkList* pMark = &GetMarkedObjectList();
- ULONG nCount = pMark->GetMarkCount();
- for( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = pMark->GetMarkCount();
+ for( sal_uLong i=0; i<nCount; i++ )
{
pObj = pMark->GetMark(i)->GetMarkedSdrObj();
ScDrawLayer::SetPageAnchored( *pObj );
@@ -101,8 +101,8 @@ void ScDrawView::SetCellAnchored()
if( AreObjectsMarked() )
{
const SdrMarkList* pMark = &GetMarkedObjectList();
- ULONG nCount = pMark->GetMarkCount();
- for( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = pMark->GetMarkCount();
+ for( sal_uLong i=0; i<nCount; i++ )
{
pObj = pMark->GetMark(i)->GetMarkedSdrObj();
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *pDoc, nTab);
@@ -115,21 +115,21 @@ void ScDrawView::SetCellAnchored()
ScAnchorType ScDrawView::GetAnchorType() const
{
- BOOL bPage = FALSE;
- BOOL bCell = FALSE;
+ sal_Bool bPage = false;
+ sal_Bool bCell = false;
const SdrObject* pObj = NULL;
if( AreObjectsMarked() )
{
const SdrMarkList* pMark = &GetMarkedObjectList();
- ULONG nCount = pMark->GetMarkCount();
+ sal_uLong nCount = pMark->GetMarkCount();
Point p0;
- for( ULONG i=0; i<nCount; i++ )
+ for( sal_uLong i=0; i<nCount; i++ )
{
pObj = pMark->GetMark(i)->GetMarkedSdrObj();
if( ScDrawLayer::GetAnchorType( *pObj ) == SCA_CELL )
- bCell =TRUE;
+ bCell =true;
else
- bPage = TRUE;
+ bPage = sal_True;
}
}
if( bPage && !bCell )
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index cd2ed3f11701..1e6f330a3fd3 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -72,18 +72,18 @@ Point aDragStartDiff;
// -----------------------------------------------------------------------
-void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
+void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle )
{
- rAnyOle = rOneOle = FALSE;
- ULONG nCount = rMarkList.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ rAnyOle = rOneOle = false;
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrMark* pMark = rMarkList.GetMark(i);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_OLE2)
{
- rAnyOle = TRUE;
+ rAnyOle = sal_True;
rOneOle = (nCount == 1);
break;
}
@@ -95,8 +95,8 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
{
if ( pSubObj->GetObjIdentifier() == OBJ_OLE2 )
{
- rAnyOle = TRUE;
- // rOneOle remains FALSE - a group isn't treated like a single OLE object
+ rAnyOle = sal_True;
+ // rOneOle remains sal_False - a group isn't treated like a single OLE object
return;
}
pSubObj = aIter.Next();
@@ -105,9 +105,9 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
}
}
-BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
+sal_Bool ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
if ( AreObjectsMarked() )
{
@@ -118,7 +118,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
aDragStartDiff = rStartPos - aMarkedRect.TopLeft();
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -160,7 +160,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
void ScDrawView::DoCopy()
{
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -196,7 +196,7 @@ void ScDrawView::DoCopy()
uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
{
- BOOL bAnyOle, bOneOle;
+ sal_Bool bAnyOle, bOneOle;
const SdrMarkList& rMarkList = GetMarkedObjectList();
lcl_CheckOle( rMarkList, bAnyOle, bOneOle );
@@ -258,12 +258,12 @@ void ScDrawView::SetMarkedOriginalSize()
const SdrMarkList& rMarkList = GetMarkedObjectList();
long nDone = 0;
- ULONG nCount = rMarkList.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
- USHORT nIdent = pObj->GetObjIdentifier();
- BOOL bDo = FALSE;
+ sal_uInt16 nIdent = pObj->GetObjIdentifier();
+ sal_Bool bDo = false;
Size aOriginalSize;
if (nIdent == OBJ_OLE2)
{
@@ -277,7 +277,7 @@ void ScDrawView::SetMarkedOriginalSize()
{
MapMode aMapMode( MAP_100TH_MM );
aOriginalSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize( &aMapMode );
- bDo = TRUE;
+ bDo = sal_True;
}
else
{
@@ -289,10 +289,10 @@ void ScDrawView::SetMarkedOriginalSize()
aOriginalSize = OutputDevice::LogicToLogic(
Size( aSz.Width, aSz.Height ),
aUnit, MAP_100TH_MM );
- bDo = TRUE;
+ bDo = sal_True;
} catch( embed::NoVisualAreaSizeException& )
{
- OSL_ENSURE( sal_False, "Can't get the original size of the object!" );
+ OSL_ENSURE( false, "Can't get the original size of the object!" );
}
}
}
@@ -319,7 +319,7 @@ void ScDrawView::SetMarkedOriginalSize()
{
aOriginalSize = pActWin->LogicToLogic(
rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
- bDo = TRUE;
+ bDo = sal_True;
}
}
}
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 9516123c19fc..d9a9169d52be 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -83,11 +83,11 @@ using namespace com::sun::star;
void ScDrawView::Construct()
{
- EnableExtendedKeyInputDispatcher(FALSE);
- EnableExtendedMouseEventDispatcher(FALSE);
- EnableExtendedCommandEventDispatcher(FALSE);
+ EnableExtendedKeyInputDispatcher(false);
+ EnableExtendedMouseEventDispatcher(false);
+ EnableExtendedCommandEventDispatcher(false);
- SetFrameDragSingles(TRUE);
+ SetFrameDragSingles(true);
SetMinMoveDistancePixel( 2 );
SetHitTolerancePixel( 2 );
@@ -97,8 +97,8 @@ void ScDrawView::Construct()
SCTAB nViewTab = pViewData->GetTabNo();
ShowSdrPage(GetModel()->GetPage(nViewTab));
- BOOL bEx = pViewData->GetViewShell()->IsDrawSelMode();
- BOOL bProt = pDoc->IsTabProtected( nViewTab ) ||
+ sal_Bool bEx = pViewData->GetViewShell()->IsDrawSelMode();
+ sal_Bool bProt = pDoc->IsTabProtected( nViewTab ) ||
pViewData->GetSfxDocShell()->IsReadOnly();
SdrLayer* pLayer;
@@ -108,7 +108,7 @@ void ScDrawView::Construct()
SetLayerLocked( pLayer->GetName(), bProt || !bEx );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN);
if (pLayer)
- SetLayerLocked( pLayer->GetName(), TRUE );
+ SetLayerLocked( pLayer->GetName(), sal_True );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT);
if (pLayer)
{
@@ -122,10 +122,10 @@ void ScDrawView::Construct()
if (pLayer)
{
SetLayerLocked( pLayer->GetName(), bProt );
- SetLayerVisible( pLayer->GetName(), sal_False);
+ SetLayerVisible( pLayer->GetName(), false);
}
- SetSwapAsynchron(TRUE);
+ SetSwapAsynchron(sal_True);
}
else
{
@@ -136,7 +136,7 @@ void ScDrawView::Construct()
RecalcScale();
UpdateWorkArea();
- bInConstruct = FALSE;
+ bInConstruct = false;
}
void ScDrawView::ImplClearCalcDropMarker()
@@ -156,8 +156,8 @@ ScDrawView::~ScDrawView()
void ScDrawView::AddCustomHdl()
{
const SdrMarkList &rMrkList = GetMarkedObjectList();
- UINT32 nCount = rMrkList.GetMarkCount();
- for(UINT32 nPos=0; nPos<nCount; nPos++ )
+ sal_uInt32 nCount = rMrkList.GetMarkCount();
+ for(sal_uInt32 nPos=0; nPos<nCount; nPos++ )
{
SdrObject* pObj = rMrkList.GetMark(nPos)->GetMarkedSdrObj();
if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjDataTab(pObj, nTab))
@@ -174,7 +174,7 @@ void ScDrawView::InvalidateAttribs()
SfxBindings& rBindings = pViewData->GetBindings();
// true status values:
- rBindings.InvalidateAll( TRUE );
+ rBindings.InvalidateAll( true );
}
void ScDrawView::InvalidateDrawTextAttrs()
@@ -216,7 +216,7 @@ void ScDrawView::InvalidateDrawTextAttrs()
rBindings.Invalidate( SID_ALIGN_ANY_JUSTIFIED );
}
-void ScDrawView::SetMarkedToLayer( BYTE nLayerNo )
+void ScDrawView::SetMarkedToLayer( sal_uInt8 nLayerNo )
{
if (AreObjectsMarked())
{
@@ -225,8 +225,8 @@ void ScDrawView::SetMarkedToLayer( BYTE nLayerNo )
BegUndo( ScGlobal::GetRscString( STR_UNDO_SELATTR ) );
const SdrMarkList& rMark = GetMarkedObjectList();
- ULONG nCount = rMark.GetMarkCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rMark.GetMarkCount();
+ for (sal_uLong i=0; i<nCount; i++)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
if ( !pObj->ISA(SdrUnoObj) && (pObj->GetLayer() != SC_LAYER_INTERN) )
@@ -380,7 +380,7 @@ void ScDrawView::MarkListHasChanged()
SdrGrafObj* pGrafObj = NULL;
const SdrMarkList& rMarkList = GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount == 0 && !pViewData->GetViewShell()->IsDrawSelMode() && !bInConstruct )
{
@@ -389,7 +389,7 @@ void ScDrawView::MarkListHasChanged()
LockInternalLayer();
}
- BOOL bSubShellSet = FALSE;
+ sal_Bool bSubShellSet = false;
if (nMarkCount == 1)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -397,55 +397,55 @@ void ScDrawView::MarkListHasChanged()
{
pOle2Obj = (SdrOle2Obj*) pObj;
if (!pDoc->IsChart(pObj) )
- pViewSh->SetOleObjectShell(TRUE);
+ pViewSh->SetOleObjectShell(sal_True);
else
- pViewSh->SetChartShell(TRUE);
- bSubShellSet = TRUE;
+ pViewSh->SetChartShell(sal_True);
+ bSubShellSet = sal_True;
}
else if (pObj->GetObjIdentifier() == OBJ_GRAF)
{
pGrafObj = (SdrGrafObj*) pObj;
- pViewSh->SetGraphicShell(TRUE);
- bSubShellSet = TRUE;
+ pViewSh->SetGraphicShell(sal_True);
+ bSubShellSet = sal_True;
}
else if (pObj->GetObjIdentifier() == OBJ_MEDIA)
{
- pViewSh->SetMediaShell(TRUE);
- bSubShellSet = TRUE;
+ pViewSh->SetMediaShell(true);
+ bSubShellSet = true;
}
else if (pObj->GetObjIdentifier() != OBJ_TEXT // Verhindern, das beim Anlegen
|| !pViewSh->IsDrawTextShell()) // eines TextObjekts auf die
{ // DrawShell umgeschaltet wird.
- pViewSh->SetDrawShell(TRUE); //@#70206#
+ pViewSh->SetDrawShell(sal_True); //@#70206#
}
}
if ( nMarkCount && !bSubShellSet )
{
- BOOL bOnlyControls = TRUE;
- BOOL bOnlyGraf = TRUE;
- for (ULONG i=0; i<nMarkCount; i++)
+ sal_Bool bOnlyControls = sal_True;
+ sal_Bool bOnlyGraf = sal_True;
+ for (sal_uLong i=0; i<nMarkCount; i++)
{
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if ( pObj->ISA( SdrObjGroup ) )
{
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- ULONG nListCount = pLst->GetObjCount();
+ sal_uLong nListCount = pLst->GetObjCount();
if ( nListCount == 0 )
{
// An empty group (may occur during Undo) is no control or graphics object.
// Creating the form shell during undo would lead to problems with the undo manager.
- bOnlyControls = FALSE;
- bOnlyGraf = FALSE;
+ bOnlyControls = false;
+ bOnlyGraf = false;
}
- for ( USHORT j = 0; j < nListCount; ++j )
+ for ( sal_uInt16 j = 0; j < nListCount; ++j )
{
SdrObject *pSubObj = pLst->GetObj( j );
if (!pSubObj->ISA(SdrUnoObj))
- bOnlyControls = FALSE;
+ bOnlyControls = false;
if (pSubObj->GetObjIdentifier() != OBJ_GRAF)
- bOnlyGraf = FALSE;
+ bOnlyGraf = false;
if ( !bOnlyControls && !bOnlyGraf ) break;
}
@@ -453,9 +453,9 @@ void ScDrawView::MarkListHasChanged()
else
{
if (!pObj->ISA(SdrUnoObj))
- bOnlyControls = FALSE;
+ bOnlyControls = false;
if (pObj->GetObjIdentifier() != OBJ_GRAF)
- bOnlyGraf = FALSE;
+ bOnlyGraf = false;
}
if ( !bOnlyControls && !bOnlyGraf ) break;
@@ -463,15 +463,15 @@ void ScDrawView::MarkListHasChanged()
if(bOnlyControls)
{
- pViewSh->SetDrawFormShell(TRUE); // jetzt UNO-Controls
+ pViewSh->SetDrawFormShell(sal_True); // jetzt UNO-Controls
}
else if(bOnlyGraf)
{
- pViewSh->SetGraphicShell(TRUE);
+ pViewSh->SetGraphicShell(sal_True);
}
else if(nMarkCount>1)
{
- pViewSh->SetDrawShell(TRUE);
+ pViewSh->SetDrawShell(sal_True);
}
}
@@ -480,10 +480,12 @@ void ScDrawView::MarkListHasChanged()
// Verben anpassen
SfxViewFrame* pViewFrame = pViewSh->GetViewFrame();
- BOOL bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ uno::Sequence< embed::VerbDescriptor > aVerbs;
if ( pOle2Obj && !bOle )
{
uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
+ DBG_ASSERT( xObj.is(), "SdrOle2Obj ohne ObjRef" );
if (xObj.is())
pViewSh->SetVerbs( xObj->getSupportedVerbs() );
else
@@ -492,8 +494,7 @@ void ScDrawView::MarkListHasChanged()
pViewSh->SetVerbs( 0 );
}
}
- else
- pViewSh->SetVerbs( 0 );
+ pViewSh->SetVerbs( aVerbs );
// Image-Map Editor
@@ -558,7 +559,7 @@ void ScDrawView::UpdateUserViewOptions()
const ScViewOptions& rOpt = pViewData->GetOptions();
const ScGridOptions& rGrid = rOpt.GetGridOptions();
- BOOL bBigHdl = rOpt.GetOption( VOPT_BIGHANDLES );
+ sal_Bool bBigHdl = rOpt.GetOption( VOPT_BIGHANDLES );
SetDragStripes( rOpt.GetOption( VOPT_HELPLINES ) );
SetSolidMarkHdl( rOpt.GetOption( VOPT_SOLIDHANDLES ) );
@@ -582,7 +583,7 @@ void ScDrawView::UpdateUserViewOptions()
#pragma optimize ( "", on )
#endif
-BOOL ScDrawView::SelectObject( const String& rName )
+sal_Bool ScDrawView::SelectObject( const String& rName )
{
UnmarkAll();
@@ -644,7 +645,7 @@ BOOL ScDrawView::SelectObject( const String& rName )
}
-bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions)
+bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, sal_uLong nOptions)
{
// Markierung nicht aendern, wenn Ole-Objekt aktiv
// (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!)
@@ -699,7 +700,7 @@ void ScDrawView::DeleteMarked()
(void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0;
- SfxUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
// remove the cell note from document, we are its owner now
@@ -731,7 +732,7 @@ void ScDrawView::DeleteMarked()
SdrEndTextEditKind ScDrawView::ScEndTextEdit()
{
- BOOL bIsTextEdit = IsTextEdit();
+ sal_Bool bIsTextEdit = IsTextEdit();
SdrEndTextEditKind eKind = SdrEndTextEdit();
if ( bIsTextEdit && pViewData )
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index ab96b03258b0..515b2fc514a9 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -110,8 +110,8 @@ ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) :
pEditView (pView),
pViewData (pData),
pClipEvtLstnr (NULL),
- bPastePossible (FALSE),
- bIsInsertMode (TRUE)
+ bPastePossible (false),
+ bIsInsertMode (sal_True)
{
SetPool( pEditView->GetEditEngine()->GetEmptyItemSet().GetPool() );
SetUndoManager( &pEditView->GetEditEngine()->GetUndoManager() );
@@ -122,7 +122,7 @@ ScEditShell::~ScEditShell()
{
if ( pClipEvtLstnr )
{
- pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), FALSE );
+ pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), false );
// The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -149,13 +149,13 @@ void lcl_RemoveAttribs( EditView& rEditView )
{
ScEditEngineDefaulter* pEngine = static_cast<ScEditEngineDefaulter*>(rEditView.GetEditEngine());
- BOOL bOld = pEngine->GetUpdateMode();
- pEngine->SetUpdateMode(FALSE);
+ sal_Bool bOld = pEngine->GetUpdateMode();
+ pEngine->SetUpdateMode(false);
String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
pEngine->GetUndoManager().EnterListAction( aName, aName );
- rEditView.RemoveAttribs(TRUE);
+ rEditView.RemoveAttribs(true);
pEngine->RepeatDefaults(); // paragraph attributes from cell formats must be preserved
pEngine->GetUndoManager().LeaveListAction();
@@ -175,7 +175,7 @@ void lclInsertCharacter( EditView* pTableView, EditView* pTopView, sal_Unicode c
void ScEditShell::Execute( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxBindings& rBindings = pViewData->GetBindings();
ScInputHandler* pHdl = GetMyInputHdl();
@@ -197,7 +197,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
EditEngine* pEngine = pTableView->GetEditEngine();
pHdl->DataChanging();
- BOOL bSetSelIsRef = FALSE;
+ sal_Bool bSetSelIsRef = false;
switch ( nSlot )
{
@@ -223,7 +223,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_THES:
{
String aReplaceText;
- SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False );
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , false );
if (pItem2)
aReplaceText = pItem2->GetValue();
if (aReplaceText.Len() > 0)
@@ -261,10 +261,10 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -287,7 +287,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( pViewData->GetDialogParent() );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if ( pDlg )
{
pDlg->Insert( SOT_FORMAT_STRING, EMPTY_STRING );
@@ -325,7 +325,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_SELECTALL:
{
- USHORT nPar = pEngine->GetParagraphCount();
+ sal_uInt16 nPar = pEngine->GetParagraphCount();
if (nPar)
{
xub_StrLen nLen = pEngine->GetTextLen(nPar-1);
@@ -338,8 +338,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_CHARMAP:
{
- USHORT nScript = pTableView->GetSelectedScriptType();
- USHORT nFontWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_FONTINFO_CJK :
+ sal_uInt16 nScript = pTableView->GetSelectedScriptType();
+ sal_uInt16 nFontWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_FONTINFO_CJK :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? EE_CHAR_FONTINFO_CTL :
EE_CHAR_FONTINFO );
const SvxFontItem& rItem = (const SvxFontItem&)
@@ -351,13 +351,13 @@ void ScEditShell::Execute( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
@@ -385,7 +385,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
if ( aString.Len() )
{
// if string contains WEAK characters, set all fonts
- BYTE nSetScript;
+ sal_uInt8 nSetScript;
ScDocument* pDoc = pViewData->GetDocument();
if ( pDoc->HasStringWeakCharacters( aString ) )
nSetScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
@@ -395,7 +395,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
SfxItemSet aSet( pTableView->GetEmptyItemSet() );
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, GetPool() );
aSetItem.PutItemForScriptType( nSetScript, aNewItem );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
// SetAttribs an der View selektiert ein Wort, wenn nichts selektiert ist
pTableView->GetEditEngine()->QuickSetAttribs( aSet, pTableView->GetSelection() );
@@ -423,7 +423,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, FALSE );
+ AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, false );
DBG_ASSERT(pDlg, "Dialog create fail!");
short nRet = pDlg->Execute();
// pDlg is needed below
@@ -484,7 +484,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_TOGGLE_REL:
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
if (pEngine->GetParagraphCount() == 1)
{
String aText = pEngine->GetText();
@@ -503,10 +503,10 @@ void ScEditShell::Execute( SfxRequest& rReq )
pTopView->GetEditEngine()->SetText( aNew );
pTopView->SetSelection( aNewSel );
}
- bOk = TRUE;
+ bOk = sal_True;
// Referenz wird selektiert -> beim Tippen nicht ueberschreiben
- bSetSelIsRef = TRUE;
+ bSetSelIsRef = sal_True;
}
}
if (!bOk)
@@ -518,7 +518,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET )
{
const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
const String& rName = pHyper->GetName();
@@ -526,7 +526,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
const String& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD )
{
const SvxURLField* pURLField = GetURLField();
@@ -560,14 +560,14 @@ void ScEditShell::Execute( SfxRequest& rReq )
pTopView->SetSelection( aSel ); // select inserted field
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
if (!bDone)
{
pViewData->GetViewShell()->
- InsertURL( rName, rURL, rTarget, (USHORT) eMode );
+ InsertURL( rName, rURL, rTarget, (sal_uInt16) eMode );
// InsertURL an der ViewShell schaltet bei "Button"
// die EditShell ab, darum sofort return
@@ -612,13 +612,13 @@ void ScEditShell::Execute( SfxRequest& rReq )
pHdl->DataChanged();
if (bSetSelIsRef)
- pHdl->SetSelIsRef(TRUE);
+ pHdl->SetSelIsRef(sal_True);
}
void lcl_DisableAll( SfxItemSet& rSet ) // disable all slots
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -641,7 +641,7 @@ void ScEditShell::GetState( SfxItemSet& rSet )
EditView* pActiveView = pHdl ? pHdl->GetActiveView() : pEditView;
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -703,7 +703,7 @@ void ScEditShell::GetState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable thesaurus context menu entry if there is nothing to look up
- BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
+ sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang );
if (!bIsLookUpWord || !bCanDoThesaurus)
rSet.DisableItem( SID_THES );
}
@@ -755,7 +755,7 @@ void ScEditShell::GetClipState( SfxItemSet& rSet )
pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScEditShell, ClipboardChanged ) );
pClipEvtLstnr->acquire();
Window* pWin = pViewData->GetActiveWin();
- pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
@@ -763,7 +763,7 @@ void ScEditShell::GetClipState( SfxItemSet& rSet )
}
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -809,7 +809,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
SfxItemSet aSet( pEditView->GetEmptyItemSet() );
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -819,7 +819,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
if (pArgs)
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
{
nScript = pEditView->GetSelectedScriptType();
@@ -828,10 +828,10 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
- USHORT nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
}
}
break;
@@ -851,21 +851,21 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_WEIGHT:
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
- BOOL bOld = FALSE;
+ sal_Bool bOld = false;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), FALSE );
+ aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() > WEIGHT_NORMAL )
- bOld = TRUE;
+ bOld = sal_True;
SvxScriptSetItem aSetItem( nSlot, rPool );
aSetItem.PutItemForScriptType( nScript,
SvxWeightItem( bOld ? WEIGHT_NORMAL : WEIGHT_BOLD, EE_CHAR_WEIGHT ) );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
rBindings.Invalidate( nSlot );
}
@@ -874,21 +874,21 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_POSTURE:
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
- BOOL bOld = FALSE;
+ sal_Bool bOld = false;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), FALSE );
+ aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxPostureItem*)pCore)->GetValue() != ITALIC_NONE )
- bOld = TRUE;
+ bOld = sal_True;
SvxScriptSetItem aSetItem( nSlot, rPool );
aSetItem.PutItemForScriptType( nScript,
SvxPostureItem( bOld ? ITALIC_NONE : ITALIC_NORMAL, EE_CHAR_ITALIC ) );
- aSet.Put( aSetItem.GetItemSet(), FALSE );
+ aSet.Put( aSetItem.GetItemSet(), false );
rBindings.Invalidate( nSlot );
}
@@ -939,7 +939,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_STRIKEOUT:
{
- BOOL bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs().
+ sal_Bool bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs().
Get(EE_CHAR_STRIKEOUT)).GetValue() != STRIKEOUT_NONE;
aSet.Put( SvxCrossedOutItem( bOld ? STRIKEOUT_NONE : STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT ) );
rBindings.Invalidate( nSlot );
@@ -948,7 +948,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_SHADOWED:
{
- BOOL bOld = ((const SvxShadowedItem&)pEditView->GetAttribs().
+ sal_Bool bOld = ((const SvxShadowedItem&)pEditView->GetAttribs().
Get(EE_CHAR_SHADOW)).GetValue();
aSet.Put( SvxShadowedItem( !bOld, EE_CHAR_SHADOW ) );
rBindings.Invalidate( nSlot );
@@ -957,7 +957,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_CONTOUR:
{
- BOOL bOld = ((const SvxContourItem&)pEditView->GetAttribs().
+ sal_Bool bOld = ((const SvxContourItem&)pEditView->GetAttribs().
Get(EE_CHAR_OUTLINE)).GetValue();
aSet.Put( SvxContourItem( !bOld, EE_CHAR_OUTLINE ) );
rBindings.Invalidate( nSlot );
@@ -991,8 +991,8 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
//
EditEngine* pEngine = pEditView->GetEditEngine();
- BOOL bOld = pEngine->GetUpdateMode();
- pEngine->SetUpdateMode(FALSE);
+ sal_Bool bOld = pEngine->GetUpdateMode();
+ pEngine->SetUpdateMode(false);
pEditView->SetAttribs( aSet );
@@ -1018,11 +1018,11 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
// choose font info according to selection script type
- USHORT nScript = pEditView->GetSelectedScriptType();
+ sal_uInt16 nScript = pEditView->GetSelectedScriptType();
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
// #i55929# input-language-dependent script type (depends on input language if nothing selected)
- USHORT nInputScript = nScript;
+ sal_uInt16 nInputScript = nScript;
if ( !pEditView->GetSelection().HasRange() )
{
LanguageType nInputLang = pViewData->GetActiveWin()->GetInputLanguage();
@@ -1042,7 +1042,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
// Unterstreichung
- SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, TRUE );
+ SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, sal_True );
if ( eState == SFX_ITEM_DONTCARE )
{
rSet.InvalidateItem( SID_ULINE_VAL_NONE );
@@ -1054,7 +1054,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
{
FontUnderline eUnderline = ((const SvxUnderlineItem&)
aAttribs.Get(EE_CHAR_UNDERLINE)).GetLineStyle();
- USHORT nId = SID_ULINE_VAL_NONE;
+ sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
@@ -1063,7 +1063,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
default:
break;
}
- rSet.Put( SfxBoolItem( nId, TRUE ) );
+ rSet.Put( SfxBoolItem( nId, sal_True ) );
}
//! Testen, ob Klammer-Hervorhebung aktiv ist !!!!
@@ -1072,7 +1072,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
rSet.ClearItem( EE_CHAR_WEIGHT ); // hervorgehobene Klammern hier nicht
}
-String ScEditShell::GetSelectionText( BOOL bWholeWord )
+String ScEditShell::GetSelectionText( sal_Bool bWholeWord )
{
String aStrSelection;
@@ -1110,20 +1110,20 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq)
pHdl->DataChanging();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_UNDO:
case SID_REDO:
{
- BOOL bIsUndo = ( nSlot == SID_UNDO );
+ sal_Bool bIsUndo = ( nSlot == SID_UNDO );
- USHORT nCount = 1;
+ sal_uInt16 nCount = 1;
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
nCount = ((const SfxUInt16Item*)pItem)->GetValue();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if ( bIsUndo )
{
@@ -1141,7 +1141,7 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq)
}
break;
}
- pViewData->GetBindings().InvalidateAll(FALSE);
+ pViewData->GetBindings().InvalidateAll(false);
pHdl->DataChanged();
}
@@ -1154,7 +1154,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
if ( pViewFrm && GetUndoManager() )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
pViewFrm->GetSlotState( nWhich, NULL, &rSet );
@@ -1169,7 +1169,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
EditView* pTopView = pHdl->GetTopView();
if (pTopView)
{
- SfxUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager();
+ ::svl::IUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager();
if ( rTopMgr.GetUndoActionCount() == 0 )
rSet.DisableItem( SID_UNDO );
if ( rTopMgr.GetRedoActionCount() == 0 )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 4d8c6f2cbbee..42a8411f24f0 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -114,7 +114,7 @@
namespace {
-SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot )
+SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot )
{
SvxCellHorJustify eHJustify = SVX_HOR_JUSTIFY_STANDARD;
switch( nSlot )
@@ -129,7 +129,7 @@ SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot )
return eHJustify;
}
-SvxCellVerJustify lclConvertSlotToVAlign( USHORT nSlot )
+SvxCellVerJustify lclConvertSlotToVAlign( sal_uInt16 nSlot )
{
SvxCellVerJustify eVJustify = SVX_VER_JUSTIFY_STANDARD;
switch( nSlot )
@@ -163,7 +163,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) :
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SetPool( &pTabViewShell->GetPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -185,15 +185,15 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
- BOOL bProtected = FALSE;
+ sal_Bool bProtected = false;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nTabCount; i++)
if (pDoc->IsTabProtected(i)) // ueberhaupt eine Tabelle geschuetzt?
- bProtected = TRUE;
+ bProtected = sal_True;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- USHORT nSlotId = 0;
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nSlotId = 0;
while ( nWhich )
{
@@ -244,7 +244,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
{
ISfxTemplateCommon* pDesigner = SFX_APP()->
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
- BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
+ sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
if ( bProtected || bPage )
rSet.DisableItem( nSlotId );
@@ -256,7 +256,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
{
ISfxTemplateCommon* pDesigner = SFX_APP()->
GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
- BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
+ sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily();
if ( bProtected && !bPage )
rSet.DisableItem( nSlotId );
@@ -285,7 +285,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
//--------------------------------------------------------------------
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
- const USHORT nSlotId = rReq.GetSlot();
+ const sal_uInt16 nSlotId = rReq.GetSlot();
const SCTAB nCurTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScTabViewShell* pTabViewShell= GetViewData()->GetViewShell();
@@ -293,7 +293,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScMarkData& rMark = GetViewData()->GetMarkData();
ScModule* pScMod = SC_MOD();
String aRefName;
- BOOL bUndo = pDoc->IsUndoEnabled();
+ sal_Bool bUndo = pDoc->IsUndoEnabled();
if ( (nSlotId == SID_STYLE_NEW)
|| (nSlotId == SID_STYLE_EDIT)
@@ -307,18 +307,18 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = NULL;
- BOOL bStyleToMarked = FALSE;
- BOOL bListAction = FALSE;
- BOOL bAddUndo = FALSE; // add ScUndoModifyStyle (style modified)
+ sal_Bool bStyleToMarked = false;
+ sal_Bool bListAction = false;
+ sal_Bool bAddUndo = false; // add ScUndoModifyStyle (style modified)
ScStyleSaveData aOldData; // for undo/redo
ScStyleSaveData aNewData;
SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA;
const SfxPoolItem* pFamItem;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, TRUE, &pFamItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, sal_True, &pFamItem ) )
eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue();
else
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, TRUE, &pFamItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) )
{
String sFamily = ((const SfxStringItem*)pFamItem)->GetValue();
if (sFamily.CompareToAscii("CellStyles") == COMPARE_EQUAL)
@@ -329,7 +329,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
String aStyleName;
- USHORT nRetMask = 0xffff;
+ sal_uInt16 nRetMask = 0xffff;
pStylePool->SetSearchMask( eFamily, SFXSTYLEBIT_ALL );
@@ -338,11 +338,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_NEW:
{
const SfxPoolItem* pNameItem;
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem ))
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem ))
aStyleName = ((const SfxStringItem*)pNameItem)->GetValue();
const SfxPoolItem* pRefItem=NULL;
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, TRUE, &pRefItem ))
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, sal_True, &pRefItem ))
{
if(pRefItem!=NULL)
aRefName = ((const SfxStringItem*)pRefItem)->GetValue();
@@ -358,8 +358,8 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_APPLY:
{
- SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_APPLY_STYLE, sal_False );
- SFX_REQUEST_ARG( rReq, pFamilyItem, SfxStringItem, SID_STYLE_FAMILYNAME, sal_False );
+ SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_APPLY_STYLE, false );
+ SFX_REQUEST_ARG( rReq, pFamilyItem, SfxStringItem, SID_STYLE_FAMILYNAME, false );
if ( pFamilyItem && pNameItem )
{
com::sun::star::uno::Reference< com::sun::star::style::XStyleFamiliesSupplier > xModel(pDocSh->GetModel(), com::sun::star::uno::UNO_QUERY);
@@ -385,7 +385,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
const SfxPoolItem* pNameItem;
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem ))
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem ))
aStyleName = ((const SfxStringItem*)pNameItem)->GetValue();
pStyleSheet = pStylePool->Find( aStyleName, eFamily );
@@ -395,14 +395,14 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_WATERCAN:
{
- BOOL bWaterCan = pScMod->GetIsWaterCan();
+ sal_Bool bWaterCan = pScMod->GetIsWaterCan();
if( !bWaterCan )
{
const SfxPoolItem* pItem;
if ( SFX_ITEM_SET ==
- pArgs->GetItemState( nSlotId, TRUE, &pItem ) )
+ pArgs->GetItemState( nSlotId, sal_True, &pItem ) )
{
const SfxStringItem* pStrItem = PTR_CAST(SfxStringItem,pItem);
if ( pStrItem )
@@ -422,13 +422,13 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( !bWaterCan && pStyleSheet )
{
- pScMod->SetWaterCan( TRUE );
+ pScMod->SetWaterCan( sal_True );
pTabViewShell->SetActivePointer( Pointer(POINTER_FILL) );
rReq.Done();
}
else
{
- pScMod->SetWaterCan( FALSE );
+ pScMod->SetWaterCan( false );
pTabViewShell->SetActivePointer( Pointer(POINTER_ARROW) );
rReq.Done();
}
@@ -453,15 +453,15 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if ( pStyleSheet )
{
- pTabViewShell->RemoveStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->RemoveStyleSheetInUse( pStyleSheet );
pStylePool->Remove( pStyleSheet );
pTabViewShell->InvalidateAttribs();
- nRetMask = TRUE;
- bAddUndo = TRUE;
+ nRetMask = sal_True;
+ bAddUndo = sal_True;
rReq.Done();
}
else
- nRetMask = FALSE;
+ nRetMask = false;
}
break;
@@ -512,10 +512,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bListAction = TRUE;
+ bListAction = sal_True;
}
- BOOL bConvertBack = FALSE;
+ sal_Bool bConvertBack = false;
SfxStyleSheet* pSheetInUse = (SfxStyleSheet*)
pTabViewShell->GetStyleSheetFromMarked();
@@ -535,7 +535,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
//!!! bei Gelenheit mal eine Methode, die
// das fuer einen bestimmten Style macht
pDoc->StylesToNames();
- bConvertBack = TRUE;
+ bConvertBack = sal_True;
pStylePool->Remove(pStyleSheet);
}
@@ -556,11 +556,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// Attribute uebernehmen und Style anwenden
pStyleSheet->GetItemSet().Put( aAttrSet );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
// call SetStyleSheetToMarked after adding the ScUndoModifyStyle
// (pStyleSheet pointer is used!)
- bStyleToMarked = TRUE;
+ bStyleToMarked = sal_True;
}
else // ( nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE )
{
@@ -574,20 +574,20 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bListAction = TRUE;
+ bListAction = sal_True;
}
pStyleSheet->GetItemSet().Put( aAttrSet );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
// call SetStyleSheetToMarked after adding the ScUndoModifyStyle
// (pStyleSheet pointer is used!)
- bStyleToMarked = TRUE;
+ bStyleToMarked = sal_True;
}
}
aNewData.InitFromStyle( pStyleSheet );
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
rReq.Done();
}
break;
@@ -609,14 +609,14 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if ( pDoc->RemovePageStyleInUse( pStyleSheet->GetName() ) )
{
- ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nCurTab ).UpdatePages();
+ ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nCurTab ).UpdatePages();
rBindings.Invalidate( SID_STATUS_PAGESTYLE );
rBindings.Invalidate( FID_RESET_PRINTZOOM );
}
pStylePool->Remove( pStyleSheet );
rBindings.Invalidate( SID_STYLE_FAMILY4 );
pDocSh->SetDocumentModified();
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
rReq.Done();
}
}
@@ -636,7 +636,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( aOldName != aStyleName )
{
pDoc->SetPageStyle( nTab, aStyleName );
- ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nTab ).UpdatePages();
+ ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nTab ).UpdatePages();
if( !pUndoAction )
pUndoAction = new ScUndoApplyPageStyle( pDocSh, aStyleName );
pUndoAction->AddSheetAction( nTab, aOldName );
@@ -665,7 +665,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxStyleSheetBase* pCurStyle = pStylePool->Find( rStrCurStyle, eFamily );
SfxItemSet aAttrSet = pCurStyle->GetItemSet();
SCTAB nInTab;
- BOOL bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab );
+ sal_Bool bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab );
// wenn bereits vorhanden, erstmal entfernen...
if ( pStyleSheet )
@@ -681,12 +681,12 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// wenn in Verwendung -> Update
if ( bUsed )
- ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nInTab ).UpdatePages();
+ ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nInTab ).UpdatePages();
aNewData.InitFromStyle( pStyleSheet );
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
rReq.Done();
- nRetMask = TRUE;
+ nRetMask = sal_True;
}
}
break;
@@ -710,7 +710,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxStyleFamily eFam = pStyleSheet->GetFamily();
SfxAbstractTabDialog* pDlg = NULL;
- USHORT nRsc = 0;
+ sal_uInt16 nRsc = 0;
// alte Items aus der Vorlage merken
SfxItemSet aOldSet = pStyleSheet->GetItemSet();
@@ -729,16 +729,16 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
const SfxPoolItem* pItem;
if ( rSet.GetItemState( ATTR_VALUE_FORMAT,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ false, &pItem ) == SFX_ITEM_SET )
{
// NumberFormat Value aus Value und Language
// erzeugen und eintueten
- ULONG nFormat =
+ sal_uLong nFormat =
((SfxUInt32Item*)pItem)->GetValue();
LanguageType eLang =
((SvxLanguageItem*)&rSet.Get(
ATTR_LANGUAGE_FORMAT ))->GetLanguage();
- ULONG nLangFormat = pDoc->GetFormatTable()->
+ sal_uLong nLangFormat = pDoc->GetFormatTable()->
GetFormatForLanguageIfBuiltIn( nFormat, eLang );
if ( nLangFormat != nFormat )
{
@@ -754,16 +754,16 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pDocSh->PutItem( *pNumberInfoItem );
nRsc = RID_SCDLG_STYLES_PAR;
- // auf jeden Fall ein SvxBoxInfoItem mit Table = FALSE im Set:
+ // auf jeden Fall ein SvxBoxInfoItem mit Table = sal_False im Set:
// (wenn gar kein Item da ist, loescht der Dialog auch das
// BORDER_OUTER SvxBoxItem aus dem Vorlagen-Set)
- if ( rSet.GetItemState( ATTR_BORDER_INNER, FALSE ) != SFX_ITEM_SET )
+ if ( rSet.GetItemState( ATTR_BORDER_INNER, false ) != SFX_ITEM_SET )
{
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetTable(FALSE); // keine inneren Linien
- aBoxInfoItem.SetDist(TRUE);
- aBoxInfoItem.SetMinDist(FALSE);
+ aBoxInfoItem.SetTable(false); // keine inneren Linien
+ aBoxInfoItem.SetDist(sal_True);
+ aBoxInfoItem.SetMinDist(false);
rSet.Put( aBoxInfoItem );
}
}
@@ -788,7 +788,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pParent = pTabViewShell->GetDialogParent();
}
- pTabViewShell->SetInFormatDialog(TRUE);
+ pTabViewShell->SetInFormatDialog(sal_True);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -796,7 +796,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pDlg = pFact->CreateScStyleDlg( pParent, *pStyleSheet, nRsc, nRsc );
DBG_ASSERT(pDlg, "Dialog create fail!");
short nResult = pDlg->Execute();
- pTabViewShell->SetInFormatDialog(FALSE);
+ pTabViewShell->SetInFormatDialog(false);
if ( nResult == RET_OK )
{
@@ -812,7 +812,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( SFX_STYLE_FAMILY_PARA == eFam )
{
SfxItemSet& rNewSet = pStyleSheet->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate(
bNumFormatChanged, aOldSet, rNewSet ) )
pDoc->InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
@@ -820,11 +820,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, false);
- ULONG nOldFormat = ((const SfxUInt32Item&)aOldSet.
+ sal_uLong nOldFormat = ((const SfxUInt32Item&)aOldSet.
Get( ATTR_VALUE_FORMAT )).GetValue();
- ULONG nNewFormat = ((const SfxUInt32Item&)rNewSet.
+ sal_uLong nNewFormat = ((const SfxUInt32Item&)rNewSet.
Get( ATTR_VALUE_FORMAT )).GetValue();
if ( nNewFormat != nOldFormat )
{
@@ -862,12 +862,12 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
(const SvxNumberInfoItem&)
*(pDocSh->GetItem(SID_ATTR_NUMBERFORMAT_INFO)) );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
pTabViewShell->InvalidateAttribs();
}
aNewData.InitFromStyle( pStyleSheet );
- bAddUndo = TRUE;
+ bAddUndo = sal_True;
}
}
else
@@ -913,7 +913,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
ScModule* pScMod = SC_MOD();
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1005,11 +1005,11 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
rReq.Done();
break;
case SID_NUMBER_INCDEC:
- pTabViewShell->ChangeNumFmtDecimals( TRUE );
+ pTabViewShell->ChangeNumFmtDecimals( sal_True );
rReq.Done();
break;
case SID_NUMBER_DECDEC:
- pTabViewShell->ChangeNumFmtDecimals( FALSE );
+ pTabViewShell->ChangeNumFmtDecimals( false );
rReq.Done();
break;
@@ -1017,7 +1017,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- if(pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET)
+ if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET)
{
String aCode = ((const SfxStringItem*)pItem)->GetValue();
pTabViewShell->SetNumFmtByStr( aCode );
@@ -1029,7 +1029,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
if ( pReqArgs )
{
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, sal_True, &pItem ) == SFX_ITEM_SET )
{
// We have to accomplish this using ApplyAttributes()
// because we also need the language information to be
@@ -1039,7 +1039,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
SfxItemPool* pDocPool = GetViewData()->GetDocument()->GetPool();
SfxItemSet aNewSet( *pDocPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
aNewSet.Put( *pItem );
- pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, TRUE );
+ pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, sal_True );
}
}
break;
@@ -1074,7 +1074,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pSet = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1099,7 +1099,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
if( pSet )
{
const SfxPoolItem* pItem = NULL;
- if( pSet->GetItemState(GetPool().GetWhich(nSlot), TRUE, &pItem ) == SFX_ITEM_SET )
+ if( pSet->GetItemState(GetPool().GetWhich(nSlot), sal_True, &pItem ) == SFX_ITEM_SET )
{
switch ( nSlot )
@@ -1165,7 +1165,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
SfxBindings& rBindings = pViewData->GetBindings();
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
const SfxItemSet* pSet = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxAllItemSet* pNewSet = 0;
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1185,7 +1185,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
case SID_ATTR_CHAR_WEIGHT:
{
// #i78017 establish the same behaviour as in Writer
- BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
@@ -1197,7 +1197,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
FontWeight eWeight = WEIGHT_BOLD;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE );
+ aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() == WEIGHT_BOLD )
eWeight = WEIGHT_NORMAL;
@@ -1205,14 +1205,14 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
aSetItem.PutItemForScriptType( nScript, SvxWeightItem( eWeight, ATTR_FONT_WEIGHT ) );
}
pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() );
- pNewSet->Put( aSetItem.GetItemSet(), FALSE );
+ pNewSet->Put( aSetItem.GetItemSet(), false );
}
break;
case SID_ATTR_CHAR_POSTURE:
{
// #i78017 establish the same behaviour as in Writer
- BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
@@ -1224,7 +1224,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
FontItalic eItalic = ITALIC_NORMAL;
SvxScriptSetItem aOldSetItem( nSlot, rPool );
- aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE );
+ aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), false );
const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript );
if ( pCore && ((const SvxPostureItem*)pCore)->GetPosture() == ITALIC_NORMAL )
eItalic = ITALIC_NONE;
@@ -1232,7 +1232,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
aSetItem.PutItemForScriptType( nScript, SvxPostureItem( eItalic, ATTR_FONT_POSTURE ) );
}
pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() );
- pNewSet->Put( aSetItem.GetItemSet(), FALSE );
+ pNewSet->Put( aSetItem.GetItemSet(), false );
}
break;
@@ -1311,12 +1311,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
- if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET)
+ if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET)
{
pHorJustify = (const SvxHorJustifyItem*)pItem;
eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() );
}
- if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET)
+ if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET)
{
pVerJustify = (const SvxVerJustifyItem*)pItem;
eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() );
@@ -1422,7 +1422,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
if ( !pNewAttrs )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -1434,7 +1434,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_ALIGN_LINEBREAK: // ohne Parameter als Toggle
{
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
- BOOL bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue();
+ sal_Bool bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue();
SfxBoolItem aBreakItem( ATTR_LINEBREAK, !bOld );
pTabViewShell->ApplyAttr( aBreakItem );
@@ -1463,7 +1463,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
}
else
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -1484,13 +1484,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_CHAR_FONTHEIGHT:
{
// #i78017 establish the same behaviour as in Writer
- BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScript = pTabViewShell->GetSelectionScriptType();
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlot, rPool );
- USHORT nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
aSetItem.PutItemForScriptType( nScript, pNewAttrs->Get( nWhich ) );
pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() );
@@ -1518,13 +1518,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
pDefLine->SetInWidth ( pLine->GetInWidth() );
pDefLine->SetDistance( pLine->GetDistance() );
pDefLine->SetStyle( pLine->GetStyle( ) );
- pTabViewShell->SetSelectionFrameLines( pDefLine, FALSE );
+ pTabViewShell->SetSelectionFrameLines( pDefLine, false );
}
else
{
pTabViewShell->SetDefaultFrameLine( pLine );
pTabViewShell->GetDefaultFrameLine()->SetColor( COL_BLACK );
- pTabViewShell->SetSelectionFrameLines( pLine, FALSE );
+ pTabViewShell->SetSelectionFrameLines( pLine, false );
}
}
else
@@ -1532,7 +1532,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
Color aColorBlack( COL_BLACK );
SvxBorderLine aDefLine( &aColorBlack, 20, 0, 0 );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
- pTabViewShell->SetSelectionFrameLines( NULL, FALSE );
+ pTabViewShell->SetSelectionFrameLines( NULL, false );
}
}
break;
@@ -1548,13 +1548,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
if ( pDefLine )
{
pDefLine->SetColor( rColor );
- pTabViewShell->SetSelectionFrameLines( pDefLine, TRUE );
+ pTabViewShell->SetSelectionFrameLines( pDefLine, sal_True );
}
else
{
SvxBorderLine aDefLine( &rColor, 20, 0, 0 );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
- pTabViewShell->SetSelectionFrameLines( &aDefLine, FALSE );
+ pTabViewShell->SetSelectionFrameLines( &aDefLine, false );
}
}
break;
@@ -1582,7 +1582,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
// Border-Items vom Controller auswerten:
const SfxPoolItem* pItem = 0;
- if ( pNewAttrs->GetItemState( ATTR_BORDER, TRUE, &pItem )
+ if ( pNewAttrs->GetItemState( ATTR_BORDER, sal_True, &pItem )
== SFX_ITEM_SET )
{
// The SvxFrameToolBoxControl toolbox controller uses a default
@@ -1603,7 +1603,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
rReq.AppendItem( aBoxItem );
}
- if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, TRUE, &pItem )
+ if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, sal_True, &pItem )
== SFX_ITEM_SET )
{
SvxBoxInfoItem aBoxInfoItem( *(const SvxBoxInfoItem*)pItem );
@@ -1684,12 +1684,12 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
const SvxBorderLine* pLine = pTabViewShell->GetDefaultFrameLine();
const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rAttrSet.Get( ATTR_BACKGROUND );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
- rSet.Put( rAttrSet, FALSE );
+ rSet.Put( rAttrSet, false );
// choose font info according to selection script type
- BYTE nScript = 0; // GetSelectionScriptType never returns 0
+ sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0
if ( rSet.GetItemState( ATTR_FONT ) != SFX_ITEM_UNKNOWN )
{
if (!nScript) nScript = pTabViewShell->GetSelectionScriptType();
@@ -1731,10 +1731,10 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- rSet.Put( rAttrSet, FALSE ); // ItemStates mitkopieren
+ rSet.Put( rAttrSet, false ); // ItemStates mitkopieren
// choose font info according to selection script type
- BYTE nScript = 0; // GetSelectionScriptType never returns 0
+ sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0
if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SFX_ITEM_UNKNOWN )
{
if (!nScript) nScript = pTabViewShell->GetSelectionScriptType();
@@ -1755,7 +1755,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
// Unterstreichung
//------------------------
- eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, TRUE );
+ eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, sal_True );
if ( eState == SFX_ITEM_DONTCARE )
{
rSet.InvalidateItem( SID_ULINE_VAL_NONE );
@@ -1767,7 +1767,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
FontUnderline eUnderline = ((const SvxUnderlineItem&)
rAttrSet.Get(ATTR_FONT_UNDERLINE)).GetLineStyle();
- USHORT nId = SID_ULINE_VAL_NONE;
+ sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break;
@@ -1776,7 +1776,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
default:
break;
}
- rSet.Put( SfxBoolItem( nId, TRUE ) );
+ rSet.Put( SfxBoolItem( nId, sal_True ) );
}
//------------------------
@@ -1786,11 +1786,11 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
const SvxHorJustifyItem* pHorJustify = NULL;
const SvxVerJustifyItem* pVerJustify = NULL;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
- USHORT nWhich = 0;
- BOOL bJustifyStd = FALSE;
- SfxBoolItem aBoolItem ( 0, TRUE );
+ sal_uInt16 nWhich = 0;
+ sal_Bool bJustifyStd = false;
+ SfxBoolItem aBoolItem ( 0, sal_True );
- eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE,
+ eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True,
(const SfxPoolItem**)&pHorJustify );
switch ( eState )
{
@@ -1819,7 +1819,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
case SVX_HOR_JUSTIFY_REPEAT:
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
}
@@ -1833,7 +1833,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
break;
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
@@ -1844,12 +1844,12 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
}
else if ( bJustifyStd )
{
- aBoolItem.SetValue( FALSE );
+ aBoolItem.SetValue( false );
aBoolItem.SetWhich( SID_ALIGNLEFT ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNRIGHT ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNCENTERHOR ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNBLOCK ); rSet.Put( aBoolItem );
- bJustifyStd = FALSE;
+ bJustifyStd = false;
}
//------------------------
@@ -1857,9 +1857,9 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
//------------------------
nWhich = 0;
- aBoolItem.SetValue( TRUE );
+ aBoolItem.SetValue( sal_True );
- eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, TRUE,
+ eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, sal_True,
(const SfxPoolItem**)&pVerJustify );
switch ( eState )
@@ -1884,7 +1884,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
case SVX_VER_JUSTIFY_STANDARD:
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
}
@@ -1897,7 +1897,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
break;
default:
- bJustifyStd = TRUE;
+ bJustifyStd = sal_True;
break;
}
@@ -1908,7 +1908,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
}
else if ( bJustifyStd )
{
- aBoolItem.SetValue( FALSE );
+ aBoolItem.SetValue( false );
aBoolItem.SetWhich( SID_ALIGNTOP ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNBOTTOM ); rSet.Put( aBoolItem );
aBoolItem.SetWhich( SID_ALIGNCENTERVER ); rSet.Put( aBoolItem );
@@ -1939,7 +1939,7 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SvxCellHorJustify eHAlign = SVX_HOR_JUSTIFY_STANDARD;
bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SFX_ITEM_DONTCARE;
@@ -1990,7 +1990,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
short nType = GetCurrentNumberFormatType();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -2002,7 +2002,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE )
{
- ULONG nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get(
+ sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get(
ATTR_VALUE_FORMAT )).GetValue();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
@@ -2045,13 +2045,13 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq )
pTabViewShell->UpdateInputHandler();
}
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
{
- BOOL bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM);
+ sal_Bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM);
ScPatternAttr aAttr( GetViewData()->GetDocument()->GetPool() );
SfxItemSet& rItemSet = aAttr.GetItemSet();
rItemSet.Put( SfxBoolItem( ATTR_STACKED, bVert ) );
@@ -2077,15 +2077,15 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- BOOL bVertDontCare =
+ sal_Bool bVertDontCare =
(rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE) ||
(rAttrSet.GetItemState( ATTR_STACKED ) == SFX_ITEM_DONTCARE);
- BOOL bLeftRight = !bVertDontCare &&
+ sal_Bool bLeftRight = !bVertDontCare &&
!((const SfxBoolItem&) rAttrSet.Get( ATTR_STACKED )).GetValue();
- BOOL bTopBottom = !bVertDontCare && !bLeftRight &&
+ sal_Bool bTopBottom = !bVertDontCare && !bLeftRight &&
((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue();
- BOOL bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE);
+ sal_Bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE);
EEHorizontalTextDirection eBidiDir = EE_HTEXTDIR_DEFAULT;
if ( !bBidiDontCare )
{
@@ -2101,11 +2101,11 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet )
}
SvtLanguageOptions aLangOpt;
- BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
- BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
+ sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled();
+ sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch( nWhich )
@@ -2155,7 +2155,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq )
}
else
{
- BOOL bLock = FALSE;
+ sal_Bool bLock = false;
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
@@ -2166,7 +2166,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq )
pView->Unmark();
ScDocument* pBrushDoc = new ScDocument( SCDOCMODE_CLIP );
- pView->CopyToClip( pBrushDoc, FALSE, TRUE );
+ pView->CopyToClip( pBrushDoc, false, sal_True );
pView->SetBrushDocument( pBrushDoc, bLock );
}
}
diff --git a/sc/source/ui/view/galwrap.cxx b/sc/source/ui/view/galwrap.cxx
index 8dde5477814e..c781841b52dd 100644
--- a/sc/source/ui/view/galwrap.cxx
+++ b/sc/source/ui/view/galwrap.cxx
@@ -47,12 +47,12 @@ Graphic GalleryGetGraphic()
return pGal->GetGraphic();
}
-USHORT GallerySGA_FORMAT_GRAPHIC()
+sal_uInt16 GallerySGA_FORMAT_GRAPHIC()
{
return SGA_FORMAT_GRAPHIC;
}
-BOOL GalleryIsLinkage()
+sal_Bool GalleryIsLinkage()
{
GalleryExplorer* pGal = SVX_GALLERY();
DBG_ASSERT( pGal, "Wo ist die Gallery?" );
diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx
index 31dba191b2fd..97821e406c96 100644
--- a/sc/source/ui/view/gridmerg.cxx
+++ b/sc/source/ui/view/gridmerg.cxx
@@ -42,7 +42,7 @@ ScGridMerger::ScGridMerger( OutputDevice* pOutDev, long nOnePixelX, long nOnePix
nOneX( nOnePixelX ),
nOneY( nOnePixelY ),
nCount( 0 ),
- bVertical( FALSE )
+ bVertical( false )
{
// optimize (DrawGrid) only for pixel MapMode,
// to avoid rounding errors
@@ -105,7 +105,7 @@ void ScGridMerger::AddHorLine( long nX1, long nX2, long nY )
if ( bVertical )
{
Flush();
- bVertical = FALSE;
+ bVertical = false;
}
AddLine( nX1, nX2, nY );
}
@@ -120,7 +120,7 @@ void ScGridMerger::AddVerLine( long nX, long nY1, long nY2 )
if ( !bVertical )
{
Flush();
- bVertical = TRUE;
+ bVertical = sal_True;
}
AddLine( nY1, nY2, nX );
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 47a280dc5dad..7e06db06676b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -139,9 +139,9 @@ using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
-const BYTE SC_NESTEDBUTTON_NONE = 0;
-const BYTE SC_NESTEDBUTTON_DOWN = 1;
-const BYTE SC_NESTEDBUTTON_UP = 2;
+const sal_uInt8 SC_NESTEDBUTTON_NONE = 0;
+const sal_uInt8 SC_NESTEDBUTTON_DOWN = 1;
+const sal_uInt8 SC_NESTEDBUTTON_UP = 2;
#define SC_AUTOFILTER_ALL 0
#define SC_AUTOFILTER_TOP10 1
@@ -159,8 +159,8 @@ enum ScFilterBoxMode
};
extern SfxViewShell* pScActiveViewShell; // global.cxx
-extern USHORT nScClickMouseModifier; // global.cxx
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScClickMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
#define SC_FILTERLISTBOX_LINES 12
@@ -184,12 +184,12 @@ private:
ScGridWindow* pGridWin;
SCCOL nCol;
SCROW nRow;
- BOOL bButtonDown;
- BOOL bInit;
- BOOL bCancelled;
- BOOL bInSelect;
+ sal_Bool bButtonDown;
+ sal_Bool bInit;
+ sal_Bool bCancelled;
+ sal_Bool bInSelect;
bool mbListHasDates;
- ULONG nSel;
+ sal_uLong nSel;
ScFilterBoxMode eMode;
protected:
@@ -207,11 +207,11 @@ public:
SCCOL GetCol() const { return nCol; }
SCROW GetRow() const { return nRow; }
ScFilterBoxMode GetMode() const { return eMode; }
- BOOL IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); }
+ sal_Bool IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); }
void EndInit();
- BOOL IsInInit() const { return bInit; }
- void SetCancelled() { bCancelled = TRUE; }
- BOOL IsInSelect() const { return bInSelect; }
+ sal_Bool IsInInit() const { return bInit; }
+ void SetCancelled() { bCancelled = sal_True; }
+ sal_Bool IsInSelect() const { return bInSelect; }
void SetListHasDates(bool b) { mbListHasDates = b; }
bool HasDates() const { return mbListHasDates; }
};
@@ -225,10 +225,10 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid,
pGridWin( pGrid ),
nCol( nNewCol ),
nRow( nNewRow ),
- bButtonDown( FALSE ),
- bInit( TRUE ),
- bCancelled( FALSE ),
- bInSelect( FALSE ),
+ bButtonDown( false ),
+ bInit( sal_True ),
+ bCancelled( false ),
+ bInSelect( false ),
mbListHasDates(false),
nSel( 0 ),
eMode( eNewMode )
@@ -243,13 +243,13 @@ ScFilterListBox::~ScFilterListBox()
void ScFilterListBox::EndInit()
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nSel = 0;
else
nSel = nPos;
- bInit = FALSE;
+ bInit = false;
}
void ScFilterListBox::LoseFocus()
@@ -270,7 +270,7 @@ long ScFilterListBox::PreNotify( NotifyEvent& rNEvt )
KeyCode aCode = aKeyEvt.GetKeyCode();
if ( !aCode.GetModifier() ) // ohne alle Modifiers
{
- USHORT nKey = aCode.GetCode();
+ sal_uInt16 nKey = aCode.GetCode();
if ( nKey == KEY_RETURN )
{
SelectHdl(); // auswaehlen
@@ -297,16 +297,16 @@ void ScFilterListBox::SelectHdl()
{
if ( !IsTravelSelect() && !bInit && !bCancelled )
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
{
nSel = nPos;
if (!bButtonDown)
{
// #i81298# set bInSelect flag, so the box isn't deleted from modifications within FilterSelect
- bInSelect = TRUE;
+ bInSelect = sal_True;
pGridWin->FilterSelect( nSel );
- bInSelect = FALSE;
+ bInSelect = false;
}
}
}
@@ -341,7 +341,7 @@ Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow()
// ============================================================================
-BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
+sal_Bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
{
// wenn es ein editierbarer Bereich ist, und rechts unten eine Matrix-Zelle
// mit Origin links oben liegt, enthaelt der Bereich genau die Matrix.
@@ -349,7 +349,7 @@ BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
if ( !pDoc->IsBlockEditable( rRange.aStart.Tab(), rRange.aStart.Col(),rRange.aStart.Row(),
rRange.aEnd.Col(),rRange.aEnd.Row() ) )
- return FALSE;
+ return false;
ScAddress aPos;
const ScBaseCell* pCell = pDoc->GetCell( rRange.aEnd );
@@ -379,24 +379,24 @@ void lcl_UnLockComment( ScDrawView* pView, SdrPageView* pPV, SdrModel* pDrDoc, c
sal_Bool lcl_GetHyperlinkCell(ScDocument* pDoc, SCCOL& rPosX, SCROW& rPosY, SCTAB nTab, ScBaseCell*& rpCell )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
do
{
pDoc->GetCell( rPosX, rPosY, nTab, rpCell );
if ( !rpCell || rpCell->GetCellType() == CELLTYPE_NOTE )
{
if ( rPosX <= 0 )
- return FALSE; // alles leer bis links
+ return false; // alles leer bis links
else
--rPosX; // weitersuchen
}
else if ( rpCell->GetCellType() == CELLTYPE_EDIT)
- bFound = TRUE;
+ bFound = sal_True;
else if (rpCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(rpCell)->IsHyperLinkCell())
- bFound = TRUE;
+ bFound = sal_True;
else
- return FALSE; // andere Zelle
+ return false; // andere Zelle
}
while ( !bFound );
@@ -425,31 +425,31 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
mpDPFieldPopup(NULL),
mpFilterButton(NULL),
nCursorHideCount( 0 ),
- bMarking( FALSE ),
+ bMarking( false ),
nButtonDown( 0 ),
- bEEMouse( FALSE ),
+ bEEMouse( false ),
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
- bDPMouse( FALSE ),
- bRFMouse( FALSE ),
+ bDPMouse( false ),
+ bRFMouse( false ),
nPagebreakMouse( SC_PD_NONE ),
- bPagebreakDrawn( FALSE ),
+ bPagebreakDrawn( false ),
nPageScript( 0 ),
- bDragRect( FALSE ),
+ bDragRect( false ),
nDragStartX( -1 ),
nDragStartY( -1 ),
nDragEndX( -1 ),
nDragEndY( -1 ),
meDragInsertMode( INS_NONE ),
nCurrentPointer( 0 ),
- bIsInScroll( FALSE ),
- bIsInPaint( FALSE ),
+ bIsInScroll( false ),
+ bIsInPaint( false ),
aComboButton( this ),
aCurMousePos( 0,0 ),
nPaintCount( 0 ),
- bNeedsRepaint( FALSE ),
- bAutoMarkVisible( FALSE ),
- bListValButton( FALSE )
+ bNeedsRepaint( false ),
+ bAutoMarkVisible( false ),
+ bListValButton( false )
{
switch(eWhich)
{
@@ -483,7 +483,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
SetUniqueId( HID_SC_WIN_GRIDWIN );
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- EnableRTL( FALSE );
+ EnableRTL( false );
}
ScGridWindow::~ScGridWindow()
@@ -540,7 +540,7 @@ IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo*, pInfo )
return 0;
}
-void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr )
+void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr )
{
//! gridwin2 ?
@@ -550,13 +550,13 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti
if ( pDPObj && nCol > 0 )
{
// look for the dimension header left of the drop-down arrow
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
ScDPSaveData aSaveData( *pDPObj->GetSaveData() );
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -573,7 +573,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSaveData( aSaveData );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -587,10 +587,10 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
delete pFilterBox;
delete pFilterFloat;
- USHORT i;
+ sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -629,13 +629,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
TypedScStrCollection aStrings( 128, 128 );
// get list box entries and selection
- BOOL bHasCurrentPage = FALSE;
+ sal_Bool bHasCurrentPage = false;
String aCurrentPage;
ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab);
if ( pDPObj && nCol > 0 )
{
// look for the dimension header left of the drop-down arrow
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
@@ -644,7 +644,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
// get current page from SaveData
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( pSaveData && !bIsDataLayout )
{
@@ -652,7 +652,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if ( pDim && pDim->HasCurrentPage() )
{
aCurrentPage = pDim->GetCurrentPage();
- bHasCurrentPage = TRUE;
+ bHasCurrentPage = sal_True;
}
}
}
@@ -660,7 +660,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
// include all entry widths for the size of the drop-down
long nMaxText = 0;
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i=0; i<nCount; i++)
{
TypedStrData* pData = aStrings[i];
@@ -691,13 +691,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show must be called before SetUpdateMode
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(false);
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS);
// fill the list box
- BOOL bWait = ( nCount > 100 );
+ sal_Bool bWait = ( nCount > 100 );
if (bWait)
EnterWait();
@@ -710,9 +710,9 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (bHasCurrentPage)
nSelPos = pFilterBox->GetEntryPos( aCurrentPage );
@@ -763,7 +763,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -803,7 +803,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
Size aSize( nSizeX, nHeight );
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!!
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(false);
// SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht
@@ -854,10 +854,10 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS );
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
pFilterBox->GrabFocus();
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if (aCurrent.Len())
{
nPos = pFilterBox->GetEntryPos( aCurrent );
@@ -876,15 +876,15 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
CaptureMouse();
}
-void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
+void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect )
{
delete pFilterBox;
delete pFilterFloat;
- USHORT i;
+ sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -921,15 +921,15 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
// SetSize spaeter
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = false;
TypedScStrCollection aStrings( 128, 128 );
if ( bDataSelect ) // Auswahl-Liste
{
// Liste fuellen
- aStrings.SetCaseSensitive( TRUE );
+ aStrings.SetCaseSensitive( sal_True );
pDoc->GetDataEntries( nCol, nRow, nTab, aStrings );
if ( aStrings.GetCount() == 0 )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else // AutoFilter
{
@@ -941,8 +941,8 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
long nMaxText = 0;
// default entries
- static const USHORT nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
- const USHORT nDefCount = SAL_N_ELEMENTS(nDefIDs);
+ static const sal_uInt16 nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
+ const sal_uInt16 nDefCount = SAL_N_ELEMENTS(nDefIDs);
for (i=0; i<nDefCount; i++)
{
String aEntry( (ScResId) nDefIDs[i] );
@@ -960,7 +960,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
// check widths of numerical entries (string entries are not included)
// so all numbers are completely visible
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i=0; i<nCount; i++)
{
TypedStrData* pData = aStrings[i];
@@ -998,14 +998,14 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!!
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(false);
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS);
// Listbox fuellen
- USHORT nCount = aStrings.GetCount();
- BOOL bWait = ( nCount > 100 );
+ sal_uInt16 nCount = aStrings.GetCount();
+ sal_Bool bWait = ( nCount > 100 );
if (bWait)
EnterWait();
@@ -1016,10 +1016,10 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
}
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (!bDataSelect) // AutoFilter: aktiven Eintrag selektieren
{
@@ -1029,7 +1029,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
ScQueryParam aParam;
pDBData->GetQueryParam( aParam ); // kann nur MAXQUERY Eintraege ergeben
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
for (SCSIZE j=0; j<MAXQUERY && bValid; j++) // bisherige Filter-Einstellungen
if (aParam.GetEntry(j).bDoQuery)
{
@@ -1038,7 +1038,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
ScQueryEntry& rEntry = aParam.GetEntry(j);
if (j>0)
if (rEntry.eConnect != SC_AND)
- bValid = FALSE;
+ bValid = false;
if (rEntry.nField == nCol)
{
if (rEntry.eOp == SC_EQUAL)
@@ -1064,7 +1064,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
else
{
- ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
nCol, nRow, nTab, ATTR_VALIDDATA ))->GetValue();
if ( nIndex )
{
@@ -1085,13 +1085,13 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
bool bSortList = ( pData->GetListType() == ValidListType::SORTEDASCENDING);
if ( bSortList )
{
- USHORT nStrIndex;
+ sal_uInt16 nStrIndex;
if (aStrings.Search(pNew,nStrIndex))
nSelPos = nStrIndex;
}
else
{
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i = 0; ((i < nCount) && ( LISTBOX_ENTRY_NOTFOUND == nSelPos)); i++)
{
if ( aStrings.Compare(aStrings[i], pNew)==0 )
@@ -1141,9 +1141,9 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
}
}
-void ScGridWindow::FilterSelect( ULONG nSel )
+void ScGridWindow::FilterSelect( sal_uLong nSel )
{
- String aString = pFilterBox->GetEntry( static_cast< USHORT >( nSel ) );
+ String aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
SCCOL nCol = pFilterBox->GetCol();
SCROW nRow = pFilterBox->GetRow();
@@ -1184,7 +1184,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr )
}
}
-void ScGridWindow::ExecFilter( ULONG nSel,
+void ScGridWindow::ExecFilter( sal_uLong nSel,
SCCOL nCol, SCROW nRow,
const String& aValue, bool bCheckForDates )
{
@@ -1211,13 +1211,13 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
else
{
- BOOL bDeleteOld = FALSE;
+ sal_Bool bDeleteOld = false;
SCSIZE nQueryPos = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
if (!aParam.bInplace)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
if (aParam.bRegExp)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
for (SCSIZE i=0; i<MAXQUERY && !bDeleteOld; i++) // bisherige Filter-Einstellungen
if (aParam.GetEntry(i).bDoQuery)
{
@@ -1226,14 +1226,14 @@ void ScGridWindow::ExecFilter( ULONG nSel,
ScQueryEntry& rEntry = aParam.GetEntry(i);
if (i>0)
if (rEntry.eConnect != SC_AND)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
if (rEntry.nField == nCol)
{
if (bFound) // diese Spalte zweimal?
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
nQueryPos = i;
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
nQueryPos = i + 1;
@@ -1245,8 +1245,8 @@ void ScGridWindow::ExecFilter( ULONG nSel,
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).Clear();
nQueryPos = 0;
- aParam.bInplace = TRUE;
- aParam.bRegExp = FALSE;
+ aParam.bInplace = sal_True;
+ aParam.bRegExp = false;
}
if ( nQueryPos < MAXQUERY || SC_AUTOFILTER_ALL == nSel ) // loeschen geht immer
@@ -1255,8 +1255,8 @@ void ScGridWindow::ExecFilter( ULONG nSel,
{
ScQueryEntry& rNewEntry = aParam.GetEntry(nQueryPos);
- rNewEntry.bDoQuery = TRUE;
- rNewEntry.bQueryByString = TRUE;
+ rNewEntry.bDoQuery = sal_True;
+ rNewEntry.bQueryByString = sal_True;
rNewEntry.nField = nCol;
rNewEntry.bQueryByDate = bCheckForDates;
if ( nSel == SC_AUTOFILTER_TOP10 )
@@ -1267,7 +1267,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
else if (nSel == SC_AUTOFILTER_EMPTY)
{
rNewEntry.pStr->Erase();
- rNewEntry.bQueryByString = FALSE;
+ rNewEntry.bQueryByString = false;
rNewEntry.eOp = SC_EQUAL;
rNewEntry.nVal = SC_EMPTYFIELDS;
@@ -1275,7 +1275,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
else if (nSel == SC_AUTOFILTER_NOTEMPTY)
{
rNewEntry.pStr->Erase();
- rNewEntry.bQueryByString = FALSE;
+ rNewEntry.bQueryByString = false;
rNewEntry.eOp = SC_EQUAL;
rNewEntry.nVal = SC_NONEMPTYFIELDS;
}
@@ -1301,7 +1301,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
aParam.bUseDynamicRange = true;
- pViewData->GetView()->Query( aParam, NULL, TRUE );
+ pViewData->GetView()->Query( aParam, NULL, true );
pDBData->SetQueryParam( aParam ); // speichern
}
else // "Zuviele Bedingungen"
@@ -1335,7 +1335,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
rDestWin.nRFIndex = nRFIndex;
rDestWin.nRFAddX = nRFAddX;
rDestWin.nRFAddY = nRFAddY;
- bRFMouse = FALSE;
+ bRFMouse = false;
}
if (nPagebreakMouse)
@@ -1349,26 +1349,26 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
}
}
-BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
+sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
{
// MouseEvent buttons must only be checked if bAction==TRUE
// to allow changing the mouse pointer in MouseMove,
// but not start AutoFill with right button (#74229#).
- // with bAction==TRUE, SetFillMode / SetDragMode is called
+ // with bAction==sal_True, SetFillMode / SetDragMode is called
if ( bAction && !rMEvt.IsLeft() )
- return FALSE;
+ return false;
- BOOL bNewPointer = FALSE;
+ sal_Bool bNewPointer = false;
SfxInPlaceClient* pClient = pViewData->GetViewShell()->GetIPClient();
- BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
if ( pViewData->IsActive() && !bOleActive )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// Auto-Fill
@@ -1397,7 +1397,7 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
// where the Marking flag is set and MarkToSimple won't work anymore.
pViewData->GetMarkData().MarkToSimple();
}
- bNewPointer = TRUE;
+ bNewPointer = sal_True;
}
}
}
@@ -1418,21 +1418,21 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
aStartPos.X() += 2;
aEndPos.X() += 2;
}
- BOOL bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
+ sal_Bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
aMousePos.Y() >= aStartPos.Y()-3 && aMousePos.Y() <= aStartPos.Y()+1 );
- BOOL bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
+ sal_Bool bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
aMousePos.Y() >= aEndPos.Y()-3 && aMousePos.Y() <= aEndPos.Y()+1 );
if ( bTop || bBottom )
{
SetPointer( Pointer( POINTER_CROSS ) );
if (bAction)
{
- BYTE nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB;
+ sal_uInt8 nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB;
pViewData->SetDragMode(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), nMode );
}
- bNewPointer = TRUE;
+ bNewPointer = sal_True;
}
}
}
@@ -1490,7 +1490,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
HideNoteMarker(); // Notiz-Anzeige
- bEEMouse = FALSE;
+ bEEMouse = false;
ScModule* pScMod = SC_MOD();
if (pScMod->IsModalMode(pViewData->GetSfxDocShell()))
@@ -1502,11 +1502,11 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
pScActiveViewShell = pViewData->GetViewShell(); // falls auf Link geklickt wird
nScClickMouseModifier = rMEvt.GetModifier(); // um Control-Klick immer zu erkennen
- BOOL bDetective = pViewData->GetViewShell()->IsAuditShell();
- BOOL bRefMode = pViewData->IsRefMode(); // Referenz angefangen
- BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
- BOOL bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE
- BOOL bDouble = (rMEvt.GetClicks() == 2);
+ sal_Bool bDetective = pViewData->GetViewShell()->IsAuditShell();
+ sal_Bool bRefMode = pViewData->IsRefMode(); // Referenz angefangen
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE
+ sal_Bool bDouble = (rMEvt.GetClicks() == 2);
// DeactivateIP passiert nur noch bei MarkListHasChanged
@@ -1586,7 +1586,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
GrabFocus();
pScMod->SetInputMode( SC_INPUT_TABLE );
- bEEMouse = TRUE;
+ bEEMouse = sal_True;
bEditMode = pEditView->MouseButtonDown( rMEvt );
return;
}
@@ -1607,7 +1607,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
if ( HitRangeFinder( rMEvt.GetPosPixel(), bRFSize, &nRFIndex, &nRFAddX, &nRFAddY ) )
{
- bRFMouse = TRUE; // die anderen Variablen sind oben initialisiert
+ bRFMouse = sal_True; // die anderen Variablen sind oben initialisiert
if ( pViewData->GetActivePart() != eWhich )
pViewData->GetView()->ActivatePart( eWhich ); //! schon oben immer ???
@@ -1616,7 +1616,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- BOOL bCrossPointer = TestMouse( rMEvt, TRUE );
+ sal_Bool bCrossPointer = TestMouse( rMEvt, sal_True );
if ( bCrossPointer )
{
if ( bDouble )
@@ -1631,9 +1631,9 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
&nPagebreakBreak, &nPagebreakPrev );
if (nPagebreakMouse)
{
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
StartTracking();
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, false );
return;
}
}
@@ -1645,7 +1645,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // kein Draw-Objekt selektiert
+ pViewData->GetViewShell()->SetDrawShell( false ); // kein Draw-Objekt selektiert
// TestMouse schon oben passiert
}
@@ -1684,7 +1684,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
Rectangle aButtonRect = GetListValButtonRect( aListValPos );
if ( aButtonRect.IsInside( aPos ) )
{
- DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), TRUE );
+ DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), sal_True );
nMouseStatus = SC_GM_FILTER; // not set in DoAutoFilterMenue for bDataSelect
CaptureMouse();
@@ -1725,7 +1725,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// Links in Edit-Zellen
//
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && rMEvt.IsLeft() &&
GetEditUrl(rMEvt.GetPosPixel()) ) // Klick auf Link: Cursor nicht bewegen
{
@@ -1755,7 +1755,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
ReleaseMouse();
StartTracking();
}
- pViewData->GetMarkData().SetMarking(TRUE);
+ pViewData->GetMarkData().SetMarking(sal_True);
return;
}
}
@@ -1783,7 +1783,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
nMouseStatus = SC_GM_NONE;
// Selection-Engine: Markieren abbrechen
pViewData->GetView()->GetSelEngine()->Reset();
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(false);
if (pViewData->IsAnyFillMode())
{
pViewData->GetView()->StopRefMode();
@@ -1840,7 +1840,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pViewData->GetView()->InvalidateAttribs();
rBindings.Invalidate( SID_HYPERLINK_GETLINK );
- bEEMouse = FALSE;
+ bEEMouse = false;
return;
}
@@ -1852,8 +1852,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // Range wieder richtigherum
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // Range wieder richtigherum
+ bRFMouse = false;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
return;
@@ -1861,7 +1861,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, TRUE );
+ PagebreakMove( rMEvt, sal_True );
nPagebreakMouse = SC_PD_NONE;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
@@ -1870,7 +1870,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nMouseStatus == SC_GM_WATERUNDO) // Undo im Giesskannenmodus
{
- SfxUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE )
pMgr->Undo();
else
@@ -1881,7 +1881,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects
return;
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(false);
SetPointer( Pointer( POINTER_ARROW ) );
@@ -1895,16 +1895,16 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
SCROW nEndRow;
pViewData->GetFillData( nStartCol, nStartRow, nEndCol, nEndRow );
ScRange aDelRange;
- BOOL bIsDel = pViewData->GetDelMark( aDelRange );
+ sal_Bool bIsDel = pViewData->GetDelMark( aDelRange );
ScViewFunc* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE ); // #i5819# don't use AutoFill anchor flag for selection
+ pView->GetFunctionSet()->SetAnchorFlag( false ); // #i5819# don't use AutoFill anchor flag for selection
if ( bIsDel )
{
- pView->MarkRange( aDelRange, FALSE );
+ pView->MarkRange( aDelRange, false );
pView->DeleteContents( IDF_CONTENTS );
SCTAB nTab = pViewData->GetTabNo();
ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
@@ -1914,7 +1914,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
aBlockRange.aEnd.SetCol( aDelRange.aStart.Col() - 1 );
else
aBlockRange.aEnd.SetRow( aDelRange.aStart.Row() - 1 );
- pView->MarkRange( aBlockRange, FALSE );
+ pView->MarkRange( aBlockRange, false );
}
}
else
@@ -1936,11 +1936,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( false );
if ( aEndPos != aBlockRange.aEnd )
{
- pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, FALSE );
+ pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, false );
pViewData->GetView()->MarkRange( ScRange( aBlockRange.aStart, aEndPos ) );
}
}
@@ -1950,11 +1950,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( false );
pViewData->GetDocShell()->UpdateOle(pViewData);
}
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
pScMod->EndReference();
@@ -1990,7 +1990,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pStyleSheet->GetName() );
ScPrintFunc( pViewData->GetDocShell(),
- pViewData->GetViewShell()->GetPrinter(TRUE),
+ pViewData->GetViewShell()->GetPrinter(sal_True),
pViewData->GetTabNo() ).UpdatePages();
rBindings.Invalidate( SID_STATUS_PAGESTYLE );
@@ -2016,7 +2016,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// double click (only left button)
//
- BOOL bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
+ sal_Bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
if ( bDouble && !bRefMode && nMouseStatus == SC_GM_DBLDOWN && !pScMod->IsRefDialogOpen() )
{
// data pilot table
@@ -2037,7 +2037,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( ( aData.Flags & sheet::MemberResultFlags::HASMEMBER ) &&
! ( aData.Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
if ( pView->HasSelectionForDrillDown( nDummy ) )
{
// execute slot to show dialog
@@ -2049,7 +2049,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScDPObject aNewObj( *pDPObj );
pDPObj->ToggleDetails( aData, &aNewObj );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -2103,7 +2103,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// Links in edit cells
//
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && !bRefMode && !bDouble && nMouseStatus == SC_GM_URLDOWN )
{
// beim ButtonUp nur ausfuehren, wenn ButtonDown auch ueber einer URL war
@@ -2146,14 +2146,14 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
//
// SelMouseButtonDown is called only for left button, but SelMouseButtonUp would return
- // TRUE for any call, so IsLeft must be checked here, too.
+ // sal_True for any call, so IsLeft must be checked here, too.
if ( rMEvt.IsLeft() && pViewData->GetView()->GetSelEngine()->SelMouseButtonUp( rMEvt ) )
{
pViewData->GetView()->SelectionChanged();
SfxDispatcher* pDisp = pViewData->GetViewShell()->GetDispatcher();
- BOOL bFormulaMode = pScMod->IsFormulaMode();
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode();
DBG_ASSERT( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" );
// #i14927# execute SID_CURRENTCELL (for macro recording) only if there is no
@@ -2225,7 +2225,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bEEMouse && nButtonDown && !rMEvt.GetButtons())
{
- bEEMouse = FALSE;
+ bEEMouse = false;
nButtonDown = 0;
nMouseStatus = SC_GM_NONE;
return;
@@ -2267,7 +2267,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2287,19 +2287,19 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, FALSE );
+ RFMouseMove( rMEvt, false );
return;
}
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, false );
return;
}
// anderen Mauszeiger anzeigen?
- BOOL bEditMode = pViewData->HasEditView(eWhich);
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich);
//! Testen ob RefMode-Dragging !!!
if ( bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()) )
@@ -2320,7 +2320,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow )
{
// Field can only be URL field
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && !nButtonDown && pEditView && pEditView->GetFieldUnderMousePointer() )
SetPointer( Pointer( POINTER_REFHAND ) );
else if ( pEditView && pEditView->GetEditEngine()->IsVertical() )
@@ -2331,29 +2331,29 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- BOOL bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush();
+ sal_Bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush();
if (bWater)
SetPointer( Pointer(POINTER_FILL) );
if (!bWater)
{
- BOOL bCross = FALSE;
+ sal_Bool bCross = false;
// Range-Finder
- BOOL bCorner;
+ sal_Bool bCorner;
if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) )
{
if (bCorner)
SetPointer( Pointer( POINTER_CROSS ) );
else
SetPointer( Pointer( POINTER_HAND ) );
- bCross = TRUE;
+ bCross = sal_True;
}
// Page-Break-Modus
- USHORT nBreakType;
+ sal_uInt16 nBreakType;
if ( !nButtonDown && pViewData->IsPagebreakMode() &&
( nBreakType = HitPageBreak( rMEvt.GetPosPixel() ) ) != 0 )
{
@@ -2380,25 +2380,25 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
break;
}
SetPointer( Pointer( eNew ) );
- bCross = TRUE;
+ bCross = sal_True;
}
// Fill-Cursor anzeigen ?
if ( !bFormulaMode && !nButtonDown )
- if (TestMouse( rMEvt, FALSE ))
- bCross = TRUE;
+ if (TestMouse( rMEvt, false ))
+ bCross = sal_True;
if ( nButtonDown && pViewData->IsAnyFillMode() )
{
SetPointer( Pointer( POINTER_CROSS ) );
- bCross = TRUE;
+ bCross = sal_True;
nScFillModeMouseModifier = rMEvt.GetModifier(); // ausgewertet bei AutoFill und Matrix
}
if (!bCross)
{
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if (bEditMode) // Edit-Mode muss zuerst kommen!
SetPointer( Pointer( POINTER_ARROW ) );
@@ -2437,13 +2437,13 @@ void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const MouseE
rEvent.X = rEvt.GetPosPixel().X();
rEvent.Y = rEvt.GetPosPixel().Y();
rEvent.ClickCount = rEvt.GetClicks();
- rEvent.PopupTrigger = sal_False;
+ rEvent.PopupTrigger = false;
}
long ScGridWindow::PreNotify( NotifyEvent& rNEvt )
{
bool bDone = false;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN )
{
Window* pWindow = rNEvt.GetWindow();
@@ -2502,24 +2502,24 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
if (!pViewData->GetView()->IsInActivatePart())
{
if (bDPMouse)
- bDPMouse = FALSE; // gezeichnet wird per bDragRect
+ bDPMouse = false; // gezeichnet wird per bDragRect
if (bDragRect)
{
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // richtig abbrechen geht dabei nicht...
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // richtig abbrechen geht dabei nicht...
+ bRFMouse = false;
}
if (nPagebreakMouse)
{
// if (bPagebreakDrawn)
// DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(),
- // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE );
- bPagebreakDrawn = FALSE;
+ // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False );
+ bPagebreakDrawn = false;
UpdateDragRectOverlay();
nPagebreakMouse = SC_PD_NONE;
}
@@ -2528,7 +2528,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
StopMarking();
MouseButtonUp( rMEvt ); // mit Status SC_GM_IGNORE aus StopMarking
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
SC_MOD()->EndReference(); // Dialog nicht verkleinert lassen
}
@@ -2554,7 +2554,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
HideNoteMarker();
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2565,7 +2565,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
// don't remove the edit view while switching views
ScModule* pScMod = SC_MOD();
- pScMod->SetInEditCommand( TRUE );
+ pScMod->SetInEditCommand( sal_True );
pEditView->Command( aDragEvent );
@@ -2573,7 +2573,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
if (pHdl)
pHdl->DataChanged();
- pScMod->SetInEditCommand( FALSE );
+ pScMod->SetInEditCommand( false );
if (!pViewData->IsActive()) // dropped to different view?
{
ScInputHandler* pViewHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
@@ -2593,7 +2593,7 @@ void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, Window* pWi
{
SCCOL nCol = pViewData->GetCurX();
SCROW nRow = pViewData->GetCurY();
- Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, TRUE );
+ Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, sal_True );
aEditArea.Right() = aEditArea.Left();
aEditArea = pWin->PixelToLogic( aEditArea );
pWin->SetCursorRect( &aEditArea );
@@ -2605,7 +2605,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
// menu from an inplace client is closed. Now we have the chance to
// deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
ScTabViewShell* pTabViewSh = pViewData->GetViewShell();
SfxInPlaceClient* pClient = pTabViewSh->GetIPClient();
if ( pClient &&
@@ -2624,7 +2624,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
nCmd == COMMAND_EXTTEXTINPUT ||
nCmd == COMMAND_CURSORPOS )
{
- BOOL bEditView = pViewData->HasEditView( eWhich );
+ sal_Bool bEditView = pViewData->HasEditView( eWhich );
if (!bEditView)
{
// only if no cell editview is active, look at drawview
@@ -2654,7 +2654,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
if ( pHdl )
{
- pHdl->InputCommand( rCEvt, TRUE );
+ pHdl->InputCommand( rCEvt, sal_True );
return; // done
}
@@ -2717,20 +2717,20 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
{
- BOOL bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
+ sal_Bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
if (!bDone)
Window::Command(rCEvt);
return;
}
// #i7560# FormulaMode check is below scrolling - scrolling is allowed during formula input
- BOOL bDisable = pScMod->IsFormulaMode() ||
+ sal_Bool bDisable = pScMod->IsFormulaMode() ||
pScMod->IsModalMode(pViewData->GetSfxDocShell());
if (bDisable)
return;
if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() )
{
- BOOL bMouse = rCEvt.IsMouseEvent();
+ sal_Bool bMouse = rCEvt.IsMouseEvent();
if ( bMouse && nMouseStatus == SC_GM_IGNORE )
return;
@@ -2775,12 +2775,12 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
SelectForContextMenu( aPosPixel, nCellX, nCellY );
}
- BOOL bDone = FALSE;
- BOOL bEdit = pViewData->HasEditView(eWhich);
+ sal_Bool bDone = false;
+ sal_Bool bEdit = pViewData->HasEditView(eWhich);
if ( !bEdit )
{
// Edit-Zelle mit Spelling-Errors ?
- if ( bMouse && GetEditUrlOrError( TRUE, aPosPixel ) )
+ if ( bMouse && GetEditUrlOrError( sal_True, aPosPixel ) )
{
// GetEditUrlOrError hat den Cursor schon bewegt
@@ -2826,7 +2826,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
Link aLink = LINK( this, ScGridWindow, PopupSpellingHdl );
pEditView->ExecuteSpellPopup( aMenuPos, &aLink );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( !bMouse )
@@ -2835,7 +2835,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
SCCOL nCurX = pViewData->GetCurX();
SCROW nCurY = pViewData->GetCurY();
- aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, TRUE );
+ aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nCurX, nCurY, nSizeXPix, nSizeYPix );
@@ -2983,24 +2983,24 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
// look for existing selection
- BOOL bHitSelected = FALSE;
+ sal_Bool bHitSelected = false;
if ( pDrawView && pDrawView->IsMarkedObjHit( aLogicPos ) )
{
// clicked on selected object -> don't change anything
- bHitSelected = TRUE;
+ bHitSelected = sal_True;
}
else if ( pViewData->GetMarkData().IsCellMarked(nCellX, nCellY) )
{
// clicked on selected cell -> don't change anything
- bHitSelected = TRUE;
+ bHitSelected = sal_True;
}
// select drawing object or move cell cursor
if ( !bHitSelected )
{
- BOOL bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
- BOOL bHitDraw = FALSE;
+ sal_Bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
+ sal_Bool bHitDraw = false;
if ( pDrawView )
{
pDrawView->UnmarkAllObj();
@@ -3015,7 +3015,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
pView->Unmark();
pView->SetCursor(nCellX, nCellY);
if ( bWasDraw )
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // switch shells
+ pViewData->GetViewShell()->SetDrawShell( false ); // switch shells
}
}
}
@@ -3030,7 +3030,7 @@ static void ClearSingleSelection( ScViewData* pViewData )
return;
ScDocument* pClipDoc = pTransObj->GetDocument();
- pClipDoc->GetClipArea( nX, nY, TRUE );
+ pClipDoc->GetClipArea( nX, nY, true );
if (nX == 0 && nY == 0)
{
ScTabView* pView = pViewData->GetView();
@@ -3062,7 +3062,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
{
ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
- ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, FALSE );
+ ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, false );
ClearSingleSelection( pViewData );
uno::Reference<datatransfer::clipboard::XClipboard> xSystemClipboard =
@@ -3089,7 +3089,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
}
// query for existing note marker before calling ViewShell's keyboard handling
// which may remove the marker
- BOOL bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
+ sal_Bool bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
ScTabViewShell* pViewSh = pViewData->GetViewShell();
if (pViewData->GetDocShell()->GetProgress())
@@ -3124,7 +3124,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
if ( bHadKeyMarker )
HideNoteMarker(); // hide when previously visible
else
- ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), TRUE );
+ ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), sal_True );
return;
}
if (aCode.GetCode() == KEY_BRACKETLEFT && aCode.GetModifier() == KEY_MOD1)
@@ -3149,15 +3149,15 @@ void ScGridWindow::StopMarking()
if (nButtonDown)
{
- pViewData->GetMarkData().SetMarking(FALSE);
+ pViewData->GetMarkData().SetMarking(false);
nMouseStatus = SC_GM_IGNORE;
}
}
void ScGridWindow::UpdateInputContext()
{
- BOOL bReadOnly = pViewData->GetDocShell()->IsReadOnly();
- ULONG nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
+ sal_Bool bReadOnly = pViewData->GetDocShell()->IsReadOnly();
+ sal_uLong nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
// when font from InputContext is used,
// it must be taken from the cursor position's cell attributes
@@ -3172,7 +3172,7 @@ void ScGridWindow::UpdateInputContext()
// sensitiver Bereich (Pixel)
#define SCROLL_SENSITIVE 20
-BOOL ScGridWindow::DropScroll( const Point& rMousePos )
+sal_Bool ScGridWindow::DropScroll( const Point& rMousePos )
{
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -3203,15 +3203,15 @@ BOOL ScGridWindow::DropScroll( const Point& rMousePos )
pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
}
- return FALSE;
+ return false;
}
-BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
+sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
// Testet, ob bei eingeschalteten RedLining,
// bei einem Drop ein Scenario betroffen ist.
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = false;
SCTAB nTab = aDragRange.aStart.Tab();
SCTAB nTabCount = pDoc->GetTableCount();
@@ -3219,7 +3219,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -3227,7 +3227,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if(pDoc->HasScenarioRange(i, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
}
@@ -3258,8 +3258,8 @@ ScRange lcl_MakeDropRange( SCCOL nPosX, SCROW nPosY, SCTAB nTab, const ScRange&
//--------------------------------------------------------
-extern BOOL bPasteIsDrop; // viewfun4 -> move to header
-extern BOOL bPasteIsMove; // viewfun7 -> move to header
+extern sal_Bool bPasteIsDrop; // viewfun4 -> move to header
+extern sal_Bool bPasteIsMove; // viewfun7 -> move to header
//--------------------------------------------------------
@@ -3267,7 +3267,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( rEvt.mbLeaving )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
return rEvt.mnAction;
}
@@ -3280,7 +3280,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3296,7 +3296,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect) // Rechteck loeschen
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
@@ -3309,7 +3309,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( rData.pCellTransfer->GetDragSourceFlags() & SC_DROP_TABLE ) // whole sheet?
{
- BOOL bOk = pThisDoc->IsDocEditable();
+ sal_Bool bOk = pThisDoc->IsDocEditable();
return bOk ? rEvt.mnAction : 0; // don't draw selection frame
}
@@ -3346,7 +3346,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3380,14 +3380,14 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( bValid )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout );
const ScDPSaveDimension* pDim = pDPObj->GetSaveData()->GetExistingDimensionByName( aDimName );
if ( pDim )
{
ScRange aOutRange = pDPObj->GetOutRange();
- USHORT nOrient = pDim->GetOrientation();
+ sal_uInt16 nOrient = pDim->GetOrientation();
if ( nOrient == sheet::DataPilotFieldOrientation_COLUMN )
{
eDragInsertMode = INS_CELLSRIGHT;
@@ -3409,7 +3409,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
// no valid sorting in a DataPilot table -> disallow
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3439,7 +3439,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3467,7 +3467,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
nDragStartY = nNewDragY;
nDragEndX = nDragStartX+nSizeX-1;
nDragEndY = nDragStartY+nSizeY-1;
- bDragRect = TRUE;
+ bDragRect = sal_True;
meDragInsertMode = eDragInsertMode;
UpdateDragRectOverlay();
@@ -3558,7 +3558,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
case DND_ACTION_MOVE:
case DND_ACTION_COPYMOVE:
{
- BOOL bMove = ( nMyAction == DND_ACTION_MOVE );
+ sal_Bool bMove = ( nMyAction == DND_ACTION_MOVE );
if ( IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE ) ||
IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) ||
IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) ||
@@ -3610,7 +3610,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
// Simple check for protection: It's not known here if the drop will result
// in cells or drawing objects (some formats can be both) and how many cells
// the result will be. But if IsFormatEditable for the drop cell position
- // is FALSE (ignores matrix formulas), nothing can be pasted, so the drop
+ // is sal_False (ignores matrix formulas), nothing can be pasted, so the drop
// can already be rejected here.
Point aPos = rEvt.maPosPixel;
@@ -3635,7 +3635,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
return nRet;
}
-ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
+sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
{
TransferableDataHelper aDataHelper( xTransfer );
@@ -3653,7 +3653,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
return SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR;
}
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) )
nFormatId = SOT_FORMATSTR_ID_DRAWING;
else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) )
@@ -3662,7 +3662,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
{
// If it's a Writer object, insert RTF instead of OLE
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = false;
SotStorageStreamRef xStm;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) &&
@@ -3720,11 +3720,11 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
return nFormatId;
}
-ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
+sal_uLong lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
{
TransferableDataHelper aDataHelper( xTransfer );
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) )
nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE;
else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) )
@@ -3751,7 +3751,7 @@ ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTra
sal_Int8 ScGridWindow::ExecutePrivateDrop( const ExecuteDropEvent& rEvt )
{
// hide drop marker
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
ScModule* pScMod = SC_MOD();
@@ -3772,10 +3772,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
ScDocument* pThisDoc = pViewData->GetDocument();
ScViewFunc* pView = pViewData->GetView();
SCTAB nThisTab = pViewData->GetTabNo();
- USHORT nFlags = pTransObj->GetDragSourceFlags();
+ sal_uInt16 nFlags = pTransObj->GetDragSourceFlags();
- BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
- BOOL bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi );
+ sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
+ sal_Bool bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi );
// workaround for wrong nDndAction on Windows when pressing solely
// the Alt key during drag and drop;
@@ -3785,7 +3785,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bIsMove = ( nDndAction & DND_ACTION_MOVE && !bIsNavi );
}
- BOOL bIsLink = ( nDndAction == DND_ACTION_LINK );
+ sal_Bool bIsLink = ( nDndAction == DND_ACTION_LINK );
ScRange aSource = pTransObj->GetRange();
@@ -3826,7 +3826,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bFiltered = ScViewUtil::HasFiltered( aDest, pThisDoc);
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (!bFiltered && pSourceDoc == pThisDoc)
{
@@ -3835,9 +3835,9 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( pThisDoc->IsDocEditable() )
{
SCTAB nSrcTab = aSource.aStart.Tab();
- pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, TRUE ); // with Undo
- pView->SetTabNo( nThisTab, TRUE );
- bDone = TRUE;
+ pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, sal_True ); // with Undo
+ pView->SetTabNo( nThisTab, sal_True );
+ bDone = sal_True;
}
}
else // move/copy block
@@ -3849,10 +3849,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
aSource.Format( aRangeName, SCR_ABS_3D, pThisDoc );
SfxStringItem aNameItem( SID_CHART_NAME, aChartName );
SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName );
- USHORT nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
+ sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
pViewData->GetDispatcher().Execute( nId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aRangeItem, &aNameItem, (void*) NULL );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) )
{
@@ -3862,7 +3862,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( aDestPos != aSource.aStart )
bDone = pViewData->GetView()->DataPilotMove( aSource, aDestPos );
else
- bDone = TRUE; // same position: nothing
+ bDone = sal_True; // same position: nothing
}
else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() ||
nSourceTab != nThisTab )
@@ -3870,11 +3870,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
if ( nThisTab == nSourceTab )
@@ -3899,13 +3899,13 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
{
if ( bIsLink )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pView->LinkBlock( aSource, aDest.aStart, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pView->LinkBlock( aSource, aDest.aStart, sal_True /*bApi*/ );
}
else
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, TRUE /*bRecord*/, TRUE /*bPaint*/, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, sal_True /*bRecord*/, sal_True /*bPaint*/, sal_True /*bApi*/ );
}
}
@@ -3924,8 +3924,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( ( eCmd == DEL_CELLSUP && nDestPosX == aSource.aStart.Col() ) ||
( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, TRUE /*bRecord*/, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, sal_True /*bRecord*/, sal_True /*bApi*/ );
if ( bDone )
{
if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() )
@@ -3944,7 +3944,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
SCCOL nDCol = pViewData->GetCurX() - aSource.aStart.Col();
SCROW nDRow = pViewData->GetCurY() - aSource.aStart.Row();
@@ -3957,7 +3957,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
Sound::Beep(); // instead of error message in drop handler
}
else
- bDone = TRUE; // nothing to do
+ bDone = sal_True; // nothing to do
}
if (bDone)
@@ -3995,7 +3995,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
}
pView->ImportTables( pSrcShell,nTabSelCount, nTabs, bIsLink, nThisTab );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( bIsLink )
@@ -4010,11 +4010,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4055,7 +4055,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
pView->EnterMatrix( aFormula );
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.Row() );
}
@@ -4070,11 +4070,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4089,7 +4089,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bDone = pView->PasteFromClip( IDF_ALL, pTransObj->GetDocument() ); // clip-doc
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.Row() );
}
}
@@ -4120,14 +4120,14 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// try to insert a link
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
String aThisName;
ScDocShell* pDocSh = pViewData->GetDocShell();
if (pDocSh && pDocSh->HasName())
aThisName = pDocSh->GetMedium()->GetName();
if ( rData.aLinkDoc == aThisName ) // error - no link within a document
- bOk = FALSE;
+ bOk = false;
else
{
ScViewFunc* pView = pViewData->GetView();
@@ -4139,7 +4139,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE );
+ pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
pView->InsertAreaLink( rData.aLinkDoc, EMPTY_STRING, EMPTY_STRING,
rData.aLinkArea, 0 );
@@ -4147,7 +4147,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
else
{
OSL_FAIL("drop with link: no sheet nor area");
- bOk = FALSE;
+ bOk = false;
}
}
@@ -4158,10 +4158,10 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (rData.pDrawTransfer)
{
- USHORT nFlags = rData.pDrawTransfer->GetDragSourceFlags();
+ sal_uInt16 nFlags = rData.pDrawTransfer->GetDragSourceFlags();
- BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
- BOOL bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi );
+ sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
+ sal_Bool bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi );
bPasteIsMove = bIsMove;
@@ -4169,7 +4169,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (bPasteIsMove)
rData.pDrawTransfer->SetDragWasInternal();
- bPasteIsMove = FALSE;
+ bPasteIsMove = false;
return rEvt.mnAction;
}
@@ -4192,7 +4192,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
- BOOL bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
+ sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
ScDocument* pThisDoc = pViewData->GetDocument();
SdrObject* pHitObj = pThisDoc->GetObjectAtPoint( pViewData->GetTabNo(), PixelToLogic(aPos) );
@@ -4200,23 +4200,23 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// dropped on drawing object
// PasteOnDrawObject checks for valid formats
- if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, TRUE ) )
+ if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, sal_True ) )
return rEvt.mnAction;
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
- ULONG nFormatId = bIsLink ?
+ sal_uLong nFormatId = bIsLink ?
lcl_GetDropLinkId( rEvt.maDropEvent.Transferable ) :
lcl_GetDropFormatId( rEvt.maDropEvent.Transferable );
if ( nFormatId )
{
- pScMod->SetInExecuteDrop( TRUE ); // #i28468# prevent error messages from PasteDataFormat
- bPasteIsDrop = TRUE;
+ pScMod->SetInExecuteDrop( sal_True ); // #i28468# prevent error messages from PasteDataFormat
+ bPasteIsDrop = sal_True;
bDone = pViewData->GetView()->PasteDataFormat(
nFormatId, rEvt.maDropEvent.Transferable, nPosX, nPosY, &aLogicPos, bIsLink );
- bPasteIsDrop = FALSE;
- pScMod->SetInExecuteDrop( FALSE );
+ bPasteIsDrop = false;
+ pScMod->SetInExecuteDrop( false );
}
sal_Int8 nRet = bDone ? rEvt.mnAction : DND_ACTION_NONE;
@@ -4238,8 +4238,8 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
SdrView* pDrawView = pViewData->GetViewShell()->GetSdrView();
if (pDrawView)
{
- ULONG nCount = pDrawView->GetMarkedObjectCount();
- for (ULONG i = 0; i < nCount; ++i)
+ sal_uLong nCount = pDrawView->GetMarkedObjectCount();
+ for (sal_uLong i = 0; i < nCount; ++i)
{
SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i);
if (pObj && pObj->GetLogicRect().IsInside(aLogicPos))
@@ -4272,7 +4272,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
// bSameDocClipboard argument for PasteDraw is needed
// because only DragData is checked directly inside PasteDraw
- pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), FALSE,
+ pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), false,
pDrawTransfer->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
}
@@ -4285,12 +4285,12 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
uno::Reference<datatransfer::XTransferable> xTransferable = aDataHelper.GetTransferable();
if ( xTransferable.is() )
{
- ULONG nFormatId = lcl_GetDropFormatId( xTransferable, true );
+ sal_uLong nFormatId = lcl_GetDropFormatId( xTransferable, true );
if ( nFormatId )
{
- bPasteIsDrop = TRUE;
+ bPasteIsDrop = sal_True;
pViewData->GetView()->PasteDataFormat( nFormatId, xTransferable, nPosX, nPosY, &aLogicPos );
- bPasteIsDrop = FALSE;
+ bPasteIsDrop = false;
}
}
}
@@ -4311,10 +4311,10 @@ void ScGridWindow::UpdateEditViewPos()
// hide EditView?
- BOOL bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) );
+ sal_Bool bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) );
if ( SC_MOD()->IsFormulaMode() )
if ( pViewData->GetTabNo() != pViewData->GetRefTabNo() )
- bHide = TRUE;
+ bHide = sal_True;
if (bHide)
{
@@ -4328,8 +4328,8 @@ void ScGridWindow::UpdateEditViewPos()
}
else
{
- // bForceToTop = TRUE for editing
- Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, TRUE );
+ // bForceToTop = sal_True for editing
+ Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, sal_True );
Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() );
Rectangle aRect = pView->GetOutputArea();
@@ -4345,7 +4345,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
ClickExtern();
HideNoteMarker();
- bIsInScroll = TRUE;
+ bIsInScroll = true;
SetMapMode(MAP_PIXEL);
Scroll( nDifX, nDifY, SCROLL_CHILDREN );
@@ -4354,7 +4354,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
UpdateEditViewPos();
DrawAfterScroll();
- bIsInScroll = FALSE;
+ bIsInScroll = false;
}
// Formeln neu zeichnen -------------------------------------------------
@@ -4369,7 +4369,7 @@ void ScGridWindow::UpdateFormulas()
// nicht anfangen, verschachtelt zu painten
// (dann wuerde zumindest der MapMode nicht mehr stimmen)
- bNeedsRepaint = TRUE; // -> am Ende vom Paint nochmal Invalidate auf alles
+ bNeedsRepaint = sal_True; // -> am Ende vom Paint nochmal Invalidate auf alles
aRepaintPixel = Rectangle(); // alles
return;
}
@@ -4396,7 +4396,7 @@ void ScGridWindow::UpdateFormulas()
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nMirrorWidth = GetSizePixel().Width();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
if ( bLayoutRTL )
{
long nEndPixel = pViewData->GetScrPos( nX2+1, nPosY, eWhich ).X();
@@ -4411,7 +4411,7 @@ void ScGridWindow::UpdateFormulas()
double nPPTY = pViewData->GetPPTY();
ScTableInfo aTabInfo;
- pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, FALSE, FALSE );
+ pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, false, false );
Fraction aZoomX = pViewData->GetZoomX();
Fraction aZoomY = pViewData->GetZoomY();
@@ -4431,7 +4431,7 @@ void ScGridWindow::UpdateFormulas()
CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here
}
-void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange)
+void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange)
{
if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) )
{
@@ -4445,9 +4445,9 @@ void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange)
}
}
-void ScGridWindow::UpdateListValPos( BOOL bVisible, const ScAddress& rPos )
+void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos )
{
- BOOL bOldButton = bListValButton;
+ sal_Bool bOldButton = bListValButton;
ScAddress aOldPos = aListValPos;
bListValButton = bVisible;
@@ -4485,7 +4485,7 @@ void ScGridWindow::GetFocus()
{
ScTabViewShell* pViewShell = pViewData->GetViewShell();
pViewShell->GotFocus();
- pViewShell->SetFormShellAtTop( FALSE ); // focus in GridWindow -> FormShell no longer on top
+ pViewShell->SetFormShellAtTop( false ); // focus in GridWindow -> FormShell no longer on top
if (pViewShell->HasAccessibilityObjects())
pViewShell->BroadcastAccessibility(ScAccGridWinFocusGotHint(eWhich, GetAccessible()));
@@ -4519,10 +4519,10 @@ Point ScGridWindow::GetMousePosPixel() const { return aCurMousePos; }
//------------------------------------------------------------------------
-BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
- USHORT* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
+sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
+ sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (pHdl)
{
@@ -4532,7 +4532,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
SCsCOL nPosX;
@@ -4541,25 +4541,25 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
// zusammengefasste (einzeln/Bereich) ???
ScAddress aAddr( nPosX, nPosY, nTab );
- Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, TRUE );
+ Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, true );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nPosX, nPosY, nSizeXPix, nSizeYPix );
aNext.X() += nSizeXPix * nLayoutSign;
aNext.Y() += nSizeYPix;
- BOOL bCornerHor;
+ sal_Bool bCornerHor;
if ( bLayoutRTL )
bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 );
else
bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() );
- BOOL bCellCorner = ( bCornerHor &&
+ sal_Bool bCellCorner = ( bCornerHor &&
rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() );
// corner is hit only if the mouse is within the cell
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=nCount; i;)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=nCount; i;)
{
// rueckwaerts suchen, damit der zuletzt gepaintete Rahmen gefunden wird
--i;
@@ -4569,7 +4569,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
if (pIndex) *pIndex = i;
if (pAddX) *pAddX = nPosX - pData->aRef.aStart.Col();
if (pAddY) *pAddY = nPosY - pData->aRef.aStart.Row();
- bFound = TRUE;
+ bFound = sal_True;
rCorner = ( bCellCorner && aAddr == pData->aRef.aEnd );
break;
}
@@ -4585,7 +4585,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
#define SCE_RIGHT 8
#define SCE_ALL 15
-void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges )
+void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uInt16 nEdges )
{
// der Range ist immer richtigherum
@@ -4595,19 +4595,19 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
SCCOL nCol2 = rRange.aEnd.Col();
SCROW nRow2 = rRange.aEnd.Row();
SCTAB nTab2 = rRange.aEnd.Tab();
- BOOL bHiddenEdge = FALSE;
+ sal_Bool bHiddenEdge = false;
SCROW nTmp;
ScDocument* pDoc = pDocSh->GetDocument();
while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab1) )
{
--nCol1;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab1) )
{
++nCol2;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(0, nRow1, nTab1);
if (!ValidRow(nTmp))
@@ -4615,7 +4615,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
if (nTmp < nRow1)
{
nRow1 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab1);
if (!ValidRow(nTmp))
@@ -4623,7 +4623,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
if (nTmp > nRow2)
{
nRow2 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
if ( nCol2 > nCol1 + 1 && nRow2 > nRow1 + 1 && !bHiddenEdge )
@@ -4719,7 +4719,7 @@ void lcl_PaintRefChanged( ScDocShell* pDocSh, const ScRange& rOldUn, const ScRan
}
}
-void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
+void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (!pHdl)
@@ -4740,7 +4740,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
// Scrolling
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -4755,7 +4755,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
{
if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// Umschalten bei Fixierung (damit Scrolling funktioniert)
@@ -4847,13 +4847,13 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
//------------------------------------------------------------------------
-BOOL ScGridWindow::GetEditUrl( const Point& rPos,
+sal_Bool ScGridWindow::GetEditUrl( const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
- return GetEditUrlOrError( FALSE, rPos, pName, pUrl, pTarget );
+ return GetEditUrlOrError( false, rPos, pName, pUrl, pTarget );
}
-BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
+sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
//! nPosX/Y mit uebergeben?
@@ -4866,24 +4866,24 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
ScDocument* pDoc = pDocSh->GetDocument();
ScBaseCell* pCell = NULL;
- BOOL bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
+ sal_Bool bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
if( !bFound )
- return FALSE;
+ return false;
ScHideTextCursor aHideCursor( pViewData, eWhich ); // before GetEditArea (MapMode is changed)
const ScPatternAttr* pPattern = pDoc->GetPattern( nPosX, nPosY, nTab );
- // bForceToTop = FALSE, use the cell's real position
- Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE );
+ // bForceToTop = sal_False, use the cell's real position
+ Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false );
if (rPos.Y() < aEditRect.Top())
- return FALSE;
+ return false;
// vertikal kann (noch) nicht angeklickt werden:
if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD)
- return FALSE;
+ return false;
- BOOL bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
+ sal_Bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK);
SvxCellHorJustify eHorJust = (SvxCellHorJustify)((SvxHorJustifyItem&)pPattern->
@@ -4987,7 +4987,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
EditView aTempView( &aEngine, this );
aTempView.SetOutputArea( aLogicEdit );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
MapMode aOld = GetMapMode();
SetMapMode(aEditMode); // kein return mehr
@@ -5016,7 +5016,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
if (pTarget)
*pTarget = pURLField->GetTargetFrame();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -5027,22 +5027,22 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
return bRet;
}
- return FALSE;
+ return false;
}
-BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
+sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
SCTAB nTabCount = pDoc->GetTableCount();
if ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aButSize = pViewData->GetScenButSize();
long nBWidth = aButSize.Width();
if (!nBWidth)
- return FALSE; // noch kein Button gezeichnet -> da ist auch keiner
+ return false; // noch kein Button gezeichnet -> da ist auch keiner
long nBHeight = aButSize.Height();
long nHSpace = (long)( SC_SCENARIO_HSPACE * pViewData->GetPPTX() );
@@ -5050,9 +5050,9 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
ScMarkData aMarks;
for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
- pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME );
+ pDoc->MarkScenario( i, nTab, aMarks, false, SC_SCENARIO_SHOWFRAME );
ScRangeList aRanges;
- aMarks.FillRangeListWithMarks( &aRanges, FALSE );
+ aMarks.FillRangeListWithMarks( &aRanges, false );
size_t nRangeCount = aRanges.size();
@@ -5063,18 +5063,18 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc->ExtendTotalMerge( aRange );
- BOOL bTextBelow = ( aRange.aStart.Row() == 0 );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
Point aButtonPos;
if ( bTextBelow )
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aEnd.Row()+1,
- eWhich, TRUE );
+ eWhich, sal_True );
}
else
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aStart.Row(),
- eWhich, TRUE );
+ eWhich, sal_True );
aButtonPos.Y() -= nBHeight;
}
if ( bLayoutRTL )
@@ -5086,12 +5086,12 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
if ( aButRect.IsInside( rPosPixel ) )
{
rScenRange = aRange;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
// #114409#
@@ -5242,11 +5242,11 @@ void ScGridWindow::UpdateCursorOverlay()
ScDocument* pDoc = pViewData->GetDocument();
const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab);
const ScMergeFlagAttr& rMergeFlag = (const ScMergeFlagAttr&) pPattern->GetItem(ATTR_MERGE_FLAG);
- BOOL bOverlapped = rMergeFlag.IsOverlapped();
+ sal_Bool bOverlapped = rMergeFlag.IsOverlapped();
// left or above of the screen?
- BOOL bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
+ sal_Bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
if (!bVis)
{
SCCOL nEndX = nX;
@@ -5261,12 +5261,12 @@ void ScGridWindow::UpdateCursorOverlay()
if ( bVis && !bOverlapped && !pViewData->HasEditView(eWhich) && pViewData->IsActive() )
{
- Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE );
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// completely right of/below the screen?
// (test with logical start position in aScrPos)
- BOOL bMaybeVisible;
+ sal_Bool bMaybeVisible;
if ( bLayoutRTL )
bMaybeVisible = ( aScrPos.X() >= -2 && aScrPos.Y() >= -2 );
else
@@ -5435,9 +5435,9 @@ void ScGridWindow::UpdateAutoFillOverlay()
SCTAB nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE );
+ Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
@@ -5527,7 +5527,7 @@ void ScGridWindow::UpdateDragRectOverlay()
double nPPTY = pViewData->GetPPTY();
SCCOLROW i;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if (ValidCol(nX2) && nX2>=nX1)
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index c9ced7d1003f..df6df29c9c00 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -85,7 +85,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
if (!pDPObj)
return DataPilotFieldOrientation_HIDDEN;
- USHORT nOrient = DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
// Check for page field first.
if (nCol > 0)
@@ -94,7 +94,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == DataPilotFieldOrientation_PAGE )
{
- BOOL bIsDataLayout = FALSE;
+ sal_Bool bIsDataLayout = false;
String aFieldName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( aFieldName.Len() && !bIsDataLayout )
return DataPilotFieldOrientation_PAGE;
@@ -107,7 +107,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
long nField = pDPObj->GetHeaderDim(ScAddress(nCol, nRow, nTab), nOrient);
if (nField >= 0 && (nOrient == DataPilotFieldOrientation_COLUMN || nOrient == DataPilotFieldOrientation_ROW) )
{
- BOOL bIsDataLayout = FALSE;
+ sal_Bool bIsDataLayout = false;
String aFieldName = pDPObj->GetDimName(nField, bIsDataLayout);
if (aFieldName.Len() && !bIsDataLayout)
return static_cast<DataPilotFieldOrientation>(nOrient);
@@ -117,14 +117,14 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
}
// private method for mouse button handling
-BOOL ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
+sal_Bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
{
if (GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE)
{
LaunchPageFieldMenu( nCol, nRow );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt )
@@ -135,7 +135,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
Point aDiffPix = rMEvt.GetPosPixel();
aDiffPix -= aScrPos;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
if ( bLayoutRTL )
aDiffPix.X() = -aDiffPix.X();
@@ -180,12 +180,12 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
if (pDPObj)
{
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
ScAddress aPos( nCol, nRow, nTab );
long nField = pDPObj->GetHeaderDim( aPos, nOrient );
if ( nField >= 0 )
{
- bDPMouse = TRUE;
+ bDPMouse = sal_True;
nDPField = nField;
pDragDPObj = pDPObj;
@@ -197,7 +197,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
return;
}
- DPTestMouse( rMEvt, TRUE );
+ DPTestMouse( rMEvt, sal_True );
StartTracking();
}
else if ( pDPObj->IsFilterButton(aPos) )
@@ -237,7 +237,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSheetDesc( aNewDesc );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
delete pDlg;
@@ -256,14 +256,14 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
// Data Pilot interaction
//
-void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
+void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove )
{
DBG_ASSERT(pDragDPObj, "pDragDPObj missing");
// scroll window if at edges
//! move this to separate method
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPixel = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
@@ -279,14 +279,14 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
nDy = 1;
if ( nDx != 0 || nDy != 0 )
{
- UpdateDragRect( FALSE, Rectangle() );
+ UpdateDragRect( false, Rectangle() );
if ( nDx != 0)
pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 )
pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// ---
@@ -294,20 +294,20 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), eWhich, nPosX, nPosY );
- BOOL bMouseLeft;
- BOOL bMouseTop;
+ sal_Bool bMouseLeft;
+ sal_Bool bMouseTop;
pViewData->GetMouseQuadrant( aPixel, eWhich, nPosX, nPosY, bMouseLeft, bMouseTop );
ScAddress aPos( nPosX, nPosY, pViewData->GetTabNo() );
Rectangle aPosRect;
- USHORT nOrient;
+ sal_uInt16 nOrient;
long nDimPos;
- BOOL bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField,
+ sal_Bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField,
aPosRect, nOrient, nDimPos );
UpdateDragRect( bHasRange && bMove, aPosRect );
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
sal_Int32 nDimFlags = 0;
String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout, &nDimFlags );
bool bAllowed = !bHasRange || ScDPObject::IsOrientationAllowed( nOrient, nDimFlags );
@@ -356,7 +356,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
aNewObj.SetSaveData( aSaveData );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
// when dragging fields, allow re-positioning (bAllowMove)
- aFunc.DataPilotUpdate( pDragDPObj, &aNewObj, TRUE, FALSE, TRUE );
+ aFunc.DataPilotUpdate( pDragDPObj, &aNewObj, sal_True, false, sal_True );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -369,7 +369,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj)
{
- BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
// Get the geometry of the cell.
Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich);
@@ -461,14 +461,14 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
pDPObj->FillLabelData(pDPData->maDPParam);
pDPData->mpDPObj = pDPObj;
- USHORT nOrient;
+ sal_uInt16 nOrient;
pDPData->mnDim = pDPObj->GetHeaderDim(rPos, nOrient);
if (pDPData->maDPParam.maLabelArray.size() <= static_cast<size_t>(pDPData->mnDim))
// out-of-bound dimension ID. This should never happen!
return;
- const ScDPLabelData& rLabelData = *pDPData->maDPParam.maLabelArray[pDPData->mnDim];
+ const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[pDPData->mnDim];
mpDPFieldPopup.reset(new ScDPFieldPopupWindow(this, pViewData->GetDocument()));
mpDPFieldPopup->setName(OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilot field member popup")));
@@ -521,7 +521,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
}
}
- BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
Rectangle aCellRect(rScrPos, rScrSize);
const Size& rPopupSize = mpDPFieldPopup->getWindowSize();
@@ -558,14 +558,14 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu()
aNewDPObj.BuildAllDimensionMembers();
ScDPSaveData* pSaveData = aNewDPObj.GetSaveData();
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName(pDPData->mnDim, bIsDataLayout);
ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(aDimName);
if (!pDim)
return;
// Build a map of layout names to original names.
- const ScDPLabelData& rLabelData = *pDPData->maDPParam.maLabelArray[pDPData->mnDim];
+ const ScDPLabelData& rLabelData = pDPData->maDPParam.maLabelArray[pDPData->mnDim];
MemNameMapType aMemNameMap;
for (vector<ScDPLabelData::Member>::const_iterator itr = rLabelData.maMembers.begin(), itrEnd = rLabelData.maMembers.end();
itr != itrEnd; ++itr)
@@ -612,21 +612,21 @@ void ScGridWindow::UpdateVisibleRange()
void ScGridWindow::DPMouseMove( const MouseEvent& rMEvt )
{
- DPTestMouse( rMEvt, TRUE );
+ DPTestMouse( rMEvt, sal_True );
}
void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt )
{
- bDPMouse = FALSE;
+ bDPMouse = false;
ReleaseMouse();
- DPTestMouse( rMEvt, FALSE );
+ DPTestMouse( rMEvt, false );
SetPointer( Pointer( POINTER_ARROW ) );
}
// -----------------------------------------------------------------------
-void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect )
+void ScGridWindow::UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect )
{
SCCOL nStartX = ( rPosRect.Left() >= 0 ) ? static_cast<SCCOL>(rPosRect.Left()) : SCCOL_MAX;
SCROW nStartY = ( rPosRect.Top() >= 0 ) ? static_cast<SCROW>(rPosRect.Top()) : SCROW_MAX;
@@ -645,10 +645,10 @@ void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect )
nDragStartY = nStartY;
nDragEndX = nEndX;
nDragEndY = nEndY;
- bDragRect = TRUE;
+ bDragRect = true;
}
else
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
@@ -657,10 +657,10 @@ void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect )
// Page-Break-Modus
-USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
+sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
SCCOLROW* pBreak, SCCOLROW* pPrev )
{
- USHORT nFound = SC_PD_NONE; // 0
+ sal_uInt16 nFound = SC_PD_NONE; // 0
ScRange aSource;
SCCOLROW nBreak = 0;
SCCOLROW nPrev = 0;
@@ -668,8 +668,8 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
ScPageBreakData* pPageData = pViewData->GetView()->GetPageBreakData();
if ( pPageData )
{
- BOOL bHori = FALSE;
- BOOL bVert = FALSE;
+ sal_Bool bHori = false;
+ sal_Bool bVert = false;
SCCOL nHitX = 0;
SCROW nHitY = 0;
@@ -684,38 +684,38 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
// Horizontal mehr Toleranz als vertikal, weil mehr Platz ist
if ( nMouseX <= aTL.X() + 4 )
{
- bHori = TRUE;
+ bHori = sal_True;
nHitX = nPosX;
}
else if ( nMouseX >= aBR.X() - 6 )
{
- bHori = TRUE;
+ bHori = sal_True;
nHitX = nPosX+1; // linker Rand der naechsten Zelle
}
if ( nMouseY <= aTL.Y() + 2 )
{
- bVert = TRUE;
+ bVert = sal_True;
nHitY = nPosY;
}
else if ( nMouseY >= aBR.Y() - 4 )
{
- bVert = TRUE;
+ bVert = sal_True;
nHitY = nPosY+1; // oberer Rand der naechsten Zelle
}
if ( bHori || bVert )
{
- USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() );
- for (USHORT nPos=0; nPos<nCount && !nFound; nPos++)
+ sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
+ for (sal_uInt16 nPos=0; nPos<nCount && !nFound; nPos++)
{
ScPrintRangeData& rData = pPageData->GetData(nPos);
ScRange aRange = rData.GetPrintRange();
- BOOL bLHit = ( bHori && nHitX == aRange.aStart.Col() );
- BOOL bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 );
- BOOL bTHit = ( bVert && nHitY == aRange.aStart.Row() );
- BOOL bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 );
- BOOL bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() );
- BOOL bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() );
+ sal_Bool bLHit = ( bHori && nHitX == aRange.aStart.Col() );
+ sal_Bool bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 );
+ sal_Bool bTHit = ( bVert && nHitY == aRange.aStart.Row() );
+ sal_Bool bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 );
+ sal_Bool bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() );
+ sal_Bool bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() );
if ( bLHit )
{
@@ -789,14 +789,14 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
return nFound;
}
-void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
+void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
//! Scrolling und Umschalten mit RFMouseMove zusammenfassen !
//! (Weginvertieren vor dem Scrolling ist anders)
// Scrolling
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -811,13 +811,13 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
{
if ( bPagebreakDrawn ) // weginvertieren
{
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
UpdateDragRectOverlay();
}
if ( nDx != 0 ) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// Umschalten bei Fixierung (damit Scrolling funktioniert)
@@ -849,14 +849,14 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- BOOL bLeft, bTop;
+ sal_Bool bLeft, bTop;
pViewData->GetMouseQuadrant( aPos, eWhich, nPosX, nPosY, bLeft, bTop );
if ( !bLeft ) ++nPosX;
if ( !bTop ) ++nPosY;
- BOOL bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V );
- BOOL bHide = FALSE;
- BOOL bToEnd = FALSE;
+ sal_Bool bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V );
+ sal_Bool bHide = false;
+ sal_Bool bToEnd = false;
ScRange aDrawRange = aPagebreakSource;
if ( bBreak )
{
@@ -870,7 +870,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
aDrawRange.aEnd.SetCol( nPosX - 1 );
}
else
- bHide = TRUE;
+ bHide = sal_True;
}
else
{
@@ -882,7 +882,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
aDrawRange.aEnd.SetRow( nPosY - 1 );
}
else
- bHide = TRUE;
+ bHide = sal_True;
}
}
else
@@ -896,18 +896,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( nPosX > 0 )
aDrawRange.aEnd.SetCol( nPosX-1 );
else
- bHide = TRUE;
+ bHide = sal_True;
}
if ( nPagebreakMouse & SC_PD_RANGE_B )
{
if ( nPosY > 0 )
aDrawRange.aEnd.SetRow( nPosY-1 );
else
- bHide = TRUE;
+ bHide = sal_True;
}
if ( aDrawRange.aStart.Col() > aDrawRange.aEnd.Col() ||
aDrawRange.aStart.Row() > aDrawRange.aEnd.Row() )
- bHide = TRUE;
+ bHide = sal_True;
}
if ( !bPagebreakDrawn || bUp || aDrawRange != aPagebreakDrag )
@@ -917,13 +917,13 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( bPagebreakDrawn )
{
// weginvertieren
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
}
aPagebreakDrag = aDrawRange;
if ( !bUp && !bHide )
{
// hininvertieren
- bPagebreakDrawn = TRUE;
+ bPagebreakDrawn = true;
}
UpdateDragRectOverlay();
}
@@ -936,11 +936,11 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if ( bBreak )
{
- BOOL bColumn = ( nPagebreakMouse == SC_PD_BREAK_H );
+ sal_Bool bColumn = ( nPagebreakMouse == SC_PD_BREAK_H );
SCCOLROW nNew = bColumn ? static_cast<SCCOLROW>(nPosX) : static_cast<SCCOLROW>(nPosY);
if ( nNew != nPagebreakBreak )
{
@@ -950,18 +950,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
}
- BOOL bGrow = !bHide && nNew > nPagebreakBreak;
+ sal_Bool bGrow = !bHide && nNew > nPagebreakBreak;
if ( bColumn )
{
if (pDoc->HasColBreak(static_cast<SCCOL>(nPagebreakBreak), nTab) & BREAK_MANUAL)
{
ScAddress aOldAddr( static_cast<SCCOL>(nPagebreakBreak), nPosY, nTab );
- pViewFunc->DeletePageBreak( TRUE, TRUE, &aOldAddr, FALSE );
+ pViewFunc->DeletePageBreak( sal_True, sal_True, &aOldAddr, false );
}
if ( !bHide && !bToEnd ) // am Ende nicht
{
ScAddress aNewAddr( static_cast<SCCOL>(nNew), nPosY, nTab );
- pViewFunc->InsertPageBreak( TRUE, TRUE, &aNewAddr, FALSE );
+ pViewFunc->InsertPageBreak( sal_True, sal_True, &aNewAddr, false );
}
if ( bGrow )
{
@@ -970,12 +970,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( static_cast<SCCOL>(nPagebreakPrev) > aPagebreakSource.aStart.Col() && !bManualBreak )
{
ScAddress aPrev( static_cast<SCCOL>(nPagebreakPrev), nPosY, nTab );
- pViewFunc->InsertPageBreak( TRUE, TRUE, &aPrev, FALSE );
+ pViewFunc->InsertPageBreak( sal_True, sal_True, &aPrev, false );
}
if (!pDocSh->AdjustPrintZoom( ScRange(
static_cast<SCCOL>(nPagebreakPrev),0,nTab, static_cast<SCCOL>(nNew-1),0,nTab ) ))
- bGrow = FALSE;
+ bGrow = false;
}
}
else
@@ -983,12 +983,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if (pDoc->HasRowBreak(nPagebreakBreak, nTab) & BREAK_MANUAL)
{
ScAddress aOldAddr( nPosX, nPagebreakBreak, nTab );
- pViewFunc->DeletePageBreak( FALSE, TRUE, &aOldAddr, FALSE );
+ pViewFunc->DeletePageBreak( false, sal_True, &aOldAddr, false );
}
if ( !bHide && !bToEnd ) // am Ende nicht
{
ScAddress aNewAddr( nPosX, nNew, nTab );
- pViewFunc->InsertPageBreak( FALSE, TRUE, &aNewAddr, FALSE );
+ pViewFunc->InsertPageBreak( false, sal_True, &aNewAddr, false );
}
if ( bGrow )
{
@@ -997,12 +997,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if ( nPagebreakPrev > aPagebreakSource.aStart.Row() && !bManualBreak )
{
ScAddress aPrev( nPosX, nPagebreakPrev, nTab );
- pViewFunc->InsertPageBreak( FALSE, TRUE, &aPrev, FALSE );
+ pViewFunc->InsertPageBreak( false, sal_True, &aPrev, false );
}
if (!pDocSh->AdjustPrintZoom( ScRange(
0,nPagebreakPrev,nTab, 0,nNew-1,nTab ) ))
- bGrow = FALSE;
+ bGrow = false;
}
}
@@ -1013,7 +1013,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
if (!bGrow) // sonst in AdjustPrintZoom schon passiert
{
- pViewFunc->UpdatePageBreakData( TRUE );
+ pViewFunc->UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
}
}
@@ -1023,10 +1023,10 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
// Druckbereich setzen
String aNewRanges;
- USHORT nOldCount = pDoc->GetPrintRangeCount( nTab );
+ sal_uInt16 nOldCount = pDoc->GetPrintRangeCount( nTab );
if ( nOldCount )
{
- for (USHORT nPos=0; nPos<nOldCount; nPos++)
+ for (sal_uInt16 nPos=0; nPos<nOldCount; nPos++)
{
const ScRange* pOld = pDoc->GetPrintRange( nTab, nPos );
if ( pOld )
@@ -1048,7 +1048,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
else if (!bHide)
aPagebreakDrag.Format( aNewRanges, SCA_VALID );
- pViewFunc->SetPrintRanges( pDoc->IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, FALSE );
+ pViewFunc->SetPrintRanges( pDoc->IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, false );
}
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index c42c1bcf2463..7a0c4d215546 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -54,9 +54,9 @@
// -----------------------------------------------------------------------
-BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
@@ -65,7 +65,7 @@ BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if ( pDraw->IsDetectiveHit( aLogicPos ) )
{
// auf Detektiv-Pfeilen gar nichts (Doppelklick wird bei ButtonUp ausgewertet)
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -81,15 +81,15 @@ BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if ( pDrView && !rMEvt.IsLeft() && !bRet )
{
pDrView->BrkAction();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
{
ScViewFunc* pView = pViewData->GetView();
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
FuPoor* pDraw = pView->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
@@ -103,7 +103,7 @@ BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
ScDrawView* pDrView = pViewData->GetScDrawView();
if ( pDrView )
{
- BOOL bReplaceAll = TRUE;
+ sal_Bool bReplaceAll = sal_True;
pDrView->SetAttrToMarked(*pDrawBrush, bReplaceAll);
}
@@ -115,13 +115,13 @@ BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
return bRet;
}
-BOOL ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
+sal_Bool ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
{
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- BOOL bRet = pDraw->MouseMove( rMEvt );
+ sal_Bool bRet = pDraw->MouseMove( rMEvt );
if ( bRet )
UpdateStatusPosSize();
return bRet;
@@ -129,7 +129,7 @@ BOOL ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt)
else
{
SetPointer( Pointer( POINTER_ARROW ) );
- return FALSE;
+ return false;
}
}
@@ -146,44 +146,44 @@ void ScGridWindow::DrawEndAction()
// ReleaseMouse beim Aufruf
}
-BOOL ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
+sal_Bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- BYTE nUsed = pDraw->Command( rCEvt );
+ sal_uInt8 nUsed = pDraw->Command( rCEvt );
if( nUsed == SC_CMD_USED )
nButtonDown = 0; // MouseButtonUp wird verschluckt...
if( nUsed || pDrView->IsAction() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+sal_Bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
- BOOL bOldMarked = pDrView->AreObjectsMarked();
+ sal_Bool bOldMarked = pDrView->AreObjectsMarked();
if (pDraw->KeyInput( rKEvt ))
{
- BOOL bLeaveDraw = FALSE;
- BOOL bUsed = TRUE;
- BOOL bNewMarked = pDrView->AreObjectsMarked();
+ sal_Bool bLeaveDraw = false;
+ sal_Bool bUsed = sal_True;
+ sal_Bool bNewMarked = pDrView->AreObjectsMarked();
if ( !pViewData->GetView()->IsDrawSelMode() )
if ( !bNewMarked )
{
- pViewData->GetViewShell()->SetDrawShell( FALSE );
- bLeaveDraw = TRUE;
+ pViewData->GetViewShell()->SetDrawShell( false );
+ bLeaveDraw = sal_True;
if ( !bOldMarked &&
rKEvt.GetKeyCode().GetCode() == KEY_DELETE )
- bUsed = FALSE; // nichts geloescht
+ bUsed = false; // nichts geloescht
}
if (!bLeaveDraw)
UpdateStatusPosSize(); // for moving/resizing etc. by keyboard
@@ -191,10 +191,10 @@ BOOL ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
}
}
- return FALSE;
+ return false;
}
-void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer )
+void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer )
{
// #109985#
const ScViewOptions& rOpts = pViewData->GetOptions();
@@ -245,11 +245,11 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo
}
}
-MapMode ScGridWindow::GetDrawMapMode( BOOL bForce )
+MapMode ScGridWindow::GetDrawMapMode( sal_Bool bForce )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
MapMode aDrawMode = pViewData->GetLogicMode();
@@ -296,7 +296,7 @@ void ScGridWindow::DrawAfterScroll(/*BOOL bVal*/)
{
OutlinerView* pOlView = pDrView->GetTextEditOutlinerView();
if (pOlView && pOlView->GetWindow() == this)
- pOlView->ShowCursor(FALSE); // ist beim Scrollen weggekommen
+ pOlView->ShowCursor(false); // ist beim Scrollen weggekommen
}
}
@@ -308,8 +308,8 @@ void ScGridWindow::CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddres
const ScViewOptions& rOpts = pViewData->GetOptions();
if(rOpts.GetOption( VOPT_ANCHOR ))
{
- BOOL bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() );
- Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, TRUE );
+ sal_Bool bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() );
+ Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, sal_True );
aPos = PixelToLogic(aPos);
rHdl.AddHdl(new SdrHdl(aPos, bNegativePage ? HDL_ANCHOR_TR : HDL_ANCHOR));
}
@@ -346,7 +346,7 @@ void ScGridWindow::UpdateStatusPosSize()
// position and size of selected object(s) if something is selected,
// mouse position otherwise
- BOOL bActionItem = FALSE;
+ sal_Bool bActionItem = false;
if ( pDrView->IsAction() ) // action rectangle
{
Rectangle aRect;
@@ -357,7 +357,7 @@ void ScGridWindow::UpdateStatusPosSize()
aSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
aSet.Put( SvxSizeItem( SID_ATTR_SIZE,
Size( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ) ) );
- bActionItem = TRUE;
+ bActionItem = sal_True;
}
}
if ( !bActionItem )
@@ -382,10 +382,10 @@ void ScGridWindow::UpdateStatusPosSize()
pViewData->GetBindings().SetState(aSet);
}
-BOOL ScGridWindow::DrawHasMarkedObj()
+sal_Bool ScGridWindow::DrawHasMarkedObj()
{
ScDrawView* p = pViewData->GetScDrawView();
- return p ? p->AreObjectsMarked() : FALSE;
+ return p ? p->AreObjectsMarked() : false;
}
void ScGridWindow::DrawMarkDropObj( SdrObject* pObj )
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9fdd02c867d4..57dc1dd9c22f 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -88,9 +88,9 @@ void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible )
}
void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
- const String& rTitle, const Color& rColor, BOOL bTextBelow,
+ const String& rTitle, const Color& rColor, sal_Bool bTextBelow,
double nPPTX, double nPPTY, const Fraction& rZoomY,
- ScDocument* pDoc, ScViewData* pButtonViewData, BOOL bLayoutRTL )
+ ScDocument* pDoc, ScViewData* pButtonViewData, sal_Bool bLayoutRTL )
{
// pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen,
// darf ansonsten NULL sein!
@@ -149,20 +149,20 @@ void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
long nBHeight = nVer + aTextSize.Height() + 1;
Size aButSize( nBWidth, nBHeight );
long nButtonPos = bLayoutRTL ? aOuter.Left() : aOuter.Right()-nBWidth+1;
- aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, FALSE );
+ aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, false );
if (pButtonViewData)
pButtonViewData->SetScenButSize( aButSize );
long nTextStart = bLayoutRTL ? aInner.Right() - aTextSize.Width() + 1 : aInner.Left();
- BOOL bWasClip = FALSE;
+ sal_Bool bWasClip = false;
Region aOldClip;
- BOOL bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() );
+ sal_Bool bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() );
if ( bClip )
{
if (pDev->IsClipRegion())
{
- bWasClip = TRUE;
+ bWasClip = sal_True;
aOldClip = pDev->GetActiveClipRegion();
}
long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left();
@@ -207,11 +207,11 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
ScMarkData aMarks;
for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
- pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME );
+ pDoc->MarkScenario( i, nTab, aMarks, false, SC_SCENARIO_SHOWFRAME );
ScRangeListRef xRanges = new ScRangeList;
- aMarks.FillRangeListWithMarks( xRanges, FALSE );
+ aMarks.FillRangeListWithMarks( xRanges, false );
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
for (size_t j = 0, n = xRanges->size(); j < n; ++j)
@@ -226,16 +226,16 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
if ( aRange.Intersects( aViewRange ) ) //! Platz fuer Text/Button?
{
Point aStartPos = pViewData->GetScrPos(
- aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE );
+ aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True );
Point aEndPos = pViewData->GetScrPos(
- aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, TRUE );
+ aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, sal_True );
// on the grid:
aStartPos.X() -= nLayoutSign;
aStartPos.Y() -= 1;
aEndPos.X() -= nLayoutSign;
aEndPos.Y() -= 1;
- BOOL bTextBelow = ( aRange.aStart.Row() == 0 );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
String aCurrent;
Color aColor( COL_LIGHTGRAY );
@@ -243,7 +243,7 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP
if ( pDoc->IsActiveScenario(nAct) && pDoc->HasScenarioRange(nAct,aRange) )
{
String aDummyComment;
- USHORT nDummyFlags;
+ sal_uInt16 nDummyFlags;
pDoc->GetName( nAct, aCurrent );
pDoc->GetScenarioData( nAct, aDummyComment, aColor, nDummyFlags );
}
@@ -268,8 +268,8 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData,
ScHighlightRanges& rHighlightRanges )
{
SCTAB nTab = pViewData->GetTabNo();
- ULONG nCount = rHighlightRanges.Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rHighlightRanges.Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScHighlightEntry* pEntry = rHighlightRanges.GetObject( i );
if (pEntry)
@@ -280,7 +280,7 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData,
rOutputData.DrawRefMark(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
- pEntry->aColor, FALSE );
+ pEntry->aColor, false );
}
}
}
@@ -338,7 +338,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
}
else
{
- bNeedsRepaint = TRUE;
+ bNeedsRepaint = sal_True;
aRepaintPixel = LogicToPixel(rRect); // nur betroffenen Bereich
}
return;
@@ -347,7 +347,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
if (bIsInPaint)
return;
- bIsInPaint = TRUE;
+ bIsInPaint = sal_True;
Rectangle aPixRect = LogicToPixel( rRect );
@@ -392,7 +392,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS ); // nicht weiterzeichnen
- bIsInPaint = FALSE;
+ bIsInPaint = false;
}
//
@@ -402,8 +402,8 @@ void ScGridWindow::Paint( const Rectangle& rRect )
void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode )
{
ScModule* pScMod = SC_MOD();
- BOOL bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg();
- BOOL bGridFirst = TRUE; //! entscheiden!!!
+ sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg();
+ sal_Bool bGridFirst = true; //! entscheiden!!!
if (pViewData->IsMinimized())
return;
@@ -446,7 +446,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nMirrorWidth = GetSizePixel().Width();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if ( bLayoutRTL )
{
@@ -463,7 +463,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
SCCOL nCurEndX = nCurX;
SCROW nCurEndY = nCurY;
pDoc->ExtendMerge( nCurX, nCurY, nCurEndX, nCurEndY, nTab );
- BOOL bCurVis = nCursorHideCount==0 &&
+ sal_Bool bCurVis = nCursorHideCount==0 &&
( nCurEndX+1 >= nX1 && nCurX <= nX2+1 && nCurEndY+1 >= nY1 && nCurY <= nY2+1 );
// AutoFill-Anfasser
@@ -483,14 +483,14 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
double nPPTY = pViewData->GetPPTY();
const ScViewOptions& rOpts = pViewData->GetOptions();
- BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
- BOOL bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS );
+ sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
+ sal_Bool bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS );
// Datenblock
ScTableInfo aTabInfo;
pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab,
- nPPTX, nPPTY, FALSE, bFormulaMode,
+ nPPTX, nPPTY, false, bFormulaMode,
&pViewData->GetMarkData() );
//--------------------------------------------------------------------
@@ -504,7 +504,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.SetMirrorWidth( nMirrorWidth ); // needed for RTL
std::auto_ptr< VirtualDevice > xFmtVirtDev;
- BOOL bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode?
+ sal_Bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode?
if ( bTextWysiwyg )
{
@@ -523,11 +523,11 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
xFmtVirtDev->SetMapMode( MAP_100TH_MM );
aOutputData.SetFmtDevice( xFmtVirtDev.get() );
- bLogicText = TRUE; // use logic MapMode
+ bLogicText = sal_True; // use logic MapMode
}
const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
- Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, FALSE ).nColor );
+ Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, false ).nColor );
if ( aGridColor.GetColor() == COL_TRANSPARENT )
{
// use view options' grid color only if color config has "automatic" color
@@ -541,22 +541,22 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.SetShowSpellErrors ( pDoc->GetDocOptions().IsAutoSpell() );
aOutputData.SetMarkClipped ( bMarkClipped );
- aOutputData.SetUseStyleColor( TRUE ); // always set in table view
+ aOutputData.SetUseStyleColor( true ); // always set in table view
aOutputData.SetEditObject( GetEditObject() );
aOutputData.SetViewShell( pViewData->GetViewShell() );
- BOOL bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid();
+ sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid();
- BOOL bPage = rOpts.GetOption( VOPT_PAGEBREAKS );
+ sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS );
if ( eMode == SC_UPDATE_CHANGED )
{
aOutputData.FindChanged();
- aOutputData.SetSingleGrid(TRUE);
+ aOutputData.SetSingleGrid(sal_True);
}
- BOOL bPageMode = pViewData->IsPagebreakMode();
+ sal_Bool bPageMode = pViewData->IsPagebreakMode();
if (bPageMode) // nach FindChanged
{
// SetPagebreakMode initialisiert auch bPrinted Flags
@@ -564,7 +564,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
}
EditView* pEditView = NULL;
- BOOL bEditMode = pViewData->HasEditView(eWhich);
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich);
if ( bEditMode && pViewData->GetRefTabNo() == nTab )
{
SCCOL nEditCol;
@@ -576,7 +576,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( nEditEndCol >= nX1 && nEditCol <= nX2 && nEditEndRow >= nY1 && nEditRow <= nY2 )
aOutputData.SetEditCell( nEditCol, nEditRow );
else
- bEditMode = FALSE;
+ bEditMode = false;
}
// define drawing layer map mode and paint rectangle
@@ -691,7 +691,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
DrawRedraw( aOutputData, eMode, SC_LAYER_BACK );
}
else
- aOutputData.SetSolidBackground(TRUE);
+ aOutputData.SetSolidBackground(sal_True);
pContentDev->SetMapMode(MAP_PIXEL);
aOutputData.DrawDocumentBackground();
@@ -710,15 +710,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.DrawShadow();
aOutputData.DrawFrame();
if ( !bLogicText )
- aOutputData.DrawStrings(FALSE); // in pixel MapMode
+ aOutputData.DrawStrings(false); // in pixel MapMode
// edit cells and printer-metrics text must be before the buttons
// (DataPilot buttons contain labels in UI font)
pContentDev->SetMapMode(pViewData->GetLogicMode(eWhich));
if ( bLogicText )
- aOutputData.DrawStrings(TRUE); // in logic MapMode if bTextWysiwyg is set
- aOutputData.DrawEdit(TRUE);
+ aOutputData.DrawStrings(sal_True); // in logic MapMode if bTextWysiwyg is set
+ aOutputData.DrawEdit(sal_True);
pContentDev->SetMapMode(MAP_PIXEL);
// Autofilter- und Pivot-Buttons
@@ -743,15 +743,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
SCTAB nTabCount = pDoc->GetTableCount();
ScHighlightRanges* pHigh = pViewData->GetView()->GetHighlightRanges();
- BOOL bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) );
- BOOL bHasChange = ( pDoc->GetChangeTrack() != NULL );
+ sal_Bool bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) );
+ sal_Bool bHasChange = ( pDoc->GetChangeTrack() != NULL );
if ( bHasChange || bHasScenario || pHigh != NULL )
{
//! SetChangedClip() mit DrawMarks() zusammenfassen?? (anderer MapMode!)
- BOOL bAny = TRUE;
+ sal_Bool bAny = sal_True;
if (eMode == SC_UPDATE_CHANGED)
bAny = aOutputData.SetChangedClip();
if (bAny)
@@ -793,7 +793,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
Color aRefColor( rColorCfg.GetColorValue(svtools::CALCREFERENCE).nColor );
aOutputData.DrawRefMark( pViewData->GetRefStartX(), pViewData->GetRefStartY(),
pViewData->GetRefEndX(), pViewData->GetRefEndY(),
- aRefColor, FALSE );
+ aRefColor, false );
}
// Range-Finder
@@ -805,8 +805,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( pRangeFinder && !pRangeFinder->IsHidden() &&
pRangeFinder->GetDocName() == pDocSh->GetTitle() )
{
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScRangeFindData* pData = pRangeFinder->GetObject(i);
if (pData)
@@ -817,7 +817,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
aOutputData.DrawRefMark( aRef.aStart.Col(), aRef.aStart.Row(),
aRef.aEnd.Col(), aRef.aEnd.Row(),
Color( ScRangeFindList::GetColorName( i ) ),
- TRUE );
+ sal_True );
}
}
}
@@ -899,7 +899,7 @@ void ScGridWindow::CheckNeedsRepaint()
if (bNeedsRepaint)
{
- bNeedsRepaint = FALSE;
+ bNeedsRepaint = false;
if (aRepaintPixel.IsEmpty())
Invalidate();
else
@@ -948,7 +948,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
{
// use EditEngine to draw mixed-script string
- pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE );
+ pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True );
pEditEng->SetRefMapMode( pContentDev->GetMapMode() );
SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() );
rDefPattern.FillEditItemSet( pEditDefaults );
@@ -956,8 +956,8 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
pEditEng->SetDefaults( pEditDefaults );
}
- USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() );
- for (USHORT nPos=0; nPos<nCount; nPos++)
+ sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
+ for (sal_uInt16 nPos=0; nPos<nCount; nPos++)
{
ScPrintRangeData& rData = pPageData->GetData(nPos);
ScRange aRange = rData.GetPrintRange();
@@ -974,9 +974,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
pContentDev->SetFillColor( aManual );
Point aStart = pViewData->GetScrPos(
- aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE );
+ aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True );
Point aEnd = pViewData->GetScrPos(
- aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, TRUE );
+ aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, sal_True );
aStart.X() -= 2;
aStart.Y() -= 2;
@@ -1010,7 +1010,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
pContentDev->SetFillColor( aAutomatic );
Point aBreak = pViewData->GetScrPos(
- nBreak, aRange.aStart.Row(), eWhich, TRUE );
+ nBreak, aRange.aStart.Row(), eWhich, sal_True );
pContentDev->DrawRect( Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) );
}
}
@@ -1029,7 +1029,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
pContentDev->SetFillColor( aAutomatic );
Point aBreak = pViewData->GetScrPos(
- aRange.aStart.Col(), nBreak, eWhich, TRUE );
+ aRange.aStart.Col(), nBreak, eWhich, sal_True );
pContentDev->DrawRect( Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) );
}
}
@@ -1049,9 +1049,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
if ( nPrEndX >= nX1 && nPrStartX <= nX2 )
{
Point aPageStart = pViewData->GetScrPos(
- nPrStartX, nPrStartY, eWhich, TRUE );
+ nPrStartX, nPrStartY, eWhich, sal_True );
Point aPageEnd = pViewData->GetScrPos(
- nPrEndX+1,nPrEndY+1, eWhich, TRUE );
+ nPrEndX+1,nPrEndY+1, eWhich, sal_True );
long nPageNo = rData.GetFirstPage();
if ( rData.IsTopDown() )
@@ -1134,9 +1134,9 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
ScQueryParam* pQueryParam = NULL;
RowInfo* pRowInfo = rTabInfo.mpRowInfo;
- USHORT nArrCount = rTabInfo.mnArrCount;
+ sal_uInt16 nArrCount = rTabInfo.mnArrCount;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Point aOldPos = aComboButton.GetPosPixel(); // Zustand fuer MouseDown/Up
Size aOldSize = aComboButton.GetSizePixel(); // merken
@@ -1158,7 +1158,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
if (!pQueryParam)
pQueryParam = new ScQueryParam;
- BOOL bNewData = TRUE;
+ sal_Bool bNewData = sal_True;
if (pDBData)
{
SCCOL nStartCol;
@@ -1169,7 +1169,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
pDBData->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow );
if ( nCol >= nStartCol && nCol <= nEndCol &&
nRow >= nStartRow && nRow <= nEndRow )
- bNewData = FALSE;
+ bNewData = false;
}
if (bNewData)
{
@@ -1185,10 +1185,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
// pQueryParam kann nur MAXQUERY Eintraege enthalten
- BOOL bSimpleQuery = TRUE;
- BOOL bColumnFound = FALSE;
+ sal_Bool bSimpleQuery = sal_True;
+ sal_Bool bColumnFound = false;
if (!pQueryParam->bInplace)
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
for (nQuery=0; nQuery<MAXQUERY && bSimpleQuery; nQuery++)
if (pQueryParam->GetEntry(nQuery).bDoQuery)
{
@@ -1196,10 +1196,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
// (auch bei ">1" soll der Spaltenkopf blau werden)
if (pQueryParam->GetEntry(nQuery).nField == nCol)
- bColumnFound = TRUE;
+ bColumnFound = sal_True;
if (nQuery > 0)
if (pQueryParam->GetEntry(nQuery).eConnect != SC_AND)
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
}
bool bArrowState = bSimpleQuery && bColumnFound;
@@ -1254,7 +1254,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
aComboButton.SetPosPixel( aRect.TopLeft() );
aComboButton.SetSizePixel( aRect.GetSize() );
pContentDev->SetClipRegion( aRect );
- aComboButton.Draw( FALSE, FALSE );
+ aComboButton.Draw( false, false );
pContentDev->SetClipRegion(); // always called from Draw() without clip region
aComboButton.SetPosPixel( aOldPos ); // restore old state
aComboButton.SetSizePixel( aOldSize ); // for MouseUp/Down (AutoFilter)
@@ -1269,7 +1269,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
ScDDComboBoxButton aButton( this ); // for optimal size
@@ -1293,7 +1293,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
nNextCol = nCol + pMerge->GetColMerge(); // next cell after the merged area
while ( nNextCol <= MAXCOL && pDoc->ColHidden(nNextCol, nTab) )
++nNextCol;
- BOOL bNextCell = ( nNextCol <= MAXCOL );
+ sal_Bool bNextCell = ( nNextCol <= MAXCOL );
if ( bNextCell )
nAvailable = ScViewData::ToPixel( pDoc->GetColWidth( nNextCol, nTab ), pViewData->GetPPTX() );
@@ -1302,7 +1302,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
if ( nCellSizeY < aBtnSize.Height() )
aBtnSize.Height() = nCellSizeY;
- Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, TRUE );
+ Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, sal_True );
aPos.X() += nCellSizeX * nLayoutSign; // start of next cell
if (!bNextCell)
aPos.X() -= aBtnSize.Width() * nLayoutSign; // right edge of cell if next cell not available
@@ -1315,7 +1315,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
return Rectangle( aPos, aBtnSize );
}
-BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
ScDocument* pDoc = pViewData->GetDocument();
ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab );
@@ -1328,12 +1328,12 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
OSL_FAIL("Auto-Filter-Button ohne DBData");
}
- BOOL bSimpleQuery = TRUE;
- BOOL bColumnFound = FALSE;
+ sal_Bool bSimpleQuery = sal_True;
+ sal_Bool bColumnFound = false;
SCSIZE nQuery;
if ( !aQueryParam.bInplace )
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
// aQueryParam kann nur MAXQUERY Eintraege enthalten
@@ -1341,18 +1341,18 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( aQueryParam.GetEntry(nQuery).bDoQuery )
{
if (aQueryParam.GetEntry(nQuery).nField == nCol)
- bColumnFound = TRUE;
+ bColumnFound = sal_True;
if (nQuery > 0)
if (aQueryParam.GetEntry(nQuery).eConnect != SC_AND)
- bSimpleQuery = FALSE;
+ bSimpleQuery = false;
}
return ( bSimpleQuery && bColumnFound );
}
void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bTestMerge, BOOL bRepeat )
+ sal_Bool bTestMerge, sal_Bool bRepeat )
{
//! if INVERT_HIGHLIGHT swaps foreground and background (like on Mac),
//! use INVERT_HIGHLIGHT only for cells that have no background color set
@@ -1365,7 +1365,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
SCCOL nTestX2 = nX2;
@@ -1402,30 +1402,30 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nScrY = aScrPos.Y();
- BOOL bWasHidden = FALSE;
+ sal_Bool bWasHidden = false;
for (SCROW nY=nY1; nY<=nY2; nY++)
{
- BOOL bFirstRow = ( nY == nPosY ); // first visible row?
- BOOL bDoHidden = FALSE; // versteckte nachholen ?
- USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab );
- BOOL bDoRow = ( nHeightTwips != 0 );
+ sal_Bool bFirstRow = ( nY == nPosY ); // first visible row?
+ sal_Bool bDoHidden = false; // versteckte nachholen ?
+ sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab );
+ sal_Bool bDoRow = ( nHeightTwips != 0 );
if (bDoRow)
{
if (bTestMerge)
if (bWasHidden) // auf versteckte zusammengefasste testen
{
- bDoHidden = TRUE;
- bDoRow = TRUE;
+ bDoHidden = true;
+ bDoRow = true;
}
- bWasHidden = FALSE;
+ bWasHidden = false;
}
else
{
- bWasHidden = TRUE;
+ bWasHidden = sal_True;
if (bTestMerge)
if (nY==nY2)
- bDoRow = TRUE; // letzte Zeile aus Block
+ bDoRow = sal_True; // letzte Zeile aus Block
}
if ( bDoRow )
@@ -1478,7 +1478,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
}
}
- if ( rMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat )
+ if ( rMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat )
{
if ( !pMergeFlag->IsOverlapped() )
{
@@ -1503,7 +1503,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
}
else // !bTestMerge
{
- if ( rMark.IsCellMarked( nX, nY, TRUE ) == bRepeat &&
+ if ( rMark.IsCellMarked( nX, nY, sal_True ) == bRepeat &&
nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
{
aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
@@ -1527,13 +1527,13 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
{
ScMarkData aMultiMark( pViewData->GetMarkData() );
- aMultiMark.SetMarking( FALSE );
+ aMultiMark.SetMarking( false );
aMultiMark.MarkToMulti();
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if ( !aMultiMark.IsMultiMarked() )
@@ -1549,8 +1549,8 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
PutInOrder( nX1, nX2 );
PutInOrder( nY1, nY2 );
- BOOL bTestMerge = TRUE;
- BOOL bRepeat = TRUE;
+ sal_Bool bTestMerge = sal_True;
+ sal_Bool bRepeat = sal_True;
SCCOL nTestX2 = nX2;
SCROW nTestY2 = nY2;
@@ -1584,30 +1584,30 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nScrY = aScrPos.Y();
- BOOL bWasHidden = FALSE;
+ sal_Bool bWasHidden = false;
for (SCROW nY=nY1; nY<=nY2; nY++)
{
- BOOL bFirstRow = ( nY == nPosY ); // first visible row?
- BOOL bDoHidden = FALSE; // versteckte nachholen ?
- USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab );
- BOOL bDoRow = ( nHeightTwips != 0 );
+ sal_Bool bFirstRow = ( nY == nPosY ); // first visible row?
+ sal_Bool bDoHidden = false; // versteckte nachholen ?
+ sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab );
+ sal_Bool bDoRow = ( nHeightTwips != 0 );
if (bDoRow)
{
if (bTestMerge)
if (bWasHidden) // auf versteckte zusammengefasste testen
{
- bDoHidden = TRUE;
- bDoRow = TRUE;
+ bDoHidden = sal_True;
+ bDoRow = sal_True;
}
- bWasHidden = FALSE;
+ bWasHidden = false;
}
else
{
- bWasHidden = TRUE;
+ bWasHidden = sal_True;
if (bTestMerge)
if (nY==nY2)
- bDoRow = TRUE; // letzte Zeile aus Block
+ bDoRow = sal_True; // letzte Zeile aus Block
}
if ( bDoRow )
@@ -1660,7 +1660,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
}
}
- if ( aMultiMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat )
+ if ( aMultiMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat )
{
if ( !pMergeFlag->IsOverlapped() )
{
@@ -1685,7 +1685,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects )
}
else // !bTestMerge
{
- if ( aMultiMark.IsCellMarked( nX, nY, TRUE ) == bRepeat &&
+ if ( aMultiMark.IsCellMarked( nX, nY, sal_True ) == bRepeat &&
nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY )
{
aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) );
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index ace5b14d82f5..e5cfd3c8eb05 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -86,22 +86,22 @@ ScHideTextCursor::~ScHideTextCursor()
{
// restore text cursor
if ( pViewData->HasEditView(eWhich) && pWin->HasFocus() )
- pViewData->GetEditView(eWhich)->ShowCursor( FALSE, TRUE );
+ pViewData->GetEditView(eWhich)->ShowCursor( false, sal_True );
}
}
// -----------------------------------------------------------------------
-BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
+sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
ScAddress aCellPos( nPosX, nPosY, nTab );
String aTrackText;
- BOOL bLeftEdge = FALSE;
+ sal_Bool bLeftEdge = false;
// Change-Tracking
@@ -175,7 +175,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
// bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
if ( pFound->GetType() == SC_CAT_DELETE_COLS )
- bLeftEdge = TRUE;
+ bLeftEdge = sal_True;
DateTime aDT = pFound->GetDateTime();
aTrackText = pFound->GetUser();
@@ -202,23 +202,23 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
const ScPostIt* pNote = pDoc->GetNote( aCellPos );
if ( (aTrackText.Len() > 0) || (pNote && !pNote->IsCaptionShown()) )
{
- BOOL bNew = TRUE;
- BOOL bFast = FALSE;
+ sal_Bool bNew = sal_True;
+ sal_Bool bFast = false;
if ( pNoteMarker ) // schon eine Notiz angezeigt
{
if ( pNoteMarker->GetDocPos() == aCellPos ) // dieselbe
- bNew = FALSE; // dann stehenlassen
+ bNew = false; // dann stehenlassen
else
- bFast = TRUE; // sonst sofort
+ bFast = sal_True; // sonst sofort
// marker which was shown for ctrl-F1 isn't removed by mouse events
if ( pNoteMarker->IsByKeyboard() && !bKeyboard )
- bNew = FALSE;
+ bNew = false;
}
if ( bNew )
{
if ( bKeyboard )
- bFast = TRUE; // keyboard also shows the marker immediately
+ bFast = sal_True; // keyboard also shows the marker immediately
delete pNoteMarker;
@@ -233,7 +233,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
/* If caption is shown from right or bottom windows, adjust
mapmode to include size of top-left window. */
- MapMode aMapMode = GetDrawMapMode( TRUE );
+ MapMode aMapMode = GetDrawMapMode( sal_True );
Size aLeftSize = pLeft->PixelToLogic( pLeft->GetOutputSizePixel(), aMapMode );
Point aOrigin = aMapMode.GetOrigin();
if( (this == pRight) || (this == pDiagonal) )
@@ -247,7 +247,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
aMapMode, bLeftEdge, bFast, bKeyboard );
}
- bDone = TRUE; // something is shown (old or new)
+ bDone = sal_True; // something is shown (old or new)
}
return bDone;
@@ -257,11 +257,11 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard )
void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
{
- BOOL bDone = FALSE;
- BOOL bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0;
+ sal_Bool bDone = false;
+ sal_Bool bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0;
SdrView* pDrView = pViewData->GetScDrawView();
- BOOL bDrawTextEdit = FALSE;
+ sal_Bool bDrawTextEdit = false;
if (pDrView)
bDrawTextEdit = pDrView->IsTextEdit();
@@ -274,10 +274,10 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
SCsROW nPosY;
pViewData->GetPosFromPixel( aPosPixel.X(), aPosPixel.Y(), eWhich, nPosX, nPosY );
- if ( ShowNoteMarker( nPosX, nPosY, FALSE ) )
+ if ( ShowNoteMarker( nPosX, nPosY, false ) )
{
Window::RequestHelp( rHEvt ); // alte Tip/Balloon ausschalten
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -373,8 +373,8 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
ScHideTextCursor aHideCursor( pViewData, eWhich ); // MapMode is changed in GetEditArea
- // bForceToTop = FALSE, use the cell's real position
- aPixRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE );
+ // bForceToTop = sal_False, use the cell's real position
+ aPixRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false );
}
}
@@ -388,7 +388,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
Help::ShowQuickHelp(this,aScreenRect, aHelpText);
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -406,13 +406,13 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( nMouseStatus == SC_GM_TABDOWN && pViewData->GetRefType() == SC_REFTYPE_FILL &&
Help::IsQuickHelpEnabled() )
- bDone = TRUE;
+ bDone = sal_True;
if (!bDone)
Window::RequestHelp( rHEvt );
}
-BOOL ScGridWindow::IsMyModel(SdrEditView* pSdrView)
+sal_Bool ScGridWindow::IsMyModel(SdrEditView* pSdrView)
{
return pSdrView &&
pSdrView->GetModel() == pViewData->GetDocument()->GetDrawLayer();
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index e190e7dc6a0d..c8f6a4577158 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -67,7 +67,7 @@
//==================================================================
ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine,
- SCCOLROW nNewSize, USHORT nNewFlags ) :
+ SCCOLROW nNewSize, sal_uInt16 nNewFlags ) :
Window ( pParent ),
pSelEngine ( pSelectionEngine ),
nFlags ( nNewFlags ),
@@ -75,24 +75,24 @@ ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEn
nSize ( nNewSize ),
nMarkStart ( 0 ),
nMarkEnd ( 0 ),
- bMarkRange ( FALSE ),
- bDragging ( FALSE ),
- bIgnoreMove ( FALSE )
+ bMarkRange ( false ),
+ bDragging ( false ),
+ bIgnoreMove ( false )
{
// --- RTL --- no default mirroring for this window, the spreadsheet itself
// is also not mirrored
// mirror the vertical window for correct border drawing
// table layout depends on sheet format, not UI setting, so the
// borders of the vertical window have to be handled manually, too.
- EnableRTL( FALSE );
+ EnableRTL( false );
aNormFont = GetFont();
- aNormFont.SetTransparent( TRUE ); //! WEIGHT_NORMAL hart setzen ???
+ aNormFont.SetTransparent( sal_True ); //! WEIGHT_NORMAL hart setzen ???
aBoldFont = aNormFont;
aBoldFont.SetWeight( WEIGHT_BOLD );
SetFont(aBoldFont);
- bBoldSet = TRUE;
+ bBoldSet = sal_True;
Size aSize = LogicToPixel( Size(
GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("8888")) ),
@@ -128,7 +128,7 @@ ScHeaderControl::~ScHeaderControl()
void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd )
{
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
Rectangle aRect( Point(0,0), GetOutputSizePixel() );
@@ -145,15 +145,15 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd )
Invalidate(aRect);
}
-void ScHeaderControl::SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd )
+void ScHeaderControl::SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd )
{
- BOOL bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader(); //! cachen?
+ sal_Bool bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader(); //! cachen?
if (!bEnabled)
- bNewSet = FALSE;
+ bNewSet = false;
// Variablen setzen
- BOOL bOldSet = bMarkRange;
+ sal_Bool bOldSet = bMarkRange;
SCCOLROW nOldStart = nMarkStart;
SCCOLROW nOldEnd = nMarkEnd;
PutInOrder( nNewStart, nNewEnd );
@@ -205,7 +205,7 @@ long ScHeaderControl::GetScrPos( SCCOLROW nEntryNo )
nScrPos = 0;
for (SCCOLROW i=GetPos(); i<nEntryNo && nScrPos<nMax; i++)
{
- USHORT nAdd = GetEntrySize(i);
+ sal_uInt16 nAdd = GetEntrySize(i);
if (nAdd)
nScrPos += nAdd;
else
@@ -270,8 +270,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
// Linien zusammengefasst
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bHighContrast = rStyleSettings.GetHighContrastMode();
- BOOL bDark = rStyleSettings.GetFaceColor().IsDark();
+ sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode();
+ sal_Bool bDark = rStyleSettings.GetFaceColor().IsDark();
// Use the same distinction for bDark as in Window::DrawSelectionBackground
Color aTextColor = rStyleSettings.GetButtonTextColor();
@@ -287,19 +287,19 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
Color aSelLineColor = rStyleSettings.GetHighlightColor();
aSelLineColor.Merge( aBlack, 0xe0 ); // darken just a little bit
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
- BOOL bMirrored = IsMirrored();
+ sal_Bool bMirrored = IsMirrored();
String aString;
- USHORT nBarSize;
+ sal_uInt16 nBarSize;
Point aScrPos;
Size aTextSize;
if (bVertical)
- nBarSize = (USHORT) GetSizePixel().Width();
+ nBarSize = (sal_uInt16) GetSizePixel().Width();
else
- nBarSize = (USHORT) GetSizePixel().Height();
+ nBarSize = (sal_uInt16) GetSizePixel().Height();
SCCOLROW nPos = GetPos();
@@ -331,7 +331,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
for (SCCOLROW i=nPos; i<nSize; i++)
{
- USHORT nSizePix = GetEntrySize( i );
+ sal_uInt16 nSizePix = GetEntrySize( i );
if (nSizePix)
{
nLineEnd += nSizePix * nLayoutSign;
@@ -453,7 +453,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
// borders, light border at top isn't used anymore
// use SC_HDRPAINT_SEL_BOTTOM for different color
- for (USHORT nPass = SC_HDRPAINT_SEL_BOTTOM; nPass < SC_HDRPAINT_COUNT; nPass++)
+ for (sal_uInt16 nPass = SC_HDRPAINT_SEL_BOTTOM; nPass < SC_HDRPAINT_COUNT; nPass++)
{
// set line color etc. before entry loop
switch ( nPass )
@@ -483,7 +483,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
else
aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 );
SetBackground( Color( rStyleSettings.GetFaceColor() ) );
- DrawSelectionBackground( aTransRect, 0, TRUE, FALSE, FALSE );
+ DrawSelectionBackground( aTransRect, 0, sal_True, false, false );
SetBackground();
}
break;
@@ -503,7 +503,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
nScrPos = nPEnd + nLayoutSign; // beyond nPEnd -> stop
else
{
- USHORT nSizePix = GetEntrySize( nEntryNo );
+ sal_uInt16 nSizePix = GetEntrySize( nEntryNo );
if (nSizePix == 0)
{
@@ -519,8 +519,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
else
aEndPos = Point( aScrPos.X()+(nSizePix-1)*nLayoutSign, aScrPos.Y()+nBarSize-1 );
- BOOL bMark = bMarkRange && nEntryNo >= nMarkStart && nEntryNo <= nMarkEnd;
- BOOL bNextToMark = bMarkRange && nEntryNo + 1 >= nMarkStart && nEntryNo <= nMarkEnd;
+ sal_Bool bMark = bMarkRange && nEntryNo >= nMarkStart && nEntryNo <= nMarkEnd;
+ sal_Bool bNextToMark = bMarkRange && nEntryNo + 1 >= nMarkStart && nEntryNo <= nMarkEnd;
switch ( nPass )
{
@@ -598,9 +598,9 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
// Maus - Handling
//
-SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder )
+SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, sal_Bool& rBorder )
{
- BOOL bFound=FALSE;
+ sal_Bool bFound=false;
SCCOLROW nCount = 1;
SCCOLROW nPos = GetPos();
SCCOLROW nHitNo = nPos;
@@ -610,7 +610,7 @@ SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder )
Size aSize = GetOutputSizePixel();
long nWinSize = bVertical ? aSize.Height() : aSize.Width();
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
long nEndPos = bLayoutRTL ? -1 : nWinSize;
@@ -627,7 +627,7 @@ SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder )
nDif = nMousePos - nScrPos;
if (nDif >= -2 && nDif <= 2 && nCount > 0)
{
- bFound=TRUE;
+ bFound=sal_True;
nHitNo=nEntryNo-1;
}
else if (nDif * nLayoutSign >= 0 && nEntryNo < nSize)
@@ -647,7 +647,7 @@ bool ScHeaderControl::IsSelectionAllowed(SCCOLROW nPos) const
return false;
ScViewData* pViewData = pViewSh->GetViewData();
- USHORT nTab = pViewData->GetTabNo();
+ sal_uInt16 nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
const ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
bool bSelectAllowed = true;
@@ -684,10 +684,10 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
if (IsDisabled())
return;
- bIgnoreMove = FALSE;
+ bIgnoreMove = false;
SelectWindow();
- BOOL bFound;
+ sal_Bool bFound;
SCCOLROW nHitNo = GetMousePos( rMEvt, bFound );
if (!IsSelectionAllowed(nHitNo))
return;
@@ -695,7 +695,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
if ( bFound && rMEvt.IsLeft() && ResizeAllowed() )
{
nDragNo = nHitNo;
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if ( nClicks && nClicks%2==0 )
{
SetEntrySize( nDragNo, HDR_SIZE_OPTIMUM );
@@ -712,8 +712,8 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
DrawInvert( nDragPos );
StartTracking();
- bDragging = TRUE;
- bDragMoved = FALSE;
+ bDragging = sal_True;
+ bDragMoved = false;
}
}
else if (rMEvt.IsLeft())
@@ -727,7 +727,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
aVis.Top() = LONG_MIN, aVis.Bottom() = LONG_MAX;
pSelEngine->SetVisibleArea( aVis );
- SetMarking( TRUE ); // muss vor SelMouseButtonDown sein
+ SetMarking( sal_True ); // muss vor SelMouseButtonDown sein
pSelEngine->SelMouseButtonDown( rMEvt );
// In column/row headers a simple click already is a selection.
@@ -750,18 +750,18 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt )
if ( IsDisabled() )
return;
- SetMarking( FALSE );
- bIgnoreMove = FALSE;
+ SetMarking( false );
+ bIgnoreMove = false;
if ( bDragging )
{
DrawInvert( nDragPos );
ReleaseMouse();
- bDragging = FALSE;
+ bDragging = false;
long nScrPos = GetScrPos( nDragNo );
long nMousePos = bVertical ? rMEvt.GetPosPixel().Y() : rMEvt.GetPosPixel().X();
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nNewWidth = bLayoutRTL ? ( nScrPos - nMousePos + 1 )
: ( nMousePos + 2 - nScrPos );
@@ -786,7 +786,7 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt )
{
if (nNewWidth<0) nNewWidth=0;
if (bDragMoved)
- SetEntrySize( nDragNo, (USHORT) nNewWidth );
+ SetEntrySize( nDragNo, (sal_uInt16) nNewWidth );
}
}
else
@@ -804,7 +804,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt )
return;
}
- BOOL bFound;
+ sal_Bool bFound;
(void)GetMousePos( rMEvt, bFound );
if ( bDragging )
@@ -818,7 +818,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt )
DrawInvert( nDragPos );
if (nDragPos <= nDragStart-SC_DRAG_MIN || nDragPos >= nDragStart+SC_DRAG_MIN)
- bDragMoved = TRUE;
+ bDragMoved = sal_True;
}
}
else
@@ -848,7 +848,7 @@ void ScHeaderControl::Tracking( const TrackingEvent& rTEvt )
void ScHeaderControl::Command( const CommandEvent& rCEvt )
{
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_CONTEXTMENU )
{
StopMarking(); // Selektion / Dragging beenden
@@ -869,7 +869,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt )
SC_MOD()->InputEnterHandler(); // always end edit mode
MouseEvent aMEvt( rCEvt.GetMousePosPixel() );
- BOOL bBorder;
+ sal_Bool bBorder;
SCCOLROW nPos = GetMousePos( aMEvt, bBorder );
if (!IsSelectionAllowed(nPos))
// Selecting this cell is not allowed, neither is context menu.
@@ -886,7 +886,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt )
// see if any part of the range is already selected
ScRangeList aRanges;
- pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, FALSE );
+ pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, false );
bool bSelected = aRanges.Intersects(aNewRange);
// select the range if no part of it was selected
@@ -909,11 +909,11 @@ void ScHeaderControl::StopMarking()
if ( bDragging )
{
DrawInvert( nDragPos );
- bDragging = FALSE;
+ bDragging = false;
}
- SetMarking( FALSE );
- bIgnoreMove = TRUE;
+ SetMarking( false );
+ bIgnoreMove = sal_True;
// don't call pSelEngine->Reset, so selection across the parts of
// a split/frozen view is possible
@@ -926,7 +926,7 @@ void ScHeaderControl::ShowDragHelp()
if (Help::IsQuickHelpEnabled())
{
long nScrPos = GetScrPos( nDragNo );
- BOOL bLayoutRTL = IsLayoutRTL();
+ sal_Bool bLayoutRTL = IsLayoutRTL();
long nVal = bLayoutRTL ? ( nScrPos - nDragPos + 1 )
: ( nDragPos + 2 - nScrPos );
@@ -937,7 +937,7 @@ void ScHeaderControl::ShowDragHelp()
Point aMousePos = OutputToScreenPixel(GetPointerPosPixel());
Rectangle aRect;
- USHORT nAlign;
+ sal_uInt16 nAlign;
if (!bVertical)
{
// oberhalb
@@ -965,7 +965,7 @@ void ScHeaderControl::RequestHelp( const HelpEvent& rHEvt )
// Wenn eigene QuickHelp angezeigt wird, nicht durch RequestHelp
// wieder wegnehmen lassen
- BOOL bOwn = bDragging && Help::IsQuickHelpEnabled();
+ sal_Bool bOwn = bDragging && Help::IsQuickHelpEnabled();
if (!bOwn)
Window::RequestHelp(rHEvt);
}
@@ -985,24 +985,24 @@ SCCOLROW ScHeaderControl::GetHiddenCount( SCCOLROW nEntryNo )
return nHidden;
}
-BOOL ScHeaderControl::IsLayoutRTL()
+sal_Bool ScHeaderControl::IsLayoutRTL()
{
- return FALSE;
+ return false;
}
-BOOL ScHeaderControl::IsMirrored()
+sal_Bool ScHeaderControl::IsMirrored()
{
- return FALSE;
+ return false;
}
-BOOL ScHeaderControl::IsDisabled()
+sal_Bool ScHeaderControl::IsDisabled()
{
- return FALSE;
+ return false;
}
-BOOL ScHeaderControl::ResizeAllowed()
+sal_Bool ScHeaderControl::ResizeAllowed()
{
- return TRUE;
+ return sal_True;
}
void ScHeaderControl::SelectWindow()
@@ -1018,7 +1018,7 @@ String ScHeaderControl::GetDragHelp( long /* nVal */ )
return EMPTY_STRING;
}
-void ScHeaderControl::SetMarking( BOOL /* bSet */ )
+void ScHeaderControl::SetMarking( sal_Bool /* bSet */ )
{
}
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 0343ccfd7e00..595531ac8655 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -56,7 +56,7 @@ ScHintWindow::ScHintWindow( Window* pParent, const String& rTit, const String& r
SetBackground( aYellow );
aTextFont = GetFont();
- aTextFont.SetTransparent( TRUE );
+ aTextFont.SetTransparent( sal_True );
aTextFont.SetWeight( WEIGHT_NORMAL );
aHeadFont = aTextFont;
aHeadFont.SetWeight( WEIGHT_BOLD );
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx
index 88e78ccf1ee6..3be7c801049d 100644
--- a/sc/source/ui/view/imapwrap.cxx
+++ b/sc/source/ui/view/imapwrap.cxx
@@ -37,7 +37,7 @@
#include <sfx2/viewfrm.hxx>
-USHORT ScIMapChildWindowId()
+sal_uInt16 ScIMapChildWindowId()
{
return SvxIMapDlgChildWindow::GetChildWindowId();
}
diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx
index cb913677e962..c65b29ba1a6e 100644
--- a/sc/source/ui/view/invmerge.cxx
+++ b/sc/source/ui/view/invmerge.cxx
@@ -164,7 +164,7 @@ void ScInvertMerger::AddRect( const Rectangle& rRect )
}
else
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( aJustified.Top() == aLineRect.Top() &&
aJustified.Bottom() == aLineRect.Bottom() )
{
@@ -172,12 +172,12 @@ void ScInvertMerger::AddRect( const Rectangle& rRect )
if ( aJustified.Left() == aLineRect.Right() + 1 )
{
aLineRect.Right() = aJustified.Right();
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( aJustified.Right() + 1 == aLineRect.Left() ) // for RTL layout
{
aLineRect.Left() = aJustified.Left();
- bDone = TRUE;
+ bDone = sal_True;
}
}
if (!bDone)
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 4deb56ab61e1..f43b8e2985ab 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -49,7 +49,7 @@
ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal,
ScDocument* pD, ScAddress aPos, const String& rUser,
- const MapMode& rMap, BOOL bLeftEdge, BOOL bForce, BOOL bKeyboard ) :
+ const MapMode& rMap, sal_Bool bLeftEdge, sal_Bool bForce, sal_Bool bKeyboard ) :
pWindow( pWin ),
pRightWin( pRight ),
pBottomWin( pBottom ),
@@ -62,7 +62,7 @@ ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Windo
bByKeyboard( bKeyboard ),
pModel( NULL ),
pObject( NULL ),
- bVisible( FALSE )
+ bVisible( false )
{
Size aSizePixel = pWindow->GetOutputSizePixel();
if( pRightWin )
@@ -105,7 +105,7 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG )
rOutliner.SetRefDevice(pPrinter);
}
- if( SdrPage* pPage = pModel->AllocPage( FALSE ) )
+ if( SdrPage* pPage = pModel->AllocPage( false ) )
{
pObject = ScNoteUtil::CreateTempCaption( *pDoc, aDocPos, *pPage, aUserText, aVisRect, bLeft );
if( pObject )
@@ -115,7 +115,7 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG )
pModel->InsertPage( pPage );
}
- bVisible = TRUE;
+ bVisible = sal_True;
}
Draw();
@@ -127,7 +127,7 @@ void lcl_DrawWin( SdrObject* pObject, Window* pWindow, const MapMode& rMap )
MapMode aOld = pWindow->GetMapMode();
pWindow->SetMapMode( rMap );
- ULONG nOldDrawMode = pWindow->GetDrawMode();
+ sal_uLong nOldDrawMode = pWindow->GetDrawMode();
if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pWindow->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 1340547e66e1..7f1eeaa3ba80 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -47,10 +47,10 @@ const long SC_OL_POSOFFSET = 2;
const size_t SC_OL_NOLEVEL = static_cast< size_t >( -1 );
const size_t SC_OL_HEADERENTRY = static_cast< size_t >( -1 );
-const USHORT SC_OL_IMAGE_PLUS = 9;
-const USHORT SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1;
-const USHORT SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1;
-const USHORT SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1;
+const sal_uInt16 SC_OL_IMAGE_PLUS = 9;
+const sal_uInt16 SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1;
+const sal_uInt16 SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1;
+const sal_uInt16 SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1;
// ============================================================================
@@ -73,7 +73,7 @@ ScOutlineWindow::ScOutlineWindow( Window* pParent, ScOutlineMode eMode, ScViewDa
mnFocusEntry( SC_OL_HEADERENTRY ),
mbDontDrawFocus( false )
{
- EnableRTL( FALSE ); // mirroring is done manually
+ EnableRTL( false ); // mirroring is done manually
InitSettings();
maFocusRect.SetEmpty();
@@ -95,7 +95,7 @@ ScOutlineWindow::~ScOutlineWindow()
void ScOutlineWindow::SetHeaderSize( long nNewSize )
{
- BOOL bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() );
+ sal_Bool bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() );
mbMirrorEntries = bLayoutRTL && mbHoriz;
mbMirrorLevels = bLayoutRTL && !mbHoriz;
@@ -179,7 +179,7 @@ const ScOutlineArray* ScOutlineWindow::GetOutlineArray() const
const ScOutlineEntry* ScOutlineWindow::GetOutlineEntry( size_t nLevel, size_t nEntry ) const
{
const ScOutlineArray* pArray = GetOutlineArray();
- return pArray ? pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) ) : NULL;
+ return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : NULL;
}
bool ScOutlineWindow::IsHidden( SCCOLROW nColRowIndex ) const
@@ -270,8 +270,8 @@ size_t ScOutlineWindow::GetLevelFromPos( long nLevelPos ) const
long ScOutlineWindow::GetColRowPos( SCCOLROW nColRowIndex ) const
{
long nDocPos = mbHoriz ?
- mrViewData.GetScrPos( static_cast<SCCOL>(nColRowIndex), 0, meWhich, TRUE ).X() :
- mrViewData.GetScrPos( 0, static_cast<SCROW>(nColRowIndex), meWhich, TRUE ).Y();
+ mrViewData.GetScrPos( static_cast<SCCOL>(nColRowIndex), 0, meWhich, sal_True ).X() :
+ mrViewData.GetScrPos( 0, static_cast<SCROW>(nColRowIndex), meWhich, sal_True ).Y();
return mnMainFirstPos + nDocPos;
}
@@ -413,13 +413,13 @@ bool ScOutlineWindow::ItemHit( const Point& rPos, size_t& rnLevel, size_t& rnEnt
// --- expand/collapse buttons and expanded lines ---
// search outline entries backwards
- size_t nEntry = pArray->GetCount( sal::static_int_cast<USHORT>(nLevel) );
+ size_t nEntry = pArray->GetCount( sal::static_int_cast<sal_uInt16>(nLevel) );
while ( nEntry )
{
--nEntry;
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel),
- sal::static_int_cast<USHORT>(nEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
+ sal::static_int_cast<sal_uInt16>(nEntry) );
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -471,16 +471,16 @@ void ScOutlineWindow::DoFunction( size_t nLevel, size_t nEntry ) const
{
ScDBFunc& rFunc = *mrViewData.GetView();
if ( nEntry == SC_OL_HEADERENTRY )
- rFunc.SelectLevel( mbHoriz, sal::static_int_cast<USHORT>(nLevel) );
+ rFunc.SelectLevel( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel) );
else
{
const ScOutlineEntry* pEntry = GetOutlineEntry( nLevel, nEntry );
if ( pEntry )
{
if ( pEntry->IsHidden() )
- rFunc.ShowOutline( mbHoriz, sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) );
+ rFunc.ShowOutline( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) );
else
- rFunc.HideOutline( mbHoriz, sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) );
+ rFunc.HideOutline( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) );
}
}
}
@@ -542,7 +542,7 @@ void ScOutlineWindow::DrawRectRel(
DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) );
}
-void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId )
+void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId )
{
DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawImageRel - no images" );
const Image& rImage = mpSymbols->GetImage( nId );
@@ -559,7 +559,7 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed
if ( GetImagePos( nLevel, nEntry, aPos ) )
{
DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawBorderRel - no images" );
- USHORT nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED;
+ sal_uInt16 nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED;
bool bClip = (nEntry != SC_OL_HEADERENTRY);
if ( bClip )
SetEntryAreaClipRegion();
@@ -633,7 +633,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
{
long nEntryPos = GetHeaderEntryPos();
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
- DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< USHORT >( nLevel + 1 ) );
+ DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< sal_uInt16 >( nLevel + 1 ) );
SetLineColor( maLineColor );
long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
@@ -652,7 +652,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
long nLevelPos = GetLevelPos( nLevel );
long nEntryPos1 = 0, nEntryPos2 = 0, nImagePos = 0;
- size_t nEntryCount = pArray->GetCount( sal::static_int_cast<USHORT>(nLevel) );
+ size_t nEntryCount = pArray->GetCount( sal::static_int_cast<sal_uInt16>(nLevel) );
size_t nEntry;
// first draw all lines in the current level
@@ -660,8 +660,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
SetFillColor( maLineColor );
for ( nEntry = 0; nEntry < nEntryCount; ++nEntry )
{
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel),
- sal::static_int_cast<USHORT>(nEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
+ sal::static_int_cast<sal_uInt16>(nEntry) );
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -693,8 +693,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
{
--nEntry;
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel),
- sal::static_int_cast<USHORT>(nEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel),
+ sal::static_int_cast<sal_uInt16>(nEntry) );
SCCOLROW nStart = pEntry->GetStart();
// visible range?
@@ -705,7 +705,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ )
// draw, if not hidden by higher levels
if ( bDraw )
{
- USHORT nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS;
+ sal_uInt16 nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS;
DrawImageRel( nLevelPos, nImagePos, nImageId );
}
}
@@ -761,7 +761,7 @@ bool ScOutlineWindow::ImplMoveFocusByEntry( bool bForward, bool bFindVisible )
return false;
bool bWrapped = false;
- size_t nEntryCount = pArray->GetCount( sal::static_int_cast<USHORT>(mnFocusLevel) );
+ size_t nEntryCount = pArray->GetCount( sal::static_int_cast<sal_uInt16>(mnFocusLevel) );
// #i29530# entry count may be decreased after changing active sheet
if( mnFocusEntry >= nEntryCount )
mnFocusEntry = SC_OL_HEADERENTRY;
@@ -812,8 +812,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
}
else
{
- const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(mnFocusLevel),
- sal::static_int_cast<USHORT>(mnFocusEntry) );
+ const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(mnFocusLevel),
+ sal::static_int_cast<sal_uInt16>(mnFocusEntry) );
if ( pEntry )
{
SCCOLROW nStart = pEntry->GetStart();
@@ -827,8 +827,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
// next level -> find first child entry
nNewLevel = mnFocusLevel + 1;
// TODO - change ScOutlineArray interface to size_t usage
- USHORT nTmpEntry = 0;
- bFound = pArray->GetEntryIndexInRange( sal::static_int_cast<USHORT>(nNewLevel), nStart, nEnd, nTmpEntry );
+ sal_uInt16 nTmpEntry = 0;
+ bFound = pArray->GetEntryIndexInRange( sal::static_int_cast<sal_uInt16>(nNewLevel), nStart, nEnd, nTmpEntry );
nNewEntry = nTmpEntry;
}
else if ( !bForward && (mnFocusLevel > 0) )
@@ -836,8 +836,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
// previous level -> find parent entry
nNewLevel = mnFocusLevel - 1;
// TODO - change ScOutlineArray interface to size_t usage
- USHORT nTmpEntry = 0;
- bFound = pArray->GetEntryIndex( sal::static_int_cast<USHORT>(nNewLevel), nStart, nTmpEntry );
+ sal_uInt16 nTmpEntry = 0;
+ bFound = pArray->GetEntryIndex( sal::static_int_cast<sal_uInt16>(nNewLevel), nStart, nTmpEntry );
nNewEntry = nTmpEntry;
}
@@ -999,7 +999,7 @@ void ScOutlineWindow::KeyInput( const KeyEvent& rKEvt )
bool bShift = (rKCode.GetModifier() == KEY_SHIFT);
bool bCtrl = (rKCode.GetModifier() == KEY_MOD1);
- USHORT nCode = rKCode.GetCode();
+ sal_uInt16 nCode = rKCode.GetCode();
bool bUpDownKey = (nCode == KEY_UP) || (nCode == KEY_DOWN);
bool bLeftRightKey = (nCode == KEY_LEFT) || (nCode == KEY_RIGHT);
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 8fbe8819fc46..421038b24a46 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -91,7 +91,7 @@ private:
const ScAppOptions& rOpt;
const ScStrCollection& rUsers;
String aLastUserName;
- USHORT nLastUserIndex;
+ sal_uInt16 nLastUserIndex;
ColorData nColor;
public:
@@ -142,7 +142,7 @@ void ScActionColorChanger::Update( const ScChangeAction& rAction )
{
aLastUserName = rAction.GetUser();
StrData aData(aLastUserName);
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (!rUsers.Search(&aData, nIndex))
{
// empty string is possible if a name wasn't found while saving a 5.0 file
@@ -183,25 +183,25 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
pEditObj( NULL ),
pViewShell( NULL ),
pDrawView( NULL ), // #114135#
- bEditMode( FALSE ),
- bMetaFile( FALSE ),
- bSingleGrid( FALSE ),
- bPagebreakMode( FALSE ),
- bSolidBackground( FALSE ),
- bUseStyleColor( FALSE ),
+ bEditMode( false ),
+ bMetaFile( false ),
+ bSingleGrid( false ),
+ bPagebreakMode( false ),
+ bSolidBackground( false ),
+ bUseStyleColor( false ),
bForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ),
- bSyntaxMode( FALSE ),
+ bSyntaxMode( false ),
pValueColor( NULL ),
pTextColor( NULL ),
pFormulaColor( NULL ),
aGridColor( COL_BLACK ),
- bShowNullValues( TRUE ),
- bShowFormulas( FALSE ),
- bShowSpellErrors( FALSE ),
- bMarkClipped( FALSE ), // FALSE fuer Drucker/Metafile etc.
- bSnapPixel( FALSE ),
- bAnyRotated( FALSE ),
- bAnyClipped( FALSE ),
+ bShowNullValues( sal_True ),
+ bShowFormulas( false ),
+ bShowSpellErrors( false ),
+ bMarkClipped( false ), // sal_False fuer Drucker/Metafile etc.
+ bSnapPixel( false ),
+ bAnyRotated( false ),
+ bAnyClipped( false ),
mpTargetPaintWindow(0) // #i74769# use SdrPaintWindow direct
{
if (pZoomX)
@@ -262,27 +262,27 @@ void ScOutputData::SetGridColor( const Color& rColor )
aGridColor = rColor;
}
-void ScOutputData::SetMarkClipped( BOOL bSet )
+void ScOutputData::SetMarkClipped( sal_Bool bSet )
{
bMarkClipped = bSet;
}
-void ScOutputData::SetShowNullValues( BOOL bSet )
+void ScOutputData::SetShowNullValues( sal_Bool bSet )
{
bShowNullValues = bSet;
}
-void ScOutputData::SetShowFormulas( BOOL bSet )
+void ScOutputData::SetShowFormulas( sal_Bool bSet )
{
bShowFormulas = bSet;
}
-void ScOutputData::SetShowSpellErrors( BOOL bSet )
+void ScOutputData::SetShowSpellErrors( sal_Bool bSet )
{
bShowSpellErrors = bSet;
}
-void ScOutputData::SetSnapPixel( BOOL bSet )
+void ScOutputData::SetSnapPixel( sal_Bool bSet )
{
bSnapPixel = bSet;
}
@@ -291,20 +291,20 @@ void ScOutputData::SetEditCell( SCCOL nCol, SCROW nRow )
{
nEditCol = nCol;
nEditRow = nRow;
- bEditMode = TRUE;
+ bEditMode = sal_True;
}
-void ScOutputData::SetMetaFileMode( BOOL bNewMode )
+void ScOutputData::SetMetaFileMode( sal_Bool bNewMode )
{
bMetaFile = bNewMode;
}
-void ScOutputData::SetSingleGrid( BOOL bNewMode )
+void ScOutputData::SetSingleGrid( sal_Bool bNewMode )
{
bSingleGrid = bNewMode;
}
-void ScOutputData::SetSyntaxMode( BOOL bNewMode )
+void ScOutputData::SetSyntaxMode( sal_Bool bNewMode )
{
bSyntaxMode = bNewMode;
if (bNewMode)
@@ -316,7 +316,7 @@ void ScOutputData::SetSyntaxMode( BOOL bNewMode )
}
}
-void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
+void ScOutputData::DrawGrid( sal_Bool bGrid, sal_Bool bPage )
{
SCCOL nX;
SCROW nY;
@@ -326,12 +326,12 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
ScBreakType nBreak = BREAK_NONE;
ScBreakType nBreakOld = BREAK_NONE;
- BOOL bSingle;
+ sal_Bool bSingle;
Color aPageColor;
Color aManualColor;
if (bPagebreakMode)
- bPage = FALSE; // keine "normalen" Umbrueche ueber volle Breite/Hoehe
+ bPage = false; // keine "normalen" Umbrueche ueber volle Breite/Hoehe
//! um den einen Pixel sieht das Metafile (oder die Druck-Ausgabe) anders aus
//! als die Bildschirmdarstellung, aber wenigstens passen Druck und Metafile zusammen
@@ -372,7 +372,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
{
SCCOL nXplus1 = nX+1;
SCCOL nXplus2 = nX+2;
- USHORT nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth;
+ sal_uInt16 nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth;
if (nWidth)
{
nPosX += nWidth * nLayoutSign;
@@ -400,9 +400,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
}
}
- BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
+ sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- USHORT nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
+ sal_uInt16 nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
bSingle = bSingleGrid; //! in Fillinfo holen !!!!!
if ( nX<MAXCOL && !bSingle )
{
@@ -410,9 +410,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
for (nArrY=1; nArrY+1<nArrCount && !bSingle; nArrY++)
{
if (pRowInfo[nArrY].pCellInfo[nXplus2].bHOverlapped)
- bSingle = TRUE;
+ bSingle = sal_True;
if (pRowInfo[nArrY].pCellInfo[nXplus1].bHideGrid)
- bSingle = TRUE;
+ bSingle = sal_True;
}
}
@@ -431,7 +431,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
nNextY = nPosY + pThisRowInfo->nHeight;
- BOOL bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid;
+ sal_Bool bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid;
if (!bHOver)
{
if (nWidthXplus2)
@@ -509,14 +509,14 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
}
}
- BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
+ sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- BOOL bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
+ sal_Bool bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
bSingle = !bNextYisNextRow; // Hidden
for (SCCOL i=nX1; i<=nX2 && !bSingle; i++)
{
if (pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped)
- bSingle = TRUE;
+ bSingle = sal_True;
}
if (bDraw)
@@ -535,7 +535,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
nNextX = nPosX + pRowInfo[0].pCellInfo[i+1].nWidth * nLayoutSign;
if (nNextX != nPosX) // sichtbar
{
- BOOL bVOver;
+ sal_Bool bVOver;
if ( bNextYisNextRow )
bVOver = pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped;
else
@@ -569,15 +569,15 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
{
- bPagebreakMode = TRUE;
+ bPagebreakMode = sal_True;
if (!pPageData)
return; // noch nicht initialisiert -> alles "nicht gedruckt"
// gedruckten Bereich markieren
- // (in FillInfo ist schon alles auf FALSE initialisiert)
+ // (in FillInfo ist schon alles auf sal_False initialisiert)
- USHORT nRangeCount = sal::static_int_cast<USHORT>(pPageData->GetCount());
- for (USHORT nPos=0; nPos<nRangeCount; nPos++)
+ sal_uInt16 nRangeCount = sal::static_int_cast<sal_uInt16>(pPageData->GetCount());
+ for (sal_uInt16 nPos=0; nPos<nRangeCount; nPos++)
{
ScRange aRange = pPageData->GetData( nPos ).GetPrintRange();
@@ -593,7 +593,7 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
pThisRowInfo->nRowNo <= nEndY )
{
for (SCCOL nX=nStartX; nX<=nEndX; nX++)
- pThisRowInfo->pCellInfo[nX+1].bPrinted = TRUE;
+ pThisRowInfo->pCellInfo[nX+1].bPrinted = sal_True;
}
}
}
@@ -630,11 +630,11 @@ void ScOutputData::FindRotated()
if ( pPattern ) // Spalte nicht ausgeblendet
{
- BYTE nDir = pPattern->GetRotateDir( pCondSet );
+ sal_uInt8 nDir = pPattern->GetRotateDir( pCondSet );
if (nDir != SC_ROTDIR_NONE)
{
pInfo->nRotateDir = nDir;
- bAnyRotated = TRUE;
+ bAnyRotated = sal_True;
}
}
}
@@ -644,12 +644,12 @@ void ScOutputData::FindRotated()
// ----------------------------------------------------------------------------
-USHORT lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_uInt16 lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
- USHORT nRet = SC_ROTDIR_NONE;
+ sal_uInt16 nRet = SC_ROTDIR_NONE;
long nAttrRotate = pPattern->GetRotateVal( pCondSet );
if ( nAttrRotate )
@@ -684,7 +684,7 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow
const SvxBrushItem* pBackground = (const SvxBrushItem*)
&pPattern->GetItem( ATTR_BACKGROUND, pCondSet );
- USHORT nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab );
+ sal_uInt16 nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab );
// CENTER wird wie RIGHT behandelt...
if ( nDir == SC_ROTDIR_RIGHT || nDir == SC_ROTDIR_CENTER )
@@ -717,12 +717,12 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow
// ----------------------------------------------------------------------------
-BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
- SCCOL nX1, SCCOL nX2, BOOL bShowProt, BOOL bPagebreakMode )
+sal_Bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
+ SCCOL nX1, SCCOL nX2, sal_Bool bShowProt, sal_Bool bPagebreakMode )
{
if ( rFirst.bChanged != rOther.bChanged ||
rFirst.bEmptyBack != rOther.bEmptyBack )
- return FALSE;
+ return false;
SCCOL nX;
if ( bShowProt )
@@ -733,27 +733,27 @@ BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
const ScPatternAttr* pPat2 = rOther.pCellInfo[nX+1].pPatternAttr;
if ( !pPat1 || !pPat2 ||
&pPat1->GetItem(ATTR_PROTECTION) != &pPat2->GetItem(ATTR_PROTECTION) )
- return FALSE;
+ return false;
}
}
else
{
for ( nX=nX1; nX<=nX2; nX++ )
if ( rFirst.pCellInfo[nX+1].pBackground != rOther.pCellInfo[nX+1].pBackground )
- return FALSE;
+ return false;
}
if ( rFirst.nRotMaxCol != SC_ROTMAX_NONE || rOther.nRotMaxCol != SC_ROTMAX_NONE )
for ( nX=nX1; nX<=nX2; nX++ )
if ( rFirst.pCellInfo[nX+1].nRotateDir != rOther.pCellInfo[nX+1].nRotateDir )
- return FALSE;
+ return false;
if ( bPagebreakMode )
for ( nX=nX1; nX<=nX2; nX++ )
if ( rFirst.pCellInfo[nX+1].bPrinted != rOther.pCellInfo[nX+1].bPrinted )
- return FALSE;
+ return false;
- return TRUE;
+ return sal_True;
}
void ScOutputData::DrawDocumentBackground()
@@ -787,11 +787,11 @@ void ScOutputData::DrawBackground()
pDev->SetLineColor();
- BOOL bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab);
- BOOL bDoAll = bShowProt || bPagebreakMode || bSolidBackground;
+ sal_Bool bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab);
+ sal_Bool bDoAll = bShowProt || bPagebreakMode || bSolidBackground;
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor &&
+ sal_Bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
long nPosY = nScrY;
@@ -900,16 +900,16 @@ void ScOutputData::DrawBackground()
void ScOutputData::DrawShadow()
{
- DrawExtraShadow( FALSE, FALSE, FALSE, FALSE );
+ DrawExtraShadow( false, false, false, false );
}
-void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom)
+void ScOutputData::DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom)
{
pDev->SetLineColor();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
+ sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
Color aAutoTextColor;
if ( bCellContrast )
aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
@@ -926,8 +926,8 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot
long nPosY = nScrY - pRowInfo[0].nHeight;
for (SCSIZE nArrY=0; nArrY<nArrCount; nArrY++)
{
- BOOL bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount );
- BOOL bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom );
+ sal_Bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount );
+ sal_Bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom );
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
long nRowHeight = pThisRowInfo->nHeight;
@@ -937,10 +937,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot
long nPosX = nInitPosX - pRowInfo[0].pCellInfo[nX1].nWidth * nLayoutSign;
for (SCCOL nArrX=nX1; nArrX<=nX2+2; nArrX++)
{
- BOOL bCornerX = ( nArrX==nX1 || nArrX==nX2+2 );
- BOOL bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight );
+ sal_Bool bCornerX = ( nArrX==nX1 || nArrX==nX2+2 );
+ sal_Bool bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight );
- for (USHORT nPass=0; nPass<2; nPass++) // horizontal / vertikal
+ for (sal_uInt16 nPass=0; nPass<2; nPass++) // horizontal / vertikal
{
const SvxShadowItem* pAttr = nPass ?
pThisRowInfo->pCellInfo[nArrX].pVShadowOrigin :
@@ -951,10 +951,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot
pThisRowInfo->pCellInfo[nArrX].eVShadowPart :
pThisRowInfo->pCellInfo[nArrX].eHShadowPart;
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if ( (nPass==0 && bCornerX) || (nPass==1 && bCornerY) )
if ( ePart != SC_SHADOW_CORNER )
- bDo = FALSE;
+ bDo = false;
if (bDo)
{
@@ -1107,20 +1107,20 @@ long lclGetSnappedY( OutputDevice& rDev, long nPosY, bool bSnapPixel )
return (bSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY;
}
-size_t lclGetArrayColFromCellInfoX( USHORT nCellInfoX, USHORT nCellInfoFirstX, USHORT nCellInfoLastX, bool bRTL )
+size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoFirstX, sal_uInt16 nCellInfoLastX, bool bRTL )
{
return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) );
}
void ScOutputData::DrawFrame()
{
- ULONG nOldDrawMode = pDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pDev->GetDrawMode();
Color aSingleColor;
- BOOL bUseSingleColor = FALSE;
+ sal_Bool bUseSingleColor = false;
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
+ sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
// if a Calc OLE object is embedded in Draw/Impress, the VCL DrawMode is used
// for display mode / B&W printing. The VCL DrawMode handling doesn't work for lines
@@ -1131,18 +1131,18 @@ void ScOutputData::DrawFrame()
{
pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_WHITEFILL) );
aSingleColor.SetColor( COL_BLACK );
- bUseSingleColor = TRUE;
+ bUseSingleColor = sal_True;
}
else if ( ( nOldDrawMode & DRAWMODE_SETTINGSFILL ) && ( nOldDrawMode & DRAWMODE_SETTINGSLINE ) )
{
pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) );
aSingleColor = rStyleSettings.GetWindowTextColor(); // same as used in VCL for DRAWMODE_SETTINGSLINE
- bUseSingleColor = TRUE;
+ bUseSingleColor = sal_True;
}
else if ( bCellContrast )
{
aSingleColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
- bUseSingleColor = TRUE;
+ bUseSingleColor = sal_True;
}
const Color* pForceColor = bUseSingleColor ? &aSingleColor : 0;
@@ -1191,7 +1191,7 @@ void ScOutputData::DrawFrame()
// set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop
if( !bLayoutRTL )
rArray.SetXOffset( nOldSnapX );
- for( USHORT nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx )
+ for( sal_uInt16 nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx )
{
size_t nCol = lclGetArrayColFromCellInfoX( nInfoIdx, nX1, nX2, bLayoutRTL );
long nNewPosX = nOldPosX + pRowInfo[ 0 ].pCellInfo[ nInfoIdx ].nWidth * nLayoutSign;
@@ -1235,13 +1235,13 @@ void ScOutputData::DrawFrame()
// Linie unter der Zelle
const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
- SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nRotDir,
- BOOL bTopLine )
+ SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nRotDir,
+ sal_Bool bTopLine )
{
if ( nRotDir != SC_ROTDIR_LEFT && nRotDir != SC_ROTDIR_RIGHT )
return NULL;
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
while (!bFound)
{
if ( nRotDir == SC_ROTDIR_LEFT )
@@ -1265,7 +1265,7 @@ const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( !pPattern->GetRotateVal( pCondSet ) ||
((const SvxRotateModeItem&)pPattern->GetItem(
ATTR_ROTATE_MODE, pCondSet)).GetValue() == SVX_ROTATE_MODE_STANDARD )
- bFound = TRUE;
+ bFound = sal_True;
}
if (bTopLine)
@@ -1384,7 +1384,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
+ sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
// color (pForceColor) is determined externally, including DrawMode changes
@@ -1432,7 +1432,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
{
if (nX==nX1) nPosX = nInitPosX; // calculated individually for preceding positions
- USHORT nArrX = nX + 1;
+ sal_uInt16 nArrX = nX + 1;
CellInfo* pInfo = &rThisRowInfo.pCellInfo[nArrX];
long nColWidth = pRowInfo[0].pCellInfo[nArrX].nWidth;
@@ -1590,7 +1590,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
nX = nX1 > 0 ? (nX1-1) : static_cast<SCCOL>(0);
for (; nX<=nX2+1; nX++) // sichtbarer Teil +- 1
{
- USHORT nArrX = nX + 1;
+ sal_uInt16 nArrX = nX + 1;
CellInfo& rInfo = rThisRowInfo.pCellInfo[nArrX];
if ( rInfo.nRotateDir > SC_ROTDIR_STANDARD &&
!rInfo.bHOverlapped && !rInfo.bVOverlapped )
@@ -1604,17 +1604,17 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
// horizontal: angrenzende Linie verlaengern
// (nur, wenn die gedrehte Zelle eine Umrandung hat)
- USHORT nDir = rInfo.nRotateDir;
+ sal_uInt16 nDir = rInfo.nRotateDir;
if ( rArray.GetCellStyleTop( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_TOP )
{
- svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, TRUE ), nPPTY );
+ svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, sal_True ), nPPTY );
rArray.SetCellStyleTop( nCol, nRow, aStyle );
if( nRow > 0 )
rArray.SetCellStyleBottom( nCol, nRow - 1, aStyle );
}
if ( rArray.GetCellStyleBottom( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_BOTTOM )
{
- svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, FALSE ), nPPTY );
+ svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, false ), nPPTY );
rArray.SetCellStyleBottom( nCol, nRow, aStyle );
if( nRow + 1 < rArray.GetRowCount() )
rArray.SetCellStyleTop( nCol, nRow + 1, aStyle );
@@ -1659,7 +1659,7 @@ PolyPolygon ScOutputData::GetChangedArea()
aDrawingRect.Left() = nScrX;
aDrawingRect.Right() = nScrX+nScrW-1;
- BOOL bHad = FALSE;
+ sal_Bool bHad = false;
long nPosY = nScrY;
SCSIZE nArrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
@@ -1671,14 +1671,14 @@ PolyPolygon ScOutputData::GetChangedArea()
if (!bHad)
{
aDrawingRect.Top() = nPosY;
- bHad = TRUE;
+ bHad = sal_True;
}
aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1;
}
else if (bHad)
{
aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) );
- bHad = FALSE;
+ bHad = false;
}
nPosY += pRowInfo[nArrY].nHeight;
}
@@ -1689,7 +1689,7 @@ PolyPolygon ScOutputData::GetChangedArea()
return aPoly;
}
-BOOL ScOutputData::SetChangedClip()
+sal_Bool ScOutputData::SetChangedClip()
{
PolyPolygon aPoly;
@@ -1697,7 +1697,7 @@ BOOL ScOutputData::SetChangedClip()
aDrawingRect.Left() = nScrX;
aDrawingRect.Right() = nScrX+nScrW-1;
- BOOL bHad = FALSE;
+ sal_Bool bHad = false;
long nPosY = nScrY;
SCSIZE nArrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
@@ -1709,14 +1709,14 @@ BOOL ScOutputData::SetChangedClip()
if (!bHad)
{
aDrawingRect.Top() = nPosY;
- bHad = TRUE;
+ bHad = sal_True;
}
aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1;
}
else if (bHad)
{
aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) );
- bHad = FALSE;
+ bHad = false;
}
nPosY += pRowInfo[nArrY].nHeight;
}
@@ -1724,7 +1724,7 @@ BOOL ScOutputData::SetChangedClip()
if (bHad)
aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) );
- BOOL bRet = (aPoly.Count() != 0);
+ sal_Bool bRet = (aPoly.Count() != 0);
if (bRet)
pDev->SetClipRegion(Region(aPoly));
return bRet;
@@ -1735,12 +1735,12 @@ void ScOutputData::FindChanged()
SCCOL nX;
SCSIZE nArrY;
- BOOL bWasIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE );
+ sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle( sal_True );
for (nArrY=0; nArrY<nArrCount; nArrY++)
- pRowInfo[nArrY].bChanged = FALSE;
+ pRowInfo[nArrY].bChanged = false;
- BOOL bProgress = FALSE;
+ sal_Bool bProgress = false;
for (nArrY=0; nArrY<nArrCount; nArrY++)
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
@@ -1753,22 +1753,22 @@ void ScOutputData::FindChanged()
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
if ( !bProgress && pFCell->GetDirty() )
{
- ScProgress::CreateInterpretProgress( pDoc, TRUE );
- bProgress = TRUE;
+ ScProgress::CreateInterpretProgress( pDoc, sal_True );
+ bProgress = sal_True;
}
if (!pFCell->IsRunning())
{
(void)pFCell->GetValue();
if (pFCell->IsChanged())
{
- pThisRowInfo->bChanged = TRUE;
+ pThisRowInfo->bChanged = sal_True;
if ( pThisRowInfo->pCellInfo[nX+1].bMerged )
{
SCSIZE nOverY = nArrY + 1;
while ( nOverY<nArrCount &&
pRowInfo[nOverY].pCellInfo[nX+1].bVOverlapped )
{
- pRowInfo[nOverY].bChanged = TRUE;
+ pRowInfo[nOverY].bChanged = sal_True;
++nOverY;
}
}
@@ -1784,7 +1784,7 @@ void ScOutputData::FindChanged()
void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, BOOL bHandle )
+ const Color& rColor, sal_Bool bHandle )
{
PutInOrder( nRefStartX, nRefEndX );
PutInOrder( nRefStartY, nRefEndY );
@@ -1807,14 +1807,14 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
- BOOL bTop = FALSE;
- BOOL bBottom = FALSE;
- BOOL bLeft = FALSE;
- BOOL bRight = FALSE;
+ sal_Bool bTop = false;
+ sal_Bool bBottom = false;
+ sal_Bool bLeft = false;
+ sal_Bool bRight = false;
long nPosY = nScrY;
- BOOL bNoStartY = ( nY1 < nRefStartY );
- BOOL bNoEndY = FALSE;
+ sal_Bool bNoStartY = ( nY1 < nRefStartY );
+ sal_Bool bNoEndY = false;
for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
{
SCROW nY = pRowInfo[nArrY].nRowNo;
@@ -1822,17 +1822,17 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
nMinY = nPosY;
- bTop = TRUE;
+ bTop = sal_True;
}
if ( nY==nRefEndY )
{
nMaxY = nPosY + pRowInfo[nArrY].nHeight - 2;
- bBottom = TRUE;
+ bBottom = sal_True;
}
if ( nY>nRefEndY && bNoEndY )
{
nMaxY = nPosY-2;
- bBottom = TRUE;
+ bBottom = sal_True;
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
@@ -1848,12 +1848,12 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
if ( nX==nRefStartX )
{
nMinX = nPosX;
- bLeft = TRUE;
+ bLeft = sal_True;
}
if ( nX==nRefEndX )
{
nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 2 ) * nLayoutSign;
- bRight = TRUE;
+ bRight = sal_True;
}
nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign;
}
@@ -1890,7 +1890,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
SCCOL nRefEndX, SCROW nRefEndY,
- const Color& rColor, USHORT nType )
+ const Color& rColor, sal_uInt16 nType )
{
PutInOrder( nRefStartX, nRefEndX );
PutInOrder( nRefStartY, nRefEndY );
@@ -1913,14 +1913,14 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
- BOOL bTop = FALSE;
- BOOL bBottom = FALSE;
- BOOL bLeft = FALSE;
- BOOL bRight = FALSE;
+ sal_Bool bTop = false;
+ sal_Bool bBottom = false;
+ sal_Bool bLeft = false;
+ sal_Bool bRight = false;
long nPosY = nScrY;
- BOOL bNoStartY = ( nY1 < nRefStartY );
- BOOL bNoEndY = FALSE;
+ sal_Bool bNoStartY = ( nY1 < nRefStartY );
+ sal_Bool bNoEndY = false;
for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
{
SCROW nY = pRowInfo[nArrY].nRowNo;
@@ -1928,17 +1928,17 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
nMinY = nPosY - 1;
- bTop = TRUE;
+ bTop = sal_True;
}
if ( nY==nRefEndY )
{
nMaxY = nPosY + pRowInfo[nArrY].nHeight - 1;
- bBottom = TRUE;
+ bBottom = sal_True;
}
if ( nY>nRefEndY && bNoEndY )
{
nMaxY = nPosY - 1;
- bBottom = TRUE;
+ bBottom = sal_True;
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
@@ -1954,12 +1954,12 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
if ( nX==nRefStartX )
{
nMinX = nPosX - nLayoutSign;
- bLeft = TRUE;
+ bLeft = sal_True;
}
if ( nX==nRefEndX )
{
nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 1 ) * nLayoutSign;
- bRight = TRUE;
+ bRight = sal_True;
}
nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign;
}
@@ -1968,9 +1968,9 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
nMaxY >= nMinY )
{
if ( nType == SC_CAT_DELETE_ROWS )
- bLeft = bRight = bBottom = FALSE; //! dicke Linie ???
+ bLeft = bRight = bBottom = false; //! dicke Linie ???
else if ( nType == SC_CAT_DELETE_COLS )
- bTop = bBottom = bRight = FALSE; //! dicke Linie ???
+ bTop = bBottom = bRight = false; //! dicke Linie ???
pDev->SetLineColor( rColor );
if (bTop && bBottom && bLeft && bRight)
@@ -2047,7 +2047,7 @@ void ScOutputData::DrawChangeTrack()
aColorChanger.Update( *pAction );
Color aColor( aColorChanger.GetColor() );
DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(),
- aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) );
+ aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) );
}
}
@@ -2063,7 +2063,7 @@ void ScOutputData::DrawChangeTrack()
aColorChanger.Update( *pAction );
Color aColor( aColorChanger.GetColor() );
DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(),
- aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) );
+ aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) );
}
}
}
@@ -2074,7 +2074,7 @@ void ScOutputData::DrawChangeTrack()
void ScOutputData::DrawNoteMarks()
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
long nInitPosX = nScrX;
if ( bLayoutRTL )
@@ -2092,12 +2092,12 @@ void ScOutputData::DrawNoteMarks()
{
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
ScBaseCell* pCell = pInfo->pCell;
- BOOL bIsMerged = FALSE;
+ sal_Bool bIsMerged = false;
if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
// find start of merged cell
- bIsMerged = TRUE;
+ bIsMerged = sal_True;
SCROW nY = pRowInfo[nArrY].nRowNo;
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
@@ -2119,7 +2119,7 @@ void ScOutputData::DrawNoteMarks()
else
pDev->SetFillColor(COL_LIGHTRED);
- bFirst = FALSE;
+ bFirst = false;
}
long nMarkX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 4 ) * nLayoutSign;
@@ -2170,7 +2170,7 @@ void ScOutputData::AddPDFNotes()
{
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
ScBaseCell* pCell = pInfo->pCell;
- BOOL bIsMerged = FALSE;
+ sal_Bool bIsMerged = false;
SCROW nY = pRowInfo[nArrY].nRowNo;
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
@@ -2178,7 +2178,7 @@ void ScOutputData::AddPDFNotes()
if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
// find start of merged cell
- bIsMerged = TRUE;
+ bIsMerged = sal_True;
pDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab );
pCell = pDoc->GetCell( ScAddress(nMergeX,nMergeY,nTab) );
// use origin's pCell for NotePtr test below
@@ -2238,7 +2238,7 @@ void ScOutputData::DrawClipMarks()
Color aArrowFillCol( COL_LIGHTRED );
- ULONG nOldDrawMode = pDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pDev->GetDrawMode();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if ( bUseStyleColor && rStyleSettings.GetHighContrastMode() )
{
@@ -2345,14 +2345,14 @@ void ScOutputData::DrawClipMarks()
// visually left
Rectangle aMarkRect = aCellRect;
aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1;
- SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, TRUE );
+ SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, true );
}
if ( pInfo->nClipMark & ( bLayoutRTL ? SC_CLIPMARK_LEFT : SC_CLIPMARK_RIGHT ) )
{
// visually right
Rectangle aMarkRect = aCellRect;
aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1;
- SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, FALSE );
+ SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, false );
}
}
nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index e37b897b89d9..35e6d78b0191 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -86,7 +86,7 @@
#define DRAWTEXT_MAX 32767
-const USHORT SC_SHRINKAGAIN_MAX = 7;
+const sal_uInt16 SC_SHRINKAGAIN_MAX = 7;
// STATIC DATA -----------------------------------------------------------
@@ -109,8 +109,8 @@ class ScDrawStringsVars
SvxCellJustifyMethod eAttrHorJustMethod;
SvxCellJustifyMethod eAttrVerJustMethod;
const SvxMarginItem* pMargin;
- USHORT nIndent;
- BOOL bRotated;
+ sal_uInt16 nIndent;
+ sal_Bool bRotated;
String aString; // Inhalte
Size aTextSize;
@@ -121,28 +121,28 @@ class ScDrawStringsVars
long nExpWidth;
ScBaseCell* pLastCell;
- ULONG nValueFormat;
- BOOL bLineBreak;
- BOOL bRepeat;
- BOOL bShrink;
+ sal_uLong nValueFormat;
+ sal_Bool bLineBreak;
+ sal_Bool bRepeat;
+ sal_Bool bShrink;
- BOOL bPixelToLogic;
- BOOL bCellContrast;
+ sal_Bool bPixelToLogic;
+ sal_Bool bCellContrast;
Color aBackConfigColor; // used for ScPatternAttr::GetFont calls
Color aTextConfigColor;
public:
- ScDrawStringsVars(ScOutputData* pData, BOOL bPTL);
+ ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL);
~ScDrawStringsVars();
// SetPattern = ex-SetVars
// SetPatternSimple: ohne Font
- void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, BYTE nScript );
+ void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, sal_uInt8 nScript );
void SetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* pSet );
- BOOL SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen
+ sal_Bool SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen
void SetHashText();
void SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth );
void SetAutoText( const String& rAutoText );
@@ -155,26 +155,26 @@ public:
SvxCellJustifyMethod GetVerJustMethod() const { return eAttrVerJustMethod; }
const SvxMarginItem* GetMargin() const { return pMargin; }
- USHORT GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; }
+ sal_uInt16 GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; }
const String& GetString() const { return aString; }
const Size& GetTextSize() const { return aTextSize; }
long GetOriginalWidth() const { return nOriginalWidth; }
- ULONG GetValueFormat() const { return nValueFormat; }
- BOOL GetLineBreak() const { return bLineBreak; }
- BOOL IsRepeat() const { return bRepeat; }
- BOOL IsShrink() const { return bShrink; }
+ sal_uLong GetValueFormat() const { return nValueFormat; }
+ sal_Bool GetLineBreak() const { return bLineBreak; }
+ sal_Bool IsRepeat() const { return bRepeat; }
+ sal_Bool IsShrink() const { return bShrink; }
long GetAscent() const { return nAscentPixel; }
- BOOL IsRotated() const { return bRotated; }
+ sal_Bool IsRotated() const { return bRotated; }
- void SetShrinkScale( long nScale, BYTE nScript );
+ void SetShrinkScale( long nScale, sal_uInt8 nScript );
- BOOL HasCondHeight() const { return pCondSet && SFX_ITEM_SET ==
- pCondSet->GetItemState( ATTR_FONT_HEIGHT, TRUE ); }
+ sal_Bool HasCondHeight() const { return pCondSet && SFX_ITEM_SET ==
+ pCondSet->GetItemState( ATTR_FONT_HEIGHT, sal_True ); }
- BOOL HasEditCharacters() const;
+ sal_Bool HasEditCharacters() const;
private:
long GetMaxDigitWidth(); // in logic units
@@ -186,7 +186,7 @@ private:
//==================================================================
-ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
+ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL) :
pOutput ( pData ),
pPattern ( NULL ),
pCondSet ( NULL ),
@@ -198,7 +198,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
eAttrVerJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
pMargin ( NULL ),
nIndent ( 0 ),
- bRotated ( FALSE ),
+ bRotated ( false ),
nOriginalWidth( 0 ),
nMaxDigitWidth( 0 ),
nSignWidth( 0 ),
@@ -206,9 +206,9 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
nExpWidth( 0 ),
pLastCell ( NULL ),
nValueFormat( 0 ),
- bLineBreak ( FALSE ),
- bRepeat ( FALSE ),
- bShrink ( FALSE ),
+ bLineBreak ( false ),
+ bRepeat ( false ),
+ bShrink ( false ),
bPixelToLogic( bPTL )
{
ScModule* pScMod = SC_MOD();
@@ -225,7 +225,7 @@ ScDrawStringsVars::~ScDrawStringsVars()
{
}
-void ScDrawStringsVars::SetShrinkScale( long nScale, BYTE nScript )
+void ScDrawStringsVars::SetShrinkScale( long nScale, sal_uInt8 nScript )
{
// text remains valid, size is updated
@@ -270,13 +270,13 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, BYTE nScript )
namespace {
template<typename _ItemType, typename _EnumType>
-_EnumType lcl_GetValue(const ScPatternAttr& rPattern, USHORT nWhich, const SfxItemSet* pCondSet)
+_EnumType lcl_GetValue(const ScPatternAttr& rPattern, sal_uInt16 nWhich, const SfxItemSet* pCondSet)
{
const _ItemType& rItem = static_cast<const _ItemType&>(rPattern.GetItem(nWhich, pCondSet));
return static_cast<_EnumType>(rItem.GetValue());
}
-bool lcl_GetBoolValue(const ScPatternAttr& rPattern, USHORT nWhich, const SfxItemSet* pCondSet)
+bool lcl_GetBoolValue(const ScPatternAttr& rPattern, sal_uInt16 nWhich, const SfxItemSet* pCondSet)
{
return lcl_GetValue<SfxBoolItem, bool>(rPattern, nWhich, pCondSet);
}
@@ -284,7 +284,7 @@ bool lcl_GetBoolValue(const ScPatternAttr& rPattern, USHORT nWhich, const SfxIte
}
void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet,
- ScBaseCell* pCell, BYTE nScript )
+ ScBaseCell* pCell, sal_uInt8 nScript )
{
nMaxDigitWidth = 0;
nSignWidth = 0;
@@ -365,20 +365,20 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
break;
case SVX_ORIENTATION_STACKED:
nRot = 0;
- bRotated = FALSE;
+ bRotated = false;
break;
case SVX_ORIENTATION_TOPBOTTOM:
nRot = 2700;
- bRotated = FALSE;
+ bRotated = false;
break;
case SVX_ORIENTATION_BOTTOMTOP:
nRot = 900;
- bRotated = FALSE;
+ bRotated = false;
break;
default:
OSL_FAIL("Falscher SvxCellOrientation Wert");
nRot = 0;
- bRotated = FALSE;
+ bRotated = false;
break;
}
aFont.SetOrientation( nRot );
@@ -453,12 +453,12 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
// Zahlenformat
- ULONG nOld = nValueFormat;
+ sal_uLong nOld = nValueFormat;
const SfxPoolItem* pFormItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,TRUE,&pFormItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,sal_True,&pFormItem) != SFX_ITEM_SET )
pFormItem = &pPattern->GetItem(ATTR_VALUE_FORMAT);
const SfxPoolItem* pLangItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,TRUE,&pLangItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,sal_True,&pLangItem) != SFX_ITEM_SET )
pLangItem = &pPattern->GetItem(ATTR_LANGUAGE_FORMAT);
nValueFormat = pOutput->pDoc->GetFormatTable()->GetFormatForLanguageIfBuiltIn(
((SfxUInt32Item*)pFormItem)->GetValue(),
@@ -481,16 +481,16 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
bShrink = static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue();
}
-inline BOOL SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0
+inline sal_Bool SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0
{
return pOldCell && pOldCell->GetCellType() == CELLTYPE_VALUE &&
pCell->GetCellType() == CELLTYPE_VALUE &&
((ScValueCell*)pCell)->GetValue() == ((ScValueCell*)pOldCell)->GetValue();
}
-BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
+sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
if (pCell)
{
@@ -499,7 +499,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
pLastCell = pCell; // Zelle merken
Color* pColor;
- ULONG nFormat = GetValueFormat();
+ sal_uLong nFormat = GetValueFormat();
ScCellFormat::GetString( pCell,
nFormat, aString, &pColor,
*pOutput->pDoc->GetFormatTable(),
@@ -515,7 +515,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
OutputDevice* pDev = pOutput->pDev;
aFont.SetColor(*pColor);
pDev->SetFont( aFont ); // nur fuer Ausgabe
- bChanged = TRUE;
+ bChanged = sal_True;
pLastCell = NULL; // naechstes Mal wieder hierherkommen
}
@@ -566,7 +566,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
return;
}
- ULONG nFormat = GetValueFormat();
+ sal_uLong nFormat = GetValueFormat();
if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
{
// Not 'General' number format. Set hash text and bail out.
@@ -734,7 +734,7 @@ void ScDrawStringsVars::TextChanged()
aTextSize = pRefDevice->LogicToPixel( aTextSize );
}
-BOOL ScDrawStringsVars::HasEditCharacters() const
+sal_Bool ScDrawStringsVars::HasEditCharacters() const
{
static const sal_Unicode pChars[] =
{
@@ -857,13 +857,13 @@ void ScOutputData::SetEditSyntaxColor( EditEngine& rEngine, ScBaseCell* pCell )
}
}
-BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
+sal_Bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
SCCOL& rOverX, SCROW& rOverY,
- BOOL bVisRowChanged )
+ sal_Bool bVisRowChanged )
{
- BOOL bDoMerge = FALSE;
- BOOL bIsLeft = ( nX == nVisX1 );
- BOOL bIsTop = ( nY == nVisY1 ) || bVisRowChanged;
+ sal_Bool bDoMerge = false;
+ sal_Bool bIsLeft = ( nX == nVisX1 );
+ sal_Bool bIsTop = ( nY == nVisY1 ) || bVisRowChanged;
CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nX+1];
if ( pInfo->bHOverlapped && pInfo->bVOverlapped )
@@ -875,16 +875,16 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
rOverX = nX;
rOverY = nY;
- BOOL bHOver = pInfo->bHOverlapped;
- BOOL bVOver = pInfo->bVOverlapped;
- BOOL bHidden;
+ sal_Bool bHOver = pInfo->bHOverlapped;
+ sal_Bool bVOver = pInfo->bVOverlapped;
+ sal_Bool bHidden;
while (bHOver) // nY konstant
{
--rOverX;
bHidden = pDoc->ColHidden(rOverX, nTab);
if ( !bDoMerge && !bHidden )
- return FALSE;
+ return false;
if (rOverX >= nX1 && !bHidden)
{
@@ -893,7 +893,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
@@ -905,7 +905,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
--rOverY;
bHidden = pDoc->RowHidden(rOverY, nTab);
if ( !bDoMerge && !bHidden )
- return FALSE;
+ return false;
if (nArrY>0)
--nArrY; // lokale Kopie !
@@ -920,122 +920,122 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
}
}
- return TRUE;
+ return sal_True;
}
-inline BOOL StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern )
+inline sal_Bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern )
{
DBG_ASSERT( rpNewPattern, "pNewPattern" );
if ( rpNewPattern == rpOldPattern )
- return FALSE;
+ return false;
else if ( !rpOldPattern )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT ) != &rpOldPattern->GetItem( ATTR_FONT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_HEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_WEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_FONT_POSTURE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_POSTURE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_POSTURE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_UNDERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_UNDERLINE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_OVERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_OVERLINE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_WORDLINE ) != &rpOldPattern->GetItem( ATTR_FONT_WORDLINE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_CROSSEDOUT ) != &rpOldPattern->GetItem( ATTR_FONT_CROSSEDOUT ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_CONTOUR ) != &rpOldPattern->GetItem( ATTR_FONT_CONTOUR ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_SHADOWED ) != &rpOldPattern->GetItem( ATTR_FONT_SHADOWED ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_COLOR ) != &rpOldPattern->GetItem( ATTR_FONT_COLOR ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) )
- return TRUE;
+ return true;
else if ( &rpNewPattern->GetItem( ATTR_STACKED ) != &rpOldPattern->GetItem( ATTR_STACKED ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_LINEBREAK ) != &rpOldPattern->GetItem( ATTR_LINEBREAK ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_MARGIN ) != &rpOldPattern->GetItem( ATTR_MARGIN ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_ROTATE_VALUE ) != &rpOldPattern->GetItem( ATTR_ROTATE_VALUE ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FORBIDDEN_RULES ) != &rpOldPattern->GetItem( ATTR_FORBIDDEN_RULES ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_EMPHASISMARK ) != &rpOldPattern->GetItem( ATTR_FONT_EMPHASISMARK ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_FONT_RELIEF ) != &rpOldPattern->GetItem( ATTR_FONT_RELIEF ) )
- return TRUE;
+ return sal_True;
else if ( &rpNewPattern->GetItem( ATTR_BACKGROUND ) != &rpOldPattern->GetItem( ATTR_BACKGROUND ) )
- return TRUE; // needed with automatic text color
+ return sal_True; // needed with automatic text color
else
{
rpOldPattern = rpNewPattern;
- return FALSE;
+ return false;
}
}
-inline void lcl_CreateInterpretProgress( BOOL& bProgress, ScDocument* pDoc,
+inline void lcl_CreateInterpretProgress( sal_Bool& bProgress, ScDocument* pDoc,
ScFormulaCell* pFCell )
{
if ( !bProgress && pFCell->GetDirty() )
{
- ScProgress::CreateInterpretProgress( pDoc, TRUE );
- bProgress = TRUE;
+ ScProgress::CreateInterpretProgress( pDoc, sal_True );
+ bProgress = sal_True;
}
}
-inline BYTE GetScriptType( ScDocument* pDoc, ScBaseCell* pCell,
+inline sal_uInt8 GetScriptType( ScDocument* pDoc, ScBaseCell* pCell,
const ScPatternAttr* pPattern,
const SfxItemSet* pCondSet )
{
return pDoc->GetCellScriptType( pCell, pPattern->GetNumberFormat( pDoc->GetFormatTable(), pCondSet ) );
}
-inline BOOL IsAmbiguousScript( BYTE nScript )
+inline sal_Bool IsAmbiguousScript( sal_uInt8 nScript )
{
return ( nScript != SCRIPTTYPE_LATIN &&
nScript != SCRIPTTYPE_ASIAN &&
nScript != SCRIPTTYPE_COMPLEX );
}
-BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
+sal_Bool ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
{
// pThisRowInfo may be NULL
- BOOL bEmpty;
+ sal_Bool bEmpty;
if ( pThisRowInfo && nX <= nX2 )
bEmpty = pThisRowInfo->pCellInfo[nX+1].bEmptyCellText;
else
@@ -1046,23 +1046,23 @@ BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
// for the range nX1..nX2 in RowInfo, cell protection attribute is already evaluated
// into bEmptyCellText in ScDocument::FillInfo / lcl_HidePrint (printfun)
- BOOL bIsPrint = ( eType == OUTTYPE_PRINTER );
+ sal_Bool bIsPrint = ( eType == OUTTYPE_PRINTER );
if ( bIsPrint || bTabProtected )
{
const ScProtectionAttr* pAttr = (const ScProtectionAttr*)
pDoc->GetEffItem( nX, nY, nTab, ATTR_PROTECTION );
if ( bIsPrint && pAttr->GetHidePrint() )
- bEmpty = TRUE;
+ bEmpty = sal_True;
else if ( bTabProtected )
{
if ( pAttr->GetHideCell() )
- bEmpty = TRUE;
+ bEmpty = sal_True;
else if ( bShowFormulas && pAttr->GetHideFormula() )
{
ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) );
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
}
}
@@ -1077,7 +1077,7 @@ void ScOutputData::GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTabP, ScBaseCe
rpCell = NULL;
}
-BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
+sal_Bool ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
{
// apply the same logic here as in DrawStrings/DrawEdit:
// Stop at non-empty or merged or overlapped cell,
@@ -1086,17 +1086,17 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
const ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) );
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE && !IsEmptyCellText( NULL, nX, nY ) )
{
- return FALSE;
+ return false;
}
const ScPatternAttr* pPattern = pDoc->GetPattern( nX, nY, nTab );
if ( ((const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE)).IsMerged() ||
((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).IsOverlapped() )
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return sal_True;
}
// nX, nArrY: loop variables from DrawStrings / DrawEdit
@@ -1113,7 +1113,7 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
SCCOL nCellX, SCROW nCellY, long nNeeded,
const ScPatternAttr& rPattern,
- USHORT nHorJustify, bool bCellIsValue,
+ sal_uInt16 nHorJustify, bool bCellIsValue,
bool bBreak, bool bOverwrite,
OutputAreaParam& rParam )
{
@@ -1155,7 +1155,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
}
else
{
- USHORT nDocHeight = pDoc->GetRowHeight( nCompRow, nTab );
+ sal_uInt16 nDocHeight = pDoc->GetRowHeight( nCompRow, nTab );
if ( nDocHeight )
nCellPosY += (long) ( nDocHeight * nPPTY );
++nCompRow;
@@ -1164,7 +1164,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
nCellPosY -= (long) pDoc->GetScaledRowHeight( nCellY, nCompRow-1, nTab, nPPTY );
const ScMergeAttr* pMerge = (const ScMergeAttr*)&rPattern.GetItem( ATTR_MERGE );
- BOOL bMerged = pMerge->IsMerged();
+ sal_Bool bMerged = pMerge->IsMerged();
long nMergeCols = pMerge->GetColMerge();
if ( nMergeCols == 0 )
nMergeCols = 1;
@@ -1254,13 +1254,13 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rParam.maClipRect.Right() += nAdd * nLayoutSign;
if ( rThisRowInfo.nRowNo == nCellY && nRightX >= nX1 && nRightX <= nX2 )
- rThisRowInfo.pCellInfo[nRightX].bHideGrid = TRUE;
+ rThisRowInfo.pCellInfo[nRightX].bHideGrid = sal_True;
}
while ( nLeftMissing > 0 && nLeftX > 0 && ( bOverwrite || IsAvailable( nLeftX-1, nCellY ) ) )
{
if ( rThisRowInfo.nRowNo == nCellY && nLeftX >= nX1 && nLeftX <= nX2 )
- rThisRowInfo.pCellInfo[nLeftX].bHideGrid = TRUE;
+ rThisRowInfo.pCellInfo[nLeftX].bHideGrid = sal_True;
--nLeftX;
long nAdd = (long) ( pDoc->GetColWidth( nLeftX, nTab ) * nPPTX );
@@ -1274,14 +1274,14 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
if ( nRightMissing > 0 && bMarkClipped && nRightX >= nX1 && nRightX <= nX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.pCellInfo[nRightX+1].nClipMark |= SC_CLIPMARK_RIGHT;
- bAnyClipped = TRUE;
+ bAnyClipped = sal_True;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
rParam.maClipRect.Right() -= nMarkPixel * nLayoutSign;
}
if ( nLeftMissing > 0 && bMarkClipped && nLeftX >= nX1 && nLeftX <= nX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.pCellInfo[nLeftX+1].nClipMark |= SC_CLIPMARK_LEFT;
- bAnyClipped = TRUE;
+ bAnyClipped = sal_True;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
rParam.maClipRect.Left() += nMarkPixel * nLayoutSign;
}
@@ -1291,7 +1291,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
}
else
{
- rParam.mbLeftClip = rParam.mbRightClip = FALSE;
+ rParam.mbLeftClip = rParam.mbRightClip = false;
// leave space for AutoFilter on screen
// (for automatic line break: only if not formatting for printer, as in ScColumn::GetNeededSize)
@@ -1302,7 +1302,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
{
// filter drop-down width is now independent from row height
const long nFilter = DROPDOWN_BITMAP_SIZE;
- BOOL bFit = ( nNeeded + nFilter <= nMergeSizeX );
+ sal_Bool bFit = ( nNeeded + nFilter <= nMergeSizeX );
if ( bFit || bCellIsValue )
{
// content fits even in the remaining area without the filter button
@@ -1315,7 +1315,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
// -> set clip flags, so "###" replacement is used (but also within the smaller area)
if ( !bFit )
- rParam.mbLeftClip = rParam.mbRightClip = TRUE;
+ rParam.mbLeftClip = rParam.mbRightClip = sal_True;
}
}
}
@@ -1326,7 +1326,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rParam.maClipRect.Justify();
}
-void ScOutputData::DrawStrings( BOOL bPixelToLogic )
+void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
{
DBG_ASSERT( pDev == pRefDevice ||
pDev->GetMapMode().GetMapUnit() == pRefDevice->GetMapMode().GetMapUnit(),
@@ -1334,12 +1334,12 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
- BOOL bWasIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE );
+ sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle( true );
ScDrawStringsVars aVars( this, bPixelToLogic );
- BOOL bProgress = FALSE;
+ sal_Bool bProgress = false;
long nInitPosX = nScrX;
if ( bLayoutRTL )
@@ -1356,14 +1356,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// variables for GetOutputArea
OutputAreaParam aAreaParam;
- BOOL bCellIsValue = FALSE;
+ sal_Bool bCellIsValue = false;
long nNeededWidth = 0;
SvxCellHorJustify eOutHorJust = SVX_HOR_JUSTIFY_STANDARD;
const ScPatternAttr* pPattern = NULL;
const SfxItemSet* pCondSet = NULL;
const ScPatternAttr* pOldPattern = NULL;
const SfxItemSet* pOldCondSet = NULL;
- BYTE nOldScript = 0;
+ sal_uInt8 nOldScript = 0;
// alternative pattern instances in case we need to modify the pattern
// before processing the cell value.
@@ -1381,35 +1381,35 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
nPosX -= pRowInfo[0].pCellInfo[nLoopStartX+1].nWidth * nLayoutSign;
for (SCCOL nX=nLoopStartX; nX<=nX2; nX++)
{
- BOOL bMergeEmpty = FALSE;
+ sal_Bool bMergeEmpty = false;
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
- BOOL bEmpty = nX < nX1 || pInfo->bEmptyCellText;
+ sal_Bool bEmpty = nX < nX1 || pInfo->bEmptyCellText;
SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
- BOOL bDoCell = FALSE;
- BOOL bNeedEdit = FALSE;
+ sal_Bool bDoCell = false;
+ sal_Bool bNeedEdit = false;
//
// Part of a merged cell?
//
- BOOL bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped );
+ sal_Bool bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped );
if ( bOverlapped )
{
- bEmpty = TRUE;
+ bEmpty = sal_True;
SCCOL nOverX; // start of the merged cells
SCROW nOverY;
- BOOL bVisChanged = !pRowInfo[nArrY-1].bChanged;
+ sal_Bool bVisChanged = !pRowInfo[nArrY-1].bChanged;
if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged ))
{
nCellX = nOverX;
nCellY = nOverY;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
else
- bMergeEmpty = TRUE;
+ bMergeEmpty = sal_True;
}
//
@@ -1427,7 +1427,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
!pDoc->HasAttrib( nTempX,nY,nTab, nX1,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
nCellX = nTempX;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
@@ -1448,7 +1448,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
!pDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
nCellX = nTempX;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
@@ -1457,14 +1457,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
//
if (!bEmpty)
- bDoCell = TRUE;
+ bDoCell = sal_True;
//
// don't output the cell that's being edited
//
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
- bDoCell = FALSE;
+ bDoCell = false;
//
// output the cell text
@@ -1478,9 +1478,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
else
GetVisibleCell( nCellX, nCellY, nTab, pCell ); // get from document
if ( !pCell )
- bDoCell = FALSE;
+ bDoCell = false;
else if ( pCell->GetCellType() == CELLTYPE_EDIT )
- bNeedEdit = TRUE;
+ bNeedEdit = sal_True;
}
if (bDoCell && !bNeedEdit)
{
@@ -1516,7 +1516,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
pPattern = pAltPattern;
}
- BYTE nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet );
+ sal_uInt8 nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet );
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
if ( pPattern != pOldPattern || pCondSet != pOldCondSet ||
nScript != nOldScript || bSyntaxMode )
@@ -1534,11 +1534,11 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// use edit engine for rotated, stacked or mixed-script text
if ( aVars.GetOrient() == SVX_ORIENTATION_STACKED ||
aVars.IsRotated() || IsAmbiguousScript(nScript) )
- bNeedEdit = TRUE;
+ bNeedEdit = sal_True;
}
if (bDoCell && !bNeedEdit)
{
- BOOL bFormulaCell = (pCell->GetCellType() == CELLTYPE_FORMULA );
+ sal_Bool bFormulaCell = (pCell->GetCellType() == CELLTYPE_FORMULA );
if ( bFormulaCell )
lcl_CreateInterpretProgress( bProgress, pDoc, (ScFormulaCell*)pCell );
if ( aVars.SetText(pCell) )
@@ -1564,9 +1564,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( eOutHorJust == SVX_HOR_JUSTIFY_BLOCK || eOutHorJust == SVX_HOR_JUSTIFY_REPEAT )
eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented
- BOOL bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK );
- BOOL bRepeat = aVars.IsRepeat() && !bBreak;
- BOOL bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
+ sal_Bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK );
+ sal_Bool bRepeat = aVars.IsRepeat() && !bBreak;
+ sal_Bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
nTotalMargin =
static_cast<long>(aVars.GetLeftTotal() * nPPTX) +
@@ -1576,8 +1576,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// GetOutputArea gives justfied rectangles
GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
- bCellIsValue || bRepeat || bShrink, bBreak, FALSE,
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
+ bCellIsValue || bRepeat || bShrink, bBreak, false,
aAreaParam );
if ( bShrink )
@@ -1586,7 +1586,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
{
// Only horizontal scaling is handled here.
// DrawEdit is used to vertically scale 90 deg rotated text.
- bNeedEdit = TRUE;
+ bNeedEdit = sal_True;
}
else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal
{
@@ -1600,7 +1600,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
aVars.SetShrinkScale( nScale, nOldScript );
long nNewSize = aVars.GetTextSize().Width();
- USHORT nShrinkAgain = 0;
+ sal_uInt16 nShrinkAgain = 0;
while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
// If the text is still too large, reduce the scale again by 10%, until it fits,
@@ -1614,7 +1614,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// If even at half the size the font still isn't rendered smaller,
// fall back to normal clipping (showing ### for numbers).
if ( nNewSize <= nAvailable )
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE;
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
pOldPattern = NULL;
}
@@ -1670,8 +1670,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
// right are handled by the flag for nX2
SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2;
RowInfo* pMarkRowInfo = ( nCellY == nY ) ? pThisRowInfo : &pRowInfo[0];
- pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = TRUE;
- bDoCell = FALSE; // don't draw here
+ pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = sal_True;
+ bDoCell = false; // don't draw here
}
if ( bDoCell )
{
@@ -1687,7 +1687,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
(long) ( aVars.GetLeftTotal() * nPPTX ) +
(long) ( aVars.GetMargin()->GetRightMargin() * nPPTX );
if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() )
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE;
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
// If the "###" replacement doesn't fit into the cells, no clip marks
// are shown, as the "###" already denotes too little space.
@@ -1699,38 +1699,38 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
long nAvailWidth = aAreaParam.maAlignRect.GetWidth();
long nOutHeight = aAreaParam.maAlignRect.GetHeight();
- BOOL bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
+ sal_Bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
if ( aAreaParam.maClipRect.Left() < nScrX )
{
aAreaParam.maClipRect.Left() = nScrX;
- aAreaParam.mbLeftClip = TRUE;
+ aAreaParam.mbLeftClip = sal_True;
}
if ( aAreaParam.maClipRect.Right() > nScrX + nScrW )
{
aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
- aAreaParam.mbRightClip = TRUE;
+ aAreaParam.mbRightClip = sal_True;
}
- BOOL bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
- BOOL bVClip = FALSE;
+ sal_Bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
+ sal_Bool bVClip = false;
if ( aAreaParam.maClipRect.Top() < nScrY )
{
aAreaParam.maClipRect.Top() = nScrY;
- bVClip = TRUE;
+ bVClip = sal_True;
}
if ( aAreaParam.maClipRect.Bottom() > nScrY + nScrH )
{
aAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one?
- bVClip = TRUE;
+ bVClip = sal_True;
}
//
// horizontalen Platz testen
//
- BOOL bRightAdjusted = FALSE; // to correct text width calculation later
- BOOL bNeedEditEngine = FALSE;
+ sal_Bool bRightAdjusted = false; // to correct text width calculation later
+ sal_Bool bNeedEditEngine = false;
if ( !bNeedEditEngine && !bOutside )
{
switch (eOutHorJust)
@@ -1741,7 +1741,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
case SVX_HOR_JUSTIFY_RIGHT:
nJustPosX += nAvailWidth - aVars.GetTextSize().Width() -
(long) ( aVars.GetMargin()->GetRightMargin() * nPPTX );
- bRightAdjusted = TRUE;
+ bRightAdjusted = sal_True;
break;
case SVX_HOR_JUSTIFY_CENTER:
nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() +
@@ -1794,7 +1794,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( eType != OUTTYPE_PRINTER ||
( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
( aVars.HasCondHeight() ) )
- bVClip = TRUE;
+ bVClip = sal_True;
}
if ( bHClip || bVClip )
@@ -1898,7 +1898,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
// PDF: whole-cell hyperlink from formula?
- BOOL bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
+ sal_Bool bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell();
if ( bHasURL )
{
@@ -1921,7 +1921,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute
{
- rEngine.SetUpdateMode( FALSE );
+ rEngine.SetUpdateMode( false );
rEngine.SetText(EMPTY_STRING);
// keine Para-Attribute uebrigbehalten...
@@ -1931,22 +1931,22 @@ void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute
SfxItemSet( *rPara.GetPool(), rPara.GetRanges() ) );
}
-BOOL lcl_SafeIsValue( ScBaseCell* pCell )
+sal_Bool lcl_SafeIsValue( ScBaseCell* pCell )
{
if (!pCell)
- return FALSE;
+ return false;
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
switch ( pCell->GetCellType() )
{
case CELLTYPE_VALUE:
- bRet = TRUE;
+ bRet = sal_True;
break;
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
if ( pFCell->IsRunning() || pFCell->IsValue() )
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -1959,21 +1959,21 @@ BOOL lcl_SafeIsValue( ScBaseCell* pCell )
void lcl_ScaleFonts( EditEngine& rEngine, long nPercent )
{
- BOOL bUpdateMode = rEngine.GetUpdateMode();
+ sal_Bool bUpdateMode = rEngine.GetUpdateMode();
if ( bUpdateMode )
- rEngine.SetUpdateMode( FALSE );
+ rEngine.SetUpdateMode( false );
- USHORT nParCount = rEngine.GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
SvUShorts aPortions;
rEngine.GetPortions( nPar, aPortions );
- USHORT nPCount = aPortions.Count();
- USHORT nStart = 0;
- for ( USHORT nPos=0; nPos<nPCount; nPos++ )
+ sal_uInt16 nPCount = aPortions.Count();
+ sal_uInt16 nStart = 0;
+ for ( sal_uInt16 nPos=0; nPos<nPCount; nPos++ )
{
- USHORT nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
ESelection aSel( nPar, nStart, nPar, nEnd );
SfxItemSet aAttribs = rEngine.GetAttribs( aSel );
@@ -1996,10 +1996,10 @@ void lcl_ScaleFonts( EditEngine& rEngine, long nPercent )
}
if ( bUpdateMode )
- rEngine.SetUpdateMode( TRUE );
+ rEngine.SetUpdateMode( sal_True );
}
-long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRotate )
+long lcl_GetEditSize( EditEngine& rEngine, sal_Bool bWidth, sal_Bool bSwap, long nAttrRotate )
{
if ( bSwap )
bWidth = !bWidth;
@@ -2028,7 +2028,7 @@ long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRo
void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect,
long nLeftM, long nTopM, long nRightM, long nBottomM,
- BOOL bWidth, USHORT nOrient, long nAttrRotate, BOOL bPixelToLogic,
+ sal_Bool bWidth, sal_uInt16 nOrient, long nAttrRotate, sal_Bool bPixelToLogic,
long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip )
{
if ( !bWidth )
@@ -2043,28 +2043,28 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlig
if ( nScaleSize <= rAlignRect.GetHeight() )
return;
- BOOL bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP );
+ sal_Bool bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP );
long nAvailable = rAlignRect.GetHeight() - nTopM - nBottomM;
long nScale = ( nAvailable * 100 ) / nScaleSize;
lcl_ScaleFonts( rEngine, nScale );
- rEngineHeight = lcl_GetEditSize( rEngine, FALSE, bSwap, nAttrRotate );
+ rEngineHeight = lcl_GetEditSize( rEngine, false, bSwap, nAttrRotate );
long nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(0,rEngineHeight)).Height() : rEngineHeight;
- USHORT nShrinkAgain = 0;
+ sal_uInt16 nShrinkAgain = 0;
while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
// further reduce, like in DrawStrings
lcl_ScaleFonts( rEngine, 90 ); // reduce by 10%
- rEngineHeight = lcl_GetEditSize( rEngine, FALSE, bSwap, nAttrRotate );
+ rEngineHeight = lcl_GetEditSize( rEngine, false, bSwap, nAttrRotate );
nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(0,rEngineHeight)).Height() : rEngineHeight;
++nShrinkAgain;
}
// sizes for further processing (alignment etc):
- rEngineWidth = lcl_GetEditSize( rEngine, TRUE, bSwap, nAttrRotate );
+ rEngineWidth = lcl_GetEditSize( rEngine, sal_True, bSwap, nAttrRotate );
long nPixelWidth = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth;
rNeededPixel = nPixelWidth + nLeftM + nRightM;
@@ -2082,26 +2082,26 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlig
long nScale = ( nAvailable * 100 ) / nScaleSize;
lcl_ScaleFonts( rEngine, nScale );
- rEngineWidth = lcl_GetEditSize( rEngine, TRUE, FALSE, nAttrRotate );
+ rEngineWidth = lcl_GetEditSize( rEngine, sal_True, false, nAttrRotate );
long nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth;
- USHORT nShrinkAgain = 0;
+ sal_uInt16 nShrinkAgain = 0;
while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
// further reduce, like in DrawStrings
lcl_ScaleFonts( rEngine, 90 ); // reduce by 10%
- rEngineWidth = lcl_GetEditSize( rEngine, TRUE, FALSE, nAttrRotate );
+ rEngineWidth = lcl_GetEditSize( rEngine, sal_True, false, nAttrRotate );
nNewSize = bPixelToLogic ?
pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth;
++nShrinkAgain;
}
if ( nNewSize <= nAvailable )
- rLeftClip = rRightClip = FALSE;
+ rLeftClip = rRightClip = false;
// sizes for further processing (alignment etc):
rNeededPixel = nNewSize + nLeftM + nRightM;
- rEngineHeight = lcl_GetEditSize( rEngine, FALSE, FALSE, nAttrRotate );
+ rEngineHeight = lcl_GetEditSize( rEngine, false, false, nAttrRotate );
}
}
@@ -2159,9 +2159,9 @@ void EditAlignmentParam::calcMargins(long& rTopM, long& rLeftM, long& rBottomM,
const SvxMarginItem& rMargin =
static_cast<const SvxMarginItem&>(mpPattern->GetItem(ATTR_MARGIN, mpCondSet));
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if (meHorJust == SVX_HOR_JUSTIFY_LEFT)
- nIndent = lcl_GetValue<SfxUInt16Item, USHORT>(*mpPattern, ATTR_INDENT, mpCondSet);
+ nIndent = lcl_GetValue<SfxUInt16Item, sal_uInt16>(*mpPattern, ATTR_INDENT, mpCondSet);
rLeftM = static_cast<long>(((rMargin.GetLeftMargin() + nIndent) * nPPTX));
rTopM = static_cast<long>((rMargin.GetTopMargin() * nPPTY));
@@ -2363,18 +2363,18 @@ bool EditAlignmentParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
}
-void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+void ScOutputData::DrawEdit(sal_Bool bPixelToLogic)
{
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
ScModule* pScMod = SC_MOD();
sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor &&
+ sal_Bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ScFieldEditEngine* pEngine = NULL;
- BOOL bHyphenatorSet = FALSE;
+ sal_Bool bHyphenatorSet = false;
const ScPatternAttr* pOldPattern = NULL;
const SfxItemSet* pOldCondSet = NULL;
ScBaseCell* pCell = NULL;
@@ -2415,7 +2415,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
- BOOL bDoCell = FALSE;
+ sal_Bool bDoCell = false;
long nPosY = nRowPosY;
if ( nArrY == 0 )
@@ -2424,11 +2424,11 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
nY = pRowInfo[1].nRowNo;
SCCOL nOverX; // start of the merged cells
SCROW nOverY;
- if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, TRUE ))
+ if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, sal_True ))
{
nCellX = nOverX;
nCellY = nOverY;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
else if ( nX == nX2 && !pThisRowInfo->pCellInfo[nX+1].pCell )
@@ -2444,16 +2444,16 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
!pDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
nCellX = nTempX;
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
}
else
{
- bDoCell = TRUE;
+ bDoCell = sal_True;
}
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
- bDoCell = FALSE;
+ bDoCell = false;
const ScPatternAttr* pPattern = NULL;
const SfxItemSet* pCondSet = NULL;
@@ -2474,11 +2474,11 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
GetVisibleCell( nCellX, nCellY, nTab, pCell );
}
if ( !pCell )
- bDoCell = FALSE;
+ bDoCell = false;
}
if (bDoCell)
{
- BOOL bHidden = FALSE;
+ sal_Bool bHidden = false;
//
// Create EditEngine
@@ -2489,9 +2489,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// Ein RefDevice muss auf jeden Fall gesetzt werden,
// sonst legt sich die EditEngine ein VirtualDevice an!
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() );
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
pEngine->SetRefDevice( pFmtDevice ); // always set
- ULONG nCtrl = pEngine->GetControlWord();
+ sal_uLong nCtrl = pEngine->GetControlWord();
if ( bShowSpellErrors )
nCtrl |= EE_CNTRL_ONLINESPELLING;
if ( eType == OUTTYPE_PRINTER )
@@ -2505,7 +2505,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) );
}
else
- lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
+ lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
EditAlignmentParam aAlignParam(pPattern, pCondSet, lcl_SafeIsValue(pCell));
@@ -2528,7 +2528,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
//! Flag setzen, um die Zelle in DrawRotated wiederzufinden ?
//! (oder Flag schon bei DrawBackground, dann hier keine Abfrage)
- bHidden = TRUE; // gedreht wird getrennt ausgegeben
+ bHidden = sal_True; // gedreht wird getrennt ausgegeben
}
aAlignParam.mbAsianVertical = (aAlignParam.meOrient == SVX_ORIENTATION_STACKED) &&
@@ -2583,7 +2583,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
//! handle nArrY == 0
GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, 0,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
aAlignParam.mbCellIsValue, true, false, aAreaParam );
//! special ScEditUtil handling if formatting for printer
@@ -2599,7 +2599,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
Fraction aFract(1,1);
Rectangle aUtilRect = ScEditUtil( pDoc, nCellX, nCellY, nTab, Point(0,0), pFmtDevice,
- HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, FALSE );
+ HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
aLogicSize.Width() = aUtilRect.GetWidth();
}
pEngine->SetPaperSize(aLogicSize);
@@ -2626,7 +2626,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
pOldPattern = pPattern;
pOldCondSet = pCondSet;
- ULONG nControl = pEngine->GetControlWord();
+ sal_uLong nControl = pEngine->GetControlWord();
if (aAlignParam.meOrient==SVX_ORIENTATION_STACKED)
nControl |= EE_CNTRL_ONECHARPERLINE;
else
@@ -2638,7 +2638,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// set hyphenator the first time it is needed
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
- bHyphenatorSet = TRUE;
+ bHyphenatorSet = sal_True;
}
Color aBackCol = ((const SvxBrushItem&)
@@ -2652,7 +2652,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// Read content from cell
- BOOL bWrapFields = FALSE;
+ sal_Bool bWrapFields = false;
if (pCell)
{
if (pCell->GetCellType() == CELLTYPE_EDIT)
@@ -2669,7 +2669,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// Fields aren't wrapped, so clipping is enabled to prevent
// a field from being drawn beyond the cell size
- bWrapFields = TRUE;
+ bWrapFields = sal_True;
}
}
else
@@ -2679,7 +2679,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
else
{
- ULONG nFormat = pPattern->GetNumberFormat(
+ sal_uLong nFormat = pPattern->GetNumberFormat(
pDoc->GetFormatTable(), pCondSet );
String aString;
Color* pColor;
@@ -2705,7 +2705,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
OSL_FAIL("pCell == NULL");
}
- pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
+ pEngine->SetUpdateMode( true ); // after SetText, before CalcTextWidth/GetTextHeight
//
// Get final output area using the calculated width
@@ -2723,15 +2723,15 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
// for break, the first GetOutputArea call is sufficient
GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, nNeededPixel,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
aAlignParam.mbCellIsValue || bRepeat || bShrink, false, false, aAreaParam );
if ( bShrink )
{
- BOOL bWidth = ( aAlignParam.meOrient == SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical );
+ sal_Bool bWidth = ( aAlignParam.meOrient == SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical );
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, bWidth,
- sal::static_int_cast<USHORT>(aAlignParam.meOrient), 0, bPixelToLogic,
+ sal::static_int_cast<sal_uInt16>(aAlignParam.meOrient), 0, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -2824,7 +2824,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
nStartX += nLeftM;
}
- BOOL bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
+ sal_Bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
if ( aAreaParam.maClipRect.Left() < nScrX )
{
aAreaParam.maClipRect.Left() = nScrX;
@@ -2839,23 +2839,23 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( !bHidden && !bOutside )
{
bool bClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
- BOOL bSimClip = FALSE;
+ sal_Bool bSimClip = false;
if ( bWrapFields )
{
// Fields in a cell with automatic breaks: clip to cell width
- bClip = TRUE;
+ bClip = sal_True;
}
if ( aAreaParam.maClipRect.Top() < nScrY )
{
aAreaParam.maClipRect.Top() = nScrY;
- bClip = TRUE;
+ bClip = sal_True;
}
if ( aAreaParam.maClipRect.Bottom() > nScrY + nScrH )
{
aAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one?
- bClip = TRUE;
+ bClip = sal_True;
}
Size aCellSize; // output area, excluding margins, in logical units
@@ -2868,7 +2868,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
const ScMergeAttr* pMerge =
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
- BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
+ sal_Bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
// Don't clip for text height when printing rows with optimal height,
// except when font size is from conditional formatting.
@@ -2876,10 +2876,10 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( eType != OUTTYPE_PRINTER ||
( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
( pCondSet && SFX_ITEM_SET ==
- pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
- bClip = TRUE;
+ pCondSet->GetItemState(ATTR_FONT_HEIGHT, sal_True) ) )
+ bClip = sal_True;
else
- bSimClip = TRUE;
+ bSimClip = sal_True;
// Show clip marks if height is at least 5pt too small and
// there are several lines of text.
@@ -2903,7 +2903,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
pClipMarkCell = &pThisRowInfo->pCellInfo[nX+1];
pClipMarkCell->nClipMark |= SC_CLIPMARK_RIGHT; //! also allow left?
- bAnyClipped = TRUE;
+ bAnyClipped = sal_True;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
@@ -3079,7 +3079,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
// For right-to-left, EditEngine always calculates its lines
// beginning from the right edge, but EditLine::nStartPosX is
- // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
+ // of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX.
Size aLogicPaper = pEngine->GetPaperSize();
if ( aLogicPaper.Width() > USHRT_MAX )
{
@@ -3098,7 +3098,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
Point aDocStart = aLogicClip.TopLeft();
aDocStart -= aLogicStart;
- pEngine->Draw( pDev, aLogicClip, aDocStart, FALSE );
+ pEngine->Draw( pDev, aLogicClip, aDocStart, false );
}
else
{
@@ -3120,7 +3120,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
// PDF: whole-cell hyperlink from formula?
- BOOL bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
+ sal_Bool bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell();
if ( bHasURL )
{
@@ -3160,7 +3160,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
// -------------------------------------------------------------------------------
-void ScOutputData::DrawRotated(BOOL bPixelToLogic)
+void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
{
//! nRotMax speichern
SCCOL nRotMax = nX2;
@@ -3172,11 +3172,11 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
ScModule* pScMod = SC_MOD();
sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor &&
+ sal_Bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ScFieldEditEngine* pEngine = NULL;
- BOOL bHyphenatorSet = FALSE;
+ sal_Bool bHyphenatorSet = false;
const ScPatternAttr* pPattern;
const SfxItemSet* pCondSet;
const ScPatternAttr* pOldPattern = NULL;
@@ -3209,10 +3209,10 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
SCROW nY = pThisRowInfo->nRowNo;
- BOOL bHidden = FALSE;
+ sal_Bool bHidden = false;
if (bEditMode)
if ( nX == nEditCol && nY == nEditRow )
- bHidden = TRUE;
+ bHidden = sal_True;
if (!bHidden)
{
@@ -3221,9 +3221,9 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
// Ein RefDevice muss auf jeden Fall gesetzt werden,
// sonst legt sich die EditEngine ein VirtualDevice an!
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() );
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
pEngine->SetRefDevice( pFmtDevice ); // always set
- ULONG nCtrl = pEngine->GetControlWord();
+ sal_uLong nCtrl = pEngine->GetControlWord();
if ( bShowSpellErrors )
nCtrl |= EE_CNTRL_ONLINESPELLING;
if ( eType == OUTTYPE_PRINTER )
@@ -3237,20 +3237,20 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) );
}
else
- lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
+ lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False)
long nPosY = nRowPosY;
- BOOL bVisChanged = FALSE;
+ sal_Bool bVisChanged = false;
//! Rest von zusammengefasster Zelle weiter oben funktioniert nicht!
- BOOL bFromDoc = FALSE;
+ sal_Bool bFromDoc = false;
pPattern = pInfo->pPatternAttr;
pCondSet = pInfo->pConditionSet;
if (!pPattern)
{
pPattern = pDoc->GetPattern( nX, nY, nTab );
- bFromDoc = TRUE;
+ bFromDoc = sal_True;
}
pCell = pInfo->pCell;
if (bFromDoc)
@@ -3260,29 +3260,29 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
GetVisibleCell( nX, nY, nTab, pCell );
if ( !pCell || IsEmptyCellText( pThisRowInfo, nX, nY ) )
- bHidden = TRUE; // nRotateDir is also set without a cell
+ bHidden = sal_True; // nRotateDir is also set without a cell
long nCellWidth = (long) pRowInfo[0].pCellInfo[nX+1].nWidth;
SvxCellHorJustify eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
pPattern->GetItem(ATTR_HOR_JUSTIFY, pCondSet)).GetValue();
- BOOL bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) ||
+ sal_Bool bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) ||
((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue();
- BOOL bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak );
- BOOL bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&>
+ sal_Bool bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak );
+ sal_Bool bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&>
(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue();
SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet );
const ScMergeAttr* pMerge =
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
- BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
+ sal_Bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
long nStartX = nPosX;
long nStartY = nPosY;
if (nX<nX1)
{
if ((bBreak || eOrient!=SVX_ORIENTATION_STANDARD) && !bMerged)
- bHidden = TRUE;
+ bHidden = sal_True;
else
{
nStartX = nInitPosX;
@@ -3334,7 +3334,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pOldPattern = pPattern;
pOldCondSet = pCondSet;
- ULONG nControl = pEngine->GetControlWord();
+ sal_uLong nControl = pEngine->GetControlWord();
if (eOrient==SVX_ORIENTATION_STACKED)
nControl |= EE_CNTRL_ONECHARPERLINE;
else
@@ -3346,7 +3346,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
// set hyphenator the first time it is needed
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
- bHyphenatorSet = TRUE;
+ bHyphenatorSet = sal_True;
}
Color aBackCol = ((const SvxBrushItem&)
@@ -3362,7 +3362,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
const SvxMarginItem* pMargin = (const SvxMarginItem*)
&pPattern->GetItem(ATTR_MARGIN, pCondSet);
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if ( eHorJust == SVX_HOR_JUSTIFY_LEFT )
nIndent = ((const SfxUInt16Item&)pPattern->
GetItem(ATTR_INDENT, pCondSet)).GetValue();
@@ -3447,7 +3447,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
else
{
- ULONG nFormat = pPattern->GetNumberFormat(
+ sal_uLong nFormat = pPattern->GetNumberFormat(
pDoc->GetFormatTable(), pCondSet );
String aString;
Color* pColor;
@@ -3473,7 +3473,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
OSL_FAIL("pCell == NULL");
}
- pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
+ pEngine->SetUpdateMode( sal_True ); // after SetText, before CalcTextWidth/GetTextHeight
long nEngineWidth = (long) pEngine->CalcTextWidth();
long nEngineHeight = pEngine->GetTextHeight();
@@ -3492,7 +3492,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
Size(0,nEngineHeight)).Height();
long nEffHeight = nOutHeight - (long)(nEnginePixel * nAbsCos) + 2;
long nNewWidth = (long)(nEffHeight / nAbsSin) + 2;
- BOOL bFits = ( nNewWidth >= aPaperSize.Width() );
+ sal_Bool bFits = ( nNewWidth >= aPaperSize.Width() );
if ( bFits )
nSteps = 0;
else
@@ -3513,7 +3513,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pEngine->SetPaperSize(pRefDevice->PixelToLogic(aPaperSize));
else
pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1
- //pEngine->QuickFormatDoc( TRUE );
+ //pEngine->QuickFormatDoc( sal_True );
nEngineWidth = (long) pEngine->CalcTextWidth();
nEngineHeight = pEngine->GetTextHeight();
}
@@ -3541,13 +3541,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
if (!nAttrRotate) // hier nur gedrehter Text
- bHidden = TRUE; //! vorher abfragen !!!
+ bHidden = sal_True; //! vorher abfragen !!!
//! weglassen, was nicht hereinragt
if (!bHidden)
{
- BOOL bClip = FALSE;
+ sal_Bool bClip = false;
Size aClipSize = Size( nScrX+nScrW-nStartX, nScrY+nScrH-nStartY );
// weiterschreiben
@@ -3559,7 +3559,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
aCellSize = Size( nOutWidth, nOutHeight ); // Scale ist 1
long nGridWidth = nEngineWidth;
- BOOL bNegative = FALSE;
+ sal_Bool bNegative = false;
if ( eRotMode != SVX_ROTATE_MODE_STANDARD )
{
nGridWidth = aCellSize.Width() +
@@ -3583,8 +3583,8 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
nNeededWidth = pRefDevice->LogicToPixel(Size(nNeededWidth,0)).Width();
GetOutputArea( nX, nArrY, nCellStartX, nPosY, nCellX, nCellY, nNeededWidth,
- *pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
- FALSE, FALSE, TRUE, aAreaParam );
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
+ false, false, sal_True, aAreaParam );
if ( bShrink )
{
@@ -3592,18 +3592,18 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pRefDevice->LogicToPixel(Size(nEngineWidth,0)).Width() : nEngineWidth;
long nNeededPixel = nPixelWidth + nLeftM + nRightM;
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = TRUE;
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = sal_True;
// always do height
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM,
- FALSE, sal::static_int_cast<USHORT>(eOrient), nAttrRotate, bPixelToLogic,
+ false, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
if ( eRotMode == SVX_ROTATE_MODE_STANDARD )
{
// do width only if rotating within the cell (standard mode)
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM,
- TRUE, sal::static_int_cast<USHORT>(eOrient), nAttrRotate, bPixelToLogic,
+ sal_True, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -3621,7 +3621,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
//! Clipping unnoetig, wenn links am Fenster
- bClip = TRUE; // nur Rest ausgeben!
+ bClip = sal_True; // nur Rest ausgeben!
if (nStartX<nScrX)
{
long nDif = nScrX - nStartX;
@@ -3636,13 +3636,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if ( nClipStartY < nRowPosY )
{
long nDif = nRowPosY - nClipStartY;
- bClip = TRUE;
+ bClip = sal_True;
nClipStartY = nRowPosY;
aClipSize.Height() -= nDif;
}
}
- bClip = TRUE; // always clip at the window/page border
+ bClip = sal_True; // always clip at the window/page border
//Rectangle aClipRect;
if (bClip)
@@ -3699,7 +3699,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if (eHorJust==SVX_HOR_JUSTIFY_RIGHT ||
eHorJust==SVX_HOR_JUSTIFY_CENTER)
{
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( false );
SvxAdjust eSvxAdjust =
(eHorJust==SVX_HOR_JUSTIFY_RIGHT) ?
@@ -3713,7 +3713,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
else
pEngine->SetPaperSize(aPaperSize);
- pEngine->SetUpdateMode( TRUE );
+ pEngine->SetUpdateMode( sal_True );
}
}
else
@@ -3827,7 +3827,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
// For right-to-left, EditEngine always calculates its lines
// beginning from the right edge, but EditLine::nStartPosX is
- // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
+ // of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX.
Size aLogicPaper = pEngine->GetPaperSize();
if ( aLogicPaper.Width() > USHRT_MAX )
{
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index e98e1c93591d..fc8fb3e16444 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -210,7 +210,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer)
pModel->UseHyphenator();
- ULONG nOldDrawMode = pDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pDev->GetDrawMode();
if ( bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
@@ -244,7 +244,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer)
// #109985#
void ScOutputData::DrawingSingle(const sal_uInt16 nLayer)
{
- BOOL bHad = FALSE;
+ sal_Bool bHad = false;
SCSIZE nArrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
{
@@ -254,13 +254,13 @@ void ScOutputData::DrawingSingle(const sal_uInt16 nLayer)
{
if (!bHad)
{
- bHad = TRUE;
+ bHad = sal_True;
}
}
else if (bHad)
{
DrawSelectiveObjects( nLayer );
- bHad = FALSE;
+ bHad = false;
}
}
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 5fe990aad697..9359c5425cf9 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -114,7 +114,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
if ( rMark.GetTableSelect( nTab ) )
{
ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange, &aSelection.GetOptions() );
- aFunc.SetRenderFlag( TRUE );
+ aFunc.SetRenderFlag( sal_True );
long nDisplayStart = GetDisplayStart( nTab );
@@ -126,7 +126,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
aPage.Select( aPageRange );
ScPreviewLocationData aLocData( pDoc, pDev );
- aFunc.DoPrint( aPage, nTabStart, nDisplayStart, FALSE, NULL, &aLocData );
+ aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, &aLocData );
ScRange aCellRange;
Rectangle aPixRect;
@@ -157,7 +157,7 @@ bool ScPrintFuncCache::FindLocation( const ScAddress& rCell, ScPrintPageLocation
return false; // not found
}
-BOOL ScPrintFuncCache::IsSameSelection( const ScPrintSelectionStatus& rStatus ) const
+sal_Bool ScPrintFuncCache::IsSameSelection( const ScPrintSelectionStatus& rStatus ) const
{
return aSelection == rStatus;
}
diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx
index e1d493dd3f24..1422b8a34bda 100644
--- a/sc/source/ui/view/pgbrksh.cxx
+++ b/sc/source/ui/view/pgbrksh.cxx
@@ -68,7 +68,7 @@ ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) :
{
SetPool( &pViewSh->GetPool() );
ScViewData* pViewData = pViewSh->GetViewData();
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index c9fa7f8efbf1..ac6aaeb53575 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -76,7 +76,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) :
{
SetPool( &pViewSh->GetPool() );
ScViewData* pViewData = pViewSh->GetViewData();
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
@@ -144,7 +144,7 @@ void ScPivotShell::Execute( SfxRequest& rReq )
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSheetDesc( aNewDesc );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
delete pDlg;
@@ -159,10 +159,10 @@ void ScPivotShell::GetState( SfxItemSet& rSet )
{
ScDocShell* pDocSh = pViewShell->GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack();
+ sal_Bool bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index d30361494b69..a58eef8e2335 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -100,35 +100,35 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView
Window( pParent ),
nPageNo( 0 ),
nZoom( 100 ),
- bValid( FALSE ),
+ bValid( false ),
nTabsTested( 0 ),
nTab( 0 ),
nTabStart( 0 ),
nDisplayStart( 0 ),
nTotalPages( 0 ),
- bStateValid( FALSE ),
- bLocationValid( FALSE ),
+ bStateValid( false ),
+ bLocationValid( false ),
pLocationData( NULL ),
pDrawView( NULL ),
nCurTab ( ScDocShell::GetCurTab() ),
- bInPaint( FALSE ),
- bInGetState( FALSE ),
+ bInPaint( false ),
+ bInGetState( false ),
pDocShell( pDocSh ),
pViewShell( pViewSh ),
- bLeftRulerMove( FALSE ),
- bRightRulerMove( FALSE ),
- bTopRulerMove( FALSE ),
- bBottomRulerMove( FALSE ),
- bHeaderRulerMove( FALSE ),
- bFooterRulerMove( FALSE ),
- bLeftRulerChange( FALSE ),
- bRightRulerChange( FALSE ),
- bTopRulerChange( FALSE ),
- bBottomRulerChange( FALSE ),
- bHeaderRulerChange( FALSE ),
- bFooterRulerChange( FALSE ),
- bPageMargin ( FALSE ),
- bColRulerMove( FALSE ),
+ bLeftRulerMove( false ),
+ bRightRulerMove( false ),
+ bTopRulerMove( false ),
+ bBottomRulerMove( false ),
+ bHeaderRulerMove( false ),
+ bFooterRulerMove( false ),
+ bLeftRulerChange( false ),
+ bRightRulerChange( false ),
+ bTopRulerChange( false ),
+ bBottomRulerChange( false ),
+ bHeaderRulerChange( false ),
+ bFooterRulerChange( false ),
+ bPageMargin ( false ),
+ bColRulerMove( false ),
mnScale( 0 ),
nColNumberButttonDown( 0 ),
nHeaderHeight ( 0 ),
@@ -171,8 +171,8 @@ void ScPreview::UpdateDrawView() // nTab muss richtig sein
pDrawView = new FmFormView( pModel, this );
// die DrawView uebernimmt den Design-Modus vom Model
// (Einstellung "Im Entwurfsmodus oeffnen"), darum hier zuruecksetzen
- pDrawView->SetDesignMode( TRUE );
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetDesignMode( sal_True );
+ pDrawView->SetPrintPreview( sal_True );
pDrawView->ShowSdrPage(pPage);
}
}
@@ -197,7 +197,7 @@ void ScPreview::TestLastPage()
DBG_ASSERT(nPages[nTab],"alle Tabellen leer?");
nTabPage = nPages[nTab] - 1;
nTabStart = 0;
- for (USHORT i=0; i<nTab; i++)
+ for (sal_uInt16 i=0; i<nTab; i++)
nTabStart += nPages[i];
ScDocument* pDoc = pDocShell->GetDocument();
@@ -244,7 +244,7 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
ScPrintOptions aOptions = SC_MOD()->GetPrintOptions();
ScMarkData aMarkData;
- aMarkData.SelectTable( nCurTab, TRUE );
+ aMarkData.SelectTable( nCurTab, true );
for (SCTAB i=nStart; i<nAnz; i++)
{
@@ -286,8 +286,8 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
aState.nDocPages = nTotalPages;
- bValid = TRUE;
- bStateValid = TRUE;
+ bValid = sal_True;
+ bStateValid = sal_True;
DoInvalidate();
}
@@ -299,11 +299,11 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert
SCTAB nOldTab = nTab;
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
while (nPageNo >= nTotalPages && nTabsTested < nTabCount)
{
CalcPages( nTabsTested );
- bDone = TRUE;
+ bDone = sal_True;
}
if (!bDone)
@@ -329,7 +329,7 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert
TestLastPage(); // testen, ob hinter letzter Seite
if ( nTab != nOldTab )
- bStateValid = FALSE;
+ bStateValid = false;
DoInvalidate();
}
@@ -348,8 +348,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
- BOOL bDoPrint = ( pFillLocation == NULL );
- BOOL bValidPage = ( nPageNo < nTotalPages );
+ sal_Bool bDoPrint = ( pFillLocation == NULL );
+ sal_Bool bValidPage = ( nPageNo < nTotalPages );
ScModule* pScMod = SC_MOD();
const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
@@ -382,7 +382,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
pPrintFunc->SetOffset(aOffset);
pPrintFunc->SetManualZoom(nZoom);
pPrintFunc->SetDateTime(aDate,aTime);
- pPrintFunc->SetClearFlag(TRUE);
+ pPrintFunc->SetClearFlag(sal_True);
pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() );
pPrintFunc->SetDrawView( pDrawView );
@@ -409,7 +409,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
{
pPrintFunc->GetPrintState( aState );
aState.nDocPages = nTotalPages;
- bStateValid = TRUE;
+ bStateValid = sal_True;
}
delete pPrintFunc;
}
@@ -423,8 +423,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
Size aWinSize = GetOutputSize();
Point aWinEnd( aWinSize.Width(), aWinSize.Height() );
- BOOL bRight = nPageEndX <= aWinEnd.X();
- BOOL bBottom = nPageEndY <= aWinEnd.Y();
+ sal_Bool bRight = nPageEndX <= aWinEnd.X();
+ sal_Bool bBottom = nPageEndY <= aWinEnd.Y();
if (bRight || bBottom)
{
SetLineColor();
@@ -514,11 +514,11 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
long nRightMargin = 0;
long nTopMargin = 0;
long nBottomMargin = 0;
- BOOL bHeaderOn = FALSE;
- BOOL bFooterOn = FALSE;
+ sal_Bool bHeaderOn = false;
+ sal_Bool bFooterOn = false;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aPaintPageSize;
if ( nPageNo < nTotalPages )
@@ -534,7 +534,7 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
pPrintFunc->SetOffset(aOffset);
pPrintFunc->SetManualZoom(nZoom);
pPrintFunc->SetDateTime(aDate,aTime);
- pPrintFunc->SetClearFlag(TRUE);
+ pPrintFunc->SetClearFlag(sal_True);
pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() );
pPrintFunc->SetDrawView( pDrawView );
@@ -606,7 +606,7 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
{
pPrintFunc->GetPrintState( aState );
aState.nDocPages = nTotalPages;
- bStateValid = TRUE;
+ bStateValid = sal_True;
}
delete pPrintFunc;
@@ -617,8 +617,8 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
long nPageEndY = aPaintPageSize.Height() - aOffset.Y();
Size aWinSize = GetOutputSize();
Point aWinEnd( aWinSize.Width(), aWinSize.Height() );
- BOOL bRight = nPageEndX <= aWinEnd.X();
- BOOL bBottom = nPageEndY <= aWinEnd.Y();
+ sal_Bool bRight = nPageEndX <= aWinEnd.X();
+ sal_Bool bBottom = nPageEndY <= aWinEnd.Y();
if( bPageMargin )
{
@@ -670,10 +670,10 @@ void ScPreview::Paint( const Rectangle& /* rRect */ )
void ScPreview::Command( const CommandEvent& rCEvt )
{
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
{
- BOOL bDone = pViewShell->ScrollCommand( rCEvt );
+ sal_Bool bDone = pViewShell->ScrollCommand( rCEvt );
if (!bDone)
Window::Command(rCEvt);
}
@@ -690,11 +690,11 @@ void ScPreview::KeyInput( const KeyEvent& rKEvt )
// (in ScPreview, not ScPreviewShell -> only if the preview window has the focus)
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
- BOOL bHandled = FALSE;
+ sal_uInt16 nKey = rKeyCode.GetCode();
+ sal_Bool bHandled = false;
if(!rKeyCode.GetModifier())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch(nKey)
{
case KEY_ADD: nSlot = SID_PREVIEW_ZOOMIN; break;
@@ -703,7 +703,7 @@ void ScPreview::KeyInput( const KeyEvent& rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON );
}
}
@@ -718,19 +718,19 @@ const ScPreviewLocationData& ScPreview::GetLocationData()
if ( !pLocationData )
{
pLocationData = new ScPreviewLocationData( pDocShell->GetDocument(), this );
- bLocationValid = FALSE;
+ bLocationValid = false;
}
if ( !bLocationValid )
{
pLocationData->Clear();
DoPrint( pLocationData );
- bLocationValid = TRUE;
+ bLocationValid = sal_True;
}
return *pLocationData;
}
-void ScPreview::DataChanged(BOOL bNewTime)
+void ScPreview::DataChanged(sal_Bool bNewTime)
{
if (bNewTime)
{
@@ -738,7 +738,7 @@ void ScPreview::DataChanged(BOOL bNewTime)
aTime = Time();
}
- bValid = FALSE;
+ bValid = false;
InvalidateLocationData( SC_HINT_DATACHANGED );
Invalidate();
}
@@ -766,7 +766,7 @@ String ScPreview::GetPosString()
}
-void ScPreview::SetZoom(USHORT nNewZoom)
+void ScPreview::SetZoom(sal_uInt16 nNewZoom)
{
if (nNewZoom < 20)
nNewZoom = 20;
@@ -783,11 +783,11 @@ void ScPreview::SetZoom(USHORT nNewZoom)
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
SetMapMode( aMMMode );
- bInPaint = TRUE; // don't scroll during SetYOffset in UpdateScrollBars
+ bInPaint = sal_True; // don't scroll during SetYOffset in UpdateScrollBars
pViewShell->UpdateScrollBars();
- bInPaint = FALSE;
+ bInPaint = false;
- bStateValid = FALSE;
+ bStateValid = false;
InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
DoInvalidate();
Invalidate();
@@ -848,7 +848,7 @@ Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab )
}
-USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly)
+sal_uInt16 ScPreview::GetOptimalZoom(sal_Bool bWidthOnly)
{
double nWinScaleX = ScGlobal::nScreenPPTX / pDocShell->GetOutputFactor();
double nWinScaleY = ScGlobal::nScreenPPTY;
@@ -876,7 +876,7 @@ USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly)
if (nOptimal>400)
nOptimal = 400;
- return (USHORT) nOptimal;
+ return (sal_uInt16) nOptimal;
}
else
return nZoom;
@@ -1023,14 +1023,14 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
if( bLeftRulerChange )
{
DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR );
- bLeftRulerMove = TRUE;
- bRightRulerMove = FALSE;
+ bLeftRulerMove = sal_True;
+ bRightRulerMove = false;
}
else if( bRightRulerChange )
{
DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR );
- bLeftRulerMove = FALSE;
- bRightRulerMove = TRUE;
+ bLeftRulerMove = false;
+ bRightRulerMove = sal_True;
}
}
@@ -1040,26 +1040,26 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
if( bTopRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bTopRulerMove = TRUE;
- bBottomRulerMove = FALSE;
+ bTopRulerMove = sal_True;
+ bBottomRulerMove = false;
}
else if( bBottomRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bTopRulerMove = FALSE;
- bBottomRulerMove = TRUE;
+ bTopRulerMove = false;
+ bBottomRulerMove = sal_True;
}
else if( bHeaderRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bHeaderRulerMove = TRUE;
- bFooterRulerMove = FALSE;
+ bHeaderRulerMove = sal_True;
+ bFooterRulerMove = false;
}
else if( bFooterRulerChange )
{
DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bHeaderRulerMove = FALSE;
- bFooterRulerMove = TRUE;
+ bHeaderRulerMove = false;
+ bFooterRulerMove = sal_True;
}
}
@@ -1085,7 +1085,7 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT );
DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT );
- bColRulerMove = TRUE;
+ bColRulerMove = sal_True;
}
}
@@ -1104,11 +1104,11 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
SetPointer( Pointer( POINTER_ARROW ) );
- BOOL bMoveRulerAction= TRUE;
+ sal_Bool bMoveRulerAction= sal_True;
ScDocument * pDoc = pDocShell->GetDocument();
String aOldName = pDoc->GetPageStyle( nTab );
- BOOL bUndo( pDoc->IsUndoEnabled() );
+ sal_Bool bUndo( pDoc->IsUndoEnabled() );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
@@ -1124,22 +1124,22 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if(( bLeftRulerChange || bRightRulerChange ) && ( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth * HMM_PER_TWIPS - aOffset.X() ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint(Rectangle(0,0,10000,10000));
}
else if( bLeftRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS > nWidth - aLRItem.GetRight() - aOffset.X() / HMM_PER_TWIPS ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint(Rectangle(0,0,10000,10000));
}
else if( bRightRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS < aLRItem.GetLeft() - aOffset.X() / HMM_PER_TWIPS ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint(Rectangle(0,0,10000,10000));
}
else if( aButtonDownPt.X() == aButtonUpPt.X() )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
DrawInvert( aButtonUpPt.X(), POINTER_HSIZEBAR );
}
if( bMoveRulerAction )
@@ -1174,33 +1174,33 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
Rectangle aRect(0,0,10000,10000);
Paint( aRect );
- bLeftRulerChange = FALSE;
- bRightRulerChange = FALSE;
+ bLeftRulerChange = false;
+ bRightRulerChange = false;
}
}
- bLeftRulerMove = FALSE;
- bRightRulerMove = FALSE;
+ bLeftRulerMove = false;
+ bRightRulerMove = false;
}
if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR )
{
SetPointer( POINTER_ARROW );
- BOOL bMoveRulerAction = TRUE;
+ sal_Bool bMoveRulerAction = sal_True;
if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
Paint( Rectangle(0,0,10000,10000) );
}
else if( aButtonDownPt.Y() == aButtonUpPt.Y() )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR );
}
if( bMoveRulerAction )
{
ScDocument * pDoc = pDocShell->GetDocument();
- BOOL bUndo( pDoc->IsUndoEnabled() );
+ sal_Bool bUndo( pDoc->IsUndoEnabled() );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
DBG_ASSERT( pStyleSheet, "PageStyle not found" );
@@ -1216,20 +1216,20 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if( bTopRulerMove && bTopRulerChange )
{
- aULItem.SetUpperValue( (USHORT)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) );
+ aULItem.SetUpperValue( (sal_uInt16)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) );
rStyleSet.Put( aULItem );
pDocShell->SetModified(true);
}
else if( bBottomRulerMove && bBottomRulerChange )
{
- aULItem.SetLowerValue( (USHORT)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) );
+ aULItem.SetLowerValue( (sal_uInt16)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) );
rStyleSet.Put( aULItem );
pDocShell->SetModified(true);
}
else if( bHeaderRulerMove && bHeaderRulerChange )
{
const SfxPoolItem* pItem = NULL;
- if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SFX_ITEM_SET )
{
SfxItemSet& pHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
Size aHeaderSize = ((const SvxSizeItem&)pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize();
@@ -1244,7 +1244,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
else if( bFooterRulerMove && bFooterRulerChange )
{
const SfxPoolItem* pItem = NULL;
- if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SFX_ITEM_SET )
{
SfxItemSet& pFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
Size aFooterSize = ((const SvxSizeItem&)pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize();
@@ -1274,26 +1274,26 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
Rectangle aRect(0,0,10000,10000);
Paint( aRect );
- bTopRulerChange = FALSE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = false;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = false;
}
}
- bTopRulerMove = FALSE;
- bBottomRulerMove = FALSE;
- bHeaderRulerMove = FALSE;
- bFooterRulerMove = FALSE;
+ bTopRulerMove = false;
+ bBottomRulerMove = false;
+ bHeaderRulerMove = false;
+ bFooterRulerMove = false;
}
if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT )
{
SetPointer(POINTER_ARROW);
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- BOOL bMoveRulerAction = TRUE;
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bMoveRulerAction = sal_True;
if( aButtonDownPt.X() == aButtonUpPt.X() )
{
- bMoveRulerAction = FALSE;
+ bMoveRulerAction = false;
if( nColNumberButttonDown == aPageArea.aStart.Col() )
DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT );
else
@@ -1320,7 +1320,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if( nNewColWidth >= 0 )
{
- aFunc.SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_DIRECT, (USHORT)nNewColWidth, TRUE, TRUE);
+ aFunc.SetWidthOrHeight( true, 1,nCols, nTab, SC_SIZE_DIRECT, (sal_uInt16)nNewColWidth, true, true);
pDocShell->SetModified(true);
}
if ( ValidTab( nTab ) )
@@ -1331,7 +1331,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
Rectangle nRect(0,0,10000,10000);
Paint( nRect );
}
- bColRulerMove = FALSE;
+ bColRulerMove = false;
}
ReleaseMouse();
}
@@ -1392,7 +1392,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
Point aHeaderLeft = LogicToPixel( Point( -aOffset.X(), nHeaderHeight ), aMMMode );
Point aFooderLeft = LogicToPixel( Point( -aOffset.X(), nFooterHeight ), aMMMode );
- BOOL bOnColRulerChange = FALSE;
+ sal_Bool bOnColRulerChange = false;
for( SCCOL i=aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
{
@@ -1402,7 +1402,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
&& ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() < aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove
&& !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
{
- bOnColRulerChange = TRUE;
+ bOnColRulerChange = sal_True;
if( !rMEvt.GetButtons() && GetPointer() == POINTER_HSPLIT )
nColNumberButttonDown = i;
break;
@@ -1411,41 +1411,41 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
if( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 ) && !bRightRulerMove )
{
- bLeftRulerChange = TRUE;
- bRightRulerChange = FALSE;
+ bLeftRulerChange = sal_True;
+ bRightRulerChange = false;
}
else if( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > ( aRightTop.X() - 2 ) && !bLeftRulerMove )
{
- bLeftRulerChange = FALSE;
- bRightRulerChange = TRUE;
+ bLeftRulerChange = false;
+ bRightRulerChange = sal_True;
}
else if( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > ( aTopLeft.Y() - 2 ) && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
{
- bTopRulerChange = TRUE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = sal_True;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = false;
}
else if( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > ( aBottomLeft.Y() - 2 ) && !bTopRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
{
- bTopRulerChange = FALSE;
- bBottomRulerChange = TRUE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = false;
+ bBottomRulerChange = sal_True;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = false;
}
else if( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > ( aHeaderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bFooterRulerMove )
{
- bTopRulerChange = FALSE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = TRUE;
- bFooterRulerChange = FALSE;
+ bTopRulerChange = false;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = sal_True;
+ bFooterRulerChange = false;
}
else if( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > ( aFooderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove )
{
- bTopRulerChange = FALSE;
- bBottomRulerChange = FALSE;
- bHeaderRulerChange = FALSE;
- bFooterRulerChange = TRUE;
+ bTopRulerChange = false;
+ bBottomRulerChange = false;
+ bHeaderRulerChange = false;
+ bFooterRulerChange = sal_True;
}
if( bPageMargin )
@@ -1536,9 +1536,9 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
}
}
//Issue51656 Add resizeable margin on page preview from maoyg
-void ScPreview::InvalidateLocationData(ULONG nId)
+void ScPreview::InvalidateLocationData(sal_uLong nId)
{
- bLocationValid = FALSE;
+ bLocationValid = false;
if (pViewShell->HasAccessibilityObjects())
pViewShell->BroadcastAccessibility( SfxSimpleHint( nId ) );
}
@@ -1565,7 +1565,7 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre
}
//Issue51656 Add resizeable margin on page preview from maoyg
-void ScPreview::DragMove( long nDragMovePos, USHORT nFlags )
+void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags )
{
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
@@ -1592,7 +1592,7 @@ void ScPreview::DragMove( long nDragMovePos, USHORT nFlags )
}
}
-void ScPreview::DrawInvert( long nDragPos, USHORT nFlags )
+void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags )
{
long nHeight = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Height();
long nWidth = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Width();
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index f0c93d563bdb..39560477fe30 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -53,11 +53,11 @@ struct ScPreviewLocationEntry
ScPreviewLocationType eType;
Rectangle aPixelRect;
ScRange aCellRange;
- BOOL bRepeatCol;
- BOOL bRepeatRow;
+ sal_Bool bRepeatCol;
+ sal_Bool bRepeatRow;
ScPreviewLocationEntry( ScPreviewLocationType eNewType, const Rectangle& rPixel, const ScRange& rRange,
- BOOL bRepCol, BOOL bRepRow ) :
+ sal_Bool bRepCol, sal_Bool bRepRow ) :
eType( eNewType ),
aPixelRect( rPixel ),
aCellRange( rRange ),
@@ -188,7 +188,7 @@ void ScPreviewLocationData::Clear()
nDrawRanges = 0;
}
-void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow,
+void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, sal_Bool bRepCol, sal_Bool bRepRow,
const MapMode& rDrawMap )
{
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
@@ -220,25 +220,25 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange&
}
}
-void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol )
+void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, sal_Bool bRepCol )
{
SCTAB nTab = 0; //! ?
ScRange aRange( nStartCol, 0, nTab, nEndCol, 0, nTab );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, false ) );
}
-void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow )
+void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, sal_Bool bRepRow )
{
SCTAB nTab = 0; //! ?
ScRange aRange( 0, nStartRow, nTab, 0, nEndRow, nTab );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_ROWHEADER, aPixelRect, aRange, FALSE, bRepRow ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_ROWHEADER, aPixelRect, aRange, false, bRepRow ) );
}
-void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft )
+void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, sal_Bool bHeader, sal_Bool bLeft )
{
ScRange aRange; //! ?
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
@@ -247,7 +247,7 @@ void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, BOOL bHeade
( bLeft ? SC_PLOC_LEFTHEADER : SC_PLOC_RIGHTHEADER ) :
( bLeft ? SC_PLOC_LEFTFOOTER : SC_PLOC_RIGHTFOOTER );
- aEntries.push_front( new ScPreviewLocationEntry( eType, aPixelRect, aRange, FALSE, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( eType, aPixelRect, aRange, false, false ) );
}
void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress& rPos )
@@ -255,7 +255,7 @@ void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress
ScRange aRange( rPos );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTEMARK, aPixelRect, aRange, FALSE, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTEMARK, aPixelRect, aRange, false, false ) );
}
void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress& rPos )
@@ -263,10 +263,10 @@ void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress
ScRange aRange( rPos );
Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
- aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTETEXT, aPixelRect, aRange, FALSE, FALSE ) );
+ aEntries.push_front( new ScPreviewLocationEntry( SC_PLOC_NOTETEXT, aPixelRect, aRange, false, false ) );
}
-void ScPreviewLocationData::GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
+void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
{
DBG_ASSERT( nPos < nDrawRanges, "wrong position" );
if ( nPos < nDrawRanges )
@@ -301,7 +301,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons
SCCOL nEndCol = rCellPos.Col();
for (SCCOL nCol = rRange.aStart.Col(); nCol < nEndCol; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab );
if (nDocW)
nPosX += (long) (nDocW * nScaleX);
}
@@ -320,7 +320,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons
return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel );
}
-BOOL ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const
+sal_Bool ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const
{
ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( aEntries, rCellPos, SC_PLOC_CELLRANGE );
if ( pEntry )
@@ -330,25 +330,25 @@ BOOL ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangl
aOffsetRect.Top() + pEntry->aPixelRect.Top(),
aOffsetRect.Right() + pEntry->aPixelRect.Left(),
aOffsetRect.Bottom() + pEntry->aPixelRect.Top() );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const
+sal_Bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == SC_PLOC_CELLRANGE || it->eType == SC_PLOC_COLHEADER || it->eType == SC_PLOC_ROWHEADER )
if ( it->aPixelRect.IsOver( rVisiblePixel ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
+sal_Bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
@@ -356,14 +356,14 @@ BOOL ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
if ( it->eType == SC_PLOC_LEFTHEADER || it->eType == SC_PLOC_RIGHTHEADER )
{
rRect = it->aPixelRect;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
+sal_Bool ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
@@ -371,48 +371,48 @@ BOOL ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
if ( it->eType == SC_PLOC_LEFTFOOTER || it->eType == SC_PLOC_RIGHTFOOTER )
{
rRect = it->aPixelRect;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::IsHeaderLeft() const
+sal_Bool ScPreviewLocationData::IsHeaderLeft() const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == SC_PLOC_LEFTHEADER )
- return TRUE;
+ return true;
if ( it->eType == SC_PLOC_RIGHTHEADER )
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
-BOOL ScPreviewLocationData::IsFooterLeft() const
+sal_Bool ScPreviewLocationData::IsFooterLeft() const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == SC_PLOC_LEFTFOOTER )
- return TRUE;
+ return true;
if ( it->eType == SC_PLOC_RIGHTFOOTER )
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
-long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const
+long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, sal_Bool bNoteMarks ) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
@@ -423,35 +423,35 @@ long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel,
return nRet;
}
-BOOL ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks,
+sal_Bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, sal_Bool bNoteMarks,
ScAddress& rCellPos, Rectangle& rNoteRect ) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
if ( it->eType == eType && it->aPixelRect.IsOver( rVisiblePixel ) )
{
- if ( nPos == sal::static_int_cast<ULONG>(nIndex) )
+ if ( nPos == sal::static_int_cast<sal_uLong>(nIndex) )
{
rCellPos = it->aCellRange.aStart;
rNoteRect = it->aPixelRect;
- return TRUE;
+ return true;
}
++nPos;
}
}
- return FALSE;
+ return false;
}
-Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks, const ScAddress& aCellPos) const
+Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, sal_Bool bNoteMarks, const ScAddress& aCellPos) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
{
@@ -472,18 +472,18 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
const double nScaleY = HMM_PER_TWIPS;
// from left to right:
- BOOL bHasHeaderCol = FALSE;
- BOOL bHasRepCols = FALSE;
- BOOL bHasMainCols = FALSE;
+ sal_Bool bHasHeaderCol = false;
+ sal_Bool bHasRepCols = false;
+ sal_Bool bHasMainCols = false;
SCCOL nRepeatColStart = 0;
SCCOL nRepeatColEnd = 0;
SCCOL nMainColStart = 0;
SCCOL nMainColEnd = 0;
// from top to bottom:
- BOOL bHasHeaderRow = FALSE;
- BOOL bHasRepRows = FALSE;
- BOOL bHasMainRows = FALSE;
+ sal_Bool bHasHeaderRow = false;
+ sal_Bool bHasRepRows = false;
+ sal_Bool bHasMainRows = false;
SCROW nRepeatRowStart = 0;
SCROW nRepeatRowEnd = 0;
SCROW nMainRowStart = 0;
@@ -499,7 +499,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
{
if ( it->bRepeatCol )
{
- bHasRepCols = TRUE;
+ bHasRepCols = true;
nRepeatColStart = it->aCellRange.aStart.Col();
nRepeatColEnd = it->aCellRange.aEnd.Col();
aRepeatRect.Left() = it->aPixelRect.Left();
@@ -507,7 +507,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
}
else
{
- bHasMainCols = TRUE;
+ bHasMainCols = true;
nMainColStart = it->aCellRange.aStart.Col();
nMainColEnd = it->aCellRange.aEnd.Col();
aMainRect.Left() = it->aPixelRect.Left();
@@ -515,7 +515,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
}
if ( it->bRepeatRow )
{
- bHasRepRows = TRUE;
+ bHasRepRows = true;
nRepeatRowStart = it->aCellRange.aStart.Row();
nRepeatRowEnd = it->aCellRange.aEnd.Row();
aRepeatRect.Top() = it->aPixelRect.Top();
@@ -523,7 +523,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
}
else
{
- bHasMainRows = TRUE;
+ bHasMainRows = true;
nMainRowStart = it->aCellRange.aStart.Row();
nMainRowEnd = it->aCellRange.aEnd.Row();
aMainRect.Top() = it->aPixelRect.Top();
@@ -534,14 +534,14 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
else if ( it->eType == SC_PLOC_ROWHEADER )
{
// row headers result in an additional column
- bHasHeaderCol = TRUE;
+ bHasHeaderCol = true;
aHeaderRect.Left() = it->aPixelRect.Left();
aHeaderRect.Right() = it->aPixelRect.Right();
}
else if ( it->eType == SC_PLOC_COLHEADER )
{
// column headers result in an additional row
- bHasHeaderRow = TRUE;
+ bHasHeaderRow = true;
aHeaderRect.Top() = it->aPixelRect.Top();
aHeaderRect.Bottom() = it->aPixelRect.Bottom();
}
@@ -571,7 +571,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if ( bHasHeaderCol )
{
- pColInfo[nColPos].Set( TRUE, 0, aHeaderRect.Left(), aHeaderRect.Right() );
+ pColInfo[nColPos].Set( sal_True, 0, aHeaderRect.Left(), aHeaderRect.Right() );
++nColPos;
}
if ( bHasRepCols )
@@ -580,12 +580,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
for ( nCol=nRepeatColStart; nCol<=nRepeatColEnd; nCol++ )
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab );
long nNextX = nPosX + (long) (nDocW * nScaleX);
long nPixelStart = pWindow->LogicToPixel( Size( nPosX, 0 ), aCellMapMode ).Width();
long nPixelEnd = pWindow->LogicToPixel( Size( nNextX, 0 ), aCellMapMode ).Width() - 1;
- pColInfo[nColPos].Set( FALSE, nCol,
+ pColInfo[nColPos].Set( false, nCol,
aRepeatRect.Left() + nPixelStart,
aRepeatRect.Left() + nPixelEnd );
@@ -599,12 +599,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
for ( nCol=nMainColStart; nCol<=nMainColEnd; nCol++ )
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab );
long nNextX = nPosX + (long) (nDocW * nScaleX);
long nPixelStart = pWindow->LogicToPixel( Size( nPosX, 0 ), aCellMapMode ).Width();
long nPixelEnd = pWindow->LogicToPixel( Size( nNextX, 0 ), aCellMapMode ).Width() - 1;
- pColInfo[nColPos].Set( FALSE, nCol,
+ pColInfo[nColPos].Set( false, nCol,
aMainRect.Left() + nPixelStart,
aMainRect.Left() + nPixelEnd );
@@ -636,7 +636,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if ( bHasHeaderRow )
{
- pRowInfo[nRowPos].Set( TRUE, 0, aHeaderRect.Top(), aHeaderRect.Bottom() );
+ pRowInfo[nRowPos].Set( sal_True, 0, aHeaderRect.Top(), aHeaderRect.Bottom() );
++nRowPos;
}
if ( bHasRepRows )
@@ -647,12 +647,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if (pDoc->RowHidden(nRow, nTab))
continue;
- USHORT nDocH = pDoc->GetOriginalHeight( nRow, nTab );
+ sal_uInt16 nDocH = pDoc->GetOriginalHeight( nRow, nTab );
long nNextY = nPosY + (long) (nDocH * nScaleY);
long nPixelStart = pWindow->LogicToPixel( Size( 0, nPosY ), aCellMapMode ).Height();
long nPixelEnd = pWindow->LogicToPixel( Size( 0, nNextY ), aCellMapMode ).Height() - 1;
- pRowInfo[nRowPos].Set( FALSE, nRow,
+ pRowInfo[nRowPos].Set( false, nRow,
aRepeatRect.Top() + nPixelStart,
aRepeatRect.Top() + nPixelEnd );
@@ -668,12 +668,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
if (pDoc->RowHidden(nRow, nTab))
continue;
- USHORT nDocH = pDoc->GetOriginalHeight( nRow, nTab );
+ sal_uInt16 nDocH = pDoc->GetOriginalHeight( nRow, nTab );
long nNextY = nPosY + (long) (nDocH * nScaleY);
long nPixelStart = pWindow->LogicToPixel( Size( 0, nPosY ), aCellMapMode ).Height();
long nPixelEnd = pWindow->LogicToPixel( Size( 0, nNextY ), aCellMapMode ).Height() - 1;
- pRowInfo[nRowPos].Set( FALSE, nRow,
+ pRowInfo[nRowPos].Set( false, nRow,
aMainRect.Top() + nPixelStart,
aMainRect.Top() + nPixelEnd );
@@ -732,7 +732,7 @@ Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) co
// GetMainCellRange is used for links in PDF export
-BOOL ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const
+sal_Bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const
{
boost::ptr_list<ScPreviewLocationEntry>::const_iterator it;
for (it = aEntries.begin(); it != aEntries.end(); ++it)
@@ -741,11 +741,11 @@ BOOL ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRe
{
rRange = it->aCellRange;
rPixRect = it->aPixelRect;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 2b61a8f8e97c..c6770ba27729 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -44,7 +44,6 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
@@ -121,7 +120,7 @@ void ScPreviewShell::Construct( Window* pParent )
pVerScroll = new ScrollBar(pParent, WB_VSCROLL);
// SSA: --- RTL --- no mirroring for horizontal scrollbars
- pHorScroll->EnableRTL( FALSE );
+ pHorScroll->EnableRTL( false );
pHorScroll->SetEndScrollHdl( LINK( this, ScPreviewShell, ScrollHandler ) );
pVerScroll->SetEndScrollHdl( LINK( this, ScPreviewShell, ScrollHandler ) );
@@ -130,8 +129,8 @@ void ScPreviewShell::Construct( Window* pParent )
SetPool( &SC_MOD()->GetPool() );
SetWindow( pPreview );
- StartListening(*pDocShell,TRUE);
- StartListening(*SFX_APP(),TRUE); // #i62045# #i62046# application is needed for Calc's own hints
+ StartListening(*pDocShell,sal_True);
+ StartListening(*SFX_APP(),sal_True); // #i62045# #i62046# application is needed for Calc's own hints
SfxBroadcaster* pDrawBC = pDocShell->GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
StartListening(*pDrawBC);
@@ -256,9 +255,9 @@ void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
Size( nBarW, nBarH ) );
if ( SVX_ZOOM_WHOLEPAGE == eZoom )
- pPreview->SetZoom( pPreview->GetOptimalZoom(FALSE) );
+ pPreview->SetZoom( pPreview->GetOptimalZoom(false) );
else if ( SVX_ZOOM_PAGEWIDTH == eZoom )
- pPreview->SetZoom( pPreview->GetOptimalZoom(TRUE) );
+ pPreview->SetZoom( pPreview->GetOptimalZoom(sal_True) );
UpdateScrollBars();
}
@@ -367,7 +366,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
long nTotalPages = pPreview->GetTotalPages();
long nPageNo = 0;
long nPerPageLength = 0;
- BOOL bIsDivide = TRUE;
+ sal_Bool bIsDivide = sal_True;
if( nTotalPages )
nPerPageLength = nMaxRange / nTotalPages;
@@ -377,12 +376,12 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
nPageNo = nPos / nPerPageLength;
if( nPos % nPerPageLength )
{
- bIsDivide = FALSE;
+ bIsDivide = false;
nPageNo ++;
}
}
- BOOL bHoriz = ( pScroll == pHorScroll );
+ sal_Bool bHoriz = ( pScroll == pHorScroll );
if( bHoriz )
pPreview->SetXOffset( nPos );
@@ -396,7 +395,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
Point aPos = pScroll->GetParent()->OutputToNormalizedScreenPixel( pScroll->GetPosPixel() );
String aHelpStr;
Rectangle aRect;
- USHORT nAlign;
+ sal_uInt16 nAlign;
if( nDelta < 0 )
{
@@ -414,7 +413,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
}
else if( nDelta > 0 )
{
- BOOL bAllTested = pPreview->AllTested();
+ sal_Bool bAllTested = pPreview->AllTested();
if ( nTotalPages && ( nPageNo < nTotalPages || !bAllTested ) )
pPreview->SetPageNo( nPageNo );
@@ -438,9 +437,9 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll )
return 0;
}
-BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
+sal_Bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM )
{
@@ -454,10 +453,10 @@ BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
if ( nNew != nOld )
{
eZoom = SVX_ZOOM_PERCENT;
- pPreview->SetZoom( (USHORT)nNew );
+ pPreview->SetZoom( (sal_uInt16)nNew );
}
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -467,12 +466,12 @@ BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
return bDone;
}
-SfxPrinter* ScPreviewShell::GetPrinter( BOOL bCreate )
+SfxPrinter* ScPreviewShell::GetPrinter( sal_Bool bCreate )
{
return pDocShell->GetPrinter(bCreate);
}
-USHORT ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
@@ -502,8 +501,8 @@ PrintDialog* ScPreviewShell::CreatePrintDialog( Window* pParent )
pDlg->EnableRange ( PRINTDIALOG_RANGE );
pDlg->SetFirstPage ( 1 );
pDlg->SetMinPage ( 1 );
- pDlg->SetLastPage ( (USHORT)nDocPageMax );
- pDlg->SetMaxPage ( (USHORT)nDocPageMax );
+ pDlg->SetLastPage ( (sal_uInt16)nDocPageMax );
+ pDlg->SetMaxPage ( (sal_uInt16)nDocPageMax );
pDlg->EnableCollate ();
// Selektion hier nicht
@@ -526,17 +525,17 @@ void ScPreviewShell::PreparePrint( PrintDialog* pPrintDialog )
SfxViewShell::PreparePrint( pPrintDialog );
ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
+ aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), true );
pDocShell->PreparePrint( pPrintDialog, &aMarkData );
}
ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI )
+ PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI )
{
ErrCode nRet = ERRCODE_IO_ABORT;
ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
+ aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), true );
if ( pDocShell->CheckPrint( pPrintDialog, &aMarkData, false, bIsAPI ) )
{
@@ -547,7 +546,7 @@ ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter,
return nRet;
}
-USHORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog )
+sal_uInt16 ScPreviewShell::Print( SfxProgress& rProgress, sal_Bool bIsAPI, PrintDialog* pPrintDialog )
{
pDocShell->GetDocument()->SetPrintOptions(); // Optionen aus OFA am Printer setzen
@@ -555,7 +554,7 @@ USHORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog*
bool bAllTabs = ( pPrintDialog ? ( pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_ALL ) : SC_MOD()->GetPrintOptions().GetAllSheets() );
ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
+ aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), true );
uno::Sequence< sal_Int32 > aSheets;
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
@@ -576,14 +575,14 @@ USHORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog*
SetAdditionalPrintOptions( aProps );
SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog );
- pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, FALSE, bIsAPI );
+ pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, false, bIsAPI );
return 0;
}
//------------------------------------------------------------------------
-void ScPreviewShell::Activate(BOOL bMDI)
+void ScPreviewShell::Activate(sal_Bool bMDI)
{
SfxViewShell::Activate(bMDI);
@@ -598,7 +597,7 @@ void ScPreviewShell::Activate(BOOL bMDI)
}
}
-void ScPreviewShell::Deactivate(BOOL bMDI)
+void ScPreviewShell::Deactivate(sal_Bool bMDI)
{
SfxViewShell::Deactivate(bMDI);
@@ -611,7 +610,7 @@ void ScPreviewShell::Deactivate(BOOL bMDI)
void ScPreviewShell::Execute( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
switch ( nSlot )
@@ -637,7 +636,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
case SID_NEXT_TABLE: // Accelerator
case SID_PREVIEW_NEXT:
{
- BOOL bAllTested = pPreview->AllTested();
+ sal_Bool bAllTested = pPreview->AllTested();
long nPage = pPreview->GetPageNo();
long nTotal = pPreview->GetTotalPages();
if (nTotal && (nPage+1 < nTotal || !bAllTested))
@@ -668,8 +667,8 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOM:
case FID_SCALE:
{
- USHORT nZoom = 100;
- BOOL bCancel = FALSE;
+ sal_uInt16 nZoom = 100;
+ sal_Bool bCancel = false;
eZoom = SVX_ZOOM_PERCENT;
@@ -717,10 +716,10 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
{
case SVX_ZOOM_OPTIMAL:
case SVX_ZOOM_WHOLEPAGE:
- nZoom = pPreview->GetOptimalZoom(FALSE);
+ nZoom = pPreview->GetOptimalZoom(false);
break;
case SVX_ZOOM_PAGEWIDTH:
- nZoom = pPreview->GetOptimalZoom(TRUE);
+ nZoom = pPreview->GetOptimalZoom(sal_True);
break;
default:
{
@@ -735,7 +734,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
break;
case SID_PREVIEW_ZOOMIN:
{
- USHORT nNew = pPreview->GetZoom() + 20 ;
+ sal_uInt16 nNew = pPreview->GetZoom() + 20 ;
nNew -= nNew % 20;
pPreview->SetZoom( nNew );
eZoom = SVX_ZOOM_PERCENT;
@@ -744,7 +743,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
break;
case SID_PREVIEW_ZOOMOUT:
{
- USHORT nNew = pPreview->GetZoom() - 1;
+ sal_uInt16 nNew = pPreview->GetZoom() - 1;
nNew -= nNew % 20;
pPreview->SetZoom( nNew );
eZoom = SVX_ZOOM_PERCENT;
@@ -753,7 +752,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
break;
case SID_PREVIEW_MARGIN:
{
- BOOL bMargin = pPreview->GetPageMargins();
+ sal_Bool bMargin = pPreview->GetPageMargins();
pPreview->SetPageMargins( !bMargin );
pPreview->Invalidate();
rReq.Done();
@@ -763,9 +762,9 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
eZoom = SVX_ZOOM_PERCENT;
- if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) )
+ if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue();
if( nCurrentZoom )
{
pPreview->SetZoom( nCurrentZoom );
@@ -783,9 +782,9 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
- if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, TRUE, &pItem ) )
+ if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SfxItemSet& rSet = pStyleSheet->GetItemSet();
rSet.Put( SfxUInt16Item( ATTR_PAGE_SCALE, nCurrentZoom ) );
ScPrintFunc aPrintFunc( pDocShell, pDocShell->GetPrinter(), nTab );
@@ -825,16 +824,16 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
void ScPreviewShell::GetState( SfxItemSet& rSet )
{
- pPreview->SetInGetState(TRUE);
+ pPreview->SetInGetState(sal_True);
SCTAB nTab = pPreview->GetTab();
long nPage = pPreview->GetPageNo();
long nTotal = pPreview->GetTotalPages();
- USHORT nZoom = pPreview->GetZoom();
- BOOL bAllTested = pPreview->AllTested();
+ sal_uInt16 nZoom = pPreview->GetZoom();
+ sal_Bool bAllTested = pPreview->AllTested();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -895,7 +894,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
if ( pStyleSheet )
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
- USHORT nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue();
+ sal_uInt16 nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue();
if( nCurrentZoom )
{
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM_SLIDER, MAXZOOM_SLIDER, SID_PREVIEW_SCALINGFACTOR );
@@ -912,7 +911,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( nWhich, pPreview->GetPosString() ) );
break;
case SID_PRINTPREVIEW:
- rSet.Put( SfxBoolItem( nWhich, TRUE ) );
+ rSet.Put( SfxBoolItem( nWhich, sal_True ) );
break;
case SID_FORMATPAGE:
case SID_PREVIEW_MARGIN:
@@ -924,7 +923,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
- pPreview->SetInGetState(FALSE);
+ pPreview->SetInGetState(false);
}
void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
@@ -942,7 +941,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
rData.aShortDocName = rData.aLongDocName = rData.aTitle;
rData.nPageNo = pPreview->GetPageNo() + 1;
- BOOL bAllTested = pPreview->AllTested();
+ sal_Bool bAllTested = pPreview->AllTested();
if (bAllTested)
rData.nTotalPages = pPreview->GetTotalPages();
else
@@ -951,7 +950,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData )
// eNumType kennt der Dialog selber
}
-void ScPreviewShell::WriteUserData(String& rData, BOOL /* bBrowse */)
+void ScPreviewShell::WriteUserData(String& rData, sal_Bool /* bBrowse */)
{
// nZoom
// nPageNo
@@ -961,13 +960,13 @@ void ScPreviewShell::WriteUserData(String& rData, BOOL /* bBrowse */)
rData += String::CreateFromInt32(pPreview->GetPageNo());
}
-void ScPreviewShell::ReadUserData(const String& rData, BOOL /* bBrowse */)
+void ScPreviewShell::ReadUserData(const String& rData, sal_Bool /* bBrowse */)
{
xub_StrLen nCount = rData.GetTokenCount();
if (nCount)
{
xub_StrLen nIndex = 0;
- pPreview->SetZoom((USHORT)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
+ pPreview->SetZoom((sal_uInt16)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
pPreview->SetPageNo(rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
eZoom = SVX_ZOOM_PERCENT;
}
@@ -1019,7 +1018,7 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
}
}
-void ScPreviewShell::DoScroll( USHORT nMode )
+void ScPreviewShell::DoScroll( sal_uInt16 nMode )
{
Point aCurPos, aPrevPos;
@@ -1214,7 +1213,7 @@ void ScPreviewShell::BroadcastAccessibility( const SfxHint &rHint )
pAccessibilityBroadcaster->Broadcast( rHint );
}
-BOOL ScPreviewShell::HasAccessibilityObjects()
+sal_Bool ScPreviewShell::HasAccessibilityObjects()
{
return pAccessibilityBroadcaster && pAccessibilityBroadcaster->HasListeners();
}
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index f8ec3ae261db..65d923481064 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -57,10 +57,6 @@
#define _COLDLG_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
@@ -179,16 +175,16 @@
void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- BOOL bDataChanged = FALSE;
+ sal_Bool bDataChanged = false;
if (rHint.ISA(SfxSimpleHint))
{
- ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId();
+ sal_uLong nSlot = ((const SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case FID_DATACHANGED:
case SID_SCPRINTOPTIONS:
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
break;
case SC_HINT_DRWLAYER_NEW:
{
@@ -203,20 +199,20 @@ void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( ((const ScPaintHint&)rHint).GetPrintFlag() )
{
- USHORT nParts = ((const ScPaintHint&)rHint).GetParts();
+ sal_uInt16 nParts = ((const ScPaintHint&)rHint).GetParts();
if (nParts & ( PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE ))
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else if (rHint.ISA(SdrHint))
{
// SdrHints are no longer used for invalidating, thus react on objectchange instead
if(HINT_OBJCHG == ((const SdrHint&)rHint).GetKind())
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
if (bDataChanged)
- pPreview->DataChanged(TRUE);
+ pPreview->DataChanged(sal_True);
}
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 91abfe8be440..0e07dc573772 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -103,8 +103,8 @@ ScPageRowEntry::ScPageRowEntry(const ScPageRowEntry& r)
nPagesX = r.nPagesX;
if (r.pHidden && nPagesX)
{
- pHidden = new BOOL[nPagesX];
- memcpy( pHidden, r.pHidden, nPagesX * sizeof(BOOL) );
+ pHidden = new sal_Bool[nPagesX];
+ memcpy( pHidden, r.pHidden, nPagesX * sizeof(sal_Bool) );
}
else
pHidden = NULL;
@@ -119,8 +119,8 @@ const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r)
nPagesX = r.nPagesX;
if (r.pHidden && nPagesX)
{
- pHidden = new BOOL[nPagesX];
- memcpy( pHidden, r.pHidden, nPagesX * sizeof(BOOL) );
+ pHidden = new sal_Bool[nPagesX];
+ memcpy( pHidden, r.pHidden, nPagesX * sizeof(sal_Bool) );
}
else
pHidden = NULL;
@@ -149,15 +149,15 @@ void ScPageRowEntry::SetHidden(size_t nX)
{
if (!pHidden)
{
- pHidden = new BOOL[nPagesX];
- memset( pHidden, FALSE, nPagesX * sizeof(BOOL) );
+ pHidden = new sal_Bool[nPagesX];
+ memset( pHidden, false, nPagesX * sizeof(sal_Bool) );
}
- pHidden[nX] = TRUE;
+ pHidden[nX] = sal_True;
}
}
}
-BOOL ScPageRowEntry::IsHidden(size_t nX) const
+sal_Bool ScPageRowEntry::IsHidden(size_t nX) const
{
return nX>=nPagesX || ( pHidden && pHidden[nX] ); //! inline?
}
@@ -221,9 +221,9 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
if (!bState)
nZoom = 100;
nManualZoom = 100;
- bClearWin = FALSE;
- bUseStyleColor = FALSE;
- bIsRender = FALSE;
+ bClearWin = false;
+ bUseStyleColor = false;
+ bIsRender = false;
InitParam(pOptions);
@@ -241,10 +241,10 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa
nPageStart ( nPage ),
nDocPages ( nDocP ),
pUserArea ( pArea ),
- bState ( FALSE ),
- bSourceRangeValid ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bState ( false ),
+ bSourceRangeValid ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
nTabPages ( 0 ),
nTotalPages ( 0 ),
pPageData ( pData )
@@ -264,10 +264,10 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
nPageStart ( nPage ),
nDocPages ( nDocP ),
pUserArea ( pArea ),
- bState ( FALSE ),
- bSourceRangeValid ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bState ( false ),
+ bSourceRangeValid ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
nTabPages ( 0 ),
nTotalPages ( 0 ),
pPageData ( NULL )
@@ -282,9 +282,9 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
pPrinter ( NULL ),
pDrawView ( NULL ),
pUserArea ( NULL ),
- bSourceRangeValid ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bSourceRangeValid ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
pPageData ( NULL )
{
pDev = pOutDev;
@@ -301,7 +301,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
nTotalPages = rState.nTotalPages;
nPageStart = rState.nPageStart;
nDocPages = rState.nDocPages;
- bState = TRUE;
+ bState = sal_True;
Construct( pOptions );
}
@@ -315,9 +315,9 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow, SCTAB nTab,
nPageStart ( nPage ),
nDocPages ( nDocP ),
pUserArea ( pArea ),
- bState ( FALSE ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bState ( false ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
nTabPages ( 0 ),
nTotalPages ( 0 ),
pPageData ( NULL )
@@ -331,8 +331,8 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow,
pPrinter ( NULL ),
pDrawView ( NULL ),
pUserArea ( NULL ),
- bPrintCurrentTable ( FALSE ),
- bMultiArea ( FALSE ),
+ bPrintCurrentTable ( false ),
+ bMultiArea ( false ),
pPageData ( NULL )
{
pDev = pWindow;
@@ -349,7 +349,7 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow,
nTotalPages = rState.nTotalPages;
nPageStart = rState.nPageStart;
nDocPages = rState.nDocPages;
- bState = TRUE;
+ bState = sal_True;
Construct( pOptions );
}
@@ -370,7 +370,7 @@ void ScPrintFunc::GetPrintState( ScPrintState& rState )
rState.nDocPages = nDocPages;
}
-BOOL ScPrintFunc::GetLastSourceRange( ScRange& rRange ) const
+sal_Bool ScPrintFunc::GetLastSourceRange( ScRange& rRange ) const
{
rRange = aLastSourceRange;
return bSourceRangeValid;
@@ -380,7 +380,7 @@ void ScPrintFunc::FillPageData()
{
if (pPageData)
{
- USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() );
+ sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
ScPrintRangeData& rData = pPageData->GetData(nCount); // hochzaehlen
rData.SetPrintRange( ScRange( nStartCol, nStartRow, nPrintTab,
@@ -436,7 +436,7 @@ void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
GetItem(ATTR_PROTECTION, rCellInfo.pConditionSet)).GetHidePrint())
{
pThisRowInfo->pCellInfo[nX+1].pCell = NULL;
- pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = TRUE;
+ pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = sal_True;
}
}
}
@@ -451,7 +451,7 @@ void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
// - Vorschau bei Vorlagen
void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPrintFactor */,
- const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile )
+ const Rectangle& rBound, ScViewData* pViewData, sal_Bool bMetaFile )
{
//! nPrintFactor auswerten !!!
@@ -459,7 +459,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
if (pViewData)
nTab = pViewData->GetTabNo();
- BOOL bDoGrid, bNullVal, bFormula;
+ sal_Bool bDoGrid, bNullVal, bFormula;
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
if (pStyleSheet)
@@ -535,7 +535,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
//! Flag bei FillInfo uebergeben !!!!!
ScRange aERange;
- BOOL bEmbed = pDoc->IsEmbedded();
+ sal_Bool bEmbed = pDoc->IsEmbedded();
if (bEmbed)
{
pDoc->GetEmbedded(aERange);
@@ -546,7 +546,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
ScTableInfo aTabInfo;
pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab,
- nScaleX, nScaleY, FALSE, bFormula );
+ nScaleX, nScaleY, false, bFormula );
lcl_HidePrint( aTabInfo, nX1, nX2 );
if (bEmbed)
@@ -576,7 +576,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
{
pDrawView = new FmFormView( pModel, pDev );
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
+ pDrawView->SetPrintPreview( sal_True );
aOutputData.SetDrawView( pDrawView );
}
@@ -629,7 +629,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
if (!bMetaFile && pViewData)
pDev->SetMapMode(aMode);
- aOutputData.DrawGrid( TRUE, FALSE ); // keine Seitenumbrueche
+ aOutputData.DrawGrid( sal_True, false ); // keine Seitenumbrueche
pDev->SetLineColor( COL_BLACK );
@@ -639,7 +639,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
long nRight = nScrX + aOutputData.GetScrW() - aOne.Width();
long nBottom = nScrY + aOutputData.GetScrH() - aOne.Height();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// extra line at the left edge for left-to-right, right for right-to-left
if ( bLayoutRTL )
@@ -669,7 +669,7 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
if ( pHFSet == NULL )
{
- rParam.bEnable = FALSE;
+ rParam.bEnable = false;
rParam.pBorder = NULL;
rParam.pBack = NULL;
rParam.pShadow = NULL;
@@ -683,9 +683,9 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
const SvxLRSpaceItem* pHFLR = &(const SvxLRSpaceItem&) pHFSet->Get(ATTR_LRSPACE);
long nTmp;
nTmp = pHFLR->GetLeft();
- rParam.nLeft = nTmp < 0 ? 0 : USHORT(nTmp);
+ rParam.nLeft = nTmp < 0 ? 0 : sal_uInt16(nTmp);
nTmp = pHFLR->GetRight();
- rParam.nRight = nTmp < 0 ? 0 : USHORT(nTmp);
+ rParam.nRight = nTmp < 0 ? 0 : sal_uInt16(nTmp);
rParam.pBorder = (const SvxBoxItem*) &pHFSet->Get(ATTR_BORDER);
rParam.pBack = (const SvxBrushItem*) &pHFSet->Get(ATTR_BACKGROUND);
rParam.pShadow = (const SvxShadowItem*)&pHFSet->Get(ATTR_SHADOW);;
@@ -707,27 +707,27 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
// bNew = TRUE: benutzten Bereich aus dem Dokument suchen
// bNew = FALSE: nur ganze Zeilen/Spalten begrenzen
-BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
+sal_Bool ScPrintFunc::AdjustPrintArea( sal_Bool bNew )
{
SCCOL nOldEndCol = nEndCol; // nur wichtig bei !bNew
SCROW nOldEndRow = nEndRow;
- BOOL bChangeCol = TRUE; // bei bNew werden beide angepasst
- BOOL bChangeRow = TRUE;
+ sal_Bool bChangeCol = sal_True; // bei bNew werden beide angepasst
+ sal_Bool bChangeRow = sal_True;
- BOOL bNotes = aTableParam.bNotes;
+ sal_Bool bNotes = aTableParam.bNotes;
if ( bNew )
{
nStartCol = 0;
nStartRow = 0;
if (!pDoc->GetPrintArea( nPrintTab, nEndCol, nEndRow, bNotes ))
- return FALSE; // nix
+ return false; // nix
}
else
{
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
bChangeCol = ( nStartCol == 0 && nEndCol == MAXCOL );
bChangeRow = ( nStartRow == 0 && nEndRow == MAXROW );
- BOOL bForcedChangeRow = FALSE;
+ sal_Bool bForcedChangeRow = false;
// #i53558# Crop entire column of old row limit to real print area with
// some fuzzyness.
@@ -740,11 +740,11 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
const SCROW nFuzzy = 23*42;
if (nPAEndRow + nFuzzy < nEndRow)
{
- bForcedChangeRow = TRUE;
+ bForcedChangeRow = sal_True;
nEndRow = nPAEndRow;
}
else
- bFound = TRUE; // user seems to _want_ to print some empty rows
+ bFound = sal_True; // user seems to _want_ to print some empty rows
}
// TODO: in case we extend the number of columns we may have to do the
// same for horizontal cropping.
@@ -757,14 +757,14 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
bFound = pDoc->GetPrintAreaVer( nPrintTab, nStartCol, nEndCol, nEndRow, bNotes );
if (!bFound)
- return FALSE; // leer
+ return false; // leer
if (bForcedChangeRow)
- bChangeRow = TRUE;
+ bChangeRow = sal_True;
}
pDoc->ExtendMerge( nStartCol,nStartRow, nEndCol,nEndRow, nPrintTab,
- FALSE, TRUE ); // kein Refresh, incl. Attrs
+ false, sal_True ); // kein Refresh, incl. Attrs
if ( bChangeCol )
{
@@ -786,7 +786,7 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew )
if (!bChangeCol) nEndCol = nOldEndCol;
if (!bChangeRow) nEndRow = nOldEndRow;
- return TRUE;
+ return sal_True;
}
long ScPrintFunc::TextHeight( const EditTextObject* pObject )
@@ -794,7 +794,7 @@ long ScPrintFunc::TextHeight( const EditTextObject* pObject )
if (!pObject)
return 0;
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
return (long) pEditEngine->GetTextHeight();
}
@@ -863,9 +863,9 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SvxLRSpaceItem* pLRItem = (const SvxLRSpaceItem*) &pParamSet->Get( ATTR_LRSPACE );
long nTmp;
nTmp = pLRItem->GetLeft();
- nLeftMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nLeftMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
nTmp = pLRItem->GetRight();
- nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nRightMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
const SvxULSpaceItem* pULItem = (const SvxULSpaceItem*) &pParamSet->Get( ATTR_ULSPACE );
nTopMargin = pULItem->GetUpper();
nBottomMargin = pULItem->GetLower();
@@ -896,7 +896,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SvxSetItem* pHeaderSetItem;
const SfxItemSet* pHeaderSet = NULL;
- if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, FALSE,
+ if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, false,
(const SfxPoolItem**)&pHeaderSetItem ) == SFX_ITEM_SET )
{
pHeaderSet = &pHeaderSetItem->GetItemSet();
@@ -912,7 +912,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SvxSetItem* pFooterSetItem;
const SfxItemSet* pFooterSet = NULL;
- if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, FALSE,
+ if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, false,
(const SfxPoolItem**)&pFooterSetItem ) == SFX_ITEM_SET )
{
pFooterSet = &pFooterSetItem->GetItemSet();
@@ -931,19 +931,19 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
const SfxUInt16Item* pScaleToPagesItem = NULL;
SfxItemState eState;
- eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, FALSE,
+ eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, false,
(const SfxPoolItem**)&pScaleItem );
if ( SFX_ITEM_DEFAULT == eState )
pScaleItem = (const SfxUInt16Item*)
&pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALE );
- eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, FALSE,
+ eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, false,
(const SfxPoolItem**)&pScaleToItem );
if ( SFX_ITEM_DEFAULT == eState )
pScaleToItem = (const ScPageScaleToItem*)
&pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETO );
- eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE,
+ eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false,
(const SfxPoolItem**)&pScaleToPagesItem );
if ( SFX_ITEM_DEFAULT == eState )
pScaleToPagesItem = (const SfxUInt16Item*)
@@ -951,7 +951,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
DBG_ASSERT( pScaleItem && pScaleToItem && pScaleToPagesItem, "Missing ScaleItem! :-/" );
- aTableParam.bCellContent = TRUE;
+ aTableParam.bCellContent = sal_True;
aTableParam.bNotes = GET_BOOL(pParamSet,ATTR_PAGE_NOTES);
aTableParam.bGrid = GET_BOOL(pParamSet,ATTR_PAGE_GRID);
aTableParam.bHeaders = GET_BOOL(pParamSet,ATTR_PAGE_HEADERS);
@@ -964,12 +964,12 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aTableParam.bLeftRight = !aTableParam.bLeftRight;
aTableParam.nFirstPageNo = GET_USHORT(pParamSet,ATTR_PAGE_FIRSTPAGENO);
if (!aTableParam.nFirstPageNo)
- aTableParam.nFirstPageNo = (USHORT) nPageStart; // von vorheriger Tabelle
+ aTableParam.nFirstPageNo = (sal_uInt16) nPageStart; // von vorheriger Tabelle
if ( pScaleItem && pScaleToItem && pScaleToPagesItem )
{
- UINT16 nScaleAll = pScaleItem->GetValue();
- UINT16 nScaleToPages = pScaleToPagesItem->GetValue();
+ sal_uInt16 nScaleAll = pScaleItem->GetValue();
+ sal_uInt16 nScaleToPages = pScaleToPagesItem->GetValue();
aTableParam.bScaleNone = (nScaleAll == 100);
aTableParam.bScaleAll = (nScaleAll > 0 );
@@ -982,10 +982,10 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
}
else
{
- aTableParam.bScaleNone = TRUE;
- aTableParam.bScaleAll = FALSE;
- aTableParam.bScaleTo = FALSE;
- aTableParam.bScalePageNum = FALSE;
+ aTableParam.bScaleNone = sal_True;
+ aTableParam.bScaleAll = false;
+ aTableParam.bScaleTo = false;
+ aTableParam.bScalePageNum = false;
aTableParam.nScaleAll = 0;
aTableParam.nScaleWidth = 0;
aTableParam.nScaleHeight = 0;
@@ -995,7 +995,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
// skip empty pages only if options with that flag are passed
aTableParam.bSkipEmpty = pOptions && pOptions->GetSkipEmpty();
if ( pPageData )
- aTableParam.bSkipEmpty = FALSE;
+ aTableParam.bSkipEmpty = false;
// Wenn pPageData gesetzt ist, interessieren fuer die Umbruch-Vorschau
// nur die Umbrueche, leere Seiten werden nicht speziell behandelt
@@ -1013,7 +1013,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
if ( pUserArea ) // UserArea (Selektion) hat Vorrang
{
bPrintCurrentTable =
- aAreaParam.bPrintArea = TRUE; // Selektion
+ aAreaParam.bPrintArea = sal_True; // Selektion
aAreaParam.aPrintArea = *pUserArea;
// Die Tabellen-Abfrage ist schon in DocShell::Print, hier immer
@@ -1025,7 +1025,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
if ( pPrintArea ) // mindestens eine gesetzt ?
{
bPrintCurrentTable =
- aAreaParam.bPrintArea = TRUE;
+ aAreaParam.bPrintArea = sal_True;
aAreaParam.aPrintArea = *pPrintArea;
bMultiArea = ( pDoc->GetPrintRangeCount(nPrintTab) > 1 );
@@ -1042,39 +1042,39 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
// don't print hidden tables if there's no print range defined there
if ( pDoc->IsVisible( nPrintTab ) )
{
- aAreaParam.bPrintArea = FALSE;
- bPrintCurrentTable = TRUE;
+ aAreaParam.bPrintArea = false;
+ bPrintCurrentTable = sal_True;
}
else
{
- aAreaParam.bPrintArea = TRUE; // otherwise the table is always counted
- bPrintCurrentTable = FALSE;
+ aAreaParam.bPrintArea = sal_True; // otherwise the table is always counted
+ bPrintCurrentTable = false;
}
}
if ( pRepeatCol )
{
- aAreaParam.bRepeatCol = TRUE;
+ aAreaParam.bRepeatCol = sal_True;
aAreaParam.aRepeatCol = *pRepeatCol;
nRepeatStartCol = pRepeatCol->aStart.Col();
nRepeatEndCol = pRepeatCol->aEnd .Col();
}
else
{
- aAreaParam.bRepeatCol = FALSE;
+ aAreaParam.bRepeatCol = false;
nRepeatStartCol = nRepeatEndCol = SCCOL_REPEAT_NONE;
}
if ( pRepeatRow )
{
- aAreaParam.bRepeatRow = TRUE;
+ aAreaParam.bRepeatRow = sal_True;
aAreaParam.aRepeatRow = *pRepeatRow;
nRepeatStartRow = pRepeatRow->aStart.Row();
nRepeatEndRow = pRepeatRow->aEnd .Row();
}
else
{
- aAreaParam.bRepeatRow = FALSE;
+ aAreaParam.bRepeatRow = false;
nRepeatStartRow = nRepeatEndRow = SCROW_REPEAT_NONE;
}
@@ -1175,7 +1175,7 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi
Point aPos;
Size aDrawSize = aGrfSize;
- bool bDraw = TRUE;
+ bool bDraw = true;
switch ( ePos )
{
case GPOS_LT: aPos = rOrg.TopLeft();
@@ -1258,12 +1258,12 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi
aObject.DrawTiled( pOut, rOrg, aGrfSize, Size(0,0) );
}
- bDraw = FALSE;
+ bDraw = false;
}
break;
case GPOS_NONE:
- bDraw = FALSE;
+ bDraw = false;
break;
default: DBG_ASSERT( !pOut, "new Graphic position?" );
@@ -1321,7 +1321,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
return; // leer
// SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- BOOL bCellContrast = bUseStyleColor;
+ sal_Bool bCellContrast = bUseStyleColor;
if ( pBackground && !bCellContrast )
{
@@ -1396,18 +1396,18 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
if (pBorderData)
{
ScDocument* pBorderDoc = new ScDocument( SCDOCMODE_UNDO );
- pBorderDoc->InitUndo( pDoc, 0,0, TRUE,TRUE );
+ pBorderDoc->InitUndo( pDoc, 0,0, sal_True,sal_True );
if (pBorderData)
pBorderDoc->ApplyAttr( 0,0,0, *pBorderData );
ScTableInfo aTabInfo;
pBorderDoc->FillInfo( aTabInfo, 0,0, 0,0, 0,
- nScaleX, nScaleY, FALSE, FALSE );
+ nScaleX, nScaleY, false, false );
DBG_ASSERT(aTabInfo.mnArrCount,"nArrCount == 0");
- aTabInfo.mpRowInfo[1].nHeight = (USHORT) nEffHeight;
+ aTabInfo.mpRowInfo[1].nHeight = (sal_uInt16) nEffHeight;
aTabInfo.mpRowInfo[0].pCellInfo[1].nWidth =
- aTabInfo.mpRowInfo[1].pCellInfo[1].nWidth = (USHORT) nEffWidth;
+ aTabInfo.mpRowInfo[1].pCellInfo[1].nWidth = (sal_uInt16) nEffWidth;
ScOutputData aOutputData( pDev, OUTTYPE_PRINTER, aTabInfo, pBorderDoc, 0,
nScrX+nLeft, nScrY+nTop, 0,0, 0,0, nScaleX, nScaleY );
@@ -1422,7 +1422,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
Size aOnePixel = pDev->PixelToLogic(Size(1,1));
@@ -1446,7 +1446,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY )
for (nCol=nX1; nCol<=nX2; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab );
if (nDocW)
{
long nWidth = (long) (nDocW * nScaleX);
@@ -1475,7 +1475,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
long nOneX = aOnePixel.Width();
long nOneY = aOnePixel.Height();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nWidth = (long) (PRINT_HEADER_WIDTH * nScaleX);
long nEndX = nScrX + nWidth;
@@ -1490,7 +1490,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
for (SCROW nRow=nY1; nRow<=nY2; nRow++)
{
- USHORT nDocH = pDoc->GetRowHeight( nRow, nPrintTab );
+ sal_uInt16 nDocH = pDoc->GetRowHeight( nRow, nPrintTab );
if (nDocH)
{
long nHeight = (long) (nDocH * nScaleY);
@@ -1511,7 +1511,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY )
}
void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
- BOOL bRepCol, ScPreviewLocationData& rLocationData )
+ sal_Bool bRepCol, ScPreviewLocationData& rLocationData )
{
Size aOnePixel = pDev->PixelToLogic(Size(1,1));
long nOneX = aOnePixel.Width();
@@ -1523,7 +1523,7 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
long nPosX = nScrX - nOneX;
for (SCCOL nCol=nX1; nCol<=nX2; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab );
if (nDocW)
nPosX += (long) (nDocW * nScaleX);
}
@@ -1532,13 +1532,13 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
}
void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
- BOOL bRepRow, ScPreviewLocationData& rLocationData )
+ sal_Bool bRepRow, ScPreviewLocationData& rLocationData )
{
Size aOnePixel = pDev->PixelToLogic(Size(1,1));
long nOneX = aOnePixel.Width();
long nOneY = aOnePixel.Height();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nWidth = (long) (PRINT_HEADER_WIDTH * nScaleX);
long nEndX = nScrX + nWidth;
@@ -1552,7 +1552,7 @@ void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
}
void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- long nScrX, long nScrY, BOOL bRepCol, BOOL bRepRow,
+ long nScrX, long nScrY, sal_Bool bRepCol, sal_Bool bRepRow,
ScPreviewLocationData& rLocationData )
{
// get MapMode for drawing objects (same MapMode as in ScOutputData::PrintDrawingLayer)
@@ -1582,7 +1582,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
long nPosX = nScrX - nOneX;
for (nCol=nX1; nCol<=nX2; nCol++)
{
- USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab );
+ sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab );
if (nDocW)
nPosX += (long) (nDocW * nScaleX);
}
@@ -1596,7 +1596,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
long nScrX, long nScrY,
- BOOL bShLeft, BOOL bShTop, BOOL bShRight, BOOL bShBottom )
+ sal_Bool bShLeft, sal_Bool bShTop, sal_Bool bShRight, sal_Bool bShBottom )
{
// #i47547# nothing to do if the end of the print area is before the end of
// the repeat columns/rows (don't use negative size for ScOutputData)
@@ -1605,7 +1605,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
//! Flag bei FillInfo uebergeben !!!!!
ScRange aERange;
- BOOL bEmbed = pDoc->IsEmbedded();
+ sal_Bool bEmbed = pDoc->IsEmbedded();
if (bEmbed)
{
pDoc->GetEmbedded(aERange);
@@ -1620,7 +1620,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
ScTableInfo aTabInfo;
pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nPrintTab,
- nScaleX, nScaleY, TRUE, aTableParam.bFormulas );
+ nScaleX, nScaleY, sal_True, aTableParam.bFormulas );
lcl_HidePrint( aTabInfo, nX1, nX2 );
if (bEmbed)
@@ -1681,11 +1681,11 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
aOutputData.DrawExtraShadow( bShLeft, bShTop, bShRight, bShBottom );
aOutputData.DrawFrame();
aOutputData.DrawStrings();
- aOutputData.DrawEdit(FALSE);
+ aOutputData.DrawEdit(false);
}
if (aTableParam.bGrid)
- aOutputData.DrawGrid( TRUE, FALSE ); // keine Seitenumbrueche
+ aOutputData.DrawGrid( sal_True, false ); // keine Seitenumbrueche
aOutputData.AddPDFNotes(); // has no effect if not rendering PDF with notes enabled
@@ -1701,20 +1701,20 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
aOutputData.PostPrintDrawingLayer(aMMOffset); // #i74768#
}
-BOOL ScPrintFunc::IsMirror( long nPageNo ) // Raender spiegeln ?
+sal_Bool ScPrintFunc::IsMirror( long nPageNo ) // Raender spiegeln ?
{
SvxPageUsage eUsage = (SvxPageUsage) ( nPageUsage & 0x000f );
return ( eUsage == SVX_PAGE_MIRROR && (nPageNo & 1) );
}
-BOOL ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ?
+sal_Bool ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ?
{
SvxPageUsage eUsage = (SvxPageUsage) ( nPageUsage & 0x000f );
- BOOL bLeft;
+ sal_Bool bLeft;
if (eUsage == SVX_PAGE_LEFT)
- bLeft = TRUE;
+ bLeft = sal_True;
else if (eUsage == SVX_PAGE_RIGHT)
- bLeft = FALSE;
+ bLeft = false;
else
bLeft = (nPageNo & 1) != 0;
return bLeft;
@@ -1731,9 +1731,9 @@ void ScPrintFunc::MakeEditEngine()
{
// can't use document's edit engine pool here,
// because pool must have twips as default metric
- pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE );
+ pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True );
- pEditEngine->EnableUndo(FALSE);
+ pEditEngine->EnableUndo(false);
pEditEngine->SetRefDevice( pDev );
pEditEngine->SetWordDelimiters(
ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) );
@@ -1761,14 +1761,14 @@ void ScPrintFunc::MakeEditEngine()
}
// nStartY = logic
-void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+void ScPrintFunc::PrintHF( long nPageNo, sal_Bool bHeader, long nStartY,
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
const ScPrintHFParam& rParam = bHeader ? aHdr : aFtr;
pDev->SetMapMode( aTwipMode ); // Kopf-/Fusszeilen in Twips
- BOOL bLeft = IsLeft(nPageNo) && !rParam.bShared;
+ sal_Bool bLeft = IsLeft(nPageNo) && !rParam.bShared;
const ScPageHFItem* pHFItem = bLeft ? rParam.pLeft : rParam.pRight;
long nLineStartX = aPageRect.Left() + rParam.nLeft;
@@ -1853,7 +1853,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
if (pObject)
{
pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
if (nDif > 0)
@@ -1867,7 +1867,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
if (pObject)
{
pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
if (nDif > 0)
@@ -1881,7 +1881,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
if (pObject)
{
pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
- pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE );
+ pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
if (nDif > 0)
@@ -1899,7 +1899,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY,
}
}
-long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+long ScPrintFunc::DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
if (bDoPrint)
pDev->SetMapMode(aTwipMode);
@@ -1926,10 +1926,10 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData
long nPosY = aPageRect.Top();
long nCount = 0;
- BOOL bOk;
+ sal_Bool bOk;
do
{
- bOk = FALSE;
+ bOk = false;
ScAddress* pPos = (ScAddress*) aNotePosList.GetObject( nNoteStart+nCount );
if (pPos)
{
@@ -1965,7 +1965,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData
nPosY += nTextHeight;
nPosY += 200; // Abstand
++nCount;
- bOk = TRUE;
+ bOk = sal_True;
}
}
}
@@ -1975,7 +1975,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData
return nCount;
}
-long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
if ( nNoteStart >= (long) aNotePosList.Count() || !aTableParam.bNotes )
return 0;
@@ -2023,12 +2023,12 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr
if (aHdr.bEnable)
{
long nHeaderY = aPageRect.Top()-aHdr.nHeight;
- PrintHF( nPageNo, TRUE, nHeaderY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, sal_True, nHeaderY, bDoPrint, pLocationData );
}
if (aFtr.bEnable)
{
long nFooterY = aPageRect.Bottom()+aFtr.nDistance;
- PrintHF( nPageNo, FALSE, nFooterY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, false, nFooterY, bDoPrint, pLocationData );
}
}
@@ -2043,9 +2043,9 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr
}
void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- BOOL bDoPrint, ScPreviewLocationData* pLocationData )
+ sal_Bool bDoPrint, ScPreviewLocationData* pLocationData )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
// nPageNo is the page number within all sheets of one "start page" setting
@@ -2084,11 +2084,11 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
if ( aAreaParam.bRepeatCol )
if ( nX1 > nRepeatStartCol && nX1 <= nRepeatEndCol )
nX1 = nRepeatEndCol + 1;
- BOOL bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol);
+ sal_Bool bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol);
if ( aAreaParam.bRepeatRow )
if ( nY1 > nRepeatStartRow && nY1 <= nRepeatEndRow )
nY1 = nRepeatEndRow + 1;
- BOOL bDoRepRow = (aAreaParam.bRepeatRow && nY1 > nRepeatEndRow);
+ sal_Bool bDoRepRow = (aAreaParam.bRepeatRow && nY1 > nRepeatEndRow);
// use new object hide flags in SdrPaintView
if(pDrawView)
@@ -2109,12 +2109,12 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
if (aHdr.bEnable)
{
long nHeaderY = aPageRect.Top()-aHdr.nHeight;
- PrintHF( nPageNo, TRUE, nHeaderY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, sal_True, nHeaderY, bDoPrint, pLocationData );
}
if (aFtr.bEnable)
{
long nFooterY = aPageRect.Bottom()+aFtr.nDistance;
- PrintHF( nPageNo, FALSE, nFooterY, bDoPrint, pLocationData );
+ PrintHF( nPageNo, false, nFooterY, bDoPrint, pLocationData );
}
// Position ( Raender / zentrieren )
@@ -2281,34 +2281,34 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
{
if ( bDoPrint )
PrintArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow,
- nRepStartX,nRepStartY, TRUE,TRUE,FALSE,FALSE );
+ nRepStartX,nRepStartY, sal_True,sal_True,false,false );
if ( pLocationData )
LocateArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow,
- nRepStartX,nRepStartY, TRUE,TRUE, *pLocationData );
+ nRepStartX,nRepStartY, sal_True,sal_True, *pLocationData );
}
if (bDoRepCol)
{
if ( bDoPrint )
PrintArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY,
- TRUE,!bDoRepRow,FALSE,TRUE );
+ sal_True,!bDoRepRow,false,sal_True );
if ( pLocationData )
- LocateArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, TRUE,FALSE, *pLocationData );
+ LocateArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, sal_True,false, *pLocationData );
}
if (bDoRepRow)
{
if ( bDoPrint )
PrintArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY,
- !bDoRepCol,TRUE,TRUE,FALSE );
+ !bDoRepCol,sal_True,sal_True,false );
if ( pLocationData )
- LocateArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, FALSE,TRUE, *pLocationData );
+ LocateArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, false,sal_True, *pLocationData );
}
// Daten ausgeben
if ( bDoPrint )
- PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,TRUE,TRUE );
+ PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,sal_True,sal_True );
if ( pLocationData )
- LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY, FALSE,FALSE, *pLocationData );
+ LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY, false,false, *pLocationData );
// Spalten-/Zeilenkoepfe ausgeben
// nach den Daten (ueber evtl. weitergezeichneten Schatten)
@@ -2337,23 +2337,23 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
if ( bDoPrint )
PrintColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY );
if ( pLocationData )
- LocateColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY, TRUE, *pLocationData );
+ LocateColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY, sal_True, *pLocationData );
}
if ( bDoPrint )
PrintColHdr( nX1,nX2, nDataX,nInnerStartY );
if ( pLocationData )
- LocateColHdr( nX1,nX2, nDataX,nInnerStartY, FALSE, *pLocationData );
+ LocateColHdr( nX1,nX2, nDataX,nInnerStartY, false, *pLocationData );
if (bDoRepRow)
{
if ( bDoPrint )
PrintRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY );
if ( pLocationData )
- LocateRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY, TRUE, *pLocationData );
+ LocateRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY, sal_True, *pLocationData );
}
if ( bDoPrint )
PrintRowHdr( nY1,nY2, nInnerStartX,nDataY );
if ( pLocationData )
- LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, FALSE, *pLocationData );
+ LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, false, *pLocationData );
}
// einfacher Rahmen
@@ -2386,7 +2386,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
}
aLastSourceRange = ScRange( nX1, nY1, nPrintTab, nX2, nY2, nPrintTab );
- bSourceRangeValid = TRUE;
+ bSourceRangeValid = sal_True;
}
void ScPrintFunc::SetOffset( const Point& rOfs )
@@ -2394,24 +2394,24 @@ void ScPrintFunc::SetOffset( const Point& rOfs )
aSrcOffset = rOfs;
}
-void ScPrintFunc::SetManualZoom( USHORT nNewZoom )
+void ScPrintFunc::SetManualZoom( sal_uInt16 nNewZoom )
{
nManualZoom = nNewZoom;
}
-void ScPrintFunc::SetClearFlag( BOOL bFlag )
+void ScPrintFunc::SetClearFlag( sal_Bool bFlag )
{
bClearWin = bFlag;
}
-void ScPrintFunc::SetUseStyleColor( BOOL bFlag )
+void ScPrintFunc::SetUseStyleColor( sal_Bool bFlag )
{
bUseStyleColor = bFlag;
if (pEditEngine)
pEditEngine->EnableAutoColor( bUseStyleColor );
}
-void ScPrintFunc::SetRenderFlag( BOOL bFlag )
+void ScPrintFunc::SetRenderFlag( sal_Bool bFlag )
{
bIsRender = bFlag; // set when using XRenderable (PDF)
}
@@ -2432,10 +2432,10 @@ void ScPrintFunc::SetExclusivelyDrawOleAndDrawObjects()
// richtig zu setzen - immer ohne UserArea
//
-BOOL ScPrintFunc::UpdatePages()
+sal_Bool ScPrintFunc::UpdatePages()
{
if (!pParamSet)
- return FALSE;
+ return false;
// Zoom
@@ -2462,12 +2462,12 @@ BOOL ScPrintFunc::UpdatePages()
pDocShell->PostPaint(0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID);
}
- return TRUE;
+ return sal_True;
}
long ScPrintFunc::CountPages() // setzt auch nPagesX, nPagesY
{
- BOOL bAreaOk = FALSE;
+ sal_Bool bAreaOk = false;
if (pDoc->HasTable( nPrintTab ))
{
@@ -2485,13 +2485,13 @@ long ScPrintFunc::CountPages() // setzt auch nPagesX, n
nStartRow = rRange.aStart.Row();
nEndCol = rRange.aEnd .Col();
nEndRow = rRange.aEnd .Row();
- bAreaOk = AdjustPrintArea(FALSE); // begrenzen
+ bAreaOk = AdjustPrintArea(false); // begrenzen
}
else
- bAreaOk = FALSE;
+ bAreaOk = false;
}
else // aus Dokument suchen
- bAreaOk = AdjustPrintArea(TRUE);
+ bAreaOk = AdjustPrintArea(sal_True);
}
if (bAreaOk)
@@ -2500,8 +2500,8 @@ long ScPrintFunc::CountPages() // setzt auch nPagesX, n
size_t nY;
if (bMultiArea)
{
- USHORT nRCount = pDoc->GetPrintRangeCount( nPrintTab );
- for (USHORT i=0; i<nRCount; i++)
+ sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab );
+ for (sal_uInt16 i=0; i<nRCount; i++)
{
CalcZoom(i);
if ( aTableParam.bSkipEmpty )
@@ -2542,19 +2542,19 @@ long ScPrintFunc::CountNotePages()
SCCOL nCol;
SCROW nRow;
- BOOL bError = FALSE;
+ sal_Bool bError = false;
if (!aAreaParam.bPrintArea)
- bError = !AdjustPrintArea(TRUE); // komplett aus Dok suchen
+ bError = !AdjustPrintArea(sal_True); // komplett aus Dok suchen
- USHORT nRepeats = 1; // wie oft durchgehen ?
+ sal_uInt16 nRepeats = 1; // wie oft durchgehen ?
if (bMultiArea)
nRepeats = pDoc->GetPrintRangeCount(nPrintTab);
if (bError)
nRepeats = 0;
- for (USHORT nStep=0; nStep<nRepeats; nStep++)
+ for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
{
- BOOL bDoThis = TRUE;
+ sal_Bool bDoThis = sal_True;
if (bMultiArea) // alle Areas durchgehen
{
const ScRange* pThisRange = pDoc->GetPrintRange( nPrintTab, nStep );
@@ -2564,7 +2564,7 @@ long ScPrintFunc::CountNotePages()
nStartRow = pThisRange->aStart.Row();
nEndCol = pThisRange->aEnd .Col();
nEndRow = pThisRange->aEnd .Row();
- bDoThis = AdjustPrintArea(FALSE);
+ bDoThis = AdjustPrintArea(false);
}
}
@@ -2590,7 +2590,7 @@ long ScPrintFunc::CountNotePages()
long nNoteAdd;
do
{
- nNoteAdd = PrintNotes( nPages, nNoteNr, FALSE, NULL );
+ nNoteAdd = PrintNotes( nPages, nNoteNr, false, NULL );
if (nNoteAdd)
{
nNoteNr += nNoteAdd;
@@ -2650,8 +2650,8 @@ void ScPrintFunc::ApplyPrintSettings()
aEnumSize.Width() = aEnumSize.Height();
aEnumSize.Height() = nTemp;
}
- Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, TRUE );
- USHORT nPaperBin = ((const SvxPaperBinItem&)pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue();
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, sal_True );
+ sal_uInt16 nPaperBin = ((const SvxPaperBinItem&)pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue();
pPrinter->SetPaper( ePaper );
if ( PAPER_USER == ePaper )
@@ -2673,7 +2673,7 @@ void ScPrintFunc::ApplyPrintSettings()
// nDisplayStart = lfd. Nummer fuer Anzeige der Seitennummer
long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
- long nStartPage, long nDisplayStart, BOOL bDoPrint,
+ long nStartPage, long nDisplayStart, sal_Bool bDoPrint,
SfxProgress* pProgress, ScPreviewLocationData* pLocationData )
{
DBG_ASSERT(pDev,"Device == NULL");
@@ -2703,10 +2703,10 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
long nPrinted = 0;
long nEndPage = rPageRanges.GetTotalRange().Max();
- USHORT nRepeats = 1; // wie oft durchgehen ?
+ sal_uInt16 nRepeats = 1; // wie oft durchgehen ?
if (bMultiArea)
nRepeats = pDoc->GetPrintRangeCount(nPrintTab);
- for (USHORT nStep=0; nStep<nRepeats; nStep++)
+ for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
{
if (bMultiArea) // Bereich neu belegen ?
{
@@ -2791,7 +2791,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
{
if ( nPageNo+nStartPage <= nEndPage )
{
- BOOL bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 );
+ sal_Bool bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 );
nNoteAdd = PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected,
( bPageSelected ? pLocationData : NULL ) );
if ( nNoteAdd )
@@ -2805,7 +2805,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
if (bPageSelected)
{
++nPrinted;
- bSourceRangeValid = FALSE; // last page was no cell range
+ bSourceRangeValid = false; // last page was no cell range
}
++nPageNo;
}
@@ -2821,9 +2821,9 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
return nPrinted;
}
-void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom berechnen
+void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) // Zoom berechnen
{
- USHORT nRCount = pDoc->GetPrintRangeCount( nPrintTab );
+ sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab );
const ScRange* pThisRange = NULL;
if ( nRangeNo != RANGENO_NORANGE || nRangeNo < nRCount )
pThisRange = pDoc->GetPrintRange( nPrintTab, nRangeNo );
@@ -2835,7 +2835,7 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom bere
nEndRow = pThisRange->aEnd .Row();
}
- if (!AdjustPrintArea(FALSE)) // leer
+ if (!AdjustPrintArea(false)) // leer
{
nZoom = 100;
nPagesX = nPagesY = nTotalY = 0;
@@ -2847,7 +2847,7 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom bere
if (aTableParam.bScalePageNum)
{
nZoom = 100;
- USHORT nPagesToFit = aTableParam.nScalePageNum;
+ sal_uInt16 nPagesToFit = aTableParam.nScalePageNum;
sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
while (true)
@@ -2888,8 +2888,8 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom bere
else if (aTableParam.bScaleTo)
{
nZoom = 100;
- USHORT nW = aTableParam.nScaleWidth;
- USHORT nH = aTableParam.nScaleHeight;
+ sal_uInt16 nW = aTableParam.nScaleWidth;
+ sal_uInt16 nH = aTableParam.nScaleHeight;
sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
while (true)
@@ -3000,7 +3000,7 @@ void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowE
SCROW nStartRow = rPageRowEntry.GetStartRow();
SCROW nEndRow = rPageRowEntry.GetEndRow();
- BOOL bLeftIsEmpty = FALSE;
+ sal_Bool bLeftIsEmpty = false;
ScRange aTempRange;
Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 );
@@ -3011,10 +3011,10 @@ void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowE
bLeftIsEmpty, &aTempRange, &aTempRect ) )
{
rPageRowEntry.SetHidden(i);
- bLeftIsEmpty = TRUE;
+ bLeftIsEmpty = sal_True;
}
else
- bLeftIsEmpty = FALSE;
+ bLeftIsEmpty = false;
nStartCol = nEndCol+1;
}
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 58be3b960b54..683cd3a52848 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -91,7 +91,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
#define IMPL_CHILD_CTOR(Class,sid) \
Class::Class( Window* pParentP, \
- USHORT nId, \
+ sal_uInt16 nId, \
SfxBindings* p, \
SfxChildWinInfo* pInfo ) \
: SfxChildWindow(pParentP, nId) \
@@ -109,7 +109,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
pWindow = pViewShell ? \
pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL; \
if (pViewShell && !pWindow) \
- pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \
+ pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \
}
@@ -198,15 +198,15 @@ IMPL_CHILD_CTOR( ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
// ScSimpleRefDlgWrapper
//-------------------------------------------------------------------------
-static BOOL bScSimpleRefFlag;
+static sal_Bool bScSimpleRefFlag;
static long nScSimpleRefHeight;
static long nScSimpleRefWidth;
static long nScSimpleRefX;
static long nScSimpleRefY;
-static BOOL bAutoReOpen=TRUE;
+static sal_Bool bAutoReOpen=sal_True;
ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* p,
SfxChildWinInfo* pInfo )
: SfxChildWindow(pParentP, nId)
@@ -237,11 +237,11 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP,
if (!pWindow)
{
- SC_MOD()->SetRefDialog( nId, FALSE );
+ SC_MOD()->SetRefDialog( nId, false );
}
}
-void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet)
+void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet)
{
bScSimpleRefFlag=bSet;
if(bScSimpleRefFlag)
@@ -264,7 +264,7 @@ String ScSimpleRefDlgWrapper::GetRefString()
return aResult;
}
-void ScSimpleRefDlgWrapper::SetAutoReOpen(BOOL bFlag)
+void ScSimpleRefDlgWrapper::SetAutoReOpen(sal_Bool bFlag)
{
bAutoReOpen=bFlag;
}
@@ -294,7 +294,7 @@ void ScSimpleRefDlgWrapper::SetUnoLinks( const Link& rDone,
}
}
-void ScSimpleRefDlgWrapper::SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection )
+void ScSimpleRefDlgWrapper::SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection )
{
if(pWindow!=NULL)
{
@@ -317,7 +317,7 @@ void ScSimpleRefDlgWrapper::StartRefInput()
//-------------------------------------------------------------------------
ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( pParentP, nId )
@@ -333,7 +333,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP,
((ScAcceptChgDlg*)pWindow)->Initialize( pInfo );
}
if (pViewShell && !pWindow)
- pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE );
+ pViewShell->GetViewFrame()->SetChildWindow( nId, false );
}
void ScAcceptChgDlgWrapper::ReInitDlg()
@@ -370,7 +370,7 @@ namespace
}
ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP, \
- USHORT nId, \
+ sal_uInt16 nId, \
SfxBindings* p, \
SfxChildWinInfo* /*pInfo*/ ) \
: SfxChildWindow(pParentP, nId),
@@ -378,7 +378,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP,
m_bFreeWindowLock( false ),
m_pSavedWndParent( NULL )
{
- SetWantsFocus( FALSE );\
+ SetWantsFocus( false );\
ScTabViewShell* pViewShell = \
NULL != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow)->GetTabViewShell() :
lcl_GetTabViewShell( p );
@@ -386,7 +386,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP,
pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
DBG_ASSERT( pViewShell, "missing view shell :-(" ); \
if (pViewShell && !pWindow) \
- pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \
+ pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \
if( pWindow ) m_pSavedWndParent = pWindow->GetParent();
}
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index e69903087ac9..e73e58ef032e 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -49,14 +49,14 @@
#define SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN 65
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
static Point aSwitchPos; //! Member
-static BOOL bDidSwitch = FALSE;
+static sal_Bool bDidSwitch = false;
// -----------------------------------------------------------------------
@@ -67,8 +67,8 @@ static BOOL bDidSwitch = FALSE;
ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
pEngine( NULL ),
- bAnchor( FALSE ),
- bStarted( FALSE )
+ bAnchor( false ),
+ bStarted( false )
{
DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet");
}
@@ -81,10 +81,10 @@ ScSplitPos ScViewFunctionSet::GetWhich()
return pViewData->GetActivePart();
}
-ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
+sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll )
{
- ULONG nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
+ sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX;
Window* pWin = pEngine->GetWindow();
Rectangle aScrRect = pWin->GetDesktopRectPixel();
Point aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0));
@@ -98,7 +98,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nHAccelRate > 1.0)
nHAccelRate = 1.0;
- nUpdateInterval = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
+ nUpdateInterval = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
}
if (bLeftScroll)
@@ -110,7 +110,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nHAccelRate > 1.0)
nHAccelRate = 1.0;
- ULONG nTmp = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
+ sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate));
if (nUpdateInterval > nTmp)
nUpdateInterval = nTmp;
}
@@ -125,7 +125,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nVAccelRate > 1.0)
nVAccelRate = 1.0;
- ULONG nTmp = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
+ sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
if (nUpdateInterval > nTmp)
nUpdateInterval = nTmp;
}
@@ -139,7 +139,7 @@ ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point&
if (nVAccelRate > 1.0)
nVAccelRate = 1.0;
- ULONG nTmp = static_cast<ULONG>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
+ sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate));
if (nUpdateInterval > nTmp)
nUpdateInterval = nTmp;
}
@@ -183,7 +183,7 @@ void ScViewFunctionSet::BeginDrag()
}
ScModule* pScMod = SC_MOD();
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if (!bRefMode)
{
pViewData->GetView()->FakeButtonUp( GetWhich() ); // ButtonUp is swallowed
@@ -194,7 +194,7 @@ void ScViewFunctionSet::BeginDrag()
{
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
// bApi = TRUE -> no error messages
- BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE );
+ sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, true );
if ( bCopied )
{
sal_Int8 nDragActions = pViewData->GetView()->SelectionEditable() ?
@@ -244,7 +244,7 @@ void ScViewFunctionSet::CreateAnchor()
{
if (bAnchor) return;
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
SetAnchor( pViewData->GetRefStartX(), pViewData->GetRefStartY() );
else
@@ -253,22 +253,22 @@ void ScViewFunctionSet::CreateAnchor()
void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY )
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
ScTabView* pView = pViewData->GetView();
SCTAB nTab = pViewData->GetTabNo();
if (bRefMode)
{
- pView->DoneRefMode( FALSE );
+ pView->DoneRefMode( false );
aAnchorPos.Set( nPosX, nPosY, nTab );
pView->InitRefMode( aAnchorPos.Col(), aAnchorPos.Row(), aAnchorPos.Tab(),
SC_REFTYPE_REF );
- bStarted = TRUE;
+ bStarted = sal_True;
}
else if (pViewData->IsAnyFillMode())
{
aAnchorPos.Set( nPosX, nPosY, nTab );
- bStarted = TRUE;
+ bStarted = sal_True;
}
else
{
@@ -279,46 +279,46 @@ void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY )
}
else
{
- pView->DoneBlockMode( TRUE );
+ pView->DoneBlockMode( sal_True );
aAnchorPos.Set( nPosX, nPosY, nTab );
ScMarkData& rMark = pViewData->GetMarkData();
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(),
- aAnchorPos.Tab(), TRUE );
- bStarted = TRUE;
+ aAnchorPos.Tab(), sal_True );
+ bStarted = sal_True;
}
else
- bStarted = FALSE;
+ bStarted = false;
}
}
- bAnchor = TRUE;
+ bAnchor = sal_True;
}
void ScViewFunctionSet::DestroyAnchor()
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
- pViewData->GetView()->DoneRefMode( TRUE );
+ pViewData->GetView()->DoneRefMode( sal_True );
else
- pViewData->GetView()->DoneBlockMode( TRUE );
+ pViewData->GetView()->DoneBlockMode( sal_True );
- bAnchor = FALSE;
+ bAnchor = false;
}
-void ScViewFunctionSet::SetAnchorFlag( BOOL bSet )
+void ScViewFunctionSet::SetAnchorFlag( sal_Bool bSet )
{
bAnchor = bSet;
}
-BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDontSelectAtCursor */ )
+sal_Bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ )
{
if ( bDidSwitch )
{
if ( rPointPixel == aSwitchPos )
- return FALSE; // nicht auf falschem Fenster scrollen
+ return false; // nicht auf falschem Fenster scrollen
else
- bDidSwitch = FALSE;
+ bDidSwitch = false;
}
aSwitchPos = rPointPixel; // nur wichtig, wenn bDidSwitch
@@ -344,13 +344,13 @@ BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDon
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(),
- nPosX, nPosY, TRUE, TRUE ); // mit Repair
+ nPosX, nPosY, sal_True, sal_True ); // mit Repair
// fuer AutoFill in der Mitte der Zelle umschalten
// dabei aber nicht das Scrolling nach rechts/unten verhindern
if ( pViewData->IsFillMode() || pViewData->GetFillMode() == SC_FILL_MATRIX )
{
- BOOL bLeft, bTop;
+ sal_Bool bLeft, bTop;
pViewData->GetMouseQuadrant( aEffPos, GetWhich(), nPosX, nPosY, bLeft, bTop );
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
@@ -377,25 +377,25 @@ BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDon
if ( aEffPos.X() >= aWinSize.Width() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bScroll = false, bDidSwitch = sal_True;
else if ( eWhich == SC_SPLIT_BOTTOMLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = false, bDidSwitch = sal_True;
}
if ( pViewData->GetVSplitMode() == SC_SPLIT_FIX )
if ( aEffPos.Y() >= aWinSize.Height() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bScroll = false, bDidSwitch = sal_True;
else if ( eWhich == SC_SPLIT_TOPRIGHT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = FALSE, bDidSwitch = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = false, bDidSwitch = sal_True;
}
}
if (bScroll)
{
// Adjust update interval based on how far the mouse pointer is from the edge.
- ULONG nUpdateInterval = CalcUpdateInterval(
+ sal_uLong nUpdateInterval = CalcUpdateInterval(
aWinSize, aEffPos, bLeftScroll, bTopScroll, bRightScroll, bBottomScroll);
pEngine->SetUpdateInterval(nUpdateInterval);
}
@@ -409,7 +409,7 @@ BOOL ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDon
return SetCursorAtCell( nPosX, nPosY, bScroll );
}
-BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll )
+sal_Bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll )
{
ScTabView* pView = pViewData->GetView();
SCTAB nTab = pViewData->GetTabNo();
@@ -425,19 +425,19 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
bool bSkipUnprotected = !pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS);
if ( bSkipProtected && bSkipUnprotected )
- return FALSE;
+ return false;
bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HASATTR_PROTECTED);
if ( (bCellProtected && bSkipProtected) || (!bCellProtected && bSkipUnprotected) )
// Don't select this cell!
- return FALSE;
+ return false;
}
ScModule* pScMod = SC_MOD();
ScTabViewShell* pViewShell = pViewData->GetViewShell();
bool bRefMode = ( pViewShell ? pViewShell->IsRefInputMode() : false );
- BOOL bHide = !bRefMode && !pViewData->IsAnyFillMode() &&
+ sal_Bool bHide = !bRefMode && !pViewData->IsAnyFillMode() &&
( nPosX != (SCsCOL) pViewData->GetCurX() || nPosY != (SCsROW) pViewData->GetCurY() );
if (bHide)
@@ -461,7 +461,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
{
if (!bAnchor)
{
- pView->DoneRefMode( TRUE );
+ pView->DoneRefMode( sal_True );
pView->InitRefMode( nPosX, nPosY, pViewData->GetTabNo(), SC_REFTYPE_REF );
}
@@ -485,7 +485,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
ScRange aDelRange;
- BOOL bOldDelMark = pViewData->GetDelMark( aDelRange );
+ sal_Bool bOldDelMark = pViewData->GetDelMark( aDelRange );
if ( nPosX+1 >= (SCsCOL) nStartX && nPosX <= (SCsCOL) nEndX &&
nPosY+1 >= (SCsROW) nStartY && nPosY <= (SCsROW) nEndY &&
@@ -538,8 +538,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
pViewData->GetView()->UpdateShrinkOverlay();
}
- BOOL bNegX = ( nPosX < (SCsCOL) nStartX );
- BOOL bNegY = ( nPosY < (SCsROW) nStartY );
+ sal_Bool bNegX = ( nPosX < (SCsCOL) nStartX );
+ sal_Bool bNegY = ( nPosY < (SCsROW) nStartY );
long nSizeX = 0;
if ( bNegX )
@@ -573,12 +573,12 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
if ( nSizeX > nSizeY ) // Fill immer nur in einer Richtung
{
nPosY = nEndY;
- bNegY = FALSE;
+ bNegY = false;
}
else
{
nPosX = nEndX;
- bNegX = FALSE;
+ bNegX = false;
}
SCCOL nRefStX = bNegX ? nEndX : nStartX;
@@ -594,7 +594,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
else if (pViewData->IsAnyFillMode())
{
- BYTE nMode = pViewData->GetFillMode();
+ sal_uInt8 nMode = pViewData->GetFillMode();
if ( nMode == SC_FILL_EMBED_LT || nMode == SC_FILL_EMBED_RB )
{
DBG_ASSERT( pDoc->IsEmbedded(), "!pDoc->IsEmbedded()" );
@@ -634,7 +634,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
else // normales Markieren
{
- BOOL bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() ||
+ sal_Bool bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() ||
(SCROW)nPosY != pViewData->GetCurY() );
if (bHideCur)
pView->HideAllCursors(); // sonst zweimal: Block und SetCursor
@@ -643,18 +643,18 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
{
if (!bStarted)
{
- BOOL bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() ||
+ sal_Bool bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() ||
nPosY != (SCsROW) aAnchorPos.Row() );
if ( bMove || ( pEngine && pEngine->GetMouseEvent().IsShift() ) )
{
pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(),
- aAnchorPos.Tab(), TRUE );
- bStarted = TRUE;
+ aAnchorPos.Tab(), sal_True );
+ bStarted = sal_True;
}
}
if (bStarted)
// If the selection is already started, don't set the cursor.
- pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, FALSE, FALSE, TRUE );
+ pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, false, false, true );
else
pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
}
@@ -663,12 +663,12 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
ScMarkData& rMark = pViewData->GetMarkData();
if (rMark.IsMarked() || rMark.IsMultiMarked())
{
- pView->DoneBlockMode(TRUE);
- pView->InitBlockMode( nPosX, nPosY, nTab, TRUE );
+ pView->DoneBlockMode(sal_True);
+ pView->InitBlockMode( nPosX, nPosY, nTab, sal_True );
pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
- bStarted = TRUE;
+ bStarted = sal_True;
}
// #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells,
// it highlights that new cell as well as the old cell where the cursor is
@@ -679,18 +679,18 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
SCCOL nOldX = pViewData->GetCurX();
SCROW nOldY = pViewData->GetCurY();
- pView->InitBlockMode( nOldX, nOldY, nTab, TRUE );
+ pView->InitBlockMode( nOldX, nOldY, nTab, sal_True );
pView->MarkCursor( (SCCOL) nOldX, (SCROW) nOldY, nTab );
if ( nOldX != nPosX || nOldY != nPosY )
{
- pView->DoneBlockMode( TRUE );
- pView->InitBlockMode( nPosX, nPosY, nTab, TRUE );
+ pView->DoneBlockMode( sal_True );
+ pView->InitBlockMode( nPosX, nPosY, nTab, sal_True );
pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
}
- bStarted = TRUE;
+ bStarted = sal_True;
}
pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
}
@@ -703,17 +703,17 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
if (bHide)
pView->ShowAllCursors();
- return TRUE;
+ return sal_True;
}
-BOOL ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
- return FALSE;
+ return false;
if (pViewData->IsAnyFillMode())
- return FALSE;
+ return false;
ScMarkData& rMark = pViewData->GetMarkData();
if (bAnchor || !rMark.IsMultiMarked())
@@ -724,7 +724,7 @@ BOOL ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
return pViewData->GetMarkData().IsCellMarked( (SCCOL) nPosX, (SCROW) nPosY );
}
- return FALSE;
+ return false;
}
void ScViewFunctionSet::DeselectAtPoint( const Point& /* rPointPixel */ )
@@ -737,18 +737,18 @@ void ScViewFunctionSet::DeselectAll()
if (pViewData->IsAnyFillMode())
return;
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
{
- pViewData->GetView()->DoneRefMode( FALSE );
+ pViewData->GetView()->DoneRefMode( false );
}
else
{
- pViewData->GetView()->DoneBlockMode( FALSE );
+ pViewData->GetView()->DoneBlockMode( false );
pViewData->GetViewShell()->UpdateInputHandler();
}
- bAnchor = FALSE;
+ bAnchor = false;
}
//------------------------------------------------------------------------
@@ -760,7 +760,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
{
// Parameter einstellen
SetSelectionMode( MULTIPLE_SELECTION );
- EnableDrag( TRUE );
+ EnableDrag( sal_True );
}
@@ -772,15 +772,15 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
ScHeaderFunctionSet::ScHeaderFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
- bColumn( FALSE ),
+ bColumn( false ),
eWhich( SC_SPLIT_TOPLEFT ),
- bAnchor( FALSE ),
+ bAnchor( false ),
nCursorPos( 0 )
{
DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet");
}
-void ScHeaderFunctionSet::SetColumn( BOOL bSet )
+void ScHeaderFunctionSet::SetColumn( sal_Bool bSet )
{
bColumn = bSet;
}
@@ -801,41 +801,41 @@ void ScHeaderFunctionSet::CreateAnchor()
return;
ScTabView* pView = pViewData->GetView();
- pView->DoneBlockMode( TRUE );
+ pView->DoneBlockMode( sal_True );
if (bColumn)
{
- pView->InitBlockMode( static_cast<SCCOL>(nCursorPos), 0, pViewData->GetTabNo(), TRUE, TRUE, FALSE );
+ pView->InitBlockMode( static_cast<SCCOL>(nCursorPos), 0, pViewData->GetTabNo(), sal_True, sal_True, false );
pView->MarkCursor( static_cast<SCCOL>(nCursorPos), MAXROW, pViewData->GetTabNo() );
}
else
{
- pView->InitBlockMode( 0, nCursorPos, pViewData->GetTabNo(), TRUE, FALSE, TRUE );
+ pView->InitBlockMode( 0, nCursorPos, pViewData->GetTabNo(), sal_True, false, sal_True );
pView->MarkCursor( MAXCOL, nCursorPos, pViewData->GetTabNo() );
}
- bAnchor = TRUE;
+ bAnchor = sal_True;
}
void ScHeaderFunctionSet::DestroyAnchor()
{
- pViewData->GetView()->DoneBlockMode( TRUE );
- bAnchor = FALSE;
+ pViewData->GetView()->DoneBlockMode( sal_True );
+ bAnchor = false;
}
-BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDontSelectAtCursor */ )
+sal_Bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ )
{
if ( bDidSwitch )
{
// die naechste gueltige Position muss vom anderen Fenster kommen
if ( rPointPixel == aSwitchPos )
- return FALSE; // nicht auf falschem Fenster scrollen
+ return false; // nicht auf falschem Fenster scrollen
else
- bDidSwitch = FALSE;
+ bDidSwitch = false;
}
// Scrolling
Size aWinSize = pViewData->GetActiveWin()->GetOutputSizePixel();
- BOOL bScroll;
+ sal_Bool bScroll;
if (bColumn)
bScroll = ( rPointPixel.X() < 0 || rPointPixel.X() >= aWinSize.Width() );
else
@@ -843,7 +843,7 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
// ueber Fixier-Grenze bewegt?
- BOOL bSwitched = FALSE;
+ sal_Bool bSwitched = false;
if ( bColumn )
{
if ( pViewData->GetHSplitMode() == SC_SPLIT_FIX )
@@ -851,9 +851,9 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if ( rPointPixel.X() > aWinSize.Width() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bSwitched = sal_True;
else if ( eWhich == SC_SPLIT_BOTTOMLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = sal_True;
}
}
}
@@ -864,17 +864,17 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if ( rPointPixel.Y() > aWinSize.Height() )
{
if ( eWhich == SC_SPLIT_TOPLEFT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bSwitched = sal_True;
else if ( eWhich == SC_SPLIT_TOPRIGHT )
- pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = TRUE;
+ pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = sal_True;
}
}
}
if (bSwitched)
{
aSwitchPos = rPointPixel;
- bDidSwitch = TRUE;
- return FALSE; // nicht mit falschen Positionen rechnen
+ bDidSwitch = sal_True;
+ return false; // nicht mit falschen Positionen rechnen
}
//
@@ -882,7 +882,7 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
- nPosX, nPosY, FALSE );
+ nPosX, nPosY, false );
if (bColumn)
{
nCursorPos = static_cast<SCCOLROW>(nPosX);
@@ -895,7 +895,7 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
}
ScTabView* pView = pViewData->GetView();
- BOOL bHide = pViewData->GetCurX() != nPosX ||
+ sal_Bool bHide = pViewData->GetCurX() != nPosX ||
pViewData->GetCurY() != nPosY;
if (bHide)
pView->HideAllCursors();
@@ -906,11 +906,11 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if ( !bAnchor || !pView->IsBlockMode() )
{
- pView->DoneBlockMode( TRUE );
+ pView->DoneBlockMode( sal_True );
pViewData->GetMarkData().MarkToMulti(); //! wer verstellt das ???
- pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), TRUE, bColumn, !bColumn );
+ pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), sal_True, bColumn, !bColumn );
- bAnchor = TRUE;
+ bAnchor = sal_True;
}
pView->MarkCursor( nPosX, nPosY, pViewData->GetTabNo(), bColumn, !bColumn );
@@ -921,15 +921,15 @@ BOOL ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bD
if (bHide)
pView->ShowAllCursors();
- return TRUE;
+ return sal_True;
}
-BOOL ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
- nPosX, nPosY, FALSE );
+ nPosX, nPosY, false );
ScMarkData& rMark = pViewData->GetMarkData();
if (bColumn)
@@ -944,8 +944,8 @@ void ScHeaderFunctionSet::DeselectAtPoint( const Point& /* rPointPixel */ )
void ScHeaderFunctionSet::DeselectAll()
{
- pViewData->GetView()->DoneBlockMode( FALSE );
- bAnchor = FALSE;
+ pViewData->GetView()->DoneBlockMode( false );
+ bAnchor = false;
}
//------------------------------------------------------------------------
@@ -955,7 +955,7 @@ ScHeaderSelectionEngine::ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunct
{
// Parameter einstellen
SetSelectionMode( MULTIPLE_SELECTION );
- EnableDrag( FALSE );
+ EnableDrag( false );
}
diff --git a/sc/source/ui/view/selectionstate.cxx b/sc/source/ui/view/selectionstate.cxx
index 3412dd53f03a..93bcb4c68082 100644
--- a/sc/source/ui/view/selectionstate.cxx
+++ b/sc/source/ui/view/selectionstate.cxx
@@ -58,7 +58,7 @@ ScSelectionState::ScSelectionState( ScViewData& rViewData ) :
if( rMarkData.IsMultiMarked() )
{
meType = SC_SELECTTYPE_SHEET;
- rMarkData.FillRangeListWithMarks( &maSheetSel, FALSE );
+ rMarkData.FillRangeListWithMarks( &maSheetSel, false );
}
// else type is SC_SELECTTYPE_NONE - already initialized
}
@@ -70,10 +70,10 @@ bool operator==( const ScSelectionState& rL, const ScSelectionState& rR )
if( bEqual ) switch( rL.GetSelectionType() )
{
case SC_SELECTTYPE_EDITCELL:
- bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != FALSE );
+ bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != false );
// run through!
case SC_SELECTTYPE_SHEET:
- bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == TRUE;
+ bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == sal_True;
// run through!
case SC_SELECTTYPE_NONE:
bEqual &= rL.GetCellCursor() == rR.GetCellCursor();
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index a9c9b7a68c3f..a852f8e5f68b 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -50,7 +50,7 @@
SFX_IMPL_CHILDWINDOW( ScSpellDialogChildWindow, SID_SPELL_DIALOG )
-ScSpellDialogChildWindow::ScSpellDialogChildWindow( Window* pParentP, USHORT nId,
+ScSpellDialogChildWindow::ScSpellDialogChildWindow( Window* pParentP, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
::svx::SpellDialogChildWindow( pParentP, nId, pBindings, pInfo ),
mpViewShell( 0 ),
@@ -149,7 +149,7 @@ void ScSpellDialogChildWindow::Reset()
}
mpViewData->SetSpellingView( 0 );
- mpViewShell->KillEditView( TRUE );
+ mpViewShell->KillEditView( sal_True );
mpDocShell->PostPaintGridAll();
mpViewShell->UpdateInputHandler();
mpDoc->DisableIdle( mbOldIdleDisabled );
@@ -221,7 +221,7 @@ void ScSpellDialogChildWindow::Init()
}
mbOldIdleDisabled = mpDoc->IsIdleDisabled();
- mpDoc->DisableIdle( TRUE ); // stop online spelling
+ mpDoc->DisableIdle( true ); // stop online spelling
// *** create Undo/Redo documents *** -------------------------------------
@@ -255,7 +255,7 @@ void ScSpellDialogChildWindow::Init()
Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) );
pEditView->SetOutputArea( aRect );
mxEngine->SetControlWord( EE_CNTRL_USECHARATTRIBS );
- mxEngine->EnableUndo( FALSE );
+ mxEngine->EnableUndo( false );
mxEngine->SetPaperSize( aRect.GetSize() );
mxEngine->SetText( EMPTY_STRING );
mxEngine->ClearModifyFlag();
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 08d6b72e088d..e5e1b38da726 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -116,7 +116,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
String aNewStr = GetText();
- BOOL bMultiTab = (rMark.GetSelectCount() > 1);
+ sal_Bool bMultiTab = (rMark.GetSelectCount() > 1);
String aVisibleStr;
if( bMultiTab )
mrDoc.GetString( mnCurrCol, mnCurrRow, mnStartTab, aVisibleStr );
@@ -250,7 +250,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
if( bFound )
{
pViewShell->AlignToCursor( nNewCol, nNewRow, SC_FOLLOW_JUMP );
- pViewShell->SetCursor( nNewCol, nNewRow, TRUE );
+ pViewShell->SetCursor( nNewCol, nNewRow, sal_True );
mrViewData.GetView()->MakeEditView( this, nNewCol, nNewRow );
EditView* pEditView = mrViewData.GetSpellingView();
// maSelState.GetEditSelection() returns (0,0) if not in edit mode -> ok
@@ -330,7 +330,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView )
{
EESpellState eState = EE_SPELL_OK;
if( FindNextConversionCell() )
- eState = rEditView.StartSpeller( static_cast< BOOL >( TRUE ) );
+ eState = rEditView.StartSpeller( static_cast< sal_Bool >( sal_True ) );
DBG_ASSERT( eState != EE_SPELL_NOSPELLER, "ScSpellingEngine::Convert - no spell checker" );
if( eState == EE_SPELL_NOLANGUAGE )
@@ -341,7 +341,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView )
}
}
-BOOL ScSpellingEngine::SpellNextDocument()
+sal_Bool ScSpellingEngine::SpellNextDocument()
{
return FindNextConversionCell();
}
@@ -370,7 +370,7 @@ void ScSpellingEngine::ShowFinishDialog()
Window* ScSpellingEngine::GetDialogParent()
{
- USHORT nWinId = ScSpellDialogChildWindow::GetChildWindowId();
+ sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame();
if( pViewFrm->HasChildWindow( nWinId ) )
if( SfxChildWindow* pChild = pViewFrm->GetChildWindow( nWinId ) )
@@ -439,13 +439,13 @@ void ScTextConversionEngine::ConvertAll( EditView& rEditView )
{
rEditView.StartTextConversion(
maConvParam.GetSourceLang(), maConvParam.GetTargetLang(), maConvParam.GetTargetFont(),
- maConvParam.GetOptions(), maConvParam.IsInteractive(), TRUE );
+ maConvParam.GetOptions(), maConvParam.IsInteractive(), sal_True );
// #i34769# restore initial cursor position
RestoreCursorPos();
}
}
-BOOL ScTextConversionEngine::ConvertNextDocument()
+sal_Bool ScTextConversionEngine::ConvertNextDocument()
{
return FindNextConversionCell();
}
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 567937f4f5e9..1f1aca34902a 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -63,7 +63,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
pViewData( pData ),
nMouseClickPageId( TabBar::PAGE_NOT_FOUND ),
nSelPageIdByMouse( TabBar::PAGE_NOT_FOUND ),
- bErrorShown( FALSE )
+ bErrorShown( false )
{
ScDocument* pDoc = pViewData->GetDocument();
@@ -103,9 +103,9 @@ ScTabControl::~ScTabControl()
{
}
-USHORT ScTabControl::GetMaxId() const
+sal_uInt16 ScTabControl::GetMaxId() const
{
- USHORT nVisCnt = GetPageCount();
+ sal_uInt16 nVisCnt = GetPageCount();
if (nVisCnt)
return GetPageId(nVisCnt-1);
@@ -114,7 +114,7 @@ USHORT ScTabControl::GetMaxId() const
SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos )
{
- USHORT nPos = ShowDropPos(rPos);
+ sal_uInt16 nPos = ShowDropPos(rPos);
SCTAB nRealPos = static_cast<SCTAB>(nPos);
@@ -124,7 +124,7 @@ SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos )
SCTAB nCount = pDoc->GetTableCount();
- USHORT nViewPos=0;
+ sal_uInt16 nViewPos=0;
nRealPos = nCount;
for (SCTAB i=0; i<nCount; i++)
{
@@ -202,7 +202,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
// Click in the area next to the existing tabs:
// #i70320# if several sheets are selected, deselect all ecxept the current sheet,
// otherwise add new sheet
- USHORT nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE;
+ sal_uInt16 nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE;
SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher();
pDispatcher->Execute( nSlot, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
// forget page ID, to be really sure that the dialog is not called twice
@@ -238,9 +238,9 @@ void ScTabControl::Select()
return;
}
- USHORT nCurId = GetCurPageId();
+ sal_uInt16 nCurId = GetCurPageId();
if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist
- USHORT nPage = nCurId - 1;
+ sal_uInt16 nPage = nCurId - 1;
// OLE-inplace deaktivieren
if ( nPage != static_cast<sal_uInt16>(pViewData->GetTabNo()) )
@@ -248,7 +248,7 @@ void ScTabControl::Select()
// InputEnterHandler nur wenn nicht Referenzeingabe
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if (!bRefMode)
pScMod->InputEnterHandler();
@@ -309,7 +309,7 @@ void ScTabControl::UpdateStatus()
{
ScDocument* pDoc = pViewData->GetDocument();
ScMarkData& rMark = pViewData->GetMarkData();
- BOOL bActive = pViewData->IsActive();
+ sal_Bool bActive = pViewData->IsActive();
SCTAB nCount = pDoc->GetTableCount();
SCTAB i;
@@ -317,7 +317,7 @@ void ScTabControl::UpdateStatus()
SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) );
Color aTabBgColor;
- BOOL bModified = FALSE; // Tabellen-Namen
+ sal_Bool bModified = false; // Tabellen-Namen
for (i=0; i<nMaxCnt && !bModified; i++)
{
if (pDoc->IsVisible(i))
@@ -331,7 +331,7 @@ void ScTabControl::UpdateStatus()
}
if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) )
- bModified = TRUE;
+ bModified = sal_True;
}
if (bModified)
@@ -360,10 +360,10 @@ void ScTabControl::UpdateStatus()
if (bActive)
{
- bModified = FALSE; // Selektion
+ bModified = false; // Selektion
for (i=0; i<nMaxCnt && !bModified; i++)
if ( rMark.GetTableSelect(i) != IsPageSelected(static_cast<sal_uInt16>(i)+1) )
- bModified = TRUE;
+ bModified = sal_True;
// #i99576# the following loop is mis-optimized on unxsoli4 and the reason
// why this file is in NOOPTFILES.
@@ -376,23 +376,23 @@ void ScTabControl::UpdateStatus()
}
}
-void ScTabControl::ActivateView(BOOL bActivate)
+void ScTabControl::ActivateView(sal_Bool bActivate)
{
ScMarkData& rMark = pViewData->GetMarkData();
- USHORT nCurId = GetCurPageId();
+ sal_uInt16 nCurId = GetCurPageId();
if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist
- USHORT nPage = nCurId - 1;
+ sal_uInt16 nPage = nCurId - 1;
if (bActivate)
{
- SelectPage( nPage+1, TRUE );
- rMark.SelectTable( static_cast<SCTAB>(nPage), TRUE );
+ SelectPage( nPage+1, sal_True );
+ rMark.SelectTable( static_cast<SCTAB>(nPage), sal_True );
}
Invalidate();
}
-void ScTabControl::SetSheetLayoutRTL( BOOL bSheetRTL )
+void ScTabControl::SetSheetLayoutRTL( sal_Bool bSheetRTL )
{
SetEffectiveRTL( bSheetRTL );
nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND;
@@ -403,12 +403,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
{
ScModule* pScMod = SC_MOD();
ScTabViewShell* pViewSh = pViewData->GetViewShell();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
// ViewFrame erstmal aktivieren (Bug 19493):
pViewSh->SetActive();
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_CONTEXTMENU )
{
if (!bDisable)
@@ -416,19 +416,19 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
// #i18735# select the page that is under the mouse cursor
// if multiple tables are selected and the one under the cursor
// is not part of them then unselect them
- USHORT nId = GetPageId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() );
if (nId)
{
- BOOL bAlreadySelected = IsPageSelected( nId );
+ sal_Bool bAlreadySelected = IsPageSelected( nId );
//make the clicked page the current one
SetCurPageId( nId );
//change the selection when the current one is not already
//selected or part of a multi selection
if(!bAlreadySelected)
{
- USHORT nCount = GetMaxId();
+ sal_uInt16 nCount = GetMaxId();
- for (USHORT i=1; i<=nCount; i++)
+ for (sal_uInt16 i=1; i<=nCount; i++)
SelectPage( i, i==nId );
Select();
}
@@ -447,12 +447,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
{
ScModule* pScMod = SC_MOD();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
if (!bDisable)
{
Region aRegion( Rectangle(0,0,0,0) );
- CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, TRUE ); // needed for StartDrag
+ CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, sal_True ); // needed for StartDrag
if (TabBar::StartDrag( aCEvt, aRegion ))
DoDrag( aRegion );
}
@@ -489,9 +489,9 @@ void ScTabControl::DoDrag( const Region& /* rRegion */ )
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
-USHORT lcl_DocShellNr( ScDocument* pDoc )
+sal_uInt16 lcl_DocShellNr( ScDocument* pDoc )
{
- USHORT nShellCnt = 0;
+ sal_uInt16 nShellCnt = 0;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
while ( pShell )
{
@@ -535,7 +535,7 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE );
rData.pCellTransfer->SetDragWasInternal(); // don't delete
- return TRUE;
+ return sal_True;
}
else
Sound::Beep();
@@ -589,12 +589,12 @@ long ScTabControl::AllowRenaming()
DBG_ASSERT( pViewSh, "pViewData->GetViewShell()" );
long nRet = TABBAR_RENAMING_CANCEL;
- USHORT nId = GetEditPageId();
+ sal_uInt16 nId = GetEditPageId();
if ( nId )
{
SCTAB nTab = nId - 1;
String aNewName = GetEditText();
- BOOL bDone = pViewSh->RenameTable( aNewName, nTab );
+ sal_Bool bDone = pViewSh->RenameTable( aNewName, nTab );
if ( bDone )
nRet = TABBAR_RENAMING_YES;
else if ( bErrorShown )
@@ -613,9 +613,9 @@ long ScTabControl::AllowRenaming()
}
else
{
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
pViewSh->ErrorMessage( STR_INVALIDTABNAME );
- bErrorShown = FALSE;
+ bErrorShown = false;
nRet = TABBAR_RENAMING_NO;
}
}
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 868d7d478bdf..e60809da9d51 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -45,8 +45,8 @@ ScTabSplitter::ScTabSplitter( Window* pParent, WinBits nWinStyle, ScViewData* pD
Splitter( pParent, nWinStyle ),
pViewData(pData)
{
- SetFixed(FALSE);
- EnableRTL( FALSE );
+ SetFixed(false);
+ EnableRTL( false );
}
@@ -91,7 +91,7 @@ void ScTabSplitter::Splitting( Point& rSplitPos )
}
-void ScTabSplitter::SetFixed(BOOL bSet)
+void ScTabSplitter::SetFixed(sal_Bool bSet)
{
bFixed = bSet;
if (bSet)
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index aee6f9d41cf7..a00c71b95918 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -168,14 +168,14 @@ using namespace ::com::sun::star;
// Corner-Button
-ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional ) :
+ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional ) :
Window( pParent, WinBits( 0 ) ),
pViewData( pData ),
bAdd( bAdditional )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SetBackground( rStyleSettings.GetFaceColor() );
- EnableRTL( FALSE );
+ EnableRTL( false );
}
ScCornerButton::~ScCornerButton()
@@ -192,7 +192,7 @@ void ScCornerButton::Paint( const Rectangle& rRect )
Window::Paint(rRect);
- BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
long nDarkX = bLayoutRTL ? 0 : nPosX;
if ( !bAdd )
@@ -256,42 +256,42 @@ void ScCornerButton::Resize()
void ScCornerButton::MouseButtonDown( const MouseEvent& rMEvt )
{
ScModule* pScMod = SC_MOD();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
if (!bDisable)
{
ScTabViewShell* pViewSh = pViewData->GetViewShell();
pViewSh->SetActive(); // Appear und SetViewFrame
pViewSh->ActiveGrabFocus();
- BOOL bControl = rMEvt.IsMod1();
+ sal_Bool bControl = rMEvt.IsMod1();
pViewSh->SelectAll( bControl );
}
}
//==================================================================
-BOOL lcl_HasColOutline( const ScViewData& rViewData )
+sal_Bool lcl_HasColOutline( const ScViewData& rViewData )
{
const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo());
if (pTable)
{
const ScOutlineArray* pArray = pTable->GetColArray();
if ( pArray->GetDepth() > 0 )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL lcl_HasRowOutline( const ScViewData& rViewData )
+sal_Bool lcl_HasRowOutline( const ScViewData& rViewData )
{
const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo());
if (pTable)
{
const ScOutlineArray* pArray = pTable->GetRowArray();
if ( pArray->GetDepth() > 0 )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//==================================================================
@@ -306,33 +306,33 @@ BOOL lcl_HasRowOutline( const ScViewData& rViewData )
pHdrSelEng( NULL ), \
aHdrFunc( &aViewData ), \
pDrawView( NULL ), \
- bDrawSelMode( FALSE ), \
+ bDrawSelMode( false ), \
aVScrollTop( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \
aVScrollBottom( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \
aHScrollLeft( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \
aHScrollRight( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \
- aCornerButton( pFrameWin, &aViewData, FALSE ), \
- aTopButton( pFrameWin, &aViewData, TRUE ), \
+ aCornerButton( pFrameWin, &aViewData, false ), \
+ aTopButton( pFrameWin, &aViewData, sal_True ), \
aScrollBarBox( pFrameWin, WB_SIZEABLE ), \
pInputHintWindow( NULL ), \
pPageBreakData( NULL ), \
pHighlightRanges( NULL ), \
pBrushDocument( NULL ), \
pDrawBrushSet( NULL ), \
- bLockPaintBrush( FALSE ), \
+ bLockPaintBrush( false ), \
pTimerWindow( NULL ), \
nTipVisible( 0 ), \
- bDragging( FALSE ), \
- bIsBlockMode( FALSE ), \
- bBlockNeg( FALSE ), \
- bBlockCols( FALSE ), \
- bBlockRows( FALSE ), \
+ bDragging( false ), \
+ bIsBlockMode( false ), \
+ bBlockNeg( false ), \
+ bBlockCols( false ), \
+ bBlockRows( false ), \
mfPendingTabBarWidth( -1.0 ), \
- bMinimized( FALSE ), \
- bInUpdateHeader( FALSE ), \
- bInActivatePart( FALSE ), \
- bInZoomUpdate( FALSE ), \
- bMoveIsShift( FALSE )
+ bMinimized( false ), \
+ bInUpdateHeader( false ), \
+ bInActivatePart( false ), \
+ bInZoomUpdate( false ), \
+ bMoveIsShift( false )
ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
@@ -383,7 +383,7 @@ IMPL_LINK( ScTabView, TimerHdl, Timer*, EMPTYARG )
// --- Resize ---------------------------------------------------------------------
void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize,
- long nTotalWidth, BOOL bLayoutRTL )
+ long nTotalWidth, sal_Bool bLayoutRTL )
{
Point aNewPos = rPos;
if ( bLayoutRTL )
@@ -399,36 +399,36 @@ void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize,
rWindow.SetPosSizePixel( aNewPos, rSize );
}
-void ScTabView::DoResize( const Point& rOffset, const Size& rSize, BOOL bInner )
+void ScTabView::DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner )
{
HideListBox();
- BOOL bHasHint = ( pInputHintWindow != NULL );
+ sal_Bool bHasHint = ( pInputHintWindow != NULL );
if (bHasHint)
RemoveHintWindow();
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
long nTotalWidth = rSize.Width();
if ( bLayoutRTL )
nTotalWidth += 2*rOffset.X();
- BOOL bVScroll = aViewData.IsVScrollMode();
- BOOL bHScroll = aViewData.IsHScrollMode();
- BOOL bTabControl = aViewData.IsTabMode();
- BOOL bHeaders = aViewData.IsHeaderMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bVScroll = aViewData.IsVScrollMode();
+ sal_Bool bHScroll = aViewData.IsHScrollMode();
+ sal_Bool bTabControl = aViewData.IsTabMode();
+ sal_Bool bHeaders = aViewData.IsHeaderMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
// Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode();
if ( eMode == SCROLLING_NO )
- bHScroll = bVScroll = FALSE;
+ bHScroll = bVScroll = false;
else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ???
- bHScroll = bVScroll = TRUE;
+ bHScroll = bVScroll = sal_True;
if ( aViewData.GetDocShell()->IsPreview() )
- bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = FALSE;
+ bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = false;
long nBarX = 0;
long nBarY = 0;
@@ -820,40 +820,40 @@ void ScTabView::UpdateVarZoom()
SvxZoomType eZoomType = GetZoomType();
if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate )
{
- bInZoomUpdate = TRUE;
+ bInZoomUpdate = sal_True;
const Fraction& rOldX = GetViewData()->GetZoomX();
const Fraction& rOldY = GetViewData()->GetZoomY();
long nOldPercent = ( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator();
- USHORT nNewZoom = CalcZoom( eZoomType, (USHORT)nOldPercent );
+ sal_uInt16 nNewZoom = CalcZoom( eZoomType, (sal_uInt16)nOldPercent );
Fraction aNew( nNewZoom, 100 );
if ( aNew != rOldX || aNew != rOldY )
{
- SetZoom( aNew, aNew, FALSE ); // always separately per sheet
+ SetZoom( aNew, aNew, false ); // always separately per sheet
PaintGrid();
PaintTop();
PaintLeft();
aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
}
- bInZoomUpdate = FALSE;
+ bInZoomUpdate = false;
}
}
void ScTabView::UpdateFixPos()
{
- BOOL bResize = FALSE;
+ sal_Bool bResize = false;
if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixX())
- bResize = TRUE;
+ bResize = sal_True;
if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixY())
- bResize = TRUE;
+ bResize = sal_True;
if (bResize)
- RepeatResize(FALSE);
+ RepeatResize(false);
}
-void ScTabView::RepeatResize( BOOL bUpdateFix )
+void ScTabView::RepeatResize( sal_Bool bUpdateFix )
{
if ( bUpdateFix )
{
@@ -879,12 +879,12 @@ void ScTabView::RepeatResize( BOOL bUpdateFix )
void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ )
{
- BOOL bScrollBars = aViewData.IsVScrollMode();
- BOOL bHeaders = aViewData.IsHeaderMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bScrollBars = aViewData.IsVScrollMode();
+ sal_Bool bHeaders = aViewData.IsHeaderMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
rBorder = SvBorder();
@@ -912,14 +912,14 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ )
IMPL_LINK( ScTabView, TabBarResize, void*, EMPTYARG )
{
- BOOL bHScrollMode = aViewData.IsHScrollMode();
+ sal_Bool bHScrollMode = aViewData.IsHScrollMode();
// Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode();
if ( eMode == SCROLLING_NO )
- bHScrollMode = FALSE;
+ bHScrollMode = false;
else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ???
- bHScrollMode = TRUE;
+ bHScrollMode = sal_True;
if( bHScrollMode )
{
@@ -1001,7 +1001,7 @@ Window* ScTabView::GetWindowByPos( ScSplitPos ePos )
void ScTabView::SetActivePointer( const Pointer& rPointer )
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetPointer( rPointer );
}
@@ -1018,7 +1018,7 @@ void ScTabView::ActiveGrabFocus()
ScSplitPos ScTabView::FindWindow( Window* pWindow ) const
{
ScSplitPos eVal = SC_SPLIT_BOTTOMLEFT; // Default
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] == pWindow )
eVal = (ScSplitPos) i;
@@ -1031,10 +1031,10 @@ Point ScTabView::GetGridOffset() const
// Groessen hier wie in DoResize
- BOOL bHeaders = aViewData.IsHeaderMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bHeaders = aViewData.IsHeaderMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
// Outline-Controls
if (bVOutline && pRowOutline[SC_SPLIT_BOTTOM])
@@ -1055,11 +1055,11 @@ Point ScTabView::GetGridOffset() const
// --- Scroll-Bars --------------------------------------------------------
-BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
+sal_Bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
{
HideNoteMarker();
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM )
{
@@ -1080,7 +1080,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
{
// scroll wheel doesn't set the AppOptions default
- BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
+ sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom );
Fraction aFract( nNew, 100 );
SetZoom( aFract, aFract, bSyncZoom );
@@ -1091,7 +1091,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
aViewData.GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
else
@@ -1108,7 +1108,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
{
- BOOL bOnlineScroll = TRUE; //! Optionen
+ sal_Bool bOnlineScroll = sal_True; //! Optionen
if ( bDragging )
{
@@ -1124,7 +1124,7 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
if ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight )
{
- BOOL bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
+ sal_Bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
ScHSplitPos eWhich = (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT;
long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich);
if (nDelta) ScrollX( nDelta, eWhich );
@@ -1132,20 +1132,20 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
else // VScroll...
{
ScVSplitPos eWhich = (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM;
- long nDelta = GetScrollBarPos( *pScroll, FALSE ) + nScrollMin - aViewData.GetPosY(eWhich);
+ long nDelta = GetScrollBarPos( *pScroll, false ) + nScrollMin - aViewData.GetPosY(eWhich);
if (nDelta) ScrollY( nDelta, eWhich );
}
}
- bDragging = FALSE;
+ bDragging = false;
}
return 0;
}
IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
{
- BOOL bOnlineScroll = TRUE; //! Optionen
+ sal_Bool bOnlineScroll = sal_True; //! Optionen
- BOOL bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight );
+ sal_Bool bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight );
long nViewPos;
if ( bHoriz )
nViewPos = aViewData.GetPosX( (pScroll == &aHScrollLeft) ?
@@ -1154,15 +1154,15 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
nViewPos = aViewData.GetPosY( (pScroll == &aVScrollTop) ?
SC_SPLIT_TOP : SC_SPLIT_BOTTOM );
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
- BOOL bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
ScrollType eType = pScroll->GetType();
if ( eType == SCROLL_DRAG )
{
if (!bDragging)
{
- bDragging = TRUE;
+ bDragging = sal_True;
nPrevDragPos = nViewPos;
}
@@ -1197,7 +1197,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
String aHelpStr;
Rectangle aRect;
- USHORT nAlign;
+ sal_uInt16 nAlign;
if (bHoriz)
{
aHelpStr = ScGlobal::GetRscString(STR_COLUMN);
@@ -1300,7 +1300,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
if (nDelta)
{
- BOOL bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern
+ sal_Bool bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern
if ( bHoriz )
ScrollX( nDelta, (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate );
else
@@ -1311,9 +1311,9 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
return 0;
}
-void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars )
+void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars )
{
- BOOL bHasHint = ( pInputHintWindow != NULL );
+ sal_Bool bHasHint = ( pInputHintWindow != NULL );
if (bHasHint)
RemoveHintWindow();
@@ -1400,9 +1400,9 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars )
TestHintWindow(); // neu positionieren
}
-void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars )
+void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars )
{
- BOOL bHasHint = ( pInputHintWindow != NULL );
+ sal_Bool bHasHint = ( pInputHintWindow != NULL );
if (bHasHint)
RemoveHintWindow();
@@ -1560,7 +1560,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
if ( nWidth != pRowBar[SC_SPLIT_BOTTOM]->GetWidth() && !bInUpdateHeader )
{
- bInUpdateHeader = TRUE;
+ bInUpdateHeader = sal_True;
pRowBar[SC_SPLIT_BOTTOM]->SetWidth( nWidth );
if (pRowBar[SC_SPLIT_TOP])
@@ -1571,11 +1571,11 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
// auf VCL gibt's Update ohne Ende (jedes Update gilt fuer alle Fenster)
//aCornerButton.Update(); // der bekommt sonst nie ein Update
- bInUpdateHeader = FALSE;
+ bInUpdateHeader = false;
}
}
-inline void ShowHide( Window* pWin, BOOL bShow )
+inline void ShowHide( Window* pWin, sal_Bool bShow )
{
DBG_ASSERT(pWin || !bShow, "Fenster ist nicht da");
if (pWin)
@@ -1584,26 +1584,26 @@ inline void ShowHide( Window* pWin, BOOL bShow )
void ScTabView::UpdateShow()
{
- BOOL bHScrollMode = aViewData.IsHScrollMode();
- BOOL bVScrollMode = aViewData.IsVScrollMode();
- BOOL bTabMode = aViewData.IsTabMode();
- BOOL bOutlMode = aViewData.IsOutlineMode();
- BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
- BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
- BOOL bHeader = aViewData.IsHeaderMode();
+ sal_Bool bHScrollMode = aViewData.IsHScrollMode();
+ sal_Bool bVScrollMode = aViewData.IsVScrollMode();
+ sal_Bool bTabMode = aViewData.IsTabMode();
+ sal_Bool bOutlMode = aViewData.IsOutlineMode();
+ sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData);
+ sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData);
+ sal_Bool bHeader = aViewData.IsHeaderMode();
- BOOL bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
- BOOL bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
// Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode();
if ( eMode == SCROLLING_NO )
- bHScrollMode = bVScrollMode = FALSE;
+ bHScrollMode = bVScrollMode = false;
else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ???
- bHScrollMode = bVScrollMode = TRUE;
+ bHScrollMode = bVScrollMode = sal_True;
if ( aViewData.GetDocShell()->IsPreview() )
- bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = FALSE;
+ bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = false;
//
// Windows anlegen
@@ -1696,7 +1696,7 @@ IMPL_LINK( ScTabView, SplitHdl, Splitter*, pSplitter )
DoVSplit( pVSplitter->GetSplitPosPixel() );
if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX || aViewData.GetVSplitMode() == SC_SPLIT_FIX )
- FreezeSplitters( TRUE );
+ FreezeSplitters( sal_True );
DoResize( aBorderPos, aFrameSize );
@@ -1708,7 +1708,7 @@ void ScTabView::DoHSplit(long nSplitPos)
// nSplitPos is the real pixel position on the frame window,
// mirroring for RTL has to be done here.
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
if ( bLayoutRTL )
nSplitPos = pFrameWin->GetOutputSizePixel().Width() - nSplitPos - 1;
@@ -1748,7 +1748,7 @@ void ScTabView::DoHSplit(long nSplitPos)
long nLeftWidth = nSplitPos - pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width();
if ( nLeftWidth < 0 ) nLeftWidth = 0;
nNewDelta = nOldDelta + aViewData.CellsAtX( nOldDelta, 1, SC_SPLIT_LEFT,
- (USHORT) nLeftWidth );
+ (sal_uInt16) nLeftWidth );
if ( nNewDelta > MAXCOL )
nNewDelta = MAXCOL;
aViewData.SetPosX( SC_SPLIT_RIGHT, nNewDelta );
@@ -1762,7 +1762,7 @@ void ScTabView::DoHSplit(long nSplitPos)
// Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
@@ -1820,7 +1820,7 @@ void ScTabView::DoVSplit(long nSplitPos)
long nTopHeight = nSplitPos - pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height();
if ( nTopHeight < 0 ) nTopHeight = 0;
nNewDelta = nOldDelta + aViewData.CellsAtY( nOldDelta, 1, SC_SPLIT_TOP,
- (USHORT) nTopHeight );
+ (sal_uInt16) nTopHeight );
if ( nNewDelta > MAXROW )
nNewDelta = MAXROW;
aViewData.SetPosY( SC_SPLIT_BOTTOM, nNewDelta );
@@ -1834,7 +1834,7 @@ void ScTabView::DoVSplit(long nSplitPos)
// Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
@@ -1890,7 +1890,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
long nDocX = (long)( (double) pDoc->GetColOffset( MAXCOL + 1, nTab ) * HMM_PER_TWIPS ) * nLayoutSign;
@@ -2008,7 +2008,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
bool bCenterHor = false;
@@ -2067,13 +2067,13 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL
return aRet;
}
-void ScTabView::LockModifiers( USHORT nModifiers )
+void ScTabView::LockModifiers( sal_uInt16 nModifiers )
{
pSelEngine->LockModifiers( nModifiers );
pHdrSelEng->LockModifiers( nModifiers );
}
-USHORT ScTabView::GetLockedModifiers() const
+sal_uInt16 ScTabView::GetLockedModifiers() const
{
return pSelEngine->GetLockedModifiers();
}
@@ -2089,7 +2089,7 @@ Point ScTabView::GetMousePosPixel()
return aPos;
}
-BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin )
+sal_Bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin )
{
if (pWin)
{
@@ -2100,18 +2100,18 @@ BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin )
Size aWinSize = pWin->GetOutputSizePixel();
if ( aRel.X() >= 0 && aRel.X() < aWinSize.Width() + SPLIT_HANDLE_SIZE &&
aRel.Y() >= 0 && aRel.Y() < aWinSize.Height() + SPLIT_HANDLE_SIZE )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScTabView::SnapSplitPos( Point& rScreenPosPixel )
{
- BOOL bOverWin = FALSE;
- USHORT i;
+ sal_Bool bOverWin = false;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (lcl_MouseIsOverWin(rScreenPosPixel,pGridWin[i]))
- bOverWin = TRUE;
+ bOverWin = sal_True;
if (!bOverWin)
return;
@@ -2135,19 +2135,19 @@ void ScTabView::SnapSplitPos( Point& rScreenPosPixel )
SCsCOL nPosX;
SCsROW nPosY;
// bNextIfLarge=FALSE: nicht auf naechste Zelle, wenn ausserhalb des Fensters
- aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, TRUE, FALSE, FALSE );
- BOOL bLeft;
- BOOL bTop;
+ aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, true, false, false );
+ sal_Bool bLeft;
+ sal_Bool bTop;
aViewData.GetMouseQuadrant( aMouse, ePos, nPosX, nPosY, bLeft, bTop );
if (!bLeft)
++nPosX;
if (!bTop)
++nPosY;
- aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE );
+ aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True );
rScreenPosPixel = pWin->OutputToNormalizedScreenPixel( aMouse );
}
-void ScTabView::FreezeSplitters( BOOL bFreeze )
+void ScTabView::FreezeSplitters( sal_Bool bFreeze )
{
ScSplitMode eOldH = aViewData.GetHSplitMode();
ScSplitMode eOldV = aViewData.GetVSplitMode();
@@ -2157,7 +2157,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
ePos = SC_SPLIT_TOPLEFT;
Window* pWin = pGridWin[ePos];
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
if ( bFreeze )
{
@@ -2179,8 +2179,8 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
aSplit.Y() = aViewData.GetVSplitPos() - aWinStart.Y();
aViewData.GetPosFromPixel( aSplit.X(), aSplit.Y(), ePos, nPosX, nPosY );
- BOOL bLeft;
- BOOL bTop;
+ sal_Bool bLeft;
+ sal_Bool bTop;
aViewData.GetMouseQuadrant( aSplit, ePos, nPosX, nPosY, bLeft, bTop );
if (!bLeft)
++nPosX;
@@ -2207,7 +2207,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
nBottomPos = aViewData.GetPosY(SC_SPLIT_BOTTOM);
}
- aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE );
+ aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True );
if (nPosX > aViewData.GetPosX(SC_SPLIT_LEFT)) // (aSplit.X() > 0) doesn't work for RTL
{
long nSplitPos = aSplit.X() + aWinStart.X();
@@ -2245,12 +2245,12 @@ void ScTabView::FreezeSplitters( BOOL bFreeze )
// Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
- RepeatResize(FALSE);
+ RepeatResize(false);
UpdateShow();
PaintLeft();
@@ -2281,7 +2281,7 @@ void ScTabView::SplitAtCursor()
SCCOL nPosX = aViewData.GetCurX();
SCROW nPosY = aViewData.GetCurY();
- Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, TRUE );
+ Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, sal_True );
if ( nPosX > 0 )
DoHSplit( aSplit.X() + aWinStart.X() );
else
@@ -2293,7 +2293,7 @@ void ScTabView::SplitAtCursor()
RepeatResize();
}
-void ScTabView::SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer ) // fuer API
+void ScTabView::SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer ) // fuer API
{
// Pixel ist auf die ganze View bezogen, nicht auf das erste GridWin
@@ -2330,7 +2330,7 @@ void ScTabView::SetNewVisArea()
// (auch wenn ansonsten der Edit-MapMode gesetzt ist)
MapMode aOldMode[4];
MapMode aDrawMode[4];
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
{
@@ -2380,7 +2380,7 @@ sal_Bool ScTabView::HasPageFieldDataAtCursor() const
if (pWin)
return pWin->GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE;
- return sal_False;
+ return false;
}
void ScTabView::StartDataSelect()
@@ -2417,7 +2417,7 @@ void ScTabView::StartDataSelect()
pWin->DoAutoFilterMenue(nCol, nRow, !pAttr->HasAutoFilter());
}
-void ScTabView::EnableRefInput(BOOL bFlag)
+void ScTabView::EnableRefInput(sal_Bool bFlag)
{
aHScrollLeft.EnableInput(bFlag);
aHScrollRight.EnableInput(bFlag);
@@ -2427,20 +2427,20 @@ void ScTabView::EnableRefInput(BOOL bFlag)
// ab hier dynamisch angelegte
- if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,TRUE);
+ if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,sal_True);
if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=NULL)
- pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,false);
if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=NULL)
- pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,false);
if(pGridWin[SC_SPLIT_TOPLEFT]!=NULL)
- pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,false);
if(pGridWin[SC_SPLIT_TOPRIGHT]!=NULL)
- pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,FALSE);
+ pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,false);
if(pColBar[SC_SPLIT_RIGHT]!=NULL)
- pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,FALSE);
+ pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,false);
if(pRowBar[SC_SPLIT_TOP]!=NULL)
- pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,FALSE);
+ pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,false);
}
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 76b820cb3fbf..160945c72864 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -73,8 +73,8 @@ void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
if (!ValidCol(nEndCol)) nEndCol = MAXCOL;
if (!ValidRow(nEndRow)) nEndRow = MAXROW;
- BOOL bLeft = (nStartCol==0 && nEndCol==MAXCOL);
- BOOL bTop = (nStartRow==0 && nEndRow==MAXROW);
+ sal_Bool bLeft = (nStartCol==0 && nEndCol==MAXCOL);
+ sal_Bool bTop = (nStartRow==0 && nEndRow==MAXROW);
if (bLeft)
PaintLeftArea( nStartRow, nEndRow );
@@ -86,7 +86,7 @@ void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
PaintArea( nStartCol, nStartRow, nEndCol, nEndRow, SC_UPDATE_MARKS );
}
-BOOL ScTabView::IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScTabView::IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
return bIsBlockMode
&& nBlockStartX == nCol
@@ -102,7 +102,7 @@ void ScTabView::InitOwnBlockMode()
ScMarkData& rMark = aViewData.GetMarkData();
if (!rMark.IsMarked() && !rMark.IsMultiMarked())
- GetSelEngine()->CursorPosChanging( FALSE, FALSE );
+ GetSelEngine()->CursorPosChanging( false, false );
bIsBlockMode = SC_BLOCKMODE_OWN; //! Variable umbenennen!
nBlockStartX = 0;
@@ -117,7 +117,7 @@ void ScTabView::InitOwnBlockMode()
}
void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bTestNeg, BOOL bCols, BOOL bRows )
+ sal_Bool bTestNeg, sal_Bool bCols, sal_Bool bRows )
{
if (!bIsBlockMode)
{
@@ -138,7 +138,7 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
bBlockNeg = rMark.IsCellMarked( nCurX, nCurY );
}
else
- bBlockNeg = FALSE;
+ bBlockNeg = false;
rMark.SetMarkNegative(bBlockNeg);
bIsBlockMode = SC_BLOCKMODE_NORMAL; //! Variable umbenennen!
@@ -169,7 +169,7 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
}
}
-void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
+void ScTabView::DoneBlockMode( sal_Bool bContinue ) // Default FALSE
{
// Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird,
// wird evtl. DeselectAll gerufen, weil die andere Engine keinen Anker hat.
@@ -178,8 +178,8 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
if (bIsBlockMode && !bMoveIsShift)
{
ScMarkData& rMark = aViewData.GetMarkData();
- BOOL bFlag = rMark.GetMarkingFlag();
- rMark.SetMarking(FALSE);
+ sal_Bool bFlag = rMark.GetMarkingFlag();
+ rMark.SetMarking(false);
if (bBlockNeg && !bContinue)
rMark.MarkToMulti();
@@ -195,19 +195,19 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE
SCTAB nTab = aViewData.GetTabNo();
ScDocument* pDoc = aViewData.GetDocument();
if ( pDoc->HasTable(nTab) )
- PaintBlock( TRUE ); // TRUE -> Block loeschen
+ PaintBlock( sal_True ); // sal_True -> Block loeschen
else
rMark.ResetMark();
}
bIsBlockMode = SC_BLOCKMODE_NONE; //! Variable umbenennen!
rMark.SetMarking(bFlag);
- rMark.SetMarkNegative(FALSE);
+ rMark.SetMarkNegative(false);
}
}
void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- BOOL bCols, BOOL bRows, BOOL bCellSelection )
+ sal_Bool bCols, sal_Bool bRows, sal_Bool bCellSelection )
{
if (!ValidCol(nCurX)) nCurX = MAXCOL;
if (!ValidRow(nCurY)) nCurY = MAXROW;
@@ -215,7 +215,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
if (!bIsBlockMode)
{
OSL_FAIL( "MarkCursor nicht im BlockMode" );
- InitBlockMode( nCurX, nCurY, nCurZ, FALSE, bCols, bRows );
+ InitBlockMode( nCurX, nCurY, nCurZ, false, bCols, bRows );
}
if (bCols)
@@ -235,9 +235,9 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
// (z.B. MarkToSimple, wenn per negativ alles bis auf ein Rechteck geloescht wurde)
// oder nach InitOwnBlockMode wird mit Shift-Klick weitermarkiert...
- BOOL bOldShift = bMoveIsShift;
- bMoveIsShift = FALSE; // wirklich umsetzen
- DoneBlockMode(FALSE); //! direkt Variablen setzen? (-> kein Geflacker)
+ sal_Bool bOldShift = bMoveIsShift;
+ bMoveIsShift = false; // wirklich umsetzen
+ DoneBlockMode(false); //! direkt Variablen setzen? (-> kein Geflacker)
bMoveIsShift = bOldShift;
InitBlockMode( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
@@ -264,7 +264,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
SCsCOL nBlockStartXOffset = 0;
SCsROW nCurYOffset = 0;
SCsROW nBlockStartYOffset = 0;
- BOOL bBlockStartMerged = FALSE;
+ sal_Bool bBlockStartMerged = false;
const ScMergeAttr* pMergeAttr = NULL;
ScDocument* pDocument = aViewData.GetDocument();
@@ -290,7 +290,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
nBlockStartXOrig - nCurX + nColSpan - 1 : 0;
nCurYOffset = nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1 ?
nBlockStartYOrig - nCurY + nRowSpan - 1 : 0;
- bBlockStartMerged = TRUE;
+ bBlockStartMerged = sal_True;
}
}
@@ -365,7 +365,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
}
if ( !bCols && !bRows )
- aHdrFunc.SetAnchorFlag( FALSE );
+ aHdrFunc.SetAnchorFlag( false );
}
void ScTabView::GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY)
@@ -813,21 +813,21 @@ void ScTabView::UpdateCopySourceOverlay()
void ScTabView::UpdateSelectionOverlay()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateSelectionOverlay();
}
void ScTabView::UpdateShrinkOverlay()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateShrinkOverlay();
}
void ScTabView::UpdateAllOverlays()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateAllOverlays();
}
@@ -836,20 +836,20 @@ void ScTabView::UpdateAllOverlays()
//! PaintBlock in zwei Methoden aufteilen: RepaintBlock und RemoveBlock o.ae.
//!
-void ScTabView::PaintBlock( BOOL bReset )
+void ScTabView::PaintBlock( sal_Bool bReset )
{
ScMarkData& rMark = aViewData.GetMarkData();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bMark = rMark.IsMarked();
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMark = rMark.IsMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if (bMark || bMulti)
{
ScRange aMarkRange;
HideAllCursors();
if (bMulti)
{
- BOOL bFlag = rMark.GetMarkingFlag();
- rMark.SetMarking(FALSE);
+ sal_Bool bFlag = rMark.GetMarkingFlag();
+ rMark.SetMarking(false);
rMark.MarkToMulti();
rMark.GetMultiMarkArea(aMarkRange);
rMark.MarkToSimple();
@@ -867,7 +867,7 @@ void ScTabView::PaintBlock( BOOL bReset )
nBlockEndY = aMarkRange.aEnd.Row();
nBlockEndZ = aMarkRange.aEnd.Tab();
- BOOL bDidReset = FALSE;
+ sal_Bool bDidReset = false;
if ( nTab>=nBlockStartZ && nTab<=nBlockEndZ )
{
@@ -878,7 +878,7 @@ void ScTabView::PaintBlock( BOOL bReset )
{
rMark.ResetMark();
UpdateSelectionOverlay();
- bDidReset = TRUE;
+ bDidReset = true;
}
}
else
@@ -892,7 +892,7 @@ void ScTabView::PaintBlock( BOOL bReset )
}
}
-void ScTabView::SelectAll( BOOL bContinue )
+void ScTabView::SelectAll( sal_Bool bContinue )
{
ScMarkData& rMark = aViewData.GetMarkData();
SCTAB nTab = aViewData.GetTabNo();
@@ -921,7 +921,7 @@ void ScTabView::SelectAllTables()
if (nCount>1)
{
for (SCTAB i=0; i<nCount; i++)
- rMark.SelectTable( i, TRUE );
+ rMark.SelectTable( i, sal_True );
aViewData.GetDocShell()->PostPaintExtras();
SfxBindings& rBind = aViewData.GetBindings();
@@ -946,7 +946,7 @@ void ScTabView::DeselectAllTables()
rBind.Invalidate( FID_TAB_DESELECTALL );
}
-BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom,
+sal_Bool lcl_FitsInWindow( double fScaleX, double fScaleY, sal_uInt16 nZoom,
long nWindowX, long nWindowY, ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCCOL nFixPosX, SCROW nFixPosY )
@@ -960,22 +960,22 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom,
for (nCol=0; nCol<nFixPosX; nCol++)
{
// for frozen panes, add both parts
- USHORT nColTwips = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nColTwips = pDoc->GetColWidth( nCol, nTab );
if (nColTwips)
{
nBlockX += (long)(nColTwips * fScaleX);
if (nBlockX > nWindowX)
- return FALSE;
+ return false;
}
}
for (nCol=nStartCol; nCol<=nEndCol; nCol++)
{
- USHORT nColTwips = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nColTwips = pDoc->GetColWidth( nCol, nTab );
if (nColTwips)
{
nBlockX += (long)(nColTwips * fScaleX);
if (nBlockX > nWindowX)
- return FALSE;
+ return false;
}
}
@@ -986,31 +986,31 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom,
continue;
// for frozen panes, add both parts
- USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab);
+ sal_uInt16 nRowTwips = pDoc->GetRowHeight(nRow, nTab);
if (nRowTwips)
{
nBlockY += (long)(nRowTwips * fScaleY);
if (nBlockY > nWindowY)
- return FALSE;
+ return false;
}
}
for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
{
- USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab);
+ sal_uInt16 nRowTwips = pDoc->GetRowHeight(nRow, nTab);
if (nRowTwips)
{
nBlockY += (long)(nRowTwips * fScaleY);
if (nBlockY > nWindowY)
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return sal_True;
}
-USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
+sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
{
- USHORT nZoom = 0; // Ergebnis
+ sal_uInt16 nZoom = 0; // Ergebnis
switch ( eType )
{
@@ -1081,11 +1081,11 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
double nPPTX = ScGlobal::nScreenPPTX / pDocSh->GetOutputFactor();
double nPPTY = ScGlobal::nScreenPPTY;
- USHORT nMin = MINZOOM;
- USHORT nMax = MAXZOOM;
+ sal_uInt16 nMin = MINZOOM;
+ sal_uInt16 nMax = MAXZOOM;
while ( nMax > nMin )
{
- USHORT nTest = (nMin+nMax+1)/2;
+ sal_uInt16 nTest = (nMin+nMax+1)/2;
if ( lcl_FitsInWindow(
nPPTX, nPPTY, nTest, aWinSize.Width(), aWinSize.Height(),
pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow,
@@ -1127,7 +1127,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
if ( pStyleSheet )
{
ScPrintFunc aPrintFunc( aViewData.GetDocShell(),
- aViewData.GetViewShell()->GetPrinter(TRUE),
+ aViewData.GetViewShell()->GetPrinter(sal_True),
nCurTab );
Size aPageSize = aPrintFunc.GetDataSize();
@@ -1183,7 +1183,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom )
if (eType == SVX_ZOOM_WHOLEPAGE && nZoomY < nNew)
nNew = nZoomY;
- nZoom = (USHORT) nNew;
+ nZoom = (sal_uInt16) nNew;
}
}
break;
@@ -1215,7 +1215,7 @@ void ScTabView::StopMarking()
void ScTabView::HideNoteMarker()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i] && pGridWin[i]->IsVisible())
pGridWin[i]->HideNoteMarker();
}
@@ -1240,7 +1240,7 @@ void ScTabView::MakeDrawLayer()
}
}
-void ScTabView::ErrorMessage( USHORT nGlobStrId )
+void ScTabView::ErrorMessage( sal_uInt16 nGlobStrId )
{
if ( SC_MOD()->IsInExecuteDrop() )
{
@@ -1252,7 +1252,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId )
Window* pParent = aViewData.GetDialogParent();
ScWaitCursorOff aWaitOff( pParent );
- BOOL bFocus = pParent && pParent->HasFocus();
+ sal_Bool bFocus = pParent && pParent->HasFocus();
if(nGlobStrId==STR_PROTECTIONERR)
{
@@ -1268,7 +1268,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId )
pParent->GrabFocus();
}
-Window* ScTabView::GetParentOrChild( USHORT nChildId )
+Window* ScTabView::GetParentOrChild( sal_uInt16 nChildId )
{
SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
@@ -1286,7 +1286,7 @@ Window* ScTabView::GetParentOrChild( USHORT nChildId )
return aViewData.GetDialogParent();
}
-void ScTabView::UpdatePageBreakData( BOOL bForcePaint )
+void ScTabView::UpdatePageBreakData( sal_Bool bForcePaint )
{
ScPageBreakData* pNewData = NULL;
@@ -1296,7 +1296,7 @@ void ScTabView::UpdatePageBreakData( BOOL bForcePaint )
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- USHORT nCount = pDoc->GetPrintRangeCount(nTab);
+ sal_uInt16 nCount = pDoc->GetPrintRangeCount(nTab);
if (!nCount)
nCount = 1;
pNewData = new ScPageBreakData(nCount);
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 89d39e290d88..28dab73660f6 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -116,17 +116,17 @@ using namespace com::sun::star;
// --- Public-Funktionen
//
-void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl )
+void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
pDoc->SkipOverlapped(nPosX, nPosY, nTab);
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if ( bRefMode )
{
- DoneRefMode( FALSE );
+ DoneRefMode( false );
if (bControl)
SC_MOD()->AddRefEntry();
@@ -145,9 +145,9 @@ void ScTabView::UpdateAutoFillMark()
{
// single selection or cursor
ScRange aMarkRange;
- BOOL bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
+ sal_Bool bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i] && pGridWin[i]->IsVisible())
pGridWin[i]->UpdateAutoFillMark( bMarked, aMarkRange );
@@ -173,7 +173,7 @@ void ScTabView::FakeButtonUp( ScSplitPos eWhich )
void ScTabView::HideAllCursors()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
{
@@ -187,7 +187,7 @@ void ScTabView::HideAllCursors()
void ScTabView::ShowAllCursors()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
{
@@ -279,7 +279,7 @@ void ScTabView::InvalidateAttribs()
#pragma optimize ( "", off )
#endif
-void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew )
+void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew )
{
SCCOL nOldX = aViewData.GetCurX();
SCROW nOldY = aViewData.GetCurY();
@@ -453,7 +453,7 @@ void ScTabView::SelectionChanged()
void ScTabView::CursorPosChanged()
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert
aViewData.GetDocShell()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
@@ -475,7 +475,7 @@ void ScTabView::TestHintWindow()
{
// show input help window and list drop-down button for validity
- BOOL bListValButton = FALSE;
+ sal_Bool bListValButton = false;
ScAddress aListValPos;
ScDocument* pDoc = aViewData.GetDocument();
@@ -557,13 +557,13 @@ void ScTabView::TestHintWindow()
if ( pData && pData->HasSelectionList() )
{
aListValPos.Set( aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() );
- bListValButton = TRUE;
+ bListValButton = sal_True;
}
}
else
DELETEZ(pInputHintWindow);
- for ( USHORT i=0; i<4; i++ )
+ for ( sal_uInt16 i=0; i<4; i++ )
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->UpdateListValPos( bListValButton, aListValPos );
}
@@ -620,8 +620,8 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
ScSplitPos eActive = aViewData.GetActivePart();
ScHSplitPos eActiveX = WhichH(eActive);
ScVSplitPos eActiveY = WhichV(eActive);
- BOOL bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX);
- BOOL bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX);
+ sal_Bool bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX);
+ sal_Bool bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX);
if (bHFix)
if (eActiveX == SC_SPLIT_LEFT && nCurX >= (SCsCOL)aViewData.GetFixPosX())
{
@@ -665,7 +665,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
long nSpaceY = ( aScrSize.Height() - nCellSizeY ) / 2;
// nSpaceY: desired start position of cell for FOLLOW_JUMP, modified if dialog interferes
- BOOL bForceNew = FALSE; // force new calculation of JUMP position (vertical only)
+ sal_Bool bForceNew = false; // force new calculation of JUMP position (vertical only)
// VisibleCellsY == CellsAtY( GetPosY( eWhichY ), 1, eWhichY )
@@ -680,7 +680,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
Window* pCare = lcl_GetCareWin( aViewData.GetViewShell()->GetViewFrame() );
if (pCare)
{
- BOOL bLimit = FALSE;
+ sal_Bool bLimit = false;
Rectangle aDlgPixel;
Size aWinSize;
Window* pWin = GetActiveWin();
@@ -693,7 +693,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
{
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX ||
nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
- bLimit = TRUE; // es wird sowieso gescrollt
+ bLimit = sal_True; // es wird sowieso gescrollt
else
{
// Cursor ist auf dem Bildschirm
@@ -702,14 +702,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
aViewData.GetMergeSizePixel( nCurX, nCurY, nCSX, nCSY );
Rectangle aCursor( aStart, Size( nCSX, nCSY ) );
if ( aCursor.IsOver( aDlgPixel ) )
- bLimit = TRUE; // Zelle vom Dialog ueberdeckt
+ bLimit = sal_True; // Zelle vom Dialog ueberdeckt
}
}
}
if (bLimit)
{
- BOOL bBottom = FALSE;
+ sal_Bool bBottom = false;
long nTopSpace = aDlgPixel.Top();
long nBotSpace = aWinSize.Height() - aDlgPixel.Bottom();
if ( nBotSpace > 0 && nBotSpace > nTopSpace )
@@ -724,14 +724,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurY >= nDiff ) // Pos. kann nicht negativ werden
{
nSpaceY = nDlgBot + ( nBotSpace - nCellSizeY ) / 2;
- bBottom = TRUE;
- bForceNew = TRUE;
+ bBottom = sal_True;
+ bForceNew = sal_True;
}
}
if ( !bBottom && nTopSpace > 0 )
{
nSpaceY = ( nTopSpace - nCellSizeY ) / 2;
- bForceNew = TRUE;
+ bForceNew = sal_True;
}
}
}
@@ -740,39 +740,41 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
SCsCOL nNewDeltaX = nDeltaX;
SCsROW nNewDeltaY = nDeltaY;
- BOOL bDoLine = FALSE;
+ sal_Bool bDoLine = false;
switch (eMode)
{
case SC_FOLLOW_JUMP:
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
- nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<USHORT>(nSpaceX) ));
+ nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<sal_uInt16>(nSpaceX) ));
if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY || bForceNew )
{
- nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<USHORT>(nSpaceY) ));
+ nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<sal_uInt16>(nSpaceY) ));
if (nNewDeltaY < 0) nNewDeltaY = 0;
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
- bDoLine = TRUE;
+ bDoLine = sal_True;
break;
case SC_FOLLOW_LINE:
- bDoLine = TRUE;
+ bDoLine = sal_True;
break;
case SC_FOLLOW_FIX:
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
nNewDeltaX = nDeltaX + nCurX - aViewData.GetCurX();
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
{
nNewDeltaY = nDeltaY + nCurY - aViewData.GetCurY();
+ if (nNewDeltaY < 0) nNewDeltaY = 0;
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
@@ -781,7 +783,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurX < nNewDeltaX || nCurX >= nNewDeltaX+nSizeX )
{
nNewDeltaX = nCurX - (nSizeX / 2);
- if (nNewDeltaX < 0) nNewDeltaY = 0;
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nNewDeltaY || nCurY >= nNewDeltaY+nSizeY )
@@ -791,7 +793,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
- bDoLine = TRUE;
+ bDoLine = sal_True;
break;
case SC_FOLLOW_NONE:
@@ -857,22 +859,22 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
}
}
-BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
// #i3875# *Hack*
- BOOL bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? TRUE : FALSE;
+ sal_Bool bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? sal_True : false;
aViewData.SetSelCtrlMouseClick( rMEvt.IsMod1() || bMod1Locked );
if ( pSelEngine )
{
bMoveIsShift = rMEvt.IsShift();
bRet = pSelEngine->SelMouseButtonDown( rMEvt );
- bMoveIsShift = FALSE;
+ bMoveIsShift = false;
}
- aViewData.SetSelCtrlMouseClick( FALSE ); // #i3875# *Hack*
+ aViewData.SetSelCtrlMouseClick( false ); // #i3875# *Hack*
return bRet;
}
@@ -882,7 +884,7 @@ BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
//
void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
- BOOL bShift, BOOL bControl, BOOL bKeepOld, BOOL bKeepSel )
+ sal_Bool bShift, sal_Bool bControl, sal_Bool bKeepOld, sal_Bool bKeepSel )
{
if (!bKeepOld)
aViewData.ResetOldCursor();
@@ -924,11 +926,11 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
SetMarkData(aData);
}
- BOOL bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() );
+ sal_Bool bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() );
bMoveIsShift = bShift;
pSelEngine->CursorPosChanging( bShift, bControl );
- bMoveIsShift = FALSE;
- aFunctionSet.SetCursorAtCell( nCurX, nCurY, FALSE );
+ bMoveIsShift = false;
+ aFunctionSet.SetCursorAtCell( nCurX, nCurY, false );
// Wenn der Cursor nicht bewegt wurde, muss das SelectionChanged fuer das
// Aufheben der Selektion hier einzeln passieren:
@@ -940,7 +942,7 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
}
void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- BOOL bShift, BOOL bKeepSel )
+ sal_Bool bShift, sal_Bool bKeepSel )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -983,10 +985,10 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
if (nMovY != 0 && VALIDCOLROW(nCurX,nCurY))
SkipCursorVertical(nCurX, nCurY, nOldY, nMovY);
- MoveCursorAbs( nCurX, nCurY, eMode, bShift, FALSE, TRUE, bKeepSel );
+ MoveCursorAbs( nCurX, nCurY, eMode, bShift, false, sal_True, bKeepSel );
}
-void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel )
+void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel )
{
SCsCOL nPageX;
SCsROW nPageY;
@@ -994,7 +996,7 @@ void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
MoveCursorRel( nPageX, nPageY, eMode, bShift, bKeepSel );
}
-void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel )
+void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel )
{
SCsCOL nNewX;
SCsROW nNewY;
@@ -1002,7 +1004,7 @@ void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
MoveCursorRel(nNewX, nNewY, eMode, bShift, bKeepSel);
}
-void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel )
+void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1032,7 +1034,7 @@ void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, B
MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, eMode, bShift, bKeepSel );
}
-void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift )
+void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1066,15 +1068,15 @@ void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode
aViewData.SetOldCursor( nNewX,nNewY );
pDoc->SkipOverlapped(nNewX, nNewY, nTab);
- MoveCursorAbs( nNewX, nNewY, eMode, bShift, FALSE, TRUE );
+ MoveCursorAbs( nNewX, nNewY, eMode, bShift, false, true );
}
-void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter
+void ScTabView::MoveCursorEnter( sal_Bool bShift ) // bShift -> hoch/runter
{
const ScInputOptions& rOpt = SC_MOD()->GetInputOptions();
if (!rOpt.GetMoveSelection())
{
- aViewData.UpdateInputHandler(TRUE);
+ aViewData.UpdateInputHandler(sal_True);
return;
}
@@ -1107,14 +1109,14 @@ void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter
SCTAB nTab = aViewData.GetTabNo();
ScDocument* pDoc = aViewData.GetDocument();
- pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, TRUE,FALSE, rMark );
+ pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, sal_True,false, rMark );
MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY,
- SC_FOLLOW_LINE, FALSE, TRUE );
+ SC_FOLLOW_LINE, false, sal_True );
// update input line even if cursor was not moved
if ( nNewX == nCurX && nNewY == nCurY )
- aViewData.UpdateInputHandler(TRUE);
+ aViewData.UpdateInputHandler(sal_True);
}
else
{
@@ -1131,12 +1133,12 @@ void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter
}
}
- MoveCursorRel( nMoveX,nMoveY, SC_FOLLOW_LINE, FALSE );
+ MoveCursorRel( nMoveX,nMoveY, SC_FOLLOW_LINE, false );
}
}
-BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
+sal_Bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
{
const KeyCode& rKCode = rKeyEvent.GetKeyCode();
@@ -1145,8 +1147,8 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
(rKCode.IsMod2() ? MOD_BOTH : MOD_CTRL) :
(rKCode.IsMod2() ? MOD_ALT : MOD_NONE);
- BOOL bSel = rKCode.IsShift();
- USHORT nCode = rKCode.GetCode();
+ sal_Bool bSel = rKCode.IsShift();
+ sal_uInt16 nCode = rKCode.GetCode();
// CURSOR keys
SCsCOL nDX = 0;
@@ -1169,8 +1171,8 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
// added to avoid warnings
}
}
- // always TRUE to suppress changes of col/row size (ALT+CURSOR)
- return TRUE;
+ // always sal_True to suppress changes of col/row size (ALT+CURSOR)
+ return sal_True;
}
// PAGEUP/PAGEDOWN
@@ -1187,7 +1189,7 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
// added to avoid warnings
}
}
- return TRUE;
+ return sal_True;
}
// HOME/END
@@ -1204,20 +1206,20 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
// added to avoid warnings
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
// naechste/vorherige nicht geschuetzte Zelle
-void ScTabView::FindNextUnprot( BOOL bShift, BOOL bInSelection )
+void ScTabView::FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection )
{
short nMove = bShift ? -1 : 1;
ScMarkData& rMark = aViewData.GetMarkData();
- BOOL bMarked = bInSelection && (rMark.IsMarked() || rMark.IsMultiMarked());
+ sal_Bool bMarked = bInSelection && (rMark.IsMarked() || rMark.IsMultiMarked());
SCCOL nCurX;
SCROW nCurY;
@@ -1227,14 +1229,14 @@ void ScTabView::FindNextUnprot( BOOL bShift, BOOL bInSelection )
SCTAB nTab = aViewData.GetTabNo();
ScDocument* pDoc = aViewData.GetDocument();
- pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,TRUE, rMark );
+ pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,sal_True, rMark );
SCCOL nTabCol = aViewData.GetTabStartCol();
if ( nTabCol == SC_TABSTART_NONE )
nTabCol = nCurX; // auf diese Spalte zurueck bei Enter
MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY,
- SC_FOLLOW_LINE, FALSE, TRUE );
+ SC_FOLLOW_LINE, false, sal_True );
// in MoveCursorRel wird die TabCol zurueckgesetzt...
aViewData.SetTabStartCol( nTabCol );
@@ -1294,7 +1296,7 @@ void ScTabView::MarkRows()
SelectionChanged();
}
-void ScTabView::MarkDataArea( BOOL bIncludeCursor )
+void ScTabView::MarkDataArea( sal_Bool bIncludeCursor )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1321,17 +1323,17 @@ void ScTabView::MarkMatrixFormula()
ScRange aMatrix;
if ( pDoc->GetMatrixFormulaRange( aCursor, aMatrix ) )
{
- MarkRange( aMatrix, FALSE ); // cursor is already within the range
+ MarkRange( aMatrix, false ); // cursor is already within the range
}
}
-void ScTabView::MarkRange( const ScRange& rRange, BOOL bSetCursor, BOOL bContinue )
+void ScTabView::MarkRange( const ScRange& rRange, sal_Bool bSetCursor, sal_Bool bContinue )
{
SCTAB nTab = rRange.aStart.Tab();
SetTabNo( nTab );
HideAllCursors();
- DoneBlockMode( bContinue ); // bContinue==TRUE -> clear old mark
+ DoneBlockMode( bContinue ); // bContinue==sal_True -> clear old mark
if (bSetCursor) // Wenn Cursor gesetzt wird, immer auch alignen
{
SCCOL nAlignX = rRange.aStart.Col();
@@ -1369,7 +1371,7 @@ void ScTabView::Unmark()
SCCOL nCurX;
SCROW nCurY;
aViewData.GetMoveCursor( nCurX,nCurY );
- MoveCursorAbs( nCurX, nCurY, SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( nCurX, nCurY, SC_FOLLOW_NONE, false, false );
SelectionChanged();
}
@@ -1391,7 +1393,7 @@ void ScTabView::MarkDataChanged()
UpdateSelectionOverlay();
}
-void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection )
+void ScTabView::SelectNextTab( short nDir, sal_Bool bExtendSelection )
{
if (!nDir) return;
DBG_ASSERT( nDir==-1 || nDir==1, "SelectNextTab: falscher Wert");
@@ -1420,14 +1422,14 @@ void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection )
}
}
- SetTabNo( nTab, FALSE, bExtendSelection );
+ SetTabNo( nTab, false, bExtendSelection );
PaintExtras();
}
// SetTabNo - angezeigte Tabelle
-void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
+void ScTabView::SetTabNo( SCTAB nTab, sal_Bool bNew, sal_Bool bExtendSelection, bool bSameTabButMoved )
{
if ( !ValidTab(nTab) )
{
@@ -1441,7 +1443,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell();
if (pFormSh)
{
- BOOL bAllowed = sal::static_int_cast<BOOL>( pFormSh->PrepareClose( TRUE ) );
+ sal_Bool bAllowed = sal::static_int_cast<sal_Bool>( pFormSh->PrepareClose( sal_True ) );
if (!bAllowed)
{
//! Fehlermeldung? oder macht das die FormShell selber?
@@ -1465,14 +1467,14 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
SCTAB nOldPos = nTab;
while (!pDoc->IsVisible(nTab)) // naechste sichtbare suchen
{
- BOOL bUp = (nTab>=nOldPos);
+ sal_Bool bUp = (nTab>=nOldPos);
if (bUp)
{
++nTab;
if (nTab>=nTabCount)
{
nTab = nOldPos;
- bUp = FALSE;
+ bUp = false;
}
}
@@ -1483,7 +1485,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
else
{
OSL_FAIL("keine sichtbare Tabelle");
- pDoc->SetVisible( 0, TRUE );
+ pDoc->SetVisible( 0, true );
}
}
}
@@ -1493,7 +1495,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
DrawDeselectAll();
ScModule* pScMod = SC_MOD();
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert
{
DoneBlockMode();
@@ -1502,14 +1504,14 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
}
ScSplitPos eOldActive = aViewData.GetActivePart(); // before switching
- BOOL bFocus = pGridWin[eOldActive]->HasFocus();
+ sal_Bool bFocus = pGridWin[eOldActive]->HasFocus();
aViewData.SetTabNo( nTab );
// UpdateShow noch vor SetCursor, damit UpdateAutoFillMark die richtigen
// Fenster findet (wird aus SetCursor gerufen)
UpdateShow();
aViewData.ResetOldCursor();
- SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), TRUE );
+ SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), sal_True );
SfxBindings& rBindings = aViewData.GetBindings();
ScMarkData& rMark = aViewData.GetMarkData();
@@ -1538,7 +1540,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
bExtendSelection = false;
if (bExtendSelection)
- rMark.SelectTable( nTab, TRUE );
+ rMark.SelectTable( nTab, sal_True );
else
{
rMark.SelectOneTable( nTab );
@@ -1554,7 +1556,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
if ( bRefMode ) // hide EditView if necessary (after aViewData.SetTabNo !)
{
- for (USHORT i = 0; i < 4; ++i)
+ for (sal_uInt16 i = 0; i < 4; ++i)
if (pGridWin[i] && pGridWin[i]->IsVisible())
pGridWin[i]->UpdateEditViewPos();
}
@@ -1602,13 +1604,13 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
// Fixierungen
- BOOL bResize = FALSE;
+ sal_Bool bResize = false;
if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixX())
- bResize = TRUE;
+ bResize = sal_True;
if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX )
if (aViewData.UpdateFixY())
- bResize = TRUE;
+ bResize = sal_True;
if (bResize)
RepeatResize();
InvalidateSplit();
@@ -1618,7 +1620,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
// Form-Layer muss den sichtbaren Ausschnitt der neuen Tabelle kennen
// dafuer muss hier schon der MapMode stimmen
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() );
SetNewVisArea();
@@ -1641,7 +1643,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
if(pScMod->IsRefDialogOpen())
{
- USHORT nCurRefDlgId=pScMod->GetCurRefDlgId();
+ sal_uInt16 nCurRefDlgId=pScMod->GetCurRefDlgId();
SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
SfxChildWindow* pChildWnd = pViewFrm->GetChildWindow( nCurRefDlgId );
if ( pChildWnd )
@@ -1662,11 +1664,11 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
DrawDeselectAll();
if (pDrawView)
- DrawEnableAnim( FALSE );
+ DrawEnableAnim( false );
EditView* pSpellingView = aViewData.GetSpellingView();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
if ( pGridWin[i]->IsVisible() && !aViewData.HasEditView((ScSplitPos)i) )
{
@@ -1675,7 +1677,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
SCCOL nScrX = aViewData.GetPosX( eHWhich );
SCROW nScrY = aViewData.GetPosY( eVWhich );
- BOOL bPosVisible =
+ sal_Bool bPosVisible =
( nCol >= nScrX && nCol <= nScrX + aViewData.VisibleCellsX(eHWhich) + 1 &&
nRow >= nScrY && nRow <= nScrY + aViewData.VisibleCellsY(eVWhich) + 1 );
@@ -1716,7 +1718,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
void ScTabView::UpdateEditView()
{
ScSplitPos eActive = aViewData.GetActivePart();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (aViewData.HasEditView( (ScSplitPos) i ))
{
EditView* pEditView = aViewData.GetEditView( (ScSplitPos) i );
@@ -1724,22 +1726,22 @@ void ScTabView::UpdateEditView()
static_cast<ScEditEngineDefaulter*>(pEditView->GetEditEngine()),
pGridWin[i], GetViewData()->GetCurX(), GetViewData()->GetCurY() );
if ( (ScSplitPos)i == eActive )
- pEditView->ShowCursor( FALSE );
+ pEditView->ShowCursor( false );
}
}
-void ScTabView::KillEditView( BOOL bNoPaint )
+void ScTabView::KillEditView( sal_Bool bNoPaint )
{
- USHORT i;
+ sal_uInt16 i;
SCCOL nCol1 = aViewData.GetEditStartCol();
SCROW nRow1 = aViewData.GetEditStartRow();
SCCOL nCol2 = aViewData.GetEditEndCol();
SCROW nRow2 = aViewData.GetEditEndRow();
- BOOL bPaint[4];
- BOOL bNotifyAcc(false);
+ sal_Bool bPaint[4];
+ sal_Bool bNotifyAcc(false);
- BOOL bExtended = nRow1 != nRow2; // Col wird sowieso bis zum Ende gezeichnet
- BOOL bAtCursor = nCol1 <= aViewData.GetCurX() &&
+ sal_Bool bExtended = nRow1 != nRow2; // Col wird sowieso bis zum Ende gezeichnet
+ sal_Bool bAtCursor = nCol1 <= aViewData.GetCurX() &&
nCol2 >= aViewData.GetCurX() &&
nRow1 == aViewData.GetCurY();
for (i=0; i<4; i++)
@@ -1771,12 +1773,12 @@ void ScTabView::KillEditView( BOOL bNoPaint )
}
if (pDrawView)
- DrawEnableAnim( TRUE );
+ DrawEnableAnim( sal_True );
// GrabFocus immer dann, wenn diese View aktiv ist und
// die Eingabezeile den Focus hat
- BOOL bGrabFocus = FALSE;
+ sal_Bool bGrabFocus = false;
if (aViewData.IsActive())
{
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
@@ -1784,7 +1786,7 @@ void ScTabView::KillEditView( BOOL bNoPaint )
{
ScInputWindow* pInputWin = pInputHdl->GetInputWindow();
if (pInputWin && pInputWin->IsInputActive())
- bGrabFocus = TRUE;
+ bGrabFocus = sal_True;
}
}
@@ -1818,7 +1820,7 @@ void ScTabView::UpdateFormulas()
if ( aViewData.GetDocument()->IsAutoCalcShellDisabled() )
return ;
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
@@ -1839,7 +1841,7 @@ void ScTabView::UpdateFormulas()
void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
ScUpdateMode eMode )
{
- USHORT i;
+ sal_uInt16 i;
SCCOL nCol1;
SCROW nRow1;
SCCOL nCol2;
@@ -1854,7 +1856,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
{
ScHSplitPos eHWhich = WhichH( (ScSplitPos) i );
ScVSplitPos eVWhich = WhichV( (ScSplitPos) i );
- BOOL bOut = FALSE;
+ sal_Bool bOut = false;
nCol1 = nStartCol;
nRow1 = nStartRow;
@@ -1869,16 +1871,16 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
if ( eMode == SC_UPDATE_ALL ) // for UPDATE_ALL, paint anyway
nCol2 = nScrX; // (because of extending strings to the right)
else
- bOut = TRUE; // completely outside the window
+ bOut = sal_True; // completely outside the window
}
if (nRow1 < nScrY) nRow1 = nScrY;
- if (nRow2 < nScrY) bOut = TRUE;
+ if (nRow2 < nScrY) bOut = sal_True;
SCCOL nLastX = nScrX + aViewData.VisibleCellsX( eHWhich ) + 1;
SCROW nLastY = nScrY + aViewData.VisibleCellsY( eVWhich ) + 1;
- if (nCol1 > nLastX) bOut = TRUE;
+ if (nCol1 > nLastX) bOut = sal_True;
if (nCol2 > nLastX) nCol2 = nLastX;
- if (nRow1 > nLastY) bOut = TRUE;
+ if (nRow1 > nLastY) bOut = sal_True;
if (nRow2 > nLastY) nRow2 = nLastY;
if (!bOut)
@@ -1887,7 +1889,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
pGridWin[i]->Draw( nCol1, nRow1, nCol2, nRow2, eMode );
else // ALL oder MARKS
{
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
long nLayoutSign = bLayoutRTL ? -1 : 1;
Point aStart = aViewData.GetScrPos( nCol1, nRow1, (ScSplitPos) i );
@@ -1901,14 +1903,14 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
if ( eMode == SC_UPDATE_ALL && nRow2 >= MAXROW )
aEnd.Y() = pGridWin[i]->GetOutputSizePixel().Height();
- BOOL bShowChanges = TRUE; //! ...
+ sal_Bool bShowChanges = sal_True; //! ...
if (bShowChanges)
{
aStart.X() -= nLayoutSign; // include change marks
aStart.Y() -= 1;
}
- BOOL bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS );
+ sal_Bool bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS );
if (bMarkClipped)
{
// dazu muesste ScColumn::IsEmptyBlock optimiert werden
@@ -1947,8 +1949,8 @@ void ScTabView::PaintRangeFinder( long nNumber )
if ( pRangeFinder && pRangeFinder->GetDocName() == aViewData.GetDocShell()->GetTitle() )
{
SCTAB nTab = aViewData.GetTabNo();
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( nNumber < 0 || nNumber == i )
{
ScRangeFindData* pData = pRangeFinder->GetObject(i);
@@ -1970,18 +1972,18 @@ void ScTabView::PaintRangeFinder( long nNumber )
// wegnehmen -> Repaint
// SC_UPDATE_MARKS: Invalidate, nicht bis zum Zeilenende
- BOOL bHiddenEdge = FALSE;
+ sal_Bool bHiddenEdge = false;
SCROW nTmp;
ScDocument* pDoc = aViewData.GetDocument();
while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab) )
{
--nCol1;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab) )
{
++nCol2;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->LastVisibleRow(0, nRow1, nTab);
if (!ValidRow(nTmp))
@@ -1989,7 +1991,7 @@ void ScTabView::PaintRangeFinder( long nNumber )
if (nTmp < nRow1)
{
nRow1 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab);
if (!ValidRow(nTmp))
@@ -1997,7 +1999,7 @@ void ScTabView::PaintRangeFinder( long nNumber )
if (nTmp > nRow2)
{
nRow2 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
if ( nCol2 - nCol1 > 1 && nRow2 - nRow1 > 1 && !bHiddenEdge )
@@ -2039,8 +2041,8 @@ void ScTabView::ClearHighlightRanges()
pHighlightRanges = NULL; // Repaint ohne Highlight
SCTAB nTab = aViewData.GetTabNo();
- ULONG nCount = pTemp->Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = pTemp->Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScHighlightEntry* pEntry = pTemp->GetObject( i );
if (pEntry)
@@ -2086,7 +2088,7 @@ void ScTabView::DoChartSelection(
void ScTabView::PaintGrid()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
if (pGridWin[i]->IsVisible())
@@ -2097,7 +2099,7 @@ void ScTabView::PaintGrid()
void ScTabView::PaintTop()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<2; i++)
{
if (pColBar[i])
@@ -2109,7 +2111,7 @@ void ScTabView::PaintTop()
void ScTabView::CreateAnchorHandles(SdrHdlList& rHdl, const ScAddress& rAddress)
{
- UINT16 i;
+ sal_uInt16 i;
for(i=0; i<4; i++)
{
@@ -2142,10 +2144,10 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol )
if (nStartCol>0)
--nStartCol; //! allgemeiner ?
- BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+ sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- for (USHORT i=0; i<2; i++)
+ for (sal_uInt16 i=0; i<2; i++)
{
ScHSplitPos eWhich = (ScHSplitPos) i;
if (pColBar[eWhich])
@@ -2170,7 +2172,7 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol )
void ScTabView::PaintLeft()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<2; i++)
{
if (pRowBar[i])
@@ -2199,7 +2201,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
if (nStartRow>0)
--nStartRow;
- for (USHORT i=0; i<2; i++)
+ for (sal_uInt16 i=0; i<2; i++)
{
ScVSplitPos eWhich = (ScVSplitPos) i;
if (pRowBar[eWhich])
@@ -2219,18 +2221,18 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
}
}
-BOOL ScTabView::PaintExtras()
+sal_Bool ScTabView::PaintExtras()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
if (!pDoc->HasTable(nTab)) // Tabelle geloescht ?
{
SCTAB nCount = pDoc->GetTableCount();
aViewData.SetTabNo(nCount-1);
- bRet = TRUE;
+ bRet = sal_True;
}
- pTabControl->UpdateStatus(); // TRUE = active
+ pTabControl->UpdateStatus(); // sal_True = active
return bRet;
}
@@ -2244,8 +2246,8 @@ void ScTabView::RecalcPPT()
aViewData.RefreshZoom(); // pre-calculate new PPT values
- BOOL bChangedX = ( aViewData.GetPPTX() != nOldX );
- BOOL bChangedY = ( aViewData.GetPPTY() != nOldY );
+ sal_Bool bChangedX = ( aViewData.GetPPTX() != nOldX );
+ sal_Bool bChangedY = ( aViewData.GetPPTY() != nOldY );
if ( bChangedX || bChangedY )
{
// call view SetZoom (including draw scale, split update etc)
@@ -2253,7 +2255,7 @@ void ScTabView::RecalcPPT()
Fraction aZoomX = aViewData.GetZoomX();
Fraction aZoomY = aViewData.GetZoomY();
- SetZoom( aZoomX, aZoomY, FALSE );
+ SetZoom( aZoomX, aZoomY, false );
PaintGrid();
if (bChangedX)
@@ -2263,7 +2265,7 @@ void ScTabView::RecalcPPT()
}
}
-void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
+void ScTabView::ActivateView( sal_Bool bActivate, sal_Bool bFirst )
{
if ( bActivate == aViewData.IsActive() && !bFirst )
{
@@ -2274,13 +2276,13 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
// wird nur bei MDI-(De)Activate gerufen
// aViewData.Activate hinten wegen Cursor-Show bei KillEditView
- // Markierung nicht mehr loeschen - wenn an der ViewData Activate(FALSE) gesetzt ist,
+ // Markierung nicht mehr loeschen - wenn an der ViewData Activate(sal_False) gesetzt ist,
// wird die Markierung nicht ausgegeben
if (!bActivate)
{
ScModule* pScMod = SC_MOD();
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
// Referenzeingabe nicht abbrechen, um Referenzen auf
// andere Dokumente zuzulassen
@@ -2298,7 +2300,7 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst )
aViewData.Activate(bActivate);
- PaintBlock(FALSE); // Repaint, Markierung je nach Active-Status
+ PaintBlock(false); // Repaint, Markierung je nach Active-Status
if (!bActivate)
HideAllCursors(); // Cursor
@@ -2345,9 +2347,9 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
ScSplitPos eOld = aViewData.GetActivePart();
if ( eOld != eWhich )
{
- bInActivatePart = TRUE;
+ bInActivatePart = sal_True;
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
// the HasEditView call during SetCursor would fail otherwise
if ( aViewData.HasEditView(eOld) && !bRefMode )
@@ -2357,11 +2359,11 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
ScVSplitPos eOldV = WhichV(eOld);
ScHSplitPos eNewH = WhichH(eWhich);
ScVSplitPos eNewV = WhichV(eWhich);
- BOOL bTopCap = pColBar[eOldH] && pColBar[eOldH]->IsMouseCaptured();
- BOOL bLeftCap = pRowBar[eOldV] && pRowBar[eOldV]->IsMouseCaptured();
+ sal_Bool bTopCap = pColBar[eOldH] && pColBar[eOldH]->IsMouseCaptured();
+ sal_Bool bLeftCap = pRowBar[eOldV] && pRowBar[eOldV]->IsMouseCaptured();
- BOOL bFocus = pGridWin[eOld]->HasFocus();
- BOOL bCapture = pGridWin[eOld]->IsMouseCaptured();
+ sal_Bool bFocus = pGridWin[eOld]->HasFocus();
+ sal_Bool bCapture = pGridWin[eOld]->IsMouseCaptured();
if (bCapture)
pGridWin[eOld]->ReleaseMouse();
pGridWin[eOld]->ClickExtern();
@@ -2389,8 +2391,8 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
if ( bTopCap && pColBar[eNewH] )
{
- pColBar[eOldH]->SetIgnoreMove(TRUE);
- pColBar[eNewH]->SetIgnoreMove(FALSE);
+ pColBar[eOldH]->SetIgnoreMove(sal_True);
+ pColBar[eNewH]->SetIgnoreMove(false);
pHdrSelEng->SetWindow( pColBar[eNewH] );
long nWidth = pColBar[eNewH]->GetOutputSizePixel().Width();
pHdrSelEng->SetVisibleArea( Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) );
@@ -2398,8 +2400,8 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
}
if ( bLeftCap && pRowBar[eNewV] )
{
- pRowBar[eOldV]->SetIgnoreMove(TRUE);
- pRowBar[eNewV]->SetIgnoreMove(FALSE);
+ pRowBar[eOldV]->SetIgnoreMove(sal_True);
+ pRowBar[eNewV]->SetIgnoreMove(false);
pHdrSelEng->SetWindow( pRowBar[eNewV] );
long nHeight = pRowBar[eNewV]->GetOutputSizePixel().Height();
pHdrSelEng->SetVisibleArea( Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) );
@@ -2411,7 +2413,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
pGridWin[eWhich]->ShowCursor();
SfxInPlaceClient* pClient = aViewData.GetViewShell()->GetIPClient();
- BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
// don't switch ViewShell's active window during RefInput, because the focus
// might change, and subsequent SetReference calls wouldn't find the right EditView
@@ -2425,13 +2427,13 @@ void ScTabView::ActivatePart( ScSplitPos eWhich )
pGridWin[eWhich]->GrabFocus();
}
- bInActivatePart = FALSE;
+ bInActivatePart = false;
}
}
void ScTabView::HideListBox()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pGridWin[i])
pGridWin[i]->ClickExtern();
}
@@ -2525,7 +2527,7 @@ void ScTabView::ZoomChanged()
void ScTabView::CheckNeedsRepaint()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
pGridWin[i]->CheckNeedsRepaint();
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index a6b5f7fe1b1b..8f1fc44c6f85 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -47,7 +47,7 @@
#include "cell.hxx"
#include "dociter.hxx"
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
// STATIC DATA -----------------------------------------------------------
@@ -68,7 +68,7 @@ void ScTabView::HideTip()
void ScTabView::ShowRefTip()
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( aViewData.GetRefType() == SC_REFTYPE_REF && Help::IsQuickHelpEnabled() )
{
SCCOL nStartX = aViewData.GetRefStartX();
@@ -77,8 +77,8 @@ void ScTabView::ShowRefTip()
SCROW nEndY = aViewData.GetRefEndY();
if ( nEndX != nStartX || nEndY != nStartY ) // nicht fuer einzelne Zelle
{
- BOOL bLeft = ( nEndX < nStartX );
- BOOL bTop = ( nEndY < nStartY );
+ sal_Bool bLeft = ( nEndX < nStartX );
+ sal_Bool bTop = ( nEndY < nStartY );
PutInOrder( nStartX, nEndX );
PutInOrder( nStartY, nEndY );
SCCOL nCols = nEndX+1-nStartX;
@@ -99,7 +99,7 @@ void ScTabView::ShowRefTip()
Point aPos( bLeft ? aStart.X() : ( aEnd.X() + 3 ),
bTop ? aStart.Y() : ( aEnd.Y() + 3 ) );
- USHORT nFlags = ( bLeft ? QUICKHELP_RIGHT : QUICKHELP_LEFT ) |
+ sal_uInt16 nFlags = ( bLeft ? QUICKHELP_RIGHT : QUICKHELP_LEFT ) |
( bTop ? QUICKHELP_BOTTOM : QUICKHELP_TOP );
// nicht ueber die editierte Formel
@@ -117,7 +117,7 @@ void ScTabView::ShowRefTip()
HideTip();
nTipVisible = Help::ShowTip( pWin, aRect, aHelp, nFlags );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -130,7 +130,7 @@ void ScTabView::StopRefMode()
{
if (aViewData.IsRefMode())
{
- aViewData.SetRefMode( FALSE, SC_REFTYPE_NONE );
+ aViewData.SetRefMode( false, SC_REFTYPE_NONE );
HideTip();
UpdateShrinkOverlay();
@@ -150,7 +150,7 @@ void ScTabView::StopRefMode()
}
pSelEngine->Reset();
- pSelEngine->SetAddMode( FALSE ); //! sollte das nicht bei Reset passieren?
+ pSelEngine->SetAddMode( false ); //! sollte das nicht bei Reset passieren?
ScSplitPos eOld = pSelEngine->GetWhich();
ScSplitPos eNew = aViewData.GetActivePart();
@@ -172,14 +172,14 @@ void ScTabView::StopRefMode()
AlignToCursor( aViewData.GetCurX(), aViewData.GetCurY(), SC_FOLLOW_NONE );
}
-void ScTabView::DoneRefMode( BOOL bContinue )
+void ScTabView::DoneRefMode( sal_Bool bContinue )
{
ScDocument* pDoc = aViewData.GetDocument();
if ( aViewData.GetRefType() == SC_REFTYPE_REF && bContinue )
SC_MOD()->AddRefEntry();
- BOOL bWasRef = aViewData.IsRefMode();
- aViewData.SetRefMode( FALSE, SC_REFTYPE_NONE );
+ sal_Bool bWasRef = aViewData.IsRefMode();
+ aViewData.SetRefMode( false, SC_REFTYPE_NONE );
HideTip();
UpdateShrinkOverlay();
@@ -254,7 +254,7 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
PutInOrder(nStartY,nEndY);
pDoc->SetEmbedded( ScRange(nStartX,nStartY,nTab, nEndX,nEndY,nTab) );
ScDocShell* pDocSh = aViewData.GetDocShell();
- pDocSh->UpdateOle( &aViewData, TRUE );
+ pDocSh->UpdateOle( &aViewData, sal_True );
pDocSh->SetDocumentModified();
}
@@ -301,18 +301,18 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
if ( pWin )
aPos = pWin->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_TOP;
+ sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_TOP;
Help::ShowQuickHelp(pWin, aRect, aHelpStr, nAlign);
}
}
-void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, BOOL bPaint )
+void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, sal_Bool bPaint )
{
ScDocument* pDoc = aViewData.GetDocument();
ScMarkData& rMark = aViewData.GetMarkData();
if (!aViewData.IsRefMode())
{
- aViewData.SetRefMode( TRUE, eType );
+ aViewData.SetRefMode( sal_True, eType );
aViewData.SetRefStart( nCurX, nCurY, nCurZ );
aViewData.SetRefEnd( nCurX, nCurY, nCurZ );
@@ -334,7 +334,7 @@ void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eT
}
}
-void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL )
+void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL )
{
if ( nVisible == 0 )
nVisible = 1; // #i59893# don't use visible size 0
@@ -357,7 +357,7 @@ void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible,
}
}
-long ScTabView::GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL )
+long ScTabView::GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL )
{
if ( bLayoutRTL )
return -rScroll.GetThumbPos() - rScroll.GetVisibleSize();
@@ -398,11 +398,11 @@ long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLRO
void ScTabView::UpdateScrollBars()
{
long nDiff;
- BOOL bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
- BOOL bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
+ sal_Bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- BOOL bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL();
+ sal_Bool bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL();
SCCOL nUsedX;
SCROW nUsedY;
pDoc->GetTableArea( nTab, nUsedX, nUsedY ); //! cachen !!!!!!!!!!!!!!!
@@ -425,7 +425,7 @@ void ScTabView::UpdateScrollBars()
nVisYB = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM );
long nMaxYB = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_BOTTOM), nVisYB, MAXROW, nStartY );
- SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, FALSE );
+ SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, false );
if (bRight)
{
@@ -438,7 +438,7 @@ void ScTabView::UpdateScrollBars()
{
nVisYT = aViewData.VisibleCellsY( SC_SPLIT_TOP );
long nMaxYT = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_TOP), nVisYT, MAXROW, 0 );
- SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), FALSE );
+ SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), false );
}
// Bereich testen
@@ -484,7 +484,7 @@ void ScTabView::UpdateScrollBars()
void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos )
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (WhichV((ScSplitPos)i)==eWhich)
{
ScGridWindow* pWin = pGridWin[i];
@@ -499,7 +499,7 @@ void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos )
void ScTabView::InvertVertical( ScHSplitPos eWhich, long nDragPos )
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (WhichH((ScSplitPos)i)==eWhich)
{
ScGridWindow* pWin = pGridWin[i];
@@ -524,7 +524,7 @@ void ScTabView::InterpretVisible()
return;
SCTAB nTab = aViewData.GetTabNo();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
{
// rely on gridwin pointers to find used panes
// no IsVisible test in case the whole view is not yet shown
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 2a74b2a0f8b6..ef2c621358b4 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -79,9 +79,9 @@ void ScTabView::Init()
the sheet orientation, not the UI setting. Note: controls that are
already constructed (e.g. scroll bars) have the RTL setting of the GUI.
Eventually this has to be disabled manually (see below). */
- pFrameWin->EnableRTL( FALSE );
+ pFrameWin->EnableRTL( false );
- USHORT i;
+ sal_uInt16 i;
aScrollTimer.SetTimeout(10);
aScrollTimer.SetTimeoutHdl( LINK( this, ScTabView, TimerHdl ) );
@@ -150,7 +150,7 @@ void ScTabView::Init()
ScTabView::~ScTabView()
{
- USHORT i;
+ sal_uInt16 i;
// remove selection object
ScModule* pScMod = SC_MOD();
@@ -209,14 +209,14 @@ ScTabView::~ScTabView()
delete pTabControl;
}
-void ScTabView::MakeDrawView( BYTE nForceDesignMode )
+void ScTabView::MakeDrawView( sal_uInt8 nForceDesignMode )
{
if (!pDrawView)
{
ScDrawLayer* pLayer = aViewData.GetDocument()->GetDrawLayer();
DBG_ASSERT(pLayer, "wo ist der Draw Layer ??");
- USHORT i;
+ sal_uInt16 i;
pDrawView = new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT], &aViewData );
for (i=0; i<4; i++)
if (pGridWin[i])
@@ -241,7 +241,7 @@ void ScTabView::MakeDrawView( BYTE nForceDesignMode )
// used when switching back from page preview: restore saved design mode state
// (otherwise, keep the default from the draw view ctor)
if ( nForceDesignMode != SC_FORCEMODE_NONE )
- pDrawView->SetDesignMode( (BOOL)nForceDesignMode );
+ pDrawView->SetDesignMode( (sal_Bool)nForceDesignMode );
// an der FormShell anmelden
FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell();
@@ -268,13 +268,13 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
//==================================================================
-void ScTabView::TabChanged()
+void ScTabView::TabChanged( bool bSameTabButMoved )
{
if (pDrawView)
{
DrawDeselectAll(); // beendet auch Text-Edit-Modus
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<4; i++)
if (pGridWin[i])
pDrawView->VCRemoveWin(pGridWin[i]); // fuer alte Page
@@ -297,7 +297,7 @@ void ScTabView::TabChanged()
// Es gibt keine einfache Moeglichkeit, alle Slots der FormShell zu invalidieren
// (fuer disablete Slots auf geschuetzten Tabellen), darum hier einfach alles...
- rBindings.InvalidateAll(FALSE);
+ rBindings.InvalidateAll(false);
if (aViewData.GetViewShell()->HasAccessibilityObjects())
{
@@ -314,7 +314,7 @@ void ScTabView::TabChanged()
{
ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
if (pImp)
- pImp->SheetChanged();
+ pImp->SheetChanged( bSameTabButMoved );
}
}
}
@@ -324,10 +324,10 @@ void ScTabView::UpdateLayerLocks()
if (pDrawView)
{
SCTAB nTab = aViewData.GetTabNo();
- BOOL bEx = aViewData.GetViewShell()->IsDrawSelMode();
- BOOL bProt = aViewData.GetDocument()->IsTabProtected( nTab ) ||
+ sal_Bool bEx = aViewData.GetViewShell()->IsDrawSelMode();
+ sal_Bool bProt = aViewData.GetDocument()->IsTabProtected( nTab ) ||
aViewData.GetSfxDocShell()->IsReadOnly();
- BOOL bShared = aViewData.GetDocShell()->IsDocShared();
+ sal_Bool bShared = aViewData.GetDocShell()->IsDocShared();
SdrLayer* pLayer;
SdrLayerAdmin& rAdmin = pDrawView->GetModel()->GetLayerAdmin();
@@ -336,7 +336,7 @@ void ScTabView::UpdateLayerLocks()
pDrawView->SetLayerLocked( pLayer->GetName(), bProt || !bEx || bShared );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN);
if (pLayer)
- pDrawView->SetLayerLocked( pLayer->GetName(), TRUE );
+ pDrawView->SetLayerLocked( pLayer->GetName(), sal_True );
pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT);
if (pLayer)
pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
@@ -347,7 +347,7 @@ void ScTabView::UpdateLayerLocks()
if (pLayer)
{
pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
- pDrawView->SetLayerVisible( pLayer->GetName(), sal_False);
+ pDrawView->SetLayerVisible( pLayer->GetName(), false);
}
}
}
@@ -369,16 +369,16 @@ void ScTabView::DrawDeselectAll()
pDrawView->UnmarkAll();
if (!pViewSh->IsDrawSelMode())
- pViewSh->SetDrawShell( FALSE );
+ pViewSh->SetDrawShell( false );
}
}
-BOOL ScTabView::IsDrawTextEdit() const
+sal_Bool ScTabView::IsDrawTextEdit() const
{
if (pDrawView)
return pDrawView->IsTextEdit();
else
- return FALSE;
+ return false;
}
SvxZoomType ScTabView::GetZoomType() const
@@ -386,12 +386,12 @@ SvxZoomType ScTabView::GetZoomType() const
return aViewData.GetZoomType();
}
-void ScTabView::SetZoomType( SvxZoomType eNew, BOOL bAll )
+void ScTabView::SetZoomType( SvxZoomType eNew, sal_Bool bAll )
{
aViewData.SetZoomType( eNew, bAll );
}
-void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll )
+void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll )
{
aViewData.SetZoom( rNewX, rNewY, bAll );
if (pDrawView)
@@ -407,7 +407,7 @@ void ScTabView::RefreshZoom()
ZoomChanged();
}
-void ScTabView::SetPagebreakMode( BOOL bSet )
+void ScTabView::SetPagebreakMode( sal_Bool bSet )
{
aViewData.SetPagebreakMode(bSet);
if (pDrawView)
@@ -421,7 +421,7 @@ void ScTabView::ResetDrawDragMode()
pDrawView->SetDragMode( SDRDRAG_MOVE );
}
-void ScTabView::ViewOptionsHasChanged( BOOL bHScrollChanged, BOOL bGraphicsChanged )
+void ScTabView::ViewOptionsHasChanged( sal_Bool bHScrollChanged, sal_Bool bGraphicsChanged )
{
// DrawView erzeugen, wenn Gitter angezeigt werden soll
if ( !pDrawView && aViewData.GetOptions().GetGridOptions().GetGridVisible() )
@@ -431,13 +431,13 @@ void ScTabView::ViewOptionsHasChanged( BOOL bHScrollChanged, BOOL bGraphicsChang
pDrawView->UpdateUserViewOptions();
if (bGraphicsChanged)
- DrawEnableAnim(TRUE); // DrawEnableAnim checks the options state
+ DrawEnableAnim(sal_True); // DrawEnableAnim checks the options state
// if TabBar is set to visible, make sure its size is not 0
- BOOL bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 );
+ sal_Bool bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 );
// if ScrollBar is set to visible, TabBar must make room
- BOOL bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() &&
+ sal_Bool bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() &&
pTabControl->GetSizePixel().Width() > SC_TABBAR_DEFWIDTH );
if ( bGrow || bShrink )
@@ -477,14 +477,14 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect )
{
//! store rectangle for repaint during drag
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
{
if ( pGridWin[i] && pGridWin[i]->IsVisible() )
{
RasterOp aROp = pGridWin[i]->GetRasterOp();
- BOOL bHasLine = pGridWin[i]->IsLineColor();
+ sal_Bool bHasLine = pGridWin[i]->IsLineColor();
Color aLine = pGridWin[i]->GetLineColor();
- BOOL bHasFill = pGridWin[i]->IsFillColor();
+ sal_Bool bHasFill = pGridWin[i]->IsFillColor();
Color aFill = pGridWin[i]->GetFillColor();
pGridWin[i]->SetRasterOp( ROP_INVERT );
@@ -506,9 +506,9 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect )
}
}
-void ScTabView::DrawEnableAnim(BOOL bSet)
+void ScTabView::DrawEnableAnim(sal_Bool bSet)
{
- USHORT i;
+ sal_uInt16 i;
if ( pDrawView )
{
// dont start animations if display of graphics is disabled
@@ -517,7 +517,7 @@ void ScTabView::DrawEnableAnim(BOOL bSet)
{
if ( !pDrawView->IsAnimationEnabled() )
{
- pDrawView->SetAnimationEnabled(TRUE);
+ pDrawView->SetAnimationEnabled(sal_True);
// Animierte GIFs muessen wieder gestartet werden:
ScDocument* pDoc = aViewData.GetDocument();
@@ -528,7 +528,7 @@ void ScTabView::DrawEnableAnim(BOOL bSet)
}
else
{
- pDrawView->SetAnimationEnabled(FALSE);
+ pDrawView->SetAnimationEnabled(false);
}
}
}
@@ -546,7 +546,7 @@ void ScTabView::UpdateDrawTextOutliner()
void ScTabView::DigitLanguageChanged()
{
LanguageType eNewLang = SC_MOD()->GetOptDigitLanguage();
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if ( pGridWin[i] )
pGridWin[i]->SetDigitLanguage( eNewLang );
}
@@ -637,7 +637,7 @@ void ScTabView::MakeVisible( const Rectangle& rHMMRect )
//---------------------------------------------------------------
-void ScTabView::SetBrushDocument( ScDocument* pNew, BOOL bLock )
+void ScTabView::SetBrushDocument( ScDocument* pNew, sal_Bool bLock )
{
delete pBrushDocument;
delete pDrawBrushSet;
@@ -650,7 +650,7 @@ void ScTabView::SetBrushDocument( ScDocument* pNew, BOOL bLock )
aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
}
-void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock )
+void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock )
{
delete pBrushDocument;
delete pDrawBrushSet;
@@ -667,7 +667,7 @@ void ScTabView::ResetBrushDocument()
{
if ( HasPaintBrush() )
{
- SetBrushDocument( NULL, FALSE );
+ SetBrushDocument( NULL, false );
SetActivePointer( Pointer( POINTER_ARROW ) ); // switch pointers also when ended with escape key
}
}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 677762efea9e..2c26815a01dc 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -57,9 +57,6 @@
#define ScTabViewShell
#include "scslots.hxx"
-#define SearchSettings
-#include <svx/svxslots.hxx>
-
TYPEINIT2(ScTabViewShell,SfxViewShell,SfxListener);
SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index d28d3cb23518..ba6c97ac7fba 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -108,7 +108,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
SdrModel* pDoc = pView->GetModel();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nNewId = rReq.GetSlot();
+ sal_uInt16 nNewId = rReq.GetSlot();
if ( nNewId == SID_DRAW_CHART )
{
@@ -125,7 +125,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if (nNewId == SID_INSERT_DRAW && pArgs)
{
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( SID_INSERT_DRAW, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pArgs->GetItemState( SID_INSERT_DRAW, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SvxDrawToolItem ) )
{
SvxDrawToolEnum eSel = (SvxDrawToolEnum)((const SvxDrawToolItem*)pItem)->GetValue();
@@ -148,7 +148,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SVX_SNAP_DRAW_CAPTION_VERTICAL: nNewId = SID_DRAW_CAPTION_VERTICAL; break;
}
}
- else // USHORT-Item vom Controller
+ else // sal_uInt16-Item vom Controller
{
rReq.Done();
return;
@@ -158,11 +158,11 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_DRAW_SELECT )
nNewId = SID_OBJECT_SELECT;
- USHORT nNewFormId = 0;
+ sal_uInt16 nNewFormId = 0;
if ( nNewId == SID_FM_CREATE_CONTROL && pArgs )
{
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, TRUE, &pItem ) == SFX_ITEM_SET &&
+ if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxUInt16Item ) )
nNewFormId = ((const SfxUInt16Item*)pItem)->GetValue();
}
@@ -171,7 +171,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( pArgs )
{
const SfxPoolItem* pItem;
- if ( pArgs->GetItemState( nNewId, TRUE, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) )
+ if ( pArgs->GetItemState( nNewId, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) )
sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue();
}
bool bSwitchCustom = ( sStringItemValue.Len() && sDrawCustom.Len() && sStringItemValue != sDrawCustom );
@@ -182,15 +182,15 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
// CTRL-SID_OBJECT_SELECT is used to select the first object,
// but not if SID_OBJECT_SELECT is the result of clicking a create function again,
// so this must be tested before changing nNewId below.
- BOOL bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) );
+ sal_Bool bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) );
- BOOL bEx = IsDrawSelMode();
+ sal_Bool bEx = IsDrawSelMode();
if ( rReq.GetModifier() & KEY_MOD1 )
{
// always allow keyboard selection also on background layer
// also allow creation of default objects if the same object type
// was already active
- bEx = TRUE;
+ bEx = sal_True;
}
else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL ||
nNewFormId == nFormSfxId || nNewFormId == 0 ) && !bSwitchCustom )
@@ -204,7 +204,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_FM_CREATE_CONTROL )
{
GetViewData()->GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
//! was fuer einen Slot braucht der komische Controller wirklich, um das anzuzeigen????
}
@@ -212,13 +212,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
nNewId = SID_OBJECT_SELECT;
}
else
- bEx = TRUE;
+ bEx = sal_True;
if ( nDrawSfxId == SID_FM_CREATE_CONTROL && nNewId != nDrawSfxId )
{
// Wechsel von Control- zu Zeichenfunktion -> im Control-Controller deselektieren
GetViewData()->GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
//! was fuer einen Slot braucht der komische Controller wirklich, um das anzuzeigen????
}
@@ -233,7 +233,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
{
// select first object
pView->UnmarkAllObj();
- pView->MarkNextObj(TRUE);
+ pView->MarkNextObj(sal_True);
// ...and make it visible
if(pView->AreObjectsMarked())
@@ -248,13 +248,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
{
if ( nNewId == SID_DRAW_TEXT || nNewId == SID_DRAW_TEXT_VERTICAL ||
nNewId == SID_DRAW_TEXT_MARQUEE || nNewId == SID_DRAW_NOTEEDIT )
- SetDrawTextShell( TRUE );
+ SetDrawTextShell( sal_True );
else
{
if ( bEx || pView->GetMarkedObjectList().GetMarkCount() != 0 )
SetDrawShellOrSub();
else
- SetDrawShell( FALSE );
+ SetDrawShell( false );
}
}
@@ -288,7 +288,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_CAPTION:
case SID_DRAW_CAPTION_VERTICAL:
pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq));
- pView->SetFrameDragSingles( FALSE );
+ pView->SetFrameDragSingles( false );
rBindings.Invalidate( SID_BEZIER_EDIT );
break;
@@ -313,7 +313,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
break;
case SID_FM_CREATE_CONTROL:
- SetDrawFormShell(TRUE);
+ SetDrawFormShell(sal_True);
pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq));
nFormSfxId = nNewFormId;
break;
@@ -333,7 +333,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, aNewReq ));
if ( nNewId != SID_DRAW_CS_ID )
{
- SFX_REQUEST_ARG( rReq, pEnumCommand, SfxStringItem, nNewId, sal_False );
+ SFX_REQUEST_ARG( rReq, pEnumCommand, SfxStringItem, nNewId, false );
if ( pEnumCommand )
{
aCurrShapeEnumCommand[ nNewId - SID_DRAWTBX_CS_BASIC ] = pEnumCommand->GetValue();
@@ -410,7 +410,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
@@ -419,7 +419,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_INSERT_DRAW:
{
// SID_OBJECT_SELECT nur, wenn "harter" Selektionsmodus
- USHORT nPutId = nDrawSfxId;
+ sal_uInt16 nPutId = nDrawSfxId;
if ( nPutId == SID_OBJECT_SELECT && !IsDrawSelMode() )
nPutId = USHRT_MAX;
// nur die Images, die auch auf dem Controller liegen
@@ -451,7 +451,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_DRAW_CHART:
{
- BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
if ( bOle || !SvtModuleOptions().IsChart() )
rSet.DisableItem( nWhich );
}
@@ -465,13 +465,13 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
}
}
-BOOL ScTabViewShell::SelectObject( const String& rName )
+sal_Bool ScTabViewShell::SelectObject( const String& rName )
{
ScDrawView* pView = GetViewData()->GetScDrawView();
if (!pView)
- return FALSE;
+ return false;
- BOOL bFound = pView->SelectObject( rName );
+ sal_Bool bFound = pView->SelectObject( rName );
// DrawShell etc. is handled in MarkListHasChanged
return bFound;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index b1db9c4714bd..f6e7dccb45a1 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -44,7 +44,7 @@
#include <svl/ptitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
-
+#include <sfx2/objface.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/vclenum.hxx>
@@ -87,7 +87,7 @@ using ::std::auto_ptr;
#define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() )
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
#define GET_STRING(nid) ((const SfxStringItem&)pReqArgs->Get(nid)).GetValue()
#define GET_UINT16(nid) ((const SfxUInt16Item&)pReqArgs->Get(nid)).GetValue()
#define GET_BOOL(nid) ((const SfxBoolItem&)pReqArgs->Get(nid)).GetValue()
@@ -97,9 +97,9 @@ using ::std::auto_ptr;
/** Try to parse the given range using Calc-style syntax first, then
Excel-style if that fails. */
-USHORT lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, USHORT /* nSlot */)
+sal_uInt16 lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
- USHORT nResult = rScRange.Parse(aAddress, pDoc);
+ sal_uInt16 nResult = rScRange.Parse(aAddress, pDoc);
if ( (nResult & SCA_VALID) )
return nResult;
@@ -108,9 +108,9 @@ USHORT lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDo
/** Try to parse the given address using Calc-style syntax first, then
Excel-style if that fails. */
-USHORT lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, USHORT /* nSlot */)
+sal_uInt16 lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
- USHORT nResult = rScAddress.Parse(aAddress, pDoc);
+ sal_uInt16 nResult = rScAddress.Parse(aAddress, pDoc);
if ( (nResult & SCA_VALID) )
return nResult;
@@ -123,7 +123,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SfxBindings& rBindings = pThisFrame->GetBindings();
ScModule* pScMod = SC_MOD();
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp
HideListBox(); // Autofilter-DropDown-Listbox
@@ -134,22 +134,22 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState(FID_INSERT_FILE,TRUE,&pItem) == SFX_ITEM_SET )
+ pReqArgs->GetItemState(FID_INSERT_FILE,sal_True,&pItem) == SFX_ITEM_SET )
{
String aFileName = ((const SfxStringItem*)pItem)->GetValue();
// Einfuege-Position
Point aInsertPos;
- if ( pReqArgs->GetItemState(FN_PARAM_1,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState(FN_PARAM_1,sal_True,&pItem) == SFX_ITEM_SET )
aInsertPos = ((const SfxPointItem*)pItem)->GetValue();
else
aInsertPos = GetInsertPos();
// als Link?
- BOOL bAsLink = FALSE;
- if ( pReqArgs->GetItemState(FN_PARAM_2,TRUE,&pItem) == SFX_ITEM_SET )
+ sal_Bool bAsLink = false;
+ if ( pReqArgs->GetItemState(FN_PARAM_2,sal_True,&pItem) == SFX_ITEM_SET )
bAsLink = ((const SfxBoolItem*)pItem)->GetValue();
// ausfuehren
@@ -161,10 +161,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_EDIT_PRINTAREA:
{
- USHORT nId = ScPrintAreasDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScPrintAreasDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -175,18 +175,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
String aPrintStr;
String aRowStr;
String aColStr;
- BOOL bEntire = FALSE;
+ sal_Bool bEntire = false;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET )
aRowStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_3, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_3, sal_True, &pItem ) == SFX_ITEM_SET )
aColStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( pReqArgs->GetItemState( FN_PARAM_4, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( FN_PARAM_4, sal_True, &pItem ) == SFX_ITEM_SET )
bEntire = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, FALSE );
+ SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, false );
rReq.Done();
}
@@ -196,18 +196,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ADD_PRINTAREA:
case SID_DEFINE_PRINTAREA: // Menue oder Basic
{
- BOOL bAdd = ( nSlot == SID_ADD_PRINTAREA );
+ sal_Bool bAdd = ( nSlot == SID_ADD_PRINTAREA );
if ( pReqArgs )
{
String aPrintStr;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SetPrintRanges( FALSE, &aPrintStr, NULL, NULL, bAdd );
+ SetPrintRanges( false, &aPrintStr, NULL, NULL, bAdd );
}
else
{
- SetPrintRanges( FALSE, NULL, NULL, NULL, bAdd ); // aus Selektion
+ SetPrintRanges( false, NULL, NULL, NULL, bAdd ); // aus Selektion
rReq.Done();
}
}
@@ -216,7 +216,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_DELETE_PRINTAREA:
{
String aEmpty;
- SetPrintRanges( FALSE, &aEmpty, NULL, NULL, FALSE ); // Druckbereich loeschen
+ SetPrintRanges( false, &aEmpty, NULL, NULL, false ); // Druckbereich loeschen
rReq.Done();
}
break;
@@ -249,18 +249,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
String aAddress;
const SfxPoolItem* pItem;
- if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
aAddress = ((const SfxStringItem*)pItem)->GetValue();
else if ( nSlot == SID_JUMPTOMARK && pReqArgs->GetItemState(
- SID_JUMPTOMARK, TRUE, &pItem ) == SFX_ITEM_SET )
+ SID_JUMPTOMARK, sal_True, &pItem ) == SFX_ITEM_SET )
aAddress = ((const SfxStringItem*)pItem)->GetValue();
// #i14927# SID_CURRENTCELL with a single cell must unmark if FN_PARAM_1
// isn't set (for recorded macros, because IsAPI is no longer available).
// ScGridWindow::MouseButtonUp no longer executes the slot for a single
// cell if there is a multi selection.
- BOOL bUnmark = ( nSlot == SID_CURRENTCELL );
- if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
+ sal_Bool bUnmark = ( nSlot == SID_CURRENTCELL );
+ if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET )
bUnmark = ((const SfxBoolItem*)pItem)->GetValue();
bool bAlignToCursor = true;
@@ -275,15 +275,15 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
RTL_TEXTENCODING_UTF8 );
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScViewData* pViewData = GetViewData();
ScDocument* pDoc = pViewData->GetDocument();
ScMarkData& rMark = pViewData->GetMarkData();
ScRange aScRange;
ScAddress aScAddress;
- USHORT nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot);
+ sal_uInt16 nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot);
SCTAB nTab = pViewData->GetTabNo();
- BOOL bMark = TRUE;
+ sal_Bool bMark = sal_True;
// Is this a range ?
if( nResult & SCA_VALID )
@@ -312,7 +312,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aScRange = ScRange( aScAddress, aScAddress );
// Zellen sollen nicht markiert werden
- bMark = FALSE;
+ bMark = false;
}
// Ist es benahmster Bereich (erst Namen dann DBBereiche) ?
else
@@ -340,7 +340,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aScAddress.SetCol( pViewData->GetCurX() );
aScAddress.SetTab( nTab );
aScRange = ScRange( aScAddress, aScAddress );
- bMark = FALSE;
+ bMark = false;
nResult = SCA_VALID;
}
}
@@ -351,10 +351,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// wir haben was gefunden
if( nResult & SCA_VALID )
{
- bFound = TRUE;
+ bFound = sal_True;
SCCOL nCol = aScRange.aStart.Col();
SCROW nRow = aScRange.aStart.Row();
- BOOL bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow );
+ sal_Bool bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow );
// markieren
if( bMark )
@@ -369,18 +369,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
bNothing = ( aCurrent == aOldMark );
}
else
- bNothing = FALSE;
+ bNothing = false;
if (!bNothing)
- MarkRange( aScRange, FALSE ); // Cursor kommt hinterher...
+ MarkRange( aScRange, false ); // Cursor kommt hinterher...
}
else
{
- // remove old selection, unless bUnmark argument is FALSE (from navigator)
+ // remove old selection, unless bUnmark argument is sal_False (from navigator)
if( bUnmark )
{
MoveCursorAbs( nCol, nRow,
- SC_FOLLOW_NONE, FALSE, FALSE );
+ SC_FOLLOW_NONE, false, false );
}
}
@@ -426,7 +426,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nNameTab;
if ( pDoc->GetTable( aAddress, nNameTab ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nNameTab != nTab )
SetTabNo( nNameTab );
}
@@ -478,7 +478,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SfxViewFrame* pViewFrame = NULL;
ScDocShell* pDocSh = (ScDocShell*)SfxObjectShell::GetFirst();
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
// zu aktivierenden ViewFrame suchen
@@ -543,13 +543,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_NORMALVIEWMODE:
case FID_PAGEBREAKMODE:
{
- BOOL bWantPageBreak = nSlot == FID_PAGEBREAKMODE;
+ sal_Bool bWantPageBreak = nSlot == FID_PAGEBREAKMODE;
// check whether there is an explicit argument, use it
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
{
- BOOL bItemValue = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bItemValue = ((const SfxBoolItem*)pItem)->GetValue();
bWantPageBreak = (nSlot == FID_PAGEBREAKMODE) == bItemValue;
}
@@ -557,12 +557,12 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
SetPagebreakMode( bWantPageBreak );
UpdatePageBreakData();
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
PaintGrid();
PaintTop();
PaintLeft();
rBindings.Invalidate( nSlot );
- rReq.AppendItem( SfxBoolItem( nSlot, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( nSlot, sal_True ) );
rReq.Done();
}
}
@@ -570,7 +570,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_FUNCTION_BOX:
{
- USHORT nChildId = ScFunctionChildWindow::GetChildWindowId();
+ sal_uInt16 nChildId = ScFunctionChildWindow::GetChildWindowId();
if ( rReq.GetArgs() )
pThisFrame->SetChildWindow( nChildId, ((const SfxBoolItem&) (rReq.GetArgs()->Get(FID_FUNCTION_BOX))).GetValue());
else
@@ -587,9 +587,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_TOGGLESYNTAX:
{
- BOOL bSet = !GetViewData()->IsSyntaxMode();
+ sal_Bool bSet = !GetViewData()->IsSyntaxMode();
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
GetViewData()->SetSyntaxMode( bSet );
PaintGrid();
@@ -600,9 +600,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
break;
case FID_TOGGLEHEADERS:
{
- BOOL bSet = !GetViewData()->IsHeaderMode();
+ sal_Bool bSet = !GetViewData()->IsHeaderMode();
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
GetViewData()->SetHeaderMode( bSet );
RepeatResize();
@@ -616,9 +616,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
ScViewData* pViewData = GetViewData();
const ScViewOptions& rOpts = pViewData->GetOptions();
- BOOL bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS );
+ sal_Bool bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS );
const SfxPoolItem *pItem;
- if( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bFormulaMode = ((const SfxBoolItem *)pItem)->GetValue();
ScViewOptions rSetOpts = ScViewOptions( rOpts );
@@ -635,11 +635,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_TOGGLEINPUTLINE:
{
- USHORT nId = ScInputWindowWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- BOOL bSet = ( pWnd == NULL );
+ sal_Bool bSet = ( pWnd == NULL );
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
bSet = ((const SfxBoolItem*)pItem)->GetValue();
pThisFrame->SetChildWindow( nId, bSet );
@@ -652,14 +652,14 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOM: // Statuszeile
case FID_SCALE:
{
- BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
+ sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
SvxZoomType eOldZoomType = GetZoomType();
SvxZoomType eNewZoomType = eOldZoomType;
const Fraction& rOldY = GetViewData()->GetZoomY(); // Y wird angezeigt
- USHORT nOldZoom = (USHORT)(( rOldY.GetNumerator() * 100 )
+ sal_uInt16 nOldZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 )
/ rOldY.GetDenominator());
- USHORT nZoom = nOldZoom;
- BOOL bCancel = FALSE;
+ sal_uInt16 nZoom = nOldZoom;
+ sal_Bool bCancel = false;
if ( pReqArgs )
{
@@ -675,7 +675,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SvxZoomItem aZoomItem( eOldZoomType, nOldZoom, SID_ATTR_ZOOM );
AbstractSvxZoomDialog* pDlg = NULL;
ScMarkData& rMark = GetViewData()->GetMarkData();
- USHORT nBtnFlags = SVX_ZOOM_ENABLE_50
+ sal_uInt16 nBtnFlags = SVX_ZOOM_ENABLE_50
| SVX_ZOOM_ENABLE_75
| SVX_ZOOM_ENABLE_100
| SVX_ZOOM_ENABLE_150
@@ -764,10 +764,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOMSLIDER:
{
const SfxPoolItem* pItem = NULL;
- BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
- if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem) == SFX_ITEM_SET )
+ sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
+ if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem) == SFX_ITEM_SET )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
if( nCurrentZoom )
{
SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom );
@@ -811,7 +811,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nTab;
SvULongs aIndexList( 4, 4 );
- SFX_REQUEST_ARG( rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES, sal_False );
+ SFX_REQUEST_ARG( rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES, false );
if ( pItem )
pItem->GetList( aIndexList );
else
@@ -824,7 +824,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg->SetDescription(
String( ScResId( STR_DLG_SELECTTABLES_TITLE ) ),
String( ScResId( STR_DLG_SELECTTABLES_LBNAME ) ),
- SID_SELECT_TABLES, HID_SELECTTABLES );
+ GetStaticInterface()->GetSlot(SID_SELECT_TABLES)->GetCommand(), HID_SELECTTABLES );
// fill all table names with selection state
String aTabName;
@@ -854,7 +854,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nFirstVisTab = 0;
// special case: only hidden tables selected -> do nothing
- sal_Bool bVisSelected = sal_False;
+ sal_Bool bVisSelected = false;
for( nSelIx = 0; !bVisSelected && (nSelIx < nSelCount); ++nSelIx )
bVisSelected = rDoc.IsVisible( nFirstVisTab = static_cast<SCTAB>(aIndexList[nSelIx]) );
if( !bVisSelected )
@@ -864,7 +864,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if( nSelCount )
{
for( nTab = 0; nTab < nTabCount; ++nTab )
- rMark.SelectTable( nTab, sal_False );
+ rMark.SelectTable( nTab, false );
for( nSelIx = 0; nSelIx < nSelCount; ++nSelIx )
rMark.SelectTable( static_cast<SCTAB>(aIndexList[nSelIx]), sal_True );
@@ -906,7 +906,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( eHSplit == SC_SPLIT_NORMAL || eVSplit == SC_SPLIT_NORMAL ) // aufheben
RemoveSplit();
else if ( eHSplit == SC_SPLIT_FIX || eVSplit == SC_SPLIT_FIX ) // normal
- FreezeSplitters( FALSE );
+ FreezeSplitters( false );
else // erzeugen
SplitAtCursor();
rReq.Done();
@@ -922,7 +922,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( eHSplit == SC_SPLIT_FIX || eVSplit == SC_SPLIT_FIX ) // aufheben
RemoveSplit();
else
- FreezeSplitters( TRUE ); // erzeugen oder fixieren
+ FreezeSplitters( sal_True ); // erzeugen oder fixieren
rReq.Done();
InvalidateSplit();
@@ -933,10 +933,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_CHG_SHOW:
{
- USHORT nId = ScHighlightChgDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScHighlightChgDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? false : sal_True );
}
break;
@@ -947,10 +947,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
rReq.Done ();
/*
- USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+ pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True );
*/
}
break;
@@ -966,7 +966,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if ( pReqArgs &&
- pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET &&
+ pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET &&
pItem->ISA( SfxStringItem ) )
{
String aComment = ((const SfxStringItem*)pItem)->GetValue();
@@ -988,7 +988,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if (!GetScDrawView())
{
GetViewData()->GetDocShell()->MakeDrawLayer();
- rBindings.InvalidateAll(FALSE);
+ rBindings.InvalidateAll(false);
}
break;
@@ -1011,7 +1011,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
ScDocProtection* pProtect = pDoc->GetDocProtection();
if (pProtect && pProtect->isProtected())
{
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = false;
String aPassword;
if (pProtect->isProtectedWithPass())
@@ -1021,19 +1021,19 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg = new SfxPasswordDialog( GetDialogParent(), &aText );
pDlg->SetText( ScResId(SCSTR_UNPROTECTDOC) );
pDlg->SetMinLen( 0 );
- pDlg->SetHelpId( FID_PROTECT_DOC );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_DOC );
if (pDlg->Execute() == RET_OK)
aPassword = pDlg->GetPassword();
else
- bCancel = TRUE;
+ bCancel = sal_True;
delete pDlg;
}
if (!bCancel)
{
Unprotect( TABLEID_DOC, aPassword );
- rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, false ) );
rReq.Done();
}
}
@@ -1044,7 +1044,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg = new SfxPasswordDialog( GetDialogParent(), &aText );
pDlg->SetText( ScResId(SCSTR_PROTECTDOC) );
pDlg->SetMinLen( 0 );
- pDlg->SetHelpId( FID_PROTECT_DOC );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_DOC );
pDlg->ShowExtras( SHOWEXTRAS_CONFIRM );
@@ -1052,7 +1052,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
String aPassword = pDlg->GetPassword();
Protect( TABLEID_DOC, aPassword );
- rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, sal_True ) );
rReq.Done();
}
@@ -1093,7 +1093,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
auto_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
pDlg->SetText( ScResId(SCSTR_UNPROTECTTAB) );
pDlg->SetMinLen( 0 );
- pDlg->SetHelpId( FID_PROTECT_TABLE );
+ pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_TABLE)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_TABLE );
if (pDlg->Execute() == RET_OK)
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index ef78925d3dff..6df3e1b84ebf 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -47,7 +47,6 @@
#include <sfx2/request.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <rtl/logfile.hxx>
@@ -108,13 +107,13 @@ using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-USHORT ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC;
-USHORT ScTabViewShell::nInsCellsCtrlState = 0;
-USHORT ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM;
+sal_uInt16 ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC;
+sal_uInt16 ScTabViewShell::nInsCellsCtrlState = 0;
+sal_uInt16 ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM;
// -----------------------------------------------------------------------
-void ScTabViewShell::Activate(BOOL bMDI)
+void ScTabViewShell::Activate(sal_Bool bMDI)
{
SfxViewShell::Activate(bMDI);
@@ -126,7 +125,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
ScModule* pScMod = SC_MOD();
pScMod->ViewShellChanged();
- ActivateView( TRUE, bFirstActivate );
+ ActivateView( sal_True, bFirstActivate );
ActivateOlk( GetViewData() );
// AutoCorrect umsetzen, falls der Writer seins neu angelegt hat
@@ -167,12 +166,12 @@ void ScTabViewShell::Activate(BOOL bMDI)
}
}
- UpdateInputHandler( TRUE );
+ UpdateInputHandler( sal_True );
if ( bFirstActivate )
{
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) );
- bFirstActivate = FALSE;
+ bFirstActivate = false;
// ReadExtOptions (view settings from Excel import) must also be done
// after the ctor, because of the potential calls to Window::Show.
@@ -184,7 +183,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
if ( pExtOpt && pExtOpt->IsChanged() )
{
GetViewData()->ReadExtOptions(*pExtOpt); // Excel view settings
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
pExtOpt->SetChanged( false );
}
}
@@ -210,7 +209,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
if(pScMod->IsRefDialogOpen())
{
- USHORT nModRefDlgId=pScMod->GetCurRefDlgId();
+ sal_uInt16 nModRefDlgId=pScMod->GetCurRefDlgId();
SfxChildWindow* pChildWnd = pThisFrame->GetChildWindow( nModRefDlgId );
if ( pChildWnd )
{
@@ -228,7 +227,7 @@ void ScTabViewShell::Activate(BOOL bMDI)
// beim Umschalten zwischen Dokumenten)
}
-void ScTabViewShell::Deactivate(BOOL bMDI)
+void ScTabViewShell::Deactivate(sal_Bool bMDI)
{
HideTip();
@@ -250,17 +249,17 @@ void ScTabViewShell::Deactivate(BOOL bMDI)
{
// during shell deactivation, shells must not be switched, or the loop
// through the shell stack (in SfxDispatcher::DoDeactivate_Impl) will not work
- BOOL bOldDontSwitch = bDontSwitch;
- bDontSwitch = TRUE;
+ sal_Bool bOldDontSwitch = bDontSwitch;
+ bDontSwitch = sal_True;
DeActivateOlk( GetViewData() );
- ActivateView( FALSE, FALSE );
+ ActivateView( false, false );
if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
- GetViewData()->GetDocShell()->UpdateOle(GetViewData(),TRUE);
+ GetViewData()->GetDocShell()->UpdateOle(GetViewData(),sal_True);
if ( pHdl )
- pHdl->NotifyChange( NULL, TRUE ); // Timer-verzoegert wg. Dokumentwechsel
+ pHdl->NotifyChange( NULL, sal_True ); // Timer-verzoegert wg. Dokumentwechsel
if (pScActiveViewShell == this)
pScActiveViewShell = NULL;
@@ -283,7 +282,7 @@ void ScTabViewShell::SetActive()
ActiveGrabFocus();
}
-USHORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing)
+sal_uInt16 ScTabViewShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing)
{
// Call EnterHandler even in formula mode here,
// so a formula change in an embedded object isn't lost
@@ -310,8 +309,8 @@ USHORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing)
if ( pFormShell )
{
- USHORT nRet = pFormShell->PrepareClose(bUI, bForBrowsing);
- if (nRet!=TRUE)
+ sal_uInt16 nRet = pFormShell->PrepareClose(bUI, bForBrowsing);
+ if (nRet!=sal_True)
return nRet;
}
return SfxViewShell::PrepareClose(bUI,bForBrowsing);
@@ -408,7 +407,7 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
aNewSize.Height() += aBorder.Top() + aBorder.Bottom();
}
- DoResize( rOfs, aNewSize, TRUE ); // rSize = Groesse von gridwin
+ DoResize( rOfs, aNewSize, sal_True ); // rSize = Groesse von gridwin
UpdateOleZoom(); // Zoom fuer In-Place berechnen
@@ -448,7 +447,7 @@ void ScTabViewShell::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoo
aNewY = aFrac400;
GetViewData()->UpdateScreenZoom( aNewX, aNewY );
- SetZoom( aNewX, aNewY, TRUE );
+ SetZoom( aNewX, aNewY, sal_True );
PaintGrid();
PaintTop();
@@ -471,7 +470,7 @@ void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
SCCOL nCol = pViewData->GetPosX(WhichH(ePos));
SCROW nRow = pViewData->GetPosY(WhichV(ePos));
SCTAB nTab = pViewData->GetTabNo();
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab );
if ( bNegativePage )
@@ -515,7 +514,7 @@ void ScTabViewShell::ShowCursor(bool /* bOn */)
//------------------------------------------------------------------
-void ScTabViewShell::WriteUserData(String& rData, BOOL /* bBrowse */)
+void ScTabViewShell::WriteUserData(String& rData, sal_Bool /* bBrowse */)
{
GetViewData()->WriteUserData(rData);
}
@@ -525,7 +524,7 @@ void ScTabViewShell::WriteUserDataSequence (uno::Sequence < beans::PropertyValue
GetViewData()->WriteUserDataSequence (rSettings);
}
-void ScTabViewShell::ReadUserData(const String& rData, BOOL /* bBrowse */)
+void ScTabViewShell::ReadUserData(const String& rData, sal_Bool /* bBrowse */)
{
if ( !GetViewData()->GetDocShell()->IsPreview() )
DoReadUserData( rData );
@@ -540,13 +539,13 @@ void ScTabViewShell::ReadUserDataSequence (const uno::Sequence < beans::Property
void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::PropertyValue >& rSettings )
{
Window* pOldWin = GetActiveWin();
- BOOL bFocus = pOldWin && pOldWin->HasFocus();
+ sal_Bool bFocus = pOldWin && pOldWin->HasFocus();
GetViewData()->ReadUserDataSequence(rSettings);
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
if ( GetViewData()->IsPagebreakMode() )
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
Window* pNewWin = GetActiveWin();
if (pNewWin && pNewWin != pOldWin)
@@ -575,13 +574,13 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper
void ScTabViewShell::DoReadUserData( const String& rData )
{
Window* pOldWin = GetActiveWin();
- BOOL bFocus = pOldWin && pOldWin->HasFocus();
+ sal_Bool bFocus = pOldWin && pOldWin->HasFocus();
GetViewData()->ReadUserData(rData);
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
if ( GetViewData()->IsPagebreakMode() )
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
Window* pNewWin = GetActiveWin();
if (pNewWin && pNewWin != pOldWin)
@@ -610,7 +609,7 @@ void ScTabViewShell::DoReadUserData( const String& rData )
void ScTabViewShell::SetDrawShellOrSub()
{
- bActiveDrawSh = TRUE;
+ bActiveDrawSh = sal_True;
if(bActiveDrawFormSh)
{
@@ -640,7 +639,7 @@ void ScTabViewShell::SetDrawShellOrSub()
}
}
-void ScTabViewShell::SetDrawShell( BOOL bActive )
+void ScTabViewShell::SetDrawShell( sal_Bool bActive )
{
if(bActive)
{
@@ -656,17 +655,17 @@ void ScTabViewShell::SetDrawShell( BOOL bActive )
{
SetCurSubShell(OST_Cell);
}
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
}
- BOOL bWasDraw = bActiveDrawSh || bActiveDrawTextSh;
+ sal_Bool bWasDraw = bActiveDrawSh || bActiveDrawTextSh;
bActiveDrawSh = bActive;
- bActiveDrawTextSh = FALSE;
+ bActiveDrawTextSh = false;
if ( !bActive )
{
@@ -677,22 +676,22 @@ void ScTabViewShell::SetDrawShell( BOOL bActive )
{
// Aktiven Teil an Cursor anpassen, etc.
MoveCursorAbs( GetViewData()->GetCurX(), GetViewData()->GetCurY(),
- SC_FOLLOW_NONE, FALSE, FALSE, TRUE );
+ SC_FOLLOW_NONE, false, false, sal_True );
}
}
}
-void ScTabViewShell::SetDrawTextShell( BOOL bActive )
+void ScTabViewShell::SetDrawTextShell( sal_Bool bActive )
{
bActiveDrawTextSh = bActive;
if ( bActive )
{
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
- bActiveDrawSh = FALSE;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
+ bActiveDrawSh = false;
SetCurSubShell(OST_DrawText);
}
else
@@ -700,7 +699,7 @@ void ScTabViewShell::SetDrawTextShell( BOOL bActive )
}
-void ScTabViewShell::SetPivotShell( BOOL bActive )
+void ScTabViewShell::SetPivotShell( sal_Bool bActive )
{
bActivePivotSh = bActive;
@@ -711,12 +710,12 @@ void ScTabViewShell::SetPivotShell( BOOL bActive )
{
if ( bActive )
{
- bActiveDrawTextSh = bActiveDrawSh = FALSE;
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
+ bActiveDrawTextSh = bActiveDrawSh = false;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
SetCurSubShell(OST_Pivot);
}
else
@@ -724,31 +723,31 @@ void ScTabViewShell::SetPivotShell( BOOL bActive )
}
}
-void ScTabViewShell::SetAuditShell( BOOL bActive )
+void ScTabViewShell::SetAuditShell( sal_Bool bActive )
{
bActiveAuditingSh = bActive;
if ( bActive )
{
- bActiveDrawTextSh = bActiveDrawSh = FALSE;
- bActiveDrawFormSh=FALSE;
- bActiveGraphicSh=FALSE;
- bActiveMediaSh=FALSE;
- bActiveOleObjectSh=FALSE;
- bActiveChartSh=FALSE;
+ bActiveDrawTextSh = bActiveDrawSh = false;
+ bActiveDrawFormSh=false;
+ bActiveGraphicSh=false;
+ bActiveMediaSh=false;
+ bActiveOleObjectSh=false;
+ bActiveChartSh=false;
SetCurSubShell(OST_Auditing);
}
else
SetCurSubShell(OST_Cell);
}
-void ScTabViewShell::SetDrawFormShell( BOOL bActive )
+void ScTabViewShell::SetDrawFormShell( sal_Bool bActive )
{
bActiveDrawFormSh = bActive;
if(bActiveDrawFormSh)
SetCurSubShell(OST_DrawForm);
}
-void ScTabViewShell::SetChartShell( BOOL bActive )
+void ScTabViewShell::SetChartShell( sal_Bool bActive )
{
bActiveChartSh = bActive;
@@ -756,7 +755,7 @@ void ScTabViewShell::SetChartShell( BOOL bActive )
SetCurSubShell(OST_Chart);
}
-void ScTabViewShell::SetGraphicShell( BOOL bActive )
+void ScTabViewShell::SetGraphicShell( sal_Bool bActive )
{
bActiveGraphicSh = bActive;
@@ -764,7 +763,7 @@ void ScTabViewShell::SetGraphicShell( BOOL bActive )
SetCurSubShell(OST_Graphic);
}
-void ScTabViewShell::SetMediaShell( BOOL bActive )
+void ScTabViewShell::SetMediaShell( sal_Bool bActive )
{
bActiveMediaSh = bActive;
@@ -772,7 +771,7 @@ void ScTabViewShell::SetMediaShell( BOOL bActive )
SetCurSubShell(OST_Media);
}
-void ScTabViewShell::SetOleObjectShell( BOOL bActive )
+void ScTabViewShell::SetOleObjectShell( sal_Bool bActive )
{
bActiveOleObjectSh = bActive;
@@ -782,7 +781,7 @@ void ScTabViewShell::SetOleObjectShell( BOOL bActive )
SetCurSubShell(OST_Cell);
}
-void ScTabViewShell::SetEditShell(EditView* pView, BOOL bActive )
+void ScTabViewShell::SetEditShell(EditView* pView, sal_Bool bActive )
{
if(bActive)
{
@@ -800,7 +799,7 @@ void ScTabViewShell::SetEditShell(EditView* pView, BOOL bActive )
bActiveEditSh = bActive;
}
-void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
+void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce)
{
ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell();
@@ -813,7 +812,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pCellShell->SetRepeatTarget( &aTarget );
}
- BOOL bPgBrk=pViewData->IsPagebreakMode();
+ sal_Bool bPgBrk=pViewData->IsPagebreakMode();
if(bPgBrk && !pPageBreakShell)
{
@@ -824,8 +823,8 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
if ( eOST!=eCurOST || bForce )
{
- BOOL bCellBrush = FALSE; // "format paint brush" allowed for cells
- BOOL bDrawBrush = FALSE; // "format paint brush" allowed for drawing objects
+ sal_Bool bCellBrush = false; // "format paint brush" allowed for cells
+ sal_Bool bDrawBrush = false; // "format paint brush" allowed for drawing objects
if(eCurOST!=OST_NONE) RemoveSubShell();
@@ -838,7 +837,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
{
AddSubShell(*pCellShell);
if(bPgBrk) AddSubShell(*pPageBreakShell);
- bCellBrush = TRUE;
+ bCellBrush = sal_True;
}
break;
case OST_Editing:
@@ -885,7 +884,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pDrawShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pDrawShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -898,7 +897,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pDrawFormShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pDrawFormShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -911,7 +910,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pChartShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pChartShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -924,7 +923,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pOleObjectShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pOleObjectShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -937,7 +936,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pGraphicShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pGraphicShell);
- bDrawBrush = TRUE;
+ bDrawBrush = sal_True;
}
break;
@@ -964,7 +963,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pPivotShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pPivotShell);
- bCellBrush = TRUE;
+ bCellBrush = sal_True;
}
break;
case OST_Auditing:
@@ -980,7 +979,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
pAuditingShell->SetRepeatTarget( &aTarget );
}
AddSubShell(*pAuditingShell);
- bCellBrush = TRUE;
+ bCellBrush = sal_True;
}
break;
default:
@@ -999,7 +998,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce)
}
}
-void ScTabViewShell::SetFormShellAtTop( BOOL bSet )
+void ScTabViewShell::SetFormShellAtTop( sal_Bool bSet )
{
if ( pFormShell && !bSet )
pFormShell->ForgetActiveControl(); // let the FormShell know it no longer has the focus
@@ -1007,14 +1006,14 @@ void ScTabViewShell::SetFormShellAtTop( BOOL bSet )
if ( bFormShellAtTop != bSet )
{
bFormShellAtTop = bSet;
- SetCurSubShell( GetCurObjectSelectionType(), TRUE );
+ SetCurSubShell( GetCurObjectSelectionType(), sal_True );
}
}
IMPL_LINK( ScTabViewShell, FormControlActivated, FmFormShell*, EMPTYARG )
{
// a form control got the focus, so the form shell has to be on top
- SetFormShellAtTop( TRUE );
+ SetFormShellAtTop( sal_True );
return 0;
}
@@ -1028,9 +1027,9 @@ ObjectSelectionType ScTabViewShell::GetCurObjectSelectionType()
SfxShell* ScTabViewShell::GetMySubShell() const
{
- // GetSubShell() war frueher const, und GetSubShell(USHORT) sollte es auch sein...
+ // GetSubShell() war frueher const, und GetSubShell(sal_uInt16) sollte es auch sein...
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SfxShell* pSub = ((ScTabViewShell*)this)->GetSubShell(nPos);
while (pSub)
{
@@ -1046,17 +1045,17 @@ SfxShell* ScTabViewShell::GetMySubShell() const
}
-BOOL ScTabViewShell::IsDrawTextShell() const
+sal_Bool ScTabViewShell::IsDrawTextShell() const
{
return ( pDrawTextShell && ( GetMySubShell() == pDrawTextShell ) );
}
-BOOL ScTabViewShell::IsAuditShell() const
+sal_Bool ScTabViewShell::IsAuditShell() const
{
return ( pAuditingShell && ( GetMySubShell() == pAuditingShell ) );
}
-void ScTabViewShell::SetDrawTextUndo( SfxUndoManager* pNewUndoMgr )
+void ScTabViewShell::SetDrawTextUndo( ::svl::IUndoManager* pNewUndoMgr )
{
// Default: Undo-Manager der DocShell
if (!pNewUndoMgr)
@@ -1087,13 +1086,13 @@ ScTabViewShell* ScTabViewShell::GetActiveViewShell()
//------------------------------------------------------------------
-SfxPrinter* ScTabViewShell::GetPrinter( BOOL bCreate )
+SfxPrinter* ScTabViewShell::GetPrinter( sal_Bool bCreate )
{
// Drucker ist immer da (wird fuer die FontListe schon beim Starten angelegt)
return GetViewData()->GetDocShell()->GetPrinter(bCreate);
}
-USHORT ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
return GetViewData()->GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}
@@ -1122,7 +1121,7 @@ PrintDialog* ScTabViewShell::CreatePrintDialog( Window *pParent )
pDocShell->UpdatePendingRowHeights( MAXTAB, true );
ScMarkData aMarkData;
- aMarkData.SelectTable( GetViewData()->GetTabNo(), TRUE );
+ aMarkData.SelectTable( GetViewData()->GetTabNo(), true );
for ( SCTAB i=0; i<nTabCount; i++ )
{
@@ -1147,8 +1146,8 @@ PrintDialog* ScTabViewShell::CreatePrintDialog( Window *pParent )
pDlg->EnableRange ( PRINTDIALOG_RANGE );
pDlg->SetFirstPage ( 1 );
pDlg->SetMinPage ( 1 );
- pDlg->SetLastPage ( (USHORT)nDocPageMax );
- pDlg->SetMaxPage ( (USHORT)nDocPageMax );
+ pDlg->SetLastPage ( (sal_uInt16)nDocPageMax );
+ pDlg->SetMaxPage ( (sal_uInt16)nDocPageMax );
pDlg->EnableCollate ();
return pDlg;
@@ -1173,7 +1172,7 @@ void ScTabViewShell::PreparePrint( PrintDialog* pPrintDialog )
}
ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI )
+ PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI )
{
// if SID_PRINTDOCDIRECT is executed and there's a selection,
// ask if only the selection should be printed
@@ -1188,7 +1187,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
return ERRCODE_IO_ABORT;
if ( nBtn == RET_OK )
- bPrintSelected = TRUE;
+ bPrintSelected = true;
}
ErrCode nRet = ERRCODE_IO_ABORT;
@@ -1201,7 +1200,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
uno::Sequence<sal_Int32> aSheets;
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
- USHORT nPrinted = 0;
+ sal_uInt16 nPrinted = 0;
for ( SCTAB nTab=0; nTab<nTabCount; nTab++ )
if ( bAllTabs || rMarkData.GetTableSelect(nTab) )
{
@@ -1219,12 +1218,12 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
nRet = SfxViewShell::DoPrint( pPrinter, pPrintDialog, bSilent, bIsAPI );
}
- bPrintSelected = FALSE;
+ bPrintSelected = false;
return nRet;
}
-USHORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI,
+sal_uInt16 ScTabViewShell::Print( SfxProgress& rProgress, sal_Bool bIsAPI,
PrintDialog* pPrintDialog )
{
ScDocShell* pDocShell = GetViewData()->GetDocShell();
@@ -1239,7 +1238,7 @@ USHORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI,
void ScTabViewShell::StopEditShell()
{
if ( pEditShell != NULL && !bDontSwitch )
- SetEditShell(NULL, FALSE );
+ SetEditShell(NULL, false );
}
//------------------------------------------------------------------
@@ -1257,7 +1256,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefClose, String*, EMPTYARG )
SetTabNo( GetViewData()->GetRefTabNo() );
}
- ScSimpleRefDlgWrapper::SetAutoReOpen( TRUE );
+ ScSimpleRefDlgWrapper::SetAutoReOpen( sal_True );
return 0;
}
@@ -1303,7 +1302,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefChange, String*, pResult )
void ScTabViewShell::StartSimpleRefDialog(
const String& rTitle, const String& rInitVal,
- BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection )
+ sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection )
{
SfxViewFrame* pViewFrm = GetViewFrame();
@@ -1316,9 +1315,9 @@ void ScTabViewShell::StartSimpleRefDialog(
pViewFrm->GetFrame().Appear();
}
- USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId();
- SC_MOD()->SetRefDialog( nId, TRUE, pViewFrm );
+ SC_MOD()->SetRefDialog( nId, sal_True, pViewFrm );
ScSimpleRefDlgWrapper* pWnd = (ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId );
if (pWnd)
@@ -1329,7 +1328,7 @@ void ScTabViewShell::StartSimpleRefDialog(
LINK( this, ScTabViewShell, SimpleRefChange ) );
pWnd->SetRefString( rInitVal );
pWnd->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection );
- pWnd->SetAutoReOpen( FALSE );
+ pWnd->SetAutoReOpen( false );
Window* pWin = pWnd->GetWindow();
pWin->SetText( rTitle );
pWnd->StartRefInput();
@@ -1339,7 +1338,7 @@ void ScTabViewShell::StartSimpleRefDialog(
void ScTabViewShell::StopSimpleRefDialog()
{
SfxViewFrame* pViewFrm = GetViewFrame();
- USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId();
ScSimpleRefDlgWrapper* pWnd = (ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId );
if (pWnd)
@@ -1352,29 +1351,29 @@ void ScTabViewShell::StopSimpleRefDialog()
//------------------------------------------------------------------
-BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
+sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
ScModule* pScMod = SC_MOD();
SfxViewFrame* pThisFrame = GetViewFrame();
if ( pThisFrame->GetChildWindow( SID_OPENDLG_FUNCTION ) )
- return FALSE;
+ return false;
KeyCode aCode = rKEvt.GetKeyCode();
- BOOL bShift = aCode.IsShift();
- BOOL bControl = aCode.IsMod1();
- BOOL bAlt = aCode.IsMod2();
- USHORT nCode = aCode.GetCode();
- BOOL bUsed = FALSE;
- BOOL bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles
- BOOL bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace
- BOOL bDraw = IsDrawTextEdit();
+ sal_Bool bShift = aCode.IsShift();
+ sal_Bool bControl = aCode.IsMod1();
+ sal_Bool bAlt = aCode.IsMod2();
+ sal_uInt16 nCode = aCode.GetCode();
+ sal_Bool bUsed = false;
+ sal_Bool bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles
+ sal_Bool bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace
+ sal_Bool bDraw = IsDrawTextEdit();
HideNoteMarker(); // Notiz-Anzeige
// don't do extra HideCursor/ShowCursor calls if EnterHandler will switch to a different sheet
- BOOL bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() );
- BOOL bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet;
+ sal_Bool bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() );
+ sal_Bool bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet;
if (bHideCursor)
HideAllCursors();
@@ -1387,17 +1386,17 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe
if( !bUsed )
- bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators
+ bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators
}
else if( bAnyEdit )
{
- BOOL bIsType = FALSE;
- USHORT nModi = aCode.GetModifier();
- USHORT nGroup = aCode.GetGroup();
+ sal_Bool bIsType = false;
+ sal_uInt16 nModi = aCode.GetModifier();
+ sal_uInt16 nGroup = aCode.GetGroup();
if ( nGroup == KEYGROUP_NUM || nGroup == KEYGROUP_ALPHA || nGroup == 0 )
if ( !bControl && !bAlt )
- bIsType = TRUE;
+ bIsType = sal_True;
if ( nGroup == KEYGROUP_MISC )
switch ( nCode )
@@ -1419,14 +1418,14 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
bIsType = (nModi == 0); // nur ohne Modifier
break;
default:
- bIsType = TRUE;
+ bIsType = sal_True;
}
if( bIsType )
bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe
if( !bUsed )
- bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators
+ bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators
if ( !bUsed && !bIsType && nCode != KEY_RETURN ) // Eingabe nochmal hinterher
bUsed = pScMod->InputKeyEvent( rKEvt );
@@ -1444,20 +1443,20 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
!(eFunc == KEYFUNC_COPY && eMarkType == SC_MARK_SIMPLE_FILTERED) )
{
ErrorMessage(STR_NOMULTISELECT);
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
if (!bUsed)
- bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators
+ bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators
// during inplace editing, some slots are handled by the
// container app and are executed during Window::KeyInput.
// -> don't pass keys to input handler that would be used there
// but should call slots instead.
- BOOL bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
+ sal_Bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent )
- bUsed = pScMod->InputKeyEvent( rKEvt, TRUE ); // Eingabe
+ bUsed = pScMod->InputKeyEvent( rKEvt, sal_True ); // Eingabe
}
if (!bInPlace && !bUsed && !bDraw)
@@ -1466,7 +1465,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
{
case KEY_RETURN:
{
- BOOL bNormal = !bControl && !bAlt;
+ sal_Bool bNormal = !bControl && !bAlt;
if ( !bAnyEdit && bNormal )
{
// je nach Optionen mit Enter in den Edit-Modus schalten
@@ -1475,17 +1474,17 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( rOpt.GetEnterEdit() )
{
pScMod->SetInputMode( SC_INPUT_TABLE );
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
- BOOL bEditReturn = bControl && !bShift; // An Edit-Engine weiter
+ sal_Bool bEditReturn = bControl && !bShift; // An Edit-Engine weiter
if ( !bUsed && !bEditReturn )
{
if ( bOnRefSheet )
HideAllCursors();
- BYTE nMode = SC_ENTER_NORMAL;
+ sal_uInt8 nMode = SC_ENTER_NORMAL;
if ( bShift && bControl )
nMode = SC_ENTER_MATRIX;
else if ( bAlt )
@@ -1502,7 +1501,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD );
}
else
- UpdateInputHandler(TRUE);
+ UpdateInputHandler(sal_True);
if ( bOnRefSheet )
ShowAllCursors();
@@ -1511,7 +1510,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
// anderes Dokument diese ViewShell nicht die ist, auf der eingegeben
// wird!
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
break;
@@ -1522,24 +1521,24 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( !bUsed && bAlt && !bControl )
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch (nCode)
{
case KEY_UP:
ModifyCellSize( DIR_TOP, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_DOWN:
ModifyCellSize( DIR_BOTTOM, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_LEFT:
ModifyCellSize( DIR_LEFT, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_RIGHT:
ModifyCellSize( DIR_RIGHT, bShift );
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case KEY_PAGEUP:
nSlotId = bShift ? SID_CURSORPAGELEFT_SEL : SID_CURSORPAGELEFT_;
@@ -1551,7 +1550,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( nSlotId )
{
GetViewData()->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD );
- bUsed = TRUE;
+ bUsed = sal_True;
}
}
@@ -1561,9 +1560,9 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
return bUsed;
}
-BOOL ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent)
+sal_Bool ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent)
{
- return sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKeyEvent ));
+ return sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKeyEvent ));
}
bool ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent )
@@ -1598,30 +1597,30 @@ bool ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent )
aTarget( this ), \
pDialogDPObject(NULL), \
pNavSettings(NULL), \
- bActiveDrawSh(FALSE), \
- bActiveDrawTextSh(FALSE), \
- bActivePivotSh(FALSE), \
- bActiveAuditingSh(FALSE), \
- bActiveDrawFormSh(FALSE), \
- bActiveOleObjectSh(FALSE), \
- bActiveChartSh(FALSE), \
- bActiveGraphicSh(FALSE), \
- bActiveMediaSh(FALSE), \
- bActiveEditSh(FALSE), \
- bFormShellAtTop(FALSE), \
- bDontSwitch(FALSE), \
- bInFormatDialog(FALSE), \
- bPrintSelected(FALSE), \
- bReadOnly(FALSE), \
+ bActiveDrawSh(false), \
+ bActiveDrawTextSh(false), \
+ bActivePivotSh(false), \
+ bActiveAuditingSh(false), \
+ bActiveDrawFormSh(false), \
+ bActiveOleObjectSh(false), \
+ bActiveChartSh(false), \
+ bActiveGraphicSh(false), \
+ bActiveMediaSh(false), \
+ bActiveEditSh(false), \
+ bFormShellAtTop(false), \
+ bDontSwitch(false), \
+ bInFormatDialog(false), \
+ bPrintSelected(false), \
+ bReadOnly(false), \
pScSbxObject(NULL), \
- bChartAreaValid(FALSE), \
+ bChartAreaValid(false), \
nCurRefDlgId(0), \
pAccessibilityBroadcaster(NULL)
//------------------------------------------------------------------
-void ScTabViewShell::Construct( BYTE nForceDesignMode )
+void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
{
SfxApplication* pSfxApp = SFX_APP();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1636,12 +1635,12 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
pCurFrameLine = new SvxBorderLine( &aColBlack, 20, 0, 0 );
pPivotSource = new ScArea;
- StartListening(*GetViewData()->GetDocShell(),TRUE);
- StartListening(*GetViewFrame(),TRUE);
- StartListening(*pSfxApp,TRUE); // #i62045# #i62046# application is needed for Calc's own hints
+ StartListening(*GetViewData()->GetDocShell(),sal_True);
+ StartListening(*GetViewFrame(),sal_True);
+ StartListening(*pSfxApp,sal_True); // #i62045# #i62046# application is needed for Calc's own hints
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
- BOOL bFirstView = !pFirst
+ sal_Bool bFirstView = !pFirst
|| (pFirst == GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh));
if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
@@ -1656,19 +1655,19 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
pDoc->SetVisibleTab(nVisTab);
}
SetTabNo( nVisTab );
- BOOL bNegativePage = pDoc->IsNegativePage( nVisTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nVisTab );
// show the right cells
GetViewData()->SetScreenPos( bNegativePage ? aVisArea.TopRight() : aVisArea.TopLeft() );
if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
{
- pDocSh->SetInplace( TRUE ); // schon so initialisiert
+ pDocSh->SetInplace( sal_True ); // schon so initialisiert
if (pDoc->IsEmbedded())
pDoc->ResetEmbedded(); // keine blaue Markierung
}
else if ( bFirstView )
{
- pDocSh->SetInplace( FALSE );
+ pDocSh->SetInplace( false );
GetViewData()->RefreshZoom(); // recalculate PPT
if (!pDoc->IsEmbedded())
pDoc->SetEmbedded( aVisArea ); // VisArea markieren
@@ -1701,9 +1700,9 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
// wenn die ViewShell noch nicht kostruiert ist...
if (pDoc->GetDrawLayer())
MakeDrawView( nForceDesignMode );
- ViewOptionsHasChanged(FALSE); // legt auch evtl. DrawView an
+ ViewOptionsHasChanged(false); // legt auch evtl. DrawView an
- SfxUndoManager* pMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pDocSh->GetUndoManager();
SetUndoManager( pMgr );
pFormShell->SetUndoManager( pMgr );
if ( !pDoc->IsUndoEnabled() )
@@ -1716,7 +1715,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
if ( bFirstView ) // first view?
{
- pDoc->SetDocVisible( TRUE ); // used when creating new sheets
+ pDoc->SetDocVisible( sal_True ); // used when creating new sheets
if ( pDocSh->IsEmpty() )
{
// set first sheet's RTL flag (following will already be initialized because of SetDocVisible)
@@ -1737,7 +1736,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
pDoc->MakeTable(i,false);
}
- pDocSh->SetEmpty( FALSE ); // #i6232# make sure this is done only once
+ pDocSh->SetEmpty( false ); // #i6232# make sure this is done only once
}
// ReadExtOptions is now in Activate
@@ -1758,7 +1757,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
}
if (!bLink)
if (pDoc->HasDdeLinks() || pDoc->HasAreaLinks())
- bLink = TRUE;
+ bLink = sal_True;
if (bLink)
{
if ( !pFirst )
@@ -1771,17 +1770,17 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
}
}
- BOOL bReImport = FALSE; // importierte Daten aktualisieren
+ sal_Bool bReImport = false; // importierte Daten aktualisieren
ScDBCollection* pDBColl = pDoc->GetDBCollection();
if ( pDBColl )
{
- USHORT nCount = pDBColl->GetCount();
- for (USHORT i=0; i<nCount && !bReImport; i++)
+ sal_uInt16 nCount = pDBColl->GetCount();
+ for (sal_uInt16 i=0; i<nCount && !bReImport; i++)
{
ScDBData* pData = (*pDBColl)[i];
if ( pData->IsStripData() &&
pData->HasImportParam() && !pData->HasImportSelection() )
- bReImport = TRUE;
+ bReImport = sal_True;
}
}
if (bReImport)
@@ -1802,10 +1801,10 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
// ScDispatchProviderInterceptor registers itself in ctor
xDisProvInterceptor = new ScDispatchProviderInterceptor( this );
- bFirstActivate = TRUE; // NavigatorUpdate aufschieben bis Activate()
+ bFirstActivate = sal_True; // NavigatorUpdate aufschieben bis Activate()
// #105575#; update only in the first creation of the ViewShell
- pDocSh->SetUpdateEnabled(FALSE);
+ pDocSh->SetUpdateEnabled(false);
if ( GetViewFrame()->GetFrame().IsInPlace() )
UpdateHeaderWidth(); // The implace activation requires headers to be calculated
@@ -1836,7 +1835,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
// has to be shown by the sfx. ReadUserData is deferred until the first Activate call.
// old DesignMode state from form layer must be restored, too
- BYTE nForceDesignMode = SC_FORCEMODE_NONE;
+ sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE;
if ( pOldSh && pOldSh->ISA( ScPreviewShell ) )
{
ScPreviewShell* pPreviewShell = ((ScPreviewShell*)pOldSh);
@@ -1848,13 +1847,13 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
if ( GetViewData()->GetDocShell()->IsPreview() )
{
// preview for template dialog: always show whole page
- SetZoomType( SVX_ZOOM_WHOLEPAGE, TRUE ); // zoom value is recalculated at next Resize
+ SetZoomType( SVX_ZOOM_WHOLEPAGE, sal_True ); // zoom value is recalculated at next Resize
}
else
{
Fraction aFract( rAppOpt.GetZoom(), 100 );
- SetZoom( aFract, aFract, TRUE );
- SetZoomType( rAppOpt.GetZoomType(), TRUE );
+ SetZoom( aFract, aFract, sal_True );
+ SetZoomType( rAppOpt.GetZoomType(), sal_True );
}
// make Controller known to SFX
@@ -1949,13 +1948,13 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
void ScTabViewShell::SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest )
{
- bChartAreaValid = TRUE;
+ bChartAreaValid = sal_True;
aChartSource = rSource;
aChartPos = rDest;
nChartDestTab = GetViewData()->GetTabNo();
}
-BOOL ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const
+sal_Bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const
{
rSource = aChartSource;
rDest = aChartPos;
@@ -1976,10 +1975,10 @@ ScNavigatorSettings* ScTabViewShell::GetNavigatorSettings()
void ScTabViewShell::ExecTbx( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem = NULL;
if ( pReqArgs )
- pReqArgs->GetItemState( nSlot, TRUE, &pItem );
+ pReqArgs->GetItemState( nSlot, sal_True, &pItem );
switch ( nSlot )
{
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index aee5c276fdd9..030c26f3ef71 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -61,7 +61,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
{
- ULONG nSlot = ((SfxSimpleHint&)rHint).GetId();
+ sal_uLong nSlot = ((SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case FID_DATACHANGED:
@@ -70,13 +70,13 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case FID_REFMODECHANGED:
{
- BOOL bRefMode = SC_MOD()->IsFormulaMode();
+ sal_Bool bRefMode = SC_MOD()->IsFormulaMode();
if (!bRefMode)
StopRefMode();
else
{
GetSelEngine()->Reset();
- GetFunctionSet()->SetAnchorFlag(TRUE);
+ GetFunctionSet()->SetAnchorFlag(sal_True);
// AnchorFlag, damit gleich mit Control angehaengt werden kann
}
}
@@ -141,7 +141,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
case SC_HINT_FORCESETTAB:
- SetTabNo( GetViewData()->GetTabNo(), TRUE );
+ SetTabNo( GetViewData()->GetTabNo(), sal_True );
break;
default:
@@ -151,7 +151,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else if (rHint.ISA(ScPaintHint)) // neu zeichnen
{
ScPaintHint* pHint = (ScPaintHint*) &rHint;
- USHORT nParts = pHint->GetParts();
+ sal_uInt16 nParts = pHint->GetParts();
SCTAB nTab = GetViewData()->GetTabNo();
if (pHint->GetStartTab() <= nTab && pHint->GetEndTab() >= nTab)
{
@@ -209,7 +209,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
EditView* pView = GetViewData()->GetEditView(eActive); // ist nicht 0
- SetEditShell(pView ,TRUE);
+ SetEditShell(pView ,sal_True);
}
}
}
@@ -222,7 +222,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const ScTablesHint& rTabHint = (const ScTablesHint&)rHint;
SCTAB nTab1 = rTabHint.GetTab1();
SCTAB nTab2 = rTabHint.GetTab2();
- USHORT nId = rTabHint.GetId();
+ sal_uInt16 nId = rTabHint.GetId();
switch (nId)
{
case SC_TAB_INSERTED:
@@ -247,7 +247,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
// kann und dann auch die aktive View umgeschaltet werden muss.
SCTAB nNewTab = nActiveTab;
- BOOL bForce = FALSE;
+ bool bStayOnActiveTab = true;
switch (nId)
{
case SC_TAB_INSERTED:
@@ -258,7 +258,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( nTab1 < nNewTab ) // vorher geloescht
--nNewTab;
else if ( nTab1 == nNewTab ) // aktuelle geloescht
- bForce = TRUE;
+ bStayOnActiveTab = false;
break;
case SC_TAB_MOVED:
if ( nNewTab == nTab1 ) // verschobene Tabelle
@@ -280,7 +280,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
case SC_TAB_HIDDEN:
if ( nTab1 == nNewTab ) // aktuelle ausgeblendet
- bForce = TRUE;
+ bStayOnActiveTab = false;
break;
}
@@ -288,13 +288,14 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( nNewTab >= pDoc->GetTableCount() )
nNewTab = pDoc->GetTableCount() - 1;
- SetTabNo( nNewTab, bForce );
+ sal_Bool bForce = !bStayOnActiveTab;
+ SetTabNo( nNewTab, bForce, false, bStayOnActiveTab );
}
else if (rHint.ISA(ScIndexHint))
{
const ScIndexHint& rIndexHint = (const ScIndexHint&)rHint;
- USHORT nId = rIndexHint.GetId();
- USHORT nIndex = rIndexHint.GetIndex();
+ sal_uInt16 nId = rIndexHint.GetId();
+ sal_uInt16 nIndex = rIndexHint.GetIndex();
switch (nId)
{
case SC_HINT_SHOWRANGEFINDER:
@@ -393,7 +394,7 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc,
default:
*ppItem = new SvxNumberInfoItem(
pDoc->GetFormatTable(),
- (const USHORT)
+ (const sal_uInt16)
SID_ATTR_NUMBERFORMAT_INFO );
}
}
@@ -410,7 +411,7 @@ void ScTabViewShell::UpdateNumberFormatter(
{
const sal_uInt32* pDelArr = rInfoItem.GetDelArray();
- for ( USHORT i=0; i<nDelCount; i++ )
+ for ( sal_uInt16 i=0; i<nDelCount; i++ )
rInfoItem.GetNumberFormatter()->DeleteEntry( pDelArr[i] );
}
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index ec9a30f70e31..75ce2b1d6832 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -61,9 +61,9 @@ void ScTabViewShell::SetDefaultFrameLine( const SvxBorderLine* pLine )
//------------------------------------------------------------------
-BOOL ScTabViewShell::HasSelection( BOOL bText ) const
+sal_Bool ScTabViewShell::HasSelection( sal_Bool bText ) const
{
- BOOL bHas = FALSE;
+ sal_Bool bHas = false;
ScViewData* pData = (ScViewData*)GetViewData(); // const weggecasted
if ( bText )
{
@@ -82,7 +82,7 @@ BOOL ScTabViewShell::HasSelection( BOOL bText ) const
if ( eMarkType == SC_MARK_SIMPLE )
bHas = ( aRange.aStart != aRange.aEnd ); // more than 1 cell
else
- bHas = TRUE; // multiple selection or filtered
+ bHas = sal_True; // multiple selection or filtered
}
return bHas;
}
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 34e521de03c7..e3d038fd4bb1 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -53,9 +53,9 @@
// forwards -> galwrap.cxx (wg. CLOOKs)
-USHORT GallerySGA_FORMAT_GRAPHIC();
+sal_uInt16 GallerySGA_FORMAT_GRAPHIC();
Graphic GalleryGetGraphic ();
-BOOL GalleryIsLinkage ();
+sal_Bool GalleryIsLinkage ();
String GalleryGetFullPath ();
String GalleryGetFilterName ();
@@ -63,7 +63,7 @@ String GalleryGetFilterName ();
class SvxIMapDlg;
-USHORT ScIMapChildWindowId();
+sal_uInt16 ScIMapChildWindowId();
SvxIMapDlg* ScGetIMapDlg();
const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg );
const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg );
@@ -72,7 +72,7 @@ const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg );
void ScTabViewShell::ExecChildWin(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_GALLERY:
@@ -90,7 +90,7 @@ void ScTabViewShell::GetChildWinState( SfxItemSet& rSet )
{
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GALLERY ) )
{
- USHORT nId = GalleryChildWindow::GetChildWindowId();
+ sal_uInt16 nId = GalleryChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_GALLERY, GetViewFrame()->HasChildWindow( nId ) ) );
}
}
@@ -104,10 +104,10 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq )
if ( pArgs )
{
const SfxPoolItem* pItem = NULL;
- SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, TRUE, &pItem);
+ SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, sal_True, &pItem);
if ( eState == SFX_ITEM_SET )
{
- UINT32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue();
/******************************************************************
* Graphik einfuegen
@@ -164,13 +164,13 @@ String ScTabViewShell::GetDescription() const
void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_IMAP:
{
SfxViewFrame* pThisFrame = GetViewFrame();
- USHORT nId = ScIMapChildWindowId();
+ sal_uInt16 nId = ScIMapChildWindowId();
pThisFrame->ToggleChildWindow( nId );
GetViewFrame()->GetBindings().Invalidate( SID_IMAP );
@@ -224,7 +224,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -233,15 +233,15 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
{
// Disabled wird nicht mehr...
- BOOL bThere = FALSE;
+ sal_Bool bThere = false;
SfxViewFrame* pThisFrame = GetViewFrame();
- USHORT nId = ScIMapChildWindowId();
+ sal_uInt16 nId = ScIMapChildWindowId();
if ( pThisFrame->KnowsChildWindow(nId) )
if ( pThisFrame->HasChildWindow(nId) )
- bThere = TRUE;
+ bThere = sal_True;
ObjectSelectionType eType=GetCurObjectSelectionType();
- BOOL bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic);
+ sal_Bool bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic);
if(!bThere && !bEnable)
{
rSet.DisableItem( nWhich );
@@ -255,7 +255,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
case SID_IMAP_EXEC:
{
- BOOL bDisable = TRUE;
+ sal_Bool bDisable = sal_True;
SdrView* pDrView = GetSdrView();
if ( pDrView )
@@ -264,7 +264,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
if ( rMarkList.GetMarkCount() == 1 )
if ( ScIMapDlgGetObj(ScGetIMapDlg()) ==
(void*) rMarkList.GetMark(0)->GetMarkedSdrObj() )
- bDisable = FALSE;
+ bDisable = false;
}
rSet.Put( SfxBoolItem( SID_IMAP_EXEC, bDisable ) );
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 3f0d6c2118ee..e245db772527 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -35,7 +35,6 @@
#define _ZFORLIST_DECLARE_TABLE
#include "scitems.hxx"
-#include <svl/slstitm.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <svl/zformat.hxx>
@@ -69,7 +68,7 @@
#include "compiler.hxx"
-BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
+sal_Bool ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
{
String aStr;
@@ -87,7 +86,7 @@ BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
return true;
}
- USHORT nGlobStrId = 0;
+ sal_uInt16 nGlobStrId = 0;
switch (eFunc)
{
case SUBTOTAL_FUNC_AVE: nGlobStrId = STR_FUN_TEXT_AVG; break;
@@ -146,10 +145,10 @@ BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
}
rFuncStr = aStr;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
@@ -171,16 +170,16 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
SCCOL nPosX = pViewData->GetCurX();
SCROW nPosY = pViewData->GetCurY();
SCTAB nTab = pViewData->GetTabNo();
- USHORT nMyId = 0;
+ sal_uInt16 nMyId = 0;
SfxViewFrame* pThisFrame = GetViewFrame();
- BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
SCTAB nTabCount = pDoc->GetTableCount();
SCTAB nTabSelCount = rMark.GetSelectCount();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
@@ -210,7 +209,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
if ( nTabSelCount > 1 )
{
// #i22589# also take "Print Entire Sheet" into account here
- BOOL bHas = FALSE;
+ sal_Bool bHas = false;
for (SCTAB i=0; !bHas && i<nTabCount; i++)
bHas = rMark.GetTableSelect(i) && (pDoc->GetPrintRangeCount(i) || pDoc->IsPrintEntireSheet(i));
if (!bHas)
@@ -240,7 +239,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_SEARCH_OPTIONS:
{
- USHORT nOptions = 0xffff; // alles erlaubt
+ sal_uInt16 nOptions = 0xffff; // alles erlaubt
// wenn ReadOnly, kein Ersetzen:
if (GetViewData()->GetDocShell()->IsReadOnly())
nOptions &= ~( SEARCH_OPTIONS_REPLACE | SEARCH_OPTIONS_REPLACE_ALL );
@@ -270,12 +269,12 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_TOGGLEINPUTLINE:
{
- USHORT nId = ScInputWindowWrapper::GetChildWindowId();
+ sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
if ( pThisFrame->KnowsChildWindow( nId ) )
{
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- rSet.Put( SfxBoolItem( nWhich, pWnd ? TRUE : FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, pWnd ? sal_True : false ) );
}
else
rSet.DisableItem( nWhich );
@@ -299,9 +298,9 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
if ( pStyleSheet )
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
- USHORT nScale = ((const SfxUInt16Item&)
+ sal_uInt16 nScale = ((const SfxUInt16Item&)
rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue();
- USHORT nPages = ((const SfxUInt16Item&)
+ sal_uInt16 nPages = ((const SfxUInt16Item&)
rStyleSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue();
if ( nScale == 100 && nPages == 0 )
rSet.DisableItem( nWhich );
@@ -316,7 +315,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
else
{
const Fraction& rOldY = GetViewData()->GetZoomY();
- USHORT nZoom = (USHORT)(( rOldY.GetNumerator() * 100 )
+ sal_uInt16 nZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 )
/ rOldY.GetDenominator());
rSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, nZoom, nWhich ) );
}
@@ -329,7 +328,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
else
{
const Fraction& rOldY = GetViewData()->GetZoomY();
- USHORT nCurrentZoom = (USHORT)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator());
+ sal_uInt16 nCurrentZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator());
if( nCurrentZoom )
{
@@ -352,7 +351,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_TOGGLEFORMULA:
{
const ScViewOptions& rOpts = pViewData->GetOptions();
- BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
+ sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS );
rSet.Put(SfxBoolItem(nWhich, bFormulaMode ));
}
break;
@@ -465,7 +464,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_PRINTPREVIEW:
// Toggle-Slot braucht einen State
- rSet.Put( SfxBoolItem( nWhich, FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, false ) );
break;
case SID_READONLY_MODE:
@@ -483,7 +482,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
}
//------------------------------------------------------------------
-void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage )
+void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
{
SfxAbstractTabDialog * pDlg = NULL;
ScDocument* pDoc = GetViewData()->GetDocument();
@@ -511,7 +510,7 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage )
pOldSet->MergeRange( SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO );
pOldSet->Put(*pNumberInfoItem );
- bInFormatDialog = TRUE;
+ bInFormatDialog = true;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -520,14 +519,14 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage )
if ( nTabPage != 0xffff )
pDlg->SetCurPageId( nTabPage );
short nResult = pDlg->Execute();
- bInFormatDialog = FALSE;
+ bInFormatDialog = false;
if ( nResult == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
const SfxPoolItem* pItem=NULL;
- if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,TRUE,&pItem)==SFX_ITEM_SET)
+ if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,sal_True,&pItem)==SFX_ITEM_SET)
{
UpdateNumberFormatter( pDoc,(const SvxNumberInfoItem&)*pItem);
@@ -605,7 +604,7 @@ void ScTabViewShell::ExecuteInputDirect()
//------------------------------------------------------------------
-void ScTabViewShell::UpdateInputHandler( BOOL bForce /* = FALSE */, BOOL bStopEditing /* = TRUE */ )
+void ScTabViewShell::UpdateInputHandler( sal_Bool bForce /* = sal_False */, sal_Bool bStopEditing /* = sal_True */ )
{
ScInputHandler* pHdl = pInputHandler ? pInputHandler : SC_MOD()->GetInputHdl();
@@ -633,8 +632,8 @@ void ScTabViewShell::UpdateInputHandler( BOOL bForce /* = FALSE */, BOOL bStopEd
PutInOrder( nStartRow, nEndRow );
PutInOrder( nStartTab, nEndTab );
- BOOL bHideFormula = FALSE;
- BOOL bHideAll = FALSE;
+ sal_Bool bHideFormula = false;
+ sal_Bool bHideAll = false;
if (pDoc->IsTabProtected(nTab))
{
@@ -727,7 +726,7 @@ void ScTabViewShell::GetSaveState( SfxItemSet& rSet )
SfxShell* pDocSh = GetViewData()->GetDocShell();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if ( nWhich != SID_SAVEDOC || !GetViewData()->GetDocShell()->IsDocShared() )
@@ -749,26 +748,26 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
const SfxItemSet* pReqArgs = rReq.GetArgs();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_UNDO:
case SID_REDO:
if ( pUndoManager )
{
- BOOL bIsUndo = ( nSlot == SID_UNDO );
+ sal_Bool bIsUndo = ( nSlot == SID_UNDO );
- USHORT nCount = 1;
+ sal_uInt16 nCount = 1;
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, true, &pItem ) == SFX_ITEM_SET )
nCount = ((const SfxUInt16Item*)pItem)->GetValue();
// lock paint for more than one cell undo action (not for editing within a cell)
- BOOL bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
+ sal_Bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
if ( bLockPaint )
pDocSh->LockPaint();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if ( bIsUndo )
pUndoManager->Undo(0);
@@ -779,7 +778,7 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
if ( bLockPaint )
pDocSh->UnlockPaint();
- GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
}
break;
}
@@ -791,7 +790,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
SfxUndoManager* pUndoManager = pSh->GetUndoManager();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -803,9 +802,9 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
if ( pUndoManager )
{
List* pList = aStrLst.GetList();
- BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
- USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
+ sal_uInt16 nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
pUndoManager->GetRedoActionComment(i) ),
LIST_APPEND );
@@ -833,11 +832,11 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
SfxBindings& rBindings = GetViewFrame()->GetBindings();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
switch (nSlotId)
{
case SID_GRID_VISIBLE:
- if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET )
{
aGridOptions.SetGridVisible( ((const SfxBoolItem*)pItem)->GetValue() );
aViewOptions.SetGridOptions(aGridOptions);
@@ -846,7 +845,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
break;
case SID_GRID_USE:
- if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET )
{
aGridOptions.SetUseGridSnap( ((const SfxBoolItem*)pItem)->GetValue() );
aViewOptions.SetGridOptions(aGridOptions);
@@ -855,7 +854,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
break;
case SID_HELPLINES_MOVE:
- if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET )
+ if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET )
{
aViewOptions.SetOption( VOPT_HELPLINES, ((const SfxBoolItem*)pItem)->GetValue() );
rBindings.Invalidate(SID_HELPLINES_MOVE);
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 10cd0d543c15..b744053a5c84 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -62,9 +62,11 @@
#include <sfx2/viewfrm.hxx>
#include <svtools/soerr.hxx>
#include <svl/rectitem.hxx>
+#include <svl/slstitm.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <sot/exchange.hxx>
+#include <tools/diagnose_ex.h>
#include "tabvwsh.hxx"
#include "globstr.hrc"
@@ -115,7 +117,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
}
}
-BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
+sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
{
// Gueltigkeits-Hinweisfenster nicht ueber dem Objekt stehenlassen
RemoveHintWindow();
@@ -123,7 +125,7 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef();
Window* pWin = GetActiveWin();
ErrCode nErr = ERRCODE_NONE;
- BOOL bErrorShown = FALSE;
+ sal_Bool bErrorShown = false;
{
SfxInPlaceClient* pClient = FindIPClient( xObj, pWin );
@@ -173,7 +175,7 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
((ScClient*)pClient)->SetGrafEdit( NULL );
nErr = pClient->DoVerb( nVerb );
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
// SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an
// attach listener to selection changes in chart that affect cell
@@ -260,7 +262,7 @@ void ScTabViewShell::DeactivateOle()
void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot != SID_OBJECTRESIZE )
{
SC_MOD()->InputEnterHandler();
@@ -302,7 +304,6 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
case SID_INSERT_PLUGIN:
case SID_INSERT_SOUND:
case SID_INSERT_VIDEO:
- case SID_INSERT_APPLET:
case SID_INSERT_SMATH:
case SID_INSERT_FLOATINGFRAME:
FuInsertOLE(this, pWin, pView, pDrModel, rReq);
@@ -329,7 +330,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nSdrObjKind == OBJ_OLE2)
{
@@ -361,7 +362,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
// #98721#
case SID_FM_CREATE_FIELDCONTROL:
{
- SFX_REQUEST_ARG( rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR, sal_False );
+ SFX_REQUEST_ARG( rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR, false );
DBG_ASSERT( pDescriptorItem, "SID_FM_CREATE_FIELDCONTROL: invalid request args!" );
if(pDescriptorItem)
@@ -422,13 +423,13 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
{
- BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
- BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
+ sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
ScDocShell* pDocShell = ( GetViewData() ? GetViewData()->GetDocShell() : NULL );
bool bShared = ( pDocShell ? pDocShell->IsDocShared() : false );
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -459,14 +460,6 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
break;
- case SID_INSERT_APPLET:
- // wenn SOLAR_JAVA nicht definiert ist, immer disablen
-#ifdef SOLAR_JAVA
- if (bOle || bTabProt)
-#endif
- rSet.DisableItem( nWhich );
- break;
-
case SID_INSERT_GRAPHIC:
case SID_INSERT_AVMEDIA:
case SID_FONTWORK_GALLERY_FLOATER:
@@ -486,6 +479,99 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
}
+//------------------------------------------------------------------
+
+void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
+{
+ SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
+ ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager();
+
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ ScDocShell* pDocSh = GetViewData()->GetDocShell();
+
+ sal_uInt16 nSlot = rReq.GetSlot();
+ switch ( nSlot )
+ {
+ case SID_UNDO:
+ case SID_REDO:
+ if ( pUndoManager )
+ {
+ sal_Bool bIsUndo = ( nSlot == SID_UNDO );
+
+ sal_uInt16 nCount = 1;
+ const SfxPoolItem* pItem;
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET )
+ nCount = ((const SfxUInt16Item*)pItem)->GetValue();
+
+ // lock paint for more than one cell undo action (not for editing within a cell)
+ sal_Bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
+ if ( bLockPaint )
+ pDocSh->LockPaint();
+
+ try
+ {
+ for (sal_uInt16 i=0; i<nCount; i++)
+ {
+ if ( bIsUndo )
+ pUndoManager->Undo();
+ else
+ pUndoManager->Redo();
+ }
+ }
+ catch ( const uno::Exception& )
+ {
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
+ }
+
+ if ( bLockPaint )
+ pDocSh->UnlockPaint();
+
+ GetViewFrame()->GetBindings().InvalidateAll(false);
+ }
+ break;
+// default:
+// GetViewFrame()->ExecuteSlot( rReq );
+ }
+}
+
+void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
+{
+ SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
+ ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager();
+
+ SfxWhichIter aIter(rSet);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ switch (nWhich)
+ {
+ case SID_GETUNDOSTRINGS:
+ case SID_GETREDOSTRINGS:
+ {
+ SfxStringListItem aStrLst( nWhich );
+ if ( pUndoManager )
+ {
+ List* pList = aStrLst.GetList();
+ sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
+ size_t nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
+ for (size_t i=0; i<nCount; i++)
+ pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
+ pUndoManager->GetRedoActionComment(i) ),
+ LIST_APPEND );
+ }
+ rSet.Put( aStrLst );
+ }
+ break;
+ default:
+ // get state from sfx view frame
+ GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ }
+
+ nWhich = aIter.NextWhich();
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index b3c314af66a5..8e3bf1c4d24f 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -72,7 +72,7 @@
//------------------------------------------------------------------
-void ScTabViewShell::SetCurRefDlgId( USHORT nNew )
+void ScTabViewShell::SetCurRefDlgId( sal_uInt16 nNew )
{
// CurRefDlgId is stored in ScModule to find if a ref dialog is open,
// and in the view to identify the view that has opened the dialog
@@ -81,7 +81,7 @@ void ScTabViewShell::SetCurRefDlgId( USHORT nNew )
SfxModelessDialog* ScTabViewShell::CreateRefDialog(
SfxBindings* pB, SfxChildWindow* pCW, SfxChildWinInfo* pInfo,
- Window* pParent, USHORT nSlotId )
+ Window* pParent, sal_uInt16 nSlotId )
{
// Dialog nur aufmachen, wenn ueber ScModule::SetRefDialog gerufen, damit
// z.B. nach einem Absturz offene Ref-Dialoge nicht wiederkommen (#42341#).
@@ -94,14 +94,14 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
// the dialog has been opened in a different view
// -> lock the dispatcher for this view (modal mode)
- GetViewData()->GetDispatcher().Lock( TRUE ); // lock is reset when closing dialog
+ GetViewData()->GetDispatcher().Lock( sal_True ); // lock is reset when closing dialog
return NULL;
}
SfxModelessDialog* pResult = 0;
if(pCW)
- pCW->SetHideNotDelete(TRUE);
+ pCW->SetHideNotDelete(sal_True);
switch( nSlotId )
{
@@ -159,10 +159,10 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
case SID_DEFINE_DBNAME:
{
// wenn auf einem bestehenden Bereich aufgerufen, den markieren
- GetDBData( TRUE, SC_DB_OLD );
+ GetDBData( sal_True, SC_DB_OLD );
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
- MarkDataArea( FALSE );
+ MarkDataArea( false );
pResult = new ScDbNameDlg( pB, pCW, pParent, GetViewData() );
}
@@ -222,7 +222,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
ScRefAddress aCurPos ( pViewData->GetCurX(),
pViewData->GetCurY(),
pViewData->GetTabNo(),
- FALSE, FALSE, FALSE );
+ false, false, false );
pResult = new ScTabOpDlg( pB, pCW, pParent, pViewData->GetDocument(), aCurPos );
}
diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx
index dd8232d72db5..e2bcd34e87d2 100644
--- a/sc/source/ui/view/tabvwshd.cxx
+++ b/sc/source/ui/view/tabvwshd.cxx
@@ -57,7 +57,7 @@
//------------------------------------------------------------------
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
//! Parent-Window fuer Dialoge
//! Problem: OLE Server!
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index b55d4f2d9098..23cab155b3ec 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -57,7 +57,7 @@
//==================================================================
-String ScTabViewShell::GetSelectionText( BOOL bWholeWord )
+String ScTabViewShell::GetSelectionText( sal_Bool bWholeWord )
{
String aStrSelection;
@@ -141,10 +141,10 @@ String ScTabViewShell::GetSelectionText( BOOL bWholeWord )
//------------------------------------------------------------------------
void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const String& rTarget,
- USHORT nMode )
+ sal_uInt16 nMode )
{
SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode;
- BOOL bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text
+ sal_Bool bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text
if ( bAsText )
{
@@ -159,11 +159,11 @@ void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const S
{
// if the view is not active, InsertURLField doesn't work
// -> use InsertBookmark to directly manipulate cell content
- // bTryReplace=TRUE -> if cell contains only one URL, replace it
+ // bTryReplace=sal_True -> if cell contains only one URL, replace it
SCCOL nPosX = GetViewData()->GetCurX();
SCROW nPosY = GetViewData()->GetCurY();
- InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, TRUE );
+ InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, sal_True );
}
}
else
@@ -199,7 +199,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co
ScModule* pScMod = SC_MOD();
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
- BOOL bSelectFirst = FALSE;
+ sal_Bool bSelectFirst = false;
if ( !pScMod->IsEditMode() )
{
if ( !SelectionEditable() )
@@ -245,7 +245,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co
void ScTabViewShell::ExecSearch( SfxRequest& rReq )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem;
switch ( nSlot )
@@ -253,13 +253,13 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
case FID_SEARCH_NOW:
{
if ( pReqArgs &&
- SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, FALSE, &pItem) )
+ SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem) )
{
DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" );
const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem;
ScGlobal::SetSearchItem( *pSearchItem );
- SearchAndReplace( pSearchItem, TRUE, rReq.IsAPI() );
+ SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() );
rReq.Done();
}
}
@@ -267,7 +267,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
case SID_SEARCH_ITEM:
if (pReqArgs && SFX_ITEM_SET ==
- pReqArgs->GetItemState(SID_SEARCH_ITEM, FALSE, &pItem))
+ pReqArgs->GetItemState(SID_SEARCH_ITEM, false, &pItem))
{
// Search-Item merken
DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" );
@@ -283,7 +283,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
case FID_REPLACE_ALL:
case FID_SEARCH_ALL:
{
- if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, FALSE, &pItem))
+ if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, false, &pItem))
{
// SearchItem holen
@@ -292,7 +292,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
// SearchItem fuellen
aSearchItem.SetSearchString(((SfxStringItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
+ if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, false, &pItem))
aSearchItem.SetReplaceString(((SfxStringItem*)pItem)->GetValue());
if (nSlot == FID_SEARCH)
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 52bfd4213050..9975230c47c4 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -41,6 +41,7 @@
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
+#include <sfx2/objface.hxx>
#include <svx/svxdlg.hxx>
#include <editeng/colritem.hxx>
@@ -58,6 +59,7 @@
#include "tabbgcolor.hxx"
#include "tabbgcolordlg.hxx"
+#include "sccommands.h"
#include <vector>
@@ -65,7 +67,7 @@ using ::boost::scoped_ptr;
using namespace com::sun::star;
#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
+ (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
//------------------------------------------------------------------
@@ -76,7 +78,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SCTAB nCurrentTab = pViewData->GetTabNo();
SCTAB nTabCount = pDoc->GetTableCount();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
HideListBox(); // Autofilter-DropDown-Listbox
@@ -88,7 +90,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
String aName;
pDoc->GetName( nCurrentTab, aName );
- BOOL bVisible=TRUE;
+ sal_Bool bVisible=sal_True;
if( pReqArgs != NULL )
{
const SfxPoolItem* pItem;
@@ -100,7 +102,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScMarkData& rMark = pViewData->GetMarkData();
SCTAB nTabSelCount = rMark.GetSelectCount();
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
@@ -122,7 +124,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScMarkData& rMark = pViewData->GetMarkData();
SCTAB nTabSelCount = rMark.GetSelectCount();
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
@@ -178,21 +180,21 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
DBG_ASSERT(pDlg, "Dialog create fail!");
String aTabName;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for ( SCTAB i=0; i != nTabCount; i++ )
{
if (!pDoc->IsVisible(i))
{
pDoc->GetName( i, aTabName );
pDlg->Insert( aTabName, bFirst );
- bFirst = FALSE;
+ bFirst = false;
}
}
if ( pDlg->Execute() == RET_OK )
{
- USHORT nCount = pDlg->GetSelectEntryCount();
- for (USHORT nPos=0; nPos<nCount; nPos++)
+ sal_uInt16 nCount = pDlg->GetSelectEntryCount();
+ for (sal_uInt16 nPos=0; nPos<nCount; nPos++)
{
aName = pDlg->GetSelectEntry(nPos);
ShowTable( aName );
@@ -217,7 +219,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pReqArgs != NULL ) // von Basic
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
const SfxPoolItem* pTabItem;
const SfxPoolItem* pNameItem;
String aName;
@@ -252,14 +254,14 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
SCTAB nTabs[MAXTABCOUNT];
SCTAB nCount = 0;
- USHORT n = 0;
+ sal_uInt16 n = 0;
const String* pStr = pDlg->GetFirstTable( &n );
while ( pStr )
{
nTabs[nCount++] = static_cast<SCTAB>(n);
pStr = pDlg->GetNextTable( &n );
}
- BOOL bLink = pDlg->GetTablesAsLink();
+ sal_Bool bLink = pDlg->GetTablesAsLink();
if (nCount != 0)
{
if(pDlg->IsTableBefore())
@@ -370,7 +372,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if( pReqArgs != NULL )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const SfxPoolItem* pItem;
String aName;
@@ -397,22 +399,25 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
- USHORT nRet = RET_OK;
- BOOL bDone = FALSE;
+ sal_uInt16 nRet = RET_OK;
+ sal_Bool bDone = false;
String aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
String aName;
String aDlgTitle;
+ const sal_Char* pHelpId = 0;
switch ( nSlot )
{
case FID_TAB_APPEND:
aDlgTitle = String(ScResId(SCSTR_APDTABLE));
pDoc->CreateValidTabName( aName );
+ pHelpId = HID_SC_APPEND_NAME;
break;
case FID_TAB_RENAME:
aDlgTitle = String(ScResId(SCSTR_RENAMETAB));
pDoc->GetName( pViewData->GetTabNo(), aName );
+ pHelpId = HID_SC_RENAME_NAME;
break;
}
@@ -476,10 +481,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pDoc->GetChangeTrack() != NULL )
break; // bei aktiviertem ChangeTracking kein TabMove
- BOOL bDoIt = FALSE;
- USHORT nDoc = 0;
+ sal_Bool bDoIt = false;
+ sal_uInt16 nDoc = 0;
SCTAB nTab = pViewData->GetTabNo();
- BOOL bCpy = FALSE;
+ sal_Bool bCpy = false;
String aDocName;
String aTabName;
@@ -504,7 +509,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
ScDocShell* pScSh = NULL;
- USHORT i=0;
+ sal_uInt16 i=0;
while ( pSh )
{
@@ -531,7 +536,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
else // Kein Dokumentname -> neues Dokument
{
nDoc = SC_DOC_NEW;
- bDoIt = TRUE;
+ bDoIt = sal_True;
}
if ( bDoIt && nTab >= nTableCount ) // ggf. anhaengen
@@ -575,7 +580,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
pDlg->GetTabNameString( aTabName );
}
- bDoIt = TRUE;
+ bDoIt = true;
String aFoundDocName;
if ( nDoc != SC_DOC_NEW )
@@ -587,7 +592,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( !pSh->GetDocument()->IsDocEditable() )
{
ErrorMessage(STR_READONLYERR);
- bDoIt = FALSE;
+ bDoIt = false;
}
}
}
@@ -613,7 +618,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
// Parameter war ueberfluessig, weil die Methode an der Table haengt
- BOOL bDoIt = rReq.IsAPI();
+ sal_Bool bDoIt = rReq.IsAPI();
if( !bDoIt )
{
// wenn's nicht von Basic kommt, nochmal nachfragen:
@@ -634,7 +639,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
SCTAB nNewTab = nCurrentTab;
SCTAB nFirstTab=0;
- BOOL bTabFlag=FALSE;
+ sal_Bool bTabFlag=false;
ScMarkData& rMark = pViewData->GetMarkData();
std::vector<SCTAB> TheTabs;
for(SCTAB i=0;i<nTabCount;i++)
@@ -642,7 +647,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if(rMark.GetTableSelect(i) &&!pDoc->IsTabProtected(i))
{
TheTabs.push_back(i);
- bTabFlag=TRUE;
+ bTabFlag=true;
if(nNewTab==i) nNewTab++;
}
if(!bTabFlag) nFirstTab=i;
@@ -661,25 +666,25 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocFunc aFunc(*pDocSh);
- BOOL bSet = !pDoc->IsLayoutRTL( nCurrentTab );
+ sal_Bool bSet = !pDoc->IsLayoutRTL( nCurrentTab );
const ScMarkData& rMark = pViewData->GetMarkData();
if ( rMark.GetSelectCount() != 0 )
{
// handle several sheets
- SfxUndoManager* pUndoManager = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = pDocSh->GetUndoManager();
String aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
pUndoManager->EnterListAction( aUndo, aUndo );
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if ( rMark.GetTableSelect(nTab) )
- aFunc.SetLayoutRTL( nTab, bSet, FALSE );
+ aFunc.SetLayoutRTL( nTab, bSet, false );
pUndoManager->LeaveListAction();
}
else
- aFunc.SetLayoutRTL( nCurrentTab, bSet, FALSE );
+ aFunc.SetLayoutRTL( nCurrentTab, bSet, false );
}
break;
@@ -710,7 +715,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if( pReqArgs != NULL )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const SfxPoolItem* pItem;
Color aColor;
if( IS_AVAILABLE( FN_PARAM_1, &pItem ) )
@@ -745,8 +750,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
- USHORT nRet = RET_OK; /// temp
- BOOL bDone = FALSE; /// temp
+ sal_uInt16 nRet = RET_OK; /// temp
+ sal_Bool bDone = false; /// temp
Color aTabBgColor;
Color aNewTabBgColor;
@@ -758,7 +763,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
String(ScResId(SCSTR_SET_TAB_BG_COLOR)),
String(ScResId(SCSTR_NO_TAB_BG_COLOR)),
aTabBgColor,
- nSlot,RID_SCDLG_TAB_BG_COLOR);
+ CMD_FID_TAB_SET_TAB_BG_COLOR,
+ RID_SCDLG_TAB_BG_COLOR);
while ( !bDone && nRet == RET_OK )
{
nRet = pDlg->Execute();
@@ -842,7 +848,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
SCTAB nTabSelCount = rMark.GetSelectCount();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
@@ -855,7 +861,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
case FID_TABLE_HIDE:
{
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
@@ -867,10 +873,10 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
case FID_TABLE_SHOW:
{
- BOOL bHasHidden = FALSE;
+ sal_Bool bHasHidden = false;
for ( SCTAB i=0; i < nTabCount && !bHasHidden; i++ )
if (!pDoc->IsVisible(i))
- bHasHidden = TRUE;
+ bHasHidden = sal_True;
if ( !bHasHidden || pDoc->IsDocProtected() || nTabSelCount > 1 )
rSet.DisableItem( nWhich );
}
@@ -882,7 +888,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
rSet.DisableItem( nWhich );
else
{
- USHORT nVis = 0;
+ sal_uInt16 nVis = 0;
for ( SCTAB i=0; i < nTabCount && nVis<2; i++ )
if (pDoc->IsVisible(i))
++nVis;
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 7c55632fdbd8..b77352846ca8 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -73,7 +73,7 @@ void ScTabViewShell::GetSbxState( SfxItemSet& /* rSet */ )
void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
{
- USHORT nSlotId = rReq.GetSlot();
+ sal_uInt16 nSlotId = rReq.GetSlot();
const SfxItemSet* pReqArgs = rReq.GetArgs();
// Objekte aktivieren/deaktivieren immer auf der sichtbaren View
@@ -116,9 +116,9 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
case SID_OBJECT_WIDTH:
case SID_OBJECT_HEIGHT:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlotId, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pReqArgs && pReqArgs->GetItemState( nSlotId, sal_True, &pItem ) == SFX_ITEM_SET )
{
long nNewVal = ((const SfxInt32Item*)pItem)->GetValue();
if ( nNewVal < 0 )
@@ -147,7 +147,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
pDrView->ResizeMarkedObj( aRect.TopLeft(),
Fraction( 1, 1 ),
Fraction( nNewVal, aRect.GetHeight() ) );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -184,7 +184,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet )
// SID_OLE_OBJECT - removed (old Basic)
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch (nWhich)
@@ -268,7 +268,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint )
pAccessibilityBroadcaster->Broadcast( rHint );
}
-BOOL ScTabViewShell::HasAccessibilityObjects()
+sal_Bool ScTabViewShell::HasAccessibilityObjects()
{
return pAccessibilityBroadcaster != NULL;
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 52c3c6cc12e6..b7c2e3c14a05 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -77,8 +77,8 @@ using namespace com::sun::star;
#define TAG_TABBARWIDTH "tw:"
-static BOOL bMoveArea = FALSE; //! Member?
-USHORT nEditAdjust = SVX_ADJUST_LEFT; //! Member !!!
+static sal_Bool bMoveArea = false; //! Member?
+sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; //! Member !!!
ScViewDataTable::ScViewDataTable() :
eZoomType( SVX_ZOOM_PERCENT ),
@@ -96,7 +96,7 @@ ScViewDataTable::ScViewDataTable() :
nCurX( 0 ),
nCurY( 0 ),
bShowGrid( true ),
- bOldCurValid( FALSE )
+ bOldCurValid( false )
{
nPosX[0]=nPosX[1]=0;
nPosY[0]=nPosY[1]=0;
@@ -313,21 +313,21 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh )
nRefTabNo ( 0 ),
nPasteFlags ( SC_PASTE_NONE ),
eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
- bActive ( TRUE ), //! wie initialisieren?
- bIsRefMode ( FALSE ),
- bDelMarkValid( FALSE ),
+ bActive ( sal_True ), //! wie initialisieren?
+ bIsRefMode ( false ),
+ bDelMarkValid( false ),
nFillMode ( SC_FILL_NONE ),
- bPagebreak ( FALSE ),
- bSelCtrlMouseClick( FALSE )
+ bPagebreak ( false ),
+ bSelCtrlMouseClick( false )
{
- SetGridMode ( TRUE );
- SetSyntaxMode ( FALSE );
- SetHeaderMode ( TRUE );
- SetTabMode ( TRUE );
- SetVScrollMode ( TRUE );
- SetHScrollMode ( TRUE );
- SetOutlineMode ( TRUE );
+ SetGridMode ( sal_True );
+ SetSyntaxMode ( false );
+ SetHeaderMode ( sal_True );
+ SetTabMode ( sal_True );
+ SetVScrollMode ( sal_True );
+ SetHScrollMode ( sal_True );
+ SetOutlineMode ( sal_True );
aScrSize = Size( (long) ( STD_COL_WIDTH * PIXEL_PER_TWIPS * OLE_STD_CELLS_X ),
(long) ( ScGlobal::nStdRowHeight * PIXEL_PER_TWIPS * OLE_STD_CELLS_Y ) );
@@ -335,10 +335,10 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh )
for ( SCTAB i = 1; i <= MAXTAB; i++ )
pTabData[i] = NULL;
pThisTab = pTabData[nTabNo];
- for (USHORT j=0; j<4; j++)
+ for (sal_uInt16 j=0; j<4; j++)
{
pEditView[j] = NULL;
- bEditActive[j] = FALSE;
+ bEditActive[j] = false;
}
nEditEndCol = nEditStartCol = nEditCol = 0;
@@ -381,9 +381,9 @@ ScViewData::ScViewData( const ScViewData& rViewData )
nTabNo ( rViewData.nTabNo ),
nRefTabNo ( rViewData.nTabNo ), // kein RefMode
eEditActivePart( rViewData.eEditActivePart ),
- bActive ( TRUE ), //! wie initialisieren?
- bIsRefMode ( FALSE ),
- bDelMarkValid( FALSE ),
+ bActive ( sal_True ), //! wie initialisieren?
+ bIsRefMode ( false ),
+ bDelMarkValid( false ),
nFillMode ( SC_FILL_NONE ),
bPagebreak ( rViewData.bPagebreak ),
bSelCtrlMouseClick( rViewData.bSelCtrlMouseClick )
@@ -404,10 +404,10 @@ ScViewData::ScViewData( const ScViewData& rViewData )
else
pTabData[i] = NULL;
pThisTab = pTabData[nTabNo];
- for (USHORT j=0; j<4; j++)
+ for (sal_uInt16 j=0; j<4; j++)
{
pEditView[j] = NULL;
- bEditActive[j] = FALSE;
+ bEditActive[j] = false;
}
nEditEndCol = nEditStartCol = nEditCol = 0;
@@ -550,7 +550,7 @@ void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
{
- BOOL bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.size() == 0 );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
@@ -577,7 +577,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
}
}
-void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll )
+void ScViewData::SetZoomType( SvxZoomType eNew, sal_Bool bAll )
{
std::vector< SCTAB > vTabs; // Empty for all tabs
if ( !bAll ) // get selected tabs
@@ -594,7 +594,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll )
void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs )
{
- BOOL bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.size() == 0 );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
Fraction aFrac20( 1,5 );
@@ -666,7 +666,7 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vec
RefreshZoom();
}
-void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll )
+void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll )
{
std::vector< SCTAB > vTabs;
if ( !bAll ) // get selected tabs
@@ -698,7 +698,7 @@ void ScViewData::RefreshZoom()
aLogicMode.SetScaleY( GetZoomY() );
}
-void ScViewData::SetPagebreakMode( BOOL bSet )
+void ScViewData::SetPagebreakMode( sal_Bool bSet )
{
bPagebreak = bSet;
@@ -765,7 +765,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const
ScMarkData aNewMark( aMarkData ); // use a local copy for MarkToSimple
- BOOL bMulti = aNewMark.IsMultiMarked();
+ sal_Bool bMulti = aNewMark.IsMultiMarked();
if (bMulti)
{
aNewMark.MarkToSimple();
@@ -774,7 +774,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const
if (bMulti)
{
rRange = new ScRangeList;
- aNewMark.FillRangeListWithMarks( rRange, FALSE );
+ aNewMark.FillRangeListWithMarks( rRange, false );
}
else
{
@@ -785,7 +785,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const
}
}
-BOOL ScViewData::SimpleColMarked()
+sal_Bool ScViewData::SimpleColMarked()
{
SCCOL nStartCol;
SCROW nStartRow;
@@ -795,12 +795,12 @@ BOOL ScViewData::SimpleColMarked()
SCTAB nEndTab;
if (GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE)
if (nStartRow==0 && nEndRow==MAXROW)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScViewData::SimpleRowMarked()
+sal_Bool ScViewData::SimpleRowMarked()
{
SCCOL nStartCol;
SCROW nStartRow;
@@ -810,12 +810,12 @@ BOOL ScViewData::SimpleRowMarked()
SCTAB nEndTab;
if (GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE)
if (nStartCol==0 && nEndCol==MAXCOL)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return false;
}
-BOOL ScViewData::IsMultiMarked()
+sal_Bool ScViewData::IsMultiMarked()
{
// Test for "real" multi selection, calling MarkToSimple on a local copy,
// and taking filtered in simple area marks into account.
@@ -835,7 +835,7 @@ void ScViewData::SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, S
}
void ScViewData::SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- BYTE nMode )
+ sal_uInt8 nMode )
{
nFillMode = nMode;
nFillStartX = nStartCol;
@@ -878,19 +878,19 @@ void ScViewData::SetOldCursor( SCCOL nNewX, SCROW nNewY )
{
pThisTab->nOldCurX = nNewX;
pThisTab->nOldCurY = nNewY;
- pThisTab->bOldCurValid = TRUE;
+ pThisTab->bOldCurValid = sal_True;
}
void ScViewData::ResetOldCursor()
{
- pThisTab->bOldCurValid = FALSE;
+ pThisTab->bOldCurValid = false;
}
Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY,
Window* pWin, const ScPatternAttr* pPattern,
- BOOL bForceToTop )
+ sal_Bool bForceToTop )
{
- return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,TRUE),
+ return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,sal_True),
pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY() ).
GetEditArea( pPattern, bForceToTop );
}
@@ -899,16 +899,16 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
ScEditEngineDefaulter* pNewEngine,
Window* pWin, SCCOL nNewX, SCROW nNewY )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
ScHSplitPos eHWhich = WhichH(eWhich);
- BOOL bWasThere = FALSE;
+ sal_Bool bWasThere = false;
if (pEditView[eWhich])
{
// Wenn die View schon da ist, nichts aufrufen, was die Cursorposition aendert
if (bEditActive[eWhich])
- bWasThere = TRUE;
+ bWasThere = sal_True;
else
pEditView[eWhich]->SetEditEngine(pNewEngine);
@@ -925,26 +925,26 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// bei IdleFormat wird manchmal ein Cursor gemalt, wenn die View schon weg ist (23576)
- ULONG nEC = pNewEngine->GetControlWord();
+ sal_uLong nEC = pNewEngine->GetControlWord();
pNewEngine->SetControlWord(nEC & ~EE_CNTRL_DOIDLEFORMAT);
- ULONG nVC = pEditView[eWhich]->GetControlWord();
+ sal_uLong nVC = pEditView[eWhich]->GetControlWord();
pEditView[eWhich]->SetControlWord(nVC & ~EV_CNTRL_AUTOSCROLL);
- bEditActive[eWhich] = TRUE;
+ bEditActive[eWhich] = sal_True;
const ScPatternAttr* pPattern = pDoc->GetPattern( nNewX, nNewY, nTabNo );
SvxCellHorJustify eJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
- BOOL bBreak = ( eJust == SVX_HOR_JUSTIFY_BLOCK ) ||
+ sal_Bool bBreak = ( eJust == SVX_HOR_JUSTIFY_BLOCK ) ||
((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue();
- BOOL bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler
+ sal_Bool bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler
Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich),
pWin, nPPTX,nPPTY,GetZoomX(),GetZoomY() ).
- GetEditArea( pPattern, TRUE );
+ GetEditArea( pPattern, sal_True );
// when right-aligned, leave space for the cursor
// in vertical mode, editing is always right-aligned
@@ -974,13 +974,13 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// For growing use only the alignment value from the attribute, numbers
// (existing or started) with default aligment extend to the right.
- BOOL bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
- BOOL bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
- BOOL bGrowBackwards = bGrowToLeft; // logical left
+ sal_Bool bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
+ sal_Bool bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
+ sal_Bool bGrowBackwards = bGrowToLeft; // logical left
if ( bLayoutRTL )
bGrowBackwards = !bGrowBackwards; // invert on RTL sheet
if ( bAsianVertical )
- bGrowCentered = bGrowToLeft = bGrowBackwards = FALSE; // keep old behavior for asian mode
+ bGrowCentered = bGrowToLeft = bGrowBackwards = false; // keep old behavior for asian mode
long nSizeXPix;
if (bBreak && !bAsianVertical)
@@ -1018,7 +1018,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
Fraction aFract(1,1);
Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin,
- HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, FALSE );
+ HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
aPaperSize.Width() = aUtilRect.GetWidth();
}
pNewEngine->SetPaperSize( aPaperSize );
@@ -1035,7 +1035,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
else if ( nEditAdjust == SVX_ADJUST_CENTER )
{
aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2;
- bMoveArea = TRUE; // always
+ bMoveArea = sal_True; // always
}
else
{
@@ -1052,11 +1052,11 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
pEditView[eWhich]->SetVisArea(aVis);
// UpdateMode has been disabled in ScInputHandler::StartTable
// must be enabled before EditGrowY (GetTextHeight)
- pNewEngine->SetUpdateMode( TRUE );
+ pNewEngine->SetUpdateMode( sal_True );
pNewEngine->SetStatusEventHdl( LINK( this, ScViewData, EditEngineHdl ) );
- EditGrowY( TRUE ); // adjust to existing text content
+ EditGrowY( sal_True ); // adjust to existing text content
EditGrowX();
Point aDocPos = pEditView[eWhich]->GetWindowPosTopLeft(0);
@@ -1091,7 +1091,7 @@ IMPL_LINK_INLINE_END( ScViewData, EmptyEditHdl, EditStatus *, EMPTYARG )
IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus )
{
- ULONG nStatus = pStatus->GetStatusWord();
+ sal_uLong nStatus = pStatus->GetStatusWord();
if (nStatus & (EE_STAT_HSCROLL | EE_STAT_TEXTHEIGHTCHANGED | EE_STAT_TEXTWIDTHCHANGED | EE_STAT_CURSOROUT))
{
EditGrowY();
@@ -1101,7 +1101,7 @@ IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus )
{
ScSplitPos eWhich = GetActivePart();
if (pEditView[eWhich])
- pEditView[eWhich]->ShowCursor(FALSE);
+ pEditView[eWhich]->ShowCursor(false);
}
}
return 0;
@@ -1118,7 +1118,7 @@ void ScViewData::EditGrowX()
if ( !pCurView || !bEditActive[eWhich])
return;
- BOOL bLayoutRTL = pLocalDoc->IsLayoutRTL( nTabNo );
+ sal_Bool bLayoutRTL = pLocalDoc->IsLayoutRTL( nTabNo );
ScEditEngineDefaulter* pEngine =
(ScEditEngineDefaulter*) pCurView->GetEditEngine();
@@ -1134,22 +1134,22 @@ void ScViewData::EditGrowX()
// Margin ist schon bei der urspruenglichen Breite beruecksichtigt
long nTextWidth = pEngine->CalcTextWidth();
- BOOL bChanged = FALSE;
- BOOL bAsianVertical = pEngine->IsVertical();
+ sal_Bool bChanged = false;
+ sal_Bool bAsianVertical = pEngine->IsVertical();
// get bGrow... variables the same way as in SetEditEngine
const ScPatternAttr* pPattern = pLocalDoc->GetPattern( nEditCol, nEditRow, nTabNo );
SvxCellHorJustify eJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
- BOOL bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
- BOOL bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
- BOOL bGrowBackwards = bGrowToLeft; // logical left
+ sal_Bool bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER );
+ sal_Bool bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left
+ sal_Bool bGrowBackwards = bGrowToLeft; // logical left
if ( bLayoutRTL )
bGrowBackwards = !bGrowBackwards; // invert on RTL sheet
if ( bAsianVertical )
- bGrowCentered = bGrowToLeft = bGrowBackwards = FALSE; // keep old behavior for asian mode
+ bGrowCentered = bGrowToLeft = bGrowBackwards = false; // keep old behavior for asian mode
- BOOL bUnevenGrow = FALSE;
+ sal_Bool bUnevenGrow = false;
if ( bGrowCentered )
{
while (aArea.GetWidth() + 0 < nTextWidth && ( nEditStartCol > nLeft || nEditEndCol < nRight ) )
@@ -1180,9 +1180,9 @@ void ScViewData::EditGrowX()
aArea.Right() = nCenter + aSize.Width() - nHalf - 1;
}
- bChanged = TRUE;
+ bChanged = sal_True;
if ( nLogicLeft != nLogicRight )
- bUnevenGrow = TRUE;
+ bUnevenGrow = sal_True;
}
}
else if ( bGrowBackwards )
@@ -1205,7 +1205,7 @@ void ScViewData::EditGrowX()
aArea.Right() = aArea.Left() + aSize.Width() - 1;
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -1228,7 +1228,7 @@ void ScViewData::EditGrowX()
aArea.Right() = aArea.Left() + aSize.Width() - 1;
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -1269,7 +1269,7 @@ void ScViewData::EditGrowX()
aVis.Right() -= nMove;
}
pCurView->SetVisArea( aVis );
- bMoveArea = FALSE;
+ bMoveArea = false;
}
pCurView->SetOutputArea(aArea);
@@ -1289,7 +1289,7 @@ void ScViewData::EditGrowX()
}
}
-void ScViewData::EditGrowY( BOOL bInitial )
+void ScViewData::EditGrowY( sal_Bool bInitial )
{
ScSplitPos eWhich = GetActivePart();
ScVSplitPos eVWhich = WhichV(eWhich);
@@ -1298,7 +1298,7 @@ void ScViewData::EditGrowY( BOOL bInitial )
if ( !pCurView || !bEditActive[eWhich])
return;
- ULONG nControl = pEditView[eWhich]->GetControlWord();
+ sal_uLong nControl = pEditView[eWhich]->GetControlWord();
if ( nControl & EV_CNTRL_AUTOSCROLL )
{
// if end of screen had already been reached and scrolling enabled,
@@ -1330,13 +1330,13 @@ void ScViewData::EditGrowY( BOOL bInitial )
// because this occurs in the normal progress of editing a formula.
// Subsequent calls with empty text might involve changed attributes (including
// font height), so they are treated like normal text.
- String aText = pEngine->GetText( (USHORT) 0 );
+ String aText = pEngine->GetText( (sal_uInt16) 0 );
if ( ( aText.Len() == 0 && bInitial ) || aText.GetChar(0) == (sal_Unicode)'=' )
nAllowedExtra = SC_GROWY_BIG_EXTRA;
}
- BOOL bChanged = FALSE;
- BOOL bMaxReached = FALSE;
+ sal_Bool bChanged = false;
+ sal_Bool bMaxReached = false;
while (aArea.GetHeight() + nAllowedExtra < nTextHeight && nEditEndRow < nBottom && !bMaxReached)
{
++nEditEndRow;
@@ -1347,10 +1347,10 @@ void ScViewData::EditGrowY( BOOL bInitial )
if ( aArea.Bottom() > aArea.Top() + aSize.Height() - 1 )
{
aArea.Bottom() = aArea.Top() + aSize.Height() - 1;
- bMaxReached = TRUE; // don't occupy more cells beyond paper size
+ bMaxReached = sal_True; // don't occupy more cells beyond paper size
}
- bChanged = TRUE;
+ bChanged = sal_True;
nAllowedExtra = SC_GROWY_SMALL_EXTRA; // larger value is only for first row
}
@@ -1372,7 +1372,7 @@ void ScViewData::EditGrowY( BOOL bInitial )
void ScViewData::ResetEditView()
{
EditEngine* pEngine = NULL;
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pEditView[i])
{
if (bEditActive[i])
@@ -1381,7 +1381,7 @@ void ScViewData::ResetEditView()
pEngine->RemoveView(pEditView[i]);
pEditView[i]->SetOutputArea( Rectangle() );
}
- bEditActive[i] = FALSE;
+ bEditActive[i] = false;
}
if (pEngine)
@@ -1390,7 +1390,7 @@ void ScViewData::ResetEditView()
void ScViewData::KillEditView()
{
- for (USHORT i=0; i<4; i++)
+ for (sal_uInt16 i=0; i<4; i++)
if (pEditView[i])
{
if (bEditActive[i])
@@ -1465,7 +1465,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich )
}
Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
- BOOL bAllowNeg ) const
+ sal_Bool bAllowNeg ) const
{
ScHSplitPos eWhichX = SC_SPLIT_LEFT;
ScVSplitPos eWhichY = SC_SPLIT_BOTTOM;
@@ -1495,7 +1495,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
}
- USHORT nTSize;
+ sal_uInt16 nTSize;
SCCOL nPosX = GetPosX(eWhichX);
SCCOL nX;
@@ -1583,7 +1583,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
// Number of cells on a screen
//
-SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeX ) const
+SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeX ) const
{
DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
@@ -1591,27 +1591,27 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHO
((ScViewData*)this)->aScrSize.Width() = pView->GetGridWidth(eWhichX);
SCsCOL nX;
- USHORT nScrPosX = 0;
- if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (USHORT) aScrSize.Width();
+ sal_uInt16 nScrPosX = 0;
+ if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (sal_uInt16) aScrSize.Width();
if (nDir==1)
nX = nPosX; // vorwaerts
else
nX = nPosX-1; // rueckwaerts
- BOOL bOut = FALSE;
+ sal_Bool bOut = false;
for ( ; nScrPosX<=nScrSizeX && !bOut; nX = sal::static_int_cast<SCsCOL>(nX + nDir) )
{
SCsCOL nColNo = nX;
if ( nColNo < 0 || nColNo > MAXCOL )
- bOut = TRUE;
+ bOut = sal_True;
else
{
- USHORT nTSize = pDoc->GetColWidth( nColNo, nTabNo );
+ sal_uInt16 nTSize = pDoc->GetColWidth( nColNo, nTabNo );
if (nTSize)
{
long nSizeXPix = ToPixel( nTSize, nPPTX );
- nScrPosX = sal::static_int_cast<USHORT>( nScrPosX + (USHORT) nSizeXPix );
+ nScrPosX = sal::static_int_cast<sal_uInt16>( nScrPosX + (sal_uInt16) nSizeXPix );
}
}
}
@@ -1625,14 +1625,14 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHO
return nX;
}
-SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeY ) const
+SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeY ) const
{
DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
if (pView)
((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
- if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (USHORT) aScrSize.Height();
+ if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (sal_uInt16) aScrSize.Height();
SCROW nY;
@@ -1684,7 +1684,7 @@ SCROW ScViewData::PrevCellsY( ScVSplitPos eWhichY ) const
}
-BOOL ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix )
+sal_Bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix )
{
const ScMergeAttr* pMerge = (const ScMergeAttr*) pDoc->GetAttr( nX,nY,nTabNo, ATTR_MERGE );
if ( pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1 )
@@ -1705,25 +1705,25 @@ BOOL ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r
continue;
}
- USHORT nHeight = pDoc->GetRowHeight(nRow, nTabNo);
+ sal_uInt16 nHeight = pDoc->GetRowHeight(nRow, nTabNo);
nOutHeight += ToPixel(nHeight, nPPTY);
}
rSizeXPix = nOutWidth;
rSizeYPix = nOutHeight;
- return TRUE;
+ return sal_True;
}
else
{
rSizeXPix = ToPixel( pDoc->GetColWidth( nX, nTabNo ), nPPTX );
rSizeYPix = ToPixel( pDoc->GetRowHeight( nY, nTabNo ), nPPTY );
- return FALSE;
+ return false;
}
}
-BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+sal_Bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
SCsCOL& rPosX, SCsROW& rPosY,
- BOOL bTestMerge, BOOL bRepair, BOOL bNextIfLarge )
+ sal_Bool bTestMerge, sal_Bool bRepair, sal_Bool bNextIfLarge )
{
// special handling of 0 is now in ScViewFunctionSet::SetCursorAtPoint
@@ -1820,23 +1820,23 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
pDoc->RemoveFlagsTab( 0,0, MAXCOL,MAXROW, nTabNo, SC_MF_HOR | SC_MF_VER );
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
- pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, TRUE, FALSE );
+ pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, sal_True, false );
if (pDocShell)
pDocShell->PostPaint( ScRange(0,0,nTabNo,MAXCOL,MAXROW,nTabNo), PAINT_GRID );
}
}
}
- return FALSE;
+ return false;
}
void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
- SCsCOL nPosX, SCsROW nPosY, BOOL& rLeft, BOOL& rTop )
+ SCsCOL nPosX, SCsROW nPosY, sal_Bool& rLeft, sal_Bool& rTop )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- Point aCellStart = GetScrPos( nPosX, nPosY, eWhich, TRUE );
+ Point aCellStart = GetScrPos( nPosX, nPosY, eWhich, sal_True );
long nSizeX;
long nSizeY;
GetMergeSizePixel( nPosX, nPosY, nSizeX, nSizeY );
@@ -1857,14 +1857,14 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX )
{
long nThis = pDoc->GetColWidth( i,nTabNo );
nTPosX -= nThis;
- nPixPosX -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTX);
+ nPixPosX -= ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTX);
}
else
for ( i=nNewPosX; i<nOldPosX; i++ )
{
long nThis = pDoc->GetColWidth( i,nTabNo );
nTPosX += nThis;
- nPixPosX += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTX);
+ nPixPosX += ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTX);
}
pThisTab->nPosX[eWhich] = nNewPosX;
@@ -1894,7 +1894,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY -= nThis * nRows;
- nPixPosY -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows;
+ nPixPosY -= ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTY) * nRows;
}
else
for ( i=nNewPosY; i<nOldPosY; i++ )
@@ -1903,7 +1903,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY += nThis * nRows;
- nPixPosY += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows;
+ nPixPosY += ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTY) * nRows;
}
pThisTab->nPosY[eWhich] = nNewPosY;
@@ -1920,7 +1920,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
void ScViewData::RecalcPixPos() // nach Zoom-Aenderungen
{
- for (USHORT eWhich=0; eWhich<2; eWhich++)
+ for (sal_uInt16 eWhich=0; eWhich<2; eWhich++)
{
long nPixPosX = 0;
SCCOL nPosX = pThisTab->nPosX[eWhich];
@@ -1953,7 +1953,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
SCCOL nCol;
SCROW nRow;
- USHORT nTSize;
+ sal_uInt16 nTSize;
long nSizePix;
long nScrPosX = 0;
long nScrPosY = 0;
@@ -1968,7 +1968,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
if (nTSize)
{
nSizePix = ToPixel( nTSize, nPPTX );
- nScrPosX += (USHORT) nSizePix;
+ nScrPosX += (sal_uInt16) nSizePix;
}
}
@@ -1978,7 +1978,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
if (nTSize)
{
nSizePix = ToPixel( nTSize, nPPTY );
- nScrPosY += (USHORT) nSizePix;
+ nScrPosY += (sal_uInt16) nSizePix;
}
}
@@ -1990,14 +1990,14 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart )
long nSize;
long nTwips;
long nAdd;
- BOOL bEnd;
+ sal_Bool bEnd;
nSize = 0;
nTwips = (long) (rVisAreaStart.X() / HMM_PER_TWIPS);
if ( pDoc->IsLayoutRTL( nTabNo ) )
nTwips = -nTwips;
SCCOL nX1 = 0;
- bEnd = FALSE;
+ bEnd = false;
while (!bEnd)
{
nAdd = (long) pDoc->GetColWidth(nX1,nTabNo);
@@ -2007,13 +2007,13 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart )
++nX1;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
nSize = 0;
nTwips = (long) (rVisAreaStart.Y() / HMM_PER_TWIPS);
SCROW nY1 = 0;
- bEnd = FALSE;
+ bEnd = false;
while (!bEnd)
{
nAdd = (long) pDoc->GetRowHeight(nY1,nTabNo);
@@ -2023,7 +2023,7 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart )
++nY1;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
SetActivePart( SC_SPLIT_BOTTOMLEFT );
@@ -2082,7 +2082,7 @@ ScDrawView* ScViewData::GetScDrawView()
return pView->GetScDrawView();
}
-BOOL ScViewData::IsMinimized()
+sal_Bool ScViewData::IsMinimized()
{
DBG_ASSERT( pView, "IsMinimized() ohne View" );
return pView->IsMinimized();
@@ -2093,7 +2093,7 @@ void ScViewData::UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY
Fraction aOldX = GetZoomX();
Fraction aOldY = GetZoomY();
- SetZoom( rNewX, rNewY, FALSE );
+ SetZoom( rNewX, rNewY, false );
Fraction aWidth = GetZoomX();
aWidth *= Fraction( aScrSize.Width(),1 );
@@ -2126,7 +2126,7 @@ void ScViewData::CalcPPT()
if (nEndCol<20)
nEndCol = 20; // same end position as when determining draw scale
- USHORT nTwips = pDoc->GetCommonWidth( nEndCol, nTabNo );
+ sal_uInt16 nTwips = pDoc->GetCommonWidth( nEndCol, nTabNo );
if ( nTwips )
{
double fOriginal = nTwips * nPPTX;
@@ -2160,10 +2160,10 @@ void ScViewData::WriteUserData(String& rData)
// PosX[links]/PosX[rechts]/PosY[oben]/PosY[unten]
// wenn Zeilen groesser 8192, "+" statt "/"
- USHORT nZoom = (USHORT)((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator());
+ sal_uInt16 nZoom = (sal_uInt16)((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator());
rData = String::CreateFromInt32( nZoom );
rData += '/';
- nZoom = (USHORT)((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator());
+ nZoom = (sal_uInt16)((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator());
rData += String::CreateFromInt32( nZoom );
rData += '/';
if (bPagebreak)
@@ -2247,10 +2247,10 @@ void ScViewData::ReadUserData(const String& rData)
Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; //! evaluate (all sheets?)
String aZoomStr = rData.GetToken(0); // Zoom/PageZoom/Modus
- USHORT nNormZoom = sal::static_int_cast<USHORT>(aZoomStr.GetToken(0,'/').ToInt32());
+ sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.GetToken(0,'/').ToInt32());
if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM )
aZoomX = aZoomY = Fraction( nNormZoom, 100 ); // "normaler" Zoom (immer)
- USHORT nPageZoom = sal::static_int_cast<USHORT>(aZoomStr.GetToken(1,'/').ToInt32());
+ sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.GetToken(1,'/').ToInt32());
if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM )
aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 ); // Pagebreak-Zoom, wenn gesetzt
sal_Unicode cMode = aZoomStr.GetToken(2,'/').GetChar(0); // 0 oder "0"/"1"
@@ -2420,7 +2420,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
// sheet selection and selected ranges
const ScMarkData& rMarkData = GetMarkData();
rTabSett.mbSelected = rMarkData.GetTableSelect( nTab );
- rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, TRUE );
+ rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, sal_True );
// grid color
rTabSett.maGridColor.SetColor( COL_AUTO );
@@ -2713,7 +2713,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
sal_Int32 nCount(rSettings.getLength());
sal_Int32 nTemp32(0);
sal_Int16 nTemp16(0);
- sal_Bool bPageMode(sal_False);
+ sal_Bool bPageMode(false);
for (sal_Int32 i = 0; i < nCount; i++)
{
// SC_VIEWID has to parse and use by mba
@@ -2875,11 +2875,11 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
void ScViewData::SetOptions( const ScViewOptions& rOpt )
{
// if visibility of horiz. ScrollBar is changed, TabBar may have to be resized...
- BOOL bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) );
+ sal_Bool bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) );
// if graphics are turned on or off, animation has to be started or stopped
// graphics are controlled by VOBJ_TYPE_OLE
- BOOL bGraphicsChanged = ( pOptions->GetObjMode(VOBJ_TYPE_OLE) !=
+ sal_Bool bGraphicsChanged = ( pOptions->GetObjMode(VOBJ_TYPE_OLE) !=
rOpt.GetObjMode(VOBJ_TYPE_OLE) );
*pOptions = rOpt;
@@ -2897,34 +2897,34 @@ Point ScViewData::GetMousePosPixel()
return pView->GetMousePosPixel();
}
-void ScViewData::UpdateInputHandler( BOOL bForce, BOOL bStopEditing )
+void ScViewData::UpdateInputHandler( sal_Bool bForce, sal_Bool bStopEditing )
{
if (pViewShell)
pViewShell->UpdateInputHandler( bForce, bStopEditing );
}
-BOOL ScViewData::IsOle()
+sal_Bool ScViewData::IsOle()
{
return pDocShell && pDocShell->IsOle();
}
-BOOL ScViewData::UpdateFixX( SCTAB nTab ) // TRUE = Wert geaendert
+sal_Bool ScViewData::UpdateFixX( SCTAB nTab ) // sal_True = Wert geaendert
{
if (!ValidTab(nTab)) // Default
nTab=nTabNo; // akuelle Tabelle
if (!pView || pTabData[nTab]->eHSplitMode != SC_SPLIT_FIX)
- return FALSE;
+ return false;
ScDocument* pLocalDoc = GetDocument();
if (!pLocalDoc->HasTable(nTab)) // if called from reload, the sheet may not exist
- return FALSE;
+ return false;
SCCOL nFix = pTabData[nTab]->nFixPosX;
long nNewPos = 0;
for (SCCOL nX=pTabData[nTab]->nPosX[SC_SPLIT_LEFT]; nX<nFix; nX++)
{
- USHORT nTSize = pLocalDoc->GetColWidth( nX, nTab );
+ sal_uInt16 nTSize = pLocalDoc->GetColWidth( nX, nTab );
if (nTSize)
{
long nPix = ToPixel( nTSize, nPPTX );
@@ -2937,29 +2937,29 @@ BOOL ScViewData::UpdateFixX( SCTAB nTab ) // TRUE = Wert geaendert
pTabData[nTab]->nHSplitPos = nNewPos;
if (nTab == nTabNo)
RecalcPixPos(); //! sollte nicht noetig sein !!!
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL ScViewData::UpdateFixY( SCTAB nTab ) // TRUE = Wert geaendert
+sal_Bool ScViewData::UpdateFixY( SCTAB nTab ) // sal_True = Wert geaendert
{
if (!ValidTab(nTab)) // Default
nTab=nTabNo; // akuelle Tabelle
if (!pView || pTabData[nTab]->eVSplitMode != SC_SPLIT_FIX)
- return FALSE;
+ return false;
ScDocument* pLocalDoc = GetDocument();
if (!pLocalDoc->HasTable(nTab)) // if called from reload, the sheet may not exist
- return FALSE;
+ return false;
SCROW nFix = pTabData[nTab]->nFixPosY;
long nNewPos = 0;
for (SCROW nY=pTabData[nTab]->nPosY[SC_SPLIT_TOP]; nY<nFix; nY++)
{
- USHORT nTSize = pLocalDoc->GetRowHeight( nY, nTab );
+ sal_uInt16 nTSize = pLocalDoc->GetRowHeight( nY, nTab );
if (nTSize)
{
long nPix = ToPixel( nTSize, nPPTY );
@@ -2972,18 +2972,18 @@ BOOL ScViewData::UpdateFixY( SCTAB nTab ) // TRUE = Wert geaendert
pTabData[nTab]->nVSplitPos = nNewPos;
if (nTab == nTabNo)
RecalcPixPos(); //! sollte nicht noetig sein !!!
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScViewData::UpdateOutlinerFlags( Outliner& rOutl ) const
{
ScDocument* pLocalDoc = GetDocument();
- BOOL bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell();
+ sal_Bool bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell();
- ULONG nCntrl = rOutl.GetControlWord();
+ sal_uLong nCntrl = rOutl.GetControlWord();
nCntrl |= EE_CNTRL_URLSFXEXECUTE;
nCntrl |= EE_CNTRL_MARKFIELDS;
nCntrl |= EE_CNTRL_AUTOCORRECT;
@@ -3022,7 +3022,7 @@ void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY,
while (rScrY <= nEndPixels && nRow <= nEndRow)
{
SCROW nHeightEndRow;
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -3062,7 +3062,7 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
while (rScrY <= nEndPixels && nRow >= nStartRow)
{
SCROW nHeightStartRow;
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
if (nHeightStartRow < nStartRow)
nHeightStartRow = nStartRow;
if (!nHeight)
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index f3cf8dd7ee73..8b3f7657ef99 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -115,7 +115,7 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName );
//----------------------------------------------------------------------------
-BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData )
+sal_Bool ScViewFunc::AdjustBlockHeight( sal_Bool bPaint, ScMarkData* pMarkData )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
if (!pMarkData)
@@ -143,25 +143,25 @@ BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData )
aZoomX = aZoomY = Fraction( 1, 1 );
}
- BOOL bAnyChanged = FALSE;
+ sal_Bool bAnyChanged = false;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
if (pMarkData->GetTableSelect(nTab))
{
SCCOLROW* pOneRange = pRanges;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = false;
SCROW nPaintY = 0;
for (SCROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
{
SCROW nStartNo = *(pOneRange++);
SCROW nEndNo = *(pOneRange++);
if (pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, 0, aProv.GetDevice(),
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE ))
+ nPPTX, nPPTY, aZoomX, aZoomY, false ))
{
if (!bChanged)
nPaintY = nStartNo;
- bAnyChanged = bChanged = TRUE;
+ bAnyChanged = bChanged = sal_True;
}
}
if ( bPaint && bChanged )
@@ -180,7 +180,7 @@ BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData )
//----------------------------------------------------------------------------
-BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint )
+sal_Bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -189,9 +189,9 @@ BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint )
double nPPTY = GetViewData()->GetPPTY();
Fraction aZoomX = GetViewData()->GetZoomX();
Fraction aZoomY = GetViewData()->GetZoomY();
- USHORT nOldPixel = 0;
+ sal_uInt16 nOldPixel = 0;
if (nStartRow == nEndRow)
- nOldPixel = (USHORT) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
+ nOldPixel = (sal_uInt16) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
ScSizeDeviceProvider aProv(pDocSh);
if (aProv.IsPrinter())
@@ -200,14 +200,14 @@ BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint )
nPPTY = aProv.GetPPTY();
aZoomX = aZoomY = Fraction( 1, 1 );
}
- BOOL bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ sal_Bool bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(),
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
if (bChanged && ( nStartRow == nEndRow ))
{
- USHORT nNewPixel = (USHORT) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
+ sal_uInt16 nNewPixel = (sal_uInt16) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY);
if ( nNewPixel == nOldPixel )
- bChanged = FALSE;
+ bChanged = false;
}
if ( bPaint && bChanged )
@@ -258,7 +258,7 @@ ScAutoSum lcl_IsAutoSumData( ScDocument* pDoc, SCCOL nCol, SCROW nRow,
ScAutoSum lcl_SeekAutoSumData( ScDocument* pDoc, SCCOL& nCol, SCROW& nRow,
SCTAB nTab, ScDirection eDir, SCCOLROW& nExtend )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while (nCount < SC_AUTOSUM_MAXCOUNT)
{
if ( eDir == DIR_TOP )
@@ -414,7 +414,7 @@ bool lcl_GetAutoSumForRowRange( ScDocument* pDoc, ScRangeList& rRangeList, const
//----------------------------------------------------------------------------
-BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
+sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
{
ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -430,8 +430,8 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
SCROW nSeekRow = nRow;
SCCOLROW nExtend; // will become valid via reference for ScAutoSumSum
- BOOL bCol = FALSE;
- BOOL bRow = FALSE;
+ sal_Bool bCol = false;
+ sal_Bool bRow = false;
ScAutoSum eSum;
if ( nRow != 0
@@ -441,19 +441,19 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData )
)
{
- bRow = TRUE;
+ bRow = sal_True;
nSeekRow = nRow - 1;
}
else if ( nCol != 0 && (eSum = lcl_IsAutoSumData( pDoc, nCol-1, nRow, nTab,
DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData )
{
- bCol = TRUE;
+ bCol = sal_True;
nSeekCol = nCol - 1;
}
else if ( (eSum = lcl_SeekAutoSumData( pDoc, nCol, nSeekRow, nTab, DIR_TOP, nExtend /*out*/ )) != ScAutoSumNone )
- bRow = TRUE;
+ bRow = sal_True;
else if (( eSum = lcl_SeekAutoSumData( pDoc, nSeekCol, nRow, nTab, DIR_LEFT, nExtend /*out*/ )) != ScAutoSumNone )
- bCol = TRUE;
+ bCol = sal_True;
if ( bCol || bRow )
{
@@ -473,7 +473,7 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
else
nEndCol = nCol - 1; // maybe extend data area to the right
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = false;
do
{
if ( eSum == ScAutoSumData )
@@ -513,9 +513,9 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
}
}
} while ( bContinue );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------
@@ -718,7 +718,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor
// set new mark range and cursor position
const ScRange aMarkRange( nStartCol, nStartRow, nTab, nMarkEndCol, nMarkEndRow, nTab );
- MarkRange( aMarkRange, FALSE, bContinue );
+ MarkRange( aMarkRange, false, bContinue );
if ( bSetCursor )
{
SetCursor( nMarkEndCol, nMarkEndRow );
@@ -836,8 +836,8 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData
pInsDoc->SetClipArea( ScRange(aPos) );
// insert Block, with Undo etc.
- if ( PasteFromClip( IDF_CONTENTS, pInsDoc, PASTE_NOFUNC, FALSE, FALSE,
- FALSE, INS_NONE, IDF_ATTRIB ) )
+ if ( PasteFromClip( IDF_CONTENTS, pInsDoc, PASTE_NOFUNC, false, false,
+ false, INS_NONE, IDF_ATTRIB ) )
{
const SfxUInt32Item* pItem = (SfxUInt32Item*) pInsDoc->GetAttr(
nCol, nRow, nTab, ATTR_VALUE_FORMAT );
@@ -862,8 +862,8 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData
//----------------------------------------------------------------------------
// manual page break
-void ScViewFunc::InsertPageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* pPos,
- BOOL bSetModified )
+void ScViewFunc::InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos,
+ sal_Bool bSetModified )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aCursor;
@@ -872,18 +872,18 @@ void ScViewFunc::InsertPageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* p
else
aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab );
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, false );
if ( bSuccess && bSetModified )
- UpdatePageBreakData( TRUE ); // for PageBreak-Mode
+ UpdatePageBreakData( true ); // for PageBreak-Mode
}
//----------------------------------------------------------------------------
-void ScViewFunc::DeletePageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* pPos,
- BOOL bSetModified )
+void ScViewFunc::DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos,
+ sal_Bool bSetModified )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aCursor;
@@ -892,11 +892,11 @@ void ScViewFunc::DeletePageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* p
else
aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab );
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, false );
if ( bSuccess && bSetModified )
- UpdatePageBreakData( TRUE ); // for PageBreak-Mode
+ UpdatePageBreakData( true ); // for PageBreak-Mode
}
//----------------------------------------------------------------------------
@@ -906,13 +906,13 @@ void ScViewFunc::RemoveManualBreaks()
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if (bUndo)
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
- pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
+ pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pUndoDoc );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) );
}
@@ -920,14 +920,14 @@ void ScViewFunc::RemoveManualBreaks()
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
- UpdatePageBreakData( TRUE );
+ UpdatePageBreakData( sal_True );
pDocSh->SetDocumentModified();
pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
}
//----------------------------------------------------------------------------
-void ScViewFunc::SetPrintZoom(USHORT nScale, USHORT nPages)
+void ScViewFunc::SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -944,9 +944,9 @@ void ScViewFunc::AdjustPrintZoom()
//----------------------------------------------------------------------------
-void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
+void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint,
const String* pRepCol, const String* pRepRow,
- BOOL bAddPrint )
+ sal_Bool bAddPrint )
{
// on all selected tables
@@ -955,7 +955,7 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
SCTAB nTabCount = pDoc->GetTableCount();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTab;
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver();
@@ -980,8 +980,8 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
if ( pPrint->Len() )
{
const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
- USHORT nTCount = pPrint->GetTokenCount(sep);
- for (USHORT i=0; i<nTCount; i++)
+ sal_uInt16 nTCount = pPrint->GetTokenCount(sep);
+ for (sal_uInt16 i=0; i<nTCount; i++)
{
String aToken = pPrint->GetToken(i, sep);
if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID )
@@ -999,7 +999,7 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
{
rMark.MarkToMulti();
ScRangeListRef pList( new ScRangeList );
- rMark.FillRangeListWithMarks( pList, FALSE );
+ rMark.FillRangeListWithMarks( pList, false );
for (size_t i = 0, n = pList->size(); i < n; ++i)
{
ScRange* pR = (*pList)[i];
@@ -1055,9 +1055,9 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint,
//----------------------------------------------------------------------------
// Merge cells
-BOOL ScViewFunc::TestMergeCells() // pre-test (for menu)
+sal_Bool ScViewFunc::TestMergeCells() // pre-test (for menu)
{
- // simple test: TRUE if there's a selection but no multi selection and not filtered
+ // simple test: sal_True if there's a selection but no multi selection and not filtered
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
@@ -1066,13 +1066,13 @@ BOOL ScViewFunc::TestMergeCells() // pre-test (for menu)
return GetViewData()->GetSimpleArea( aDummy) == SC_MARK_SIMPLE;
}
else
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------
-BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bCenter )
+sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord, sal_Bool bCenter )
{
// Editable- and Being-Nested- test must be at the beginning (in DocFunc too),
// so that the Contents-QueryBox won't appear
@@ -1080,7 +1080,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -1088,7 +1088,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if (!rMark.IsMarked())
{
ErrorMessage(STR_NOMULTISELECT);
- return FALSE;
+ return false;
}
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1105,14 +1105,14 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if ( nStartCol == nEndCol && nStartRow == nEndRow )
{
// nothing to do
- return TRUE;
+ return true;
}
if ( pDoc->HasAttrib( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{ // "Don't nest merging !"
ErrorMessage(STR_MSSG_MERGECELLS_0);
- return FALSE;
+ return false;
}
// Check for the contents of all selected tables.
@@ -1132,7 +1132,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
bAskDialog = true;
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = true;
if (bAskDialog)
{
@@ -1142,12 +1142,12 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
WinBits(WB_YES_NO_CANCEL | WB_DEF_NO),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ),
ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) );
- USHORT nRetVal = aBox.Execute();
+ sal_uInt16 nRetVal = aBox.Execute();
if ( nRetVal == RET_YES )
- rDoContents = TRUE;
+ rDoContents = sal_True;
else if ( nRetVal == RET_CANCEL )
- bOk = FALSE;
+ bOk = false;
}
}
@@ -1160,7 +1160,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
if (bOk)
{
SetCursor( nStartCol, nStartRow );
- //DoneBlockMode( FALSE);
+ //DoneBlockMode( sal_False);
Unmark();
pDocSh->UpdateOle(GetViewData());
@@ -1174,15 +1174,15 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord, BOOL bC
//----------------------------------------------------------------------------
-BOOL ScViewFunc::TestRemoveMerge()
+sal_Bool ScViewFunc::TestRemoveMerge()
{
- BOOL bMerged = FALSE;
+ sal_Bool bMerged = false;
ScRange aRange;
if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE)
{
ScDocument* pDoc = GetViewData()->GetDocument();
if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) )
- bMerged = TRUE;
+ bMerged = sal_True;
}
return bMerged;
}
@@ -1216,14 +1216,14 @@ static bool lcl_extendMergeRange(ScCellMergeOption& rOption, const ScRange& rRan
return bExtended;
}
-BOOL ScViewFunc::RemoveMerge( BOOL bRecord )
+sal_Bool ScViewFunc::RemoveMerge( sal_Bool bRecord )
{
ScRange aRange;
ScEditableTester aTester( this );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
else if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE)
{
@@ -1258,7 +1258,7 @@ BOOL ScViewFunc::RemoveMerge( BOOL bRecord )
while (bExtended);
HideCursor();
- BOOL bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, bRecord, FALSE );
+ sal_Bool bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, bRecord, false );
aExtended = aOption.getFirstSingleRange();
MarkRange( aExtended );
ShowCursor();
@@ -1266,19 +1266,19 @@ BOOL ScViewFunc::RemoveMerge( BOOL bRecord )
if (bOk)
pDocSh->UpdateOle(GetViewData());
}
- return TRUE; //! bOk ??
+ return sal_True; //! bOk ??
}
//----------------------------------------------------------------------------
-void ScViewFunc::FillSimple( FillDir eDir, BOOL bRecord )
+void ScViewFunc::FillSimple( FillDir eDir, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, bRecord, false );
if (bSuccess)
{
pDocSh->UpdateOle(GetViewData());
@@ -1292,16 +1292,16 @@ void ScViewFunc::FillSimple( FillDir eDir, BOOL bRecord )
//----------------------------------------------------------------------------
void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
- double fStart, double fStep, double fMax, BOOL bRecord )
+ double fStart, double fStep, double fMax, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().
+ sal_Bool bSuccess = pDocSh->GetDocFunc().
FillSeries( aRange, &rMark, eDir, eCmd, eDateCmd,
- fStart, fStep, fMax, bRecord, FALSE );
+ fStart, fStep, fMax, bRecord, false );
if (bSuccess)
{
pDocSh->UpdateOle(GetViewData());
@@ -1324,18 +1324,18 @@ void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
//----------------------------------------------------------------------------
void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord )
+ SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord )
{
SCTAB nTab = GetViewData()->GetTabNo();
ScRange aRange( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab );
ScRange aSourceRange( aRange );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().
- FillAuto( aRange, &rMark, eDir, nCount, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().
+ FillAuto( aRange, &rMark, eDir, nCount, bRecord, false );
if (bSuccess)
{
- MarkRange( aRange, FALSE ); // aRange was modified in FillAuto
+ MarkRange( aRange, false ); // aRange was modified in FillAuto
pDocSh->UpdateOle(GetViewData());
UpdateScrollBars();
@@ -1381,7 +1381,7 @@ void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
//----------------------------------------------------------------------------
-void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink )
+void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink )
{
//! allow source sheet to be protected
ScEditableTester aTester( this );
@@ -1395,11 +1395,11 @@ void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTab = GetViewData()->GetTabNo();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
ScRange aMarkRange;
rMark.MarkToSimple();
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if (bMulti)
rMark.GetMultiMarkArea( aMarkRange );
else if (rMark.IsMarked())
@@ -1535,8 +1535,8 @@ void ScViewFunc::TransliterateText( sal_Int32 nType )
aFuncMark.SetMarkArea( ScRange( aCursor ) );
}
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- TransliterateText( aFuncMark, nType, TRUE, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ TransliterateText( aFuncMark, nType, sal_True, false );
if (bSuccess)
{
GetViewData()->GetViewShell()->UpdateInputHandler();
@@ -1570,7 +1570,7 @@ ScAutoFormatData* ScViewFunc::CreateAutoFormatData()
//----------------------------------------------------------------------------
-void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
+void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
@@ -1578,7 +1578,7 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, false );
if (bSuccess)
pDocSh->UpdateOle(GetViewData());
}
@@ -1591,21 +1591,21 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
// Suchen & Ersetzen
void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
- BOOL bAddUndo, BOOL bIsApi )
+ sal_Bool bAddUndo, sal_Bool bIsApi )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
if (bAddUndo && !pDoc->IsUndoEnabled())
- bAddUndo = FALSE;
+ bAddUndo = false;
SCCOL nCol = GetViewData()->GetCurX();
SCROW nRow = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo();
- USHORT nCommand = pSearchItem->GetCommand();
- BOOL bAllTables = pSearchItem->IsAllTables();
- BOOL* pOldSelectedTables = NULL;
- USHORT nOldSelectedCount = 0;
+ sal_uInt16 nCommand = pSearchItem->GetCommand();
+ sal_Bool bAllTables = pSearchItem->IsAllTables();
+ sal_Bool* pOldSelectedTables = NULL;
+ sal_uInt16 nOldSelectedCount = 0;
SCTAB nOldTab = nTab;
SCTAB nLastTab = pDoc->GetTableCount() - 1;
SCTAB nStartTab, nEndTab;
@@ -1613,7 +1613,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
{
nStartTab = 0;
nEndTab = nLastTab;
- pOldSelectedTables = new BOOL [ nEndTab + 1 ];
+ pOldSelectedTables = new sal_Bool [ nEndTab + 1 ];
for ( SCTAB j = 0; j <= nEndTab; j++ )
{
pOldSelectedTables[j] = rMark.GetTableSelect( j );
@@ -1649,7 +1649,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
if ( nCommand == SVX_SEARCHCMD_FIND
|| nCommand == SVX_SEARCHCMD_FIND_ALL)
- bAddUndo = FALSE;
+ bAddUndo = false;
//! account for bAttrib during Undo !!!
@@ -1670,26 +1670,26 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
{ //! select all, after pUndoMark has been created
for ( SCTAB j = nStartTab; j <= nEndTab; j++ )
{
- rMark.SelectTable( j, TRUE );
+ rMark.SelectTable( j, sal_True );
}
}
- DoneBlockMode(TRUE); // don't delete mark
+ DoneBlockMode(true); // don't delete mark
InitOwnBlockMode();
// If search starts at the beginning don't ask again whether it shall start at the beginning
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = true;
if ( nCol == 0 && nRow == 0 && nTab == nStartTab && !pSearchItem->GetBackward() )
- bFirst = FALSE;
+ bFirst = false;
- BOOL bFound = FALSE;
- while (TRUE)
+ sal_Bool bFound = false;
+ while (sal_True)
{
GetFrameWin()->EnterWait();
if (pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, rMark, aUndoStr, pUndoDoc ) )
{
- bFound = TRUE;
- bFirst = TRUE;
+ bFound = sal_True;
+ bFirst = sal_True;
if (bAddUndo)
{
GetViewData()->GetDocShell()->GetUndoManager()->AddUndoAction(
@@ -1704,8 +1704,8 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
else if ( bFirst && (nCommand == SVX_SEARCHCMD_FIND ||
nCommand == SVX_SEARCHCMD_REPLACE) )
{
- bFirst = FALSE;
- USHORT nRetVal;
+ bFirst = false;
+ sal_uInt16 nRetVal;
GetFrameWin()->LeaveWait();
if ( bIsApi )
nRetVal = RET_NO;
@@ -1713,7 +1713,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
{
// search dialog as parent (if available)
Window* pParent = GetParentOrChild(SID_SEARCH_DLG);
- USHORT nStrId;
+ sal_uInt16 nStrId;
if ( pSearchItem->GetBackward() )
{
if ( nStartTab == nEndTab )
@@ -1766,7 +1766,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
break; // break 'while (TRUE)'
}
- } // of while TRUE
+ } // of while sal_True
if ( pOldSelectedTables )
{ // restore originally selected table
@@ -1776,11 +1776,11 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
}
if ( bFound )
{ // if a table is selected as a "match" it remains (selected)
- rMark.SelectTable( nTab, TRUE );
+ rMark.SelectTable( nTab, true );
// It's a swap if only one table was selected before
//! otherwise now one table more might be selected
if ( nOldSelectedCount == 1 && nTab != nOldTab )
- rMark.SelectTable( nOldTab, FALSE );
+ rMark.SelectTable( nOldTab, false );
}
delete [] pOldSelectedTables;
}
@@ -1795,10 +1795,10 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
// if nothing is marked, DoneBlockMode, then marking can start
// directly from this place via Shift-Cursor
if (!rMark.IsMarked() && !rMark.IsMultiMarked())
- DoneBlockMode(TRUE);
+ DoneBlockMode(sal_True);
AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
- SetCursor( nCol, nRow, TRUE );
+ SetCursor( nCol, nRow, sal_True );
if ( nCommand == SVX_SEARCHCMD_REPLACE
|| nCommand == SVX_SEARCHCMD_REPLACE_ALL )
@@ -1849,7 +1849,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
GetFrameWin()->EnterWait();
- BOOL bExact =
+ sal_Bool bExact =
pDoc->Solver(
rParam.aRefFormulaCell.Col(),
rParam.aRefFormulaCell.Row(),
@@ -1861,7 +1861,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
GetFrameWin()->LeaveWait();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const ScPatternAttr* pPattern = pDoc->GetPattern( nDestCol, nDestRow, nDestTab );
if ( pPattern )
nFormat = pPattern->GetNumberFormat( pFormatter );
@@ -1887,12 +1887,12 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
MessBox aBox( GetViewData()->GetDialogParent(),
WinBits(WB_YES_NO | WB_DEF_NO),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr );
- USHORT nRetVal = aBox.Execute();
+ sal_uInt16 nRetVal = aBox.Execute();
if ( RET_YES == nRetVal )
EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult );
- GetViewData()->GetViewShell()->UpdateInputHandler( TRUE );
+ GetViewData()->GetViewShell()->UpdateInputHandler( sal_True );
}
}
@@ -1900,14 +1900,14 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
//----------------------------------------------------------------------------
// multi operation
-void ScViewFunc::TabOp( const ScTabOpParam& rParam, BOOL bRecord )
+void ScViewFunc::TabOp( const ScTabOpParam& rParam, sal_Bool bRecord )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- pDocSh->GetDocFunc().TabOp( aRange, &rMark, rParam, bRecord, FALSE );
+ pDocSh->GetDocFunc().TabOp( aRange, &rMark, rParam, bRecord, false );
}
else
ErrorMessage(STR_NOMULTISELECT);
@@ -1917,7 +1917,7 @@ void ScViewFunc::TabOp( const ScTabOpParam& rParam, BOOL bRecord )
//----------------------------------------------------------------------------
void ScViewFunc::MakeScenario( const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -1925,7 +1925,7 @@ void ScViewFunc::MakeScenario( const String& rName, const String& rComment,
SCTAB nNewTab = pDocSh->MakeScenario( nTab, rName, rComment, rColor, nFlags, rMark );
if (nFlags & SC_SCENARIO_COPYALL)
- SetTabNo( nNewTab, TRUE ); // SC_SCENARIO_COPYALL -> visible
+ SetTabNo( nNewTab, true ); // SC_SCENARIO_COPYALL -> visible
else
{
SfxBindings& rBindings = GetViewData()->GetBindings();
@@ -1953,7 +1953,7 @@ void ScViewFunc::ExtendScenario()
ScDocument* pDoc = GetViewData()->GetDocument();
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
ApplySelectionPattern(aPattern);
}
@@ -1974,13 +1974,13 @@ void ScViewFunc::UseScenario( const String& rName )
//----------------------------------------------------------------------------
// Insert table
-BOOL ScViewFunc::InsertTable( const String& rName, SCTAB nTab, BOOL bRecord )
+sal_Bool ScViewFunc::InsertTable( const String& rName, SCTAB nTab, sal_Bool bRecord )
{
// Order Tabl/Name is inverted for DocFunc
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- InsertTable( nTab, rName, bRecord, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ InsertTable( nTab, rName, bRecord, false );
if (bSuccess)
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
return bSuccess;
}
@@ -1988,13 +1988,13 @@ BOOL ScViewFunc::InsertTable( const String& rName, SCTAB nTab, BOOL bRecord )
//----------------------------------------------------------------------------
// Insert tables
-BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
- SCTAB nCount, BOOL bRecord )
+sal_Bool ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
+ SCTAB nCount, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SvStrings *pNameList= NULL;
@@ -2006,7 +2006,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
pDoc->BeginDrawUndo(); // InsertTab creates a SdrUndoNewPage
}
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=false;
String aValTabName;
String *pStr;
@@ -2015,7 +2015,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
{
if(pNames!=NULL)
{
- pStr=pNames->GetObject(static_cast<USHORT>(i));
+ pStr=pNames->GetObject(static_cast<sal_uInt16>(i));
}
else
{
@@ -2026,7 +2026,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
if(pDoc->InsertTab( nTab+i,*pStr))
{
- bFlag=TRUE;
+ bFlag=sal_True;
pDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab+i ) );
}
else
@@ -2043,31 +2043,31 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab,
{
if (bRecord)
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoInsertTables( pDocSh, nTab, FALSE, pNameList));
+ new ScUndoInsertTables( pDocSh, nTab, false, pNameList));
// Update views
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return false;
}
}
//----------------------------------------------------------------------------
-BOOL ScViewFunc::AppendTable( const String& rName, BOOL bRecord )
+sal_Bool ScViewFunc::AppendTable( const String& rName, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
WaitObject aWait( GetFrameWin() );
@@ -2079,55 +2079,55 @@ BOOL ScViewFunc::AppendTable( const String& rName, BOOL bRecord )
SCTAB nTab = pDoc->GetTableCount()-1;
if (bRecord)
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoInsertTab( pDocSh, nTab, TRUE, rName));
+ new ScUndoInsertTab( pDocSh, nTab, sal_True, rName));
GetViewData()->InsertTab( nTab );
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return false;
}
}
//----------------------------------------------------------------------------
-BOOL ScViewFunc::DeleteTable( SCTAB nTab, BOOL bRecord )
+sal_Bool ScViewFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, false );
if (bSuccess)
{
SCTAB nNewTab = nTab;
if ( nNewTab >= pDoc->GetTableCount() )
--nNewTab;
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
}
return bSuccess;
}
-BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
+sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : FALSE;
+ sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false;
SCTAB nNewTab = TheTabs[0];
WaitObject aWait( GetFrameWin() );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if ( bVbaEnabled )
- bRecord = FALSE;
+ bRecord = false;
while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) )
--nNewTab;
- BOOL bWasLinked = FALSE;
+ sal_Bool bWasLinked = false;
ScDocument* pUndoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
if (bRecord)
@@ -2140,16 +2140,16 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
{
SCTAB nTab = TheTabs[i];
if (i==0)
- pUndoDoc->InitUndo( pDoc, nTab,nTab, TRUE,TRUE ); // incl. column/fow flags
+ pUndoDoc->InitUndo( pDoc, nTab,nTab, true,true ); // incl. column/fow flags
else
- pUndoDoc->AddUndoTab( nTab,nTab, TRUE,TRUE ); // incl. column/fow flags
+ pUndoDoc->AddUndoTab( nTab,nTab, true,true ); // incl. column/fow flags
- pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pUndoDoc );
+ pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
pDoc->GetName( nTab, aOldName );
- pUndoDoc->RenameTab( nTab, aOldName, FALSE );
+ pUndoDoc->RenameTab( nTab, aOldName, false );
if (pDoc->IsLinked(nTab))
{
- bWasLinked = TRUE;
+ bWasLinked = sal_True;
pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab),
pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab),
pDoc->GetLinkTab(nTab),
@@ -2157,13 +2157,13 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
}
if ( pDoc->IsScenario(nTab) )
{
- pUndoDoc->SetScenario( nTab, TRUE );
+ pUndoDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pDoc->IsActiveScenario( nTab );
pUndoDoc->SetActiveScenario( nTab, bActive );
}
pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) );
@@ -2184,15 +2184,15 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
pUndoData = new ScRefUndoData( pDoc );
}
- BOOL bDelDone = FALSE;
+ sal_Bool bDelDone = false;
for(int i=TheTabs.size()-1; i>=0; --i)
{
String sCodeName;
- BOOL bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName );
+ sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName );
if (pDoc->DeleteTab( TheTabs[i], pUndoDoc ))
{
- bDelDone = TRUE;
+ bDelDone = sal_True;
if( bVbaEnabled )
{
if( bHasCodeName )
@@ -2216,7 +2216,7 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
if ( nNewTab >= pDoc->GetTableCount() )
nNewTab = pDoc->GetTableCount() - 1;
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
if (bWasLinked)
{
@@ -2244,11 +2244,11 @@ BOOL ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, BOOL bRecord )
//----------------------------------------------------------------------------
-BOOL ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
+sal_Bool ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
{
// order Table/Name is inverted for DocFunc
- BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
- RenameTable( nTab, rName, TRUE, FALSE );
+ sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
+ RenameTable( nTab, rName, true, false );
if (bSuccess)
{
// the table name might be part of a formula
@@ -2262,7 +2262,7 @@ BOOL ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab )
{
- bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( nTab, rColor, TRUE, FALSE );
+ bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( nTab, rColor, sal_True, false );
if (bSuccess)
{
GetViewData()->GetViewShell()->UpdateInputHandler();
@@ -2272,7 +2272,7 @@ bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab )
bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList )
{
- bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, TRUE, FALSE );
+ bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, sal_True, false );
if (bSuccess)
{
GetViewData()->GetViewShell()->UpdateInputHandler();
@@ -2284,7 +2284,7 @@ bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfo
void ScViewFunc::InsertAreaLink( const String& rFile,
const String& rFilter, const String& rOptions,
- const String& rSource, ULONG nRefresh )
+ const String& rSource, sal_uLong nRefresh )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCCOL nPosX = GetViewData()->GetCurX();
@@ -2292,7 +2292,7 @@ void ScViewFunc::InsertAreaLink( const String& rFile,
SCTAB nTab = GetViewData()->GetTabNo();
ScAddress aPos( nPosX, nPosY, nTab );
- pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, FALSE, FALSE );
+ pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, false, false );
}
@@ -2325,7 +2325,7 @@ void ScViewFunc::InsertTableLink( const String& rFile,
}
if ( nTab <= MAXTAB )
- ImportTables( pSrcSh, 1, &nTab, TRUE,
+ ImportTables( pSrcSh, 1, &nTab, sal_True,
GetViewData()->GetTabNo() );
}
}
@@ -2335,17 +2335,17 @@ void ScViewFunc::InsertTableLink( const String& rFile,
// Copy/link tables from another document
void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
- SCTAB nCount, const SCTAB* pSrcTabs, BOOL bLink,SCTAB nTab )
+ SCTAB nCount, const SCTAB* pSrcTabs, sal_Bool bLink,SCTAB nTab )
{
ScDocument* pSrcDoc = pSrcShell->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
- BOOL bError = FALSE;
- BOOL bRefs = FALSE;
- BOOL bName = FALSE;
+ sal_Bool bError = false;
+ sal_Bool bRefs = false;
+ sal_Bool bName = false;
if (pSrcDoc->GetDrawLayer())
pDocSh->MakeDrawLayer();
@@ -2362,7 +2362,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
pDoc->CreateValidTabName( aName );
if ( !pDoc->InsertTab( nTab+i, aName ) )
{
- bError = TRUE; // total error
+ bError = sal_True; // total error
break; // for
}
++nInsCount;
@@ -2371,22 +2371,22 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
{
SCTAB nSrcTab = pSrcTabs[i];
SCTAB nDestTab1=nTab+i;
- ULONG nErrVal = pDocSh->TransferTab( *pSrcShell, nSrcTab, nDestTab1,
- FALSE, FALSE ); // no insert
+ sal_uLong nErrVal = pDocSh->TransferTab( *pSrcShell, nSrcTab, nDestTab1,
+ false, false ); // no insert
switch (nErrVal)
{
case 0: // internal error or full of errors
- bError = TRUE;
+ bError = true;
break;
case 2:
- bRefs = TRUE;
+ bRefs = sal_True;
break;
case 3:
- bName = TRUE;
+ bName = sal_True;
break;
case 4:
- bRefs = bName = TRUE;
+ bRefs = bName = sal_True;
break;
}
@@ -2403,9 +2403,9 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
aFilterName = pMed->GetFilter()->GetFilterName();
String aOptions = ScDocumentLoader::GetOptions(*pMed);
- BOOL bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions );
+ sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions );
- ULONG nRefresh = 0;
+ sal_uLong nRefresh = 0;
String aTabStr;
for (i=0; i<nInsCount; i++)
{
@@ -2417,10 +2417,10 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
if (!bWasThere) // Insert link only once per source document
{
ScTableLink* pLink = new ScTableLink( pDocSh, aFileName, aFilterName, aOptions, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SfxBindings& rBindings = GetViewData()->GetBindings();
rBindings.Invalidate( SID_LINKS );
@@ -2436,7 +2436,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
for (i=0; i<nInsCount; i++)
GetViewData()->InsertTab(nTab);
- SetTabNo(nTab,TRUE);
+ SetTabNo(nTab,sal_True);
pDocSh->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB,
PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS );
@@ -2458,17 +2458,17 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
//----------------------------------------------------------------------------
// Move/Copy table to another document
-void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName )
+void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocShell = GetViewData()->GetDocShell();
ScDocument* pDestDoc = NULL;
ScDocShell* pDestShell = NULL;
ScTabViewShell* pDestViewSh = NULL;
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
bool bRename = pNewTabName && pNewTabName->Len();
- BOOL bNewDoc = ( nDestDocNo == SC_DOC_NEW );
+ sal_Bool bNewDoc = ( nDestDocNo == SC_DOC_NEW );
if ( bNewDoc )
{
nDestTab = 0; // firstly insert
@@ -2525,7 +2525,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
pDestDoc->DeleteTab(0);
pDestDoc->RenameTab( 0,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("______42_____")),
- FALSE );
+ false );
}
SCTAB nTabCount = pDoc->GetTableCount();
@@ -2561,11 +2561,11 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
if (!bNewDoc && bUndo)
pDestDoc->BeginDrawUndo(); // drawing layer must do its own undo actions
- ULONG nErrVal =1;
+ sal_uLong nErrVal =1;
if(nDestTab==SC_TAB_APPEND)
nDestTab=pDestDoc->GetTableCount();
SCTAB nDestTab1=nDestTab;
- for( USHORT j=0; j<TheTabs.size(); ++j, ++nDestTab1 )
+ for( sal_uInt16 j=0; j<TheTabs.size(); ++j, ++nDestTab1 )
{ // insert sheets first and update all references
String aName;
if (bRename)
@@ -2583,9 +2583,9 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
if ( nErrVal > 0 )
{
nDestTab1 = nDestTab;
- for(USHORT i=0; i<TheTabs.size();++i)
+ for(sal_uInt16 i=0; i<TheTabs.size();++i)
{
- nErrVal = pDestShell->TransferTab( *pDocShell, TheTabs[i], static_cast<SCTAB>(nDestTab1), FALSE, FALSE );
+ nErrVal = pDestShell->TransferTab( *pDocShell, TheTabs[i], static_cast<SCTAB>(nDestTab1), false, false );
nDestTab1++;
}
}
@@ -2595,7 +2595,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
pDestDoc->GetName(nDestTab, sName);
pDestShell->GetUndoManager()->AddUndoAction(
new ScUndoImportTab( pDestShell, nDestTab,
- static_cast<SCTAB>(TheTabs.size()), FALSE));
+ static_cast<SCTAB>(TheTabs.size()), false));
}
else
@@ -2715,20 +2715,20 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
{
nDestTab1=nTabCount;
}
- pDocShell->MoveTable( nMovTab, nDestTab1, bCopy, FALSE ); // Undo is here
+ pDocShell->MoveTable( nMovTab, nDestTab1, bCopy, false ); // Undo is here
if(bCopy && pDoc->IsScenario(nMovTab))
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDoc->GetScenarioData(nMovTab, aComment,aColor, nFlags);
- pDoc->SetScenario(nDestTab1,TRUE);
+ pDoc->SetScenario(nDestTab1,sal_True);
pDoc->SetScenarioData(nDestTab1,aComment,aColor,nFlags);
- BOOL bActive = pDoc->IsActiveScenario(nMovTab );
+ sal_Bool bActive = pDoc->IsActiveScenario(nMovTab );
pDoc->SetActiveScenario( nDestTab1, bActive );
- BOOL bVisible=pDoc->IsVisible(nMovTab);
+ sal_Bool bVisible=pDoc->IsVisible(nMovTab);
pDoc->SetVisible(nDestTab1,bVisible );
}
@@ -2788,7 +2788,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
else if (!bCopy && nTab<nDestTab)
nNewTab--;
- SetTabNo( nNewTab, TRUE );
+ SetTabNo( nNewTab, sal_True );
//#i29848# adjust references to data on the copied sheet
if( bCopy )
@@ -2803,8 +2803,8 @@ void ScViewFunc::ShowTable( const String& rName )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
- BOOL bFound = FALSE;
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bFound = false;
SCTAB nPos = 0;
String aTabName;
SCTAB nCount = pDoc->GetTableCount();
@@ -2814,18 +2814,18 @@ void ScViewFunc::ShowTable( const String& rName )
if ( aTabName == rName )
{
nPos = i;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if (bFound)
{
- pDoc->SetVisible( nPos, TRUE );
+ pDoc->SetVisible( nPos, sal_True );
if (bUndo)
{
- pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nPos, TRUE ) );
+ pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nPos, sal_True ) );
}
- SetTabNo( nPos, TRUE );
+ SetTabNo( nPos, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
pDocSh->SetDocumentModified();
@@ -2841,7 +2841,7 @@ void ScViewFunc::HideTable( SCTAB nTab )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
SCTAB nVisible = 0;
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB i=0; i<nCount; i++)
@@ -2852,16 +2852,16 @@ void ScViewFunc::HideTable( SCTAB nTab )
if (nVisible > 1)
{
- pDoc->SetVisible( nTab, FALSE );
+ pDoc->SetVisible( nTab, false );
if (bUndo)
{
- pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nTab, FALSE ) );
+ pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nTab, false ) );
}
// Update views
pDocSh->Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) );
- SetTabNo( nTab, TRUE );
+ SetTabNo( nTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
pDocSh->SetDocumentModified();
@@ -2892,7 +2892,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont )
ATTR_FONT );
// if string contains WEAK characters, set all fonts
- BYTE nScript;
+ sal_uInt8 nScript;
ScDocument* pDoc = GetViewData()->GetDocument();
if ( pDoc->HasStringWeakCharacters( rStr ) )
nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
@@ -2913,7 +2913,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont )
void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
const SvxBorderLine* pDestLine,
const SvxBorderLine* pSrcLine,
- BOOL bColor )
+ sal_Bool bColor )
{
if ( pSrcLine && pDestLine )
{
@@ -2954,10 +2954,10 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
//----------------------------------------------------------------------------
void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
- BOOL bColorOnly )
+ sal_Bool bColorOnly )
{
// Not editable only due to a matrix? Attribute is ok anyhow.
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2972,13 +2972,13 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
const SfxItemSet& rSelItemSet = pSelAttrs->GetItemSet();
const SfxPoolItem* pBorderAttr = NULL;
- SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, TRUE, &pBorderAttr );
+ SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, sal_True, &pBorderAttr );
const SfxPoolItem* pTLBRItem = 0;
- SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pTLBRItem );
+ SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pTLBRItem );
const SfxPoolItem* pBLTRItem = 0;
- SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pBLTRItem );
+ SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pBLTRItem );
// any of the lines visible?
if( (eItemState != SFX_ITEM_DEFAULT) || (eTLBRState != SFX_ITEM_DEFAULT) || (eBLTRState != SFX_ITEM_DEFAULT) )
@@ -3074,7 +3074,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
void ScViewFunc::SetConditionalFormat( const ScConditionalFormat& rNew )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- ULONG nIndex = pDoc->AddCondFormat(rNew); // for it there is no Undo
+ sal_uLong nIndex = pDoc->AddCondFormat(rNew); // for it there is no Undo
SfxUInt32Item aItem( ATTR_CONDITIONAL, nIndex );
ApplyAttr( aItem ); // with Paint and Undo...
@@ -3086,7 +3086,7 @@ void ScViewFunc::SetConditionalFormat( const ScConditionalFormat& rNew )
void ScViewFunc::SetValidation( const ScValidationData& rNew )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- ULONG nIndex = pDoc->AddValidationEntry(rNew); // for it there is no Undo
+ sal_uLong nIndex = pDoc->AddValidationEntry(rNew); // for it there is no Undo
SfxUInt32Item aItem( ATTR_VALIDDATA, nIndex );
ApplyAttr( aItem ); // with Paint and Undo...
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 10e197d7e5c4..d877815238ed 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -35,10 +35,6 @@
#define _SV_NOXSOUND
-#ifdef WIN
- #define _MENUBTN_HXX
-#endif
-
#define _BASE_DLGS_HXX
#define _BIGINT_HXX
#define _CACHESTR_HXX
@@ -139,6 +135,9 @@
#include "scitems.hxx"
#include <svx/dbexch.hrc>
#include <svx/svdetc.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdoole2.hxx>
+#include <svx/svdpage.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <svl/stritem.hxx>
@@ -195,7 +194,7 @@ using namespace com::sun::star;
//----------------------------------------------------------------------------
// C U T
-void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
+void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects )
{
UpdateInputLine();
@@ -212,7 +211,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- const BOOL bRecord(pDoc->IsUndoEnabled()); // Undo/Redo
+ const sal_Bool bRecord(pDoc->IsUndoEnabled()); // Undo/Redo
ScDocShellModificator aModificator( *pDocSh );
@@ -224,10 +223,10 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
MarkDataChanged();
}
- CopyToClip( pClipDoc, TRUE, FALSE, bIncludeObjects ); // Ab ins Clipboard
+ CopyToClip( pClipDoc, sal_True, false, bIncludeObjects ); // Ab ins Clipboard
ScAddress aOldEnd( aRange.aEnd ); // Zusammengefasste Zellen im Bereich?
- pDoc->ExtendMerge( aRange, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True );
ScDocument* pUndoDoc = NULL;
if ( bRecord )
@@ -238,11 +237,11 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
ScRange aCopyRange = aRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(pDoc->GetTableCount()-1);
- pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, false, pUndoDoc );
pDoc->BeginDrawUndo();
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, aRange );
HideCursor(); // Cursor aendert sich !
@@ -274,9 +273,9 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects )
//----------------------------------------------------------------------------
// C O P Y
-BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bIncludeObjects, BOOL bStopEdit )
+sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bStopEdit )
UpdateInputLine();
@@ -291,11 +290,11 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
aRange.aEnd.Col(), aRange.aEnd.Row(),
rMark ) )
{
- BOOL bSysClip = FALSE;
+ sal_Bool bSysClip = false;
if ( !pClipDoc ) // no clip doc specified
{
pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj)
- bSysClip = TRUE; // and copy into system
+ bSysClip = sal_True; // and copy into system
}
if ( !bCut )
@@ -307,20 +306,41 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
if ( bSysClip && bIncludeObjects )
{
- BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
+ sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
// update ScGlobal::pDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
}
ScClipParam aClipParam(aRange, bCut);
+ aClipParam.setSourceDocID( pDoc->GetDocumentID() );
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects);
+
+ if ( pDoc && pClipDoc )
+ {
+ ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
+ if ( pDrawLayer )
+ {
+ ScClipParam& rClipParam = pClipDoc->GetClipParam();
+ ScRangeListVector& rRangesVector = rClipParam.maProtectedChartRangesVector;
+ SCTAB nTabCount = pClipDoc->GetTableCount();
+ for ( SCTAB nTab = 0; nTab < nTabCount; ++nTab )
+ {
+ SdrPage* pPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
+ if ( pPage )
+ {
+ ScChartHelper::FillProtectedChartRangesVector( rRangesVector, pDoc, pPage );
+ }
+ }
+ }
+ }
+
if (bSysClip)
{
ScDrawLayer::SetGlobalDrawPersist(NULL);
ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
}
- pClipDoc->ExtendMerge( aRange, TRUE );
+ pClipDoc->ExtendMerge( aRange, sal_True );
if (bSysClip)
{
@@ -343,7 +363,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
SC_MOD()->SetClipObject( pTransferObj, NULL ); // internal clipboard
}
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -480,9 +500,9 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
}
// Copy the content of the Range into clipboard. Adding this method for VBA API: Range.Copy().
-BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL bCut, BOOL bApi, BOOL bIncludeObjects, BOOL bStopEdit )
+sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if ( bStopEdit )
UpdateInputLine();
@@ -490,12 +510,12 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
ScDocument* pDoc = GetViewData()->GetDocument();
if ( pDoc && !pDoc->HasSelectedBlockMatrixFragment( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() ) )
{
- BOOL bSysClip = FALSE;
+ sal_Bool bSysClip = false;
if ( !pClipDoc )
{
// Create one (deleted by ScTransferObj).
pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- bSysClip = TRUE;
+ bSysClip = true;
}
if ( !bCut )
{
@@ -506,7 +526,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
if ( bSysClip && bIncludeObjects )
{
- BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange );
+ sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange );
// Update ScGlobal::pDrawClipDocShellRef.
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
}
@@ -518,7 +538,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
ScDrawLayer::SetGlobalDrawPersist(NULL);
ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
}
- pClipDoc->ExtendMerge( aRange, TRUE );
+ pClipDoc->ExtendMerge( aRange, true );
if ( bSysClip )
{
@@ -538,7 +558,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL b
SC_MOD()->SetClipObject( pTransferObj, NULL );
}
- bDone = TRUE;
+ bDone = true;
}
else
{
@@ -563,14 +583,14 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
{
ScDocument *pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj)
- BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
+ sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark );
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
ScClipParam aClipParam(aRange, false);
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true);
ScDrawLayer::SetGlobalDrawPersist(NULL);
- pClipDoc->ExtendMerge( aRange, TRUE );
+ pClipDoc->ExtendMerge( aRange, sal_True );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
TransferableObjectDescriptor aObjDesc;
@@ -597,7 +617,7 @@ void ScViewFunc::PasteDraw()
pViewData->GetActivePart() ) );
ScDrawTransferObj* pDrawClip = ScDrawTransferObj::GetOwnClipboard( pWin );
if (pDrawClip)
- PasteDraw( aPos, pDrawClip->GetModel(), FALSE,
+ PasteDraw( aPos, pDrawClip->GetModel(), false,
pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
@@ -614,8 +634,8 @@ void ScViewFunc::PasteFromSystem()
// keep a reference in case the clipboard is changed during PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
- TRUE ); // allow warning dialog
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
+ sal_True ); // allow warning dialog
}
else if (pDrawClip)
PasteDraw();
@@ -624,9 +644,9 @@ void ScViewFunc::PasteFromSystem()
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
{
- ULONG nBiff8 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff8 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff8")));
- ULONG nBiff5 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff5 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5")));
// als erstes SvDraw-Model, dann Grafik
@@ -654,7 +674,7 @@ void ScViewFunc::PasteFromSystem()
// it probably is spreadsheet cells that have been put
// on the clipboard by OOo, so use the SYLK. (fdo#31077)
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = false;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) )
{
@@ -726,8 +746,8 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
if (pOwnClip)
{
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
- TRUE ); // allow warning dialog
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
+ sal_True ); // allow warning dialog
}
else if (pDrawClip)
{
@@ -736,17 +756,17 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
SCROW nPosY = pViewData->GetCurY();
Window* pWin = GetActiveWin();
Point aPos = pWin->PixelToLogic( pViewData->GetScrPos( nPosX, nPosY, pViewData->GetActivePart() ) );
- PasteDraw( aPos, pDrawClip->GetModel(), FALSE, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
+ PasteDraw( aPos, pDrawClip->GetModel(), false, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
else
{
TransferableDataHelper aDataHelper( rxTransferable );
{
- ULONG nBiff8 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff8 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff8")));
- ULONG nBiff5 = SotExchange::RegisterFormatName(
+ sal_uLong nBiff5 = SotExchange::RegisterFormatName(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5")));
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
// als erstes SvDraw-Model, dann Grafik
// (Grafik darf nur bei einzelner Grafik drinstehen)
@@ -757,7 +777,7 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ))
{
// If it's a Writer object, insert RTF instead of OLE
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = false;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) )
{
@@ -804,16 +824,16 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
PasteDataFormat( nFormatId, aDataHelper.GetTransferable(),
GetViewData()->GetCurX(), GetViewData()->GetCurY(),
- NULL, FALSE, FALSE );
+ NULL, false, false );
}
}
}
-BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
+sal_Bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi )
{
UpdateInputLine();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
Window* pWin = GetActiveWin();
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
if ( nFormatId == 0 && pOwnClip )
@@ -821,18 +841,18 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
// keep a reference in case the clipboard is changed during PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
!bApi ); // allow warning dialog
}
else
{
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
if ( !aDataHelper.GetTransferable().is() )
- return FALSE;
+ return false;
bRet = PasteDataFormat( nFormatId, aDataHelper.GetTransferable(),
GetViewData()->GetCurX(), GetViewData()->GetCurY(),
- NULL, FALSE, !bApi ); // allow warning dialog
+ NULL, false, !bApi ); // allow warning dialog
if ( !bRet && !bApi )
ErrorMessage(STR_PASTE_ERROR);
@@ -844,10 +864,10 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
//----------------------------------------------------------------------------
// P A S T E
-BOOL ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransferable>& rxTransferable,
- SdrObject* pHitObj, BOOL bLink )
+sal_Bool ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransferable>& rxTransferable,
+ SdrObject* pHitObj, sal_Bool bLink )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
if ( bLink )
{
TransferableDataHelper aDataHelper( rxTransferable );
@@ -881,14 +901,14 @@ BOOL ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransfer
return bRet;
}
-BOOL lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rTabSelection, USHORT nMask )
+sal_Bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ const ScMarkData& rTabSelection, sal_uInt16 nMask )
{
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if ( rTabSelection.GetTableSelect(nTab) && pDoc->HasAttrib( nCol1, nRow1, nTab, nCol2, nRow2, nTab, nMask ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return false;
}
//
@@ -943,26 +963,26 @@ bool lcl_checkDestRangeForOverwrite(const ScRange& rDestRange, const ScDocument*
}
-BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
- USHORT nFunction, BOOL bSkipEmpty,
- BOOL bTranspose, BOOL bAsLink,
- InsCellCmd eMoveMode, USHORT nUndoExtraFlags,
- BOOL bAllowDialogs )
+sal_Bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
+ sal_uInt16 nFunction, sal_Bool bSkipEmpty,
+ sal_Bool bTranspose, sal_Bool bAsLink,
+ InsCellCmd eMoveMode, sal_uInt16 nUndoExtraFlags,
+ sal_Bool bAllowDialogs )
{
if (!pClipDoc)
{
OSL_FAIL("PasteFromClip: pClipDoc=0 not allowed");
- return FALSE;
+ return false;
}
// fuer Undo etc. immer alle oder keine Inhalte sichern
- USHORT nContFlags = IDF_NONE;
+ sal_uInt16 nContFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nContFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
nContFlags |= IDF_ATTRIB;
// evtl. Attribute ins Undo ohne sie vom Clip ins Doc zu kopieren
- USHORT nUndoFlags = nContFlags;
+ sal_uInt16 nUndoFlags = nContFlags;
if (nUndoExtraFlags & IDF_ATTRIB)
nUndoFlags |= IDF_ATTRIB;
// do not copy note captions into undo document
@@ -974,11 +994,11 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
nFlags, pClipDoc, nFunction, bSkipEmpty, bTranspose, bAsLink, bAllowDialogs,
eMoveMode, nContFlags, nUndoFlags);
- BOOL bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc
- BOOL bIncludeFiltered = bCutMode;
+ sal_Bool bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc
+ sal_Bool bIncludeFiltered = bCutMode;
// paste drawing: also if IDF_NOTE is set (to create drawing layer for note captions)
- BOOL bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) );
+ sal_Bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) );
ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip
ScDocument* pOrigClipDoc = NULL;
@@ -988,12 +1008,12 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
SCCOL nX;
SCROW nY;
// include filtered rows until TransposeClip can skip them
- bIncludeFiltered = TRUE;
- pClipDoc->GetClipArea( nX, nY, TRUE );
+ bIncludeFiltered = sal_True;
+ pClipDoc->GetClipArea( nX, nY, sal_True );
if ( nY > static_cast<sal_Int32>(MAXCOL) ) // zuviele Zeilen zum Transponieren
{
ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
pOrigClipDoc = pClipDoc; // fuer Referenzen
@@ -1019,7 +1039,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
SCTAB nEndTab;
SCCOL nClipSizeX;
SCROW nClipSizeY;
- pClipDoc->GetClipArea( nClipSizeX, nClipSizeY, TRUE ); // size in clipboard doc
+ pClipDoc->GetClipArea( nClipSizeX, nClipSizeY, sal_True ); // size in clipboard doc
// size in target doc: include filtered rows only if CutMode is set
SCCOL nDestSizeX;
@@ -1029,8 +1049,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
- const BOOL bRecord(pDoc->IsUndoEnabled());
+ ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ const sal_Bool bRecord(pDoc->IsUndoEnabled());
ScDocShellModificator aModificator( *pDocSh );
@@ -1082,7 +1102,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (bNoPaste)
{
ErrorMessage(STR_MSSG_PASTEFROMCLIP_0);
- return FALSE;
+ return false;
}
SCROW nUnfilteredRows = aMarkRange.aEnd.Row() - aMarkRange.aStart.Row() + 1;
@@ -1090,7 +1110,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (bMarkIsFiltered)
{
ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc);
- aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE);
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, false);
nUnfilteredRows = 0;
size_t ListSize = aRangeList.size();
for ( size_t i = 0; i < ListSize; ++i )
@@ -1107,7 +1127,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
{
/* FIXME: this should be a more descriptive error message then. */
ErrorMessage(STR_MSSG_PASTEFROMCLIP_0);
- return FALSE;
+ return false;
}
#endif
}
@@ -1133,7 +1153,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
WinBits(WB_YES_NO | WB_DEF_NO), aMessage );
if ( aBox.Execute() != RET_YES )
{
- return FALSE;
+ return false;
}
}
@@ -1157,7 +1177,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (!ScViewUtil::FitToUnfilteredRows( aMarkRange, pDoc, nDestSizeY+1))
{
ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
}
aMarkRange.GetVars( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
@@ -1165,7 +1185,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (bMarkIsFiltered)
{
ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc);
- aFilteredMark.FillRangeListWithMarks( &aRangeList, TRUE);
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_True);
}
}
}
@@ -1187,7 +1207,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
// Sollen Zellen eingefuegt werden?
// (zu grosse nEndCol/nEndRow werden weiter unten erkannt)
- BOOL bInsertCells = ( eMoveMode != INS_NONE && !bOffLimits );
+ sal_Bool bInsertCells = ( eMoveMode != INS_NONE && !bOffLimits );
if ( bInsertCells )
{
// Instead of EnterListAction, the paste undo action is merged into the
@@ -1196,10 +1216,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
MarkRange( aUserRange ); // wird vor CopyFromClip sowieso gesetzt
// CutMode is reset on insertion of cols/rows but needed again on cell move
- BOOL bCut = pClipDoc->IsCutMode();
- if (!InsertCells( eMoveMode, bRecord, TRUE )) // is inserting possible?
+ sal_Bool bCut = pClipDoc->IsCutMode();
+ if (!InsertCells( eMoveMode, bRecord, true )) // is inserting possible?
{
- return FALSE;
+ return false;
// #i21036# EnterListAction isn't used, and InsertCells doesn't insert
// its undo action on failure, so no undo handling is needed here
}
@@ -1208,7 +1228,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
}
else if (!bOffLimits)
{
- BOOL bAskIfNotEmpty = bAllowDialogs &&
+ sal_Bool bAskIfNotEmpty = bAllowDialogs &&
( nFlags & IDF_CONTENTS ) &&
nFunction == PASTE_NOFUNC &&
SC_MOD()->GetInputOptions().GetReplaceCellsWarn();
@@ -1224,14 +1244,14 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pClipDoc->GetClipStart( nClipStartX, nClipStartY );
SCCOL nUndoEndCol = nClipStartX + nClipSizeX;
SCROW nUndoEndRow = nClipStartY + nClipSizeY; // end of source area in clipboard document
- BOOL bClipOver = FALSE;
+ sal_Bool bClipOver = false;
// #i68690# ExtendMerge for the clip doc must be called with the clipboard's sheet numbers.
// The same end column/row can be used for all calls because the clip doc doesn't contain
// content outside the clip area.
for (SCTAB nClipTab=0; nClipTab<=MAXTAB; nClipTab++)
if ( pClipDoc->HasTable(nClipTab) )
- if ( pClipDoc->ExtendMerge( nClipStartX,nClipStartY, nUndoEndCol,nUndoEndRow, nClipTab, FALSE ) )
- bClipOver = TRUE;
+ if ( pClipDoc->ExtendMerge( nClipStartX,nClipStartY, nUndoEndCol,nUndoEndRow, nClipTab, false ) )
+ bClipOver = sal_True;
nUndoEndCol -= nClipStartX + nClipSizeX;
nUndoEndRow -= nClipStartY + nClipSizeY; // now contains only the difference added by ExtendMerge
nUndoEndCol = sal::static_int_cast<SCCOL>( nUndoEndCol + nEndCol );
@@ -1240,10 +1260,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (nUndoEndCol>MAXCOL || nUndoEndRow>MAXROW)
{
ErrorMessage(STR_PASTE_FULL);
- return FALSE;
+ return false;
}
- pDoc->ExtendMergeSel( nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, FALSE );
+ pDoc->ExtendMergeSel( nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, false );
// Test auf Zellschutz
@@ -1251,7 +1271,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
- return FALSE;
+ return false;
}
//! Test auf Ueberlappung
@@ -1282,8 +1302,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
{
ScRange aRange(nCol, nRow1, nStartTab);
pDoc->ExtendOverlapped(aRange);
- pDoc->ExtendMerge(aRange, TRUE, TRUE);
- rDocFunc.UnmergeCells(aRange, bRecord, TRUE);
+ pDoc->ExtendMerge(aRange, sal_True, sal_True);
+ rDocFunc.UnmergeCells(aRange, bRecord, sal_True);
}
}
}
@@ -1295,8 +1315,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pChangeTrack->ResetLastCut(); // kein CutMode mehr
}
- BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
- BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
+ sal_Bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
+ sal_Bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
ScDocument* pUndoDoc = NULL;
ScDocument* pRefUndoDoc = NULL;
@@ -1311,18 +1331,18 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
// all sheets - CopyToDocument skips those that don't exist in pUndoDoc
SCTAB nTabCount = pDoc->GetTableCount();
pDoc->CopyToDocument( nStartCol, nStartRow, 0, nUndoEndCol, nUndoEndRow, nTabCount-1,
- nUndoFlags, FALSE, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
if ( bCutMode )
{
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE );
+ pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, false, false );
pUndoData = new ScRefUndoData( pDoc );
}
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab ); // content before the change
@@ -1349,7 +1369,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pMixDoc = new ScDocument( SCDOCMODE_UNDO );
pMixDoc->InitUndo( pDoc, nStartTab, nEndTab );
pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
- IDF_CONTENTS, FALSE, pMixDoc );
+ IDF_CONTENTS, false, pMixDoc );
}
}
@@ -1362,12 +1382,12 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
if ( bRecord )
pDoc->BeginDrawUndo();
- USHORT nNoObjFlags = nFlags & ~IDF_OBJECTS;
+ sal_uInt16 nNoObjFlags = nFlags & ~IDF_OBJECTS;
if (!bAsLink)
{
// copy normally (original range)
pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags,
- pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered,
+ pRefUndoDoc, pClipDoc, sal_True, false, bIncludeFiltered,
bSkipEmpty, (bMarkIsFiltered ? &aRangeList : NULL) );
// bei Transpose Referenzen per Hand anpassen
@@ -1378,7 +1398,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
{
// copy with bAsLink=TRUE
pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags, pRefUndoDoc, pClipDoc,
- TRUE, TRUE, bIncludeFiltered, bSkipEmpty );
+ sal_True, sal_True, bIncludeFiltered, bSkipEmpty );
}
else
{
@@ -1388,9 +1408,9 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- rDocFunc.UnmergeCells( aUserRange, FALSE, TRUE );
+ rDocFunc.UnmergeCells( aUserRange, false, sal_True );
- pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, TRUE ); // Refresh
+ pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, sal_True ); // Refresh
// und Bereich neu
if ( pMixDoc ) // Rechenfunktionen mit Original-Daten auszufuehren ?
@@ -1401,12 +1421,23 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
AdjustBlockHeight(); // update row heights before pasting objects
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ SdrPage* pPage = NULL;
+
if ( nFlags & IDF_OBJECTS )
{
+ ScDrawView* pScDrawView = GetScDrawView();
+ SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : NULL );
+ pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : NULL );
+ if ( pPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
+ }
+
// Paste the drawing objects after the row heights have been updated.
pDoc->CopyFromClip( aUserRange, aFilteredMark, IDF_OBJECTS, pRefUndoDoc, pClipDoc,
- TRUE, FALSE, bIncludeFiltered );
+ sal_True, false, bIncludeFiltered );
}
@@ -1448,7 +1479,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
pUndoDoc->AddUndoTab( 0, nTabCount-1 );
pRefUndoDoc->DeleteArea( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, IDF_ALL );
pRefUndoDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
delete pRefUndoDoc;
}
@@ -1467,21 +1498,21 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
nUndoEndCol, nUndoEndRow, nEndTab, aFilteredMark,
pUndoDoc, pRedoDoc, nFlags | nUndoFlags,
pUndoData, NULL, NULL, NULL,
- FALSE, &aOptions ); // FALSE = Redo data not yet copied
+ false, &aOptions ); // sal_False = Redo data not yet copied
if ( bInsertCells )
{
// Merge the paste undo action into the insert action.
// Use ScUndoWrapper so the ScUndoPaste pointer can be stored in the insert action.
- pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE );
+ pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), sal_True );
}
else
pUndoMgr->AddUndoAction( pUndo );
pUndoMgr->LeaveListAction();
}
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
if (bColInfo)
{
nPaint |= PAINT_TOP;
@@ -1498,7 +1529,20 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark);
- return TRUE;
+
+ if ( nFlags & IDF_OBJECTS )
+ {
+ ScModelObj* pModelObj = ( pDocSh ? ScModelObj::getImplementation( pDocSh->GetModel() ) : NULL );
+ if ( pDoc && pPage && pModelObj )
+ {
+ bool bSameDoc = ( rClipParam.getSourceDocID() == pDoc->GetDocumentID() );
+ const ScRangeListVector& rProtectedChartRangesVector( rClipParam.maProtectedChartRangesVector );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDoc, pPage, pModelObj, nStartTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
+ }
+ }
+
+ return sal_True;
}
bool ScViewFunc::PasteMultiRangesFromClip(
@@ -1631,7 +1675,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
if (pDoc->IsUndoEnabled())
{
- SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
String aUndo = ScGlobal::GetRscString(
pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY);
pUndoMgr->EnterListAction(aUndo, aUndo);
@@ -1699,13 +1743,13 @@ void ScViewFunc::PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData&
//
// innerhalb des Dokuments
-BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
- BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi )
+sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
+ sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
HideAllCursors(); // wegen zusammengefassten
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SCTAB nDestTab = rDestPos.Tab();
const ScMarkData& rMark = GetViewData()->GetMarkData();
if ( rSource.aStart.Tab() == nDestTab && rSource.aEnd.Tab() == nDestTab && rMark.GetSelectCount() > 1 )
@@ -1764,7 +1808,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
rDestPos.Row() + rSource.aEnd.Row() - rSource.aStart.Row(),
nDestTab );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// find number of non-filtered rows
@@ -1776,7 +1820,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
aDestEnd.SetRow( rDestPos.Row() + nPastedCount - 1 );
}
- MarkRange( ScRange( rDestPos, aDestEnd ), FALSE ); //! FALSE ???
+ MarkRange( ScRange( rDestPos, aDestEnd ), false ); //! sal_False ???
pDocSh->UpdateOle(GetViewData());
SelectionChanged();
@@ -1786,7 +1830,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
// Link innerhalb des Dokuments
-BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi )
+sal_Bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi )
{
// Test auf Ueberlappung
@@ -1800,7 +1844,7 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B
{
if (!bApi)
ErrorMessage( STR_ERR_LINKOVERLAP );
- return FALSE;
+ return false;
}
}
@@ -1817,15 +1861,15 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B
if ( GetViewData()->GetTabNo() != rDestPos.Tab() )
SetTabNo( rDestPos.Tab() );
- MoveCursorAbs( rDestPos.Col(), rDestPos.Row(), SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( rDestPos.Col(), rDestPos.Row(), SC_FOLLOW_NONE, false, false );
// Paste
- PasteFromClip( IDF_ALL, pClipDoc, PASTE_NOFUNC, FALSE, FALSE, TRUE ); // als Link
+ PasteFromClip( IDF_ALL, pClipDoc, PASTE_NOFUNC, false, false, sal_True ); // als Link
delete pClipDoc;
- return TRUE;
+ return sal_True;
}
void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
@@ -1841,7 +1885,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
if ( pDoc )
{
- const BOOL bRecord( pDoc->IsUndoEnabled());
+ const sal_Bool bRecord( pDoc->IsUndoEnabled());
ScDocument* pUndoDoc = NULL;
ScDocument* pRedoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
@@ -1855,19 +1899,19 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
pChangeTrack->ResetLastCut(); // kein CutMode mehr
}
ScRange aUserRange( nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab );
- BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
- BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
+ sal_Bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
+ sal_Bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
SCCOL nUndoEndCol = nStartCol+aColLength-1;
SCROW nUndoEndRow = nCurrentRow;
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndoSelected( pDoc , rMark , bColInfo , bRowInfo );
- pDoc->CopyToDocument( aUserRange , 1 , FALSE , pUndoDoc );
+ pDoc->CopyToDocument( aUserRange , 1 , false , pUndoDoc );
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab , nEndCol, nEndRow, nEndTab ); // content before the change
pDoc->BeginDrawUndo();
@@ -1885,10 +1929,10 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
nUndoEndCol, nUndoEndRow, nEndTab, rMark,
pUndoDoc, pRedoDoc, nUndoFlags,
pUndoData, NULL, NULL, NULL,
- FALSE ); // FALSE = Redo data not yet copied
- pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE );
+ false ); // FALSE = Redo data not yet copied
+ pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), true );
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
if (bColInfo)
{
nPaint |= PAINT_TOP;
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 22c1aba2290b..a9d9364a7208 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -86,7 +86,7 @@ using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-BOOL bPasteIsDrop = FALSE;
+sal_Bool bPasteIsDrop = false;
//==================================================================
@@ -104,11 +104,11 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- const BOOL bRecord (pDoc->IsUndoEnabled());
+ const sal_Bool bRecord (pDoc->IsUndoEnabled());
const ScPatternAttr* pPattern = pDoc->GetPattern( nStartCol, nStartRow, nTab );
ScTabEditEngine* pEngine = new ScTabEditEngine( *pPattern, pDoc->GetEnginePool() );
- pEngine->EnableUndo( FALSE );
+ pEngine->EnableUndo( false );
Window* pActWin = GetActiveWin();
if (pActWin)
@@ -120,10 +120,10 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
// same method now for clipboard or drag&drop
// mba: clipboard always must contain absolute URLs (could be from alien source)
- aEditView.InsertText( rxTransferable, String(), TRUE );
+ aEditView.InsertText( rxTransferable, String(), sal_True );
}
- ULONG nParCnt = pEngine->GetParagraphCount();
+ sal_uLong nParCnt = pEngine->GetParagraphCount();
if (nParCnt)
{
SCROW nEndRow = nStartRow + static_cast<SCROW>(nParCnt) - 1;
@@ -134,14 +134,14 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
}
SCROW nRow = nStartRow;
- for( USHORT n = 0; n < nParCnt; n++ )
+ for( sal_uInt16 n = 0; n < nParCnt; n++ )
{
EditTextObject* pObject = pEngine->CreateTextObject( n );
- EnterData( nStartCol, nRow, nTab, pObject, FALSE, TRUE );
+ EnterData( nStartCol, nRow, nTab, pObject, false, sal_True );
// kein Undo, auf einfache Strings testen
delete pObject;
if( ++nRow > MAXROW )
@@ -152,7 +152,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, false, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SelectOneTable( nTab );
@@ -187,17 +187,17 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
ShowAllCursors();
}
}
-void ScViewFunc::DoRefConversion( BOOL bRecord )
+void ScViewFunc::DoRefConversion( sal_Bool bRecord )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
SCTAB nTabCount = pDoc->GetTableCount();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScRange aMarkRange;
rMark.MarkToSimple();
- BOOL bMulti = rMark.IsMultiMarked();
+ sal_Bool bMulti = rMark.IsMultiMarked();
if (bMulti)
rMark.GetMultiMarkArea( aMarkRange );
else if (rMark.IsMarked())
@@ -216,7 +216,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
}
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDocument* pUndoDoc = NULL;
if (bRecord)
@@ -271,7 +271,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
ScFormulaCell* pNewCell = new ScFormulaCell( pDoc, aPos,
pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE );
pDoc->PutCell( aPos, pNewCell );
- bOk = TRUE;
+ bOk = sal_True;
}
}
pCell = aIter.GetNext();
@@ -310,7 +310,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord )
ErrorMessage(STR_ERR_NOREF);
}
// Thesaurus - Undo ok
-void ScViewFunc::DoThesaurus( BOOL bRecord )
+void ScViewFunc::DoThesaurus( sal_Bool bRecord )
{
SCCOL nCol;
SCROW nRow;
@@ -328,9 +328,9 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
EditView* pEditView = NULL;
ESelection* pEditSel = NULL;
ScEditEngineDefaulter* pThesaurusEngine;
- BOOL bIsEditMode = GetViewData()->HasEditView(eWhich);
+ sal_Bool bIsEditMode = GetViewData()->HasEditView(eWhich);
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if (bIsEditMode) // Edit-Mode aktiv
{
GetViewData()->GetEditView(eWhich, pEditView, nCol, nRow);
@@ -453,7 +453,7 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
}
delete pNewTObj;
}
- KillEditView(TRUE);
+ KillEditView(sal_True);
delete pEditDefaults;
delete pThesaurusEngine;
delete pOldTObj;
@@ -461,13 +461,13 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
pDocSh->PostPaintGridAll();
}
-void ScViewFunc::DoHangulHanjaConversion( BOOL bRecord )
+void ScViewFunc::DoHangulHanjaConversion( sal_Bool bRecord )
{
ScConversionParam aConvParam( SC_CONVERSION_HANGULHANJA, LANGUAGE_KOREAN, 0, true );
DoSheetConversion( aConvParam, bRecord );
}
-void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bRecord )
+void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Bool bRecord )
{
SCCOL nCol;
SCROW nRow;
@@ -478,9 +478,9 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
ScMarkData& rMark = rViewData.GetMarkData();
ScSplitPos eWhich = rViewData.GetActivePart();
EditView* pEditView = NULL;
- BOOL bIsEditMode = rViewData.HasEditView(eWhich);
+ sal_Bool bIsEditMode = rViewData.HasEditView(eWhich);
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
if (bIsEditMode) // Edit-Mode aktiv
{
rViewData.GetEditView(eWhich, pEditView, nCol, nRow);
@@ -496,7 +496,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
nTab = rViewData.GetTabNo();
rMark.MarkToMulti();
- BOOL bMarked = rMark.IsMultiMarked();
+ sal_Bool bMarked = rMark.IsMultiMarked();
if (bMarked)
{
ScEditableTester aTester( pDoc, rMark );
@@ -530,8 +530,8 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
// ab hier kein return mehr
- BOOL bOldDis = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE ); // stop online spelling
+ sal_Bool bOldDis = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle( true ); // stop online spelling
// *** create and init the edit engine *** --------------------------------
@@ -559,7 +559,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) );
pEditView->SetOutputArea( aRect );
pEngine->SetControlWord( EE_CNTRL_USECHARATTRIBS );
- pEngine->EnableUndo( FALSE );
+ pEngine->EnableUndo( false );
pEngine->SetPaperSize( aRect.GetSize() );
pEngine->SetText( EMPTY_STRING );
@@ -594,7 +594,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
// *** final cleanup *** --------------------------------------------------
rViewData.SetSpellingView( NULL );
- KillEditView(TRUE);
+ KillEditView(sal_True);
delete pEngine;
pDocSh->PostPaintGridAll();
rViewData.GetViewShell()->UpdateInputHandler();
@@ -604,7 +604,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR
// Pasten von FORMAT_FILE-Items
// wird nicht direkt aus Drop aufgerufen, sondern asynchron -> Dialoge sind erlaubt
-BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
+sal_Bool ScViewFunc::PasteFile( const Point& rPos, const String& rFile, sal_Bool bLink )
{
INetURLObject aURL;
aURL.SetSmartURL( rFile );
@@ -614,7 +614,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
if( ::avmedia::MediaWindow::isMediaURL( aStrURL ) )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL );
- return BOOL( 0 != GetViewData()->GetDispatcher().Execute(
+ return sal_Bool( 0 != GetViewData()->GetDispatcher().Execute(
SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON,
&aMediaURLItem, 0L ) );
}
@@ -626,10 +626,10 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// nur nach eigenen Filtern suchen, ohne Auswahlbox (wie in ScDocumentLoader)
SfxFilterMatcher aMatcher( ScDocShell::Factory().GetFilterContainer()->GetName() );
- SfxMedium aSfxMedium( aStrURL, (STREAM_READ | STREAM_SHARE_DENYNONE), FALSE );
+ SfxMedium aSfxMedium( aStrURL, (STREAM_READ | STREAM_SHARE_DENYNONE), false );
// #i73992# GuessFilter no longer calls UseInteractionHandler.
// This is UI, so it can be called here.
- aSfxMedium.UseInteractionHandler(TRUE);
+ aSfxMedium.UseInteractionHandler(sal_True);
ErrCode nErr = aMatcher.GuessFilter( aSfxMedium, &pFlt );
if ( pFlt && !nErr )
@@ -643,7 +643,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// Asynchron oeffnen, kann naemlich auch aus D&D heraus passieren
// und das bekommt dem MAC nicht so gut ...
- return BOOL( 0 != rDispatcher.Execute( SID_OPENDOC,
+ return sal_Bool( 0 != rDispatcher.Execute( SID_OPENDOC,
SFX_CALLMODE_ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, 0L) );
}
}
@@ -651,7 +651,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// 2. Kann die Datei ueber die Grafik-Filter eingefuegt werden?
// (als Link, weil Gallery das so anbietet)
- USHORT nFilterFormat;
+ sal_uInt16 nFilterFormat;
Graphic aGraphic;
GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter();
@@ -680,7 +680,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
SCROW nPosY = aRange.aStart.Row();
InsertBookmark( aStrURL, aStrURL, nPosX, nPosY );
- return TRUE;
+ return sal_True;
}
else
{
@@ -703,11 +703,11 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink )
// If an OLE object can't be created, insert a URL button
GetViewData()->GetViewShell()->InsertURLButton( aStrURL, aStrURL, EMPTY_STRING, &rPos );
- return TRUE;
+ return sal_True;
}
}
-BOOL ScViewFunc::PasteBookmark( ULONG nFormatId,
+sal_Bool ScViewFunc::PasteBookmark( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY )
@@ -715,15 +715,15 @@ BOOL ScViewFunc::PasteBookmark( ULONG nFormatId,
INetBookmark aBookmark;
TransferableDataHelper aDataHelper( rxTransferable );
if ( !aDataHelper.GetINetBookmark( nFormatId, aBookmark ) )
- return FALSE;
+ return false;
InsertBookmark( aBookmark.GetDescription(), aBookmark.GetURL(), nPosX, nPosY );
- return TRUE;
+ return sal_True;
}
void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
SCCOL nPosX, SCROW nPosY, const String* pTarget,
- BOOL bTryReplace )
+ sal_Bool bTryReplace )
{
ScViewData* pViewData = GetViewData();
if ( pViewData->HasEditView( pViewData->GetActivePart() ) &&
@@ -763,7 +763,7 @@ void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
}
}
- USHORT nPara = aEngine.GetParagraphCount();
+ sal_uInt16 nPara = aEngine.GetParagraphCount();
if (nPara)
--nPara;
xub_StrLen nTxtLen = aEngine.GetTextLen(nPara);
@@ -787,7 +787,7 @@ void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
delete pData;
}
-BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
+sal_Bool ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
{
ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument();
@@ -798,7 +798,7 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
const EditTextObject* pData = ((ScEditCell*)pCell)->GetData();
if (pData)
{
- BOOL bField = pData->IsFieldObject();
+ sal_Bool bField = pData->IsFieldObject();
if (bField)
{
const SvxFieldItem* pFieldItem = pData->GetField();
@@ -814,13 +814,13 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
pContent->SetURL( pURLField->GetURL() );
pContent->SetTargetFrame( pURLField->GetTargetFrame() );
}
- return TRUE;
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 371688918df1..00d0d380eda6 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -86,12 +86,12 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
+sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
const uno::Reference<datatransfer::XTransferable>& rxTransferable,
- SCCOL nPosX, SCROW nPosY, Point* pLogicPos, BOOL bLink, BOOL bAllowDialogs )
+ SCCOL nPosX, SCROW nPosY, Point* pLogicPos, sal_Bool bLink, sal_Bool bAllowDialogs )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- pDoc->SetPastingDrawFromOtherDoc( TRUE );
+ pDoc->SetPastingDrawFromOtherDoc( sal_True );
Point aPos; // inserting position (1/100 mm)
if (pLogicPos)
@@ -99,7 +99,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
else
{
// inserting position isn't needed for text formats
- BOOL bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) ||
+ sal_Bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) ||
nFormatId == FORMAT_RTF );
if ( !bIsTextFormat )
{
@@ -111,13 +111,13 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
nXT += pDoc->GetColWidth(i,nTab);
if (pDoc->IsNegativePage(nTab))
nXT = -nXT;
- ULONG nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab);
+ sal_uLong nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab);
aPos = Point( (long)(nXT * HMM_PER_TWIPS), (long)(nYT * HMM_PER_TWIPS) );
}
}
TransferableDataHelper aDataHelper( rxTransferable );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
//
// handle individual formats
@@ -173,10 +173,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SetCursor( nPosX, nPosY );
Unmark();
PasteFromClip( IDF_ALL, pClipDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bAllowDialogs );
delete pClipDoc;
- bRet = TRUE;
+ bRet = sal_True;
}
xDocShRef->DoClose();
@@ -191,7 +191,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
@@ -203,7 +203,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
else
PasteObject( aPos, xObj, &aObjDesc.maSize );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -252,7 +252,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -276,7 +276,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
// let object stay in loaded state after insertion
SdrOle2Obj::Unload( xObj, embed::Aspects::MSOLE_CONTENT );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -296,7 +296,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// use EditView's PasteSpecial / Drop
PasteRTF( nPosX, nPosY, rxTransferable );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -352,10 +352,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
// Content was partially pasted, which can be undone by
// the user though.
if (aObj.IsOverflow())
- bRet = FALSE;
+ bRet = false;
}
else
- bRet = TRUE;
+ bRet = sal_True;
// Yes, no failure, don't raise a "couldn't paste"
// dialog if user cancelled.
delete pDlg;
@@ -382,7 +382,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
- ClickCursor(nPosX, nPosY, FALSE); // set cursor position
+ ClickCursor(nPosX, nPosY, false); // set cursor position
// Creation of database area "Import1" isn't here, but in the DocShell
// slot execute, so it can be added to the undo action
@@ -398,7 +398,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
}
SfxStringItem aTarget(FN_PARAM_1, sTarget);
- BOOL bAreaIsNew = !pDBData;
+ sal_Bool bAreaIsNew = !pDBData;
SfxBoolItem aAreaNew(FN_PARAM_2, bAreaIsNew);
::svx::ODataAccessDescriptor aDesc;
@@ -416,7 +416,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
rDisp.Execute(SID_SBA_IMPORT, SFX_CALLMODE_ASYNCHRON,
&aDataDesc, &aTarget, &aAreaNew, pCursorItem.get(), (void*)0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if (nFormatId == SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE)
@@ -459,8 +459,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
pScDrawView->InsertObjectSafe(pObj, *pScDrawView->GetSdrPageView());
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
- bRet = TRUE;
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
+ bRet = sal_True;
}
}
}
@@ -507,9 +507,9 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SvxDrawingLayerImport( pModel, xInputStream );
// set everything to right layer:
- ULONG nObjCount = 0;
- USHORT nPages = pModel->GetPageCount();
- for (USHORT i=0; i<nPages; i++)
+ sal_uLong nObjCount = 0;
+ sal_uInt16 nPages = pModel->GetPageCount();
+ for (sal_uInt16 i=0; i<nPages; i++)
{
SdrPage* pPage = pModel->GetPage(i);
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -529,7 +529,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
PasteDraw( aPos, pModel, (nObjCount > 1) ); // grouped if more than 1 object
delete pModel;
aDragShellRef->DoClose();
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( (nFormatId == SOT_FORMATSTR_ID_BIFF_5) || (nFormatId == SOT_FORMATSTR_ID_BIFF_8) )
@@ -579,17 +579,17 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
if ( pLogicPos )
{
// position specified (Drag&Drop) - change selection
- MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
Unmark();
}
pInsDoc->SetClipArea( aSource );
PasteFromClip( IDF_ALL, pInsDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bAllowDialogs );
delete pInsDoc;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -604,8 +604,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
FileList aFileList;
if ( aDataHelper.GetFileList( nFormatId, aFileList ) )
{
- ULONG nCount = aFileList.Count();
- for( ULONG i = 0; i < nCount ; i++ )
+ sal_uLong nCount = aFileList.Count();
+ for( sal_uLong i = 0; i < nCount ; i++ )
{
String aFile = aFileList.GetFile( i );
@@ -614,7 +614,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
aPos.X() += 400;
aPos.Y() += 400;
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( nFormatId == SOT_FORMATSTR_ID_SOLK ||
@@ -625,7 +625,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
bRet = PasteBookmark( nFormatId, rxTransferable, nPosX, nPosY );
}
- pDoc->SetPastingDrawFromOtherDoc( FALSE );
+ pDoc->SetPastingDrawFromOtherDoc( false );
return bRet;
}
@@ -640,7 +640,7 @@ ByteString lcl_GetSubString( sal_Char* pData, long nStart, long nDataSize )
return ByteString( pData + nStart );
}
-BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
+sal_Bool ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
{
TransferableDataHelper aDataHelper( rxTransferable );
@@ -651,13 +651,13 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
if ( !aDataHelper.GetSequence( SOT_FORMATSTR_ID_LINK, aSequence ) )
{
OSL_FAIL("DDE Data not found.");
- return FALSE;
+ return false;
}
// check size (only if string is available in transferable)
- USHORT nCols = 1;
- USHORT nRows = 1;
+ sal_uInt16 nCols = 1;
+ sal_uInt16 nRows = 1;
if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) )
{
String aDataStr;
@@ -730,7 +730,7 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
EnterMatrix( aFormula );
CursorPosChanged();
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 90e42b2ead28..0fe9c04c0294 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -67,7 +67,7 @@ using ::std::vector;
void ScViewFunc::DetectiveAddPred()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveAddPred( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -78,7 +78,7 @@ void ScViewFunc::DetectiveAddPred()
void ScViewFunc::DetectiveDelPred()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveDelPred( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -89,7 +89,7 @@ void ScViewFunc::DetectiveDelPred()
void ScViewFunc::DetectiveAddSucc()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveAddSucc( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -100,7 +100,7 @@ void ScViewFunc::DetectiveAddSucc()
void ScViewFunc::DetectiveDelSucc()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveDelSucc( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -111,7 +111,7 @@ void ScViewFunc::DetectiveDelSucc()
void ScViewFunc::DetectiveAddError()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveAddError( GetViewData()->GetCurPos() );
if (!bDone)
Sound::Beep();
@@ -122,7 +122,7 @@ void ScViewFunc::DetectiveAddError()
void ScViewFunc::DetectiveDelAll()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveDelAll( GetViewData()->GetTabNo() );
if (!bDone)
Sound::Beep();
@@ -133,7 +133,7 @@ void ScViewFunc::DetectiveDelAll()
void ScViewFunc::DetectiveMarkInvalid()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().
+ sal_Bool bDone = pDocSh->GetDocFunc().
DetectiveMarkInvalid( GetViewData()->GetTabNo() );
if (!bDone)
Sound::Beep();
@@ -144,7 +144,7 @@ void ScViewFunc::DetectiveMarkInvalid()
void ScViewFunc::DetectiveRefresh()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bDone = pDocSh->GetDocFunc().DetectiveRefresh();
+ sal_Bool bDone = pDocSh->GetDocFunc().DetectiveRefresh();
if (!bDone)
Sound::Beep();
@@ -156,7 +156,7 @@ static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, ScDocument
String aAddrText;
rRange.Format(aAddrText, SCR_ABS_3D, pDoc);
SfxStringItem aPosItem(SID_CURRENTCELL, aAddrText);
- SfxBoolItem aUnmarkItem(FN_PARAM_1, TRUE); // remove existing selection
+ SfxBoolItem aUnmarkItem(FN_PARAM_1, true); // remove existing selection
pView->GetDispatcher().Execute(
SID_CURRENTCELL, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD,
&aPosItem, &aUnmarkItem, 0L);
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 79d36b57e924..9ff8e204fd3b 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -57,12 +57,16 @@
#include "drwlayer.hxx"
#include "drwtrans.hxx"
#include "globstr.hrc"
+#include "chartlis.hxx"
+#include "docuno.hxx"
+#include "docsh.hxx"
+#include "convuno.hxx"
extern Point aDragStartDiff;
// STATIC DATA -----------------------------------------------------------
-BOOL bPasteIsMove = FALSE;
+sal_Bool bPasteIsMove = false;
using namespace com::sun::star;
@@ -87,7 +91,7 @@ void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize )
}
void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
- BOOL bGroup, BOOL bSameDocClipboard )
+ sal_Bool bGroup, sal_Bool bSameDocClipboard )
{
MakeDrawLayer();
Point aPos( rLogicPos );
@@ -102,7 +106,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
pRef->SetMapMode( MapMode(MAP_100TH_MM) );
}
- BOOL bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() );
+ sal_Bool bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() );
SdrView* pDragEditView = NULL;
ScModule* pScMod = SC_MOD();
@@ -128,7 +132,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if (bGroup)
pScDrawView->BegUndo( ScGlobal::GetRscString( STR_UNDO_PASTE ) );
- BOOL bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() );
+ sal_Bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() );
if (bSameDoc)
{
// lokal kopieren - incl. Charts
@@ -144,18 +148,25 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
pDragEditView->GetSdrPageView()->GetPage() )
{
if ( nDiffX != 0 || nDiffY != 0 )
- pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY), FALSE);
+ pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY), false);
}
else
{
SdrModel* pDrawModel = pDragEditView->GetModel();
- SdrPage* pDestPage = pDrawModel->GetPage( static_cast<sal_uInt16>(GetViewData()->GetTabNo()) );
+ SCTAB nTab = GetViewData()->GetTabNo();
+ SdrPage* pDestPage = pDrawModel->GetPage( static_cast< sal_uInt16 >( nTab ) );
DBG_ASSERT(pDestPage,"nanu, Page?");
+ ::std::vector< ::rtl::OUString > aExcludedChartNames;
+ if ( pDestPage )
+ {
+ ScChartHelper::GetChartNames( aExcludedChartNames, pDestPage );
+ }
+
SdrMarkList aMark = pDragEditView->GetMarkedObjectList();
aMark.ForceSort();
- ULONG nMarkAnz=aMark.GetMarkCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ sal_uLong nMarkAnz=aMark.GetMarkCount();
+ for (sal_uLong nm=0; nm<nMarkAnz; nm++) {
const SdrMark* pM=aMark.GetMark(nm);
const SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -182,11 +193,21 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if (bPasteIsMove)
pDragEditView->DeleteMarked();
+
+ ScDocument* pDocument = GetViewData()->GetDocument();
+ ScDocShell* pDocShell = GetViewData()->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ if ( pDocument && pDestPage && pModelObj && pDrawTrans )
+ {
+ const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pDestPage, pModelObj, nTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
+ }
}
}
else
{
- bPasteIsMove = FALSE; // kein internes Verschieben passiert
+ bPasteIsMove = false; // kein internes Verschieben passiert
SdrView aView(pModel); // #i71529# never create a base class of SdrView directly!
SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
@@ -197,7 +218,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// Markierung nicht aendern, wenn Ole-Objekt aktiv
// (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!)
- ULONG nOptions = 0;
+ sal_uLong nOptions = 0;
SfxInPlaceClient* pClient = GetViewData()->GetViewShell()->GetIPClient();
if ( pClient && pClient->IsObjectInPlaceActive() )
nOptions |= SDRINSERT_DONTMARK;
@@ -205,19 +226,15 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// Set flag for ScDocument::UpdateChartListeners() which is
// called during paste.
if ( !bSameDocClipboard )
- GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( TRUE );
+ GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( sal_True );
pScDrawView->Paste( *pModel, aPos, NULL, nOptions );
if ( !bSameDocClipboard )
- GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( FALSE );
+ GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( false );
// Paste puts all objects on the active (front) layer
// controls must be on SC_LAYER_CONTROLS
-
- SCTAB nTab = GetViewData()->GetTabNo();
- SdrPage* pPage = pScDrawView->GetModel()->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page?");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -232,6 +249,18 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
// all graphics objects must have names
GetViewData()->GetDocument()->EnsureGraphicNames();
+
+ ScDocument* pDocument = GetViewData()->GetDocument();
+ ScDocShell* pDocShell = GetViewData()->GetDocShell();
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( NULL );
+ if ( pDocument && pPage && pModelObj && ( pTransferObj || pDrawTrans ) )
+ {
+ const ScRangeListVector& rProtectedChartRangesVector(
+ pTransferObj ? pTransferObj->GetProtectedChartRangesVector() : pDrawTrans->GetProtectedChartRangesVector() );
+ ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab,
+ rProtectedChartRangesVector, aExcludedChartNames, bSameDocClipboard );
+ }
}
if (bGroup)
@@ -252,7 +281,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
}
-BOOL ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj,
+sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj,
const Size* pDescSize, const Graphic* pReplGraph, const ::rtl::OUString& aMediaType, sal_Int64 nAspect )
{
MakeDrawLayer();
@@ -328,28 +357,28 @@ BOOL ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
SdrPageView* pPV = pDrView->GetSdrPageView();
pDrView->InsertObjectSafe( pSdrObj, *pPV ); // nicht markieren wenn Ole
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
- return TRUE;
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
+ return sal_True;
}
else
- return FALSE;
+ return false;
}
-BOOL ScViewFunc::PasteBitmap( const Point& rPos, const Bitmap& rBmp )
+sal_Bool ScViewFunc::PasteBitmap( const Point& rPos, const Bitmap& rBmp )
{
String aEmpty;
Graphic aGraphic(rBmp);
return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty );
}
-BOOL ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
+sal_Bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
{
String aEmpty;
Graphic aGraphic(rMtf);
return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty );
}
-BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
+sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
const String& rFile, const String& rFilter )
{
MakeDrawLayer();
@@ -375,7 +404,7 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
if ( GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ) )
aPos.X() -= aSize.Width();
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
Rectangle aRect(aPos, aSize);
SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect);
@@ -397,12 +426,12 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
if (rFile.Len())
pGrafObj->SetGraphicLink( rFile, rFilter );
- return TRUE;
+ return sal_True;
}
-BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGraphic )
+sal_Bool ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGraphic )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
SdrGrafObj* pNewGrafObj = NULL;
ScDrawView* pScDrawView = GetScDrawView();
@@ -424,7 +453,7 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap
pScDrawView->ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj);
pScDrawView->EndUndo();
- bRet = TRUE;
+ bRet = sal_True;
}
else if (pPickObj->IsClosedObj() && !pPickObj->ISA(SdrOle2Obj))
{
@@ -443,7 +472,7 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap
pPickObj->SetMergedItemSetAndBroadcast(aSet);
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index ab7a8b8d9425..2918410d0923 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -109,7 +109,7 @@ static void lcl_PostRepaintCondFormat( const ScConditionalFormat *pCondFmt, ScDo
ScViewFunc::ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
ScTabView( pParent, rDocSh, pViewShell ),
- bFormatValid( FALSE )
+ bFormatValid( false )
{
}
@@ -127,37 +127,37 @@ void ScViewFunc::StartFormatArea()
// start only with single cell (marked or cursor position)
ScRange aMarkRange;
- BOOL bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
+ sal_Bool bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
if ( bOk && aMarkRange.aStart != aMarkRange.aEnd )
- bOk = FALSE;
+ bOk = false;
if (bOk)
{
- bFormatValid = TRUE;
+ bFormatValid = sal_True;
aFormatSource = aMarkRange.aStart;
aFormatArea = ScRange( aFormatSource );
}
else
- bFormatValid = FALSE; // keinen alten Bereich behalten
+ bFormatValid = false; // keinen alten Bereich behalten
}
-BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged )
+sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged )
{
// ueberhaupt aktiviert?
if ( !SC_MOD()->GetInputOptions().GetExtendFormat() )
- return FALSE;
+ return false;
// Test: Eingabe mit Zahlformat (bAttrChanged) immer als neue Attributierung behandeln
// (alte Area verwerfen). Wenn das nicht gewollt ist, den if-Teil weglassen:
if ( bAttrChanged )
{
StartFormatArea();
- return FALSE;
+ return false;
}
//! Abfrage, ob Zelle leer war ???
- BOOL bFound = FALSE;
+ sal_Bool bFound = false;
ScRange aNewRange = aFormatArea;
if ( bFormatValid && nTab == aFormatSource.Tab() )
{
@@ -166,18 +166,18 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
// innerhalb ?
if ( nCol >= aFormatArea.aStart.Col() && nCol <= aFormatArea.aEnd.Col() )
{
- bFound = TRUE; // Bereich nicht aendern
+ bFound = sal_True; // Bereich nicht aendern
}
// links ?
if ( nCol+1 == aFormatArea.aStart.Col() )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aStart.SetCol( nCol );
}
// rechts ?
if ( nCol == aFormatArea.aEnd.Col()+1 )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aEnd.SetCol( nCol );
}
}
@@ -186,13 +186,13 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
// oben ?
if ( nRow+1 == aFormatArea.aStart.Row() )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aStart.SetRow( nRow );
}
// unten ?
if ( nRow == aFormatArea.aEnd.Row()+1 )
{
- bFound = TRUE;
+ bFound = sal_True;
aNewRange.aEnd.SetRow( nRow );
}
}
@@ -202,7 +202,7 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
aFormatArea = aNewRange; // erweitern
else
{
- bFormatValid = FALSE; // ausserhalb -> abbrechen
+ bFormatValid = false; // ausserhalb -> abbrechen
if ( bAttrChanged ) // Wert mit Zahlformat eingegeben?
StartFormatArea(); // dann ggf. neu starten
}
@@ -211,12 +211,12 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC
}
void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
- BOOL bAttrChanged, BOOL bAddUndo )
+ sal_Bool bAttrChanged, sal_Bool bAddUndo )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
if (bAddUndo && !pDoc->IsUndoEnabled())
- bAddUndo = FALSE;
+ bAddUndo = false;
const ScPatternAttr* pSource = pDoc->GetPattern(
aFormatSource.Col(), aFormatSource.Row(), nTab );
@@ -233,7 +233,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
if ( pSrcStyle && pSrcStyle != pDocOld->GetStyleSheet() )
pDoc->ApplyStyle( nCol, nRow, nTab, *pSrcStyle );
pDoc->ApplyPattern( nCol, nRow, nTab, *pSource );
- AdjustRowHeight( nRow, nRow, TRUE ); //! nicht doppelt ?
+ AdjustRowHeight( nRow, nRow, sal_True ); //! nicht doppelt ?
if ( bAddUndo )
{
@@ -242,7 +242,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoCursorAttr( pDocSh, nCol, nRow, nTab,
pOldPattern, pNewPattern, pSource,
- TRUE ) );
+ sal_True ) );
delete pOldPattern; // wird im Undo kopiert (Pool)
}
@@ -256,7 +256,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
// Hilfsroutinen
-USHORT ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula )
+sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -275,14 +275,14 @@ USHORT ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula )
aZoomX = aZoomY = Fraction( 1, 1 );
}
- USHORT nTwips = pDoc->GetOptimalColWidth( nCol, nTab, aProv.GetDevice(),
+ sal_uInt16 nTwips = pDoc->GetOptimalColWidth( nCol, nTab, aProv.GetDevice(),
nPPTX, nPPTY, aZoomX, aZoomY, bFormula, &rMark );
return nTwips;
}
-BOOL ScViewFunc::SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ )
+sal_Bool ScViewFunc::SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ )
{
- BOOL bRet;
+ sal_Bool bRet;
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
if (rMark.IsMarked() || rMark.IsMultiMarked())
@@ -302,50 +302,50 @@ BOOL ScViewFunc::SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ )
#define LRU_MAX 10
#endif
-BOOL lcl_FunctionKnown( USHORT nOpCode )
+sal_Bool lcl_FunctionKnown( sal_uInt16 nOpCode )
{
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
- ULONG nCount = pFuncList->GetCount();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = pFuncList->GetCount();
+ for (sal_uLong i=0; i<nCount; i++)
if ( pFuncList->GetFunction(i)->nFIndex == nOpCode )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
-BOOL lcl_AddFunction( ScAppOptions& rAppOpt, USHORT nOpCode )
+sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode )
{
- USHORT nOldCount = rAppOpt.GetLRUFuncListCount();
- USHORT* pOldList = rAppOpt.GetLRUFuncList();
- USHORT nPos;
+ sal_uInt16 nOldCount = rAppOpt.GetLRUFuncListCount();
+ sal_uInt16* pOldList = rAppOpt.GetLRUFuncList();
+ sal_uInt16 nPos;
for (nPos=0; nPos<nOldCount; nPos++)
if (pOldList[nPos] == nOpCode) // is the function already in the list?
{
if ( nPos == 0 )
- return FALSE; // already at the top -> no change
+ return false; // already at the top -> no change
// count doesn't change, so the original array is modified
- for (USHORT nCopy=nPos; nCopy>0; nCopy--)
+ for (sal_uInt16 nCopy=nPos; nCopy>0; nCopy--)
pOldList[nCopy] = pOldList[nCopy-1];
pOldList[0] = nOpCode;
- return TRUE; // list has changed
+ return sal_True; // list has changed
}
if ( !lcl_FunctionKnown( nOpCode ) )
- return FALSE; // not in function list -> no change
+ return false; // not in function list -> no change
- USHORT nNewCount = Min( (USHORT)(nOldCount + 1), (USHORT)LRU_MAX );
- USHORT nNewList[LRU_MAX];
+ sal_uInt16 nNewCount = Min( (sal_uInt16)(nOldCount + 1), (sal_uInt16)LRU_MAX );
+ sal_uInt16 nNewList[LRU_MAX];
nNewList[0] = nOpCode;
for (nPos=1; nPos<nNewCount; nPos++)
nNewList[nPos] = pOldList[nPos-1];
rAppOpt.SetLRUFuncList( nNewList, nNewCount );
- return TRUE; // list has changed
+ return sal_True; // list has changed
}
// eigentliche Funktionen
@@ -353,7 +353,7 @@ BOOL lcl_AddFunction( ScAppOptions& rAppOpt, USHORT nOpCode )
// Eingabe - Undo OK
void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
- BOOL bRecord, const EditTextObject* pData )
+ sal_Bool bRecord, const EditTextObject* pData )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -361,7 +361,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
SCTAB nSelCount = rMark.GetSelectCount();
SCTAB i;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocShellModificator aModificator( *pDocSh );
@@ -369,20 +369,20 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScEditableTester aTester( pDoc, nCol,nRow, nCol,nRow, rMark );
if (aTester.IsEditable())
{
- BOOL bEditDeleted = FALSE;
- BYTE nOldScript = 0;
+ sal_Bool bEditDeleted = false;
+ sal_uInt8 nOldScript = 0;
ScBaseCell** ppOldCells = NULL;
- BOOL* pHasFormat = NULL;
- ULONG* pOldFormats = NULL;
+ sal_Bool* pHasFormat = NULL;
+ sal_uLong* pOldFormats = NULL;
SCTAB* pTabs = NULL;
SCTAB nUndoPos = 0;
EditTextObject* pUndoData = NULL;
if ( bRecord )
{
ppOldCells = new ScBaseCell*[nSelCount];
- pHasFormat = new BOOL[nSelCount];
- pOldFormats = new ULONG[nSelCount];
+ pHasFormat = new sal_Bool[nSelCount];
+ pOldFormats = new sal_uLong[nSelCount];
pTabs = new SCTAB[nSelCount];
nUndoPos = 0;
@@ -396,13 +396,13 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
{
ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc );
if ( pDocCell->GetCellType() == CELLTYPE_EDIT )
- bEditDeleted = TRUE;
+ bEditDeleted = sal_True;
- BYTE nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell );
+ sal_uInt8 nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell );
if ( nOldScript == 0 )
nOldScript = nDocScript;
else if ( nDocScript != nOldScript )
- bEditDeleted = TRUE;
+ bEditDeleted = sal_True;
}
else
{
@@ -412,13 +412,13 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
const SfxPoolItem* pItem;
const ScPatternAttr* pPattern = pDoc->GetPattern(nCol, nRow, i);
if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState(
- ATTR_VALUE_FORMAT,FALSE,&pItem) )
+ ATTR_VALUE_FORMAT,false,&pItem) )
{
- pHasFormat[nUndoPos] = TRUE;
+ pHasFormat[nUndoPos] = sal_True;
pOldFormats[nUndoPos] = ((const SfxUInt32Item*)pItem)->GetValue();
}
else
- pHasFormat[nUndoPos] = FALSE;
+ pHasFormat[nUndoPos] = false;
++nUndoPos;
}
@@ -466,7 +466,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
}
}
- BOOL bNumFmtChanged = FALSE;
+ sal_Bool bNumFmtChanged = false;
if ( bFormula )
{ // Formel, compile mit AutoCorrection
for (i=0; i<nTabCount; i++)
@@ -476,27 +476,27 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScCompiler aComp( pDoc, aPos);
aComp.SetGrammar(pDoc->GetGrammar());
//2do: AutoCorrection via CalcOptions abschaltbar machen
- aComp.SetAutoCorrection( TRUE );
+ aComp.SetAutoCorrection( sal_True );
if ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' )
{
aComp.SetExtendedErrorDetection( true );
}
String aFormula( rString );
ScTokenArray* pArr;
- BOOL bAgain;
+ sal_Bool bAgain;
do
{
- bAgain = FALSE;
- BOOL bAddEqual = FALSE;
+ bAgain = false;
+ sal_Bool bAddEqual = false;
ScTokenArray* pArrFirst = pArr = aComp.CompileString( aFormula );
- BOOL bCorrected = aComp.IsCorrected();
+ sal_Bool bCorrected = aComp.IsCorrected();
if ( bCorrected )
{ // probieren, mit erster Parser-Korrektur neu zu parsen
pArr = aComp.CompileString( aComp.GetCorrectedFormula() );
}
if ( !pArr->GetCodeError() )
{
- bAddEqual = TRUE;
+ bAddEqual = sal_True;
aComp.CompileTokenArray();
bCorrected |= aComp.IsCorrected();
}
@@ -526,7 +526,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
aFormula = aCorrectedFormula;
if ( pArr != pArrFirst )
delete pArrFirst;
- bAgain = TRUE;
+ bAgain = sal_True;
}
else
{
@@ -545,7 +545,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
// Zellen RPN geloescht und der Fehler explizit gesetzt werden, da
// via FormulaCell copy-ctor und Interpreter das, wenn moeglich,
// wieder glattgebuegelt wird, zu intelligent.. z.B.: =1))
- USHORT nError = pArr->GetCodeError();
+ sal_uInt16 nError = pArr->GetCodeError();
if ( !nError )
{
// update list of recent functions with all functions that
@@ -553,12 +553,12 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScModule* pScMod = SC_MOD();
ScAppOptions aAppOpt = pScMod->GetAppOptions();
- BOOL bOptChanged = FALSE;
+ sal_Bool bOptChanged = false;
formula::FormulaToken** ppToken = pArr->GetArray();
- USHORT nTokens = pArr->GetLen();
- USHORT nLevel = 0;
- for (USHORT nTP=0; nTP<nTokens; nTP++)
+ sal_uInt16 nTokens = pArr->GetLen();
+ sal_uInt16 nLevel = 0;
+ for (sal_uInt16 nTP=0; nTP<nTokens; nTP++)
{
formula::FormulaToken* pTok = ppToken[nTP];
OpCode eOp = pTok->GetOpCode();
@@ -567,8 +567,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
else if ( eOp == ocClose && nLevel )
--nLevel;
if ( nLevel == 0 && pTok->IsFunction() &&
- lcl_AddFunction( aAppOpt, sal::static_int_cast<USHORT>( eOp ) ) )
- bOptChanged = TRUE;
+ lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) )
+ bOptChanged = sal_True;
}
if ( bOptChanged )
@@ -580,14 +580,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
ScFormulaCell aCell( pDoc, aPos, pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE );
delete pArr;
- BOOL bAutoCalc = pDoc->GetAutoCalc();
+ sal_Bool bAutoCalc = pDoc->GetAutoCalc();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
for ( ; i<nTabCount; i++)
{
if (rMark.GetTableSelect(i))
{
aPos.SetTab( i );
- ULONG nIndex = (ULONG) ((SfxUInt32Item*) pDoc->GetAttr(
+ sal_uLong nIndex = (sal_uLong) ((SfxUInt32Item*) pDoc->GetAttr(
nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue();
if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT ||
( ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) && nError && rString.Equals( aFormula ) ) )
@@ -612,7 +612,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
pCell->GetCode()->DelRPN();
pCell->SetErrCode( nError );
if(pCell->GetCode()->IsHyperLink())
- pCell->GetCode()->SetHyperLink(FALSE);
+ pCell->GetCode()->SetHyperLink(false);
}
pDoc->PutCell( aPos, pCell );
if ( !bAutoCalc )
@@ -631,21 +631,21 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
for (i=0; i<nTabCount; i++)
if (rMark.GetTableSelect(i))
if (pDoc->SetString( nCol, nRow, i, rString ))
- bNumFmtChanged = TRUE;
+ bNumFmtChanged = sal_True;
}
// row height must be changed if new text has a different script type
for (i=0; i<nTabCount && !bEditDeleted; i++)
if (rMark.GetTableSelect(i))
if ( pDoc->GetScriptType( nCol, nRow, i ) != nOldScript )
- bEditDeleted = TRUE;
+ bEditDeleted = sal_True;
HideAllCursors();
if (bEditDeleted || pDoc->HasAttrib( nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_NEEDHEIGHT ))
AdjustRowHeight(nRow,nRow);
- BOOL bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
+ sal_Bool bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
if (bAutoFormat)
DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged, bRecord);
@@ -696,7 +696,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if ( pDoc && pDocSh )
{
@@ -707,7 +707,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
{
ScAddress aPos( nCol, nRow, nTab );
ScBaseCell* pOldCell = pDoc->GetCell( aPos );
- BOOL bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT )
+ sal_Bool bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT )
|| pDoc->HasAttrib(
nCol,nRow,nTab, nCol,nRow,nTab, HASATTR_NEEDHEIGHT );
@@ -733,13 +733,13 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
}
void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData,
- BOOL bRecord, BOOL bTestSimple )
+ sal_Bool bRecord, sal_Bool bTestSimple )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocument* pDoc = pDocSh->GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
@@ -749,8 +749,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
//
// Test auf Attribute
//
- BOOL bSimple = FALSE;
- BOOL bCommon = FALSE;
+ sal_Bool bSimple = false;
+ sal_Bool bCommon = false;
ScPatternAttr* pCellAttrs = NULL;
EditTextObject* pNewData = NULL;
String aString;
@@ -770,9 +770,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
if ( !bSimple && aEngine.GetParagraphCount() == 1 )
{
- String aParStr = aEngine.GetText( (USHORT) 0 );
+ String aParStr = aEngine.GetText( (sal_uInt16) 0 );
if ( aParStr.GetChar(0) == '=' )
- bSimple = TRUE;
+ bSimple = sal_True;
}
if (bCommon) // Attribute fuer Tabelle
@@ -921,7 +921,7 @@ void ScViewFunc::EnterMatrix( const String& rString )
ScRange aResult( nCol, nRow, nTab,
sal::static_int_cast<SCCOL>(nCol+nSizeX-1),
sal::static_int_cast<SCROW>(nRow+nSizeY-1), nTab );
- MarkRange( aResult, FALSE );
+ MarkRange( aResult, false );
}
}
@@ -929,7 +929,7 @@ void ScViewFunc::EnterMatrix( const String& rString )
if (pData->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = pData->GetDocShell();
- BOOL bSuccess = pDocSh->GetDocFunc().EnterMatrix( aRange, &rMark, NULL, rString, FALSE, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().EnterMatrix( aRange, &rMark, NULL, rString, false, false, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
if (bSuccess)
pDocSh->UpdateOle(GetViewData());
}
@@ -937,9 +937,9 @@ void ScViewFunc::EnterMatrix( const String& rString )
ErrorMessage(STR_NOMULTISELECT);
}
-BYTE ScViewFunc::GetSelectionScriptType()
+sal_uInt8 ScViewFunc::GetSelectionScriptType()
{
- BYTE nScript = 0;
+ sal_uInt8 nScript = 0;
ScDocument* pDoc = GetViewData()->GetDocument();
const ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -953,7 +953,7 @@ BYTE ScViewFunc::GetSelectionScriptType()
else
{
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
+ rMark.FillRangeListWithMarks( &aRanges, false );
size_t nCount = aRanges.size();
for ( size_t i=0; i < nCount; i++ )
{
@@ -1026,9 +1026,9 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter,
rLineOuter = (const SvxBoxItem&) (pAttrs->GetItem( ATTR_BORDER ));
rLineInner = (const SvxBoxInfoItem&)(pAttrs->GetItem( ATTR_BORDER_INNER ));
- rLineInner.SetTable(FALSE);
- rLineInner.SetDist(TRUE);
- rLineInner.SetMinDist(FALSE);
+ rLineInner.SetTable(false);
+ rLineInner.SetDist(sal_True);
+ rLineInner.SetMinDist(false);
}
}
@@ -1040,10 +1040,10 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter,
void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
const SfxItemSet* pOldSet,
- BOOL bRecord )
+ sal_Bool bRecord )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1103,17 +1103,17 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
*
*/
- BOOL bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT)
+ sal_Bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT)
|| (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_DEFAULT);
if ( pNewOuter==pOldOuter && pNewInner==pOldInner )
- bFrame = FALSE;
+ bFrame = false;
// das sollte doch der Pool abfangen: ?!??!??
if ( bFrame && pNewOuter && pNewInner )
if ( *pNewOuter == *pOldOuter && *pNewInner == *pOldInner )
- bFrame = FALSE;
+ bFrame = false;
if ( pNewInner )
{
@@ -1126,7 +1126,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
|| pNewInner->IsValid(VALID_VERT) );
}
else
- bFrame = FALSE;
+ bFrame = false;
if (!bFrame)
ApplySelectionPattern( aNewAttrs, bRecord ); // nur normale
@@ -1135,8 +1135,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
// wenn neue Items Default-Items sind, so muessen die
// alten Items geputtet werden:
- BOOL bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() );
- BOOL bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() );
+ sal_Bool bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() );
+ sal_Bool bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() );
ApplyPatternLines( aNewAttrs,
bDefNewOuter ? pOldOuter : pNewOuter,
@@ -1156,7 +1156,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1181,17 +1181,17 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
// Pattern und Rahmen
void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter,
- const SvxBoxInfoItem* pNewInner, BOOL bRecord )
+ const SvxBoxInfoItem* pNewInner, sal_Bool bRecord )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData aFuncMark( GetViewData()->GetMarkData() ); // local copy for UnmarkFiltered
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScRange aMarkRange;
aFuncMark.MarkToSimple();
- BOOL bMulti = aFuncMark.IsMultiMarked();
+ sal_Bool bMulti = aFuncMark.IsMultiMarked();
if (bMulti)
aFuncMark.GetMultiMarkArea( aMarkRange );
else if (aFuncMark.IsMarked())
@@ -1233,7 +1233,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
pUndoDoc, bMulti, &rAttr, pNewOuter, pNewInner ) );
}
- USHORT nExt = SC_PF_TESTMERGE;
+ sal_uInt16 nExt = SC_PF_TESTMERGE;
pDocSh->UpdatePaintExt( nExt, aMarkRange ); // content before the change
pDoc->ApplySelectionFrame( aFuncMark, pNewOuter, pNewInner );
@@ -1254,7 +1254,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
// nur Pattern
void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
- BOOL bRecord, BOOL bCursorOnly )
+ sal_Bool bRecord, sal_Bool bCursorOnly )
{
ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell();
@@ -1263,18 +1263,18 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
// State from old ItemSet doesn't matter for paint flags, as any change will be
// from SFX_ITEM_SET in the new ItemSet (default is ignored in ApplyPattern).
// New alignment is checked (check in PostPaint isn't enough) in case a right
// alignment is changed to left.
const SfxItemSet& rNewSet = rAttr.GetItemSet();
- BOOL bSetLines = rNewSet.GetItemState( ATTR_BORDER, TRUE ) == SFX_ITEM_SET ||
- rNewSet.GetItemState( ATTR_SHADOW, TRUE ) == SFX_ITEM_SET;
- BOOL bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) == SFX_ITEM_SET;
+ sal_Bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET ||
+ rNewSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET;
+ sal_Bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) == SFX_ITEM_SET;
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if ( bSetLines )
nExtFlags |= SC_PF_LINES;
if ( bSetAlign )
@@ -1282,9 +1282,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
ScDocShellModificator aModificator( *pDocSh );
- BOOL bMulti = aFuncMark.IsMultiMarked();
+ sal_Bool bMulti = aFuncMark.IsMultiMarked();
aFuncMark.MarkToMulti();
- BOOL bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1);
+ sal_Bool bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1);
if (bOnlyTab)
{
SCCOL nCol = pViewData->GetCurX();
@@ -1400,10 +1400,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
sal_Int32 nCount = 0;
const SfxItemPropertyMap* pMap = ScCellObj::GetCellPropertyMap();
PropertyEntryVector_t aPropVector = pMap->getPropertyEntries();
- for ( USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
+ for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
{
const SfxPoolItem* pItem = 0;
- if ( rNewSet.GetItemState( nWhich, TRUE, &pItem ) == SFX_ITEM_SET && pItem )
+ if ( rNewSet.GetItemState( nWhich, sal_True, &pItem ) == SFX_ITEM_SET && pItem )
{
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
while ( aIt != aPropVector.end())
@@ -1431,7 +1431,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet )
{
// ItemSet from UI, may have different pool
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1440,7 +1440,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet )
ScPatternAttr aNewAttrs( GetViewData()->GetDocument()->GetPool() );
SfxItemSet& rNewSet = aNewAttrs.GetItemSet();
- rNewSet.Put( rItemSet, FALSE );
+ rNewSet.Put( rItemSet, false );
ApplySelectionPattern( aNewAttrs );
AdjustBlockHeight();
@@ -1466,10 +1466,10 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked()
return pSheet;
}
-void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord )
+void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRecord )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -1486,7 +1486,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
SCTAB nTabCount = pDoc->GetTableCount();
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
@@ -1508,7 +1508,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pUndoDoc, &aFuncMark );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, &aFuncMark );
aFuncMark.MarkToMulti();
String aName = pStyleSheet->GetName();
@@ -1538,7 +1538,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
pUndoDoc->AddUndoTab( i, i );
ScRange aCopyRange( nCol, nRow, 0, nCol, nRow, nTabCount-1 );
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc );
ScRange aMarkRange ( nCol, nRow, nTab );
ScMarkData aUndoMark = aFuncMark;
@@ -1564,7 +1564,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
}
-void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
+void ScViewFunc::RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
{
if ( !pStyleSheet) return;
// -------------------------------------------------------------------
@@ -1577,7 +1577,7 @@ void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
VirtualDevice aVirtDev;
aVirtDev.SetMapMode(MAP_PIXEL);
- pDoc->StyleSheetChanged( pStyleSheet, TRUE, &aVirtDev,
+ pDoc->StyleSheetChanged( pStyleSheet, sal_True, &aVirtDev,
pViewData->GetPPTX(),
pViewData->GetPPTY(),
pViewData->GetZoomX(),
@@ -1591,7 +1591,7 @@ void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
pHdl->ForgetLastPattern();
}
-void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
+void ScViewFunc::UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
{
if ( !pStyleSheet) return;
// -------------------------------------------------------------------
@@ -1604,7 +1604,7 @@ void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
VirtualDevice aVirtDev;
aVirtDev.SetMapMode(MAP_PIXEL);
- pDoc->StyleSheetChanged( pStyleSheet, FALSE, &aVirtDev,
+ pDoc->StyleSheetChanged( pStyleSheet, false, &aVirtDev,
pViewData->GetPPTX(),
pViewData->GetPPTY(),
pViewData->GetZoomX(),
@@ -1620,14 +1620,14 @@ void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
// Zellen einfuegen - Undo OK
-BOOL ScViewFunc::InsertCells( InsCellCmd eCmd, BOOL bRecord, BOOL bPartOfPaste )
+sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bPartOfPaste )
{
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, FALSE, bPartOfPaste );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, false, bPartOfPaste );
if (bSuccess)
{
pDocSh->UpdateOle(GetViewData());
@@ -1653,13 +1653,13 @@ BOOL ScViewFunc::InsertCells( InsCellCmd eCmd, BOOL bRecord, BOOL bPartOfPaste )
else
{
ErrorMessage(STR_NOMULTISELECT);
- return FALSE;
+ return false;
}
}
// Zellen loeschen - Undo OK
-void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
+void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
{
ScRange aRange;
if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
@@ -1682,13 +1682,13 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
}
while ( nCount > 0 )
{
- pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, bRecord, FALSE );
+ pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, bRecord, false );
--nCount;
}
}
else
{
- pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, FALSE );
+ pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, false );
}
pDocSh->UpdateOle(GetViewData());
@@ -1721,9 +1721,9 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
else
{
if (eCmd == DEL_DELCOLS)
- DeleteMulti( FALSE, bRecord );
+ DeleteMulti( false, bRecord );
else if (eCmd == DEL_DELROWS)
- DeleteMulti( TRUE, bRecord );
+ DeleteMulti( sal_True, bRecord );
else
ErrorMessage(STR_NOMULTISELECT);
}
@@ -1731,7 +1731,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord )
Unmark();
}
-void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
+void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocShellModificator aModificator( *pDocSh );
@@ -1741,7 +1741,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
SCCOLROW* pRanges = new SCCOLROW[MAXCOLROWCOUNT];
SCCOLROW nRangeCnt = bRows ? aFuncMark.GetMarkRowRanges( pRanges ) :
aFuncMark.GetMarkColumnRanges( pRanges );
@@ -1754,8 +1754,8 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
// Test ob erlaubt
SCCOLROW* pOneRange = pRanges;
- USHORT nErrorId = 0;
- BOOL bNeedRefresh = FALSE;
+ sal_uInt16 nErrorId = 0;
+ sal_Bool bNeedRefresh = false;
SCCOLROW nRangeNo;
for (nRangeNo=0; nRangeNo<nRangeCnt && !nErrorId; nRangeNo++)
{
@@ -1807,7 +1807,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
{
// detect if the start of a merged cell is deleted, so the merge flags can be refreshed
- bNeedRefresh = TRUE;
+ bNeedRefresh = sal_True;
}
}
@@ -1835,17 +1835,17 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
SCCOLROW nStart = *(pOneRange++);
SCCOLROW nEnd = *(pOneRange++);
if (bRows)
- pDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pUndoDoc );
+ pDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false,pUndoDoc );
else
pDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
static_cast<SCCOL>(nEnd),MAXROW,nTab,
- IDF_ALL,FALSE,pUndoDoc );
+ IDF_ALL,false,pUndoDoc );
}
// alle Formeln wegen Referenzen
SCTAB nTabCount = pDoc->GetTableCount();
- pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,FALSE,pUndoDoc );
+ pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,false,pUndoDoc );
pUndoData = new ScRefUndoData( pDoc );
@@ -1873,7 +1873,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
SCROW nEndRow = MAXROW;
pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True );
}
if (bRecord)
@@ -1911,15 +1911,15 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
// Inhalte loeschen
-void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
+void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
{
ScViewData* pViewData = GetViewData();
pViewData->SetPasteMode( SC_PASTE_NONE );
pViewData->GetViewShell()->UpdateCopySourceOverlay();
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
- BOOL bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix );
+ sal_Bool bOnlyNotBecauseOfMatrix;
+ sal_Bool bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix );
if ( !bEditable )
{
if ( !(bOnlyNotBecauseOfMatrix &&
@@ -1931,7 +1931,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
}
ScRange aMarkRange;
- BOOL bSimple = FALSE;
+ sal_Bool bSimple = false;
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1939,7 +1939,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
@@ -1954,16 +1954,16 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
aFuncMark.SetMarkArea( aMarkRange );
}
else
- bSimple = TRUE;
+ bSimple = sal_True;
}
- aFuncMark.SetMarking(FALSE); // for MarkToMulti
+ aFuncMark.SetMarking(false); // for MarkToMulti
aFuncMark.MarkToSimple(); // before bMulti test below
DBG_ASSERT( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" );
ScDocument* pUndoDoc = NULL;
- BOOL bMulti = !bSimple && aFuncMark.IsMultiMarked();
+ sal_Bool bMulti = !bSimple && aFuncMark.IsMultiMarked();
if (!bSimple)
{
aFuncMark.MarkToMulti();
@@ -1972,22 +1972,22 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
ScRange aExtendedRange(aMarkRange);
if (!bSimple)
{
- if ( pDoc->ExtendMerge( aExtendedRange, TRUE ) )
- bMulti = FALSE;
+ if ( pDoc->ExtendMerge( aExtendedRange, sal_True ) )
+ bMulti = false;
}
// keine Objekte auf geschuetzten Tabellen
- BOOL bObjects = FALSE;
+ sal_Bool bObjects = false;
if ( nFlags & IDF_OBJECTS )
{
- bObjects = TRUE;
+ bObjects = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
if (aFuncMark.GetTableSelect(nTab) && pDoc->IsTabProtected(nTab))
- bObjects = FALSE;
+ bObjects = false;
}
- USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted
+ sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted
if ( nFlags & IDF_ATTRIB )
pDocSh->UpdatePaintExt( nExtFlags, aMarkRange );
@@ -1998,7 +1998,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
// 4) Inhalte loeschen
// 5) Undo-Aktion anlegen
- BOOL bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes
+ sal_Bool bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes
if ( bDrawUndo && bRecord )
pDoc->BeginDrawUndo();
@@ -2027,7 +2027,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
// bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
// nur mit IDF_HARDATTR zu langsam ist:
- USHORT nUndoDocFlags = nFlags;
+ sal_uInt16 nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
@@ -2072,7 +2072,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
}
else
{
- aFuncMark.FillRangeListWithMarks( &aChangeRanges, FALSE );
+ aFuncMark.FillRangeListWithMarks( &aChangeRanges, false );
}
pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aChangeRanges );
}
@@ -2092,9 +2092,9 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
// Spaltenbreiten/Zeilenhoehen (ueber Header) - Undo OK
-void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
- ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bPaint, ScMarkData* pMarkData )
+void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bPaint, ScMarkData* pMarkData )
{
if (nRangeCnt == 0)
return;
@@ -2110,17 +2110,17 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
SCTAB nCurTab = GetViewData()->GetTabNo();
SCTAB nTab;
if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
+ bRecord = false;
ScDocShellModificator aModificator( *pDocSh );
- BOOL bAllowed = TRUE;
+ sal_Bool bAllowed = sal_True;
for (nTab=0; nTab<nTabCount && bAllowed; nTab++)
if (pMarkData->GetTableSelect(nTab))
{
for ( SCCOLROW i=0; i<nRangeCnt && bAllowed; i++ )
{
- BOOL bOnlyMatrix;
+ sal_Bool bOnlyMatrix;
if (bWidth)
bAllowed = pDoc->IsBlockEditable( nTab,
static_cast<SCCOL>(pRanges[2*i]),0,
@@ -2144,7 +2144,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
SCCOLROW nStart = pRanges[0];
SCCOLROW nEnd = pRanges[2*nRangeCnt-1];
- BOOL bFormula = FALSE;
+ sal_Bool bFormula = false;
if ( eMode == SC_SIZE_OPTIMAL )
{
const ScViewOptions& rOpts = GetViewData()->GetOptions();
@@ -2166,20 +2166,20 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
if (bWidth)
{
if ( nTab == nFirstTab )
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false );
else
- pUndoDoc->AddUndoTab( nTab, nTab, TRUE, FALSE );
+ pUndoDoc->AddUndoTab( nTab, nTab, sal_True, false );
pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE,
- FALSE, pUndoDoc );
+ false, pUndoDoc );
}
else
{
if ( nTab == nFirstTab )
- pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True );
else
- pUndoDoc->AddUndoTab( nTab, nTab, FALSE, TRUE );
- pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc );
+ pUndoDoc->AddUndoTab( nTab, nTab, false, sal_True );
+ pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
}
}
@@ -2195,8 +2195,8 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
pMarkData->MarkToMulti();
- BOOL bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
- BOOL bOutline = FALSE;
+ sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
+ sal_Bool bOutline = false;
for (nTab=0; nTab<nTabCount; nTab++)
if (pMarkData->GetTableSelect(nTab))
@@ -2213,7 +2213,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
{
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
{
- BOOL bAll = ( eMode==SC_SIZE_OPTIMAL );
+ sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL );
if (!bAll)
{
// fuer alle eingeblendeten CR_MANUALSIZE loeschen,
@@ -2227,7 +2227,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
continue;
}
- BYTE nOld = pDoc->GetRowFlags(nRow, nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow, nTab);
if (nOld & CR_MANUALSIZE)
pDoc->SetRowFlags(nRow, nTab, nOld & ~CR_MANUALSIZE);
}
@@ -2249,9 +2249,9 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(),
nPPTX, nPPTY, aZoomX, aZoomY, bAll );
if (bAll)
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
- // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt
+ // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt
// (an bei Extra-Height, sonst aus).
}
else if ( eMode==SC_SIZE_DIRECT )
@@ -2259,13 +2259,13 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
if (nSizeTwips)
{
pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips );
- pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually
+ pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually
}
pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 );
}
else if ( eMode==SC_SIZE_SHOW )
{
- pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
+ pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True );
}
}
else // Spaltenbreiten
@@ -2274,7 +2274,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
{
if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) )
{
- USHORT nThisSize = nSizeTwips;
+ sal_uInt16 nThisSize = nSizeTwips;
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
nThisSize = nSizeTwips + GetOptimalColWidth( nCol, nTab, bFormula );
@@ -2292,12 +2292,12 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
{
if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo),
static_cast<SCCOL>(nEndNo), nTab, bShow ) )
- bOutline = TRUE;
+ bOutline = sal_True;
}
else
{
if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) )
- bOutline = TRUE;
+ bOutline = sal_True;
}
}
pDoc->SetDrawPageSize(nTab);
@@ -2387,8 +2387,8 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
// Spaltenbreiten/Zeilenhoehen (ueber Blockmarken)
-void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips,
- BOOL bRecord, BOOL bPaint )
+void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
+ sal_Bool bRecord, sal_Bool bPaint )
{
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -2400,7 +2400,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT n
SCTAB nTab = GetViewData()->GetTabNo();
DoneBlockMode();
InitOwnBlockMode();
- rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), TRUE );
+ rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), sal_True );
MarkDataChanged();
}
@@ -2418,22 +2418,22 @@ void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT n
rMark.MarkToSimple();
}
-void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
+void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal )
{
//! Schrittweiten einstellbar
// Schrittweite ist auch Minimum
- USHORT nStepX = STD_COL_WIDTH / 5;
- USHORT nStepY = ScGlobal::nStdRowHeight;
+ sal_uInt16 nStepX = STD_COL_WIDTH / 5;
+ sal_uInt16 nStepY = ScGlobal::nStdRowHeight;
ScModule* pScMod = SC_MOD();
- BOOL bAnyEdit = pScMod->IsInputMode();
+ sal_Bool bAnyEdit = pScMod->IsInputMode();
SCCOL nCol = GetViewData()->GetCurX();
SCROW nRow = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- BOOL bAllowed, bOnlyMatrix;
+ sal_Bool bAllowed, bOnlyMatrix;
if ( eDir == DIR_LEFT || eDir == DIR_RIGHT )
bAllowed = pDoc->IsBlockEditable( nTab, nCol,0, nCol,MAXROW, &bOnlyMatrix );
else
@@ -2446,8 +2446,8 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
HideAllCursors();
- USHORT nWidth = pDoc->GetColWidth( nCol, nTab );
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTab );
+ sal_uInt16 nWidth = pDoc->GetColWidth( nCol, nTab );
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTab );
SCCOLROW nRange[2];
if ( eDir == DIR_LEFT || eDir == DIR_RIGHT )
{
@@ -2464,13 +2464,13 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
const SvxMarginItem& rMItem =
(const SvxMarginItem&)pPattern->GetItem(ATTR_MARGIN);
- USHORT nMargin = rMItem.GetLeftMargin() + rMItem.GetRightMargin();
+ sal_uInt16 nMargin = rMItem.GetLeftMargin() + rMItem.GetRightMargin();
if ( ((const SvxHorJustifyItem&) pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_LEFT )
- nMargin = sal::static_int_cast<USHORT>(
+ nMargin = sal::static_int_cast<sal_uInt16>(
nMargin + ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue() );
- nWidth = (USHORT)(nEdit * pDocSh->GetOutputFactor() / HMM_PER_TWIPS)
+ nWidth = (sal_uInt16)(nEdit * pDocSh->GetOutputFactor() / HMM_PER_TWIPS)
+ nMargin + STD_EXTRA_WIDTH;
}
}
@@ -2490,8 +2490,8 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
}
long nPixel = pDoc->GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(),
- nPPTX, nPPTY, aZoomX, aZoomY, TRUE );
- USHORT nTwips = (USHORT)( nPixel / nPPTX );
+ nPPTX, nPPTY, aZoomX, aZoomY, sal_True );
+ sal_uInt16 nTwips = (sal_uInt16)( nPixel / nPPTX );
if (nTwips != 0)
nWidth = nTwips + STD_EXTRA_WIDTH;
else
@@ -2501,21 +2501,21 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
else // vergroessern / verkleinern
{
if ( eDir == DIR_RIGHT )
- nWidth = sal::static_int_cast<USHORT>( nWidth + nStepX );
+ nWidth = sal::static_int_cast<sal_uInt16>( nWidth + nStepX );
else if ( nWidth > nStepX )
- nWidth = sal::static_int_cast<USHORT>( nWidth - nStepX );
+ nWidth = sal::static_int_cast<sal_uInt16>( nWidth - nStepX );
if ( nWidth < nStepX ) nWidth = nStepX;
if ( nWidth > MAX_COL_WIDTH ) nWidth = MAX_COL_WIDTH;
}
nRange[0] = nRange[1] = nCol;
- SetWidthOrHeight( TRUE, 1, nRange, SC_SIZE_DIRECT, nWidth );
+ SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, nWidth );
// hier bei Breite auch Hoehe anpassen (nur die eine Zeile)
if (!bAnyEdit)
{
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
- BOOL bNeedHeight =
+ sal_Bool bNeedHeight =
((const SfxBoolItem&)pPattern->GetItem( ATTR_LINEBREAK )).GetValue() ||
((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK;
@@ -2535,15 +2535,15 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal )
{
eMode = SC_SIZE_DIRECT;
if ( eDir == DIR_BOTTOM )
- nHeight = sal::static_int_cast<USHORT>( nHeight + nStepY );
+ nHeight = sal::static_int_cast<sal_uInt16>( nHeight + nStepY );
else if ( nHeight > nStepY )
- nHeight = sal::static_int_cast<USHORT>( nHeight - nStepY );
+ nHeight = sal::static_int_cast<sal_uInt16>( nHeight - nStepY );
if ( nHeight < nStepY ) nHeight = nStepY;
if ( nHeight > MAX_COL_HEIGHT ) nHeight = MAX_COL_HEIGHT;
//! MAX_COL_HEIGHT umbenennen in MAX_ROW_HEIGHT in global.hxx !!!!!!
}
nRange[0] = nRange[1] = nRow;
- SetWidthOrHeight( FALSE, 1, nRange, eMode, nHeight );
+ SetWidthOrHeight( false, 1, nRange, eMode, nHeight );
}
if ( bAnyEdit )
@@ -2596,10 +2596,10 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScDocFunc aFunc(*pDocSh);
- BOOL bUndo(pDoc->IsUndoEnabled());
+ sal_Bool bUndo(pDoc->IsUndoEnabled());
if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
- aFunc.Protect( nTab, rPassword, FALSE );
+ aFunc.Protect( nTab, rPassword, false );
else
{
// modifying several tables is handled here
@@ -2613,7 +2613,7 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
SCTAB nCount = pDocSh->GetDocument()->GetTableCount();
for ( SCTAB i=0; i<nCount; i++ )
if ( rMark.GetTableSelect(i) )
- aFunc.Protect( i, rPassword, FALSE );
+ aFunc.Protect( i, rPassword, false );
if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction();
@@ -2622,17 +2622,17 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
UpdateLayerLocks(); //! broadcast to all views
}
-BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
+sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
{
ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
ScDocFunc aFunc(*pDocSh);
- BOOL bChanged = FALSE;
- BOOL bUndo (pDoc->IsUndoEnabled());
+ sal_Bool bChanged = false;
+ sal_Bool bUndo (pDoc->IsUndoEnabled());
if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
- bChanged = aFunc.Unprotect( nTab, rPassword, FALSE );
+ bChanged = aFunc.Unprotect( nTab, rPassword, false );
else
{
// modifying several tables is handled here
@@ -2646,8 +2646,8 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
SCTAB nCount = pDocSh->GetDocument()->GetTableCount();
for ( SCTAB i=0; i<nCount; i++ )
if ( rMark.GetTableSelect(i) )
- if ( aFunc.Unprotect( i, rPassword, FALSE ) )
- bChanged = TRUE;
+ if ( aFunc.Unprotect( i, rPassword, false ) )
+ bChanged = sal_True;
if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction();
@@ -2661,18 +2661,18 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
void ScViewFunc::SetNoteText( const ScAddress& rPos, const String& rNoteText )
{
- GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, FALSE );
+ GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, false );
}
void ScViewFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate )
{
- GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, FALSE );
+ GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, false );
}
-void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd )
+void ScViewFunc::SetNumberFormat( short nFormatType, sal_uLong nAdd )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2702,13 +2702,13 @@ void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd )
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
// ATTR_LANGUAGE_FORMAT nicht
- ApplySelectionPattern( aNewAttrs, TRUE );
+ ApplySelectionPattern( aNewAttrs, sal_True );
}
void ScViewFunc::SetNumFmtByStr( const String& rCode )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2729,7 +2729,7 @@ void ScViewFunc::SetNumFmtByStr( const String& rCode )
// Index fuer String bestimmen
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
sal_uInt32 nNumberFormat = pFormatter->GetEntryKey( rCode, eLanguage );
if ( nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
@@ -2747,16 +2747,16 @@ void ScViewFunc::SetNumFmtByStr( const String& rCode )
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
rSet.Put( SvxLanguageItem( eLanguage, ATTR_LANGUAGE_FORMAT ) );
- ApplySelectionPattern( aNewAttrs, TRUE );
+ ApplySelectionPattern( aNewAttrs, sal_True );
}
//! sonst Fehler zuerueckgeben / Meldung ausgeben ???
}
-void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
+void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
{
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
- BOOL bOnlyNotBecauseOfMatrix;
+ sal_Bool bOnlyNotBecauseOfMatrix;
if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
{
ErrorMessage(STR_PROTECTIONERR);
@@ -2782,11 +2782,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
// was haben wir denn da?
sal_uInt32 nNewFormat = nOldFormat;
- BOOL bError = FALSE;
+ sal_Bool bError = false;
LanguageType eLanguage = pOldEntry->GetLanguage();
- BOOL bThousand, bNegRed;
- USHORT nPrecision, nLeading;
+ sal_Bool bThousand, bNegRed;
+ sal_uInt16 nPrecision, nLeading;
pOldEntry->GetFormatSpecialInfo( bThousand, bNegRed, nPrecision, nLeading );
short nOldType = pOldEntry->GetType();
@@ -2795,11 +2795,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
{
// Datum, Zeit, Bruch, logisch, Text kann nicht angepasst werden
//! bei Wisssenschaftlich kann es der Numberformatter auch nicht
- bError = TRUE;
+ bError = sal_True;
}
//! Das SvNumberformat hat einen Member bStandard, verraet ihn aber nicht
- BOOL bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) );
+ sal_Bool bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) );
if (bWasStandard)
{
// bei "Standard" die Nachkommastellen abhaengig vom Zellinhalt
@@ -2814,7 +2814,7 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
nPrecision = 0;
// 'E' fuer Exponential ist fest im Numberformatter
if ( aOut.Search('E') != STRING_NOTFOUND )
- bError = TRUE; // Exponential nicht veraendern
+ bError = sal_True; // Exponential nicht veraendern
else
{
String aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) );
@@ -2832,14 +2832,14 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
if (nPrecision<20)
++nPrecision; // erhoehen
else
- bError = TRUE; // 20 ist Maximum
+ bError = sal_True; // 20 ist Maximum
}
else
{
if (nPrecision)
--nPrecision; // vermindern
else
- bError = TRUE; // weniger als 0 geht nicht
+ bError = sal_True; // weniger als 0 geht nicht
}
}
@@ -2854,11 +2854,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
{
xub_StrLen nErrPos = 0;
short nNewType = 0;
- BOOL bOk = pFormatter->PutEntry( aNewPicture, nErrPos,
+ sal_Bool bOk = pFormatter->PutEntry( aNewPicture, nErrPos,
nNewType, nNewFormat, eLanguage );
DBG_ASSERT( bOk, "falsches Zahlformat generiert" );
if (!bOk)
- bError = TRUE;
+ bError = sal_True;
}
}
@@ -2868,13 +2868,13 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement )
SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
// ATTR_LANGUAGE_FORMAT nicht
- ApplySelectionPattern( aNewAttrs, TRUE );
+ ApplySelectionPattern( aNewAttrs, sal_True );
}
else
Sound::Beep(); // war nix
}
-void ScViewFunc::ChangeIndent( BOOL bIncrement )
+void ScViewFunc::ChangeIndent( sal_Bool bIncrement )
{
ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell();
@@ -2891,7 +2891,7 @@ void ScViewFunc::ChangeIndent( BOOL bIncrement )
aWorkMark.SetMultiMarkArea( ScRange(nCol,nRow,nTab) );
}
- BOOL bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, FALSE );
+ sal_Bool bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, false );
if (bSuccess)
{
pDocSh->UpdateOle(pViewData);
@@ -2899,13 +2899,13 @@ void ScViewFunc::ChangeIndent( BOOL bIncrement )
}
}
-BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
+sal_Bool ScViewFunc::InsertName( const String& rName, const String& rSymbol,
const String& rType )
{
// Type = P,R,C,F (und Kombinationen)
//! Undo...
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -2931,7 +2931,7 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
{
ScDocShellModificator aModificator( *pDocSh );
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
// Eintrag bereits vorhanden? Dann vorher entfernen (=Aendern)
ScRangeData* pData = pList->findByName(rName);
@@ -2944,10 +2944,10 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
if ( pList->insert( pNewEntry ) )
{
pNewEntry = NULL; // nicht loeschen
- bOk = TRUE;
+ bOk = sal_True;
}
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
}
@@ -2956,20 +2956,20 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol,
return bOk;
}
-void ScViewFunc::CreateNames( USHORT nFlags )
+void ScViewFunc::CreateNames( sal_uInt16 nFlags )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
ScRange aRange;
if ( GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE )
- bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, FALSE );
+ bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, false );
if (!bDone)
ErrorMessage(STR_CREATENAME_MARKERR);
}
-USHORT ScViewFunc::GetCreateNameFlags()
+sal_uInt16 ScViewFunc::GetCreateNameFlags()
{
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
@@ -2978,44 +2978,44 @@ USHORT ScViewFunc::GetCreateNameFlags()
{
ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
- BOOL bOk;
+ sal_Bool bOk;
SCCOL i;
SCROW j;
- bOk = TRUE;
+ bOk = sal_True;
SCCOL nFirstCol = nStartCol;
SCCOL nLastCol = nEndCol;
if (nStartCol+1 < nEndCol) { ++nFirstCol; --nLastCol; }
for (i=nFirstCol; i<=nLastCol && bOk; i++)
if (!pDoc->HasStringData( i,nStartRow,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_TOP;
else // Bottom nur wenn nicht Top
{
- bOk = TRUE;
+ bOk = sal_True;
for (i=nFirstCol; i<=nLastCol && bOk; i++)
if (!pDoc->HasStringData( i,nEndRow,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_BOTTOM;
}
- bOk = TRUE;
+ bOk = sal_True;
SCROW nFirstRow = nStartRow;
SCROW nLastRow = nEndRow;
if (nStartRow+1 < nEndRow) { ++nFirstRow; --nLastRow; }
for (j=nFirstRow; j<=nLastRow && bOk; j++)
if (!pDoc->HasStringData( nStartCol,j,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_LEFT;
else // Right nur wenn nicht Left
{
- bOk = TRUE;
+ bOk = sal_True;
for (j=nFirstRow; j<=nLastRow && bOk; j++)
if (!pDoc->HasStringData( nEndCol,j,nTab ))
- bOk = FALSE;
+ bOk = false;
if (bOk)
nFlags |= NAME_RIGHT;
}
@@ -3033,7 +3033,7 @@ void ScViewFunc::InsertNameList()
{
ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- if ( pDocSh->GetDocFunc().InsertNameList( aPos, FALSE ) )
+ if ( pDocSh->GetDocFunc().InsertNameList( aPos, false ) )
pDocSh->UpdateOle(GetViewData());
}
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 953270ce1803..c89d9dac1455 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -65,7 +65,7 @@
//==================================================================
void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
- USHORT nWhichId, USHORT nScript )
+ sal_uInt16 nWhichId, sal_uInt16 nScript )
{
// take the effective item from rCoreSet according to nScript
// and put in rShellSet under the (base) nWhichId
@@ -82,12 +82,12 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe
rShellSet.InvalidateItem( nWhichId );
}
-USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
+sal_uInt16 ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
{
// used for thesaurus
- BYTE nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() );
- USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
+ sal_uInt8 nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() );
+ sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? ATTR_CTL_FONT_LANGUAGE : ATTR_FONT_LANGUAGE );
const SfxPoolItem* pItem = pDoc->GetAttr( rPos.Col(), rPos.Row(), rPos.Tab(), nWhich);
SvxLanguageItem* pLangIt = PTR_CAST( SvxLanguageItem, pItem );
@@ -111,7 +111,7 @@ USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos )
return eLnge;
}
-sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID )
+sal_Int32 ScViewUtil::GetTransliterationType( sal_uInt16 nSlotID )
{
sal_Int32 nType = 0;
switch ( nSlotID )
@@ -147,7 +147,7 @@ sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID )
return nType;
}
-BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
+sal_Bool ScViewUtil::IsActionShown( const ScChangeAction& rAction,
const ScChangeViewSettings& rSettings,
ScDocument& rDocument )
{
@@ -155,10 +155,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
// die Reihenfolge von ShowRejected/ShowAccepted ist deswegen wichtig
if ( !rSettings.IsShowRejected() && rAction.IsRejecting() )
- return FALSE;
+ return false;
if ( !rSettings.IsShowAccepted() && rAction.IsAccepted() && !rAction.IsRejecting() )
- return FALSE;
+ return false;
if ( rSettings.HasAuthor() )
{
@@ -167,10 +167,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
// GetUser() am ChangeTrack ist der aktuelle Benutzer
ScChangeTrack* pTrack = rDocument.GetChangeTrack();
if ( !pTrack || rAction.GetUser() == pTrack->GetUser() )
- return FALSE;
+ return false;
}
else if ( rAction.GetUser() != rSettings.GetTheAuthorToShow() )
- return FALSE;
+ return false;
}
if ( rSettings.HasComment() )
@@ -181,12 +181,12 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
aComStr+=')';
if(!rSettings.IsValidComment(&aComStr))
- return FALSE;
+ return false;
}
if ( rSettings.HasRange() )
if ( !rSettings.GetTheRangeList().Intersects( rAction.GetBigRange().MakeRange() ) )
- return FALSE;
+ return false;
if ( rSettings.HasDate() && rSettings.GetTheDateMode() != SCDM_NO_DATEMODE )
{
@@ -197,23 +197,23 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
{ // korrespondiert mit ScHighlightChgDlg::OKBtnHdl
case SCDM_DATE_BEFORE:
if ( aDateTime > rFirst )
- return FALSE;
+ return false;
break;
case SCDM_DATE_SINCE:
if ( aDateTime < rFirst )
- return FALSE;
+ return false;
break;
case SCDM_DATE_EQUAL:
case SCDM_DATE_BETWEEN:
if ( aDateTime < rFirst || aDateTime > rLast )
- return FALSE;
+ return false;
break;
case SCDM_DATE_NOTEQUAL:
if ( aDateTime >= rFirst && aDateTime <= rLast )
- return FALSE;
+ return false;
break;
case SCDM_DATE_SAVE:
@@ -221,7 +221,7 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
ScChangeTrack* pTrack = rDocument.GetChangeTrack();
if ( !pTrack || pTrack->GetLastSavedActionNumber() >=
rAction.GetActionNumber() )
- return FALSE;
+ return false;
}
break;
@@ -234,17 +234,17 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction,
if ( rSettings.HasActionRange() )
{
- ULONG nAction = rAction.GetActionNumber();
- ULONG nFirstAction;
- ULONG nLastAction;
+ sal_uLong nAction = rAction.GetActionNumber();
+ sal_uLong nFirstAction;
+ sal_uLong nLastAction;
rSettings.GetTheActionRange( nFirstAction, nLastAction );
if ( nAction < nFirstAction || nAction > nLastAction )
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return sal_True;
}
void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc )
@@ -312,7 +312,7 @@ bool ScViewUtil::HasFiltered( const ScRange& rRange, ScDocument* pDoc )
return false;
}
-void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId )
+void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId )
{
SvtCJKOptions aCJKOptions;
SvtCTLOptions aCTLOptions;
@@ -351,28 +351,28 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USH
//==================================================================
-BOOL ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
+sal_Bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
SfxViewFrame& rFrame,
SvxFontItem& rNewFont,
String& rString )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
- aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if ( pDlg->Execute() == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, false );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, false );
if ( pItem )
rString = pItem->GetValue();
if ( pFontItem )
rNewFont = SvxFontItem( pFontItem->GetFamily(), pFontItem->GetFamilyName(), pFontItem->GetStyleName(), pFontItem->GetPitch(), pFontItem->GetCharSet(), rNewFont.Which() );
- bRet = TRUE;
+ bRet = sal_True;
}
delete pDlg;
}
@@ -423,7 +423,7 @@ void ScUpdateRect::SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 )
nNewEndY = nY2;
}
-BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
+sal_Bool ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
{
if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX &&
nNewStartY == nOldStartY && nNewEndY == nOldEndY )
@@ -432,7 +432,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
rY1 = nNewStartY;
rX2 = nNewStartX;
rY2 = nNewStartY;
- return FALSE;
+ return false;
}
rX1 = Min(nNewStartX,nOldStartX);
@@ -467,7 +467,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
}
}
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */