diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-11 14:24:23 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-11 14:24:23 +0100 |
commit | 67d2af6fac2d9bad52a6b1f6e0cbd1229eb88a42 (patch) | |
tree | 898019746162b464578da9c8345158a74321c904 /svtools/source/control | |
parent | 86fb5fff88be611785b7908aac2a44475d77705f (diff) | |
parent | e2a3d487efb2bd5e582eb10e4150530c3f7377c5 (diff) |
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
Diffstat (limited to 'svtools/source/control')
33 files changed, 1631 insertions, 1793 deletions
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 758999d61dcd..9a48cf0c73a1 100644..100755 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -29,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <asynclink.hxx> +#include <svtools/asynclink.hxx> #include <osl/mutex.hxx> #include <tools/debug.hxx> #include <vcl/timer.hxx> @@ -43,11 +43,11 @@ void AsynchronLink::CreateMutex() if( !_pMutex ) _pMutex = new osl::Mutex; } -void AsynchronLink::Call( void* pObj, BOOL +void AsynchronLink::Call( void* pObj, sal_Bool #ifdef DBG_UTIL bAllowDoubles #endif -, BOOL bUseTimer ) +, sal_Bool bUseTimer ) { #ifdef DBG_UTIL if ( bUseTimer || !_bInCall ) @@ -93,7 +93,7 @@ AsynchronLink::~AsynchronLink() Application::RemoveUserEvent( _nEventId ); } delete _pTimer; - if( _pDeleted ) *_pDeleted = TRUE; + if( _pDeleted ) *_pDeleted = sal_True; delete _pMutex; } @@ -126,13 +126,13 @@ void AsynchronLink::ClearPendingCall() void AsynchronLink::Call_Impl( void* pArg ) { - _bInCall = TRUE; - BOOL bDeleted = FALSE; + _bInCall = sal_True; + sal_Bool bDeleted = sal_False; _pDeleted = &bDeleted; _aLink.Call( pArg ); if( !bDeleted ) { - _bInCall = FALSE; + _bInCall = sal_False; _pDeleted = 0; } } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 0fba66e132a8..4a0bc4112264 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -46,7 +46,7 @@ #define _SV_CALENDAR_CXX #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include <calendar.hxx> +#include <svtools/calendar.hxx> // ======================================================================= @@ -63,12 +63,12 @@ #define WEEKNUMBER_HEIGHT 85 -#define CALENDAR_HITTEST_DAY ((USHORT)0x0001) -#define CALENDAR_HITTEST_WEEK ((USHORT)0x0002) -#define CALENDAR_HITTEST_MONTHTITLE ((USHORT)0x0004) -#define CALENDAR_HITTEST_PREV ((USHORT)0x0008) -#define CALENDAR_HITTEST_NEXT ((USHORT)0x0010) -#define CALENDAR_HITTEST_OUTSIDE ((USHORT)0x1000) +#define CALENDAR_HITTEST_DAY ((sal_uInt16)0x0001) +#define CALENDAR_HITTEST_WEEK ((sal_uInt16)0x0002) +#define CALENDAR_HITTEST_MONTHTITLE ((sal_uInt16)0x0004) +#define CALENDAR_HITTEST_PREV ((sal_uInt16)0x0008) +#define CALENDAR_HITTEST_NEXT ((sal_uInt16)0x0010) +#define CALENDAR_HITTEST_OUTSIDE ((sal_uInt16)0x1000) #define MENU_YEAR_COUNT 3 @@ -83,7 +83,7 @@ struct ImplDateInfo XubString maText; Color* mpTextColor; Color* mpFrameColor; - USHORT mnFlags; + sal_uInt16 mnFlags; ImplDateInfo( const XubString& rText ) : maText( rText ) @@ -95,7 +95,7 @@ DECLARE_TABLE( ImplDateTable, ImplDateInfo* ) // ======================================================================= -static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, BOOL bSelect ) +static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, sal_Bool bSelect ) { if ( bSelect ) pTable->Insert( rDate.GetDate(), TABLE_DATE_SELECTED ); @@ -108,7 +108,7 @@ static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, BOOL bSele static void ImplCalendarSelectDateRange( Table* pTable, const Date& rStartDate, const Date& rEndDate, - BOOL bSelect ) + sal_Bool bSelect ) { Date aStartDate = rStartDate; Date aEndDate = rEndDate; @@ -209,24 +209,24 @@ void Calendar::ImplInit( WinBits nWinStyle ) mnFirstYear = 0; mnLastYear = 0; mnRequestYear = 0; - mbCalc = TRUE; - mbFormat = TRUE; - mbDrag = FALSE; - mbSelection = FALSE; - mbMultiSelection = FALSE; - mbWeekSel = FALSE; - mbUnSel = FALSE; - mbMenuDown = FALSE; - mbSpinDown = FALSE; - mbPrevIn = FALSE; - mbNextIn = FALSE; - mbDirect = FALSE; - mbInSelChange = FALSE; - mbTravelSelect = FALSE; - mbScrollDateRange = FALSE; - mbSelLeft = FALSE; - mbAllSel = FALSE; - mbDropPos = FALSE; + mbCalc = sal_True; + mbFormat = sal_True; + mbDrag = sal_False; + mbSelection = sal_False; + mbMultiSelection = sal_False; + mbWeekSel = sal_False; + mbUnSel = sal_False; + mbMenuDown = sal_False; + mbSpinDown = sal_False; + mbPrevIn = sal_False; + mbNextIn = sal_False; + mbDirect = sal_False; + mbInSelChange = sal_False; + mbTravelSelect = sal_False; + mbScrollDateRange = sal_False; + mbSelLeft = sal_False; + mbAllSel = sal_False; + mbDropPos = sal_False; ::rtl::OUString aGregorian( RTL_CONSTASCII_USTRINGPARAM( "gregorian")); maCalendarWrapper.loadCalendar( aGregorian, @@ -253,14 +253,14 @@ void Calendar::ImplInit( WinBits nWinStyle ) } SetFirstDate( maCurDate ); - ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE ); + ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True ); // Sonstige Strings erzeugen maDayText = XubString( SvtResId( STR_SVT_CALENDAR_DAY ) ); maWeekText = XubString( SvtResId( STR_SVT_CALENDAR_WEEK ) ); // Tagestexte anlegen - for ( USHORT i = 0; i < 31; i++ ) + for ( sal_uInt16 i = 0; i < 31; i++ ) mpDayText[i] = new UniString( UniString::CreateFromInt32( i+1 ) ); maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) ); @@ -339,7 +339,7 @@ Calendar::~Calendar() if ( mpRestoreSelectTable ) delete mpRestoreSelectTable; - for ( USHORT i = 0; i < 31; i++ ) + for ( sal_uInt16 i = 0; i < 31; i++ ) delete mpDayText[i]; } @@ -347,7 +347,7 @@ Calendar::~Calendar() void Calendar::SetMinimumNumberOfDaysInWeek( sal_Int16 nDays ) { - ImplUpdate( TRUE ); + ImplUpdate( sal_True ); maCalendarWrapper.setMinimumNumberOfDaysForFirstWeek( nDays); } @@ -355,7 +355,7 @@ void Calendar::SetMinimumNumberOfDaysInWeek( sal_Int16 nDays ) void Calendar::SetWeekStart( sal_Int16 nDay ) { - ImplUpdate( TRUE ); + ImplUpdate( sal_True ); switch (nDay) { case i18n::Weekdays::SUNDAY : @@ -530,23 +530,23 @@ void Calendar::ImplFormat() nDay %= 7; } - mbCalc = FALSE; + mbCalc = sal_False; } // Anzahl Tage berechnen DayOfWeek eStartDay = ImplGetWeekStart(); - USHORT nWeekDay; + sal_uInt16 nWeekDay; Date aTempDate = GetFirstMonth(); maFirstDate = aTempDate; - nWeekDay = (USHORT)aTempDate.GetDayOfWeek(); - nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7; - maFirstDate -= (ULONG)nWeekDay; + nWeekDay = (sal_uInt16)aTempDate.GetDayOfWeek(); + nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7; + maFirstDate -= (sal_uLong)nWeekDay; mnDayCount = nWeekDay; - USHORT nDaysInMonth; - USHORT nMonthCount = (USHORT)(mnMonthPerLine*mnLines); - for ( USHORT i = 0; i < nMonthCount; i++ ) + sal_uInt16 nDaysInMonth; + sal_uInt16 nMonthCount = (sal_uInt16)(mnMonthPerLine*mnLines); + for ( sal_uInt16 i = 0; i < nMonthCount; i++ ) { nDaysInMonth = aTempDate.GetDaysInMonth(); mnDayCount += nDaysInMonth; @@ -556,8 +556,8 @@ void Calendar::ImplFormat() aTempDate2--; nDaysInMonth = aTempDate2.GetDaysInMonth(); aTempDate2 -= nDaysInMonth-1; - nWeekDay = (USHORT)aTempDate2.GetDayOfWeek(); - nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7; + nWeekDay = (sal_uInt16)aTempDate2.GetDayOfWeek(); + nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7; mnDayCount += 42-nDaysInMonth-nWeekDay; // Farben festlegen @@ -575,8 +575,8 @@ void Calendar::ImplFormat() } // DateInfo besorgen - USHORT nNewFirstYear = maFirstDate.GetYear(); - USHORT nNewLastYear = GetLastDate().GetYear(); + sal_uInt16 nNewFirstYear = maFirstDate.GetYear(); + sal_uInt16 nNewLastYear = GetLastDate().GetYear(); if ( mnFirstYear ) { if ( nNewFirstYear < mnFirstYear ) @@ -601,12 +601,12 @@ void Calendar::ImplFormat() } mnRequestYear = 0; - mbFormat = FALSE; + mbFormat = sal_False; } // ----------------------------------------------------------------------- -USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const +sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const { if ( mbFormat ) return 0; @@ -620,7 +620,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const long nY; long nOffX; long nYMonth; - USHORT nDay; + sal_uInt16 nDay; DayOfWeek eStartDay = ImplGetWeekStart(); rDate = GetFirstMonth(); @@ -637,7 +637,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const if ( (rPos.X() < nX) && (rPos.Y() < nYMonth) ) return 0; - USHORT nDaysInMonth = rDate.GetDaysInMonth(); + sal_uInt16 nDaysInMonth = rDate.GetDaysInMonth(); // Entsprechender Monat gefunden if ( (rPos.X() > nX) && (rPos.Y() < nYMonth) && @@ -651,8 +651,8 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const long nDayY = nY+mnDaysOffY; if ( rPos.Y() < nDayY ) return 0; - USHORT nDayIndex = (USHORT)rDate.GetDayOfWeek(); - nDayIndex = (nDayIndex+(7-(USHORT)eStartDay)) % 7; + sal_uInt16 nDayIndex = (sal_uInt16)rDate.GetDayOfWeek(); + nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7; if ( (i == 0) && (j == 0) ) { Date aTempDate = rDate; @@ -693,9 +693,9 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const } if ( (i == mnLines-1) && (j == mnMonthPerLine-1) ) { - USHORT nWeekDay = (USHORT)rDate.GetDayOfWeek(); - nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7; - USHORT nDayCount = 42-nDaysInMonth-nWeekDay; + sal_uInt16 nWeekDay = (sal_uInt16)rDate.GetDayOfWeek(); + nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7; + sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay; Date aTempDate = rDate; aTempDate += nDaysInMonth; for ( nDay = 1; nDay <= nDayCount; nDay++ ) @@ -738,7 +738,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const // ----------------------------------------------------------------------- static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, - BOOL bPrev ) + sal_Bool bPrev ) { long i; long n; @@ -783,7 +783,7 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, // ----------------------------------------------------------------------- -void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext ) +void Calendar::ImplDrawSpin( sal_Bool bDrawPrev, sal_Bool bDrawNext ) { if ( !bDrawPrev && !bDrawNext ) return; @@ -797,7 +797,7 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext ) aOutRect.Top() += 3; aOutRect.Right() -= 3; aOutRect.Bottom() -= 3; - ImplDrawSpinArrow( this, aOutRect, TRUE ); + ImplDrawSpinArrow( this, aOutRect, sal_True ); } if ( bDrawNext ) { @@ -806,33 +806,33 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext ) aOutRect.Top() += 3; aOutRect.Right() -= 3; aOutRect.Bottom() -= 3; - ImplDrawSpinArrow( this, aOutRect, FALSE ); + ImplDrawSpinArrow( this, aOutRect, sal_False ); } } // ----------------------------------------------------------------------- void Calendar::ImplDrawDate( long nX, long nY, - USHORT nDay, USHORT nMonth, USHORT nYear, + sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, DayOfWeek eDayOfWeek, - BOOL bBack, BOOL bOther, ULONG nToday ) + sal_Bool bBack, sal_Bool bOther, sal_uLong nToday ) { ImplDateInfo* pDateInfo; Color* pTextColor = NULL; const String& rDay = *(mpDayText[nDay-1]); Rectangle aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 ); - BOOL bSel = FALSE; - BOOL bFocus = FALSE; + sal_Bool bSel = sal_False; + sal_Bool bFocus = sal_False; // Aktueller Tag if ( (nDay == maCurDate.GetDay()) && (nMonth == maCurDate.GetMonth()) && (nYear == maCurDate.GetYear()) ) - bFocus = TRUE; + bFocus = sal_True; if ( mpSelectTable ) { if ( mpSelectTable->IsKeyValid( Date( nDay, nMonth, nYear ).GetDate() ) ) - bSel = TRUE; + bSel = sal_True; } // Dateinfo ermitteln @@ -870,11 +870,11 @@ void Calendar::ImplDrawDate( long nX, long nY, // Font ermitteln Font aOldFont = GetFont(); - BOOL bBoldFont = FALSE; + sal_Bool bBoldFont = sal_False; if ( (mnWinStyle & WB_BOLDTEXT) && pDateInfo && (pDateInfo->mnFlags & DIB_BOLD) ) { - bBoldFont = TRUE; + bBoldFont = sal_True; Font aFont = aOldFont; if ( aFont.GetWeight() < WEIGHT_BOLD ) aFont.SetWeight( WEIGHT_BOLD ); @@ -966,7 +966,7 @@ void Calendar::ImplDrawDate( long nX, long nY, // ----------------------------------------------------------------------- -void Calendar::ImplDraw( BOOL bPaint ) +void Calendar::ImplDraw( sal_Bool bPaint ) { ImplFormat(); @@ -980,10 +980,10 @@ void Calendar::ImplDraw( BOOL bPaint ) long nDeltaY; long nDayX; long nDayY; - ULONG nToday = Date().GetDate(); - USHORT nDay; - USHORT nMonth; - USHORT nYear; + sal_uLong nToday = Date().GetDate(); + sal_uInt16 nDay; + sal_uInt16 nMonth; + sal_uInt16 nYear; Date aDate = GetFirstMonth(); DayOfWeek eStartDay = ImplGetWeekStart(); @@ -1120,7 +1120,7 @@ void Calendar::ImplDraw( BOOL bPaint ) nDayX -= mnWeekWidth; nDayY = nY+mnDaysOffY; maCalendarWrapper.setGregorianDateTime( aDate); - for ( USHORT nWeekCount = 0; nWeekCount < 6; nWeekCount++ ) + for ( sal_uInt16 nWeekCount = 0; nWeekCount < 6; nWeekCount++ ) { sal_Int16 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); String aWeekText( String::CreateFromInt32( nWeek)); @@ -1134,7 +1134,7 @@ void Calendar::ImplDraw( BOOL bPaint ) } // Tage ausgeben - USHORT nDaysInMonth = aDate.GetDaysInMonth(); + sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth(); nDayX = nX+mnDaysOffX; nDayY = nY+mnDaysOffY; if ( !bPaint ) @@ -1143,8 +1143,8 @@ void Calendar::ImplDraw( BOOL bPaint ) nDayX+(7*mnDayWidth)-1, nDayY+(6*mnDayHeight)-1 ); Erase( aClearRect ); } - USHORT nDayIndex = (USHORT)aDate.GetDayOfWeek(); - nDayIndex = (nDayIndex+(7-(USHORT)eStartDay)) % 7; + sal_uInt16 nDayIndex = (sal_uInt16)aDate.GetDayOfWeek(); + nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7; if ( (i == 0) && (j == 0) ) { Date aTempDate = aDate; @@ -1154,15 +1154,15 @@ void Calendar::ImplDraw( BOOL bPaint ) nDeltaX = nDayX + (nDay*mnDayWidth); ImplDrawDate( nDeltaX, nDayY, nDay+aTempDate.GetDay(), aTempDate.GetMonth(), aTempDate.GetYear(), - (DayOfWeek)((nDay+(USHORT)eStartDay)%7), FALSE, TRUE, nToday ); + (DayOfWeek)((nDay+(sal_uInt16)eStartDay)%7), sal_False, sal_True, nToday ); } } for ( nDay = 1; nDay <= nDaysInMonth; nDay++ ) { nDeltaX = nDayX + (nDayIndex*mnDayWidth); ImplDrawDate( nDeltaX, nDayY, nDay, nMonth, nYear, - (DayOfWeek)((nDayIndex+(USHORT)eStartDay)%7), - FALSE, FALSE, nToday ); + (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7), + sal_False, sal_False, nToday ); if ( nDayIndex == 6 ) { nDayIndex = 0; @@ -1173,9 +1173,9 @@ void Calendar::ImplDraw( BOOL bPaint ) } if ( (i == mnLines-1) && (j == mnMonthPerLine-1) ) { - USHORT nWeekDay = (USHORT)aDate.GetDayOfWeek(); - nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7; - USHORT nDayCount = 42-nDaysInMonth-nWeekDay; + sal_uInt16 nWeekDay = (sal_uInt16)aDate.GetDayOfWeek(); + nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7; + sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay; Date aTempDate = aDate; aTempDate += nDaysInMonth; for ( nDay = 1; nDay <= nDayCount; nDay++ ) @@ -1183,8 +1183,8 @@ void Calendar::ImplDraw( BOOL bPaint ) nDeltaX = nDayX + (nDayIndex*mnDayWidth); ImplDrawDate( nDeltaX, nDayY, nDay, aTempDate.GetMonth(), aTempDate.GetYear(), - (DayOfWeek)((nDayIndex+(USHORT)eStartDay)%7), - FALSE, TRUE, nToday ); + (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7), + sal_False, sal_True, nToday ); if ( nDayIndex == 6 ) { nDayIndex = 0; @@ -1216,10 +1216,10 @@ void Calendar::ImplUpdateDate( const Date& rDate ) Rectangle aDateRect( GetDateRect( rDate ) ); if ( !aDateRect.IsEmpty() ) { - BOOL bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth()); + sal_Bool bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth()); ImplDrawDate( aDateRect.Left(), aDateRect.Top(), rDate.GetDay(), rDate.GetMonth(), rDate.GetYear(), - rDate.GetDayOfWeek(), TRUE, bOther ); + rDate.GetDayOfWeek(), sal_True, bOther ); } } } @@ -1230,7 +1230,7 @@ void Calendar::ImplUpdateSelection( Table* pOld ) { Table* pNew = mpSelectTable; void* p; - ULONG nKey; + sal_uLong nKey; p = pOld->First(); while ( p ) @@ -1261,8 +1261,8 @@ void Calendar::ImplUpdateSelection( Table* pOld ) // ----------------------------------------------------------------------- -void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest, - BOOL bMove, BOOL bExpand, BOOL bExtended ) +void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, + sal_Bool bMove, sal_Bool bExpand, sal_Bool bExtended ) { Table* pOldSel = new Table( *mpSelectTable ); Date aOldDate = maCurDate; @@ -1298,35 +1298,35 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest, { if ( mbSelLeft ) { - ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aTempDate, FALSE ); - ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), FALSE ); + ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aTempDate, sal_False ); + ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), sal_False ); } else { - ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, FALSE ); - ImplCalendarSelectDateRange( mpSelectTable, aTempDate, Date( 31, 12, 9999 ), FALSE ); + ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, sal_False ); + ImplCalendarSelectDateRange( mpSelectTable, aTempDate, Date( 31, 12, 9999 ), sal_False ); } } - ImplCalendarSelectDateRange( mpSelectTable, aTempDate, maAnchorDate, TRUE ); + ImplCalendarSelectDateRange( mpSelectTable, aTempDate, maAnchorDate, sal_True ); } else if ( bExtended && !(mnWinStyle & WB_RANGESELECT) ) { maAnchorDate = aTempDate; if ( IsDateSelected( aTempDate ) ) { - mbUnSel = TRUE; - ImplCalendarSelectDate( mpSelectTable, aTempDate, FALSE ); + mbUnSel = sal_True; + ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_False ); } else { - ImplCalendarSelectDate( mpSelectTable, aTempDate, TRUE ); + ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_True ); } } else { maAnchorDate = aTempDate; ImplCalendarClearSelectDate( mpSelectTable ); - ImplCalendarSelectDate( mpSelectTable, aTempDate, TRUE ); + ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_True ); } mpRestoreSelectTable = new Table( *mpSelectTable ); @@ -1335,9 +1335,9 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest, else { if ( aTempDate < maCurDate ) - mbSelLeft = TRUE; + mbSelLeft = sal_True; else - mbSelLeft = FALSE; + mbSelLeft = sal_False; if ( !(nHitTest & CALENDAR_HITTEST_DAY) ) aTempDate = maOldCurDate; if ( !bMove ) @@ -1345,19 +1345,19 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest, if ( aTempDate != maCurDate ) { maCurDate = aTempDate; - ImplCalendarSelectDate( mpSelectTable, aOldDate, FALSE ); - ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE ); + ImplCalendarSelectDate( mpSelectTable, aOldDate, sal_False ); + ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True ); } } - BOOL bNewSel = *pOldSel != *mpSelectTable; + sal_Bool bNewSel = *pOldSel != *mpSelectTable; if ( (maCurDate != aOldDate) || bNewSel ) { if ( bNewSel ) { - mbInSelChange = TRUE; + mbInSelChange = sal_True; SelectionChanging(); - mbInSelChange = FALSE; + mbInSelChange = sal_False; } HideFocus(); if ( bNewSel ) @@ -1373,7 +1373,7 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest, // ----------------------------------------------------------------------- -void Calendar::ImplUpdate( BOOL bCalcNew ) +void Calendar::ImplUpdate( sal_Bool bCalcNew ) { if ( IsReallyVisible() && IsUpdateMode() ) { @@ -1383,8 +1383,8 @@ void Calendar::ImplUpdate( BOOL bCalcNew ) { if ( mbDirect ) { - mbFormat = TRUE; - ImplDraw( FALSE ); + mbFormat = sal_True; + ImplDraw( sal_False ); return; } else @@ -1393,8 +1393,8 @@ void Calendar::ImplUpdate( BOOL bCalcNew ) } if ( bCalcNew ) - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; } // ----------------------------------------------------------------------- @@ -1409,7 +1409,7 @@ void Calendar::ImplInvertDropPos() // ----------------------------------------------------------------------- -void Calendar::ImplScroll( BOOL bPrev ) +void Calendar::ImplScroll( sal_Bool bPrev ) { Date aNewFirstMonth = GetFirstMonth(); if ( bPrev ) @@ -1419,9 +1419,9 @@ void Calendar::ImplScroll( BOOL bPrev ) } else aNewFirstMonth += aNewFirstMonth.GetDaysInMonth(); - mbDirect = TRUE; + mbDirect = sal_True; SetFirstDate( aNewFirstMonth ); - mbDirect = FALSE; + mbDirect = sal_False; } // ----------------------------------------------------------------------- @@ -1433,12 +1433,12 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) Date aOldFirstDate = GetFirstMonth(); PopupMenu aPopupMenu; PopupMenu* pYearPopupMenus[MENU_YEAR_COUNT]; - USHORT nMonthOff; - USHORT nCurItemId; - USHORT nYear = rDate.GetYear()-1; - USHORT i; - USHORT j; - USHORT nYearIdCount = 1000; + sal_uInt16 nMonthOff; + sal_uInt16 nCurItemId; + sal_uInt16 nYear = rDate.GetYear()-1; + sal_uInt16 i; + sal_uInt16 j; + sal_uInt16 nYearIdCount = 1000; nMonthOff = (rDate.GetYear()-aOldFirstDate.GetYear())*12; if ( aOldFirstDate.GetMonth() < rDate.GetMonth() ) @@ -1459,9 +1459,9 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) nYearIdCount += 1000; } - mbMenuDown = TRUE; + mbMenuDown = sal_True; nCurItemId = aPopupMenu.Execute( this, rPos ); - mbMenuDown = FALSE; + mbMenuDown = sal_False; // Menu zerstoeren aPopupMenu.SetPopupMenu( 2, NULL ); @@ -1473,10 +1473,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) if ( nCurItemId ) { - USHORT nTempMonthOff = nMonthOff % 12; - USHORT nTempYearOff = nMonthOff / 12; - USHORT nNewMonth = nCurItemId % 1000; - USHORT nNewYear = nYear+((nCurItemId-1000)/1000); + sal_uInt16 nTempMonthOff = nMonthOff % 12; + sal_uInt16 nTempYearOff = nMonthOff / 12; + sal_uInt16 nNewMonth = nCurItemId % 1000; + sal_uInt16 nNewYear = nYear+((nCurItemId-1000)/1000); if ( nTempMonthOff < nNewMonth ) nNewMonth = nNewMonth - nTempMonthOff; else @@ -1491,10 +1491,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) // ----------------------------------------------------------------------- -void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat ) +void Calendar::ImplTracking( const Point& rPos, sal_Bool bRepeat ) { Date aTempDate = maCurDate; - USHORT nHitTest = ImplHitTest( rPos, aTempDate ); + sal_uInt16 nHitTest = ImplHitTest( rPos, aTempDate ); if ( mbSpinDown ) { @@ -1503,29 +1503,29 @@ void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat ) if ( bRepeat && (mbPrevIn || mbNextIn) ) { - mbScrollDateRange = TRUE; + mbScrollDateRange = sal_True; ImplScroll( mbPrevIn ); - mbScrollDateRange = FALSE; + mbScrollDateRange = sal_False; } } else - ImplMouseSelect( aTempDate, nHitTest, TRUE, FALSE, FALSE ); + ImplMouseSelect( aTempDate, nHitTest, sal_True, sal_False, sal_False ); } // ----------------------------------------------------------------------- -void Calendar::ImplEndTracking( BOOL bCancel ) +void Calendar::ImplEndTracking( sal_Bool bCancel ) { - BOOL bSelection = mbSelection; - BOOL bSpinDown = mbSpinDown; + sal_Bool bSelection = mbSelection; + sal_Bool bSpinDown = mbSpinDown; - mbDrag = FALSE; - mbSelection = FALSE; - mbMultiSelection = FALSE; - mbUnSel = FALSE; - mbSpinDown = FALSE; - mbPrevIn = FALSE; - mbNextIn = FALSE; + mbDrag = sal_False; + mbSelection = sal_False; + mbMultiSelection = sal_False; + mbUnSel = sal_False; + mbSpinDown = sal_False; + mbPrevIn = sal_False; + mbNextIn = sal_False; if ( bCancel ) { @@ -1554,15 +1554,15 @@ void Calendar::ImplEndTracking( BOOL bCancel ) if ( !bCancel ) { // Feststellen, ob wir sichtbaren Bereich scrollen sollen - ULONG nSelCount = mpSelectTable->Count(); + sal_uLong nSelCount = mpSelectTable->Count(); if ( nSelCount ) { Date aFirstSelDate( mpSelectTable->GetObjectKey( 0 ) ); Date aLastSelDate( mpSelectTable->GetObjectKey( nSelCount-1 ) ); if ( aLastSelDate < GetFirstMonth() ) - ImplScroll( TRUE ); + ImplScroll( sal_True ); else if ( GetLastMonth() < aFirstSelDate ) - ImplScroll( FALSE ); + ImplScroll( sal_False ); } } @@ -1584,13 +1584,13 @@ void Calendar::ImplEndTracking( BOOL bCancel ) IMPL_STATIC_LINK( Calendar, ScrollHdl, Timer*, EMPTYARG ) { - BOOL bPrevIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0; - BOOL bNextIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_NEXT) != 0; + sal_Bool bPrevIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0; + sal_Bool bNextIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_NEXT) != 0; if( bNextIn || bPrevIn ) { - pThis->mbScrollDateRange = TRUE; + pThis->mbScrollDateRange = sal_True; pThis->ImplScroll( bPrevIn ); - pThis->mbScrollDateRange = FALSE; + pThis->mbScrollDateRange = sal_False; } return 0; } @@ -1602,7 +1602,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) if ( rMEvt.IsLeft() && !mbMenuDown ) { Date aTempDate = maCurDate; - USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate ); + sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate ); if ( nHitTest ) { if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE ) @@ -1615,10 +1615,10 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) mbNextIn = (nHitTest & CALENDAR_HITTEST_NEXT) != 0; if ( mbPrevIn || mbNextIn ) { - mbSpinDown = TRUE; - mbScrollDateRange = TRUE; + mbSpinDown = sal_True; + mbScrollDateRange = sal_True; ImplScroll( mbPrevIn ); - mbScrollDateRange = FALSE; + mbScrollDateRange = sal_False; // Hier muss BUTTONREPEAT stehen, also nicht wieder // auf SCROLLREPEAT aendern, sondern mit TH abklaeren, // warum es evtl. anders sein sollte (71775) @@ -1637,16 +1637,16 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) if ( !mbSelection ) { - mbDrag = TRUE; + mbDrag = sal_True; StartTracking(); } mbMultiSelection = (mnWinStyle & (WB_MULTISELECT | WB_RANGESELECT)) != 0; if ( (nHitTest & CALENDAR_HITTEST_DAY) && mbMultiSelection ) - mbWeekSel = TRUE; + mbWeekSel = sal_True; else - mbWeekSel = FALSE; - ImplMouseSelect( aTempDate, nHitTest, FALSE, rMEvt.IsShift(), rMEvt.IsMod1() ); + mbWeekSel = sal_False; + ImplMouseSelect( aTempDate, nHitTest, sal_False, rMEvt.IsShift(), rMEvt.IsMod1() ); } } } @@ -1663,7 +1663,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) void Calendar::MouseButtonUp( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && mbSelection ) - ImplEndTracking( FALSE ); + ImplEndTracking( sal_False ); else Control::MouseButtonUp( rMEvt ); } @@ -1673,7 +1673,7 @@ void Calendar::MouseButtonUp( const MouseEvent& rMEvt ) void Calendar::MouseMove( const MouseEvent& rMEvt ) { if ( mbSelection && rMEvt.GetButtons() ) - ImplTracking( rMEvt.GetPosPixel(), FALSE ); + ImplTracking( rMEvt.GetPosPixel(), sal_False ); else Control::MouseMove( rMEvt ); } @@ -1695,9 +1695,9 @@ void Calendar::Tracking( const TrackingEvent& rTEvt ) void Calendar::KeyInput( const KeyEvent& rKEvt ) { Date aNewDate = maCurDate; - BOOL bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0; - BOOL bExpand = rKEvt.GetKeyCode().IsShift(); - BOOL bExtended = rKEvt.GetKeyCode().IsMod1(); + sal_Bool bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0; + sal_Bool bExpand = rKEvt.GetKeyCode().IsShift(); + sal_Bool bExtended = rKEvt.GetKeyCode().IsMod1(); switch ( rKEvt.GetKeyCode().GetCode() ) { @@ -1742,13 +1742,13 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) { if ( !bExpand ) { - BOOL bDateSel = IsDateSelected( maCurDate ); + sal_Bool bDateSel = IsDateSelected( maCurDate ); SelectDate( maCurDate, !bDateSel ); - mbSelLeft = FALSE; + mbSelLeft = sal_False; SelectionChanging(); - mbTravelSelect = TRUE; + mbTravelSelect = sal_True; Select(); - mbTravelSelect = FALSE; + mbTravelSelect = sal_False; } } else @@ -1771,23 +1771,23 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) { if ( mbSelLeft ) { - ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aNewDate, FALSE ); - ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), FALSE ); + ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aNewDate, sal_False ); + ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), sal_False ); } else { - ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, FALSE ); - ImplCalendarSelectDateRange( mpSelectTable, aNewDate, Date( 31, 12, 9999 ), FALSE ); + ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, sal_False ); + ImplCalendarSelectDateRange( mpSelectTable, aNewDate, Date( 31, 12, 9999 ), sal_False ); } } - ImplCalendarSelectDateRange( mpSelectTable, aNewDate, maAnchorDate, TRUE ); - mbDirect = TRUE; + ImplCalendarSelectDateRange( mpSelectTable, aNewDate, maAnchorDate, sal_True ); + mbDirect = sal_True; SetCurDate( aNewDate ); - mbDirect = FALSE; + mbDirect = sal_False; maAnchorDate = aOldAnchorDate; - mbInSelChange = TRUE; + mbInSelChange = sal_True; SelectionChanging(); - mbInSelChange = FALSE; + mbInSelChange = sal_False; ImplUpdateSelection( pOldSel ); delete pOldSel; } @@ -1796,15 +1796,15 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) if ( mnWinStyle & WB_RANGESELECT ) { SetNoSelection(); - SelectDate( aNewDate, TRUE ); + SelectDate( aNewDate, sal_True ); } - mbDirect = TRUE; + mbDirect = sal_True; SetCurDate( aNewDate ); - mbDirect = FALSE; + mbDirect = sal_False; } - mbTravelSelect = TRUE; + mbTravelSelect = sal_True; Select(); - mbTravelSelect = FALSE; + mbTravelSelect = sal_False; } } @@ -1812,7 +1812,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) void Calendar::Paint( const Rectangle& ) { - ImplDraw( TRUE ); + ImplDraw( sal_True ); } // ----------------------------------------------------------------------- @@ -1835,7 +1835,7 @@ void Calendar::LoseFocus() void Calendar::Resize() { - ImplUpdate( TRUE ); + ImplUpdate( sal_True ); Control::Resize(); } @@ -1881,8 +1881,8 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & HELPMODE_QUICK ) { maCalendarWrapper.setGregorianDateTime( aDate); - USHORT nWeek = (USHORT) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); - USHORT nMonth = aDate.GetMonth(); + sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); + sal_uInt16 nMonth = aDate.GetMonth(); XubString aStr( maDayText ); aStr.AppendAscii( ": " ); aStr.Append( XubString::CreateFromInt32( aDate.GetDayOfYear() ) ); @@ -1919,7 +1919,7 @@ void Calendar::Command( const CommandEvent& rCEvt ) if ( !mbSelection && rCEvt.IsMouseEvent() ) { Date aTempDate = maCurDate; - USHORT nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate ); + sal_uInt16 nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate ); if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE ) { ImplShowMenu( rCEvt.GetMousePosPixel(), aTempDate ); @@ -1937,7 +1937,7 @@ void Calendar::Command( const CommandEvent& rCEvt ) { while ( nNotchDelta < 0 ) { - ImplScroll( TRUE ); + ImplScroll( sal_True ); nNotchDelta++; } } @@ -1945,7 +1945,7 @@ void Calendar::Command( const CommandEvent& rCEvt ) { while ( nNotchDelta > 0 ) { - ImplScroll( FALSE ); + ImplScroll( sal_False ); nNotchDelta--; } } @@ -2020,7 +2020,7 @@ void Calendar::Select() // ----------------------------------------------------------------------- -void Calendar::SelectDate( const Date& rDate, BOOL bSelect ) +void Calendar::SelectDate( const Date& rDate, sal_Bool bSelect ) { if ( !rDate.IsValid() ) return; @@ -2044,7 +2044,7 @@ void Calendar::SelectDate( const Date& rDate, BOOL bSelect ) // ----------------------------------------------------------------------- void Calendar::SelectDateRange( const Date& rStartDate, const Date& rEndDate, - BOOL bSelect ) + sal_Bool bSelect ) { if ( !rStartDate.IsValid() || !rEndDate.IsValid() ) return; @@ -2087,21 +2087,21 @@ void Calendar::SetNoSelection() // ----------------------------------------------------------------------- -BOOL Calendar::IsDateSelected( const Date& rDate ) const +sal_Bool Calendar::IsDateSelected( const Date& rDate ) const { return mpSelectTable->IsKeyValid( rDate.GetDate() ); } // ----------------------------------------------------------------------- -ULONG Calendar::GetSelectDateCount() const +sal_uLong Calendar::GetSelectDateCount() const { return mpSelectTable->Count(); } // ----------------------------------------------------------------------- -Date Calendar::GetSelectDate( ULONG nIndex ) const +Date Calendar::GetSelectDate( sal_uLong nIndex ) const { if ( nIndex < mpSelectTable->Count() ) return Date( mpSelectTable->GetObjectKey( nIndex ) ); @@ -2121,18 +2121,18 @@ void Calendar::SetCurDate( const Date& rNewDate ) if ( maCurDate != rNewDate ) { - BOOL bUpdate = IsVisible() && IsUpdateMode(); + sal_Bool bUpdate = IsVisible() && IsUpdateMode(); Date aOldDate = maCurDate; maCurDate = rNewDate; maAnchorDate = maCurDate; if ( !(mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) ) { - ImplCalendarSelectDate( mpSelectTable, aOldDate, FALSE ); - ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE ); + ImplCalendarSelectDate( mpSelectTable, aOldDate, sal_False ); + ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True ); } else if ( !HasFocus() ) - bUpdate = FALSE; + bUpdate = sal_False; // Aktuelles Datum noch in den sichtbaren Bereich verschieben if ( mbFormat || (maCurDate < GetFirstMonth()) ) @@ -2177,7 +2177,7 @@ void Calendar::SetFirstDate( const Date& rNewFirstDate ) if ( maFirstDate != rNewFirstDate ) { maFirstDate = Date( 1, rNewFirstDate.GetMonth(), rNewFirstDate.GetYear() ); - mbDropPos = FALSE; + mbDropPos = sal_False; ImplUpdate(); } } @@ -2202,8 +2202,8 @@ Date Calendar::GetFirstMonth() const Date Calendar::GetLastMonth() const { Date aDate = GetFirstMonth(); - USHORT nMonthCount = GetMonthCount(); - for ( USHORT i = 0; i < nMonthCount; i++ ) + sal_uInt16 nMonthCount = GetMonthCount(); + for ( sal_uInt16 i = 0; i < nMonthCount; i++ ) aDate += aDate.GetDaysInMonth(); aDate--; return aDate; @@ -2211,39 +2211,39 @@ Date Calendar::GetLastMonth() const // ----------------------------------------------------------------------- -USHORT Calendar::GetMonthCount() const +sal_uInt16 Calendar::GetMonthCount() const { if ( mbFormat ) return 1; else - return (USHORT)(mnMonthPerLine*mnLines); + return (sal_uInt16)(mnMonthPerLine*mnLines); } // ----------------------------------------------------------------------- -BOOL Calendar::GetDropDate( Date& rDate ) const +sal_Bool Calendar::GetDropDate( Date& rDate ) const { if( mbDropPos ) { rDate = maDropDate; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Calendar::GetDate( const Point& rPos, Date& rDate ) const +sal_Bool Calendar::GetDate( const Point& rPos, Date& rDate ) const { Date aDate = maCurDate; - USHORT nHitTest = ImplHitTest( rPos, aDate ); + sal_uInt16 nHitTest = ImplHitTest( rPos, aDate ); if ( nHitTest & CALENDAR_HITTEST_DAY ) { rDate = aDate; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -2257,8 +2257,8 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const long nX; long nY; - ULONG nDaysOff; - USHORT nDayIndex; + sal_uLong nDaysOff; + sal_uInt16 nDayIndex; Date aDate = GetFirstMonth(); if ( rDate < aDate ) @@ -2275,13 +2275,13 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const Date aLastDate = GetLastMonth(); if ( rDate > aLastDate ) { - USHORT nWeekDay = (USHORT)aLastDate.GetDayOfWeek(); - nWeekDay = (nWeekDay+(7-(USHORT)ImplGetWeekStart())) % 7; + sal_uInt16 nWeekDay = (sal_uInt16)aLastDate.GetDayOfWeek(); + nWeekDay = (nWeekDay+(7-(sal_uInt16)ImplGetWeekStart())) % 7; aLastDate -= nWeekDay; aRect = GetDateRect( aLastDate ); nDaysOff = rDate-aLastDate; nDayIndex = 0; - for ( USHORT i = 0; i <= nDaysOff; i++ ) + for ( sal_uInt16 i = 0; i <= nDaysOff; i++ ) { if ( aLastDate == rDate ) { @@ -2308,7 +2308,7 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const nX = 0; for ( long j = 0; j < mnMonthPerLine; j++ ) { - USHORT nDaysInMonth = aDate.GetDaysInMonth(); + sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth(); // Monat gerufen if ( (aDate.GetMonth() == rDate.GetMonth()) && @@ -2316,9 +2316,9 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const { long nDayX = nX+mnDaysOffX; long nDayY = nY+mnDaysOffY; - nDayIndex = (USHORT)aDate.GetDayOfWeek(); - nDayIndex = (nDayIndex+(7-(USHORT)ImplGetWeekStart())) % 7; - for ( USHORT nDay = 1; nDay <= nDaysInMonth; nDay++ ) + nDayIndex = (sal_uInt16)aDate.GetDayOfWeek(); + nDayIndex = (nDayIndex+(7-(sal_uInt16)ImplGetWeekStart())) % 7; + for ( sal_uInt16 nDay = 1; nDay <= nDaysInMonth; nDay++ ) { if ( nDay == rDate.GetDay() ) { @@ -2385,13 +2385,13 @@ void Calendar::SetSundayColor( const Color& rColor ) void Calendar::AddDateInfo( const Date& rDate, const String& rText, const Color* pTextColor, const Color* pFrameColor, - USHORT nFlags ) + sal_uInt16 nFlags ) { if ( !mpDateTable ) mpDateTable = new ImplDateTable( 256, 256 ); - BOOL bChanged = FALSE; - ULONG nKey = rDate.GetDate(); + sal_Bool bChanged = sal_False; + sal_uLong nKey = rDate.GetDate(); ImplDateInfo* pDateInfo = mpDateTable->Get( nKey ); if ( pDateInfo ) pDateInfo->maText = rText; @@ -2407,13 +2407,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText, if ( *(pDateInfo->mpTextColor) != *pTextColor ) { *(pDateInfo->mpTextColor) = *pTextColor; - bChanged = TRUE; + bChanged = sal_True; } } else { pDateInfo->mpTextColor = new Color( *pTextColor ); - bChanged = TRUE; + bChanged = sal_True; } } else @@ -2422,7 +2422,7 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText, { delete pDateInfo->mpTextColor; pDateInfo->mpTextColor = NULL; - bChanged = TRUE; + bChanged = sal_True; } } if ( pFrameColor ) @@ -2432,13 +2432,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText, if ( *(pDateInfo->mpFrameColor) != *pFrameColor ) { *(pDateInfo->mpFrameColor) = *pFrameColor; - bChanged = TRUE; + bChanged = sal_True; } } else { pDateInfo->mpFrameColor = new Color( *pFrameColor ); - bChanged = TRUE; + bChanged = sal_True; } } else @@ -2447,13 +2447,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText, { delete pDateInfo->mpFrameColor; pDateInfo->mpFrameColor = NULL; - bChanged = TRUE; + bChanged = sal_True; } } if ( pDateInfo->mnFlags != nFlags ) { pDateInfo->mnFlags = nFlags; - bChanged = TRUE; + bChanged = sal_True; } if ( bChanged ) @@ -2484,7 +2484,7 @@ void Calendar::ClearDateInfo() ImplDateInfo* pDateInfo = mpDateTable->First(); while ( pDateInfo ) { - ULONG nKey = mpDateTable->GetCurKey(); + sal_uLong nKey = mpDateTable->GetCurKey(); mpDateTable->Remove( nKey ); Date aDate( nKey ); ImplUpdateDate( aDate ); @@ -2503,7 +2503,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate ) XubString aRet; if ( mpDateTable ) { - ULONG nKey = rDate.GetDate(); + sal_uLong nKey = rDate.GetDate(); ImplDateInfo* pDateInfo = mpDateTable->Get( nKey ); if ( pDateInfo ) aRet = pDateInfo->maText; @@ -2513,7 +2513,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate ) // ----------------------------------------------------------------------- -BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate ) +sal_Bool Calendar::ShowDropPos( const Point& rPos, Date& rDate ) { Date aTempDate = maCurDate; mnDragScrollHitTest = ImplHitTest( rPos, aTempDate ); @@ -2535,12 +2535,12 @@ BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate ) if( mbDropPos ) ImplInvertDropPos(); maDropDate = aTempDate; - mbDropPos = TRUE; + mbDropPos = sal_True; ImplInvertDropPos(); } rDate = maDropDate; - return TRUE; + return sal_True; } } } @@ -2548,7 +2548,7 @@ BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate ) maDragScrollTimer.Stop(); HideDropPos(); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -2558,7 +2558,7 @@ void Calendar::HideDropPos() if ( mbDropPos ) { ImplInvertDropPos(); - mbDropPos = FALSE; + mbDropPos = sal_False; } } @@ -2571,7 +2571,7 @@ void Calendar::StartSelection() maOldCurDate = maCurDate; mpOldSelectTable = new Table( *mpSelectTable ); - mbSelection = TRUE; + mbSelection = sal_True; } // ----------------------------------------------------------------------- @@ -2583,12 +2583,12 @@ void Calendar::EndSelection() if ( !mbSelection ) ReleaseMouse(); - mbDrag = FALSE; - mbSelection = FALSE; - mbMultiSelection = FALSE; - mbSpinDown = FALSE; - mbPrevIn = FALSE; - mbNextIn = FALSE; + mbDrag = sal_False; + mbSelection = sal_False; + mbMultiSelection = sal_False; + mbSpinDown = sal_False; + mbPrevIn = sal_False; + mbNextIn = sal_False; } } @@ -2669,8 +2669,8 @@ public: void SetCalendar( Calendar* pCalendar ) { mpCalendar = pCalendar; } - PushButton* EnableTodayBtn( BOOL bEnable ); - PushButton* EnableNoneBtn( BOOL bEnable ); + PushButton* EnableTodayBtn( sal_Bool bEnable ); + PushButton* EnableNoneBtn( sal_Bool bEnable ); void ArrangeButtons(); long Notify( NotifyEvent& rNEvt ); @@ -2698,7 +2698,7 @@ ImplCFieldFloatWin::~ImplCFieldFloatWin() // ----------------------------------------------------------------------- -PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable ) +PushButton* ImplCFieldFloatWin::EnableTodayBtn( sal_Bool bEnable ) { if ( bEnable ) { @@ -2730,7 +2730,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable ) // ----------------------------------------------------------------------- -PushButton* ImplCFieldFloatWin::EnableNoneBtn( BOOL bEnable ) +PushButton* ImplCFieldFloatWin::EnableNoneBtn( sal_Bool bEnable ) { if ( bEnable ) { @@ -2849,8 +2849,8 @@ CalendarField::CalendarField( Window* pParent, WinBits nWinStyle ) : mpFloatWin = NULL; mpCalendar = NULL; mnCalendarStyle = 0; - mbToday = FALSE; - mbNone = FALSE; + mbToday = sal_False; + mbNone = sal_False; } // ----------------------------------------------------------------------- @@ -2862,8 +2862,8 @@ CalendarField::CalendarField( Window* pParent, const ResId& rResId ) : mpFloatWin = NULL; mpCalendar = NULL; mnCalendarStyle = 0; - mbToday = FALSE; - mbNone = FALSE; + mbToday = sal_False; + mbNone = sal_False; } // ----------------------------------------------------------------------- @@ -2949,7 +2949,7 @@ void CalendarField::Select() // ----------------------------------------------------------------------- -BOOL CalendarField::ShowDropDown( BOOL bShow ) +sal_Bool CalendarField::ShowDropDown( sal_Bool bShow ) { if ( bShow ) { @@ -2994,7 +2994,7 @@ BOOL CalendarField::ShowDropDown( BOOL bShow ) mpCalendar->EndSelection(); EndDropDown(); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 20b7865db569..7be2700b45c1 100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -31,9 +31,7 @@ #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> - - -#include <collatorres.hxx> +#include <svtools/collatorres.hxx> // ------------------------------------------------------------------------- // diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 09e1fb449dc1..ceefa0391753 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -39,8 +39,8 @@ #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> -#include <ctrlbox.hxx> -#include <ctrltool.hxx> +#include <svtools/ctrlbox.hxx> +#include <svtools/ctrltool.hxx> #include <borderhelper.hxx> #include <vcl/i18nhelp.hxx> @@ -66,10 +66,10 @@ using namespace ::com::sun::star; struct ImplColorListData { Color aColor; - BOOL bColor; + sal_Bool bColor; - ImplColorListData() : aColor( COL_BLACK ) { bColor = FALSE; } - ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = TRUE; } + ImplColorListData() : aColor( COL_BLACK ) { bColor = sal_False; } + ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = sal_True; } }; // ----------------------------------------------------------------------- @@ -81,7 +81,7 @@ void ColorListBox::ImplInit() aImageSize.Height() = GetTextHeight(); aImageSize.Height() -= 2; - EnableUserDraw( TRUE ); + EnableUserDraw( sal_True ); SetUserItemSize( aImageSize ); } @@ -120,7 +120,7 @@ ColorListBox::~ColorListBox() // ----------------------------------------------------------------------- -USHORT ColorListBox::InsertEntry( const XubString& rStr, USHORT nPos ) +sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos ) { nPos = ListBox::InsertEntry( rStr, nPos ); if ( nPos != LISTBOX_ERROR ) @@ -143,8 +143,8 @@ USHORT ColorListBox::InsertEntry( const XubString& rStr, USHORT nPos ) // ----------------------------------------------------------------------- -USHORT ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr, - USHORT nPos ) +sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr, + sal_uInt16 nPos ) { nPos = ListBox::InsertEntry( rStr, nPos ); if ( nPos != LISTBOX_ERROR ) @@ -175,7 +175,7 @@ void ColorListBox::InsertAutomaticEntry() // ----------------------------------------------------------------------- -void ColorListBox::RemoveEntry( USHORT nPos ) +void ColorListBox::RemoveEntry( sal_uInt16 nPos ) { ListBox::RemoveEntry( nPos ); if ( nPos < pColorList->size() ) @@ -207,7 +207,7 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox ) for ( size_t n = 0; n < nCount; n++ ) { ImplColorListData* pData = (*rBox.pColorList)[ n ]; - USHORT nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND ); + sal_uInt16 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND ); if ( nPos != LISTBOX_ERROR ) { if ( nPos < pColorList->size() ) @@ -226,9 +226,9 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox ) // ----------------------------------------------------------------------- -USHORT ColorListBox::GetEntryPos( const Color& rColor ) const +sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const { - for( USHORT n = (USHORT) pColorList->size(); n; ) + for( sal_uInt16 n = (sal_uInt16) pColorList->size(); n; ) { ImplColorListData* pData = (*pColorList)[ --n ]; if ( pData->bColor && ( pData->aColor == rColor ) ) @@ -239,7 +239,7 @@ USHORT ColorListBox::GetEntryPos( const Color& rColor ) const // ----------------------------------------------------------------------- -Color ColorListBox::GetEntryColor( USHORT nPos ) const +Color ColorListBox::GetEntryColor( sal_uInt16 nPos ) const { Color aColor; ImplColorListData* pData = ( nPos < pColorList->size() ) ? (*pColorList)[ nPos ] : NULL; @@ -266,13 +266,13 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt ) rUDEvt.GetDevice()->SetLineColor( rUDEvt.GetDevice()->GetTextColor() ); rUDEvt.GetDevice()->DrawRect( Rectangle( aPos, aImageSize ) ); rUDEvt.GetDevice()->Pop(); - ListBox::DrawEntry( rUDEvt, FALSE, TRUE, FALSE ); + ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_False ); } else - ListBox::DrawEntry( rUDEvt, FALSE, TRUE, TRUE ); + ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_True ); } else - ListBox::DrawEntry( rUDEvt, TRUE, TRUE, FALSE ); + ListBox::DrawEntry( rUDEvt, sal_True, sal_True, sal_False ); } // ======================================================================= @@ -539,7 +539,7 @@ LineListBox::~LineListBox() // ----------------------------------------------------------------------- -USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos ) +sal_uInt16 LineListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos ) { nPos = ListBox::InsertEntry( rStr, nPos ); if ( nPos != LISTBOX_ERROR ) { @@ -556,8 +556,8 @@ USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos ) // ----------------------------------------------------------------------- -USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance, - USHORT nStyle, USHORT nPos ) +sal_uInt16 LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance, + sal_uInt16 nStyle, sal_uInt16 nPos ) { XubString aStr; Bitmap aBmp; @@ -584,7 +584,7 @@ USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance, // ----------------------------------------------------------------------- -void LineListBox::RemoveEntry( USHORT nPos ) +void LineListBox::RemoveEntry( sal_uInt16 nPos ) { ListBox::RemoveEntry( nPos ); @@ -612,7 +612,7 @@ void LineListBox::Clear() // ----------------------------------------------------------------------- -USHORT LineListBox::GetEntryPos( long nLine1, long nLine2, +sal_uInt16 LineListBox::GetEntryPos( long nLine1, long nLine2, long nDistance, USHORT nStyle ) const { for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) { @@ -633,7 +633,7 @@ USHORT LineListBox::GetEntryPos( long nLine1, long nLine2, // ----------------------------------------------------------------------- -long LineListBox::GetEntryLine1( USHORT nPos ) const +long LineListBox::GetEntryLine1( sal_uInt16 nPos ) const { ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL; return ( pData ) ? pData->nLine1 : 0; @@ -641,7 +641,7 @@ long LineListBox::GetEntryLine1( USHORT nPos ) const // ----------------------------------------------------------------------- -long LineListBox::GetEntryLine2( USHORT nPos ) const +long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const { ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL; return ( pData ) ? pData->nLine2 : 0; @@ -677,7 +677,7 @@ void LineListBox::UpdateLineColors( void ) Bitmap aBmp; // exchange entries which containing lines - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); USHORT nSelEntry = GetSelectEntryPos(); for( size_t n = 0 ; n < nCount ; ++n ) @@ -686,26 +686,25 @@ void LineListBox::UpdateLineColors( void ) if( pData ) { // exchange listbox data - ListBox::RemoveEntry( USHORT( n ) ); + ListBox::RemoveEntry( sal_uInt16( n ) ); ImpGetLine( pData->nLine1, pData->nLine2, pData->nDistance, pData->nStyle, aBmp, aStr ); - ListBox::InsertEntry( aStr, aBmp, USHORT( n ) ); } } if( nSelEntry != LISTBOX_ENTRY_NOTFOUND ) SelectEntryPos( nSelEntry ); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); Invalidate(); } } // ----------------------------------------------------------------------- -BOOL LineListBox::UpdatePaintLineColor( void ) +sal_Bool LineListBox::UpdatePaintLineColor( void ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); Color aNewCol( rSettings.GetWindowColor().IsDark()? rSettings.GetLabelTextColor() : aColor ); @@ -734,10 +733,10 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt ) struct ImplFontNameListData { FontInfo maInfo; - USHORT mnType; + sal_uInt16 mnType; ImplFontNameListData( const FontInfo& rInfo, - USHORT nType ) : + sal_uInt16 nType ) : maInfo( rInfo ), mnType( nType ) {} @@ -750,8 +749,8 @@ FontNameBox::FontNameBox( Window* pParent, WinBits nWinStyle ) : { InitBitmaps(); mpFontList = NULL; - mbWYSIWYG = FALSE; - mbSymbols = FALSE; + mbWYSIWYG = sal_False; + mbSymbols = sal_False; } // ------------------------------------------------------------------- @@ -761,8 +760,8 @@ FontNameBox::FontNameBox( Window* pParent, const ResId& rResId ) : { InitBitmaps(); mpFontList = NULL; - mbWYSIWYG = FALSE; - mbSymbols = FALSE; + mbWYSIWYG = sal_False; + mbSymbols = sal_False; } // ------------------------------------------------------------------- @@ -817,14 +816,14 @@ void FontNameBox::Fill( const FontList* pList ) mpFontList = new ImplFontList; // insert fonts - USHORT nFontCount = pList->GetFontNameCount(); - for ( USHORT i = 0; i < nFontCount; i++ ) + sal_uInt16 nFontCount = pList->GetFontNameCount(); + for ( sal_uInt16 i = 0; i < nFontCount; i++ ) { const FontInfo& rFontInfo = pList->GetFontName( i ); - ULONG nIndex = InsertEntry( rFontInfo.GetName() ); + sal_uLong nIndex = InsertEntry( rFontInfo.GetName() ); if ( nIndex != LISTBOX_ERROR ) { - USHORT nType = pList->GetFontNameType( i ); + sal_uInt16 nType = pList->GetFontNameType( i ); ImplFontNameListData* pData = new ImplFontNameListData( rFontInfo, nType ); if ( nIndex < mpFontList->size() ) { ImplFontList::iterator it = mpFontList->begin(); @@ -845,7 +844,7 @@ void FontNameBox::Fill( const FontList* pList ) // ------------------------------------------------------------------- -void FontNameBox::EnableWYSIWYG( BOOL bEnable ) +void FontNameBox::EnableWYSIWYG( sal_Bool bEnable ) { if ( bEnable != mbWYSIWYG ) { @@ -857,7 +856,7 @@ void FontNameBox::EnableWYSIWYG( BOOL bEnable ) // ------------------------------------------------------------------- -void FontNameBox::EnableSymbols( BOOL bEnable ) +void FontNameBox::EnableSymbols( sal_Bool bEnable ) { if ( bEnable != mbSymbols ) { @@ -1713,7 +1712,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) { ImplFontNameListData* pData = (*mpFontList)[ rUDEvt.GetItemId() ]; const FontInfo& rInfo = pData->maInfo; - USHORT nType = pData->mnType; + sal_uInt16 nType = pData->mnType; Point aTopLeft = rUDEvt.GetRect().TopLeft(); long nX = aTopLeft.X(); long nH = rUDEvt.GetRect().GetHeight(); @@ -1951,11 +1950,11 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) } rUDEvt.GetDevice()->SetFont( aOldFont ); - DrawEntry( rUDEvt, FALSE, FALSE); // draw seperator + DrawEntry( rUDEvt, sal_False, sal_False); // draw seperator } else { - DrawEntry( rUDEvt, TRUE, TRUE ); + DrawEntry( rUDEvt, sal_True, sal_True ); } } @@ -2007,12 +2006,12 @@ void FontStyleBox::Modify() CharClass aChrCls( ::comphelper::getProcessServiceFactory(), GetSettings().GetLocale() ); XubString aStr = GetText(); - USHORT nEntryCount = GetEntryCount(); + sal_uInt16 nEntryCount = GetEntryCount(); if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND ) { aChrCls.toUpper( aStr ); - for ( USHORT i = 0; i < nEntryCount; i++ ) + for ( sal_uInt16 i = 0; i < nEntryCount; i++ ) { XubString aEntryText = GetEntry( i ); aChrCls.toUpper( aEntryText ); @@ -2036,7 +2035,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList ) // else aLastStyle will overwritten // store prior selection position and clear box XubString aOldText = GetText(); - USHORT nPos = GetEntryPos( aOldText ); + sal_uInt16 nPos = GetEntryPos( aOldText ); Clear(); // does a font with this name already exist? @@ -2047,11 +2046,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList ) FontWeight eLastWeight = WEIGHT_DONTKNOW; FontItalic eLastItalic = ITALIC_NONE; FontWidth eLastWidth = WIDTH_DONTKNOW; - BOOL bNormal = FALSE; - BOOL bItalic = FALSE; - BOOL bBold = FALSE; - BOOL bBoldItalic = FALSE; - BOOL bInsert = FALSE; + sal_Bool bNormal = sal_False; + sal_Bool bItalic = sal_False; + sal_Bool bBold = sal_False; + sal_Bool bBoldItalic = sal_False; + sal_Bool bInsert = sal_False; FontInfo aInfo; while ( hFontInfo ) { @@ -2071,16 +2070,16 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList ) if ( eWeight <= WEIGHT_NORMAL ) { if ( eItalic != ITALIC_NONE ) - bItalic = TRUE; + bItalic = sal_True; else - bNormal = TRUE; + bNormal = sal_True; } else { if ( eItalic != ITALIC_NONE ) - bBoldItalic = TRUE; + bBoldItalic = sal_True; else - bBold = TRUE; + bBold = sal_True; } // For wrong StyleNames we replace this with the correct once @@ -2114,11 +2113,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList ) } if ( !bItalic && (aStyleText == pList->GetItalicStr()) ) - bItalic = TRUE; + bItalic = sal_True; else if ( !bBold && (aStyleText == pList->GetBoldStr()) ) - bBold = TRUE; + bBold = sal_True; else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) ) - bBoldItalic = TRUE; + bBoldItalic = sal_True; hFontInfo = pList->GetNextFontInfo( hFontInfo ); } @@ -2197,15 +2196,15 @@ FontSizeBox::~FontSizeBox() void FontSizeBox::ImplInit() { - EnableAutocomplete( FALSE ); + EnableAutocomplete( sal_False ); - bRelativeMode = FALSE; - bPtRelative = FALSE; - bRelative = FALSE; - bStdSize = FALSE; + bRelativeMode = sal_False; + bPtRelative = sal_False; + bRelative = sal_False; + bStdSize = sal_False; pFontList = NULL; - SetShowTrailingZeros( FALSE ); + SetShowTrailingZeros( sal_False ); SetDecimalDigits( 1 ); SetMin( 20 ); SetMax( 9999 ); @@ -2241,24 +2240,24 @@ void FontSizeBox::Modify() XubString aStr = GetText(); aStr.EraseLeadingChars(); - BOOL bNewMode = bRelative; - BOOL bOldPtRelMode = bPtRelative; + sal_Bool bNewMode = bRelative; + sal_Bool bOldPtRelMode = bPtRelative; if ( bRelative ) { - bPtRelative = FALSE; + bPtRelative = sal_False; const xub_Unicode* pStr = aStr.GetBuffer(); while ( *pStr ) { if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') ) { if ( ('-' == *pStr || '+' == *pStr) && !bPtRelative ) - bPtRelative = TRUE; + bPtRelative = sal_True; else if ( bPtRelative && 'p' == *pStr && 't' == *++pStr ) ; else { - bNewMode = FALSE; + bNewMode = sal_False; break; } } @@ -2269,14 +2268,14 @@ void FontSizeBox::Modify() { if ( STRING_NOTFOUND != aStr.Search( '%' ) ) { - bNewMode = TRUE; - bPtRelative = FALSE; + bNewMode = sal_True; + bPtRelative = sal_False; } if ( '-' == aStr.GetChar( 0 ) || '+' == aStr.GetChar( 0 ) ) { - bNewMode = TRUE; - bPtRelative = TRUE; + bNewMode = sal_True; + bPtRelative = sal_True; } } @@ -2317,24 +2316,24 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList ) // for standard sizes we don't need to bother if ( bStdSize && GetEntryCount() && aFontSizeNames.IsEmpty() ) return; - bStdSize = TRUE; + bStdSize = sal_True; } else - bStdSize = FALSE; + bStdSize = sal_False; Selection aSelection = GetSelection(); XubString aStr = GetText(); Clear(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( !aFontSizeNames.IsEmpty() ) { if ( pAry == pList->GetStdSizeAry() ) { // for scalable fonts all font size names - ULONG nCount = aFontSizeNames.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = aFontSizeNames.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) { String aSizeName = aFontSizeNames.GetIndexName( i ); long nSize = aFontSizeNames.GetIndexSize( i ); @@ -2377,9 +2376,9 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList ) // ----------------------------------------------------------------------- -void FontSizeBox::EnableRelativeMode( USHORT nMin, USHORT nMax, USHORT nStep ) +void FontSizeBox::EnableRelativeMode( sal_uInt16 nMin, sal_uInt16 nMax, sal_uInt16 nStep ) { - bRelativeMode = TRUE; + bRelativeMode = sal_True; nRelMin = nMin; nRelMax = nMax; nRelStep = nStep; @@ -2390,7 +2389,7 @@ void FontSizeBox::EnableRelativeMode( USHORT nMin, USHORT nMax, USHORT nStep ) void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep ) { - bRelativeMode = TRUE; + bRelativeMode = sal_True; nPtRelMin = nMin; nPtRelMax = nMax; nPtRelStep = nStep; @@ -2399,7 +2398,7 @@ void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep ) // ----------------------------------------------------------------------- -void FontSizeBox::SetRelative( BOOL bNewRelative ) +void FontSizeBox::SetRelative( sal_Bool bNewRelative ) { if ( bRelativeMode ) { @@ -2409,8 +2408,8 @@ void FontSizeBox::SetRelative( BOOL bNewRelative ) if ( bNewRelative ) { - bRelative = TRUE; - bStdSize = FALSE; + bRelative = sal_True; + bStdSize = sal_False; if ( bPtRelative ) { @@ -2438,7 +2437,7 @@ void FontSizeBox::SetRelative( BOOL bNewRelative ) SetUnit( FUNIT_CUSTOM ); Clear(); - USHORT i = nRelMin; + sal_uInt16 i = nRelMin; while ( i <= nRelMax ) { InsertValue( i ); @@ -2448,7 +2447,7 @@ void FontSizeBox::SetRelative( BOOL bNewRelative ) } else { - bRelative = bPtRelative = FALSE; + bRelative = bPtRelative = sal_False; SetDecimalDigits( 1 ); SetMin( 20 ); SetMax( 9999 ); @@ -2488,7 +2487,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit ) mnLastValue = nTempValue; SetText( aName ); mnFieldValue = mnLastValue; - SetEmptyFieldValueData( FALSE ); + SetEmptyFieldValueData( sal_False ); return; } } @@ -2505,7 +2504,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue ) // ----------------------------------------------------------------------- -sal_Int64 FontSizeBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const +sal_Int64 FontSizeBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const { if ( !bRelative ) { diff --git a/svtools/source/control/ctrldll.cxx b/svtools/source/control/ctrldll.cxx deleted file mode 100644 index 8d6f236ab86b..000000000000 --- a/svtools/source/control/ctrldll.cxx +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#ifdef WIN -#include <svwin.h> - -#include <sysdep.hxx> - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* -***************************************************************************/ - -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 23f26d8bdaee..e65614a2c26f 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -39,10 +39,9 @@ #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <sal/macros.h> - #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include <ctrltool.hxx> +#include <svtools/ctrltool.hxx> // ======================================================================= @@ -118,7 +117,7 @@ class ImplFontListNameInfo private: XubString maSearchName; ImplFontListFontInfo* mpFirst; - USHORT mnType; + sal_uInt16 mnType; ImplFontListNameInfo( const XubString& rSearchName ) : maSearchName( rSearchName ) @@ -164,7 +163,7 @@ static void ImplMakeSearchStringFromName( XubString& rStr ) // ----------------------------------------------------------------------- -ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* pIndex ) const +ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, sal_uLong* pIndex ) const { // Wenn kein Eintrag in der Liste oder der Eintrag groesser ist als // der Letzte, dann hinten dranhaengen. Wir vergleichen erst mit dem @@ -172,7 +171,7 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p // und somit die Wahrscheinlichkeit das hinten angehaengt werden muss // sehr gross ist. StringCompare eComp; - ULONG nCnt = Count(); + sal_uLong nCnt = Count(); if ( !nCnt ) { if ( pIndex ) @@ -196,9 +195,9 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p // Fonts in der Liste suchen ImplFontListNameInfo* pCompareData; ImplFontListNameInfo* pFoundData = NULL; - ULONG nLow = 0; - ULONG nHigh = nCnt-1; - ULONG nMid; + sal_uLong nLow = 0; + sal_uLong nHigh = nCnt-1; + sal_uLong nMid; do { @@ -247,12 +246,12 @@ ImplFontListNameInfo* FontList::ImplFindByName( const XubString& rStr ) const // ----------------------------------------------------------------------- -void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, - BOOL bInsertData ) +void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll, + sal_Bool bInsertData ) { rtl_TextEncoding eSystemEncoding = gsl_getSystemTextEncoding(); - USHORT nType; + sal_uInt16 nType; if ( pDevice->GetOutDevType() != OUTDEV_PRINTER ) nType = FONTLIST_FONTNAMETYPE_SCREEN; else @@ -260,7 +259,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, // Alle Fonts vom Device abfragen int n = pDevice->GetDevFontCount(); - USHORT i; + sal_uInt16 i; for( i = 0; i < n; i++ ) { FontInfo aFontInfo = pDevice->GetDevFont( i ); @@ -272,7 +271,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, XubString aSearchName = aFontInfo.GetName(); ImplFontListNameInfo* pData; - ULONG nIndex; + sal_uLong nIndex; ImplMakeSearchString( aSearchName ); pData = ImplFind( aSearchName, &nIndex ); @@ -292,7 +291,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, { if ( bInsertData ) { - BOOL bInsert = TRUE; + sal_Bool bInsert = sal_True; ImplFontListFontInfo* pPrev = NULL; ImplFontListFontInfo* pTemp = pData->mpFirst; ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); @@ -313,7 +312,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, pTemp->mpNext = pTemp2; } delete pNewInfo; - bInsert = FALSE; + bInsert = sal_False; } break; @@ -345,8 +344,8 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, // ======================================================================= -FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) : - List( 4096, sal::static_int_cast< USHORT >(pDevice->GetDevFontCount()), 32 ) +FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll ) : + List( 4096, sal::static_int_cast< sal_uInt16 >(pDevice->GetDevFontCount()), 32 ) { // Variablen initialisieren mpDev = pDevice; @@ -363,14 +362,14 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) : maBlack = XubString( SvtResId( STR_SVT_STYLE_BLACK ) ); maBlackItalic = XubString( SvtResId( STR_SVT_STYLE_BLACK_ITALIC ) ); - ImplInsertFonts( pDevice, bAll, TRUE ); + ImplInsertFonts( pDevice, bAll, sal_True ); // Gegebenenfalls muessen wir mit den Bildschirmfonts vergleichen, // damit dort die eigentlich doppelten auf Equal mappen koennen - BOOL bCompareWindow = FALSE; + sal_Bool bCompareWindow = sal_False; if ( !pDevice2 && (pDevice->GetOutDevType() == OUTDEV_PRINTER) ) { - bCompareWindow = TRUE; + bCompareWindow = sal_True; pDevice2 = Application::GetDefaultDevice(); } @@ -528,12 +527,12 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const } // search for synthetic style - USHORT nType = pData->mnType; + sal_uInt16 nType = pData->mnType; const XubString& rStyleName = rInfo.GetStyleName(); if ( rStyleName.Len() ) { - BOOL bNotSynthetic = FALSE; - BOOL bNoneAvailable = FALSE; + sal_Bool bNotSynthetic = sal_False; + sal_Bool bNoneAvailable = sal_False; FontWeight eWeight = rInfo.GetWeight(); FontItalic eItalic = rInfo.GetItalic(); ImplFontListFontInfo* pFontInfo = pData->mpFirst; @@ -542,7 +541,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const if ( (eWeight == pFontInfo->GetWeight()) && (eItalic == pFontInfo->GetItalic()) ) { - bNotSynthetic = TRUE; + bNotSynthetic = sal_True; break; } @@ -599,7 +598,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const // ----------------------------------------------------------------------- -USHORT FontList::GetFontNameType( const XubString& rFontName ) const +sal_uInt16 FontList::GetFontNameType( const XubString& rFontName ) const { ImplFontListNameInfo* pData = ImplFindByName( rFontName ); if ( pData ) @@ -747,14 +746,14 @@ FontInfo FontList::Get( const XubString& rName, // ----------------------------------------------------------------------- -BOOL FontList::IsAvailable( const XubString& rName ) const +sal_Bool FontList::IsAvailable( const XubString& rName ) const { return (ImplFindByName( rName ) != 0); } // ----------------------------------------------------------------------- -const FontInfo& FontList::GetFontName( USHORT nFont ) const +const FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const { DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontName(): nFont >= Count" ); @@ -764,7 +763,7 @@ const FontInfo& FontList::GetFontName( USHORT nFont ) const // ----------------------------------------------------------------------- -USHORT FontList::GetFontNameType( USHORT nFont ) const +sal_uInt16 FontList::GetFontNameType( sal_uInt16 nFont ) const { DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontNameType(): nFont >= Count" ); @@ -830,8 +829,8 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) ); pDevice->SetMapMode( aMap ); - USHORT i; - USHORT nRealCount = 0; + sal_uInt16 i; + sal_uInt16 nRealCount = 0; long nOldHeight = 0; ((FontList*)this)->mpSizeAry = new long[nDevSizeCount+1]; for ( i = 0; i < nDevSizeCount; i++ ) @@ -968,7 +967,7 @@ String FontSizeNames::Size2Name( long nValue ) const //------------------------------------------------------------------------ -String FontSizeNames::GetIndexName( ULONG nIndex ) const +String FontSizeNames::GetIndexName( sal_uLong nIndex ) const { String aStr; @@ -980,7 +979,7 @@ String FontSizeNames::GetIndexName( ULONG nIndex ) const //------------------------------------------------------------------------ -long FontSizeNames::GetIndexSize( ULONG nIndex ) const +long FontSizeNames::GetIndexSize( sal_uLong nIndex ) const { if ( nIndex >= mnElem ) return 0; diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 1a1d539d0120..c8d506ad2a9a 100644..100755 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -32,7 +32,7 @@ #define _SV_FIELCTRL_CXX #include <tools/urlobj.hxx> #include <svtools/svtdata.hxx> -#include <filectrl.hxx> +#include <svtools/filectrl.hxx> #include <filectrl.hrc> // ======================================================================= @@ -46,12 +46,12 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT ) { maButton.SetClickHdl( LINK( this, FileControl, ButtonHdl ) ); - mbOpenDlg = TRUE; + mbOpenDlg = sal_True; maButton.Show(); maEdit.Show(); - SetCompoundControl( TRUE ); + SetCompoundControl( sal_True ); SetStyle( ImplInitStyle( GetStyle() ) ); } @@ -155,7 +155,7 @@ void FileControl::Resize() if( mnInternalFlags & FILECTRL_INRESIZE ) return; - mnInternalFlags |= FILECTRL_INRESIZE;//InResize = TRUE + mnInternalFlags |= FILECTRL_INRESIZE;//InResize = sal_True Size aOutSz = GetOutputSizePixel(); long nButtonTextWidth = maButton.GetTextWidth( maButtonText ); @@ -164,7 +164,7 @@ void FileControl::Resize() ( mnFlags & FILECTRL_RESIZEBUTTONBYPATHLEN ? ( maEdit.GetTextWidth( maEdit.GetText() ) <= aOutSz.Width() - nButtonTextWidth - ButtonBorder ) - : TRUE ) ) + : sal_True ) ) ) { maButton.SetText( maButtonText ); @@ -180,7 +180,7 @@ void FileControl::Resize() maEdit.SetPosSizePixel( 0, 0, aOutSz.Width()-nButtonWidth, aOutSz.Height() ); maButton.SetPosSizePixel( aOutSz.Width()-nButtonWidth, 0, nButtonWidth, aOutSz.Height() ); - mnInternalFlags &= ~FILECTRL_INRESIZE; //InResize = FALSE + mnInternalFlags &= ~FILECTRL_INRESIZE; //InResize = sal_False } // ----------------------------------------------------------------------- @@ -201,7 +201,7 @@ void FileControl::GetFocus() // ----------------------------------------------------------------------- -void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags ) +void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { WinBits nOldEditStyle = GetEdit().GetStyle(); if ( GetStyle() & WB_BORDER ) diff --git a/svtools/source/control/filectrl.src b/svtools/source/control/filectrl.src index de6cb8409ff4..5703004dd946 100644..100755 --- a/svtools/source/control/filectrl.src +++ b/svtools/source/control/filectrl.src @@ -30,3 +30,20 @@ String STR_FILECTRL_BUTTONTEXT { Text [ en-US ] = "Browse..." ; }; + +String STR_TABBAR_PUSHBUTTON_MOVET0HOME +{ + Text [ en-US ] = "Move To Home" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVELEFT +{ + Text [ en-US ] = "Move Left" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVERIGHT +{ + Text [ en-US ] = "Move Right" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVETOEND +{ + Text [ en-US ] = "Move To End" ; +};
\ No newline at end of file diff --git a/svtools/source/control/filectrl2.cxx b/svtools/source/control/filectrl2.cxx index 8cfe2c97f5ac..805b400599c8 100644..100755 --- a/svtools/source/control/filectrl2.cxx +++ b/svtools/source/control/filectrl2.cxx @@ -30,7 +30,7 @@ #include "precompiled_svtools.hxx" // this file contains code from filectrl.cxx which needs to be compiled with enabled exception hanling -#include <filectrl.hxx> +#include <svtools/filectrl.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/XFilePicker.hpp> #include <vcl/unohelp.hxx> diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 68072ce2d388..9c1ba517367c 100644..100755 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -306,7 +306,7 @@ namespace validation //============================================================================== SvNumberFormatter* FormattedField::StaticFormatter::s_cFormatter = NULL; -ULONG FormattedField::StaticFormatter::s_nReferences = 0; +sal_uLong FormattedField::StaticFormatter::s_nReferences = 0; //------------------------------------------------------------------------------ SvNumberFormatter* FormattedField::StaticFormatter::GetFormatter() @@ -346,13 +346,13 @@ DBG_NAME(FormattedField); m_aLastSelection(0,0) \ ,m_dMinValue(0) \ ,m_dMaxValue(0) \ - ,m_bHasMin(FALSE) \ - ,m_bHasMax(FALSE) \ - ,m_bStrictFormat(TRUE) \ - ,m_bValueDirty(TRUE) \ - ,m_bEnableEmptyField(TRUE) \ - ,m_bAutoColor(FALSE) \ - ,m_bEnableNaN(FALSE) \ + ,m_bHasMin(sal_False) \ + ,m_bHasMax(sal_False) \ + ,m_bStrictFormat(sal_True) \ + ,m_bValueDirty(sal_True) \ + ,m_bEnableEmptyField(sal_True) \ + ,m_bAutoColor(sal_False) \ + ,m_bEnableNaN(sal_False) \ ,m_dCurrentValue(0) \ ,m_dDefaultValue(0) \ ,m_nFormatKey(0) \ @@ -360,12 +360,12 @@ DBG_NAME(FormattedField); ,m_dSpinSize(1) \ ,m_dSpinFirst(-1000000) \ ,m_dSpinLast(1000000) \ - ,m_bTreatAsNumber(TRUE) \ + ,m_bTreatAsNumber(sal_True) \ ,m_pLastOutputColor(NULL) \ ,m_bUseInputStringForFormatting(false) //------------------------------------------------------------------------------ -FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, INT32 nFormatKey) +FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey) :SpinField(pParent, nStyle) ,INIT_MEMBERS() { @@ -379,7 +379,7 @@ FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatte } //------------------------------------------------------------------------------ -FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter, INT32 nFormatKey) +FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey) :SpinField(pParent, rResId) ,INIT_MEMBERS() { @@ -409,7 +409,7 @@ void FormattedField::SetValidateText(const XubString& rText, const String* pErro if (pErrorText) ImplSetTextImpl(*pErrorText, NULL); else - ImplSetValue(m_dDefaultValue, TRUE); + ImplSetValue(m_dDefaultValue, sal_True); } //------------------------------------------------------------------------------ @@ -418,7 +418,7 @@ void FormattedField::SetText(const XubString& rStr) DBG_CHKTHIS(FormattedField, NULL); SpinField::SetText(rStr); - m_bValueDirty = TRUE; + m_bValueDirty = sal_True; } //------------------------------------------------------------------------------ @@ -427,7 +427,7 @@ void FormattedField::SetText( const XubString& rStr, const Selection& rNewSelect DBG_CHKTHIS(FormattedField, NULL); SpinField::SetText( rStr, rNewSelection ); - m_bValueDirty = TRUE; + m_bValueDirty = sal_True; } //------------------------------------------------------------------------------ @@ -456,8 +456,8 @@ void FormattedField::SetTextFormatted(const XubString& rStr) Selection aSel(GetSelection()); Selection aNewSel(aSel); aNewSel.Justify(); - USHORT nNewLen = sFormatted.Len(); - USHORT nCurrentLen = GetText().Len(); + sal_uInt16 nNewLen = sFormatted.Len(); + sal_uInt16 nCurrentLen = GetText().Len(); if ((nNewLen > nCurrentLen) && (aNewSel.Max() == nCurrentLen)) { // the new text is longer and the cursor was behind the last char (of the old text) if (aNewSel.Min() == 0) @@ -465,7 +465,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr) aNewSel.Max() = nNewLen; if (!nCurrentLen) { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options - ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); + sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); if (nSelOptions & SELECTION_OPTION_SHOWFIRST) { // selection should be from right to left -> swap min and max aNewSel.Min() = aNewSel.Max(); @@ -484,7 +484,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr) else aNewSel = aSel; // don't use the justified version SpinField::SetText(sFormatted, aNewSel); - m_bValueDirty = FALSE; + m_bValueDirty = sal_False; } //------------------------------------------------------------------------------ @@ -493,13 +493,13 @@ String FormattedField::GetTextValue() const if (m_bValueDirty) { ((FormattedField*)this)->m_sCurrentTextValue = GetText(); - ((FormattedField*)this)->m_bValueDirty = FALSE; + ((FormattedField*)this)->m_bValueDirty = sal_False; } return m_sCurrentTextValue; } //------------------------------------------------------------------------------ -void FormattedField::EnableNotANumber( BOOL _bEnable ) +void FormattedField::EnableNotANumber( sal_Bool _bEnable ) { if ( m_bEnableNaN == _bEnable ) return; @@ -508,7 +508,7 @@ void FormattedField::EnableNotANumber( BOOL _bEnable ) } //------------------------------------------------------------------------------ -void FormattedField::SetAutoColor(BOOL _bAutomatic) +void FormattedField::SetAutoColor(sal_Bool _bAutomatic) { if (_bAutomatic == m_bAutoColor) return; @@ -530,7 +530,7 @@ void FormattedField::Modify() if (!IsStrictFormat()) { - m_bValueDirty = TRUE; + m_bValueDirty = sal_True; SpinField::Modify(); return; } @@ -540,7 +540,7 @@ void FormattedField::Modify() { m_sLastValidText = sCheck; m_aLastSelection = GetSelection(); - m_bValueDirty = TRUE; + m_bValueDirty = sal_True; } else { @@ -570,8 +570,8 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel) Selection aSel(GetSelection()); aSel.Justify(); - USHORT nNewLen = rNew.Len(); - USHORT nCurrentLen = GetText().Len(); + sal_uInt16 nNewLen = rNew.Len(); + sal_uInt16 nCurrentLen = GetText().Len(); if ((nNewLen > nCurrentLen) && (aSel.Max() == nCurrentLen)) { // new new text is longer and the cursor is behind the last char @@ -580,7 +580,7 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel) aSel.Max() = nNewLen; if (!nCurrentLen) { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options - ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); + sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); if (nSelOptions & SELECTION_OPTION_SHOWFIRST) { // selection should be from right to left -> swap min and max aSel.Min() = aSel.Max(); @@ -599,7 +599,7 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel) SpinField::SetText(rNew, aSel); } - m_bValueDirty = TRUE; + m_bValueDirty = sal_True; // muss nicht stimmen, aber sicherheitshalber ... } @@ -613,12 +613,12 @@ long FormattedField::PreNotify(NotifyEvent& rNEvt) } //------------------------------------------------------------------------------ -void FormattedField::ImplSetFormatKey(ULONG nFormatKey) +void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey) { DBG_CHKTHIS(FormattedField, NULL); m_nFormatKey = nFormatKey; - BOOL bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0); + sal_Bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0); if (bNeedFormatter) { ImplGetFormatter(); // damit wird ein Standard-Formatter angelegt @@ -633,16 +633,16 @@ void FormattedField::ImplSetFormatKey(ULONG nFormatKey) } //------------------------------------------------------------------------------ -void FormattedField::SetFormatKey(ULONG nFormatKey) +void FormattedField::SetFormatKey(sal_uLong nFormatKey) { DBG_CHKTHIS(FormattedField, NULL); - BOOL bNoFormatter = (m_pFormatter == NULL); + sal_Bool bNoFormatter = (m_pFormatter == NULL); ImplSetFormatKey(nFormatKey); FormatChanged((bNoFormatter && (m_pFormatter != NULL)) ? FCT_FORMATTER : FCT_KEYONLY); } //------------------------------------------------------------------------------ -void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetFormat) +void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat) { DBG_CHKTHIS(FormattedField, NULL); @@ -676,7 +676,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetForm LanguageType aNewLang = pDefaultEntry ? pDefaultEntry->GetLanguage() : LANGUAGE_DONTKNOW; // den alten Format-String in die neue Sprache konvertieren - USHORT nCheckPos; + sal_uInt16 nCheckPos; short nType; pFormatter->PutandConvertEntry(sOldFormat, nCheckPos, nType, nDestKey, aOldLang, aNewLang); m_nFormatKey = nDestKey; @@ -698,47 +698,47 @@ void FormattedField::GetFormat(XubString& rFormatString, LanguageType& eLang) co } //------------------------------------------------------------------------------ -BOOL FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang) +sal_Bool FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang) { DBG_CHKTHIS(FormattedField, NULL); sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang); if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND) { - USHORT nCheckPos; + sal_uInt16 nCheckPos; short nType; XubString rFormat(rFormatString); if (!ImplGetFormatter()->PutEntry(rFormat, nCheckPos, nType, nNewKey, eLang)) - return FALSE; + return sal_False; DBG_ASSERT(nNewKey != NUMBERFORMAT_ENTRY_NOT_FOUND, "FormattedField::SetFormatString : PutEntry returned an invalid key !"); } if (nNewKey != m_nFormatKey) SetFormatKey(nNewKey); - return TRUE; + return sal_True; } //------------------------------------------------------------------------------ -BOOL FormattedField::GetThousandsSep() const +sal_Bool FormattedField::GetThousandsSep() const { DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey), "FormattedField::GetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?"); - BOOL bThousand, IsRed; - USHORT nPrecision, nAnzLeading; + sal_Bool bThousand, IsRed; + sal_uInt16 nPrecision, nAnzLeading; ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading); return bThousand; } //------------------------------------------------------------------------------ -void FormattedField::SetThousandsSep(BOOL _bUseSeparator) +void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator) { DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey), "FormattedField::SetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?"); // get the current settings - BOOL bThousand, IsRed; - USHORT nPrecision, nAnzLeading; + sal_Bool bThousand, IsRed; + sal_uInt16 nPrecision, nAnzLeading; ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading); if (bThousand == _bUseSeparator) return; @@ -751,7 +751,7 @@ void FormattedField::SetThousandsSep(BOOL _bUseSeparator) // generate a new format ... ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading); // ... and introduce it to the formatter - USHORT nCheckPos; + sal_uInt16 nCheckPos; sal_uInt32 nNewKey; short nType; ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang); @@ -762,27 +762,27 @@ void FormattedField::SetThousandsSep(BOOL _bUseSeparator) } //------------------------------------------------------------------------------ -USHORT FormattedField::GetDecimalDigits() const +sal_uInt16 FormattedField::GetDecimalDigits() const { DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey), "FormattedField::GetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?"); - BOOL bThousand, IsRed; - USHORT nPrecision, nAnzLeading; + sal_Bool bThousand, IsRed; + sal_uInt16 nPrecision, nAnzLeading; ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading); return nPrecision; } //------------------------------------------------------------------------------ -void FormattedField::SetDecimalDigits(USHORT _nPrecision) +void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision) { DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey), "FormattedField::SetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?"); // get the current settings - BOOL bThousand, IsRed; - USHORT nPrecision, nAnzLeading; + sal_Bool bThousand, IsRed; + sal_uInt16 nPrecision, nAnzLeading; ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading); if (nPrecision == _nPrecision) return; @@ -795,7 +795,7 @@ void FormattedField::SetDecimalDigits(USHORT _nPrecision) // generate a new format ... ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading); // ... and introduce it to the formatter - USHORT nCheckPos; + sal_uInt16 nCheckPos; sal_uInt32 nNewKey; short nType; ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang); @@ -831,7 +831,7 @@ void FormattedField::Commit() { // consider the field as modified Modify(); // but we have the most recent value now - m_bValueDirty = FALSE; + m_bValueDirty = sal_False; } } @@ -845,7 +845,7 @@ void FormattedField::ReFormat() double dValue = GetValue(); if ( m_bEnableNaN && ::rtl::math::isNan( dValue ) ) return; - ImplSetValue( dValue, TRUE ); + ImplSetValue( dValue, sal_True ); } else SetTextFormatted(GetTextValue()); @@ -860,7 +860,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt) if ((rNEvt.GetType() == EVENT_KEYINPUT) && !IsReadOnly()) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); - USHORT nMod = rKEvt.GetKeyCode().GetModifier(); + sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); switch ( rKEvt.GetKeyCode().GetCode() ) { case KEY_UP: @@ -901,7 +901,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt) { if (TreatingAsNumber()) { - ImplSetValue(m_dCurrentValue, TRUE); + ImplSetValue(m_dCurrentValue, sal_True); Modify(); } else @@ -912,7 +912,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt) else SetTextFormatted(m_sDefaultText); } - m_bValueDirty = FALSE; + m_bValueDirty = sal_False; } } else @@ -931,7 +931,7 @@ void FormattedField::SetMinValue(double dMin) DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMinValue : only to be used in numeric mode !"); m_dMinValue = dMin; - m_bHasMin = TRUE; + m_bHasMin = sal_True; // fuer die Ueberpruefung des aktuellen Wertes an der neuen Grenze -> ImplSetValue ReFormat(); } @@ -943,7 +943,7 @@ void FormattedField::SetMaxValue(double dMax) DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMaxValue : only to be used in numeric mode !"); m_dMaxValue = dMax; - m_bHasMax = TRUE; + m_bHasMax = sal_True; // fuer die Ueberpruefung des aktuellen Wertes an der neuen Grenze -> ImplSetValue ReFormat(); } @@ -957,7 +957,7 @@ void FormattedField::SetTextValue(const XubString& rText) } //------------------------------------------------------------------------------ -void FormattedField::EnableEmptyField(BOOL bEnable) +void FormattedField::EnableEmptyField(sal_Bool bEnable) { DBG_CHKTHIS(FormattedField, NULL); if (bEnable == m_bEnableEmptyField) @@ -965,11 +965,11 @@ void FormattedField::EnableEmptyField(BOOL bEnable) m_bEnableEmptyField = bEnable; if (!m_bEnableEmptyField && GetText().Len()==0) - ImplSetValue(m_dCurrentValue, TRUE); + ImplSetValue(m_dCurrentValue, sal_True); } //------------------------------------------------------------------------------ -void FormattedField::ImplSetValue(double dVal, BOOL bForce) +void FormattedField::ImplSetValue(double dVal, sal_Bool bForce) { DBG_CHKTHIS(FormattedField, NULL); @@ -982,7 +982,7 @@ void FormattedField::ImplSetValue(double dVal, BOOL bForce) DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplSetValue : can't set a value without a formatter !"); - m_bValueDirty = FALSE; + m_bValueDirty = sal_False; m_dCurrentValue = dVal; String sNewText; @@ -1003,23 +1003,23 @@ void FormattedField::ImplSetValue(double dVal, BOOL bForce) } ImplSetTextImpl(sNewText, NULL); - m_bValueDirty = FALSE; + m_bValueDirty = sal_False; DBG_ASSERT(CheckText(sNewText), "FormattedField::ImplSetValue : formatted string doesn't match the criteria !"); } //------------------------------------------------------------------------------ -BOOL FormattedField::ImplGetValue(double& dNewVal) +sal_Bool FormattedField::ImplGetValue(double& dNewVal) { DBG_CHKTHIS(FormattedField, NULL); dNewVal = m_dCurrentValue; if (!m_bValueDirty) - return TRUE; + return sal_True; dNewVal = m_dDefaultValue; String sText(GetText()); if (!sText.Len()) - return TRUE; + return sal_True; DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !"); @@ -1035,7 +1035,7 @@ BOOL FormattedField::ImplGetValue(double& dNewVal) // the language of our format LanguageType eLanguage = m_pFormatter->GetEntry(m_nFormatKey)->GetLanguage(); // the default number format for this language - ULONG nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage); + sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage); sal_uInt32 nTempFormat = nStandardNumericFormat; double dTemp; @@ -1049,14 +1049,14 @@ BOOL FormattedField::ImplGetValue(double& dNewVal) // which equals 300 percent. } if (!ImplGetFormatter()->IsNumberFormat(sText, nFormatKey, dNewVal)) - return FALSE; + return sal_False; if (m_bHasMin && (dNewVal<m_dMinValue)) dNewVal = m_dMinValue; if (m_bHasMax && (dNewVal>m_dMaxValue)) dNewVal = m_dMaxValue; - return TRUE; + return sal_True; } //------------------------------------------------------------------------------ @@ -1079,7 +1079,7 @@ double FormattedField::GetValue() m_dCurrentValue = m_dDefaultValue; } - m_bValueDirty = FALSE; + m_bValueDirty = sal_False; return m_dCurrentValue; } @@ -1166,7 +1166,7 @@ void DoubleNumericField::FormatChanged(FORMAT_CHANGE_TYPE nWhat) } //------------------------------------------------------------------------------ -BOOL DoubleNumericField::CheckText(const XubString& sText) const +sal_Bool DoubleNumericField::CheckText(const XubString& sText) const { // We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't // recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10") @@ -1174,19 +1174,19 @@ BOOL DoubleNumericField::CheckText(const XubString& sText) const #ifdef REGEXP_SUPPORT if (!sText.Len()) - return TRUE; + return sal_True; String sForceComplete = '_'; sForceComplete += sText; sForceComplete += '_'; - USHORT nStart = 0, nEnd = sForceComplete.Len(); - BOOL bFound = m_pConformanceTester->SearchFrwrd(sForceComplete, &nStart, &nEnd); + sal_uInt16 nStart = 0, nEnd = sForceComplete.Len(); + sal_Bool bFound = m_pConformanceTester->SearchFrwrd(sForceComplete, &nStart, &nEnd); if (bFound && (nStart == 0) && (nEnd == sForceComplete.Len())) - return TRUE; + return sal_True; - return FALSE; + return sal_False; #else return m_pNumberValidator->isValidNumericFragment( sText ); #endif @@ -1252,9 +1252,9 @@ void DoubleNumericField::ResetConformanceTester() //------------------------------------------------------------------------------ DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle) :FormattedField(pParent, nStyle) - ,m_bChangingFormat(FALSE) + ,m_bChangingFormat(sal_False) { - m_bPrependCurrSym = FALSE; + m_bPrependCurrSym = sal_False; // initialize with a system currency format m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol(); @@ -1264,9 +1264,9 @@ DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle) //------------------------------------------------------------------------------ DoubleCurrencyField::DoubleCurrencyField(Window* pParent, const ResId& rResId) :FormattedField(pParent, rResId) - ,m_bChangingFormat(FALSE) + ,m_bChangingFormat(sal_False) { - m_bPrependCurrSym = FALSE; + m_bPrependCurrSym = sal_False; // initialize with a system currency format m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol(); @@ -1313,7 +1313,7 @@ void DoubleCurrencyField::setCurrencySymbol(const String& _sSymbol) } //------------------------------------------------------------------------------ -void DoubleCurrencyField::setPrependCurrSym(BOOL _bPrepend) +void DoubleCurrencyField::setPrependCurrSym(sal_Bool _bPrepend) { if (m_bPrependCurrSym == _bPrepend) return; @@ -1330,8 +1330,8 @@ void DoubleCurrencyField::UpdateCurrencyFormat() XubString sOldFormat; LanguageType eLanguage; GetFormat(sOldFormat, eLanguage); - BOOL bThSep = GetThousandsSep(); - USHORT nDigits = GetDecimalDigits(); + sal_Bool bThSep = GetThousandsSep(); + sal_uInt16 nDigits = GetDecimalDigits(); // build a new format string with the base class' and my own settings Locale aLocale; @@ -1391,9 +1391,9 @@ void DoubleCurrencyField::UpdateCurrencyFormat() } // set this new basic format - m_bChangingFormat = TRUE; + m_bChangingFormat = sal_True; SetFormat(sNewFormat, eLanguage); - m_bChangingFormat = FALSE; + m_bChangingFormat = sal_False; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 38c233b27699..2b22996c0486 100644..100755 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -42,10 +42,10 @@ struct ImplHeadItem { - USHORT mnId; + sal_uInt16 mnId; HeaderBarItemBits mnBits; long mnSize; - ULONG mnHelpId; + rtl::OString maHelpId; Image maImage; XubString maOutText; XubString maText; @@ -65,8 +65,8 @@ struct ImplHeadItem #define HEADERBAR_DRAGOFF 4 #define HEADERBAR_DRAGOUTOFF 15 -#define HEAD_HITTEST_ITEM ((USHORT)0x0001) -#define HEAD_HITTEST_DIVIDER ((USHORT)0x0002) +#define HEAD_HITTEST_ITEM ((sal_uInt16)0x0001) +#define HEAD_HITTEST_DIVIDER ((sal_uInt16)0x0002) // ======================================================================= @@ -84,20 +84,20 @@ void HeaderBar::ImplInit( WinBits nWinStyle ) mnMouseOff = 0; mnCurItemId = 0; mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; - mbDrag = FALSE; - mbItemDrag = FALSE; - mbOutDrag = FALSE; - mbItemMode = FALSE; + mbDrag = sal_False; + mbItemDrag = sal_False; + mbOutDrag = sal_False; + mbItemMode = sal_False; // StyleBits auswerten if ( nWinStyle & WB_DRAG ) - mbDragable = TRUE; + mbDragable = sal_True; else - mbDragable = FALSE; + mbDragable = sal_False; if ( nWinStyle & WB_BUTTONSTYLE ) - mbButtonStyle = TRUE; + mbButtonStyle = sal_True; else - mbButtonStyle = FALSE; + mbButtonStyle = sal_False; if ( nWinStyle & WB_BORDER ) { mnBorderOff1 = 1; @@ -109,7 +109,7 @@ void HeaderBar::ImplInit( WinBits nWinStyle ) mnBorderOff2 = 1; } - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); } // ----------------------------------------------------------------------- @@ -143,8 +143,8 @@ HeaderBar::~HeaderBar() // ----------------------------------------------------------------------- -void HeaderBar::ImplInitSettings( BOOL bFont, - BOOL bForeground, BOOL bBackground ) +void HeaderBar::ImplInitSettings( sal_Bool bFont, + sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -181,7 +181,7 @@ void HeaderBar::ImplInitSettings( BOOL bFont, // ----------------------------------------------------------------------- -long HeaderBar::ImplGetItemPos( USHORT nPos ) const +long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const { long nX = -mnOffset; for ( size_t i = 0; i < nPos; i++ ) @@ -191,7 +191,7 @@ long HeaderBar::ImplGetItemPos( USHORT nPos ) const // ----------------------------------------------------------------------- -Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const +Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const { Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 ); aRect.Right() = aRect.Left() + (*mpItemList)[ nPos ]->mnSize - 1; @@ -203,12 +203,12 @@ Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const // ----------------------------------------------------------------------- -USHORT HeaderBar::ImplHitTest( const Point& rPos, - long& nMouseOff, USHORT& nPos ) const +sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos, + long& nMouseOff, sal_uInt16& nPos ) const { ImplHeadItem* pItem; - size_t nCount = (USHORT)mpItemList->size(); - BOOL bLastFixed = TRUE; + size_t nCount = (sal_uInt16)mpItemList->size(); + sal_Bool bLastFixed = sal_True; long nX = -mnOffset; for ( size_t i = 0; i < nCount; i++ ) @@ -217,7 +217,7 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos, if ( rPos.X() < (nX+pItem->mnSize) ) { - USHORT nMode; + sal_uInt16 nMode; if ( !bLastFixed && (rPos.X() < (nX+HEADERBAR_SPLITOFF)) ) { @@ -245,9 +245,9 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos, } if ( pItem->mnBits & HIB_FIXED ) - bLastFixed = TRUE; + bLastFixed = sal_True; else - bLastFixed = FALSE; + bLastFixed = sal_False; nX += pItem->mnSize; } @@ -268,7 +268,7 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos, // ----------------------------------------------------------------------- -void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos ) +void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) { Rectangle aRect1 = ImplGetItemRect( nStartPos ); Rectangle aRect2 = ImplGetItemRect( nEndPos ); @@ -317,10 +317,10 @@ void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos ) // ----------------------------------------------------------------------- void HeaderBar::ImplDrawItem( OutputDevice* pDev, - USHORT nPos, BOOL bHigh, BOOL bDrag, + sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag, const Rectangle& rItemRect, const Rectangle* pRect, - ULONG ) + sal_uLong ) { Rectangle aRect = rItemRect; @@ -374,9 +374,9 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, // avoid 3D borders Color aSelectionTextColor( COL_TRANSPARENT ); if( bHigh ) - DrawSelectionBackground( aRect, 1, TRUE, FALSE, FALSE, &aSelectionTextColor ); + DrawSelectionBackground( aRect, 1, sal_True, sal_False, sal_False, &aSelectionTextColor ); else if ( !mbButtonStyle || (nBits & HIB_FLAT) ) - DrawSelectionBackground( aRect, 0, TRUE, FALSE, FALSE, &aSelectionTextColor ); + DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False, &aSelectionTextColor ); // Wenn kein Platz, dann brauchen wir auch nichts ausgeben if ( aRect.GetWidth() < 1 ) @@ -403,14 +403,14 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, } // Text auf entsprechende Laenge kuerzen - BOOL bLeftText = FALSE; + sal_Bool bLeftText = sal_False; long nMaxTxtWidth = aRect.GetWidth()-(HEADERBAR_TEXTOFF*2)-nArrowWidth; if ( nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE) ) nMaxTxtWidth -= aImageSize.Width(); long nTxtWidth = aTxtSize.Width(); if ( nTxtWidth > nMaxTxtWidth ) { - bLeftText = TRUE; + bLeftText = sal_True; // 3 == Len of "..." pItem->maOutText.AppendAscii( "..." ); do @@ -544,7 +544,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, } if ( nImagePos+aImageSize.Width() <= aRect.Right() ) { - USHORT nStyle = 0; + sal_uInt16 nStyle = 0; if ( !IsEnabled() ) nStyle |= IMAGE_DRAW_DISABLE; pDev->DrawImage( Point( nImagePos, nImagePosY ), pItem->maImage, nStyle ); @@ -567,11 +567,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, } // Feststellen, ob Platz genug ist, das Item zu malen - BOOL bDraw = TRUE; + sal_Bool bDraw = sal_True; if ( nArrowX < aRect.Left()+HEADERBAR_TEXTOFF ) - bDraw = FALSE; + bDraw = sal_False; else if ( nArrowX+HEAD_ARROWSIZE2 > aRect.Right() ) - bDraw = FALSE; + bDraw = sal_False; if ( bDraw ) { @@ -630,7 +630,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, // ----------------------------------------------------------------------- -void HeaderBar::ImplDrawItem( USHORT nPos, BOOL bHigh, BOOL bDrag, +void HeaderBar::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag, const Rectangle* pRect ) { Rectangle aRect = ImplGetItemRect( nPos ); @@ -639,7 +639,7 @@ void HeaderBar::ImplDrawItem( USHORT nPos, BOOL bHigh, BOOL bDrag, // ----------------------------------------------------------------------- -void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) +void HeaderBar::ImplUpdate( sal_uInt16 nPos, sal_Bool bEnd, sal_Bool bDirect ) { if ( IsVisible() && IsUpdateMode() ) { @@ -667,7 +667,7 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) ImplDrawItem( i ); if ( bEnd ) { - Rectangle aRect = ImplGetItemRect( (USHORT)mpItemList->size() ); + Rectangle aRect = ImplGetItemRect( (sal_uInt16)mpItemList->size() ); aRect.Left() = aRect.Right(); aRect.Right() = mnDX-1; if ( aRect.Left() < aRect.Right() ) @@ -683,31 +683,31 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) // ----------------------------------------------------------------------- -void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand ) +void HeaderBar::ImplStartDrag( const Point& rMousePos, sal_Bool bCommand ) { - USHORT nPos; - USHORT nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos ); + sal_uInt16 nPos; + sal_uInt16 nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos ); if ( nHitTest ) { - mbDrag = FALSE; + mbDrag = sal_False; ImplHeadItem* pItem = (*mpItemList)[ nPos ]; if ( nHitTest & HEAD_HITTEST_DIVIDER ) - mbDrag = TRUE; + mbDrag = sal_True; else { if ( ((pItem->mnBits & HIB_CLICKABLE) && !(pItem->mnBits & HIB_FLAT)) || (mbDragable && !(pItem->mnBits & HIB_FIXEDPOS)) ) { - mbItemMode = TRUE; - mbDrag = TRUE; + mbItemMode = sal_True; + mbDrag = sal_True; if ( bCommand ) { if ( mbDragable ) - mbItemDrag = TRUE; + mbItemDrag = sal_True; else { - mbItemMode = FALSE; - mbDrag = FALSE; + mbItemMode = sal_False; + mbDrag = sal_False; } } } @@ -724,7 +724,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand ) if ( mbDrag ) { - mbOutDrag = FALSE; + mbOutDrag = sal_False; mnCurItemId = pItem->mnId; mnItemDragPos = nPos; StartTracking(); @@ -732,7 +732,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand ) mnDragPos = mnStartPos; StartDrag(); if ( mbItemMode ) - ImplDrawItem( nPos, TRUE, mbItemDrag ); + ImplDrawItem( nPos, sal_True, mbItemDrag ); else { Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); @@ -748,17 +748,17 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand ) void HeaderBar::ImplDrag( const Point& rMousePos ) { - BOOL bNewOutDrag; - USHORT nPos = GetItemPos( mnCurItemId ); + sal_Bool bNewOutDrag; + sal_uInt16 nPos = GetItemPos( mnCurItemId ); mnDragPos = rMousePos.X()-mnMouseOff; if ( mbItemMode ) { Rectangle aItemRect = ImplGetItemRect( nPos ); if ( aItemRect.IsInside( rMousePos ) ) - bNewOutDrag = FALSE; + bNewOutDrag = sal_False; else - bNewOutDrag = TRUE; + bNewOutDrag = sal_True; // Evt. ItemDrag anschalten if ( bNewOutDrag && mbDragable && !mbItemDrag && @@ -766,24 +766,24 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) { if ( (rMousePos.Y() >= aItemRect.Top()) && (rMousePos.Y() <= aItemRect.Bottom()) ) { - mbItemDrag = TRUE; - ImplDrawItem( nPos, TRUE, mbItemDrag ); + mbItemDrag = sal_True; + ImplDrawItem( nPos, sal_True, mbItemDrag ); } } - USHORT nOldItemDragPos = mnItemDragPos; + sal_uInt16 nOldItemDragPos = mnItemDragPos; if ( mbItemDrag ) { if ( (rMousePos.Y() < -HEADERBAR_DRAGOUTOFF) || (rMousePos.Y() > mnDY+HEADERBAR_DRAGOUTOFF) ) - bNewOutDrag = TRUE; + bNewOutDrag = sal_True; else - bNewOutDrag = FALSE; + bNewOutDrag = sal_False; if ( bNewOutDrag ) mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; else { - USHORT nTempId = GetItemId( Point( rMousePos.X(), 2 ) ); + sal_uInt16 nTempId = GetItemId( Point( rMousePos.X(), 2 ) ); if ( nTempId ) mnItemDragPos = GetItemPos( nTempId ); else @@ -827,7 +827,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) (mnItemDragPos != nPos) && (mnItemDragPos != HEADERBAR_ITEM_NOTFOUND) ) { - ImplDrawItem( mnItemDragPos, FALSE, TRUE ); + ImplDrawItem( mnItemDragPos, sal_False, sal_True ); ImplInvertDrag( nPos, mnItemDragPos ); } } @@ -853,7 +853,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) // ----------------------------------------------------------------------- -void HeaderBar::ImplEndDrag( BOOL bCancel ) +void HeaderBar::ImplEndDrag( sal_Bool bCancel ) { HideTracking(); @@ -861,7 +861,7 @@ void HeaderBar::ImplEndDrag( BOOL bCancel ) { if ( mbItemMode && (!mbOutDrag || mbItemDrag) ) { - USHORT nPos = GetItemPos( mnCurItemId ); + sal_uInt16 nPos = GetItemPos( mnCurItemId ); ImplDrawItem( nPos ); } @@ -869,7 +869,7 @@ void HeaderBar::ImplEndDrag( BOOL bCancel ) } else { - USHORT nPos = GetItemPos( mnCurItemId ); + sal_uInt16 nPos = GetItemPos( mnCurItemId ); if ( mbItemMode ) { if ( mbItemDrag ) @@ -898,18 +898,18 @@ void HeaderBar::ImplEndDrag( BOOL bCancel ) { ImplHeadItem* pItem = (*mpItemList)[ nPos ]; pItem->mnSize += nDelta; - ImplUpdate( nPos, TRUE ); + ImplUpdate( nPos, sal_True ); } } } - mbDrag = FALSE; + mbDrag = sal_False; EndDrag(); mnCurItemId = 0; mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; - mbOutDrag = FALSE; - mbItemMode = FALSE; - mbItemDrag = FALSE; + mbOutDrag = sal_False; + mbItemMode = sal_False; + mbItemDrag = sal_False; } // ----------------------------------------------------------------------- @@ -921,23 +921,23 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt ) if ( rMEvt.GetClicks() == 2 ) { long nTemp; - USHORT nPos; - USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos ); + sal_uInt16 nPos; + sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos ); if ( nHitTest ) { ImplHeadItem* pItem = (*mpItemList)[ nPos ]; if ( nHitTest & HEAD_HITTEST_DIVIDER ) - mbItemMode = FALSE; + mbItemMode = sal_False; else - mbItemMode = TRUE; + mbItemMode = sal_True; mnCurItemId = pItem->mnId; DoubleClick(); - mbItemMode = FALSE; + mbItemMode = sal_False; mnCurItemId = 0; } } else - ImplStartDrag( rMEvt.GetPosPixel(), FALSE ); + ImplStartDrag( rMEvt.GetPosPixel(), sal_False ); } } @@ -946,9 +946,9 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt ) void HeaderBar::MouseMove( const MouseEvent& rMEvt ) { long nTemp1; - USHORT nTemp2; + sal_uInt16 nTemp2; PointerStyle eStyle = POINTER_ARROW; - USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 ); + sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 ); if ( nHitTest & HEAD_HITTEST_DIVIDER ) eStyle = POINTER_HSIZEBAR; @@ -987,20 +987,20 @@ void HeaderBar::Paint( const Rectangle& rRect ) } } - USHORT nCurItemPos; + sal_uInt16 nCurItemPos; if ( mbDrag ) nCurItemPos = GetItemPos( mnCurItemId ); else nCurItemPos = HEADERBAR_ITEM_NOTFOUND; - USHORT nItemCount = (USHORT)mpItemList->size(); - for ( USHORT i = 0; i < nItemCount; i++ ) - ImplDrawItem( i, (i == nCurItemPos) ? TRUE : FALSE, FALSE, &rRect ); + sal_uInt16 nItemCount = (sal_uInt16)mpItemList->size(); + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) + ImplDrawItem( i, (i == nCurItemPos) ? sal_True : sal_False, sal_False, &rRect ); } // ----------------------------------------------------------------------- void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - ULONG nFlags ) + sal_uLong nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1046,7 +1046,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, aItemRect.Right() = 16000; Region aRegion( aRect ); pDev->SetClipRegion( aRegion ); - ImplDrawItem( pDev, i, FALSE, FALSE, aItemRect, &aRect, nFlags ); + ImplDrawItem( pDev, i, sal_False, sal_False, aItemRect, &aRect, nFlags ); pDev->SetClipRegion(); } @@ -1070,7 +1070,7 @@ void HeaderBar::Command( const CommandEvent& rCEvt ) { if ( rCEvt.IsMouseEvent() && (rCEvt.GetCommand() == COMMAND_STARTDRAG) && !mbDrag ) { - ImplStartDrag( rCEvt.GetMousePosPixel(), TRUE ); + ImplStartDrag( rCEvt.GetMousePosPixel(), sal_True ); return; } @@ -1081,7 +1081,7 @@ void HeaderBar::Command( const CommandEvent& rCEvt ) void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); if ( nItemId ) { if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) ) @@ -1118,13 +1118,13 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { - ULONG nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -1144,17 +1144,17 @@ void HeaderBar::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE, FALSE ); + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } } @@ -1170,7 +1170,7 @@ void HeaderBar::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); Invalidate(); } } @@ -1218,8 +1218,8 @@ void HeaderBar::DoubleClick() // ----------------------------------------------------------------------- -void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage, - long nSize, HeaderBarItemBits nBits, USHORT nPos ) +void HeaderBar::InsertItem( sal_uInt16 nItemId, const Image& rImage, + long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND, @@ -1241,13 +1241,13 @@ void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage, } // Ausgabe updaten - ImplUpdate( nPos, TRUE ); + ImplUpdate( nPos, sal_True ); } // ----------------------------------------------------------------------- -void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText, - long nSize, HeaderBarItemBits nBits, USHORT nPos ) +void HeaderBar::InsertItem( sal_uInt16 nItemId, const XubString& rText, + long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND, @@ -1258,7 +1258,6 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText, pItem->mnId = nItemId; pItem->mnBits = nBits; pItem->mnSize = nSize; - pItem->mnHelpId = 0; pItem->maText = rText; pItem->mpUserData = 0; if ( nPos < mpItemList->size() ) { @@ -1270,15 +1269,15 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText, } // Ausgabe updaten - ImplUpdate( nPos, TRUE ); + ImplUpdate( nPos, sal_True ); } // ----------------------------------------------------------------------- -void HeaderBar::InsertItem( USHORT nItemId, +void HeaderBar::InsertItem( sal_uInt16 nItemId, const Image& rImage, const XubString& rText, long nSize, HeaderBarItemBits nBits, - USHORT nPos ) + sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND, @@ -1289,7 +1288,6 @@ void HeaderBar::InsertItem( USHORT nItemId, pItem->mnId = nItemId; pItem->mnBits = nBits; pItem->mnSize = nSize; - pItem->mnHelpId = 0; pItem->maImage = rImage; pItem->maText = rText; pItem->mpUserData = 0; @@ -1302,14 +1300,14 @@ void HeaderBar::InsertItem( USHORT nItemId, } // Ausgabe updaten - ImplUpdate( nPos, TRUE ); + ImplUpdate( nPos, sal_True ); } // ----------------------------------------------------------------------- -void HeaderBar::RemoveItem( USHORT nItemId ) +void HeaderBar::RemoveItem( sal_uInt16 nItemId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { if ( nPos < mpItemList->size() ) { @@ -1318,15 +1316,14 @@ void HeaderBar::RemoveItem( USHORT nItemId ) delete *it; mpItemList->erase( it ); } - ImplUpdate( nPos, TRUE ); } } // ----------------------------------------------------------------------- -void HeaderBar::MoveItem( USHORT nItemId, USHORT nNewPos ) +void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { if ( nPos != nNewPos ) @@ -1340,7 +1337,6 @@ void HeaderBar::MoveItem( USHORT nItemId, USHORT nNewPos ) it = mpItemList->begin(); ::std::advance( it, nPos ); mpItemList->insert( it, pItem ); - ImplUpdate( nPos, TRUE ); } } } @@ -1355,7 +1351,7 @@ void HeaderBar::Clear() } mpItemList->clear(); - ImplUpdate( 0, TRUE ); + ImplUpdate( 0, sal_True ); } // ----------------------------------------------------------------------- @@ -1371,26 +1367,26 @@ void HeaderBar::SetOffset( long nNewOffset ) // ----------------------------------------------------------------------- -USHORT HeaderBar::GetItemCount() const +sal_uInt16 HeaderBar::GetItemCount() const { - return (USHORT)mpItemList->size(); + return (sal_uInt16)mpItemList->size(); } // ----------------------------------------------------------------------- -USHORT HeaderBar::GetItemPos( USHORT nItemId ) const +sal_uInt16 HeaderBar::GetItemPos( sal_uInt16 nItemId ) const { for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { ImplHeadItem* pItem = (*mpItemList)[ i ]; if ( pItem->mnId == nItemId ) - return (USHORT)i; + return (sal_uInt16)i; } return HEADERBAR_ITEM_NOTFOUND; } // ----------------------------------------------------------------------- -USHORT HeaderBar::GetItemId( USHORT nPos ) const +sal_uInt16 HeaderBar::GetItemId( sal_uInt16 nPos ) const { ImplHeadItem* pItem = (nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : NULL; if ( pItem ) @@ -1401,7 +1397,7 @@ USHORT HeaderBar::GetItemId( USHORT nPos ) const // ----------------------------------------------------------------------- -USHORT HeaderBar::GetItemId( const Point& rPos ) const +sal_uInt16 HeaderBar::GetItemId( const Point& rPos ) const { for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { if ( ImplGetItemRect( i ).IsInside( rPos ) ) { @@ -1413,10 +1409,10 @@ USHORT HeaderBar::GetItemId( const Point& rPos ) const // ----------------------------------------------------------------------- -Rectangle HeaderBar::GetItemRect( USHORT nItemId ) const +Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const { Rectangle aRect; - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) aRect = ImplGetItemRect( nPos ); return aRect; @@ -1424,25 +1420,25 @@ Rectangle HeaderBar::GetItemRect( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetItemSize( USHORT nItemId, long nNewSize ) +void HeaderBar::SetItemSize( sal_uInt16 nItemId, long nNewSize ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { ImplHeadItem* pItem = (*mpItemList)[ nPos ]; if ( pItem->mnSize != nNewSize ) { pItem->mnSize = nNewSize; - ImplUpdate( nPos, TRUE ); + ImplUpdate( nPos, sal_True ); } } } // ----------------------------------------------------------------------- -long HeaderBar::GetItemSize( USHORT nItemId ) const +long HeaderBar::GetItemSize( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->mnSize; else @@ -1451,9 +1447,9 @@ long HeaderBar::GetItemSize( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits ) +void HeaderBar::SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { ImplHeadItem* pItem = (*mpItemList)[ nPos ]; @@ -1467,9 +1463,9 @@ void HeaderBar::SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits ) // ----------------------------------------------------------------------- -HeaderBarItemBits HeaderBar::GetItemBits( USHORT nItemId ) const +HeaderBarItemBits HeaderBar::GetItemBits( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->mnBits; else @@ -1478,9 +1474,9 @@ HeaderBarItemBits HeaderBar::GetItemBits( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetItemData( USHORT nItemId, void* pNewData ) +void HeaderBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { (*mpItemList)[ nPos ]->mpUserData = pNewData; @@ -1490,9 +1486,9 @@ void HeaderBar::SetItemData( USHORT nItemId, void* pNewData ) // ----------------------------------------------------------------------- -void* HeaderBar::GetItemData( USHORT nItemId ) const +void* HeaderBar::GetItemData( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->mpUserData; else @@ -1501,9 +1497,9 @@ void* HeaderBar::GetItemData( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetItemImage( USHORT nItemId, const Image& rImage ) +void HeaderBar::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { (*mpItemList)[ nPos ]->maImage = rImage; @@ -1513,9 +1509,9 @@ void HeaderBar::SetItemImage( USHORT nItemId, const Image& rImage ) // ----------------------------------------------------------------------- -Image HeaderBar::GetItemImage( USHORT nItemId ) const +Image HeaderBar::GetItemImage( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->maImage; else @@ -1524,9 +1520,9 @@ Image HeaderBar::GetItemImage( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetItemText( USHORT nItemId, const XubString& rText ) +void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { (*mpItemList)[ nPos ]->maText = rText; @@ -1536,9 +1532,9 @@ void HeaderBar::SetItemText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -XubString HeaderBar::GetItemText( USHORT nItemId ) const +XubString HeaderBar::GetItemText( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->maText; else @@ -1547,26 +1543,26 @@ XubString HeaderBar::GetItemText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetHelpText( USHORT nItemId, const XubString& rText ) +void HeaderBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) (*mpItemList)[ nPos ]->maHelpText = rText; } // ----------------------------------------------------------------------- -XubString HeaderBar::GetHelpText( USHORT nItemId ) const +XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { ImplHeadItem* pItem = (*mpItemList)[ nPos ]; - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } return pItem->maHelpText; @@ -1577,22 +1573,22 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetHelpId( USHORT nItemId, ULONG nHelpId ) +void HeaderBar::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId ) { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) - (*mpItemList)[ nPos ]->mnHelpId = nHelpId; + (*mpItemList)[ nPos ]->maHelpId = rHelpId; } // ----------------------------------------------------------------------- -ULONG HeaderBar::GetHelpId( USHORT nItemId ) const +rtl::OString HeaderBar::GetHelpId( sal_uInt16 nItemId ) const { - USHORT nPos = GetItemPos( nItemId ); + sal_uInt16 nPos = GetItemPos( nItemId ); + rtl::OString aRet; if ( nPos != HEADERBAR_ITEM_NOTFOUND ) - return (*mpItemList)[ nPos ]->mnHelpId; - else - return 0; + return (*mpItemList)[ nPos ]->maHelpId; + return aRet; } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 4bc40eb8edeb..a62320ce99ac 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -31,9 +31,7 @@ #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> - - -#include <indexentryres.hxx> +#include <svtools/indexentryres.hxx> // ------------------------------------------------------------------------- // diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 6d1cd75c4f74..0dcb4fb4ce23 100644..100755 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -34,7 +34,6 @@ #include <sys/types.h> #endif - #include <svtools/inettbc.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -42,16 +41,13 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> - -#include <com/sun/star/task/XInteractionHandler.hdl> +#include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/ucb/NumberedSortingInfo.hpp> #include <com/sun/star/ucb/XAnyCompareFactory.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp> - #include <comphelper/processfactory.hxx> - #include <vcl/toolbox.hxx> #include <osl/thread.hxx> #include <osl/mutex.hxx> @@ -69,9 +65,8 @@ #include <ucbhelper/content.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> - #include "iodlg.hrc" -#include <asynclink.hxx> +#include <svtools/asynclink.hxx> #include <svl/urlfilter.hxx> #include <vector> @@ -122,17 +117,17 @@ class SvtMatchContext_Impl : public ::osl::Thread String aBaseURL; String aText; SvtURLBox* pBox; - BOOL bStop; - BOOL bOnlyDirectories; - BOOL bNoSelection; + sal_Bool bStop; + sal_Bool bOnlyDirectories; + sal_Bool bNoSelection; DECL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void* ); virtual void SAL_CALL onTerminated( ); virtual void SAL_CALL run(); virtual void SAL_CALL Cancel(); - void Insert( const String& rCompletion, const String& rURL, BOOL bForce = FALSE); - void ReadFolder( const String& rURL, const String& rMatch, BOOL bSmart ); + void Insert( const String& rCompletion, const String& rURL, sal_Bool bForce = sal_False); + void ReadFolder( const String& rURL, const String& rMatch, sal_Bool bSmart ); void FillPicklist( SvStringsDtor& rPickList ); public: @@ -158,9 +153,9 @@ SvtMatchContext_Impl::SvtMatchContext_Impl( SvtURLBox* pBoxP, const String& rText ) : aLink( STATIC_LINK( this, SvtMatchContext_Impl, Select_Impl ) ) , aBaseURL( pBoxP->aBaseURL ) - , aText( rText ) + , aText( rText ) , pBox( pBoxP ) - , bStop( FALSE ) + , bStop( sal_False ) , bOnlyDirectories( pBoxP->bOnlyDirectories ) , bNoSelection( pBoxP->bNoSelection ) { @@ -205,7 +200,7 @@ void SvtMatchContext_Impl::FillPicklist( SvStringsDtor& rPickList ) seqPropertySet[nProperty].Value >>= sTitle; aURL.SetURL( sTitle ); const StringPtr pStr = new String( aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) ); - rPickList.Insert( pStr, (USHORT) nItem ); + rPickList.Insert( pStr, (sal_uInt16) nItem ); break; } } @@ -222,7 +217,7 @@ void SAL_CALL SvtMatchContext_Impl::Cancel() //------------------------------------------------------------------------- void SvtMatchContext_Impl::Stop() { - bStop = TRUE; + bStop = sal_True; if( isRunning() ) terminate(); @@ -252,7 +247,7 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, ) } SvtURLBox* pBox = pThis->pBox; - pBox->bAutoCompleteMode = TRUE; + pBox->bAutoCompleteMode = sal_True; // did we filter completions which otherwise would have been valid? // (to be filled below) @@ -261,7 +256,7 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, ) // insert all completed strings into the listbox pBox->Clear(); - for( USHORT nPos = 0; nPos<pThis->pCompletions->Count(); nPos++ ) + for( sal_uInt16 nPos = 0; nPos<pThis->pCompletions->Count(); nPos++ ) { String sCompletion( *(*pThis->pCompletions)[nPos] ); @@ -331,12 +326,12 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, ) //------------------------------------------------------------------------- void SvtMatchContext_Impl::Insert( const String& rCompletion, const String& rURL, - BOOL bForce ) + sal_Bool bForce ) { if( !bForce ) { // avoid doubles - for( USHORT nPos = pCompletions->Count(); nPos--; ) + for( sal_uInt16 nPos = pCompletions->Count(); nPos--; ) if( *(*pCompletions)[ nPos ] == rCompletion ) return; } @@ -350,7 +345,7 @@ void SvtMatchContext_Impl::Insert( const String& rCompletion, //------------------------------------------------------------------------- void SvtMatchContext_Impl::ReadFolder( const String& rURL, const String& rMatch, - BOOL bSmart ) + sal_Bool bSmart ) { // check folder to scan if( !UCBContentHelper::IsFolder( rURL ) ) @@ -375,7 +370,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL, String aNewText( aText ); aNewText += '/'; - Insert( aNewText, rURL, TRUE ); + Insert( aNewText, rURL, sal_True ); return; } @@ -419,7 +414,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL, uno::Reference< XDynamicResultSet > xDynResultSet; ResultSetInclude eInclude = INCLUDE_FOLDERS_AND_DOCUMENTS; if ( bOnlyDirectories ) - eInclude = INCLUDE_FOLDERS_ONLY; + eInclude = INCLUDE_FOLDERS_ONLY; xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude ); @@ -501,7 +496,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL, if ( bIsFolder ) aInput += aDelimiter; - Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), TRUE ); + Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), sal_True ); } } } @@ -570,7 +565,7 @@ String SvtURLBox::ParseSmart( String aText, String aBaseURL, String aWorkDir ) aObj.setFinalSlash(); // take base URL and append current input - bool bWasAbsolute = FALSE; + bool bWasAbsolute = sal_False; #ifdef UNX // don't support FSYS_MAC under Unix, because here ':' is a valid character for a filename INetURLObject::FSysStyle eStyle = static_cast< INetURLObject::FSysStyle >( INetURLObject::FSYS_VOS | INetURLObject::FSYS_UNX | INetURLObject::FSYS_DOS ); @@ -611,7 +606,7 @@ void SvtMatchContext_Impl::run() pURLs->Remove( 0, pURLs->Count() ); // check for input - USHORT nTextLen = aText.Len(); + sal_uInt16 nTextLen = aText.Len(); if ( !nTextLen ) return; @@ -647,7 +642,7 @@ void SvtMatchContext_Impl::run() { // if text input is a directory, it must be part of the match list! Until then it is scanned if ( UCBContentHelper::IsFolder( aMainURL ) && aURLObject.hasFinalSlash() ) - Insert( aText, aMatch ); + Insert( aText, aMatch ); else // otherwise the parent folder will be taken aURLObject.removeSegment(); @@ -663,7 +658,7 @@ void SvtMatchContext_Impl::run() // don't scan history picklist if only directories are allowed, picklist contains only files return; - BOOL bFull = FALSE; + sal_Bool bFull = sal_False; int nCount = aPickList.Count(); INetURLObject aCurObj; @@ -672,11 +667,12 @@ void SvtMatchContext_Impl::run() aObj.SetSmartProtocol( eSmartProt == INET_PROT_NOT_VALID ? INET_PROT_HTTP : eSmartProt ); for( ;; ) { - for( USHORT nPos = 0; schedule() && nPos < nCount; nPos++ ) + for( sal_uInt16 nPos = 0; schedule() && nPos < nCount; nPos++ ) { aCurObj.SetURL( *aPickList.GetObject( nPos ) ); aCurObj.SetSmartURL( aCurObj.GetURLNoPass()); aCurMainURL = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); + if( eProt != INET_PROT_NOT_VALID && aCurObj.GetProtocol() != eProt ) continue; @@ -701,7 +697,7 @@ void SvtMatchContext_Impl::run() { // try if text matches the scheme String aScheme( INetURLObject::GetScheme( aCurObj.GetProtocol() ) ); - if ( aText.CompareTo( aScheme, aText.Len() ) == COMPARE_EQUAL && aText.Len() < aScheme.Len() ) + if ( aText.CompareIgnoreCaseToAscii( aScheme, aText.Len() ) == COMPARE_EQUAL && aText.Len() < aScheme.Len() ) { if( bFull ) aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -720,7 +716,7 @@ void SvtMatchContext_Impl::run() aCurString.Erase( 0, aScheme.Len() ); } - if( aText.CompareTo( aCurString, aText.Len() )== COMPARE_EQUAL ) + if( aText.CompareIgnoreCaseToAscii( aCurString, aText.Len() )== COMPARE_EQUAL ) { if( bFull ) aMatch = aCurObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -761,7 +757,7 @@ void SvtMatchContext_Impl::run() } if( !bFull ) - bFull = TRUE; + bFull = sal_True; else break; } @@ -772,7 +768,7 @@ void SvtMatchContext_Impl::run() //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- -void SvtURLBox::TryAutoComplete( BOOL bForce ) +void SvtURLBox::TryAutoComplete( sal_Bool bForce ) { if( Application::AnyInput( INPUT_KEYBOARD ) ) return; @@ -781,7 +777,7 @@ void SvtURLBox::TryAutoComplete( BOOL bForce ) Selection aSelection( GetSelection() ); if( aSelection.Max() != aCurText.Len() && !bForce ) return; - USHORT nLen = (USHORT)aSelection.Min(); + sal_uInt16 nLen = (sal_uInt16)aSelection.Min(); aCurText.Erase( nLen ); if( aCurText.Len() && bIsAutoCompleteEnabled ) { @@ -799,13 +795,13 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart ) : ComboBox( pParent , WB_DROPDOWN | WB_AUTOSIZE | WB_AUTOHSCROLL ), pCtx( 0 ), eSmartProtocol( eSmart ), - bAutoCompleteMode( FALSE ), - bOnlyDirectories( FALSE ), - bTryAutoComplete( FALSE ), - bCtrlClick( FALSE ), - bHistoryDisabled( FALSE ), - bNoSelection( FALSE ), - bIsAutoCompleteEnabled( TRUE ) + bAutoCompleteMode( sal_False ), + bOnlyDirectories( sal_False ), + bTryAutoComplete( sal_False ), + bCtrlClick( sal_False ), + bHistoryDisabled( sal_False ), + bNoSelection( sal_False ), + bIsAutoCompleteEnabled( sal_True ) { ImplInit(); @@ -820,13 +816,13 @@ SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart ) : ComboBox( pParent, _nStyle ), pCtx( 0 ), eSmartProtocol( eSmart ), - bAutoCompleteMode( FALSE ), - bOnlyDirectories( FALSE ), - bTryAutoComplete( FALSE ), - bCtrlClick( FALSE ), - bHistoryDisabled( FALSE ), - bNoSelection( FALSE ), - bIsAutoCompleteEnabled( TRUE ) + bAutoCompleteMode( sal_False ), + bOnlyDirectories( sal_False ), + bTryAutoComplete( sal_False ), + bCtrlClick( sal_False ), + bHistoryDisabled( sal_False ), + bNoSelection( sal_False ), + bIsAutoCompleteEnabled( sal_True ) { ImplInit(); } @@ -836,13 +832,13 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart : ComboBox( pParent , _rResId ), pCtx( 0 ), eSmartProtocol( eSmart ), - bAutoCompleteMode( FALSE ), - bOnlyDirectories( FALSE ), - bTryAutoComplete( FALSE ), - bCtrlClick( FALSE ), - bHistoryDisabled( FALSE ), - bNoSelection( FALSE ), - bIsAutoCompleteEnabled( TRUE ) + bAutoCompleteMode( sal_False ), + bOnlyDirectories( sal_False ), + bTryAutoComplete( sal_False ), + bCtrlClick( sal_False ), + bHistoryDisabled( sal_False ), + bNoSelection( sal_False ), + bIsAutoCompleteEnabled( sal_True ) { ImplInit(); } @@ -851,8 +847,10 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart void SvtURLBox::ImplInit() { pImp = new SvtURLBox_Impl(); - SetHelpId( SID_OPENURL ); - EnableAutocomplete( FALSE ); + + if ( GetHelpId().getLength() == 0 ) + SetHelpId( ".uno:OpenURL" ); + EnableAutocomplete( sal_False ); SetText( String() ); @@ -934,7 +932,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl() if ( aURL.Len() && ( !pImp->pUrlFilter || pImp->pUrlFilter->isUrlAllowed( aURL ) ) ) { - BOOL bFound = (aURL.GetChar(aURL.Len()-1) == '/' ); + sal_Bool bFound = (aURL.GetChar(aURL.Len()-1) == '/' ); if ( !bFound ) { String aUpperURL( aURL ); @@ -964,7 +962,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl() } //------------------------------------------------------------------------- -BOOL SvtURLBox::ProcessKey( const KeyCode& rKey ) +sal_Bool SvtURLBox::ProcessKey( const KeyCode& rKey ) { // every key input stops the current matching thread if( pCtx ) @@ -982,7 +980,7 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey ) if ( bAutoCompleteMode ) { // reset picklist - bAutoCompleteMode = FALSE; + bAutoCompleteMode = sal_False; Selection aSelection( GetSelection() ); SetSelection( Selection( aSelection.Min(), aSelection.Min() ) ); if ( bOnlyDirectories ) @@ -993,19 +991,19 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey ) } bCtrlClick = rKey.IsMod1(); - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; if ( GetOpenHdl().IsSet() ) { - bHandled = TRUE; + bHandled = sal_True; GetOpenHdl().Call(this); } else if ( GetSelectHdl().IsSet() ) { - bHandled = TRUE; + bHandled = sal_True; GetSelectHdl().Call(this); } - bCtrlClick = FALSE; + bCtrlClick = sal_False; ClearModifyFlag(); return bHandled; @@ -1013,9 +1011,9 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey ) else if ( aCode == KEY_RETURN && !GetText().Len() && GetOpenHdl().IsSet() ) { // for file dialog - bAutoCompleteMode = FALSE; + bAutoCompleteMode = sal_False; GetOpenHdl().Call(this); - return TRUE; + return sal_True; } else if( aCode == KEY_ESCAPE ) { @@ -1031,15 +1029,15 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey ) } else { - return FALSE; + return sal_False; } - bAutoCompleteMode = FALSE; - return TRUE; + bAutoCompleteMode = sal_False; + return sal_True; } else { - return FALSE; + return sal_False; } } @@ -1060,15 +1058,15 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt ) KeyCode aCode( rKey.GetCode() ); if( ProcessKey( rKey ) ) { - return TRUE; + return sal_True; } else if( ( aCode == KEY_UP || aCode == KEY_DOWN ) && !rKey.IsMod2() ) { Selection aSelection( GetSelection() ); - USHORT nLen = (USHORT)aSelection.Min(); + sal_uInt16 nLen = (sal_uInt16)aSelection.Min(); GetSubEdit()->KeyInput( rEvent ); SetSelection( Selection( nLen, GetText().Len() ) ); - return TRUE; + return sal_True; } if ( MatchesPlaceHolder( GetText() ) ) @@ -1087,7 +1085,7 @@ IMPL_LINK( SvtURLBox, AutoCompleteHdl_Impl, void*, EMPTYARG ) { if ( GetSubEdit()->GetAutocompleteAction() == AUTOCOMPLETE_KEYINPUT ) { - TryAutoComplete( FALSE ); + TryAutoComplete( sal_False ); return 1L; } @@ -1126,7 +1124,7 @@ void SvtURLBox::Select() } //------------------------------------------------------------------------- -void SvtURLBox::SetOnlyDirectories( BOOL bDir ) +void SvtURLBox::SetOnlyDirectories( sal_Bool bDir ) { bOnlyDirectories = bDir; if ( bOnlyDirectories ) @@ -1134,7 +1132,7 @@ void SvtURLBox::SetOnlyDirectories( BOOL bDir ) } //------------------------------------------------------------------------- -void SvtURLBox::SetNoURLSelection( BOOL bSet ) +void SvtURLBox::SetNoURLSelection( sal_Bool bSet ) { bNoSelection = bSet; } @@ -1151,7 +1149,7 @@ String SvtURLBox::GetURL() // try to get the right case preserving URL from the list of URLs if ( pImp->pCompletions && pImp->pURLs ) { - for( USHORT nPos=0; nPos<pImp->pCompletions->Count(); nPos++ ) + for( sal_uInt16 nPos=0; nPos<pImp->pCompletions->Count(); nPos++ ) { #ifdef DBG_UTIL String aTmp( *(*pImp->pCompletions)[ nPos ] ); @@ -1232,7 +1230,7 @@ String SvtURLBox::GetURL() //------------------------------------------------------------------------- void SvtURLBox::DisableHistory() { - bHistoryDisabled = TRUE; + bHistoryDisabled = sal_True; UpdatePicklistForSmartProtocol_Impl(); } @@ -1307,7 +1305,7 @@ sal_Bool SvtURLBox_Impl::TildeParsing( return sal_False; // no such user #else pPasswd = getpwnam( OUStringToOString( OUString( aUserName ), RTL_TEXTENCODING_ASCII_US ).getStr() ); - if( pPasswd ) + if( pPasswd ) aParseTilde = String::CreateFromAscii( pPasswd->pw_dir ); else return sal_False; // no such user diff --git a/svtools/source/control/makefile.mk b/svtools/source/control/makefile.mk deleted file mode 100755 index b855501e1133..000000000000 --- a/svtools/source/control/makefile.mk +++ /dev/null @@ -1,87 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=ctrl - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - ctrltool.src \ - ctrlbox.src \ - calendar.src \ - filectrl.src - -EXCEPTIONSFILES=\ - $(SLO)$/asynclink.obj \ - $(SLO)$/calendar.obj \ - $(SLO)$/ctrlbox.obj \ - $(SLO)$/ctrltool.obj \ - $(SLO)$/filectrl.obj \ - $(SLO)$/filectrl2.obj \ - $(SLO)$/fileurlbox.obj \ - $(SLO)$/fixedhyper.obj \ - $(SLO)$/fmtfield.obj \ - $(SLO)$/headbar.obj \ - $(SLO)$/hyperlabel.obj \ - $(SLO)$/inettbc.obj \ - $(SLO)$/prgsbar.obj \ - $(SLO)$/roadmap.obj \ - $(SLO)$/ruler.obj \ - $(SLO)$/scriptedtext.obj \ - $(SLO)$/scrwin.obj \ - $(SLO)$/stdctrl.obj \ - $(SLO)$/stdmenu.obj \ - $(SLO)$/svxbox.obj \ - $(SLO)$/tabbar.obj \ - $(SLO)$/taskbar.obj \ - $(SLO)$/taskbox.obj \ - $(SLO)$/taskmisc.obj \ - $(SLO)$/taskstat.obj \ - $(SLO)$/toolbarmenu.obj \ - $(SLO)$/toolbarmenuacc.obj \ - $(SLO)$/urlcontrol.obj \ - $(SLO)$/valueacc.obj \ - $(SLO)$/valueset.obj - -SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/collatorres.obj \ - $(SLO)$/indexentryres.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx index 500a3a5c4227..b8df51152bbe 100644..100755 --- a/svtools/source/control/prgsbar.cxx +++ b/svtools/source/control/prgsbar.cxx @@ -33,7 +33,7 @@ #include <tools/debug.hxx> #include <vcl/status.hxx> -#include <prgsbar.hxx> +#include <svtools/prgsbar.hxx> // ======================================================================= @@ -45,9 +45,9 @@ void ProgressBar::ImplInit() { mnPercent = 0; - mbCalcNew = TRUE; + mbCalcNew = sal_True; - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); } static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle ) @@ -86,8 +86,8 @@ ProgressBar::~ProgressBar() // ----------------------------------------------------------------------- -void ProgressBar::ImplInitSettings( BOOL bFont, - BOOL bForeground, BOOL bBackground ) +void ProgressBar::ImplInitSettings( sal_Bool bFont, + sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -109,8 +109,8 @@ void ProgressBar::ImplInitSettings( BOOL bFont, { if( (GetStyle() & WB_BORDER) ) SetBorderStyle( WINDOW_BORDER_REMOVEBORDER ); - EnableChildTransparentMode( TRUE ); - SetPaintTransparent( TRUE ); + EnableChildTransparentMode( sal_True ); + SetPaintTransparent( sal_True ); SetBackground(); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); } @@ -148,18 +148,18 @@ void ProgressBar::ImplInitSettings( BOOL bFont, // ----------------------------------------------------------------------- -void ProgressBar::ImplDrawProgress( USHORT nOldPerc, USHORT nNewPerc ) +void ProgressBar::ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc ) { if ( mbCalcNew ) { - mbCalcNew = FALSE; + mbCalcNew = sal_False; Size aSize = GetOutputSizePixel(); mnPrgsHeight = aSize.Height()-(PROGRESSBAR_WIN_OFFSET*2); mnPrgsWidth = (mnPrgsHeight*2)/3; maPos.Y() = PROGRESSBAR_WIN_OFFSET; long nMaxWidth = (aSize.Width()-(PROGRESSBAR_WIN_OFFSET*2)+PROGRESSBAR_OFFSET); - USHORT nMaxCount = (USHORT)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET)); + sal_uInt16 nMaxCount = (sal_uInt16)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET)); if ( nMaxCount <= 1 ) nMaxCount = 1; else @@ -188,20 +188,20 @@ void ProgressBar::Paint( const Rectangle& ) void ProgressBar::Resize() { - mbCalcNew = TRUE; + mbCalcNew = sal_True; if ( IsReallyVisible() ) Invalidate(); } // ----------------------------------------------------------------------- -void ProgressBar::SetValue( USHORT nNewPercent ) +void ProgressBar::SetValue( sal_uInt16 nNewPercent ) { DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" ); if ( nNewPercent < mnPercent ) { - mbCalcNew = TRUE; + mbCalcNew = sal_True; mnPercent = nNewPercent; if ( IsReallyVisible() ) { @@ -224,19 +224,19 @@ void ProgressBar::StateChanged( StateChangedType nType ) if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE, FALSE ); + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } else */ if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } @@ -250,7 +250,7 @@ void ProgressBar::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(); } diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 90952d7c0ce4..14f8446e2ecb 100644..100755 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -28,14 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <roadmap.hxx> +#include <svtools/roadmap.hxx> #ifndef _STRING_HXX #define _STRING_HXX #endif #include <vector> - #include <algorithm> #include <vcl/bitmap.hxx> #include <tools/color.hxx> @@ -123,9 +122,9 @@ namespace svt void SetClickHdl( const Link& rLink ); const Link& GetClickHdl() const; - void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags ); - void Enable( BOOL bEnable = TRUE); - BOOL IsEnabled() const; + void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, sal_uInt16 nFlags ); + void Enable( sal_Bool bEnable = sal_True); + sal_Bool IsEnabled() const; void GrabFocus(); bool Contains( const Window* _pWindow ) const; @@ -887,7 +886,7 @@ namespace svt } //--------------------------------------------------------------------- - void RoadmapItem::SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags ) + void RoadmapItem::SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, sal_uInt16 nFlags ) { if (pRefRoadmapHyperLabel == NULL) mpDescription->SetZOrder( NULL, nFlags); //WINDOW_ZORDER_FIRST ); @@ -896,14 +895,14 @@ namespace svt } //--------------------------------------------------------------------- - void RoadmapItem::Enable( BOOL _bEnable) + void RoadmapItem::Enable( sal_Bool _bEnable) { mpID->Enable(_bEnable); mpDescription->Enable(_bEnable); } //--------------------------------------------------------------------- - BOOL RoadmapItem::IsEnabled() const + sal_Bool RoadmapItem::IsEnabled() const { return mpID->IsEnabled(); } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index d1b94e6d72dc..96a824d362f0 100644..100755 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -33,11 +33,10 @@ #include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <tools/poly.hxx> - #include <vcl/i18nhelp.hxx> #define _SV_RULER_CXX -#include <ruler.hxx> +#include <svtools/ruler.hxx> // ======================================================================= @@ -107,15 +106,15 @@ private: long nNullOff; long nMargin1; long nMargin2; - USHORT nLines; - USHORT nArrows; - USHORT nBorders; - USHORT nIndents; - USHORT nTabs; - USHORT nMargin1Style; - USHORT nMargin2Style; - BOOL bAutoPageWidth; - BOOL bTextRTL; + sal_uInt16 nLines; + sal_uInt16 nArrows; + sal_uInt16 nBorders; + sal_uInt16 nIndents; + sal_uInt16 nTabs; + sal_uInt16 nMargin1Style; + sal_uInt16 nMargin2Style; + sal_Bool bAutoPageWidth; + sal_Bool bTextRTL; #ifdef _SV_RULER_CXX public: @@ -134,7 +133,7 @@ struct ImplRulerUnitData long nTick2; // Tick fuer halbe Werte long nTick3; // Tick fuer Zahlenausgabe long n100THMM; // Teiler fuer Einheit - USHORT nUnitDigits; // Anzahl Nachkommastellen + sal_uInt16 nUnitDigits; // Anzahl Nachkommastellen sal_Char aUnitStr[8]; // Einheiten-String }; @@ -159,13 +158,13 @@ struct ImplRulerHitTest { long nPos; RulerType eType; - USHORT nAryPos; - USHORT mnDragSize; - BOOL bSize; - BOOL bSizeBar; - BOOL bExpandTest; + sal_uInt16 nAryPos; + sal_uInt16 mnDragSize; + sal_Bool bSize; + sal_Bool bSizeBar; + sal_Bool bExpandTest; ImplRulerHitTest() : - bExpandTest( FALSE ) {} + bExpandTest( sal_False ) {} }; // ======================================================================= @@ -175,7 +174,7 @@ ImplRulerData::ImplRulerData() memset( this, 0, sizeof( ImplRulerData ) ); // PageBreite == EditWinBreite - bAutoPageWidth = TRUE; + bAutoPageWidth = sal_True; } // ----------------------------------------------------------------------- @@ -250,7 +249,7 @@ void Ruler::ImplInit( WinBits nWinBits ) // --- RTL --- no UI mirroring for horizontal rulers, because // the document is also not mirrored - EnableRTL( FALSE ); + EnableRTL( sal_False ); } // Variablen initialisieren @@ -274,13 +273,13 @@ void Ruler::ImplInit( WinBits nWinBits ) mnExtraModifier = 0; // Modifier-Tasten beim Click im Extrafeld mnCharWidth = 371; mnLineHeight = 551; - mbCalc = TRUE; // Muessen Pagebreiten neu berechnet werden - mbFormat = TRUE; // Muss neu ausgegeben werden - mbDrag = FALSE; // Sind wir im Drag-Modus - mbDragDelete = FALSE; // Wird Maus beim Draggen unten rausgezogen - mbDragCanceled = FALSE; // Wurde Dragging abgebrochen - mbAutoWinWidth = TRUE; // EditWinBreite == RulerBreite - mbActive = TRUE; // Ist Lineal aktiv + mbCalc = sal_True; // Muessen Pagebreiten neu berechnet werden + mbFormat = sal_True; // Muss neu ausgegeben werden + mbDrag = sal_False; // Sind wir im Drag-Modus + mbDragDelete = sal_False; // Wird Maus beim Draggen unten rausgezogen + mbDragCanceled = sal_False; // Wurde Dragging abgebrochen + mbAutoWinWidth = sal_True; // EditWinBreite == RulerBreite + mbActive = sal_True; // Ist Lineal aktiv mnUpdateFlags = 0; // Was soll im Update-Handler upgedatet werden mpData = mpSaveData; // Wir zeigen auf die normalen Daten meExtraType = RULER_EXTRA_DONTKNOW; // Was im ExtraFeld dargestellt wird @@ -304,7 +303,7 @@ void Ruler::ImplInit( WinBits nWinBits ) mnBorderWidth = 0; // Einstellungen setzen - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); // Default-Groesse setzen long nDefHeight = GetTextHeight() + RULER_OFF*2 + RULER_TEXTOFF*2 + mnBorderWidth; @@ -314,6 +313,7 @@ void Ruler::ImplInit( WinBits nWinBits ) else aDefSize.Width() = nDefHeight; SetOutputSizePixel( aDefSize ); + SetType(WINDOW_RULER); } // ----------------------------------------------------------------------- @@ -402,7 +402,7 @@ void Ruler::ImplVDrawText( long nX, long nY, const String& rText ) // ----------------------------------------------------------------------- -void Ruler::ImplInvertLines( BOOL bErase ) +void Ruler::ImplInvertLines( sal_Bool bErase ) { // Positionslinien if ( mpData->nLines && mbActive && !mbDrag && !mbFormat && @@ -422,7 +422,7 @@ void Ruler::ImplInvertLines( BOOL bErase ) aRect.Right() = nY; // Linien ausgeben - for ( USHORT i = 0; i < mpData->nLines; i++ ) + for ( sal_uInt16 i = 0; i < mpData->nLines; i++ ) { n = mpData->pLines[i].nPos+nNullWinOff; if ( (n >= nRulX1) && (n < nRulX2) ) @@ -474,7 +474,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) long nTickWidth; long nX; long nY; - BOOL bNoTicks = FALSE; + sal_Bool bNoTicks = sal_False; //Amelia long nTickUnit = 0; @@ -500,7 +500,8 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode ); // Groessenvorberechnung - BOOL bVertRight = FALSE; + // Sizes calculation + sal_Bool bVertRight = sal_False; if ( mnWinStyle & WB_HORZ ) nTickWidth = aPixSize.Width(); else @@ -509,7 +510,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) if ( mnWinStyle & WB_RIGHT_ALIGNED ) { aFont.SetOrientation( 2700 ); - bVertRight = TRUE; + bVertRight = sal_True; } else aFont.SetOrientation( 900 ); @@ -518,7 +519,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) } long nMaxWidth = maVirDev.PixelToLogic( Size( mpData->nPageWidth, 0 ), maMapMode ).Width(); if ( nMaxWidth < 0 ) - nMaxWidth *= -1; + nMaxWidth = -nMaxWidth; // Amelia if (( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE )) nMaxWidth /= nTickUnit; @@ -535,7 +536,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) while ( nTickWidth < nTxtWidth+nTextOff ) { long nOldMulti = nMulti; - if ( !nTickWidth ) + if ( !nTickWidth ) //If nTickWidth equals 0 nMulti *= 10; else if ( nMulti < 10 ) nMulti++; @@ -550,7 +551,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) // koennen if ( nMulti < nOldMulti ) { - bNoTicks = TRUE; + bNoTicks = sal_True; break; } @@ -657,7 +658,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) } } // #i49017# with some zoom factors the value nTick can overflow - if( ((ULONG)nTick + (ULONG)nTickCount) > (ULONG)LONG_MAX) + if( ((sal_uLong)nTick + (sal_uLong)nTickCount) > (sal_uLong)LONG_MAX) break; nTick += nTickCount; } @@ -668,7 +669,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) void Ruler::ImplDrawArrows( long nCenter ) { - USHORT i; + sal_uInt16 i; long n1; long n2; long n3; @@ -676,7 +677,7 @@ void Ruler::ImplDrawArrows( long nCenter ) long nLogWidth; String aStr; String aStr2; - BOOL bDrawUnit; + sal_Bool bDrawUnit; long nTxtWidth; long nTxtHeight2 = GetTextHeight()/2; @@ -701,14 +702,14 @@ void Ruler::ImplDrawArrows( long nCenter ) nLogWidth = (nLogWidth / aImplRulerUnitTab[mnUnitIndex].n100THMM) * 1000; else nLogWidth = (nLogWidth*1000) / aImplRulerUnitTab[mnUnitIndex].n100THMM; - aStr = rI18nHelper.GetNum( nLogWidth, aImplRulerUnitTab[mnUnitIndex].nUnitDigits, TRUE, FALSE ); + aStr = rI18nHelper.GetNum( nLogWidth, aImplRulerUnitTab[mnUnitIndex].nUnitDigits, sal_True, sal_False ); // Einheit an den String haengen aStr2 = aStr; aStr2.AppendAscii( aImplRulerUnitTab[mnUnitIndex].aUnitStr ); // Textbreite ermitteln - bDrawUnit = TRUE; + bDrawUnit = sal_True; nTxtWidth = GetTextWidth( aStr2 ); if ( nTxtWidth < mpData->pArrows[i].nWidth-10 ) aStr = aStr2; @@ -716,7 +717,7 @@ void Ruler::ImplDrawArrows( long nCenter ) { nTxtWidth = GetTextWidth( aStr ); if ( nTxtWidth > mpData->pArrows[i].nWidth-10 ) - bDrawUnit = FALSE; + bDrawUnit = sal_False; } // Ist genuegen Platz fuer Einheiten-String vorhanden @@ -760,7 +761,7 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom long n2; long nTemp1; long nTemp2; - USHORT i; + sal_uInt16 i; for ( i = 0; i < mpData->nBorders; i++ ) { @@ -878,12 +879,12 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom // ----------------------------------------------------------------------- -void Ruler::ImplDrawIndent( const Polygon& rPoly, USHORT nStyle ) +void Ruler::ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Point aPos1; Point aPos2; - USHORT nIndentStyle = nStyle & RULER_INDENT_STYLE; + sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE; if ( nStyle & RULER_STYLE_INVISIBLE ) return; @@ -967,7 +968,7 @@ void Ruler::ImplDrawIndent( const Polygon& rPoly, USHORT nStyle ) void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom ) { - USHORT j; + sal_uInt16 j; long n; long nIndentHeight = (mnVirHeight/2) - 1; long nIndentWidth2 = nIndentHeight-3; @@ -978,8 +979,8 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom if ( mpData->pIndents[j].nStyle & RULER_STYLE_INVISIBLE ) continue; - USHORT nStyle = mpData->pIndents[j].nStyle; - USHORT nIndentStyle = nStyle & RULER_INDENT_STYLE; + sal_uInt16 nStyle = mpData->pIndents[j].nStyle; + sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE; n = mpData->pIndents[j].nPos+mpData->nNullVirOff; @@ -1011,7 +1012,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom if(0 == (mnWinStyle & WB_HORZ)) { Point aTmp; - for(USHORT i = 0; i < 5; i++) + for(sal_uInt16 i = 0; i < 5; i++) { aTmp = aPoly[i]; Point aSet(nVirBottom - aTmp.Y(), aTmp.X()); @@ -1026,9 +1027,9 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom // ----------------------------------------------------------------------- -static void ImplCenterTabPos( Point& rPos, USHORT nTabStyle ) +static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle ) { - BOOL bRTL = 0 != (nTabStyle & RULER_TAB_RTL); + sal_Bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL); nTabStyle &= RULER_TAB_STYLE; rPos.Y() += RULER_TAB_HEIGHT/2; if ( (!bRTL && nTabStyle == RULER_TAB_LEFT) ||( bRTL && nTabStyle == RULER_TAB_RIGHT)) @@ -1038,7 +1039,7 @@ static void ImplCenterTabPos( Point& rPos, USHORT nTabStyle ) } // ----------------------------------------------------------------------- -void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, BOOL bRightAligned) +void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, sal_Bool bRightAligned) { if(!rRect.IsEmpty()) { @@ -1058,13 +1059,13 @@ void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, BOOL bRightAli // ----------------------------------------------------------------------- static void ImplDrawRulerTab( OutputDevice* pDevice, - const Point& rPos, USHORT nStyle, WinBits nWinBits ) + const Point& rPos, sal_uInt16 nStyle, WinBits nWinBits ) { if ( nStyle & RULER_STYLE_INVISIBLE ) return; - USHORT nTabStyle = nStyle & RULER_TAB_STYLE; - BOOL bRTL = 0 != (nStyle & RULER_TAB_RTL); + sal_uInt16 nTabStyle = nStyle & RULER_TAB_STYLE; + sal_Bool bRTL = 0 != (nStyle & RULER_TAB_RTL); Rectangle aRect1, aRect2, aRect3; aRect3.SetEmpty(); if ( nTabStyle == RULER_TAB_DEFAULT ) @@ -1122,7 +1123,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice, } if( 0 == (nWinBits&WB_HORZ) ) { - BOOL bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED); + sal_Bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED); lcl_RotateRect_Impl(aRect1, rPos.Y(), bRightAligned); lcl_RotateRect_Impl(aRect2, rPos.Y(), bRightAligned); lcl_RotateRect_Impl(aRect3, rPos.Y(), bRightAligned); @@ -1136,7 +1137,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice, // ----------------------------------------------------------------------- -void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle ) +void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle ) { if ( nStyle & RULER_STYLE_INVISIBLE ) return; @@ -1156,7 +1157,7 @@ void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom ) { - for ( USHORT i = 0; i < mpData->nTabs; i++ ) + for ( sal_uInt16 i = 0; i < mpData->nTabs; i++ ) { if ( mpData->pTabs[i].nStyle & RULER_STYLE_INVISIBLE ) continue; @@ -1172,8 +1173,8 @@ void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom ) // ----------------------------------------------------------------------- -void Ruler::ImplInitSettings( BOOL bFont, - BOOL bForeground, BOOL bBackground ) +void Ruler::ImplInitSettings( sal_Bool bFont, + sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1262,7 +1263,7 @@ void Ruler::ImplCalc() mpData->nRulWidth = mnHeight-nRulWinOff; } - mbCalc = FALSE; + mbCalc = sal_False; } // ----------------------------------------------------------------------- @@ -1302,7 +1303,7 @@ void Ruler::ImplFormat() return; Size aVirDevSize; - BOOL b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO); + sal_Bool b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO); // initialize VirtualDevice if ( mnWinStyle & WB_HORZ ) @@ -1316,7 +1317,7 @@ void Ruler::ImplFormat() aVirDevSize.Width() = mnVirHeight; } if ( aVirDevSize != maVirDev.GetOutputSizePixel() ) - maVirDev.SetOutputSizePixel( aVirDevSize, TRUE ); + maVirDev.SetOutputSizePixel( aVirDevSize, sal_True ); else maVirDev.Erase(); @@ -1456,12 +1457,12 @@ void Ruler::ImplFormat() ImplDrawArrows( nVirTop+((nVirBottom-nVirTop)/2) ); // Wir haben formatiert - mbFormat = FALSE; + mbFormat = sal_False; } // ----------------------------------------------------------------------- -void Ruler::ImplInitExtraField( BOOL bUpdate ) +void Ruler::ImplInitExtraField( sal_Bool bUpdate ) { // Extra-Field beruecksichtigen if ( mnWinStyle & WB_EXTRAFIELD ) @@ -1491,8 +1492,8 @@ void Ruler::ImplInitExtraField( BOOL bUpdate ) if ( bUpdate ) { - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; Invalidate(); } } @@ -1530,17 +1531,17 @@ void Ruler::ImplDraw() DrawOutDev( aOffPos, aVirDevSize, Point(), aVirDevSize, maVirDev ); // Positionslinien neu malen - ImplInvertLines( TRUE ); + ImplInvertLines( sal_True ); } } // ----------------------------------------------------------------------- -void Ruler::ImplDrawExtra( BOOL bPaint ) +void Ruler::ImplDrawExtra( sal_Bool bPaint ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Rectangle aRect = maExtraRect; - BOOL bEraseRect = FALSE; + sal_Bool bEraseRect = sal_False; if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ) { @@ -1563,14 +1564,14 @@ void Ruler::ImplDrawExtra( BOOL bPaint ) SetFillColor( rStyleSettings.GetFaceColor() ); else SetFillColor( rStyleSettings.GetWindowColor() ); - bEraseRect = TRUE; + bEraseRect = sal_True; } else { if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) && (mnExtraStyle & RULER_STYLE_HIGHLIGHT) ) { SetFillColor( rStyleSettings.GetCheckedColor() ); - bEraseRect = TRUE; + bEraseRect = sal_True; } } @@ -1594,7 +1595,7 @@ void Ruler::ImplDrawExtra( BOOL bPaint ) } else if ( meExtraType == RULER_EXTRA_TAB ) { - USHORT nTabStyle = mnExtraStyle & RULER_TAB_STYLE; + sal_uInt16 nTabStyle = mnExtraStyle & RULER_TAB_STYLE; if(mpData->bTextRTL) nTabStyle |= RULER_TAB_RTL; Point aCenter = aRect.Center(); @@ -1621,7 +1622,7 @@ void Ruler::ImplDrawExtra( BOOL bPaint ) // ----------------------------------------------------------------------- -void Ruler::ImplUpdate( BOOL bMustCalc ) +void Ruler::ImplUpdate( sal_Bool bMustCalc ) { // Hier schon Linien loeschen, damit Sie vor dem Neuberechnen schon // geloscht sind, da danach die alten Positionen nicht mehr bestimmt @@ -1631,8 +1632,8 @@ void Ruler::ImplUpdate( BOOL bMustCalc ) // Flags setzen if ( bMustCalc ) - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; // Wenn wir am Draggen sind, wird nach dem Drag-Handler automatisch // das Lineal neu upgedatet @@ -1650,11 +1651,11 @@ void Ruler::ImplUpdate( BOOL bMustCalc ) // ----------------------------------------------------------------------- -BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, - BOOL bRequireStyle, USHORT nRequiredStyle ) const +sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, + sal_Bool bRequireStyle, sal_uInt16 nRequiredStyle ) const { - USHORT i; - USHORT nStyle; + sal_uInt16 i; + sal_uInt16 nStyle; long nHitBottom; long nX; long nY; @@ -1662,10 +1663,10 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, long n2; if ( !mbActive ) - return FALSE; + return sal_False; // Position ermitteln - BOOL bIsHori = 0 != (mnWinStyle & WB_HORZ); + sal_Bool bIsHori = 0 != (mnWinStyle & WB_HORZ); if ( bIsHori ) { nX = rPos.X(); @@ -1681,8 +1682,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, // --> FME 2004-08-05 #i32608# pHitTest->nAryPos = 0; pHitTest->mnDragSize = 0; - pHitTest->bSize = FALSE; - pHitTest->bSizeBar = FALSE; + pHitTest->bSize = sal_False; + pHitTest->bSizeBar = sal_False; // <-- // Damit ueberstehende Tabs und Einzuege mit beruecksichtigt werden @@ -1700,7 +1701,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, { pHitTest->nPos = 0; pHitTest->eType = RULER_TYPE_OUTSIDE; - return FALSE; + return sal_False; } nX -= mpData->nNullVirOff; @@ -1746,7 +1747,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, { pHitTest->eType = RULER_TYPE_TAB; pHitTest->nAryPos = i-1; - return TRUE; + return sal_True; } } } @@ -1787,7 +1788,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, { pHitTest->eType = RULER_TYPE_INDENT; pHitTest->nAryPos = i-1; - return TRUE; + return sal_True; } } } @@ -1798,7 +1799,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, { pHitTest->nPos = 0; pHitTest->eType = RULER_TYPE_OUTSIDE; - return FALSE; + return sal_False; } // Danach die Spalten testen @@ -1833,7 +1834,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, { if ( nStyle & RULER_BORDER_MOVEABLE ) { - pHitTest->bSizeBar = TRUE; + pHitTest->bSizeBar = sal_True; pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE; } } @@ -1853,25 +1854,25 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, if ( nX <= n1+nMOff ) { - pHitTest->bSize = TRUE; + pHitTest->bSize = sal_True; pHitTest->mnDragSize = RULER_DRAGSIZE_1; } else if ( nX >= n2-nMOff ) { - pHitTest->bSize = TRUE; + pHitTest->bSize = sal_True; pHitTest->mnDragSize = RULER_DRAGSIZE_2; } else { if ( nStyle & RULER_BORDER_MOVEABLE ) { - pHitTest->bSizeBar = TRUE; + pHitTest->bSizeBar = sal_True; pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE; } } } - return TRUE; + return sal_True; } } } @@ -1885,8 +1886,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) ) { pHitTest->eType = RULER_TYPE_MARGIN1; - pHitTest->bSize = TRUE; - return TRUE; + pHitTest->bSize = sal_True; + return sal_True; } } if ( (mpData->nMargin2Style & (RULER_MARGIN_SIZEABLE | RULER_STYLE_INVISIBLE)) == RULER_MARGIN_SIZEABLE ) @@ -1895,8 +1896,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) ) { pHitTest->eType = RULER_TYPE_MARGIN2; - pHitTest->bSize = TRUE; - return TRUE; + pHitTest->bSize = sal_True; + return sal_True; } } @@ -1941,28 +1942,28 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, { pHitTest->eType = RULER_TYPE_TAB; pHitTest->nAryPos = i-1; - return TRUE; + return sal_True; } } } } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, +sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, ImplRulerHitTest* pHitTest ) const { Point aPos = rPos; - BOOL bRequiredStyle = FALSE; - USHORT nRequiredStyle = 0; + sal_Bool bRequiredStyle = sal_False; + sal_uInt16 nRequiredStyle = 0; if (eDragType == RULER_TYPE_INDENT) { - bRequiredStyle = TRUE; + bRequiredStyle = sal_True; nRequiredStyle = RULER_INDENT_BOTTOM; } @@ -1982,7 +1983,7 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) ) { if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) ) - return TRUE; + return sal_True; } } @@ -1998,7 +1999,7 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) ) { if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) ) - return TRUE; + return sal_True; } } @@ -2014,25 +2015,25 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType, if ( ImplHitTest( aPos, pHitTest ) ) { if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) ) - return TRUE; + return sal_True; } } // Auf DontKnow setzen pHitTest->eType = RULER_TYPE_DONTKNOW; - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier ) +sal_Bool Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, sal_uInt16 nModifier ) { // Wenn eine Spalte angeklick wurde, die weder verschiebar noch // in der Groesse aenderbar ist, brauchen wir auch kein Drag ausloesen if ( (pHitTest->eType == RULER_TYPE_BORDER) && !pHitTest->bSize && !pHitTest->bSizeBar ) - return FALSE; + return sal_False; // Dragdaten setzen meDragType = pHitTest->eType; @@ -2049,10 +2050,10 @@ BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier ) // Wenn der Handler das Draggen erlaubt, dann das Draggen // initialisieren ImplInvertLines(); - mbDrag = TRUE; + mbDrag = sal_True; mnStartDragPos = mnDragPos; StartTracking(); - return TRUE; + return sal_True; } else { @@ -2065,7 +2066,7 @@ BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier ) mpData = mpSaveData; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -2104,18 +2105,18 @@ void Ruler::ImplDrag( const Point& rPos ) nX -= mpData->nNullVirOff; // Wenn oberhalb oder links vom Lineal, dann alte Werte - mbDragDelete = FALSE; + mbDragDelete = sal_False; if ( nY < 0 ) { if ( !mbDragCanceled ) { // Daten wiederherstellen - mbDragCanceled = TRUE; + mbDragCanceled = sal_True; ImplRulerData aTempData; aTempData = *mpDragData; *mpDragData = *mpSaveData; - mbCalc = TRUE; - mbFormat = TRUE; + mbCalc = sal_True; + mbFormat = sal_True; // Handler rufen mnDragPos = mnStartDragPos; @@ -2136,11 +2137,11 @@ void Ruler::ImplDrag( const Point& rPos ) } else { - mbDragCanceled = FALSE; + mbDragCanceled = sal_False; // +2, damit nicht so schnell die Tabs geloescht werden if ( nY > nOutHeight+2 ) - mbDragDelete = TRUE; + mbDragDelete = sal_True; mnDragPos = nX; @@ -2165,7 +2166,7 @@ void Ruler::ImplEndDrag() else *mpSaveData = *mpDragData; mpData = mpSaveData; - mbDrag = FALSE; + mbDrag = sal_False; // Handler rufen EndDrag(); @@ -2175,8 +2176,8 @@ void Ruler::ImplEndDrag() mnDragPos = 0; mnDragAryPos = 0; mnDragSize = 0; - mbDragCanceled = FALSE; - mbDragDelete = FALSE; + mbDragCanceled = sal_False; + mbDragDelete = sal_False; mnDragModifier = 0; mnDragScroll = 0; mnStartDragPos = 0; @@ -2213,8 +2214,8 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt ) if ( rMEvt.IsLeft() && !IsTracking() ) { Point aMousePos = rMEvt.GetPosPixel(); - USHORT nMouseClicks = rMEvt.GetClicks(); - USHORT nMouseModifier = rMEvt.GetModifier(); + sal_uInt16 nMouseClicks = rMEvt.GetClicks(); + sal_uInt16 nMouseModifier = rMEvt.GetModifier(); // Gegebenenfalls Lineal updaten (damit mit den richtigen Daten // gearbeitet wird und die Anzeige auch zur Bearbeitung passt) @@ -2320,8 +2321,8 @@ void Ruler::Tracking( const TrackingEvent& rTEvt ) // Bei Abbruch, den alten Status wieder herstellen if ( rTEvt.IsTrackingCanceled() ) { - mbDragCanceled = TRUE; - mbFormat = TRUE; + mbDragCanceled = sal_True; + mbFormat = sal_True; } ImplEndDrag(); @@ -2370,7 +2371,7 @@ void Ruler::Paint( const Rectangle& ) } // Imhalt vom Extrafeld ausgeben - ImplDrawExtra( TRUE ); + ImplDrawExtra( sal_True ); } if ( mnWinStyle & WB_BORDER ) @@ -2435,7 +2436,7 @@ void Ruler::Resize() } // Hier schon Linien loeschen - BOOL bVisible = IsReallyVisible(); + sal_Bool bVisible = IsReallyVisible(); if ( bVisible && mpData->nLines ) { ImplInvertLines(); @@ -2443,7 +2444,7 @@ void Ruler::Resize() if ( !mnUpdateEvtId ) mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL ); } - mbFormat = TRUE; + mbFormat = sal_True; // Wenn sich die Hoehe bzw. Breite aendert, dann muessen besimmte Werte // neu berechnet werden @@ -2451,15 +2452,15 @@ void Ruler::Resize() ImplInitExtraField( mpData->bTextRTL ); if ( nNewHeight ) { - mbCalc = TRUE; + mbCalc = sal_True; mnVirHeight = nNewHeight - mnBorderWidth - (RULER_OFF*2); } else { if ( mpData->bAutoPageWidth ) - ImplUpdate( TRUE ); + ImplUpdate( sal_True ); else if ( mbAutoWinWidth ) - mbCalc = TRUE; + mbCalc = sal_True; } // Wenn Ruler eine Groesse hat, dann Groesse vom VirtualDevice setzen @@ -2533,17 +2534,17 @@ void Ruler::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE, FALSE ); + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } } @@ -2560,8 +2561,8 @@ void Ruler::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - mbFormat = TRUE; - ImplInitSettings( TRUE, TRUE, TRUE ); + mbFormat = sal_True; + ImplInitSettings( sal_True, sal_True, sal_True ); Invalidate(); } } @@ -2573,7 +2574,7 @@ long Ruler::StartDrag() if ( maStartDragHdl.IsSet() ) return maStartDragHdl.Call( this ); else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -2615,9 +2616,9 @@ void Ruler::ExtraDown() void Ruler::Activate() { - mbActive = TRUE; + mbActive = sal_True; - // Positionslinien wieder anzeigen (erst hinter mbActive=TRUE rufen, da + // Positionslinien wieder anzeigen (erst hinter mbActive=sal_True rufen, da // von ImplInvertLines() ausgewertet wird). Das Zeichnen der Linien // wird verzoegert, damit im vermutlich noch nicht gepainteten Zustand // Linien gezeichnet werden. @@ -2630,25 +2631,25 @@ void Ruler::Activate() void Ruler::Deactivate() { - // Positionslinien loeschen (schon vor mbActive=FALSE rufen, da + // Positionslinien loeschen (schon vor mbActive=sal_False rufen, da // von ImplInvertLines() ausgewertet wird) ImplInvertLines(); - mbActive = FALSE; + mbActive = sal_False; } // ----------------------------------------------------------------------- -BOOL Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) +sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) { if ( !mbDrag ) { Point aMousePos = rMEvt.GetPosPixel(); - USHORT nMouseClicks = rMEvt.GetClicks(); - USHORT nMouseModifier = rMEvt.GetModifier(); + sal_uInt16 nMouseClicks = rMEvt.GetClicks(); + sal_uInt16 nMouseModifier = rMEvt.GetModifier(); ImplRulerHitTest aHitTest; if(eDragType != RULER_TYPE_DONTKNOW) - aHitTest.bExpandTest = TRUE; + aHitTest.bExpandTest = sal_True; // Gegebenenfalls Lineal updaten (damit mit den richtigen Daten // gearbeitet wird und die Anzeige auch zur Bearbeitung passt) @@ -2697,17 +2698,17 @@ BOOL Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) mnDragPos = 0; mnDragAryPos = 0; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- RulerType Ruler::GetDocType( const Point& rPos, RulerType eDragType, - USHORT* pAryPos ) const + sal_uInt16* pAryPos ) const { ImplRulerHitTest aHitTest; @@ -2741,7 +2742,7 @@ void Ruler::CancelDrag() // ----------------------------------------------------------------------- -RulerType Ruler::GetType( const Point& rPos, USHORT* pAryPos ) const +RulerType Ruler::GetType( const Point& rPos, sal_uInt16* pAryPos ) const { ImplRulerHitTest aHitTest; @@ -2768,14 +2769,14 @@ void Ruler::SetWinPos( long nNewOff, long nNewWidth ) { // Gegebenenfalls werden die Breiten automatisch berechnet if ( !nNewWidth ) - mbAutoWinWidth = TRUE; + mbAutoWinWidth = sal_True; else - mbAutoWinWidth = FALSE; + mbAutoWinWidth = sal_False; // Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet) mnWinOff = nNewOff; mnWinWidth = nNewWidth; - ImplUpdate( TRUE ); + ImplUpdate( sal_True ); } // ----------------------------------------------------------------------- @@ -2788,14 +2789,14 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth ) // Gegebenenfalls werden die Breiten automatisch berechnet if ( !nNewWidth ) - mpData->bAutoPageWidth = TRUE; + mpData->bAutoPageWidth = sal_True; else - mpData->bAutoPageWidth = FALSE; + mpData->bAutoPageWidth = sal_False; // Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet) mpData->nPageOff = nNewOff; mpData->nPageWidth = nNewWidth; - ImplUpdate( TRUE ); + ImplUpdate( sal_True ); } // ----------------------------------------------------------------------- @@ -2885,14 +2886,14 @@ void Ruler::SetZoom( const Fraction& rNewZoom ) // ----------------------------------------------------------------------- -void Ruler::SetExtraType( RulerExtra eNewExtraType, USHORT nStyle ) +void Ruler::SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle ) { if ( mnWinStyle & WB_EXTRAFIELD ) { meExtraType = eNewExtraType; mnExtraStyle = nStyle; if ( IsReallyVisible() && IsUpdateMode() ) - ImplDrawExtra( FALSE ); + ImplDrawExtra( sal_False ); } } @@ -2909,7 +2910,7 @@ void Ruler::SetNullOffset( long nPos ) // ----------------------------------------------------------------------- -void Ruler::SetMargin1( long nPos, USHORT nMarginStyle ) +void Ruler::SetMargin1( long nPos, sal_uInt16 nMarginStyle ) { if ( (mpData->nMargin1 != nPos) || (mpData->nMargin1Style != nMarginStyle) ) { @@ -2921,7 +2922,7 @@ void Ruler::SetMargin1( long nPos, USHORT nMarginStyle ) // ----------------------------------------------------------------------- -void Ruler::SetMargin2( long nPos, USHORT nMarginStyle ) +void Ruler::SetMargin2( long nPos, sal_uInt16 nMarginStyle ) { DBG_ASSERT( (nPos >= mpData->nMargin1) || (mpData->nMargin1Style & RULER_STYLE_INVISIBLE) || @@ -2938,12 +2939,12 @@ void Ruler::SetMargin2( long nPos, USHORT nMarginStyle ) // ----------------------------------------------------------------------- -void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) +void Ruler::SetLines( sal_uInt16 n, const RulerLine* pLineAry ) { // To determine if what has changed if ( mpData->nLines == n ) { - USHORT i = n; + sal_uInt16 i = n; const RulerLine* pAry1 = mpData->pLines; const RulerLine* pAry2 = pLineAry; while ( i ) @@ -2960,11 +2961,11 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) } // New values and new share issue - BOOL bMustUpdate; + sal_Bool bMustUpdate; if ( IsReallyVisible() && IsUpdateMode() ) - bMustUpdate = TRUE; + bMustUpdate = sal_True; else - bMustUpdate = FALSE; + bMustUpdate = sal_False; // Delete old lines if ( bMustUpdate ) @@ -2998,7 +2999,7 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) // ----------------------------------------------------------------------- -void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry ) +void Ruler::SetArrows( sal_uInt16 n, const RulerArrow* pArrowAry ) { if ( !n || !pArrowAry ) { @@ -3018,7 +3019,7 @@ void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry ) } else { - USHORT i = n; + sal_uInt16 i = n; const RulerArrow* pAry1 = mpData->pArrows; const RulerArrow* pAry2 = pArrowAry; while ( i ) @@ -3044,7 +3045,7 @@ void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry ) // ----------------------------------------------------------------------- -void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry ) +void Ruler::SetBorders( sal_uInt16 n, const RulerBorder* pBrdAry ) { if ( !n || !pBrdAry ) { @@ -3064,7 +3065,7 @@ void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry ) } else { - USHORT i = n; + sal_uInt16 i = n; const RulerBorder* pAry1 = mpData->pBorders; const RulerBorder* pAry2 = pBrdAry; while ( i ) @@ -3089,7 +3090,7 @@ void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry ) // ----------------------------------------------------------------------- -void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry ) +void Ruler::SetIndents( sal_uInt16 n, const RulerIndent* pIndentAry ) { if ( !n || !pIndentAry ) @@ -3110,7 +3111,7 @@ void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry ) } else { - USHORT i = n; + sal_uInt16 i = n; const RulerIndent* pAry1 = mpData->pIndents; const RulerIndent* pAry2 = pIndentAry; while ( i ) @@ -3134,7 +3135,7 @@ void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry ) // ----------------------------------------------------------------------- -void Ruler::SetTabs( USHORT n, const RulerTab* pTabAry ) +void Ruler::SetTabs( sal_uInt16 n, const RulerTab* pTabAry ) { if ( !n || !pTabAry ) { @@ -3154,7 +3155,7 @@ void Ruler::SetTabs( USHORT n, const RulerTab* pTabAry ) } else { - USHORT i = n; + sal_uInt16 i = n; const RulerTab* pAry1 = mpData->pTabs; const RulerTab* pAry2 = pTabAry; while ( i ) @@ -3183,17 +3184,17 @@ void Ruler::SetStyle( WinBits nStyle ) if ( mnWinStyle != nStyle ) { mnWinStyle = nStyle; - ImplInitExtraField( TRUE ); + ImplInitExtraField( sal_True ); } } // ----------------------------------------------------------------------- -void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle ) +void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle ) { /*const StyleSettings& rStyleSettings =*/ pDevice->GetSettings().GetStyleSettings(); Point aPos( rPos ); - USHORT nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL); + sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL); pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); pDevice->SetLineColor(); @@ -3203,13 +3204,13 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle ) pDevice->Pop(); } -void Ruler::SetTextRTL(BOOL bRTL) +void Ruler::SetTextRTL(sal_Bool bRTL) { if(mpData->bTextRTL != bRTL) { mpData->bTextRTL = bRTL; if ( IsReallyVisible() && IsUpdateMode() ) - ImplInitExtraField( TRUE ); + ImplInitExtraField( sal_True ); } } @@ -3217,16 +3218,16 @@ long Ruler::GetPageOffset() const { return mpData->nPageOff; } long Ruler::GetPageWidth() const { return mpData->nPageWidth; } long Ruler::GetNullOffset() const { return mpData->nNullOff; } long Ruler::GetMargin1() const { return mpData->nMargin1; } -USHORT Ruler::GetMargin1Style() const { return mpData->nMargin1Style; } +sal_uInt16 Ruler::GetMargin1Style() const { return mpData->nMargin1Style; } long Ruler::GetMargin2() const { return mpData->nMargin2; } -USHORT Ruler::GetMargin2Style() const { return mpData->nMargin2Style; } -USHORT Ruler::GetLineCount() const { return mpData->nLines; } +sal_uInt16 Ruler::GetMargin2Style() const { return mpData->nMargin2Style; } +sal_uInt16 Ruler::GetLineCount() const { return mpData->nLines; } const RulerLine* Ruler::GetLines() const { return mpData->pLines; } -USHORT Ruler::GetArrowCount() const { return mpData->nArrows; } +sal_uInt16 Ruler::GetArrowCount() const { return mpData->nArrows; } const RulerArrow* Ruler::GetArrows() const { return mpData->pArrows; } -USHORT Ruler::GetBorderCount() const { return mpData->nBorders; } +sal_uInt16 Ruler::GetBorderCount() const { return mpData->nBorders; } const RulerBorder* Ruler::GetBorders() const { return mpData->pBorders; } -USHORT Ruler::GetIndentCount() const { return mpData->nIndents; } +sal_uInt16 Ruler::GetIndentCount() const { return mpData->nIndents; } const RulerIndent* Ruler::GetIndents() const { return mpData->pIndents; } /* --------------------------------------------------- diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index f311ddf67612..98f6c05ac0d7 100644..100755 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -28,8 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "scriptedtext.hxx" - +#include <svtools/scriptedtext.hxx> #include <vector> #include <rtl/ustring.hxx> #include <vcl/outdev.hxx> @@ -235,7 +234,7 @@ void SvtScriptedTextHelper_Impl::CalculateBreaks( const uno::Reference< i18n::XB nScript = i18n::ScriptType::LATIN; while( (nScript != i18n::ScriptType::WEAK) && (nCharIx == nNextCharIx) ) { - nNextCharIx = mrOutDevice.HasGlyphs( GetFont( nScript ), maText, sal::static_int_cast< USHORT >(nCharIx), sal::static_int_cast< USHORT >(nNextPos - nCharIx) ); + nNextCharIx = mrOutDevice.HasGlyphs( GetFont( nScript ), maText, sal::static_int_cast< sal_uInt16 >(nCharIx), sal::static_int_cast< sal_uInt16 >(nNextPos - nCharIx) ); if( nCharIx == nNextCharIx ) ++nScript; } diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index dc007438583b..4d937981bea9 100644..100755 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -30,16 +30,16 @@ #include "precompiled_svtools.hxx" #define _SVT_SCRWIN_CXX -#include <scrwin.hxx> +#include <svtools/scrwin.hxx> //=================================================================== void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags ) { - bHandleDragging = (BOOL) ( nFlags & SCRWIN_THUMBDRAGGING ); + bHandleDragging = (sal_Bool) ( nFlags & SCRWIN_THUMBDRAGGING ); bVCenter = (nFlags & SCRWIN_VCENTER) == SCRWIN_VCENTER; bHCenter = (nFlags & SCRWIN_HCENTER) == SCRWIN_HCENTER; - bScrolling = FALSE; + bScrolling = sal_False; // set the handlers for the scrollbars aVScroll.SetScrollHdl( LINK(this, ScrollableWindow, ScrollHdl) ); @@ -140,7 +140,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll ) { // notify the start of scrolling, if not already scrolling if ( !bScrolling ) - StartScroll(), bScrolling = TRUE; + StartScroll(), bScrolling = sal_True; // get the delta in logic coordinates Size aDelta( PixelToLogic( Size( aHScroll.GetDelta(), aVScroll.GetDelta() ) ) ); @@ -155,7 +155,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll ) } // notify the end of scrolling - bScrolling = FALSE; + bScrolling = sal_False; EndScroll( aDelta.Width(), aDelta.Height() ); return 0; } @@ -166,7 +166,7 @@ IMPL_LINK( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll ) { // notify the start of scrolling, if not already scrolling if ( !bScrolling ) - StartScroll(), bScrolling = TRUE; + StartScroll(), bScrolling = sal_True; if ( bHandleDragging ) { @@ -190,25 +190,25 @@ void ScrollableWindow::Resize() // determine the size of the output-area and if we need scrollbars const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); - BOOL bVVisible = FALSE; // by default no vertical-ScrollBar - BOOL bHVisible = FALSE; // by default no horizontal-ScrollBar - BOOL bChanged; // determines if a visiblility was changed + sal_Bool bVVisible = sal_False; // by default no vertical-ScrollBar + sal_Bool bHVisible = sal_False; // by default no horizontal-ScrollBar + sal_Bool bChanged; // determines if a visiblility was changed do { - bChanged = FALSE; + bChanged = sal_False; // does we need a vertical ScrollBar if ( aOutPixSz.Width() < aTotPixSz.Width() && !bHVisible ) - { bHVisible = TRUE; + { bHVisible = sal_True; aOutPixSz.Height() -= nScrSize; - bChanged = TRUE; + bChanged = sal_True; } // does we need a horizontal ScrollBar if ( aOutPixSz.Height() < aTotPixSz.Height() && !bVVisible ) - { bVVisible = TRUE; + { bVVisible = sal_True; aOutPixSz.Width() -= nScrSize; - bChanged = TRUE; + bChanged = sal_True; } } @@ -356,10 +356,10 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize ) Window::GetOutputSizePixel().Height()); Size aWill( aWish.GetIntersection(aMax).GetSize() ); - BOOL bHScroll = FALSE; + sal_Bool bHScroll = sal_False; const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); if ( aWill.Width() < aWish.GetSize().Width() ) - { bHScroll = TRUE; + { bHScroll = sal_True; aWill.Height() = Min( aWill.Height()+nScrSize, aMax.GetSize().Height() ); } @@ -374,7 +374,7 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize ) //------------------------------------------------------------------- -BOOL ScrollableWindow::MakeVisible( const Rectangle& rTarget, BOOL bSloppy ) +sal_Bool ScrollableWindow::MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy ) { Rectangle aTarget; Rectangle aTotRect( Point(0, 0), PixelToLogic( aTotPixSz ) ); @@ -437,7 +437,7 @@ BOOL ScrollableWindow::MakeVisible( const Rectangle& rTarget, BOOL bSloppy ) // is the area already visible? Rectangle aVisArea( GetVisibleArea() ); if ( aVisArea.IsInside(rTarget) ) - return TRUE; + return sal_True; // is there somewhat to scroll? if ( aVisArea.TopLeft() != aTarget.TopLeft() ) @@ -466,7 +466,7 @@ Rectangle ScrollableWindow::GetVisibleArea() const //------------------------------------------------------------------- -void ScrollableWindow::SetLineSize( ULONG nHorz, ULONG nVert ) +void ScrollableWindow::SetLineSize( sal_uLong nHorz, sal_uLong nVert ) { Size aPixSz( LogicToPixel( Size(nHorz, nVert) ) ); nColumnPixW = aPixSz.Width(); @@ -477,7 +477,7 @@ void ScrollableWindow::SetLineSize( ULONG nHorz, ULONG nVert ) //------------------------------------------------------------------- -void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, USHORT ) +void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 ) { if ( !bScrolling ) StartScroll(); @@ -562,8 +562,8 @@ void ScrollableWindow::ScrollLines( long nLinesX, long nLinesY ) //------------------------------------------------------------------- -void ScrollableWindow::ScrollPages( long nPagesX, ULONG nOverlapX, - long nPagesY, ULONG nOverlapY ) +void ScrollableWindow::ScrollPages( long nPagesX, sal_uLong nOverlapX, + long nPagesY, sal_uLong nOverlapY ) { Size aOutSz( GetVisibleArea().GetSize() ); Scroll( nPagesX * aOutSz.Width() + (nPagesX>0 ? 1 : -1) * nOverlapX, diff --git a/svtools/source/control/stdctrl.cxx b/svtools/source/control/stdctrl.cxx index 55aa20209699..d2cd0aa75099 100644..100755 --- a/svtools/source/control/stdctrl.cxx +++ b/svtools/source/control/stdctrl.cxx @@ -81,7 +81,7 @@ namespace svt // make it transparent SetControlBackground(); SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 13a9cdacfc5e..539ce156bbb7 100644..100755 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -30,13 +30,10 @@ #include "precompiled_svtools.hxx" #include <string.h> - #include <vcl/svapp.hxx> - #include <vcl/i18nhelp.hxx> - -#include <ctrltool.hxx> -#include <stdmenu.hxx> +#include <svtools/ctrltool.hxx> +#include <svtools/stdmenu.hxx> // ======================================================================== @@ -80,13 +77,13 @@ void FontNameMenu::Fill( const FontList* pList ) const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); // more than 100 fonts reduces the speed of opening the menu. // So only the first 100 fonts will be displayed. - USHORT nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< USHORT >(100) ); - for ( USHORT i = 0; i < nFontCount; i++ ) + sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) ); + for ( sal_uInt16 i = 0; i < nFontCount; i++ ) { const XubString& rName = pList->GetFontName( i ).GetName(); // sort with the I18nHelper - USHORT j = GetItemCount(); + sal_uInt16 j = GetItemCount(); while ( j ) { XubString aText = GetItemText( GetItemId( j-1 ) ); @@ -107,11 +104,11 @@ void FontNameMenu::SetCurName( const XubString& rName ) maCurName = rName; // Menueintrag checken - USHORT nChecked = 0; - USHORT nItemCount = GetItemCount(); - for( USHORT i = 0; i < nItemCount; i++ ) + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = GetItemCount(); + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = GetItemId( i ); + sal_uInt16 nItemId = GetItemId( i ); if ( IsItemChecked( nItemId ) ) nChecked = nItemId; @@ -119,13 +116,13 @@ void FontNameMenu::SetCurName( const XubString& rName ) XubString aText = GetItemText( nItemId ); if ( aText == maCurName ) { - CheckItem( nItemId, TRUE ); + CheckItem( nItemId, sal_True ); return; } } if ( nChecked ) - CheckItem( nChecked, FALSE ); + CheckItem( nChecked, sal_False ); } // ======================================================================== @@ -145,7 +142,7 @@ FontStyleMenu::~FontStyleMenu() void FontStyleMenu::Select() { - USHORT nCurId = GetCurItemId(); + sal_uInt16 nCurId = GetCurItemId(); if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) ) { @@ -160,7 +157,7 @@ void FontStyleMenu::Select() void FontStyleMenu::Highlight() { - USHORT nCurId = GetCurItemId(); + sal_uInt16 nCurId = GetCurItemId(); if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) ) { @@ -175,22 +172,22 @@ void FontStyleMenu::Highlight() // ----------------------------------------------------------------------- -BOOL FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, USHORT nCount ) +sal_Bool FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, sal_uInt16 nCount ) { - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) { if ( GetItemText( i+FONTSTYLEMENU_FIRSTID ) == rStyleName ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- void FontStyleMenu::Fill( const XubString& rName, const FontList* pList ) { - USHORT nItemId = GetItemId( 0 ); + sal_uInt16 nItemId = GetItemId( 0 ); while ( (nItemId >= FONTSTYLEMENU_FIRSTID) && (nItemId <= FONTSTYLEMENU_LASTID) ) { @@ -203,16 +200,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList ) if ( hFontInfo ) { XubString aStyleText; - USHORT nPos = 0; - USHORT nId = FONTSTYLEMENU_FIRSTID; + sal_uInt16 nPos = 0; + sal_uInt16 nId = FONTSTYLEMENU_FIRSTID; FontWeight eLastWeight = WEIGHT_DONTKNOW; FontItalic eLastItalic = ITALIC_NONE; FontWidth eLastWidth = WIDTH_DONTKNOW; - BOOL bNormal = FALSE; - BOOL bItalic = FALSE; - BOOL bBold = FALSE; - BOOL bBoldItalic = FALSE; - BOOL bInsert = FALSE; + sal_Bool bNormal = sal_False; + sal_Bool bItalic = sal_False; + sal_Bool bBold = sal_False; + sal_Bool bBoldItalic = sal_False; + sal_Bool bInsert = sal_False; FontInfo aInfo; while ( hFontInfo ) { @@ -237,16 +234,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList ) if ( eWeight <= WEIGHT_NORMAL ) { if ( eItalic != ITALIC_NONE ) - bItalic = TRUE; + bItalic = sal_True; else - bNormal = TRUE; + bNormal = sal_True; } else { if ( eItalic != ITALIC_NONE ) - bBoldItalic = TRUE; + bBoldItalic = sal_True; else - bBold = TRUE; + bBold = sal_True; } // For wrong StyleNames we replace this with the correct once @@ -280,11 +277,11 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList ) } if ( !bItalic && (aStyleText == pList->GetItalicStr()) ) - bItalic = TRUE; + bItalic = sal_True; else if ( !bBold && (aStyleText == pList->GetBoldStr()) ) - bBold = TRUE; + bBold = sal_True; else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) ) - bBoldItalic = TRUE; + bBoldItalic = sal_True; hFontInfo = pList->GetNextFontInfo( hFontInfo ); } @@ -349,11 +346,11 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle ) maCurStyle = rStyle; // Menueintrag checken - USHORT nChecked = 0; - USHORT nItemCount = GetItemCount(); - for( USHORT i = 0; i < nItemCount; i++ ) + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = GetItemCount(); + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = GetItemId( i ); + sal_uInt16 nItemId = GetItemId( i ); if ( (nItemId < FONTSTYLEMENU_FIRSTID) || (nItemId > FONTSTYLEMENU_LASTID) ) @@ -365,13 +362,13 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle ) XubString aText = GetItemText( nItemId ); if ( aText == maCurStyle ) { - CheckItem( nItemId, TRUE ); + CheckItem( nItemId, sal_True ); return; } } if ( nChecked ) - CheckItem( nChecked, FALSE ); + CheckItem( nChecked, sal_False ); } // ======================================================================== @@ -395,7 +392,7 @@ FontSizeMenu::~FontSizeMenu() void FontSizeMenu::Select() { - const USHORT nCurItemId = GetCurItemId(); + const sal_uInt16 nCurItemId = GetCurItemId(); mnCurHeight = mpHeightAry[ nCurItemId - 1 ]; maSelectHdl.Call( this ); } @@ -405,7 +402,7 @@ void FontSizeMenu::Select() void FontSizeMenu::Highlight() { const long nTempHeight = mnCurHeight; - const USHORT nCurItemId = GetCurItemId(); + const sal_uInt16 nCurItemId = GetCurItemId(); if ( !nCurItemId ) mnCurHeight = 0; else @@ -429,11 +426,11 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) const long* pTempAry; const long* pAry = pList->GetSizeAry( rInfo ); - USHORT nSizeCount = 0; + sal_uInt16 nSizeCount = 0; while ( pAry[nSizeCount] ) nSizeCount++; - USHORT nPos = 0; + sal_uInt16 nPos = 0; // first insert font size names (for simplified/traditional chinese) FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() ); @@ -443,8 +440,8 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) if ( pAry == pList->GetStdSizeAry() ) { // for scalable fonts all font size names - ULONG nCount = aFontSizeNames.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = aFontSizeNames.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) { String aSizeName = aFontSizeNames.GetIndexName( i ); long nSize = aFontSizeNames.GetIndexSize( i ); @@ -478,7 +475,7 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) { mpHeightAry[nPos] = *pTempAry; nPos++; // Id is nPos+1 - InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK ); + InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK ); pTempAry++; } @@ -492,16 +489,16 @@ void FontSizeMenu::SetCurHeight( long nHeight ) mnCurHeight = nHeight; // check menue item - XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE ); - USHORT nChecked = 0; - USHORT nItemCount = GetItemCount(); - for( USHORT i = 0; i < nItemCount; i++ ) + XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False ); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = GetItemCount(); + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = GetItemId( i ); + sal_uInt16 nItemId = GetItemId( i ); if ( mpHeightAry[i] == nHeight ) { - CheckItem( nItemId, TRUE ); + CheckItem( nItemId, sal_True ); return; } @@ -510,7 +507,7 @@ void FontSizeMenu::SetCurHeight( long nHeight ) } if ( nChecked ) - CheckItem( nChecked, FALSE ); + CheckItem( nChecked, sal_False ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/svxbox.cxx b/svtools/source/control/svxbox.cxx index 7bb17b83ea9e..23c738df7dac 100644..100755 --- a/svtools/source/control/svxbox.cxx +++ b/svtools/source/control/svxbox.cxx @@ -43,17 +43,17 @@ SV_IMPL_PTRARR(SvxEntryLst, SvxBoxEntry*) SvxBoxEntry::SvxBoxEntry() : nId(LISTBOX_ENTRY_NOTFOUND), - bModified(FALSE), - bNew(FALSE) + bModified(sal_False), + bNew(sal_False) { } -SvxBoxEntry::SvxBoxEntry(const String& aNam, USHORT nIdx) : +SvxBoxEntry::SvxBoxEntry(const String& aNam, sal_uInt16 nIdx) : aName(aNam), nId(nIdx), - bModified(FALSE), - bNew(FALSE) + bModified(sal_False), + bNew(sal_False) { } @@ -96,8 +96,8 @@ SvxListBox::~SvxListBox() void SvxListBox::InitListBox() { // Verwaltung fuer die Stringlist aus der Resource aufbauen - USHORT nSize = GetEntryCount(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = GetEntryCount(); + for(sal_uInt16 i=0; i < nSize; ++i) { const SvxBoxEntry* pTmp = new SvxBoxEntry(ListBox::GetEntry(i), i); const SvxBoxEntry* &rpTmp = pTmp; aEntryLst.Insert(rpTmp, aEntryLst.Count()); @@ -111,7 +111,7 @@ void SvxListBox::InitListBox() void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry) { SvxBoxEntry* pNew = new SvxBoxEntry(rEntry); - pNew->bNew = TRUE; + pNew->bNew = sal_True; InsertSorted(pNew); } @@ -119,7 +119,7 @@ void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry) Beschreibung: Eintrag in die ListBox aufnehmen --------------------------------------------------------------------*/ -void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos) +void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, sal_uInt16 nPos) { if(nPos != LISTBOX_ENTRY_NOTFOUND) { @@ -136,7 +136,7 @@ void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos) Beschreibung: Eintrag aus der Liste loeschen --------------------------------------------------------------------*/ -void SvxListBox::RemoveEntry(USHORT nPos) +void SvxListBox::RemoveEntry(sal_uInt16 nPos) { if(nPos >= aEntryLst.Count()) return; @@ -160,7 +160,7 @@ void SvxListBox::RemoveEntry(USHORT nPos) void SvxListBox::RemoveEntry(const SvxBoxEntry& rEntry) { - USHORT nPos = ListBox::GetEntryPos(rEntry.aName); + sal_uInt16 nPos = ListBox::GetEntryPos(rEntry.aName); RemoveEntry(nPos); } @@ -179,7 +179,7 @@ void SvxListBox::Clear() Beschreibung: Position by Name --------------------------------------------------------------------*/ -USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const +sal_uInt16 SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const { return ListBox::GetEntryPos(rEntry.aName); } @@ -188,7 +188,7 @@ USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const Beschreibung: Rund um die Entries --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(USHORT nPos) const +const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(sal_uInt16 nPos) const { if(nPos < aEntryLst.Count()) return *aEntryLst[nPos]; @@ -200,13 +200,13 @@ const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(USHORT nPos) const Beschreibung: aktullen Eintrag zurueckgeben --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(USHORT nSelId) const +const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(sal_uInt16 nSelId) const { String aName(ListBox::GetSelectEntry(nSelId)); if(aName.Len() > 0) { - for (USHORT i=0; i < aEntryLst.Count(); i++) + for (sal_uInt16 i=0; i < aEntryLst.Count(); i++) { if(aEntryLst[i]->aName == aName ) return *aEntryLst[i]; @@ -219,11 +219,11 @@ const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(USHORT nSelId) const Beschreibung: modifizierte Eintraege --------------------------------------------------------------------*/ -USHORT SvxListBox::GetModifiedCount() const +sal_uInt16 SvxListBox::GetModifiedCount() const { - USHORT nMod = 0; - USHORT nSize = aEntryLst.Count(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nMod = 0; + sal_uInt16 nSize = aEntryLst.Count(); + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bModified) nMod++; } @@ -234,7 +234,7 @@ USHORT SvxListBox::GetModifiedCount() const Beschreibung: Modifizierte Eintraege behandeln --------------------------------------------------------------------*/ -void SvxListBox::ModifyEntry(USHORT nPos, const String& rName) +void SvxListBox::ModifyEntry(sal_uInt16 nPos, const String& rName) { if(nPos >= aEntryLst.Count()) return; @@ -242,7 +242,7 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName) SvxBoxEntry* pEntry = aEntryLst[nPos]; aEntryLst.Remove(nPos, 1); aEntryLst[nPos]->aName = rName; - aEntryLst[nPos]->bModified = TRUE; + aEntryLst[nPos]->bModified = sal_True; ListBox::RemoveEntry(nPos); InsertSorted(pEntry); @@ -252,11 +252,11 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName) Beschreibung: alle modifizierten Eintraege bahandeln --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const +const SvxBoxEntry& SvxListBox::GetModifiedEntry(sal_uInt16 nPos) const { - USHORT nSize = aEntryLst.Count(); - USHORT nMod = 0; - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = aEntryLst.Count(); + sal_uInt16 nMod = 0; + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bModified) { if(nMod == nPos) return *aEntryLst[i]; @@ -270,13 +270,13 @@ const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const Beschreibung: geloeschte Eintraege --------------------------------------------------------------------*/ -USHORT SvxListBox::GetRemovedCount() const +sal_uInt16 SvxListBox::GetRemovedCount() const { return aDelEntryLst.Count(); } -const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const +const SvxBoxEntry& SvxListBox::GetRemovedEntry(sal_uInt16 nPos) const { if(nPos < aDelEntryLst.Count()) return *aDelEntryLst[nPos]; @@ -288,11 +288,11 @@ const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const Beschreibung: Neue Entries begutachten --------------------------------------------------------------------*/ -USHORT SvxListBox::GetNewCount() const +sal_uInt16 SvxListBox::GetNewCount() const { - USHORT nNew = 0; - USHORT nSize = aEntryLst.Count(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nNew = 0; + sal_uInt16 nSize = aEntryLst.Count(); + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bNew) nNew++; } @@ -303,11 +303,11 @@ USHORT SvxListBox::GetNewCount() const Beschreibung: Alle neuen Eintraege ueberpruefen --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const +const SvxBoxEntry& SvxListBox::GetNewEntry(sal_uInt16 nPos) const { - USHORT nSize = aEntryLst.Count(); - USHORT nNew = 0; - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = aEntryLst.Count(); + sal_uInt16 nNew = 0; + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bNew) { if(nNew == nPos) return *aEntryLst[i]; @@ -324,7 +324,7 @@ const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const void SvxListBox::InsertSorted(SvxBoxEntry* pEntry) { ListBox::InsertEntry(pEntry->aName); - USHORT nPos = ListBox::GetEntryPos(pEntry->aName); + sal_uInt16 nPos = ListBox::GetEntryPos(pEntry->aName); aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos); } @@ -332,7 +332,7 @@ void SvxListBox::InsertSorted(SvxBoxEntry* pEntry) Beschreibung: ComboBoxen mit Verwaltungseinheit --------------------------------------------------------------------*/ -SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) : +SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, sal_uInt16 nStyleBits) : ComboBox(pParent, nBits), nStyle(nStyleBits) { @@ -340,7 +340,7 @@ SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) : } -SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ): +SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ): ComboBox(pParent, rId), nStyle(nStyleBits) { @@ -364,8 +364,8 @@ SvxComboBox::~SvxComboBox() void SvxComboBox::InitComboBox() { // Verwaltung fuer die Stringlist aus der Resource aufbauen - USHORT nSize = GetEntryCount(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = GetEntryCount(); + for(sal_uInt16 i=0; i < nSize; ++i) { const SvxBoxEntry* pTmp = new SvxBoxEntry(ComboBox::GetEntry(i), i); const SvxBoxEntry* &rpTmp = pTmp; aEntryLst.Insert(rpTmp, aEntryLst.Count()); @@ -379,7 +379,7 @@ void SvxComboBox::InitComboBox() void SvxComboBox::InsertNewEntry(const SvxBoxEntry& rEntry) { SvxBoxEntry* pNew = new SvxBoxEntry(rEntry); - pNew->bNew = TRUE; + pNew->bNew = sal_True; InsertSorted(pNew); } @@ -396,7 +396,7 @@ void SvxComboBox::InsertEntry(const SvxBoxEntry& rEntry) Beschreibung: Eintrag aus der Liste loeschen --------------------------------------------------------------------*/ -void SvxComboBox::RemoveEntry(USHORT nPos) +void SvxComboBox::RemoveEntry(sal_uInt16 nPos) { if(nPos >= aEntryLst.Count()) return; @@ -420,7 +420,7 @@ void SvxComboBox::RemoveEntry(USHORT nPos) void SvxComboBox::RemoveEntry(const SvxBoxEntry& rEntry) { - USHORT nPos = ComboBox::GetEntryPos(rEntry.aName); + sal_uInt16 nPos = ComboBox::GetEntryPos(rEntry.aName); RemoveEntry(nPos); } @@ -440,7 +440,7 @@ void SvxComboBox::Clear() Beschreibung: Position by Name --------------------------------------------------------------------*/ -USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const +sal_uInt16 SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const { return ComboBox::GetEntryPos(rEntry.aName); } @@ -449,7 +449,7 @@ USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const Beschreibung: Rund um die Entries --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const +const SvxBoxEntry& SvxComboBox::GetEntry(sal_uInt16 nPos) const { if(nPos < aEntryLst.Count()) return *aEntryLst[nPos]; @@ -461,11 +461,11 @@ const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const Beschreibung: modifizierte Eintraege --------------------------------------------------------------------*/ -USHORT SvxComboBox::GetModifiedCount() const +sal_uInt16 SvxComboBox::GetModifiedCount() const { - USHORT nMod = 0; - USHORT nSize = aEntryLst.Count(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nMod = 0; + sal_uInt16 nSize = aEntryLst.Count(); + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bModified) nMod++; } @@ -476,7 +476,7 @@ USHORT SvxComboBox::GetModifiedCount() const Beschreibung: Modifizierte Eintraege behandeln --------------------------------------------------------------------*/ -void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName) +void SvxComboBox::ModifyEntry(sal_uInt16 nPos, const String& rName) { if(nPos >= aEntryLst.Count()) return; @@ -484,7 +484,7 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName) SvxBoxEntry* pEntry = aEntryLst[nPos]; aEntryLst.Remove(nPos, 1); aEntryLst[nPos]->aName = rName; - aEntryLst[nPos]->bModified = TRUE; + aEntryLst[nPos]->bModified = sal_True; ComboBox::RemoveEntry(nPos); InsertSorted(pEntry); @@ -494,11 +494,11 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName) Beschreibung: alle modifizierten Eintraege bahandeln --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const +const SvxBoxEntry& SvxComboBox::GetModifiedEntry(sal_uInt16 nPos) const { - USHORT nSize = aEntryLst.Count(); - USHORT nMod = 0; - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = aEntryLst.Count(); + sal_uInt16 nMod = 0; + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bModified) { if(nMod == nPos) return *aEntryLst[i]; @@ -512,13 +512,13 @@ const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const Beschreibung: geloeschte Eintraege --------------------------------------------------------------------*/ -USHORT SvxComboBox::GetRemovedCount() const +sal_uInt16 SvxComboBox::GetRemovedCount() const { return aDelEntryLst.Count(); } -const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const +const SvxBoxEntry& SvxComboBox::GetRemovedEntry(sal_uInt16 nPos) const { if(nPos < aDelEntryLst.Count()) return *aDelEntryLst[nPos]; @@ -530,11 +530,11 @@ const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const Beschreibung: Neue Entries begutachten --------------------------------------------------------------------*/ -USHORT SvxComboBox::GetNewCount() const +sal_uInt16 SvxComboBox::GetNewCount() const { - USHORT nNew = 0; - USHORT nSize = aEntryLst.Count(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nNew = 0; + sal_uInt16 nSize = aEntryLst.Count(); + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bNew) nNew++; } @@ -545,11 +545,11 @@ USHORT SvxComboBox::GetNewCount() const Beschreibung: Alle neuen Eintraege ueberpruefen --------------------------------------------------------------------*/ -const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const +const SvxBoxEntry& SvxComboBox::GetNewEntry(sal_uInt16 nPos) const { - USHORT nSize = aEntryLst.Count(); - USHORT nNew = 0; - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = aEntryLst.Count(); + sal_uInt16 nNew = 0; + for(sal_uInt16 i=0; i < nSize; ++i) { if(aEntryLst[i]->bNew) { if(nNew == nPos) return *aEntryLst[i]; @@ -566,7 +566,7 @@ const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const void SvxComboBox::InsertSorted(SvxBoxEntry* pEntry) { ComboBox::InsertEntry(pEntry->aName); - USHORT nPos = ComboBox::GetEntryPos(pEntry->aName); + sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName); aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos); } diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 75c02afda571..b969483d25af 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -29,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "tabbar.hxx" +#include <svtools/tabbar.hxx> #include <tools/time.hxx> #include <tools/debug.hxx> #include <tools/poly.hxx> @@ -39,10 +39,8 @@ #include <vcl/button.hxx> #include <vcl/edit.hxx> #include "svtaccessiblefactory.hxx" - -#include "svtools/svtools.hrc" -#include "svtools/svtdata.hxx" - +#include <filectrl.hrc> +#include <svtools/svtdata.hxx> #include <limits> // ======================================================================= @@ -52,36 +50,35 @@ #define TABBAR_DRAG_SCROLLOFF 5 #define TABBAR_MINSIZE 5 -const USHORT ADDNEWPAGE_AREAWIDTH = 10; +const sal_uInt16 ADDNEWPAGE_AREAWIDTH = 10; // ======================================================================= struct ImplTabBarItem { - USHORT mnId; + sal_uInt16 mnId; TabBarPageBits mnBits; XubString maText; XubString maHelpText; Rectangle maRect; long mnWidth; - ULONG mnHelpId; - BOOL mbShort; - BOOL mbSelect; - BOOL mbEnable; + rtl::OString maHelpId; + sal_Bool mbShort; + sal_Bool mbSelect; + sal_Bool mbEnable; Color maTabBgColor; Color maTabTextColor; - ImplTabBarItem( USHORT nItemId, const XubString& rText, + ImplTabBarItem( sal_uInt16 nItemId, const XubString& rText, TabBarPageBits nPageBits ) : maText( rText ) { mnId = nItemId; mnBits = nPageBits; mnWidth = 0; - mnHelpId = 0; - mbShort = FALSE; - mbSelect = FALSE; - mbEnable = TRUE; + mbShort = sal_False; + mbSelect = sal_False; + mbEnable = sal_True; maTabBgColor = Color( COL_AUTO ); maTabTextColor = Color( COL_AUTO ); } @@ -128,7 +125,7 @@ long ImplTabButton::PreNotify( NotifyEvent& rNEvt ) if ( GetParent()->IsInEditMode() ) { GetParent()->EndEditMode(); - return TRUE; + return sal_True; } } @@ -245,7 +242,7 @@ class TabBarEdit : public Edit { private: Timer maLoseFocusTimer; - BOOL mbPostEvt; + sal_Bool mbPostEvt; DECL_LINK( ImplEndEditHdl, void* ); DECL_LINK( ImplEndTimerHdl, void* ); @@ -255,8 +252,8 @@ public: TabBar* GetParent() const { return (TabBar*)Window::GetParent(); } - void SetPostEvent() { mbPostEvt = TRUE; } - void ResetPostEvent() { mbPostEvt = FALSE; } + void SetPostEvent() { mbPostEvt = sal_True; } + void ResetPostEvent() { mbPostEvt = sal_False; } virtual long PreNotify( NotifyEvent& rNEvt ); virtual void LoseFocus(); @@ -267,7 +264,7 @@ public: TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) : Edit( pParent, nWinStyle ) { - mbPostEvt = FALSE; + mbPostEvt = sal_False; } // ----------------------------------------------------------------------- @@ -283,19 +280,19 @@ long TabBarEdit::PreNotify( NotifyEvent& rNEvt ) { if ( !mbPostEvt ) { - if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)FALSE ) ) - mbPostEvt = TRUE; + if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) ) + mbPostEvt = sal_True; } - return TRUE; + return sal_True; } else if ( pKEvt->GetKeyCode().GetCode() == KEY_ESCAPE ) { if ( !mbPostEvt ) { - if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)TRUE ) ) - mbPostEvt = TRUE; + if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_True ) ) + mbPostEvt = sal_True; } - return TRUE; + return sal_True; } } } @@ -309,8 +306,8 @@ void TabBarEdit::LoseFocus() { if ( !mbPostEvt ) { - if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)FALSE ) ) - mbPostEvt = TRUE; + if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) ) + mbPostEvt = sal_True; } Edit::LoseFocus(); @@ -325,7 +322,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel ) // We need this query, because the edit get a losefous event, // when it shows the context menu or the insert symbol dialog - if ( !HasFocus() && HasChildPathFocus( TRUE ) ) + if ( !HasFocus() && HasChildPathFocus( sal_True ) ) { maLoseFocusTimer.SetTimeout( 30 ); maLoseFocusTimer.SetTimeoutHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) ); @@ -346,10 +343,10 @@ IMPL_LINK( TabBarEdit, ImplEndTimerHdl, void*, EMPTYARG ) // We need this query, because the edit get a losefous event, // when it shows the context menu or the insert symbol dialog - if ( HasChildPathFocus( TRUE ) ) + if ( HasChildPathFocus( sal_True ) ) maLoseFocusTimer.Start(); else - GetParent()->EndEditMode( TRUE ); + GetParent()->EndEditMode( sal_True ); return 0; } @@ -398,25 +395,35 @@ void TabBar::ImplInit( WinBits nWinStyle ) mnDropPos = 0; mnSwitchId = 0; mnEditId = 0; - mbFormat = TRUE; - mbFirstFormat = TRUE; - mbSizeFormat = TRUE; - mbAutoMaxWidth = TRUE; - mbInSwitching = FALSE; - mbAutoEditMode = FALSE; - mbEditCanceled = FALSE; - mbDropPos = FALSE; - mbInSelect = FALSE; - mbSelColor = FALSE; - mbSelTextColor = FALSE; - mbMirrored = FALSE; + mbFormat = sal_True; + mbFirstFormat = sal_True; + mbSizeFormat = sal_True; + mbAutoMaxWidth = sal_True; + mbInSwitching = sal_False; + mbAutoEditMode = sal_False; + mbEditCanceled = sal_False; + mbDropPos = sal_False; + mbInSelect = sal_False; + mbSelColor = sal_False; + mbSelTextColor = sal_False; + mbMirrored = sal_False; if ( nWinStyle & WB_3DTAB ) mnOffY++; ImplInitControls(); + + if(mpFirstBtn) + mpFirstBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVET0HOME))); + if(mpPrevBtn) + mpPrevBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVELEFT))); + if(mpNextBtn) + mpNextBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT))); + if(mpLastBtn) + mpLastBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND))); + SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) ); - ImplInitSettings( TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True ); } // ----------------------------------------------------------------------- @@ -432,7 +439,7 @@ TabBar::TabBar( Window* pParent, WinBits nWinStyle ) : TabBar::~TabBar() { - EndEditMode( TRUE ); + EndEditMode( sal_True ); // Controls loeschen if ( mpPrevBtn ) @@ -480,7 +487,7 @@ ImplTabBarItem* TabBar::next() // ----------------------------------------------------------------------- -void TabBar::ImplInitSettings( BOOL bFont, BOOL bBackground ) +void TabBar::ImplInitSettings( sal_Bool bFont, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -554,12 +561,12 @@ void TabBar::ImplGetColors( Color& rFaceColor, Color& rFaceTextColor, // ----------------------------------------------------------------------- -BOOL TabBar::ImplCalcWidth() +sal_Bool TabBar::ImplCalcWidth() { // Groessen muessen nur ermittelt werden, wenn sich Text aendert oder // wenn der Font geaendert wurde if ( !mbSizeFormat ) - return FALSE; + return sal_False; // Breiten der Tabs mit dem fetten Font ermitteln Font aFont = GetFont(); @@ -582,28 +589,28 @@ BOOL TabBar::ImplCalcWidth() else mnCurMaxWidth = 0; - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { ImplTabBarItem* pItem = (*mpItemList)[ i ]; long nNewWidth = GetTextWidth( pItem->maText ); if ( mnCurMaxWidth && (nNewWidth > mnCurMaxWidth) ) { - pItem->mbShort = TRUE; + pItem->mbShort = sal_True; nNewWidth = mnCurMaxWidth; } else - pItem->mbShort = FALSE; + pItem->mbShort = sal_False; nNewWidth += TABBAR_OFFSET_X+TABBAR_OFFSET_X2; if ( pItem->mnWidth != nNewWidth ) { pItem->mnWidth = nNewWidth; if ( !pItem->maRect.IsEmpty() ) - bChanged = TRUE; + bChanged = sal_True; } } - mbSizeFormat = FALSE; - mbFormat = TRUE; + mbSizeFormat = sal_False; + mbFormat = sal_True; return bChanged; } @@ -616,7 +623,7 @@ void TabBar::ImplFormat() if ( !mbFormat ) return; - USHORT n = 0; + sal_uInt16 n = 0; long x = mnOffX; for ( size_t i = 0, nL = mpItemList->size(); i < nL; ++i ) { @@ -650,7 +657,7 @@ void TabBar::ImplFormat() n++; } - mbFormat = FALSE; + mbFormat = sal_False; // Button enablen/disablen ImplEnableControls(); @@ -658,13 +665,13 @@ void TabBar::ImplFormat() // ----------------------------------------------------------------------- -USHORT TabBar::ImplGetLastFirstPos() +sal_uInt16 TabBar::ImplGetLastFirstPos() { - USHORT nCount = (USHORT)(mpItemList->size()); + sal_uInt16 nCount = (sal_uInt16)(mpItemList->size()); if ( !nCount || mbSizeFormat || mbFormat ) return 0; - USHORT nLastFirstPos = nCount-1; + sal_uInt16 nLastFirstPos = nCount-1; long nWinWidth = mnLastOffX-mnOffX-TABBAR_OFFSET_X-ADDNEWPAGE_AREAWIDTH; long nWidth = (*mpItemList)[ nLastFirstPos ]->mnWidth; while ( nLastFirstPos && (nWidth < nWinWidth) ) @@ -672,7 +679,7 @@ USHORT TabBar::ImplGetLastFirstPos() nLastFirstPos--; nWidth += (*mpItemList)[ nLastFirstPos ]->mnWidth; } - if ( (nLastFirstPos != (USHORT)(mpItemList->size()-1)) && + if ( (nLastFirstPos != (sal_uInt16)(mpItemList->size()-1)) && (nWidth > nWinWidth) ) nLastFirstPos++; return nLastFirstPos; @@ -754,7 +761,7 @@ void TabBar::ImplEnableControls() return; // Buttons enablen/disblen - BOOL bEnableBtn = mnFirstPos > 0; + sal_Bool bEnableBtn = mnFirstPos > 0; if ( mpFirstBtn ) mpFirstBtn->Enable( bEnableBtn ); if ( mpPrevBtn ) @@ -769,7 +776,7 @@ void TabBar::ImplEnableControls() // ----------------------------------------------------------------------- -void TabBar::ImplShowPage( USHORT nPos ) +void TabBar::ImplShowPage( sal_uInt16 nPos ) { // Breite berechnen long nWidth = GetOutputSizePixel().Width(); @@ -782,7 +789,7 @@ void TabBar::ImplShowPage( USHORT nPos ) { while ( pItem->maRect.Right() > nWidth ) { - USHORT nNewPos = mnFirstPos+1; + sal_uInt16 nNewPos = mnFirstPos+1; SetFirstPageId( GetPageId( nNewPos ) ); ImplFormat(); if ( nNewPos != mnFirstPos ) @@ -797,7 +804,7 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn ) { EndEditMode(); - USHORT nNewPos = mnFirstPos; + sal_uInt16 nNewPos = mnFirstPos; if ( pBtn == mpFirstBtn ) nNewPos = 0; @@ -808,13 +815,13 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn ) } else if ( pBtn == mpNextBtn ) { - USHORT nCount = GetPageCount(); + sal_uInt16 nCount = GetPageCount(); if ( mnFirstPos < nCount ) nNewPos = mnFirstPos+1; } else { - USHORT nCount = GetPageCount(); + sal_uInt16 nCount = GetPageCount(); if ( nCount ) nNewPos = nCount-1; } @@ -829,7 +836,7 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn ) void TabBar::MouseMove( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeaveWindow() ) - mbInSelect = FALSE; + mbInSelect = sal_False; Window::MouseMove( rMEvt ); } @@ -847,14 +854,14 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) } ImplTabBarItem* pItem; - USHORT nSelId = GetPageId( rMEvt.GetPosPixel() ); + sal_uInt16 nSelId = GetPageId( rMEvt.GetPosPixel() ); if ( !rMEvt.IsLeft() ) { Window::MouseButtonDown( rMEvt ); if ( (nSelId > 0) && (nSelId != mnCurPageId) ) { - USHORT nPos = GetPagePos( nSelId ); + sal_uInt16 nPos = GetPagePos( nSelId ); pItem = (*mpItemList)[ nPos ]; if ( pItem->mbEnable ) @@ -866,7 +873,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) ImplActivatePage(); ImplSelect(); } - mbInSelect = TRUE; + mbInSelect = sal_True; } } return; @@ -882,8 +889,8 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) { if ( nSelId ) { - USHORT nPos = GetPagePos( nSelId ); - BOOL bSelectTab = FALSE; + sal_uInt16 nPos = GetPagePos( nSelId ); + sal_Bool bSelectTab = sal_False; pItem = (*mpItemList)[ nPos ]; if ( pItem->mbEnable ) @@ -893,15 +900,15 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) if ( nSelId != mnCurPageId ) { SelectPage( nSelId, !IsPageSelected( nSelId ) ); - bSelectTab = TRUE; + bSelectTab = sal_True; } } else if ( mnWinStyle & (WB_MULTISELECT | WB_RANGESELECT) ) { - bSelectTab = TRUE; - USHORT n; - BOOL bSelect; - USHORT nCurPos = GetPagePos( mnCurPageId ); + bSelectTab = sal_True; + sal_uInt16 n; + sal_Bool bSelect; + sal_uInt16 nCurPos = GetPagePos( mnCurPageId ); if ( nPos <= nCurPos ) { // Alle Tabs bis zur angeklickten Tab deselektieren @@ -912,9 +919,9 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) { pItem = (*mpItemList)[ n ]; if ( n < nPos ) - bSelect = FALSE; + bSelect = sal_False; else - bSelect = TRUE; + bSelect = sal_True; if ( pItem->mbSelect != bSelect ) { @@ -932,16 +939,16 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) // Alle Tabs von der aktuellen bis zur angeklickten // Tab selektieren und alle Tabs von der angeklickten // Tab bis zur letzten Tab deselektieren - USHORT nCount = (USHORT)mpItemList->size(); + sal_uInt16 nCount = (sal_uInt16)mpItemList->size(); n = nCurPos; while ( n < nCount ) { pItem = (*mpItemList)[ n ]; if ( n <= nPos ) - bSelect = TRUE; + bSelect = sal_True; else - bSelect = FALSE; + bSelect = sal_False; if ( pItem->mbSelect != bSelect ) { @@ -965,7 +972,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) } else ImplShowPage( nPos ); - mbInSelect = TRUE; + mbInSelect = sal_True; return; } @@ -975,7 +982,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) // Gegebenenfalls den Double-Click-Handler rufen if ( !rMEvt.GetModifier() && (!nSelId || (nSelId == mnCurPageId)) ) { - USHORT nOldCurId = mnCurPageId; + sal_uInt16 nOldCurId = mnCurPageId; mnCurPageId = nSelId; DoubleClick(); // Abfrage, da im DoubleClick-Handler die aktuelle Seite @@ -993,7 +1000,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) // Nur Select ausfuehren, wenn noch nicht aktuelle Page if ( nSelId != mnCurPageId ) { - USHORT nPos = GetPagePos( nSelId ); + sal_uInt16 nPos = GetPagePos( nSelId ); pItem = (*mpItemList)[ nPos ]; if ( pItem->mbEnable ) @@ -1001,9 +1008,9 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) if ( !pItem->mbSelect ) { // Muss invalidiert werden - BOOL bUpdate = FALSE; + sal_Bool bUpdate = sal_False; if ( IsReallyVisible() && IsUpdateMode() ) - bUpdate = TRUE; + bUpdate = sal_True; // Alle selektierten Items deselektieren for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) @@ -1011,7 +1018,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) pItem = (*mpItemList)[ i ]; if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) { - pItem->mbSelect = FALSE; + pItem->mbSelect = sal_False; if ( bUpdate ) Invalidate( pItem->maRect ); } @@ -1028,7 +1035,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) } else ImplShowPage( nPos ); - mbInSelect = TRUE; + mbInSelect = sal_True; } return; @@ -1042,7 +1049,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt ) void TabBar::MouseButtonUp( const MouseEvent& rMEvt ) { - mbInSelect = FALSE; + mbInSelect = sal_False; Window::MouseButtonUp( rMEvt ); } @@ -1456,7 +1463,7 @@ void TabBar::Resize() // Scroll-Buttons anordnen long nHeight = aNewSize.Height(); // Font in der groesse Anpassen? - ImplInitSettings( TRUE, FALSE ); + ImplInitSettings( sal_True, sal_False ); long nX = mbMirrored ? (aNewSize.Width()-nHeight) : 0; long nXDiff = mbMirrored ? -nHeight : nHeight; @@ -1502,7 +1509,7 @@ void TabBar::Resize() } // Neu formatieren - mbSizeFormat = TRUE; + mbSizeFormat = sal_True; if ( IsReallyVisible() ) { if ( ImplCalcWidth() ) @@ -1518,7 +1525,7 @@ void TabBar::Resize() void TabBar::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + sal_uInt16 nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); if ( nItemId ) { if ( rHEvt.GetMode() & HELPMODE_BALLOON ) @@ -1539,13 +1546,13 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { - ULONG nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -1554,7 +1561,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt ) // wenn dieser abgeschnitten oder nicht voll sichtbar ist if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) ) { - USHORT nPos = GetPagePos( nItemId ); + sal_uInt16 nPos = GetPagePos( nItemId ); ImplTabBarItem* pItem = (*mpItemList)[ nPos ]; if ( pItem->mbShort || (pItem->maRect.Right()-TABBAR_OFFSET_X-5 > mnLastOffX) ) @@ -1596,14 +1603,14 @@ void TabBar::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE ); + ImplInitSettings( sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) Invalidate(); else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, TRUE ); + ImplInitSettings( sal_False, sal_True ); Invalidate(); } else if ( nType == STATE_CHANGE_MIRRORING ) @@ -1629,7 +1636,7 @@ void TabBar::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True ); Invalidate(); } } @@ -1772,7 +1779,7 @@ long TabBar::DeactivatePage() if ( maDeactivatePageHdl.IsSet() ) return maDeactivatePageHdl.Call( this ); else - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -1782,7 +1789,7 @@ long TabBar::StartRenaming() if ( maStartRenamingHdl.IsSet() ) return maStartRenamingHdl.Call( this ); else - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -1792,7 +1799,7 @@ long TabBar::AllowRenaming() if ( maAllowRenamingHdl.IsSet() ) return maAllowRenamingHdl.Call( this ); else - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -1811,8 +1818,8 @@ void TabBar::Mirror() // ----------------------------------------------------------------------- -void TabBar::InsertPage( USHORT nPageId, const XubString& rText, - TabBarPageBits nBits, USHORT nPos ) +void TabBar::InsertPage( sal_uInt16 nPageId, const XubString& rText, + TabBarPageBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" ); DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND, @@ -1828,7 +1835,6 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText, } else { mpItemList->push_back( pItem ); } - mbSizeFormat = TRUE; // CurPageId gegebenenfalls setzen if ( !mnCurPageId ) @@ -1843,9 +1849,9 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText, // ----------------------------------------------------------------------- -Color TabBar::GetTabBgColor( USHORT nPageId ) const +Color TabBar::GetTabBgColor( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) return (*mpItemList)[ nPos ]->maTabBgColor; @@ -1853,9 +1859,9 @@ Color TabBar::GetTabBgColor( USHORT nPageId ) const return Color( COL_AUTO ); } -void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor ) +void TabBar::SetTabBgColor( sal_uInt16 nPageId, const Color& aTabBgColor ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); ImplTabBarItem* pItem; if ( nPos != PAGE_NOT_FOUND ) { @@ -1878,9 +1884,9 @@ void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor ) // ----------------------------------------------------------------------- -void TabBar::RemovePage( USHORT nPageId ) +void TabBar::RemovePage( sal_uInt16 nPageId ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); // Existiert Item if ( nPos != PAGE_NOT_FOUND ) @@ -1897,7 +1903,6 @@ void TabBar::RemovePage( USHORT nPageId ) ::std::advance( it, nPos ); delete *it; mpItemList->erase( it ); - mbFormat = TRUE; // Leiste neu ausgeben if ( IsReallyVisible() && IsUpdateMode() ) @@ -1909,9 +1914,9 @@ void TabBar::RemovePage( USHORT nPageId ) // ----------------------------------------------------------------------- -void TabBar::MovePage( USHORT nPageId, USHORT nNewPos ) +void TabBar::MovePage( sal_uInt16 nPageId, sal_uInt16 nNewPos ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); Pair aPair( nPos, nNewPos ); if ( nPos < nNewPos ) @@ -1935,7 +1940,6 @@ void TabBar::MovePage( USHORT nPageId, USHORT nNewPos ) } else { mpItemList->push_back( pItem ); } - mbFormat = TRUE; // Leiste neu ausgeben if ( IsReallyVisible() && IsUpdateMode() ) @@ -1956,7 +1960,7 @@ void TabBar::Clear() mpItemList->clear(); // Items aus der Liste loeschen - mbSizeFormat = TRUE; + mbSizeFormat = sal_True; mnCurPageId = 0; mnFirstPos = 0; maCurrentItemList = 0; @@ -1970,9 +1974,9 @@ void TabBar::Clear() // ----------------------------------------------------------------------- -void TabBar::EnablePage( USHORT nPageId, BOOL bEnable ) +void TabBar::EnablePage( sal_uInt16 nPageId, sal_Bool bEnable ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) { @@ -1993,21 +1997,21 @@ void TabBar::EnablePage( USHORT nPageId, BOOL bEnable ) // ----------------------------------------------------------------------- -BOOL TabBar::IsPageEnabled( USHORT nPageId ) const +sal_Bool TabBar::IsPageEnabled( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) return (*mpItemList)[ nPos ]->mbEnable; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits ) +void TabBar::SetPageBits( sal_uInt16 nPageId, TabBarPageBits nBits ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) { @@ -2026,33 +2030,33 @@ void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits ) // ----------------------------------------------------------------------- -TabBarPageBits TabBar::GetPageBits( USHORT nPageId ) const +TabBarPageBits TabBar::GetPageBits( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) return (*mpItemList)[ nPos ]->mnBits; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -USHORT TabBar::GetPageCount() const +sal_uInt16 TabBar::GetPageCount() const { - return (USHORT)mpItemList->size(); + return (sal_uInt16)mpItemList->size(); } // ----------------------------------------------------------------------- -USHORT TabBar::GetPageId( USHORT nPos ) const +sal_uInt16 TabBar::GetPageId( sal_uInt16 nPos ) const { return ( nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ]->mnId : 0; } // ----------------------------------------------------------------------- -USHORT TabBar::GetPagePos( USHORT nPageId ) const +sal_uInt16 TabBar::GetPagePos( sal_uInt16 nPageId ) const { for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { if ( (*mpItemList)[ i ]->mnId == nPageId ) { @@ -2085,9 +2089,9 @@ sal_uInt16 TabBar::GetPageId( const Point& rPos, bool bCheckInsTab ) const // ----------------------------------------------------------------------- -Rectangle TabBar::GetPageRect( USHORT nPageId ) const +Rectangle TabBar::GetPageRect( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) return (*mpItemList)[ nPos ]->maRect; @@ -2097,9 +2101,9 @@ Rectangle TabBar::GetPageRect( USHORT nPageId ) const // ----------------------------------------------------------------------- -void TabBar::SetCurPageId( USHORT nPageId ) +void TabBar::SetCurPageId( sal_uInt16 nPageId ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); // Wenn Item nicht existiert, dann nichts machen if ( nPos != PAGE_NOT_FOUND ) @@ -2110,9 +2114,9 @@ void TabBar::SetCurPageId( USHORT nPageId ) return; // Muss invalidiert werden - BOOL bUpdate = FALSE; + sal_Bool bUpdate = sal_False; if ( IsReallyVisible() && IsUpdateMode() ) - bUpdate = TRUE; + bUpdate = sal_True; ImplTabBarItem* pItem = (*mpItemList)[ nPos ]; ImplTabBarItem* pOldItem; @@ -2126,14 +2130,14 @@ void TabBar::SetCurPageId( USHORT nPageId ) // deselktieren, wenn dies die einzige selektierte Seite ist if ( !pItem->mbSelect && pOldItem ) { - USHORT nSelPageCount = GetSelectPageCount(); + sal_uInt16 nSelPageCount = GetSelectPageCount(); if ( nSelPageCount == 1 ) - pOldItem->mbSelect = FALSE; - pItem->mbSelect = TRUE; + pOldItem->mbSelect = sal_False; + pItem->mbSelect = sal_True; } mnCurPageId = nPageId; - mbFormat = TRUE; + mbFormat = sal_True; // Dafuer sorgen, das aktuelle Page sichtbar wird if ( IsReallyVisible() ) @@ -2155,7 +2159,7 @@ void TabBar::SetCurPageId( USHORT nPageId ) while ( (mbMirrored ? (pItem->maRect.Left() < mnOffX) : (pItem->maRect.Right() > nWidth)) || pItem->maRect.IsEmpty() ) { - USHORT nNewPos = mnFirstPos+1; + sal_uInt16 nNewPos = mnFirstPos+1; // Dafuer sorgen, das min. die aktuelle TabPages als // erste TabPage sichtbar ist if ( nNewPos >= nPos ) @@ -2186,12 +2190,12 @@ void TabBar::SetCurPageId( USHORT nPageId ) // ----------------------------------------------------------------------- -void TabBar::MakeVisible( USHORT nPageId ) +void TabBar::MakeVisible( sal_uInt16 nPageId ) { if ( !IsReallyVisible() ) return; - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); // Wenn Item nicht existiert, dann nichts machen if ( nPos != PAGE_NOT_FOUND ) @@ -2209,14 +2213,14 @@ void TabBar::MakeVisible( USHORT nPageId ) if ( mbFormat || pItem->maRect.IsEmpty() ) { - mbFormat = TRUE; + mbFormat = sal_True; ImplFormat(); } while ( (pItem->maRect.Right() > nWidth) || pItem->maRect.IsEmpty() ) { - USHORT nNewPos = mnFirstPos+1; + sal_uInt16 nNewPos = mnFirstPos+1; // Dafuer sorgen, das min. die aktuelle TabPages als // erste TabPage sichtbar ist if ( nNewPos >= nPos ) @@ -2238,11 +2242,11 @@ void TabBar::MakeVisible( USHORT nPageId ) // ----------------------------------------------------------------------- -void TabBar::SetFirstPageId( USHORT nPageId ) +void TabBar::SetFirstPageId( sal_uInt16 nPageId ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); - // Wenn Item nicht existiert, dann FALSE zurueckgeben + // Wenn Item nicht existiert, dann sal_False zurueckgeben if ( nPos != PAGE_NOT_FOUND ) { if ( nPos != mnFirstPos ) @@ -2250,8 +2254,8 @@ void TabBar::SetFirstPageId( USHORT nPageId ) // Dafuer sorgen, das nach Moeglichkteit soviele Pages wie // moeglich sichtbar sind ImplFormat(); - USHORT nLastFirstPos = ImplGetLastFirstPos(); - USHORT nNewPos; + sal_uInt16 nLastFirstPos = ImplGetLastFirstPos(); + sal_uInt16 nNewPos; if ( nPos > nLastFirstPos ) nNewPos = nLastFirstPos; else @@ -2260,7 +2264,7 @@ void TabBar::SetFirstPageId( USHORT nPageId ) if ( nNewPos != mnFirstPos ) { mnFirstPos = nNewPos; - mbFormat = TRUE; + mbFormat = sal_True; // Leiste neu ausgeben (Achtung: mbDropPos beachten, da wenn // dieses Flag gesetzt ist, wird direkt gepaintet) @@ -2273,9 +2277,9 @@ void TabBar::SetFirstPageId( USHORT nPageId ) // ----------------------------------------------------------------------- -void TabBar::SelectPage( USHORT nPageId, BOOL bSelect ) +void TabBar::SelectPage( sal_uInt16 nPageId, sal_Bool bSelect ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) { @@ -2294,10 +2298,10 @@ void TabBar::SelectPage( USHORT nPageId, BOOL bSelect ) // ----------------------------------------------------------------------- -void TabBar::SelectPageRange( BOOL bSelect, USHORT nStartPos, USHORT nEndPos ) +void TabBar::SelectPageRange( sal_Bool bSelect, sal_uInt16 nStartPos, sal_uInt16 nEndPos ) { Rectangle aPaintRect; - USHORT nPos = nStartPos; + sal_uInt16 nPos = nStartPos; ImplTabBarItem* pItem = seek( nPos ); while ( pItem && (nPos <= nEndPos) ) { @@ -2318,9 +2322,9 @@ void TabBar::SelectPageRange( BOOL bSelect, USHORT nStartPos, USHORT nEndPos ) // ----------------------------------------------------------------------- -USHORT TabBar::GetSelectPage( USHORT nSelIndex ) const +sal_uInt16 TabBar::GetSelectPage( sal_uInt16 nSelIndex ) const { - USHORT nSelected = 0; + sal_uInt16 nSelected = 0; for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { ImplTabBarItem* pItem = (*mpItemList)[ i ]; @@ -2336,9 +2340,9 @@ USHORT TabBar::GetSelectPage( USHORT nSelIndex ) const // ----------------------------------------------------------------------- -USHORT TabBar::GetSelectPageCount() const +sal_uInt16 TabBar::GetSelectPageCount() const { - USHORT nSelected = 0; + sal_uInt16 nSelected = 0; for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { ImplTabBarItem* pItem = (*mpItemList)[ i ]; @@ -2351,22 +2355,22 @@ USHORT TabBar::GetSelectPageCount() const // ----------------------------------------------------------------------- -BOOL TabBar::IsPageSelected( USHORT nPageId ) const +sal_Bool TabBar::IsPageSelected( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) return (*mpItemList)[ nPos ]->mbSelect; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL TabBar::StartEditMode( USHORT nPageId ) +sal_Bool TabBar::StartEditMode( sal_uInt16 nPageId ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( mpEdit || (nPos == PAGE_NOT_FOUND) || (mnLastOffX < 8) ) - return FALSE; + return sal_False; mnEditId = nPageId; if ( StartRenaming() ) @@ -2418,23 +2422,23 @@ BOOL TabBar::StartEditMode( USHORT nPageId ) mpEdit->GrabFocus(); mpEdit->SetSelection( Selection( 0, mpEdit->GetText().Len() ) ); mpEdit->Show(); - return TRUE; + return sal_True; } else { mnEditId = 0; - return FALSE; + return sal_False; } } // ----------------------------------------------------------------------- -void TabBar::EndEditMode( BOOL bCancel ) +void TabBar::EndEditMode( sal_Bool bCancel ) { if ( mpEdit ) { // call hdl - BOOL bEnd = TRUE; + sal_Bool bEnd = sal_True; mbEditCanceled = bCancel; maEditText = mpEdit->GetText(); mpEdit->SetPostEvent(); @@ -2444,9 +2448,9 @@ void TabBar::EndEditMode( BOOL bCancel ) if ( nAllowRenaming == TABBAR_RENAMING_YES ) SetPageText( mnEditId, maEditText ); else if ( nAllowRenaming == TABBAR_RENAMING_NO ) - bEnd = FALSE; + bEnd = sal_False; else // nAllowRenaming == TABBAR_RENAMING_CANCEL - mbEditCanceled = TRUE; + mbEditCanceled = sal_True; } // renaming not allowed, than reset edit data @@ -2466,30 +2470,30 @@ void TabBar::EndEditMode( BOOL bCancel ) // reset maEditText.Erase(); - mbEditCanceled = FALSE; + mbEditCanceled = sal_False; } } // ----------------------------------------------------------------------- -void TabBar::SetMirrored( BOOL bMirrored ) +void TabBar::SetMirrored( sal_Bool bMirrored ) { if( mbMirrored != bMirrored ) { mbMirrored = bMirrored; - mbSizeFormat = TRUE; + mbSizeFormat = sal_True; ImplInitControls(); // for button images Resize(); // recalculates control positions Mirror(); } } -void TabBar::SetEffectiveRTL( BOOL bRTL ) +void TabBar::SetEffectiveRTL( sal_Bool bRTL ) { SetMirrored( bRTL != Application::GetSettings().GetLayoutRTL() ); } -BOOL TabBar::IsEffectiveRTL() const +sal_Bool TabBar::IsEffectiveRTL() const { return IsMirrored() != Application::GetSettings().GetLayoutRTL(); } @@ -2501,7 +2505,7 @@ void TabBar::SetMaxPageWidth( long nMaxWidth ) if ( mnMaxPageWidth != nMaxWidth ) { mnMaxPageWidth = nMaxWidth; - mbSizeFormat = TRUE; + mbSizeFormat = sal_True; // Leiste neu ausgeben if ( IsReallyVisible() && IsUpdateMode() ) @@ -2516,7 +2520,7 @@ void TabBar::SetSelectColor() if ( mbSelColor ) { maSelColor = Color( COL_TRANSPARENT ); - mbSelColor = FALSE; + mbSelColor = sal_False; Invalidate(); } } @@ -2530,7 +2534,7 @@ void TabBar::SetSelectColor( const Color& rColor ) if ( mbSelColor ) { maSelColor = Color( COL_TRANSPARENT ); - mbSelColor = FALSE; + mbSelColor = sal_False; Invalidate(); } } @@ -2539,7 +2543,7 @@ void TabBar::SetSelectColor( const Color& rColor ) if ( maSelColor != rColor ) { maSelColor = rColor; - mbSelColor = TRUE; + mbSelColor = sal_True; Invalidate(); } } @@ -2552,7 +2556,7 @@ void TabBar::SetSelectTextColor() if ( mbSelTextColor ) { maSelTextColor = Color( COL_TRANSPARENT ); - mbSelTextColor = FALSE; + mbSelTextColor = sal_False; Invalidate(); } } @@ -2566,7 +2570,7 @@ void TabBar::SetSelectTextColor( const Color& rColor ) if ( mbSelTextColor ) { maSelTextColor = Color( COL_TRANSPARENT ); - mbSelTextColor = FALSE; + mbSelTextColor = sal_False; Invalidate(); } } @@ -2575,7 +2579,7 @@ void TabBar::SetSelectTextColor( const Color& rColor ) if ( maSelTextColor != rColor ) { maSelTextColor = rColor; - mbSelTextColor = TRUE; + mbSelTextColor = sal_True; Invalidate(); } } @@ -2583,13 +2587,13 @@ void TabBar::SetSelectTextColor( const Color& rColor ) // ----------------------------------------------------------------------- -void TabBar::SetPageText( USHORT nPageId, const XubString& rText ) +void TabBar::SetPageText( sal_uInt16 nPageId, const XubString& rText ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) { (*mpItemList)[ nPos ]->maText = rText; - mbSizeFormat = TRUE; + mbSizeFormat = sal_True; // Leiste neu ausgeben if ( IsReallyVisible() && IsUpdateMode() ) @@ -2601,9 +2605,9 @@ void TabBar::SetPageText( USHORT nPageId, const XubString& rText ) // ----------------------------------------------------------------------- -XubString TabBar::GetPageText( USHORT nPageId ) const +XubString TabBar::GetPageText( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) return (*mpItemList)[ nPos ]->maText; else @@ -2612,26 +2616,26 @@ XubString TabBar::GetPageText( USHORT nPageId ) const // ----------------------------------------------------------------------- -void TabBar::SetHelpText( USHORT nPageId, const XubString& rText ) +void TabBar::SetHelpText( sal_uInt16 nPageId, const XubString& rText ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) (*mpItemList)[ nPos ]->maHelpText = rText; } // ----------------------------------------------------------------------- -XubString TabBar::GetHelpText( USHORT nPageId ) const +XubString TabBar::GetHelpText( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) { ImplTabBarItem* pItem = (*mpItemList)[ nPos ]; - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } return pItem->maHelpText; @@ -2642,22 +2646,22 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const // ----------------------------------------------------------------------- -void TabBar::SetHelpId( USHORT nPageId, ULONG nHelpId ) +void TabBar::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId ) { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); if ( nPos != PAGE_NOT_FOUND ) - (*mpItemList)[ nPos ]->mnHelpId = nHelpId; + (*mpItemList)[ nPos ]->maHelpId = rHelpId; } // ----------------------------------------------------------------------- -ULONG TabBar::GetHelpId( USHORT nPageId ) const +rtl::OString TabBar::GetHelpId( sal_uInt16 nPageId ) const { - USHORT nPos = GetPagePos( nPageId ); + sal_uInt16 nPos = GetPagePos( nPageId ); + rtl::OString aRet; if ( nPos != PAGE_NOT_FOUND ) - return (*mpItemList)[ nPos ]->mnHelpId; - else - return 0; + return (*mpItemList)[ nPos ]->maHelpId; + return aRet; } // ----------------------------------------------------------------------- @@ -2674,10 +2678,10 @@ long TabBar::GetMinSize() const // ----------------------------------------------------------------------- -BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) +sal_Bool TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) { if ( !(mnWinStyle & WB_DRAG) || (rCEvt.GetCommand() != COMMAND_STARTDRAG) ) - return FALSE; + return sal_False; // Testen, ob angeklickte Seite selektiert ist. Falls dies nicht // der Fall ist, setzen wir ihn als aktuellen Eintrag. Falls Drag and @@ -2687,11 +2691,11 @@ BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) // da der Select schon den Bereich gescrollt haben kann if ( rCEvt.IsMouseEvent() && !mbInSelect ) { - USHORT nSelId = GetPageId( rCEvt.GetMousePosPixel() ); + sal_uInt16 nSelId = GetPageId( rCEvt.GetMousePosPixel() ); // Falls kein Eintrag angeklickt wurde, starten wir kein Dragging if ( !nSelId ) - return FALSE; + return sal_False; // Testen, ob Seite selektiertiert ist. Falls nicht, als aktuelle // Seite setzen und Select rufen. @@ -2705,34 +2709,34 @@ BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) ImplSelect(); } else - return FALSE; + return sal_False; } } - mbInSelect = FALSE; + mbInSelect = sal_False; Region aRegion; // Region zuweisen rRegion = aRegion; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -USHORT TabBar::ShowDropPos( const Point& rPos ) +sal_uInt16 TabBar::ShowDropPos( const Point& rPos ) { ImplTabBarItem* pItem; - USHORT nDropId; - USHORT nNewDropPos; - USHORT nItemCount = (USHORT)mpItemList->size(); + sal_uInt16 nDropId; + sal_uInt16 nNewDropPos; + sal_uInt16 nItemCount = (sal_uInt16)mpItemList->size(); short nScroll = 0; if ( rPos.X() > mnLastOffX-TABBAR_DRAG_SCROLLOFF ) { pItem = (*mpItemList)[ mpItemList->size()-1 ]; if ( !pItem->maRect.IsEmpty() && (rPos.X() > pItem->maRect.Right()) ) - nNewDropPos = (USHORT)mpItemList->size(); + nNewDropPos = (sal_uInt16)mpItemList->size(); else { nNewDropPos = mnFirstPos+1; @@ -2768,12 +2772,12 @@ USHORT TabBar::ShowDropPos( const Point& rPos ) if ( mbDropPos ) HideDropPos(); - mbDropPos = TRUE; + mbDropPos = sal_True; mnDropPos = nNewDropPos; if ( nScroll ) { - USHORT nOldFirstPos = mnFirstPos; + sal_uInt16 nOldFirstPos = mnFirstPos; SetFirstPageId( GetPageId( mnFirstPos+nScroll ) ); // Direkt ausgeben, da kein Paint bei Drag and Drop moeglich @@ -2790,7 +2794,7 @@ USHORT TabBar::ShowDropPos( const Point& rPos ) Color aBlackColor( COL_BLACK ); long nX; long nY = (maWinSize.Height()/2)-1; - USHORT nCurPos = GetPagePos( mnCurPageId ); + sal_uInt16 nCurPos = GetPagePos( mnCurPageId ); SetLineColor( aBlackColor ); if ( mnDropPos < nItemCount ) @@ -2834,7 +2838,7 @@ void TabBar::HideDropPos() long nX; long nY1 = (maWinSize.Height()/2)-3; long nY2 = nY1 + 5; - USHORT nItemCount = (USHORT)mpItemList->size(); + sal_uInt16 nItemCount = (sal_uInt16)mpItemList->size(); if ( mnDropPos < nItemCount ) { @@ -2861,17 +2865,17 @@ void TabBar::HideDropPos() SetClipRegion(); } - mbDropPos = FALSE; + mbDropPos = sal_False; mnDropPos = 0; } } // ----------------------------------------------------------------------- -BOOL TabBar::SwitchPage( const Point& rPos ) +sal_Bool TabBar::SwitchPage( const Point& rPos ) { - BOOL bSwitch = FALSE; - USHORT nSwitchId = GetPageId( rPos ); + sal_Bool bSwitch = sal_False; + sal_uInt16 nSwitchId = GetPageId( rPos ); if ( !nSwitchId ) EndSwitchPage(); else @@ -2888,16 +2892,16 @@ BOOL TabBar::SwitchPage( const Point& rPos ) { if ( Time::GetSystemTicks() > mnSwitchTime+500 ) { - mbInSwitching = TRUE; + mbInSwitching = sal_True; if ( ImplDeactivatePage() ) { SetCurPageId( mnSwitchId ); Update(); ImplActivatePage(); ImplSelect(); - bSwitch = TRUE; + bSwitch = sal_True; } - mbInSwitching = FALSE; + mbInSwitching = sal_False; } } } diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx index 8298374fb40b..8d3a6abce18f 100644..100755 --- a/svtools/source/control/taskbar.cxx +++ b/svtools/source/control/taskbar.cxx @@ -32,10 +32,9 @@ #define _TASKBAR_CXX #include <tools/debug.hxx> - #include <vcl/floatwin.hxx> -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= @@ -77,9 +76,9 @@ TaskBar::TaskBar( Window* pParent, WinBits nWinStyle ) : mnOldStatusWidth = 0; mnLines = 1; mnWinBits = nWinStyle; - mbStatusText = FALSE; - mbShowItems = FALSE; - mbAutoHide = FALSE; + mbStatusText = sal_False; + mbShowItems = sal_False; + mbAutoHide = sal_False; ImplInitSettings(); } @@ -310,13 +309,13 @@ void TaskBar::Resize() if ( pTempButtonBar ) { - USHORT i = 0; - BOOL bVisibleItems = FALSE; + sal_uInt16 i = 0; + sal_Bool bVisibleItems = sal_False; while ( i < pTempButtonBar->GetItemCount() ) { if ( pTempButtonBar->IsItemVisible( pTempButtonBar->GetItemId( i ) ) ) { - bVisibleItems = TRUE; + bVisibleItems = sal_True; break; } i++; @@ -465,14 +464,14 @@ void TaskBar::Format() // ----------------------------------------------------------------------- -void TaskBar::SetLines( USHORT nLines ) +void TaskBar::SetLines( sal_uInt16 nLines ) { mnLines = nLines; } // ----------------------------------------------------------------------- -void TaskBar::EnableAutoHide( BOOL bAutoHide ) +void TaskBar::EnableAutoHide( sal_Bool bAutoHide ) { mbAutoHide = bAutoHide; @@ -494,14 +493,14 @@ void TaskBar::ShowStatusText( const String& rText ) { if ( !mbStatusText ) { - mbStatusText = TRUE; + mbStatusText = sal_True; if ( mpStatusBar->AreItemsVisible() ) { - mbShowItems = TRUE; + mbShowItems = sal_True; mpStatusBar->HideItems(); } else - mbShowItems = TRUE; + mbShowItems = sal_True; maOldText = mpStatusBar->GetText(); Resize(); mpStatusBar->SetText( rText ); @@ -519,7 +518,7 @@ void TaskBar::HideStatusText() { if ( mbStatusText && mpStatusBar ) { - mbStatusText = FALSE; + mbStatusText = sal_False; mpStatusBar->SetText( maOldText ); Resize(); if ( mbShowItems ) diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx index 21cf187b6cea..0215c1835f1d 100644..100755 --- a/svtools/source/control/taskbox.cxx +++ b/svtools/source/control/taskbox.cxx @@ -34,8 +34,7 @@ #include <tools/debug.hxx> #include <vcl/image.hxx> #include <vcl/help.hxx> - -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= @@ -58,7 +57,7 @@ TaskToolBox::TaskToolBox( Window* pParent, WinBits nWinStyle ) : mnMaxTextWidth = 0; mnActiveItemId = 0; mnSmallItem = TOOLBOX_ITEM_NOTFOUND; - mbMinActivate = FALSE; + mbMinActivate = sal_False; SetAlign( WINDOWALIGN_BOTTOM ); SetButtonType( BUTTON_SYMBOLTEXT ); @@ -77,14 +76,14 @@ TaskToolBox::~TaskToolBox() // ----------------------------------------------------------------------- -void TaskToolBox::ActivateTaskItem( USHORT nItemId, BOOL bMinActivate ) +void TaskToolBox::ActivateTaskItem( sal_uInt16 nItemId, sal_Bool bMinActivate ) { if ( nItemId ) { if ( nItemId != mnActiveItemId ) { if ( mnActiveItemId ) - CheckItem( mnActiveItemId, FALSE ); + CheckItem( mnActiveItemId, sal_False ); CheckItem( nItemId ); mnActiveItemId = nItemId; } @@ -93,11 +92,11 @@ void TaskToolBox::ActivateTaskItem( USHORT nItemId, BOOL bMinActivate ) if ( !bMinActivate ) return; - mbMinActivate = TRUE; + mbMinActivate = sal_True; } ActivateTask(); - mbMinActivate = FALSE; + mbMinActivate = sal_False; } } @@ -183,8 +182,8 @@ void TaskToolBox::RequestHelp( const HelpEvent& rHEvt ) void TaskToolBox::Select() { - USHORT nItemId = GetCurItemId(); - ActivateTaskItem( nItemId, TRUE ); + sal_uInt16 nItemId = GetCurItemId(); + ActivateTaskItem( nItemId, sal_True ); } // ----------------------------------------------------------------------- @@ -225,7 +224,7 @@ void TaskToolBox::ImplFormatTaskToolBox() } // Eintraege aus der ToolBox entfernen, die ersetzt werden - USHORT nBtnPos = (mnUpdateNewPos*2); + sal_uInt16 nBtnPos = (mnUpdateNewPos*2); while ( nBtnPos < GetItemCount() ) RemoveItem( nBtnPos ); if ( mnUpdateNewPos <= (mnActiveItemId-1) ) @@ -256,7 +255,7 @@ void TaskToolBox::ImplFormatTaskToolBox() while ( (nTxtWidth > mnMaxTextWidth) && (aText.Len() > 3) ); } - USHORT nItemId = i+1; + sal_uInt16 nItemId = i+1; if ( aText.EqualsAscii( "..." ) ) InsertItem( nItemId, pItem->maImage, TIB_LEFT ); else @@ -271,7 +270,7 @@ void TaskToolBox::ImplFormatTaskToolBox() if ( mnNewActivePos+1 != mnActiveItemId ) { if ( mnActiveItemId ) - CheckItem( mnActiveItemId, FALSE ); + CheckItem( mnActiveItemId, sal_False ); mnActiveItemId = mnNewActivePos+1; CheckItem( mnActiveItemId ); } @@ -290,7 +289,7 @@ void TaskToolBox::StartUpdateTask() // ----------------------------------------------------------------------- void TaskToolBox::UpdateTask( const Image& rImage, const String& rText, - BOOL bActive ) + sal_Bool bActive ) { ImplTaskItem* pItem = ( mnUpdatePos < mpItemList->size() ) ? (*mpItemList)[ mnUpdatePos ] : NULL; if ( pItem ) diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx index 8c367a7d135a..1476cacb76fb 100644..100755 --- a/svtools/source/control/taskmisc.cxx +++ b/svtools/source/control/taskmisc.cxx @@ -33,8 +33,7 @@ #include <tools/debug.hxx> #include <vcl/help.hxx> - -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= @@ -74,9 +73,9 @@ WindowArrange::~WindowArrange() // ----------------------------------------------------------------------- -static USHORT ImplCeilSqareRoot( USHORT nVal ) +static sal_uInt16 ImplCeilSqareRoot( sal_uInt16 nVal ) { - USHORT i; + sal_uInt16 i; // Ueberlauf verhindern if ( nVal > 0xFE * 0xFE ) @@ -104,19 +103,19 @@ static void ImplPosSizeWindow( Window* pWindow, void WindowArrange::ImplTile( const Rectangle& rRect ) { - USHORT nCount = (USHORT)mpWinList->Count(); + sal_uInt16 nCount = (sal_uInt16)mpWinList->Count(); if ( nCount < 3 ) { ImplVert( rRect ); return; } - USHORT i; - USHORT j; - USHORT nCols; - USHORT nRows; - USHORT nActRows; - USHORT nOffset; + sal_uInt16 i; + sal_uInt16 j; + sal_uInt16 nCols; + sal_uInt16 nRows; + sal_uInt16 nActRows; + sal_uInt16 nOffset; long nOverWidth; long nOverHeight; Window* pWindow; @@ -354,7 +353,7 @@ void WindowArrange::ImplCascade( const Rectangle& rRect ) // ----------------------------------------------------------------------- -void WindowArrange::Arrange( USHORT nType, const Rectangle& rRect ) +void WindowArrange::Arrange( sal_uInt16 nType, const Rectangle& rRect ) { if ( !mpWinList->Count() ) return; diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index 03c5199391a4..b94aae25a88f 100644..100755 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx @@ -37,9 +37,8 @@ #include <vcl/help.hxx> #include <vcl/svapp.hxx> #include <unotools/calendarwrapper.hxx> - #include <unotools/syslocale.hxx> -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= @@ -51,43 +50,43 @@ struct ImplTaskSBFldItem { TaskStatusFieldItem maItem; - USHORT mnId; + sal_uInt16 mnId; long mnOffX; }; // ======================================================================= -BOOL ITaskStatusNotify::MouseButtonDown( USHORT, const MouseEvent& ) +sal_Bool ITaskStatusNotify::MouseButtonDown( sal_uInt16, const MouseEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ITaskStatusNotify::MouseButtonUp( USHORT, const MouseEvent& ) +sal_Bool ITaskStatusNotify::MouseButtonUp( sal_uInt16, const MouseEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ITaskStatusNotify::MouseMove( USHORT, const MouseEvent& ) +sal_Bool ITaskStatusNotify::MouseMove( sal_uInt16, const MouseEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ITaskStatusNotify::Command( USHORT, const CommandEvent& ) +sal_Bool ITaskStatusNotify::Command( sal_uInt16, const CommandEvent& ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ITaskStatusNotify::UpdateHelp( USHORT ) +sal_Bool ITaskStatusNotify::UpdateHelp( sal_uInt16 ) { - return FALSE; + return sal_False; } // ======================================================================= @@ -115,7 +114,7 @@ TaskStatusFieldItem::TaskStatusFieldItem( ITaskStatusNotify* pNotify, const Image& rImage, const XubString& rQuickHelpText, const XubString& rHelpText, - USHORT nFlags ) : + sal_uInt16 nFlags ) : mpNotify( pNotify ), maImage( rImage ), maQuickHelpText( rQuickHelpText ), @@ -155,8 +154,8 @@ TaskStatusBar::TaskStatusBar( Window* pParent, WinBits nWinStyle ) : mnItemWidth = 0; mnFieldWidth = 0; mnFieldFlags = 0; - mbFlashItems = FALSE; - mbOutInterval = FALSE; + mbFlashItems = sal_False; + mbOutInterval = sal_False; maTimer.SetTimeoutHdl( LINK( this, TaskStatusBar, ImplTimerHdl ) ); } @@ -179,9 +178,9 @@ TaskStatusBar::~TaskStatusBar() IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG ) { - BOOL bUpdate = ImplUpdateClock(); + sal_Bool bUpdate = ImplUpdateClock(); if ( ImplUpdateFlashItems() ) - bUpdate = TRUE; + bUpdate = sal_True; if ( bUpdate ) SetItemData( TASKSTATUSBAR_STATUSFIELDID, NULL ); @@ -190,7 +189,7 @@ IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG ) // ----------------------------------------------------------------------- -ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( USHORT nItemId ) const +ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( sal_uInt16 nItemId ) const { if ( !mpFieldItemList ) return NULL; @@ -205,11 +204,11 @@ ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( USHORT nItemId ) const // ----------------------------------------------------------------------- -ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, BOOL& rFieldRect ) const +ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const { if ( GetItemId( rPos ) == TASKSTATUSBAR_STATUSFIELDID ) { - rFieldRect = TRUE; + rFieldRect = sal_True; if ( mpFieldItemList ) { @@ -223,14 +222,14 @@ ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, BOOL& rFi } } else - rFieldRect = FALSE; + rFieldRect = sal_False; return NULL; } // ----------------------------------------------------------------------- -BOOL TaskStatusBar::ImplUpdateClock() +sal_Bool TaskStatusBar::ImplUpdateClock() { if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK ) { @@ -240,55 +239,55 @@ BOOL TaskStatusBar::ImplUpdateClock() (aTime.GetHour() != maTime.GetHour()) ) { maTime = aTime; - maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, FALSE, FALSE ); - return TRUE; + maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, sal_False, sal_False ); + return sal_True; } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL TaskStatusBar::ImplUpdateFlashItems() +sal_Bool TaskStatusBar::ImplUpdateFlashItems() { if ( mbFlashItems ) { if ( mbOutInterval ) { maTimer.SetTimeout( 900 ); - mbOutInterval = FALSE; + mbOutInterval = sal_False; } else { maTimer.SetTimeout( 700 ); - mbOutInterval = TRUE; + mbOutInterval = sal_True; } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void TaskStatusBar::ImplUpdateField( BOOL bItems ) +void TaskStatusBar::ImplUpdateField( sal_Bool bItems ) { maTimer.Stop(); if ( bItems ) { mnItemWidth = 0; - mbFlashItems = FALSE; - mbOutInterval = FALSE; + mbFlashItems = sal_False; + mbOutInterval = sal_False; for ( size_t i = 0, n = mpFieldItemList->size(); i < n; ++i ) { ImplTaskSBFldItem* pItem = (*mpFieldItemList)[ i ]; mnItemWidth += TASKSTATUSBAR_IMAGEOFFX; pItem->mnOffX = mnItemWidth; mnItemWidth += pItem->maItem.GetImage().GetSizePixel().Width(); if ( pItem->maItem.GetFlags() & TASKSTATUSFIELDITEM_FLASH ) { - mbFlashItems = TRUE; + mbFlashItems = sal_True; } } } @@ -296,7 +295,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems ) { if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK ) { - XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), FALSE, FALSE ); + XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), sal_False, sal_False ); mnClockWidth = GetTextWidth( aStr )+(TASKSTATUSBAR_CLOCXOFFX*2); } else @@ -314,7 +313,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems ) { mnFieldWidth = nNewWidth; long nOffset = GetItemOffset( TASKSTATUSBAR_STATUSFIELDID ); - USHORT nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID ); + sal_uInt16 nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID ); InsertItem( TASKSTATUSBAR_STATUSFIELDID, nNewWidth, SIB_RIGHT | SIB_IN | SIB_USERDRAW, nOffset, nItemPos ); } else @@ -329,7 +328,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems ) if ( mbFlashItems || (mnFieldFlags & TASKSTATUSFIELD_CLOCK) ) { ImplUpdateClock(); - mbOutInterval = TRUE; + mbOutInterval = sal_True; ImplUpdateFlashItems(); maTimer.Start(); } @@ -339,12 +338,12 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems ) void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt ) { - BOOL bFieldRect; - BOOL bBaseClass = FALSE; + sal_Bool bFieldRect; + sal_Bool bBaseClass = sal_False; ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect ); ITaskStatusNotify* pNotify = mpNotify; - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if ( bFieldRect ) nItemId = TASKSTATUSBAR_CLOCKID; @@ -366,12 +365,12 @@ void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt ) void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt ) { - BOOL bFieldRect; - BOOL bBaseClass = FALSE; + sal_Bool bFieldRect; + sal_Bool bBaseClass = sal_False; ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect ); ITaskStatusNotify* pNotify = mpNotify; - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if ( bFieldRect ) nItemId = TASKSTATUSBAR_CLOCKID; @@ -393,12 +392,12 @@ void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt ) void TaskStatusBar::MouseMove( const MouseEvent& rMEvt ) { - BOOL bFieldRect; - BOOL bBaseClass = FALSE; + sal_Bool bFieldRect; + sal_Bool bBaseClass = sal_False; ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect ); ITaskStatusNotify* pNotify = mpNotify; - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if ( bFieldRect ) nItemId = TASKSTATUSBAR_CLOCKID; @@ -420,12 +419,12 @@ void TaskStatusBar::MouseMove( const MouseEvent& rMEvt ) void TaskStatusBar::Command( const CommandEvent& rCEvt ) { - BOOL bFieldRect; - BOOL bBaseClass = FALSE; + sal_Bool bFieldRect; + sal_Bool bBaseClass = sal_False; ImplTaskSBFldItem* pItem = ImplGetFieldItem( rCEvt.GetMousePosPixel(), bFieldRect ); ITaskStatusNotify* pNotify = mpNotify; - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if ( bFieldRect ) nItemId = TASKSTATUSBAR_CLOCKID; @@ -447,12 +446,12 @@ void TaskStatusBar::Command( const CommandEvent& rCEvt ) void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt ) { - BOOL bFieldRect; + sal_Bool bFieldRect; ImplTaskSBFldItem* pItem = ImplGetFieldItem( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), bFieldRect ); if ( bFieldRect ) { ITaskStatusNotify* pNotify = mpNotify; - USHORT nItemId = 0; + sal_uInt16 nItemId = 0; if ( pItem ) { @@ -502,13 +501,13 @@ void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt ) { if ( pItem ) { - ULONG nHelpId = pItem->maItem.GetHelpId(); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( pItem->maItem.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -557,28 +556,28 @@ void TaskStatusBar::UserDraw( const UserDrawEvent& rUDEvt ) // ----------------------------------------------------------------------- -void TaskStatusBar::InsertStatusField( long, USHORT, - USHORT nFlags ) +void TaskStatusBar::InsertStatusField( long, sal_uInt16, + sal_uInt16 nFlags ) { mnFieldFlags = nFlags; - ImplUpdateField( FALSE ); + ImplUpdateField( sal_False ); } // ----------------------------------------------------------------------- -void TaskStatusBar::SetFieldFlags( USHORT nFlags ) +void TaskStatusBar::SetFieldFlags( sal_uInt16 nFlags ) { if ( mnFieldFlags != nFlags ) { mnFieldFlags = nFlags; - ImplUpdateField( FALSE ); + ImplUpdateField( sal_False ); } } // ----------------------------------------------------------------------- -void TaskStatusBar::AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem, - USHORT nPos ) +void TaskStatusBar::AddStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem, + sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "TaskStatusBar::AddStatusFieldItem() - Item is 0" ); DBG_ASSERT( !ImplGetFieldItem( nItemId ), "TaskStatusBar::AddStatusFieldItem() - Item-Id already exist" ); @@ -598,27 +597,27 @@ void TaskStatusBar::AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldIte mpFieldItemList->push_back( pItem ); } - ImplUpdateField( TRUE ); + ImplUpdateField( sal_True ); } // ----------------------------------------------------------------------- -void TaskStatusBar::ModifyStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem ) +void TaskStatusBar::ModifyStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem ) { ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId ); if ( pItem ) { - BOOL bUpdate = (pItem->maItem.GetImage() != rItem.GetImage()) || + sal_Bool bUpdate = (pItem->maItem.GetImage() != rItem.GetImage()) || (pItem->maItem.GetFlags() != rItem.GetFlags()); pItem->maItem = rItem; if ( bUpdate ) - ImplUpdateField( TRUE ); + ImplUpdateField( sal_True ); } } // ----------------------------------------------------------------------- -void TaskStatusBar::RemoveStatusFieldItem( USHORT nItemId ) +void TaskStatusBar::RemoveStatusFieldItem( sal_uInt16 nItemId ) { ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId ); if ( pItem ) @@ -633,22 +632,21 @@ void TaskStatusBar::RemoveStatusFieldItem( USHORT nItemId ) break; } } - ImplUpdateField( TRUE ); } } // ----------------------------------------------------------------------- -BOOL TaskStatusBar::GetStatusFieldItem( USHORT nItemId, TaskStatusFieldItem& rItem ) const +sal_Bool TaskStatusBar::GetStatusFieldItem( sal_uInt16 nItemId, TaskStatusFieldItem& rItem ) const { ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId ); if ( pItem ) { rItem = pItem->maItem; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index a24673fe4bb5..fcb749cdc0d8 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -164,7 +164,7 @@ const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCr { if( mpControl ) { - mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( TRUE ), UNO_QUERY ); + mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( sal_True ), UNO_QUERY ); } else { @@ -912,7 +912,7 @@ void ToolbarMenu::appendSeparator() ValueSet* ToolbarMenu::createEmptyValueSetControl() { ValueSet* pSet = new ValueSet( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT ); - pSet->EnableFullItemMode( FALSE ); + pSet->EnableFullItemMode( sal_False ); pSet->SetColor( GetControlBackground() ); pSet->SetHighlightHdl( LINK( this, ToolbarMenu, HighlightHdl ) ); return pSet; @@ -996,7 +996,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) if( bHighlight && IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) ) { bDrawItemRect = false; - if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, + if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect, CTRL_STATE_SELECTED | ( pEntry->mbEnabled? CTRL_STATE_ENABLED: 0 ), ImplControlValue(), @@ -1086,7 +1086,7 @@ void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown ) Size aOutSz = GetOutputSizePixel(); if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) ) { - bool bHighlighted = FALSE; + bool bHighlighted = sal_False; const int nEntryCount = mpImpl->maEntryVector.size(); int nEntry; @@ -1161,11 +1161,11 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl ); if( pValueSet ) { - USHORT nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() ); + sal_uInt16 nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() ); if( nItemPos != VALUESET_ITEM_NOTFOUND ) { - const USHORT nColCount = pValueSet->GetColCount(); - const USHORT nLine = nItemPos / nColCount; + const sal_uInt16 nColCount = pValueSet->GetColCount(); + const sal_uInt16 nLine = nItemPos / nColCount; nLastColumn = nItemPos - (nLine * nColCount); @@ -1175,7 +1175,7 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa } else { - const USHORT nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount; + const sal_uInt16 nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount; return (nLine+1) < nLineCount; } } @@ -1264,19 +1264,19 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd ) // -------------------------------------------------------------------- -void ToolbarMenu_Impl::implHighlightControl( USHORT nCode, Control* pControl ) +void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl ) { ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl ); if( pValueSet ) { - const USHORT nItemCount = pValueSet->GetItemCount(); - USHORT nItemPos = VALUESET_ITEM_NOTFOUND; + const sal_uInt16 nItemCount = pValueSet->GetItemCount(); + sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND; switch( nCode ) { case KEY_UP: { - const USHORT nColCount = pValueSet->GetColCount(); - const USHORT nLastLine = nItemCount / nColCount; + const sal_uInt16 nColCount = pValueSet->GetColCount(); + const sal_uInt16 nLastLine = nItemCount / nColCount; nItemPos = std::min( ((nLastLine-1) * nColCount) + mnLastColumn, nItemCount-1 ); break; } @@ -1300,7 +1300,7 @@ void ToolbarMenu_Impl::implHighlightControl( USHORT nCode, Control* pControl ) void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) { Control* pForwardControl = 0; - USHORT nCode = rKEvent.GetKeyCode().GetCode(); + sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); switch ( nCode ) { case KEY_UP: @@ -1377,7 +1377,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) // -------------------------------------------------------------------- static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) { - BOOL bNativeOk = FALSE; + sal_Bool bNativeOk = sal_False; if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -1394,13 +1394,13 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec { const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings(); Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() ); - i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, TRUE, FALSE, 2, NULL, &aColor ); + i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor ); } } void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) { - USHORT nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu + sal_uInt16 nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu long nFontHeight = GetTextHeight(); // long nExtra = nFontHeight/4; @@ -1450,9 +1450,9 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) { long nTextOffsetY = ((pEntry->maSize.Height()-nFontHeight)/2); - USHORT nTextStyle = 0; - USHORT nSymbolStyle = 0; - USHORT nImageStyle = 0; + sal_uInt16 nTextStyle = 0; + sal_uInt16 nSymbolStyle = 0; + sal_uInt16 nImageStyle = 0; if( !pEntry->mbEnabled ) { @@ -1565,7 +1565,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) aTmpPos.X() = aPos.X() + (bTitle ? 4 : mpImpl->mnTextPos); aTmpPos.Y() = aPos.Y(); aTmpPos.Y() += nTextOffsetY; - USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC; + sal_uInt16 nStyle = nTextStyle|TEXT_DRAW_MNEMONIC; DrawCtrlText( aTmpPos, pEntry->maText, 0, pEntry->maText.Len(), nStyle, NULL, NULL ); // pVector, pDisplayText ); } diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 1650c99e7d52..340fbeacb008 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -214,7 +214,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getAccessibleIndexInParent() throw (RuntimeEx Window* pParent = mpParent->mrMenu.GetParent(); if( pParent ) { - for( USHORT i = 0, nCount = pParent->GetChildCount(); i < nCount ; i++ ) + for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); i < nCount ; i++ ) { if( pParent->GetChild( i ) == &mpParent->mrMenu ) return i; @@ -253,7 +253,7 @@ OUString SAL_CALL ToolbarMenuAcc::getAccessibleName() throw (RuntimeException) if( !aRet.getLength() ) { - Window* pLabel = mpParent->mrMenu.GetLabeledBy(); + Window* pLabel = mpParent->mrMenu.GetAccessibleRelationLabeledBy(); if( pLabel && pLabel != &mpParent->mrMenu ) aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); } @@ -474,7 +474,7 @@ Any SAL_CALL ToolbarMenuAcc::getAccessibleKeyBinding() throw (RuntimeException) sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException) { ThrowIfDisposed(); - UINT32 nColor = Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor(); + sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor(); return static_cast<sal_Int32>(nColor); } @@ -483,7 +483,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException) sal_Int32 SAL_CALL ToolbarMenuAcc::getBackground() throw (RuntimeException) { ThrowIfDisposed(); - UINT32 nColor = Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor(); + sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor(); return static_cast<sal_Int32>(nColor); } diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx index 0df8c8e78045..f6c60d3d2193 100644 --- a/svtools/source/control/toolbarmenuimp.hxx +++ b/svtools/source/control/toolbarmenuimp.hxx @@ -309,7 +309,7 @@ struct ToolbarMenu_Impl ToolbarMenuEntry* implGetEntry( int nEntry ) const; void notifyHighlightedEntry(); - void implHighlightControl( USHORT nCode, Control* pControl ); + void implHighlightControl( sal_uInt16 nCode, Control* pControl ); }; } diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 7b77bb1e0933..b0751780862a 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -227,7 +227,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; uno::Reference< accessibility::XAccessible > xRet; - ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(i)); + ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i)); if( pItem ) xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled ); @@ -267,7 +267,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getAccessibleIndexInParent() { sal_Bool bFound = sal_False; - for( USHORT i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ ) + for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ ) { if( pParent->GetChild( i ) == mpParent ) { @@ -319,7 +319,7 @@ sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole() if ( !aRet.Len() ) { - Window* pLabel = mpParent->GetLabeledBy(); + Window* pLabel = mpParent->GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != mpParent ) aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); } @@ -452,7 +452,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; - const USHORT nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) ); + const sal_uInt16 nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) ); uno::Reference< accessibility::XAccessible > xRet; if( ((USHORT)-1) != nItemId ) @@ -561,7 +561,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getForeground( ) throw (uno::RuntimeException) { ThrowIfDisposed(); - UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor(); + sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor(); return static_cast<sal_Int32>(nColor); } @@ -571,7 +571,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getBackground( ) throw (uno::RuntimeException) { ThrowIfDisposed(); - UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor(); + sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor(); return static_cast<sal_Int32>(nColor); } @@ -582,7 +582,7 @@ void SAL_CALL ValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex ) { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; - ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(nChildIndex)); + ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); if(pItem != NULL) { @@ -600,7 +600,7 @@ sal_Bool SAL_CALL ValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex { ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; - ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(nChildIndex)); + ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); sal_Bool bRet = sal_False; if (pItem != NULL) @@ -639,7 +639,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getSelectedAccessibleChildCount() const SolarMutexGuard aSolarGuard; sal_Int32 nRet = 0; - for( USHORT i = 0, nCount = getItemCount(); i < nCount; i++ ) + for( sal_uInt16 i = 0, nCount = getItemCount(); i < nCount; i++ ) { ValueSetItem* pItem = getItem (i); @@ -659,7 +659,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getSelectedAc const SolarMutexGuard aSolarGuard; uno::Reference< accessibility::XAccessible > xRet; - for( USHORT i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ ) + for( sal_uInt16 i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ ) { ValueSetItem* pItem = getItem(i); @@ -736,9 +736,9 @@ void SAL_CALL ValueSetAcc::disposing (void) } -USHORT ValueSetAcc::getItemCount (void) const +sal_uInt16 ValueSetAcc::getItemCount (void) const { - USHORT nCount = mpParent->ImplGetVisibleItemCount(); + sal_uInt16 nCount = mpParent->ImplGetVisibleItemCount(); // When the None-Item is visible then increase the number of items by // one. if (HasNoneField()) @@ -747,7 +747,7 @@ USHORT ValueSetAcc::getItemCount (void) const } -ValueSetItem* ValueSetAcc::getItem (USHORT nIndex) const +ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const { ValueSetItem* pItem = NULL; @@ -761,7 +761,7 @@ ValueSetItem* ValueSetAcc::getItem (USHORT nIndex) const nIndex -= 1; } if (pItem == NULL) - pItem = mpParent->ImplGetVisibleItem (static_cast<USHORT>(nIndex)); + pItem = mpParent->ImplGetVisibleItem (static_cast<sal_uInt16>(nIndex)); return pItem; } @@ -937,9 +937,9 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent() { bool bDone = false; - USHORT nCount = mpParent->mrParent.ImplGetVisibleItemCount(); + sal_uInt16 nCount = mpParent->mrParent.ImplGetVisibleItemCount(); ValueSetItem* pItem; - for (USHORT i=0; i<nCount && !bDone; i++) + for (sal_uInt16 i=0; i<nCount && !bDone; i++) { // Guard the retrieval of the i-th child with a try/catch block // just in case the number of children changes in the mean time. @@ -1228,7 +1228,7 @@ uno::Any SAL_CALL ValueItemAcc::getAccessibleKeyBinding() sal_Int32 SAL_CALL ValueItemAcc::getForeground( ) throw (uno::RuntimeException) { - UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor(); + sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor(); return static_cast<sal_Int32>(nColor); } @@ -1237,7 +1237,7 @@ sal_Int32 SAL_CALL ValueItemAcc::getForeground( ) sal_Int32 SAL_CALL ValueItemAcc::getBackground( ) throw (uno::RuntimeException) { - UINT32 nColor; + sal_uInt32 nColor; if (mpParent && mpParent->meType == VALUESETITEM_COLOR) nColor = mpParent->maColor.GetColor(); else diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 3df14947481f..7e5ccc196a55 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -81,8 +81,8 @@ class ValueSet; struct ValueSetItem { ValueSet& mrParent; - USHORT mnId; - USHORT mnBits; + sal_uInt16 mnId; + sal_uInt16 mnBits; ValueSetItemType meType; Image maImage; Color maColor; @@ -138,7 +138,7 @@ public: ~ValueSetAcc(); void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ); - BOOL HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } + sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } static ValueSetAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw(); @@ -217,7 +217,7 @@ private: /** Return the number of items. This takes the None-Item into account. */ - USHORT getItemCount (void) const; + sal_uInt16 getItemCount (void) const; /** Return the item associated with the given index. The None-Item is taken into account which, when present, is taken to be the first @@ -228,7 +228,7 @@ private: @return Returns NULL when the given index is out of range. */ - ValueSetItem* getItem (USHORT nIndex) const; + ValueSetItem* getItem (sal_uInt16 nIndex) const; /** Check whether or not the object has been disposed (or is in the state of beeing disposed). If that is the case then @@ -283,7 +283,7 @@ public: void ParentDestroyed(); void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ); - BOOL HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } + sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); } static ValueItemAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw(); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 87888d148f53..c3be233cb917 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -70,21 +70,21 @@ void ValueSet::ImplInit() mnUserVisLines = 0; mnSpacing = 0; mnFrameStyle = 0; - mbFormat = TRUE; - mbHighlight = FALSE ; - mbSelection = FALSE; - mbNoSelection = TRUE; - mbDrawSelection = TRUE; - mbBlackSel = FALSE; - mbDoubleSel = FALSE; - mbScroll = FALSE; - mbDropPos = FALSE; - mbFullMode = TRUE; + mbFormat = sal_True; + mbHighlight = sal_False ; + mbSelection = sal_False; + mbNoSelection = sal_True; + mbDrawSelection = sal_True; + mbBlackSel = sal_False; + mbDoubleSel = sal_False; + mbScroll = sal_False; + mbDropPos = sal_False; + mbFullMode = sal_True; // #106446#, #106601# force mirroring of virtual device maVirDev.EnableRTL( GetParent()->IsRTLEnabled() ); - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); } // ----------------------------------------------------------------------- @@ -116,7 +116,7 @@ ValueSet::ValueSet( Window* pParent, const ResId& rResId, bool bDisableTransient ValueSet::~ValueSet() { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> - xComponent (GetAccessible(FALSE), ::com::sun::star::uno::UNO_QUERY); + xComponent (GetAccessible(sal_False), ::com::sun::star::uno::UNO_QUERY); if (xComponent.is()) xComponent->dispose (); @@ -153,8 +153,8 @@ void ValueSet::ImplDeleteItems() // ----------------------------------------------------------------------- -void ValueSet::ImplInitSettings( BOOL bFont, - BOOL bForeground, BOOL bBackground ) +void ValueSet::ImplInitSettings( sal_Bool bFont, + sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -312,7 +312,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem ) aPos.X() += (aRectSize.Width()-aImageSize.Width())/2; aPos.Y() += (aRectSize.Height()-aImageSize.Height())/2; - USHORT nImageStyle = 0; + sal_uInt16 nImageStyle = 0; if( !IsEnabled() ) nImageStyle |= IMAGE_DRAW_DISABLE; @@ -422,7 +422,7 @@ void ValueSet::Format() { if ( mnUserItemWidth ) { - mnCols = (USHORT)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace)); + mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace)); if ( !mnCols ) mnCols = 1; } @@ -433,7 +433,7 @@ void ValueSet::Format() mnCols = mnUserCols; // Zeilenanzahl berechnen - mbScroll = FALSE; + mbScroll = sal_False; mnLines = (long)mpImpl->mpItemList->size() / mnCols; if ( mpImpl->mpItemList->size() % mnCols ) mnLines++; @@ -452,13 +452,13 @@ void ValueSet::Format() else mnVisLines = mnLines; if ( mnLines > mnVisLines ) - mbScroll = TRUE; + mbScroll = sal_True; if ( mnLines <= mnVisLines ) mnFirstLine = 0; else { - if ( mnFirstLine > (USHORT)(mnLines-mnVisLines) ) - mnFirstLine = (USHORT)(mnLines-mnVisLines); + if ( mnFirstLine > (sal_uInt16)(mnLines-mnVisLines) ) + mnFirstLine = (sal_uInt16)(mnLines-mnVisLines); } // Itemgroessen berechnen @@ -489,7 +489,7 @@ void ValueSet::Format() // Init VirDev maVirDev.SetSettings( GetSettings() ); maVirDev.SetBackground( GetBackground() ); - maVirDev.SetOutputSizePixel( aWinSize, TRUE ); + maVirDev.SetOutputSizePixel( aWinSize, sal_True ); // Bei zu kleinen Items machen wir nichts long nMinHeight = 2; @@ -532,17 +532,17 @@ void ValueSet::Format() (aHighColor.GetBlue() > 0x80)) || ((aHighColor.GetRed() == 0x80) && (aHighColor.GetGreen() == 0x80) && (aHighColor.GetBlue() == 0x80)) ) - mbBlackSel = TRUE; + mbBlackSel = sal_True; else - mbBlackSel = FALSE; + mbBlackSel = sal_False; // Wenn die Items groesser sind, dann die Selektion doppelt so breit // zeichnen if ( (nStyle & WB_DOUBLEBORDER) && ((nItemWidth >= 25) && (nItemHeight >= 20)) ) - mbDoubleSel = TRUE; + mbDoubleSel = sal_True; else - mbDoubleSel = FALSE; + mbDoubleSel = sal_False; // Calculate offsets long nStartX; @@ -584,8 +584,8 @@ void ValueSet::Format() } // draw items - ULONG nFirstItem = mnFirstLine * mnCols; - ULONG nLastItem = nFirstItem + (mnVisLines * mnCols); + sal_uLong nFirstItem = mnFirstLine * mnCols; + sal_uLong nLastItem = nFirstItem + (mnVisLines * mnCols); if ( !mbFullMode ) { @@ -601,7 +601,7 @@ void ValueSet::Format() if ( (i >= nFirstItem) && (i < nLastItem) ) { - const BOOL bWasEmpty = pItem->maRect.IsEmpty(); + const sal_Bool bWasEmpty = pItem->maRect.IsEmpty(); pItem->maRect.Left() = x; pItem->maRect.Top() = y; @@ -664,7 +664,7 @@ void ValueSet::Format() } // Jetzt haben wir formatiert und warten auf das naechste - mbFormat = FALSE; + mbFormat = sal_False; // ScrollBar loeschen if ( pDelScrBar ) @@ -706,13 +706,13 @@ void ValueSet::ImplDrawSelect() if ( !IsReallyVisible() ) return; - BOOL bFocus = HasFocus(); - BOOL bDrawSel; + sal_Bool bFocus = HasFocus(); + sal_Bool bDrawSel; if ( (mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight) ) - bDrawSel = FALSE; + bDrawSel = sal_False; else - bDrawSel = TRUE; + bDrawSel = sal_True; if ( !bFocus && ((mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight)) ) @@ -722,7 +722,7 @@ void ValueSet::ImplDrawSelect() return; } - USHORT nItemId = mnSelItemId; + sal_uInt16 nItemId = mnSelItemId; for( int stage = 0; stage < 2; stage++ ) { @@ -895,12 +895,12 @@ void ValueSet::ImplDrawSelect() // ----------------------------------------------------------------------- -void ValueSet::ImplHideSelect( USHORT nItemId ) +void ValueSet::ImplHideSelect( sal_uInt16 nItemId ) { Rectangle aRect; - USHORT nItemPos = GetItemPos( nItemId ); - if ( nItemPos != sal::static_int_cast<USHORT>(LIST_ENTRY_NOTFOUND) ) + sal_uInt16 nItemPos = GetItemPos( nItemId ); + if ( nItemPos != sal::static_int_cast<sal_uInt16>(LIST_ENTRY_NOTFOUND) ) aRect = (*mpImpl->mpItemList)[ nItemPos ]->maRect; else { @@ -919,42 +919,42 @@ void ValueSet::ImplHideSelect( USHORT nItemId ) // ----------------------------------------------------------------------- -void ValueSet::ImplHighlightItem( USHORT nItemId, BOOL bIsSelection ) +void ValueSet::ImplHighlightItem( sal_uInt16 nItemId, sal_Bool bIsSelection ) { if ( mnHighItemId != nItemId ) { // Alten merken, um vorherige Selektion zu entfernen - USHORT nOldItem = mnHighItemId; + sal_uInt16 nOldItem = mnHighItemId; mnHighItemId = nItemId; // Wenn keiner selektiert ist, dann Selektion nicht malen if ( !bIsSelection && mbNoSelection ) - mbDrawSelection = FALSE; + mbDrawSelection = sal_False; // Neu ausgeben und alte Selection wegnehmen ImplHideSelect( nOldItem ); ImplDrawSelect(); - mbDrawSelection = TRUE; + mbDrawSelection = sal_True; } } // ----------------------------------------------------------------------- -void ValueSet::ImplDrawDropPos( BOOL bShow ) +void ValueSet::ImplDrawDropPos( sal_Bool bShow ) { if ( (mnDropPos != VALUESET_ITEM_NOTFOUND) && !mpImpl->mpItemList->empty() ) { size_t nItemPos = mnDropPos; - USHORT nItemId1; - USHORT nItemId2 = 0; - BOOL bRight; + sal_uInt16 nItemId1; + sal_uInt16 nItemId2 = 0; + sal_Bool bRight; if ( nItemPos >= mpImpl->mpItemList->size() ) { nItemPos = mpImpl->mpItemList->size() - 1; - bRight = TRUE; + bRight = sal_True; } else - bRight = FALSE; + bRight = sal_False; nItemId1 = GetItemId( nItemPos ); if ( (nItemId1 != mnSelItemId) && (nItemId1 != mnHighItemId) ) @@ -993,7 +993,7 @@ void ValueSet::ImplDrawDropPos( BOOL bShow ) Point aPos = aRect1.RightCenter(); nX = aPos.X()-2; nY = aPos.Y(); - for ( USHORT i = 0; i < 4; i++ ) + for ( sal_uInt16 i = 0; i < 4; i++ ) DrawLine( Point( nX-i, nY-i ), Point( nX-i, nY+i ) ); } if ( !aRect2.IsEmpty() ) @@ -1001,7 +1001,7 @@ void ValueSet::ImplDrawDropPos( BOOL bShow ) Point aPos = aRect2.LeftCenter(); nX = aPos.X()+2; nY = aPos.Y(); - for ( USHORT i = 0; i < 4; i++ ) + for ( sal_uInt16 i = 0; i < 4; i++ ) DrawLine( Point( nX+i, nY-i ), Point( nX+i, nY+i ) ); } } @@ -1086,7 +1086,7 @@ void ValueSet::ImplDraw() // ----------------------------------------------------------------------- -BOOL ValueSet::ImplScroll( const Point& rPos ) +sal_Bool ValueSet::ImplScroll( const Point& rPos ) { Size aOutSize = GetOutputSizePixel(); long nScrBarWidth; @@ -1097,10 +1097,10 @@ BOOL ValueSet::ImplScroll( const Point& rPos ) nScrBarWidth = 0; if ( !mbScroll || (rPos.X() < 0) || (rPos.X() > aOutSize.Width()-nScrBarWidth) ) - return FALSE; + return sal_False; long nScrollOffset; - USHORT nOldLine = mnFirstLine; + sal_uInt16 nOldLine = mnFirstLine; const Rectangle& rTopRect = (*mpImpl->mpItemList)[ mnFirstLine * mnCols ]->maRect; if ( rTopRect.GetHeight() <= 16 ) nScrollOffset = VALUESET_SCROLL_OFFSET/2; @@ -1113,7 +1113,7 @@ BOOL ValueSet::ImplScroll( const Point& rPos ) mnFirstLine--; } if ( (mnFirstLine == nOldLine) && - (mnFirstLine < (USHORT)(mnLines-mnVisLines)) && (rPos.Y() < aOutSize.Height()) ) + (mnFirstLine < (sal_uInt16)(mnLines-mnVisLines)) && (rPos.Y() < aOutSize.Height()) ) { long nBottomPos = (*mpImpl->mpItemList)[ (mnFirstLine+mnVisLines-1)*mnCols ]->maRect.Bottom(); if ( (rPos.Y() >= nBottomPos-nScrollOffset) && (rPos.Y() <= nBottomPos) ) @@ -1122,17 +1122,17 @@ BOOL ValueSet::ImplScroll( const Point& rPos ) if ( mnFirstLine != nOldLine ) { - mbFormat = TRUE; + mbFormat = sal_True; ImplDraw(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -size_t ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const +size_t ValueSet::ImplGetItem( const Point& rPos, sal_Bool bMove ) const { if ( mpNoneItem ) { @@ -1194,9 +1194,9 @@ ValueSetItem* ValueSet::ImplGetFirstItem() // ----------------------------------------------------------------------- -USHORT ValueSet::ImplGetVisibleItemCount() const +sal_uInt16 ValueSet::ImplGetVisibleItemCount() const { - USHORT nRet = 0; + sal_uInt16 nRet = 0; for( size_t n = 0, nItemCount = mpImpl->mpItemList->size(); n < nItemCount; n++ ) { @@ -1211,10 +1211,10 @@ USHORT ValueSet::ImplGetVisibleItemCount() const // ----------------------------------------------------------------------- -ValueSetItem* ValueSet::ImplGetVisibleItem( USHORT nVisiblePos ) +ValueSetItem* ValueSet::ImplGetVisibleItem( sal_uInt16 nVisiblePos ) { ValueSetItem* pRet = NULL; - USHORT nFoundPos = 0; + sal_uInt16 nFoundPos = 0; for( sal_Int32 n = 0, nItemCount = mpImpl->mpItemList->size(); ( n < nItemCount ) && !pRet; n++ ) { @@ -1231,7 +1231,7 @@ ValueSetItem* ValueSet::ImplGetVisibleItem( USHORT nVisiblePos ) void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ) { - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); if( pAcc ) pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue ); @@ -1239,9 +1239,9 @@ void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star:: // ----------------------------------------------------------------------- -BOOL ValueSet::ImplHasAccessibleListeners() +sal_Bool ValueSet::ImplHasAccessibleListeners() { - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); return( pAcc && pAcc->HasAccessibleListeners() ); } @@ -1249,11 +1249,11 @@ BOOL ValueSet::ImplHasAccessibleListeners() IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar ) { - USHORT nNewFirstLine = (USHORT)pScrollBar->GetThumbPos(); + sal_uInt16 nNewFirstLine = (sal_uInt16)pScrollBar->GetThumbPos(); if ( nNewFirstLine != mnFirstLine ) { mnFirstLine = nNewFirstLine; - mbFormat = TRUE; + mbFormat = sal_True; ImplDraw(); } return 0; @@ -1263,13 +1263,13 @@ IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar ) IMPL_LINK( ValueSet,ImplTimerHdl, Timer*, EMPTYARG ) { - ImplTracking( GetPointerPosPixel(), TRUE ); + ImplTracking( GetPointerPosPixel(), sal_True ); return 0; } // ----------------------------------------------------------------------- -void ValueSet::ImplTracking( const Point& rPos, BOOL bRepeat ) +void ValueSet::ImplTracking( const Point& rPos, sal_Bool bRepeat ) { if ( bRepeat || mbSelection ) { @@ -1288,22 +1288,22 @@ void ValueSet::ImplTracking( const Point& rPos, BOOL bRepeat ) if ( pItem && (pItem->meType != VALUESETITEM_SPACE) ) { if( GetStyle() & WB_MENUSTYLEVALUESET ) - mbHighlight = TRUE; + mbHighlight = sal_True; ImplHighlightItem( pItem->mnId ); } else { if( GetStyle() & WB_MENUSTYLEVALUESET ) - mbHighlight = TRUE; + mbHighlight = sal_True; - ImplHighlightItem( mnSelItemId, FALSE ); + ImplHighlightItem( mnSelItemId, sal_False ); } } // ----------------------------------------------------------------------- -void ValueSet::ImplEndTracking( const Point& rPos, BOOL bCancel ) +void ValueSet::ImplEndTracking( const Point& rPos, sal_Bool bCancel ) { ValueSetItem* pItem; @@ -1318,15 +1318,15 @@ void ValueSet::ImplEndTracking( const Point& rPos, BOOL bCancel ) SelectItem( pItem->mnId ); if ( !mbSelection && !(GetStyle() & WB_NOPOINTERFOCUS) ) GrabFocus(); - mbHighlight = FALSE; - mbSelection = FALSE; + mbHighlight = sal_False; + mbSelection = sal_False; Select(); } else { - ImplHighlightItem( mnSelItemId, FALSE ); - mbHighlight = FALSE; - mbSelection = FALSE; + ImplHighlightItem( mnSelItemId, sal_False ); + mbHighlight = sal_False; + mbSelection = sal_False; } } @@ -1339,7 +1339,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt ) ValueSetItem* pItem = ImplGetItem( ImplGetItem( rMEvt.GetPosPixel() ) ); if ( mbSelection ) { - mbHighlight = TRUE; + mbHighlight = sal_True; if ( pItem && (pItem->meType != VALUESETITEM_SPACE) ) { mnOldItemId = mnSelItemId; @@ -1356,7 +1356,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt ) if ( (pItem->mnBits & VIB_NODOUBLECLICK) || (rMEvt.GetClicks() == 1) ) { mnOldItemId = mnSelItemId; - mbHighlight = TRUE; + mbHighlight = sal_True; mnHighItemId = mnSelItemId; ImplHighlightItem( pItem->mnId ); StartTracking( STARTTRACK_SCROLLREPEAT ); @@ -1378,7 +1378,7 @@ void ValueSet::MouseButtonUp( const MouseEvent& rMEvt ) { // Wegen SelectionMode if ( rMEvt.IsLeft() && mbSelection ) - ImplEndTracking( rMEvt.GetPosPixel(), FALSE ); + ImplEndTracking( rMEvt.GetPosPixel(), sal_False ); else Control::MouseButtonUp( rMEvt ); } @@ -1389,7 +1389,7 @@ void ValueSet::MouseMove( const MouseEvent& rMEvt ) { // Wegen SelectionMode if ( mbSelection || (GetStyle() & WB_MENUSTYLEVALUESET) ) - ImplTracking( rMEvt.GetPosPixel(), FALSE ); + ImplTracking( rMEvt.GetPosPixel(), sal_False ); Control::MouseMove( rMEvt ); } @@ -1427,7 +1427,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt ) nCalcPos = nCurPos; //switch off selection mode if key travelling is used - BOOL bDefault = FALSE; + sal_Bool bDefault = sal_False; switch ( rKEvt.GetKeyCode().GetCode() ) { case KEY_HOME: @@ -1515,7 +1515,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt ) } } else if ( nCalcPos >= ( nLineCount * mnCols ) ) - nItemPos = sal::static_int_cast< USHORT >( + nItemPos = sal::static_int_cast< sal_uInt16 >( nCalcPos - ( nLineCount * mnCols )); else { @@ -1557,7 +1557,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt ) if ( nCalcPos == VALUESET_ITEM_NONEITEM ) nItemPos = mnCurCol; else if ( nCalcPos + ( nLineCount * mnCols ) <= nLastItem ) - nItemPos = sal::static_int_cast< USHORT >( + nItemPos = sal::static_int_cast< sal_uInt16 >( nCalcPos + ( nLineCount * mnCols )); else { @@ -1590,14 +1590,14 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt ) //no break; default: Control::KeyInput( rKEvt ); - bDefault = TRUE; + bDefault = sal_True; break; } if(!bDefault) EndSelection(); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) { - USHORT nItemId; + sal_uInt16 nItemId; if ( nItemPos != VALUESET_ITEM_NONEITEM ) nItemId = GetItemId( nItemPos ); else @@ -1654,7 +1654,7 @@ void ValueSet::GetFocus() Control::GetFocus(); // Tell the accessible object that we got the focus. - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); if( pAcc ) pAcc->GetFocus(); } @@ -1671,7 +1671,7 @@ void ValueSet::LoseFocus() Control::LoseFocus(); // Tell the accessible object that we lost the focus. - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); if( pAcc ) pAcc->LoseFocus(); } @@ -1680,7 +1680,7 @@ void ValueSet::LoseFocus() void ValueSet::Resize() { - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); Control::Resize(); @@ -1739,23 +1739,23 @@ void ValueSet::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE, FALSE ); + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) ) { - mbFormat = TRUE; - ImplInitSettings( FALSE, FALSE, TRUE ); + mbFormat = sal_True; + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } } @@ -1772,8 +1772,8 @@ void ValueSet::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - mbFormat = TRUE; - ImplInitSettings( TRUE, TRUE, TRUE ); + mbFormat = sal_True; + ImplInitSettings( sal_True, sal_True, sal_True ); Invalidate(); } } @@ -1800,7 +1800,7 @@ void ValueSet::UserDraw( const UserDrawEvent& ) // ----------------------------------------------------------------------- -void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, size_t nPos ) +void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND, @@ -1818,14 +1818,14 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, size_t nPos ) mpImpl->mpItemList->push_back( pItem ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } // ----------------------------------------------------------------------- -void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, size_t nPos ) +void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND, @@ -1843,14 +1843,14 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, size_t nPos ) mpImpl->mpItemList->push_back( pItem ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } // ----------------------------------------------------------------------- -void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, +void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, const XubString& rText, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" ); @@ -1870,14 +1870,14 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, mpImpl->mpItemList->push_back( pItem ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } // ----------------------------------------------------------------------- -void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, +void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, const XubString& rText, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" ); @@ -1897,14 +1897,14 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, mpImpl->mpItemList->push_back( pItem ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } // ----------------------------------------------------------------------- -void ValueSet::InsertItem( USHORT nItemId, size_t nPos ) +void ValueSet::InsertItem( sal_uInt16 nItemId, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND, @@ -1921,14 +1921,14 @@ void ValueSet::InsertItem( USHORT nItemId, size_t nPos ) mpImpl->mpItemList->push_back( pItem ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } // ----------------------------------------------------------------------- -void ValueSet::InsertSpace( USHORT nItemId, size_t nPos ) +void ValueSet::InsertSpace( sal_uInt16 nItemId, size_t nPos ) { DBG_ASSERT( nItemId, "ValueSet::InsertSpace(): ItemId == 0" ); DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND, @@ -1945,14 +1945,14 @@ void ValueSet::InsertSpace( USHORT nItemId, size_t nPos ) mpImpl->mpItemList->push_back( pItem ); } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } // ----------------------------------------------------------------------- -void ValueSet::RemoveItem( USHORT nItemId ) +void ValueSet::RemoveItem( sal_uInt16 nItemId ) { size_t nPos = GetItemPos( nItemId ); @@ -1973,10 +1973,10 @@ void ValueSet::RemoveItem( USHORT nItemId ) mnOldItemId = 0; mnHighItemId = 0; mnSelItemId = 0; - mbNoSelection = TRUE; + mbNoSelection = sal_True; } - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2010,9 +2010,9 @@ void ValueSet::CopyItems( const ValueSet& rValueSet ) mnOldItemId = 0; mnHighItemId = 0; mnSelItemId = 0; - mbNoSelection = TRUE; + mbNoSelection = sal_True; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2029,9 +2029,9 @@ void ValueSet::Clear() mnOldItemId = 0; mnHighItemId = 0; mnSelItemId = 0; - mbNoSelection = TRUE; + mbNoSelection = sal_True; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2045,7 +2045,7 @@ size_t ValueSet::GetItemCount() const // ----------------------------------------------------------------------- -size_t ValueSet::GetItemPos( USHORT nItemId ) const +size_t ValueSet::GetItemPos( sal_uInt16 nItemId ) const { for ( size_t i = 0, n = mpImpl->mpItemList->size(); i < n; ++i ) { ValueSetItem* pItem = (*mpImpl->mpItemList)[ i ]; @@ -2058,14 +2058,14 @@ size_t ValueSet::GetItemPos( USHORT nItemId ) const // ----------------------------------------------------------------------- -USHORT ValueSet::GetItemId( size_t nPos ) const +sal_uInt16 ValueSet::GetItemId( size_t nPos ) const { return ( nPos < mpImpl->mpItemList->size() ) ? (*mpImpl->mpItemList)[ nPos ]->mnId : 0 ; } // ----------------------------------------------------------------------- -USHORT ValueSet::GetItemId( const Point& rPos ) const +sal_uInt16 ValueSet::GetItemId( const Point& rPos ) const { size_t nItemPos = ImplGetItem( rPos ); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) @@ -2076,7 +2076,7 @@ USHORT ValueSet::GetItemId( const Point& rPos ) const // ----------------------------------------------------------------------- -Rectangle ValueSet::GetItemRect( USHORT nItemId ) const +Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -2088,19 +2088,19 @@ Rectangle ValueSet::GetItemRect( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ValueSet::EnableFullItemMode( BOOL bFullMode ) +void ValueSet::EnableFullItemMode( sal_Bool bFullMode ) { mbFullMode = bFullMode; } // ----------------------------------------------------------------------- -void ValueSet::SetColCount( USHORT nNewCols ) +void ValueSet::SetColCount( sal_uInt16 nNewCols ) { if ( mnUserCols != nNewCols ) { mnUserCols = nNewCols; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2108,12 +2108,12 @@ void ValueSet::SetColCount( USHORT nNewCols ) // ----------------------------------------------------------------------- -void ValueSet::SetLineCount( USHORT nNewLines ) +void ValueSet::SetLineCount( sal_uInt16 nNewLines ) { if ( mnUserVisLines != nNewLines ) { mnUserVisLines = nNewLines; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2126,7 +2126,7 @@ void ValueSet::SetItemWidth( long nNewItemWidth ) if ( mnUserItemWidth != nNewItemWidth ) { mnUserItemWidth = nNewItemWidth; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2139,7 +2139,7 @@ void ValueSet::SetItemHeight( long nNewItemHeight ) if ( mnUserItemHeight != nNewItemHeight ) { mnUserItemHeight = nNewItemHeight; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2147,12 +2147,12 @@ void ValueSet::SetItemHeight( long nNewItemHeight ) // ----------------------------------------------------------------------- -void ValueSet::SetFirstLine( USHORT nNewLine ) +void ValueSet::SetFirstLine( sal_uInt16 nNewLine ) { if ( mnFirstLine != nNewLine ) { mnFirstLine = nNewLine; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2160,7 +2160,7 @@ void ValueSet::SetFirstLine( USHORT nNewLine ) // ----------------------------------------------------------------------- -void ValueSet::SelectItem( USHORT nItemId ) +void ValueSet::SelectItem( sal_uInt16 nItemId ) { size_t nItemPos = 0; @@ -2175,31 +2175,31 @@ void ValueSet::SelectItem( USHORT nItemId ) if ( (mnSelItemId != nItemId) || mbNoSelection ) { - USHORT nOldItem = mnSelItemId ? mnSelItemId : 1; + sal_uInt16 nOldItem = mnSelItemId ? mnSelItemId : 1; mnSelItemId = nItemId; - mbNoSelection = FALSE; + mbNoSelection = sal_False; - BOOL bNewOut; - BOOL bNewLine; + sal_Bool bNewOut; + sal_Bool bNewLine; if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) - bNewOut = TRUE; + bNewOut = sal_True; else - bNewOut = FALSE; - bNewLine = FALSE; + bNewOut = sal_False; + bNewLine = sal_False; // Gegebenenfalls in den sichtbaren Bereich scrollen if ( mbScroll && nItemId ) { - USHORT nNewLine = (USHORT)(nItemPos / mnCols); + sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols); if ( nNewLine < mnFirstLine ) { mnFirstLine = nNewLine; - bNewLine = TRUE; + bNewLine = sal_True; } - else if ( nNewLine > (USHORT)(mnFirstLine+mnVisLines-1) ) + else if ( nNewLine > (sal_uInt16)(mnFirstLine+mnVisLines-1) ) { - mnFirstLine = (USHORT)(nNewLine-mnVisLines+1); - bNewLine = TRUE; + mnFirstLine = (sal_uInt16)(nNewLine-mnVisLines+1); + bNewLine = sal_True; } } @@ -2209,7 +2209,7 @@ void ValueSet::SelectItem( USHORT nItemId ) { // Falls sich der sichtbare Bereich geaendert hat, // alles neu ausgeben - mbFormat = TRUE; + mbFormat = sal_True; ImplDraw(); } else @@ -2291,9 +2291,9 @@ void ValueSet::SelectItem( USHORT nItemId ) void ValueSet::SetNoSelection() { - mbNoSelection = TRUE; - mbHighlight = FALSE; - mbSelection = FALSE; + mbNoSelection = sal_True; + mbHighlight = sal_False; + mbSelection = sal_False; if ( IsReallyVisible() && IsUpdateMode() ) ImplDraw(); @@ -2301,7 +2301,7 @@ void ValueSet::SetNoSelection() // ----------------------------------------------------------------------- -void ValueSet::SetItemBits( USHORT nItemId, USHORT nItemBits ) +void ValueSet::SetItemBits( sal_uInt16 nItemId, sal_uInt16 nItemBits ) { size_t nPos = GetItemPos( nItemId ); @@ -2311,7 +2311,7 @@ void ValueSet::SetItemBits( USHORT nItemId, USHORT nItemBits ) // ----------------------------------------------------------------------- -USHORT ValueSet::GetItemBits( USHORT nItemId ) const +sal_uInt16 ValueSet::GetItemBits( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -2323,7 +2323,7 @@ USHORT ValueSet::GetItemBits( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ValueSet::SetItemImage( USHORT nItemId, const Image& rImage ) +void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) { size_t nPos = GetItemPos( nItemId ); @@ -2340,12 +2340,12 @@ void ValueSet::SetItemImage( USHORT nItemId, const Image& rImage ) Invalidate( pItem->maRect ); } else - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- -Image ValueSet::GetItemImage( USHORT nItemId ) const +Image ValueSet::GetItemImage( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -2357,7 +2357,7 @@ Image ValueSet::GetItemImage( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ValueSet::SetItemColor( USHORT nItemId, const Color& rColor ) +void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) { size_t nPos = GetItemPos( nItemId ); @@ -2374,12 +2374,12 @@ void ValueSet::SetItemColor( USHORT nItemId, const Color& rColor ) Invalidate( pItem->maRect ); } else - mbFormat = TRUE; + mbFormat = sal_True; } // ----------------------------------------------------------------------- -Color ValueSet::GetItemColor( USHORT nItemId ) const +Color ValueSet::GetItemColor( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -2391,7 +2391,7 @@ Color ValueSet::GetItemColor( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ValueSet::SetItemData( USHORT nItemId, void* pData ) +void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) { size_t nPos = GetItemPos( nItemId ); @@ -2409,13 +2409,13 @@ void ValueSet::SetItemData( USHORT nItemId, void* pData ) Invalidate( pItem->maRect ); } else - mbFormat = TRUE; + mbFormat = sal_True; } } // ----------------------------------------------------------------------- -void* ValueSet::GetItemData( USHORT nItemId ) const +void* ValueSet::GetItemData( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -2427,7 +2427,7 @@ void* ValueSet::GetItemData( USHORT nItemId ) const // ----------------------------------------------------------------------- -void ValueSet::SetItemText( USHORT nItemId, const XubString& rText ) +void ValueSet::SetItemText( sal_uInt16 nItemId, const XubString& rText ) { size_t nPos = GetItemPos( nItemId ); @@ -2448,7 +2448,7 @@ void ValueSet::SetItemText( USHORT nItemId, const XubString& rText ) if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - USHORT nTempId = mnSelItemId; + sal_uInt16 nTempId = mnSelItemId; if ( mbHighlight ) nTempId = mnHighItemId; @@ -2470,7 +2470,7 @@ void ValueSet::SetItemText( USHORT nItemId, const XubString& rText ) // ----------------------------------------------------------------------- -XubString ValueSet::GetItemText( USHORT nItemId ) const +XubString ValueSet::GetItemText( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); @@ -2485,20 +2485,20 @@ XubString ValueSet::GetItemText( USHORT nItemId ) const void ValueSet::SetColor( const Color& rColor ) { maColor = rColor; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) ImplDraw(); } // ----------------------------------------------------------------------- -void ValueSet::SetExtraSpacing( USHORT nNewSpacing ) +void ValueSet::SetExtraSpacing( sal_uInt16 nNewSpacing ) { if ( GetStyle() & WB_ITEMBORDER ) { mnSpacing = nNewSpacing; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } @@ -2509,8 +2509,8 @@ void ValueSet::SetExtraSpacing( USHORT nNewSpacing ) void ValueSet::StartSelection() { mnOldItemId = mnSelItemId; - mbHighlight = TRUE; - mbSelection = TRUE; + mbHighlight = sal_True; + mbSelection = sal_True; mnHighItemId = mnSelItemId; } @@ -2524,17 +2524,17 @@ void ValueSet::EndSelection() EndTracking( ENDTRACK_CANCEL ); ImplHighlightItem( mnSelItemId ); - mbHighlight = FALSE; + mbHighlight = sal_False; } - mbSelection = FALSE; + mbSelection = sal_False; } // ----------------------------------------------------------------------- -BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) +sal_Bool ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) { if ( rCEvt.GetCommand() != COMMAND_STARTDRAG ) - return FALSE; + return sal_False; // Gegebenenfalls eine vorhandene Aktion abbrechen EndSelection(); @@ -2543,7 +2543,7 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) // der Fall ist, setzen wir ihn als aktuellen Eintrag. Falls Drag and // Drop auch mal ueber Tastatur ausgeloest werden kann, testen wir // dies nur bei einer Mausaktion. - USHORT nSelId; + sal_uInt16 nSelId; if ( rCEvt.IsMouseEvent() ) nSelId = GetItemId( rCEvt.GetMousePosPixel() ); else @@ -2551,7 +2551,7 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) // Falls kein Eintrag angeklickt wurde, starten wir kein Dragging if ( !nSelId ) - return FALSE; + return sal_False; // Testen, ob Seite selektiertiert ist. Falls nicht, als aktuelle // Seite setzen und Select rufen. @@ -2567,13 +2567,13 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) // Region zuweisen rRegion = aRegion; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols, - USHORT nDesireLines ) +Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCols, + sal_uInt16 nDesireLines ) { size_t nCalcCols = nDesireCols; size_t nCalcLines = nDesireLines; @@ -2655,7 +2655,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols, // ----------------------------------------------------------------------- -Size ValueSet::CalcItemSizePixel( const Size& rItemSize, BOOL bOut ) const +Size ValueSet::CalcItemSizePixel( const Size& rItemSize, sal_Bool bOut ) const { Size aSize = rItemSize; @@ -2699,15 +2699,15 @@ long ValueSet::GetScrollWidth() const // ----------------------------------------------------------------------- -USHORT ValueSet::ShowDropPos( const Point& rPos ) +sal_uInt16 ValueSet::ShowDropPos( const Point& rPos ) { - mbDropPos = TRUE; + mbDropPos = sal_True; // Gegebenenfalls scrollen ImplScroll( rPos ); // DropPosition ermitteln - size_t nPos = ImplGetItem( rPos, TRUE ); + size_t nPos = ImplGetItem( rPos, sal_True ); if ( nPos == VALUESET_ITEM_NONEITEM ) nPos = 0; else if ( nPos == VALUESET_ITEM_NOTFOUND ) @@ -2729,9 +2729,9 @@ USHORT ValueSet::ShowDropPos( const Point& rPos ) if ( nPos != mnDropPos ) { - ImplDrawDropPos( FALSE ); + ImplDrawDropPos( sal_False ); mnDropPos = nPos; - ImplDrawDropPos( TRUE ); + ImplDrawDropPos( sal_True ); } return mnDropPos; @@ -2743,8 +2743,8 @@ void ValueSet::HideDropPos() { if ( mbDropPos ) { - ImplDrawDropPos( FALSE ); - mbDropPos = FALSE; + ImplDrawDropPos( sal_False ); + mbDropPos = sal_False; } } |