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 /tools/inc | |
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 'tools/inc')
72 files changed, 1077 insertions, 2154 deletions
diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx deleted file mode 100644 index 1671c20bc1e3..000000000000 --- a/tools/inc/bootstrp/command.hxx +++ /dev/null @@ -1,166 +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. - * - ************************************************************************/ - -#ifndef COMMAND_HXX -#define COMMAND_HXX - -#include <iostream> - -#include <tools/stream.hxx> -#define STRLEN 100 -#ifndef UNX -#define TMPNAME "\\command.tmp" -#else -#define TMPNAME "/tmp/command.tmp" -#endif - -/** Different types of spawnable programs -*/ -enum ExeType -{ - EXE, /// programm is a native executable - BAT, /// programm is a DOS-Batch - BTM /// programm is a 4DOS-Batch -}; - -#define COMMAND_NOTFOUND 0x0001 -#define COMMAND_TOOBIG 0x0002 -#define COMMAND_INVALID 0x0004 -#define COMMAND_NOEXEC 0x0008 -#define COMMAND_NOMEM 0x0010 -#define COMMAND_UNKNOWN 0x0020 - -#ifdef WNT -#define COMMAND_SHELL "4nt.exe" -#endif -#ifdef OS2 -#define COMMAND_SHELL "4os2.exe" -#endif -#ifdef UNX -#define COMMAND_SHELL "csh" -#endif - -class CommandLine; -class LogWindow; - -class CommandLine -{ -friend class ChildProcess; -private: - char *CommandBuffer; - char *ComShell; - char **ppArgv; - BOOL bTmpWrite; - -public: - CommandLine(BOOL bTmpWrite = FALSE); - CommandLine(const char *, BOOL bTmpWrite = FALSE); - CommandLine(const CommandLine&, BOOL bTmpWrite = FALSE); - virtual ~CommandLine(); - - int nArgc; - - CommandLine& operator=(const CommandLine&); - CommandLine& operator=(const char *); - void BuildCommand(const char *); - char** GetCommand(void) { return ppArgv; } - void Strtokens(const char *); - void Print(); -}; - -/** Declares and spawns a child process. - The spawned programm could be a native executable or a schell script. -*/ -class CCommand -{ -private: - ByteString aCommandLine; - ByteString aCommand; - char *pArgv; - char **ppArgv; - ULONG nArgc; - int nError; - -protected: - void ImplInit(); - void Initpp( ULONG nCount, ByteString &rStr ); - -public: - /** Creates the process specified without spawning it - @param rString specifies the programm or shell scrip - */ - CCommand( ByteString &rString ); - - /** Creates the process specified without spawning it - @param pChar specifies the programm or shell scrip - */ - CCommand( const char *pChar ); - - /** Try to find the given programm in specified path - @param sEnv specifies the current search path, defaulted by environment - @param sItem specifies the system shell - @return the Location (when programm was found) - */ - static ByteString Search( ByteString sEnv, - ByteString sItem = COMMAND_SHELL ); - - /** Spawns the Process - @return 0 when spawned without errors, otherwise a error code - */ - operator int(); - - ByteString GetCommandLine_() { return aCommandLine; } - ByteString GetCommand() { return aCommand; } - - char** GetCommandStr() { return ppArgv; } -}; - -#define COMMAND_EXECUTE_WINDOW 0x0000001 -#define COMMAND_EXECUTE_CONSOLE 0x0000002 -#define COMMAND_EXECUTE_HIDDEN 0x0000004 -#define COMMAND_EXECUTE_START 0x0000008 -#define COMMAND_EXECUTE_WAIT 0x0000010 -#define COMMAND_EXECUTE_REMOTE 0x1000000 - -typedef ULONG CommandBits; - -/** Allowes to spawn programms hidden, waiting etc. - @see CCommand -*/ -class CCommandd : public CCommand -{ - CommandBits nFlag; -public: - CCommandd( ByteString &rString, CommandBits nBits ); - CCommandd( const char *pChar, CommandBits nBits ); - operator int(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/bootstrp/inimgr.hxx b/tools/inc/bootstrp/inimgr.hxx index 12a42db22c24..016eee7bcb76 100644 --- a/tools/inc/bootstrp/inimgr.hxx +++ b/tools/inc/bootstrp/inimgr.hxx @@ -40,7 +40,7 @@ Source and Destination Dir is used. Otherwise ForceUpdate has to be used class IniManager { private: - BOOL bUpdate; + sal_Bool bUpdate; ByteString sGlobalDir; /// holds the org. ini dir ByteString sLocalPath; /// holds path of local ini dir diff --git a/tools/inc/bootstrp/mkcreate.hxx b/tools/inc/bootstrp/mkcreate.hxx index 0178d57c6ef2..13b95074e970 100644 --- a/tools/inc/bootstrp/mkcreate.hxx +++ b/tools/inc/bootstrp/mkcreate.hxx @@ -30,7 +30,9 @@ #define _MK_CREATE_HXX #include <tools/string.hxx> -#include "bootstrp/sstring.hxx" +//#include "bootstrp/sstring.hxx" + +DECLARE_LIST( UniStringList, UniString* ) #include "bootstrp/prj.hxx" @@ -44,14 +46,14 @@ class SourceDirectoryList; class CodedDependency : public ByteString { private: - USHORT nOSType; // operating systems where dependeny exists + sal_uInt16 nOSType; // operating systems where dependeny exists public: /* create a dependency instance with given coded directory name */ CodedDependency( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ) : ByteString( rCodedIdentifier ), nOSType( nOperatingSystems ) @@ -60,29 +62,29 @@ public: /* returns the operating system */ - USHORT GetOperatingSystem() + sal_uInt16 GetOperatingSystem() { return nOSType; } /* set operating system */ - void SetOperatingSystem( USHORT nOperatingSystems ) + void SetOperatingSystem( sal_uInt16 nOperatingSystems ) { nOSType = nOperatingSystems; } /* add operating systems if same dependency */ - BOOL TryToMerge( + sal_Bool TryToMerge( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ) { if ( rCodedIdentifier != *this ) - return FALSE; + return sal_False; nOSType |= nOperatingSystems; - return TRUE; + return sal_True; } }; @@ -93,14 +95,14 @@ public: class Dependency : public ByteString { private: - USHORT nOSType; // operating systems where dependecy exists + sal_uInt16 nOSType; // operating systems where dependecy exists public: /* create a dependency instance with given directory name */ Dependency( const ByteString &rDirectoryName, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ) : ByteString( rDirectoryName ), nOSType( nOperatingSystems ) @@ -109,7 +111,7 @@ public: /* returns the operating system */ - USHORT GetOperatingSystem() + sal_uInt16 GetOperatingSystem() { return nOSType; } @@ -124,8 +126,8 @@ class SourceDirectory : public ByteString private: SourceDirectory *pParent; // the parent directory SourceDirectoryList *pSubDirectories; // list of sub directories - USHORT nOSType; // operating systems where this directory is used - USHORT nDepth; // depth of directory structure (root is 0) + sal_uInt16 nOSType; // operating systems where this directory is used + sal_uInt16 nDepth; // depth of directory structure (root is 0) SByteStringList *pDependencies; // dependencies on other directories in this depth @@ -140,13 +142,13 @@ private: /* returns the operating systems of a coded dependency */ - static USHORT GetOSType( + static sal_uInt16 GetOSType( const ByteString &sDependExt // the corresponding dependency extension (see also prj.hxx) ); /* removes this and all sub directories with all dependencies */ - BOOL RemoveDirectoryTreeAndAllDependencies(); + sal_Bool RemoveDirectoryTreeAndAllDependencies(); public: @@ -155,7 +157,7 @@ public: */ SourceDirectory( const ByteString &rDirectoryName, // name without parent - USHORT nOperatingSystem, // the operating systems where this directory is used + sal_uInt16 nOperatingSystem, // the operating systems where this directory is used SourceDirectory *pParentDirectory = NULL // parent (if not root) ); ~SourceDirectory(); @@ -170,20 +172,20 @@ public: /* returns the Operating systems where this directory is used */ - USHORT GetOperatingSystems() { return nOSType; } + sal_uInt16 GetOperatingSystems() { return nOSType; } /* returns the given directory */ SourceDirectory *GetDirectory( const ByteString &rDirectoryName, // full path - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ); /* create the directory and all mandatory parents */ SourceDirectory *InsertFull( const ByteString &rDirectoryName, // full path - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ) { return GetDirectory( rDirectoryName, nOperatingSystem ); @@ -193,7 +195,7 @@ public: */ SourceDirectory *Insert( const ByteString &rDirectoryName, // name without parent - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ); /* get the root directory @@ -204,14 +206,14 @@ public: */ SourceDirectory *GetSubDirectory( const ByteString &rDirectoryPath, // full sub path - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ); /* add a dependency for several platforms */ CodedDependency *AddCodedDependency( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ); /* returns the dependency list @@ -225,7 +227,7 @@ public: */ CodedDependency *AddCodedIdentifier( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ); /* returns the identifier list @@ -252,13 +254,13 @@ public: static SourceDirectory *CreateRootDirectory( const ByteString &rRoot, // the root directory in file system const ByteString &rVersion, // the solar verion (r.g. SRC590, SRC591 etc.) - BOOL bAll = FALSE // add all directories or only buildable ones + sal_Bool bAll = sal_False // add all directories or only buildable ones ); /* create the makefile.rc in file system */ - BOOL CreateRecursiveMakefile( - BOOL bAllChilds = FALSE // create rcursive for all sub directories + sal_Bool CreateRecursiveMakefile( + sal_Bool bAllChilds = sal_False // create rcursive for all sub directories ); }; diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index 5e809cd1a3c4..c85928ce11ba 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -31,94 +31,6 @@ #include <tools/fsys.hxx> #include <tools/stream.hxx> -#include <osl/mutex.hxx> -#include <vector> -#include <list> - -#define OS_NONE 0x0000 -#define OS_WIN16 0x0001 -#define OS_WIN32 0x0002 -#define OS_OS2 0x0004 -#define OS_UNX 0x0008 -#define OS_ALL ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX ) - -#define COMMAND_PROJECTROOT 0x0000 -#define COMMAND_NMAKE 0x0001 -#define COMMAND_GET 0x0002 -#define COMMAND_USER_START 0x0003 -#define COMMAND_USER_END 0xFFFE -#define COMMAND_ALLDIRS 0xFFFF - -class SByteStringList; -class GenericInformationList; - -/********************************************************************* -* -* Die Klasse CommandData haelte alle Informationen, die fuer die -* Abarbeitung eines Kommandos (nmake, get) noetig sind -* -*********************************************************************/ - -class CommandData -{ - ByteString aPrj; - ByteString aLogFileName; - ByteString aInpath; - ByteString aUpd; - ByteString aUpdMinor; - ByteString aProduct; - ByteString aCommand; - ByteString aPath; - ByteString aPrePath; - ByteString aPreFix; - ByteString aCommandPara; - ByteString aComment; - ByteString sClientRestriction; - SByteStringList *pDepList; - USHORT nOSType; - USHORT nCommand; - - ULONG nDepth; // Tiefe der Abhaenigkeit - -public: - CommandData(); - ~CommandData(); - ByteString GetProjectName(){return aPrj;} - void SetProjectName( ByteString aName ){aPrj = aName;} - ByteString GetLogFile(){return aLogFileName;} - void SetLogFile( ByteString aName ){aLogFileName = aName;} - ByteString GetInpath(){return aInpath;} - void SetInpath( ByteString aName ){aInpath = aName;} - ByteString GetUpd(){return aUpd;} - void SetUpd( ByteString aName ){aUpd = aName;} - ByteString GetUpdMinor(){return aUpdMinor;} - void SetUpdMinor( ByteString aName ){aUpdMinor = aName;} - ByteString GetProduct(){return aProduct;} - void SetProduct( ByteString aName ){aProduct = aName;} - ByteString GetCommand(){return aCommand;} - void SetCommand ( ByteString aName ){aCommand = aName;} - ByteString GetCommandPara(){return aCommandPara;} - void SetCommandPara ( ByteString aName ){aCommandPara = aName;} - ByteString GetComment(){return aComment;} - void SetComment ( ByteString aCommentString ){aComment = aCommentString;} - ByteString GetPath(){return aPath;} - void SetPath( ByteString aName ){aPath = aName;} - ByteString GetPrePath(){return aPrePath;} - void SetPrePath( ByteString aName ){aPrePath = aName;} - USHORT GetOSType(){return nOSType;} - ByteString GetOSTypeString(); - void SetOSType( USHORT nType ){nOSType = nType;} - USHORT GetCommandType(){return nCommand;} - ByteString GetCommandTypeString(); - void SetCommandType( USHORT nCommandType ){nCommand = nCommandType;} - SByteStringList* GetDependencies(){return pDepList;} - void SetDependencies( SByteStringList *pList ){pDepList = pList;} - ByteString GetClientRestriction() { return sClientRestriction; } - void SetClientRestriction( ByteString sRestriction ) { sClientRestriction = sRestriction; } - - void AddDepth(){nDepth++;} - ULONG GetDepth(){return nDepth;} -}; /********************************************************************* * @@ -141,281 +53,7 @@ public: SimpleConfig(DirEntry& rDirEntry); ~SimpleConfig(); ByteString GetNext(); - ByteString GetCleanedNextLine( BOOL bReadComments = FALSE ); -}; - -#define ENV_GUI 0x00000000 -#define ENV_OS 0x00000001 -#define ENV_UPD 0x00000002 -#define ENV_UPDMIN 0x00000004 -#define ENV_INPATH 0x00000008 -#define ENV_OUTPATH 0x00000010 -#define ENV_GUIBASE 0x00000020 -#define ENV_CVER 0x00000040 -#define ENV_GVER 0x00000080 -#define ENV_GUIENV 0x00000100 -#define ENV_CPU 0x00000200 -#define ENV_CPUNAME 0x00000400 -#define ENV_DLLSUFF 0x00000800 -#define ENV_COMEX 0x00001000 -#define ENV_COMPATH 0x00002000 -#define ENV_INCLUDE 0x00004000 -#define ENV_LIB 0x00008000 -#define ENV_PATH 0x00010000 -#define ENV_SOLVER 0x00020000 -#define ENV_SOLENV 0x00040000 -#define ENV_SOLROOT 0x00080000 -#define ENV_DEVROOT 0x00100000 -#define ENV_EMERG 0x00200000 -#define ENV_STAND 0x00400000 - -/********************************************************************* -* -* class Prj -* alle Daten eines Projektes werden hier gehalten -* -*********************************************************************/ - -typedef ::std::vector< CommandData* > PrjList; - -class Star; -class Prj -{ -friend class Star; -private: - PrjList maList; - size_t maCurrent; - - BOOL bVisited; - - ByteString aPrjPath; - ByteString aProjectName; - ByteString aProjectPrefix; // max. 2-buchstabige Abk. - SByteStringList* pPrjInitialDepList; - SByteStringList* pPrjDepList; - BOOL bHardDependencies; - BOOL bSorted; - -public: - Prj(); - Prj( ByteString aName ); - ~Prj(); - void SetPreFix( ByteString aPre ){aProjectPrefix = aPre;} - ByteString GetPreFix(){return aProjectPrefix;} - ByteString GetProjectName() - {return aProjectName;} - void SetProjectName(ByteString aName) - {aProjectName = aName;} - BOOL InsertDirectory( ByteString aDirName , USHORT aWhat, - USHORT aWhatOS, ByteString aLogFileName, - const ByteString &rClientRestriction ); - CommandData* RemoveDirectory( ByteString aLogFileName ); - CommandData* GetDirectoryList ( USHORT nWhatOs, USHORT nCommand ); - CommandData* GetDirectoryData( ByteString aLogFileName ); - inline CommandData* GetData( ByteString aLogFileName ) - { return GetDirectoryData( aLogFileName ); }; - - SByteStringList* GetDependencies( BOOL bExpanded = TRUE ); - void AddDependencies( ByteString aStr ); - void HasHardDependencies( BOOL bHard ) { bHardDependencies = bHard; } - BOOL HasHardDependencies() { return bHardDependencies; } - - size_t Count() const { return maList.size(); } - - CommandData* GetObject( size_t i ) { return ( i < maList.size() ) ? maList[ i ] : NULL; } - - void Insert( CommandData* item, size_t i ) - { - if ( i < maList.size() ) - { - PrjList::iterator it = maList.begin(); - ::std::advance( it, i ); - maList.insert( it, item ); - maCurrent = i; - } - else - { - maCurrent = maList.size(); - maList.push_back( item ); - } - } - - CommandData* First() - { - maCurrent = 0; - return maList.empty() ? NULL : maList[ 0 ]; - } - - CommandData* Next() - { - if ( maCurrent+1 >= maList.size() ) return NULL; - maCurrent++; - return maList[ maCurrent ]; - } - - CommandData* Remove( CommandData* item ) - { - for ( PrjList::iterator it = maList.begin(); it < maList.end(); ++it ) - { - if ( *it == item ) - { - maList.erase( it ); - return item; - } - } - return NULL; - } -}; - -/********************************************************************* -* -* class Star -* Diese Klasse liest die Projectstruktur aller StarDivision Projekte -* aus \\dev\data1\upenv\data\config\solar.lst aus -* -*********************************************************************/ - -class StarFile -{ -private: - String aFileName; - Date aDate; - Time aTime; - - BOOL bExists; - -public: - StarFile( const String &rFile ); - BOOL Exists() { return bExists; } -}; - -#define STAR_MODE_SINGLE_PARSE 0x0000 -#define STAR_MODE_RECURSIVE_PARSE 0x0001 -#define STAR_MODE_MULTIPLE_PARSE 0x0002 - -typedef ::std::vector< Prj* > StarList; -// todo: SolarFileList should be a linked list and not a vector. -// also, the Read() functions need to be changed (see 1st read() in prj.cxx for notes) -typedef ::std::list< String* > SolarFileList; - -class Star -{ -private: - StarList maStarList; - size_t maCurrent; - - ByteString aStarName; - - static Link aDBNotFoundHdl; -protected: - osl::Mutex aMutex; - - USHORT nStarMode; - SolarFileList aFileList; - String sSourceRoot; - - void InsertSolarList( String sProject ); - String CreateFileName( String sProject ); - - void Expand_Impl(); - void ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj ); - -private: - void Read( String &rFileName ); - void Read( SolarFileList *pSOlarFiles ); - -public: - Star(); - Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - Star( SolarFileList *pSolarFiles ); - Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - ~Star(); - - static void SetDBNotFoundHdl( const Link &rLink ) { aDBNotFoundHdl = rLink; } - - ByteString GetName(){ return aStarName; }; - - BOOL HasProject( ByteString aProjectName ); - Prj* GetPrj( ByteString aProjectName ); - ByteString GetPrjName( DirEntry &rPath ); - - void InsertToken( char *pChar ); - - USHORT GetMode() { return nStarMode; } - - size_t Count() const { return maStarList.size(); } - - Prj* GetObject( size_t i ) - { return ( i < maStarList.size() ) ? maStarList[ i ] : NULL; } - - void Insert( Prj* item, size_t i ) - { - if ( i < maStarList.size() ) - { - StarList::iterator it = maStarList.begin(); - ::std::advance( it, i ); - maStarList.insert( it, item ); - maCurrent = i; - } - else - { - maCurrent = maStarList.size(); - maStarList.push_back( item ); - } - } - - Prj* First() - { - maCurrent = 0; - return maStarList.empty() ? NULL : maStarList[ 0 ]; - } - - Prj* Next() - { - if ( maCurrent+1 >= maStarList.size() ) return NULL; - maCurrent++; - return maStarList[ maCurrent ]; - } - - Prj* Remove( Prj* item ) - { - for ( StarList::iterator it = maStarList.begin(); it < maStarList.end(); ++it ) - { - if ( *it == item ) - { - maStarList.erase( it ); - return item; - } - } - return NULL; - } - -}; - -class StarWriter : public Star -{ -private: - USHORT WritePrj( Prj *pPrj, SvFileStream& rStream ); - -public: - StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - void CleanUp(); - - BOOL InsertProject ( Prj* pNewPrj ); - Prj* RemoveProject ( ByteString aProjectName ); - - USHORT Read( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - USHORT Read( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - USHORT Write( String aFileName ); - USHORT WriteMultiple( String rSourceRoot ); - - void InsertTokenLine( ByteString& rString ); + ByteString GetCleanedNextLine( sal_Bool bReadComments = sal_False ); }; #endif diff --git a/tools/inc/bootstrp/sstring.hxx b/tools/inc/bootstrp/sstring.hxx deleted file mode 100644 index ba63b9a1c8ea..000000000000 --- a/tools/inc/bootstrp/sstring.hxx +++ /dev/null @@ -1,77 +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. - * - ************************************************************************/ - -#ifndef _SSTRING_HXX -#define _SSTRING_HXX - -#include <tools/string.hxx> -#include <vector> - -#define NOT_THERE LIST_ENTRY_NOTFOUND - -typedef ::std::vector< ByteString* > ByteStringList; - -class SvStream; - -// --------------------- -// - class SStringList - -// --------------------- - -class SByteStringList -{ -private: - ByteStringList maList; - -public: - SByteStringList(); - ~SByteStringList(); - - // neuen ByteString in Liste einfuegen - size_t PutString( ByteString* ); - ByteString* RemoveString( const ByteString& rName ); - - // Position des ByteString in Liste, wenn nicht enthalten, dann - // return = NOT_THERE - size_t IsString( ByteString* ); - - // Vorgaenger ermitteln ( auch wenn selbst noch nicht in - // Liste enthalten - size_t GetPrevString( ByteString* ); - void CleanUp(); - size_t size() const; - ByteString* erase( size_t i ); - - SByteStringList& operator<< ( SvStream& rStream ); - SByteStringList& operator>> ( SvStream& rStream ); - ByteString* operator[]( size_t i ) const; - ByteString* at( size_t i ) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx index e60bd80b1318..8734f9d4ae74 100644 --- a/tools/inc/impcont.hxx +++ b/tools/inc/impcont.hxx @@ -43,8 +43,8 @@ class CBlock private: CBlock* pPrev; // Vorheriger Block CBlock* pNext; // Naechster Block - USHORT nSize; // Groesse des Blocks - USHORT nCount; // Anzahl Pointer + sal_uInt16 nSize; // Groesse des Blocks + sal_uInt16 nCount; // Anzahl Pointer void** pNodes; // Pointer auf die Daten #if defined DBG_UTIL @@ -53,26 +53,26 @@ private: public: // Fuer List-Container - CBlock( USHORT nSize, CBlock* pPrev, CBlock* pNext ); + CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext ); // Fuer Array-Container - CBlock( USHORT nSize, CBlock* pPrev ); + CBlock( sal_uInt16 nSize, CBlock* pPrev ); // Copy-Ctor CBlock( const CBlock& r, CBlock* pPrev ); ~CBlock(); - void Insert( void* p, USHORT nIndex, USHORT nReSize ); - CBlock* Split( void* p, USHORT nIndex, USHORT nReSize ); - void* Remove( USHORT nIndex, USHORT nReSize ); - void* Replace( void* pNew, USHORT nIndex ); + void Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ); + CBlock* Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ); + void* Remove( sal_uInt16 nIndex, sal_uInt16 nReSize ); + void* Replace( void* pNew, sal_uInt16 nIndex ); void** GetNodes() const { return pNodes; } - void** GetObjectPtr( USHORT nIndex ); - void* GetObject( USHORT nIndex ) const; + void** GetObjectPtr( sal_uInt16 nIndex ); + void* GetObject( sal_uInt16 nIndex ) const; - void SetSize( USHORT nNewSize ); + void SetSize( sal_uInt16 nNewSize ); - USHORT GetSize() const { return nCount; } - USHORT Count() const { return nCount; } + sal_uInt16 GetSize() const { return nCount; } + sal_uInt16 Count() const { return nCount; } void SetPrevBlock( CBlock* p ) { pPrev = p; } void SetNextBlock( CBlock* p ) { pNext = p; } CBlock* GetPrevBlock() const { return pPrev; } @@ -93,7 +93,7 @@ private: |* *************************************************************************/ -inline void* CBlock::GetObject( USHORT nIndex ) const +inline void* CBlock::GetObject( sal_uInt16 nIndex ) const { return pNodes[nIndex]; } @@ -108,11 +108,11 @@ inline void* CBlock::GetObject( USHORT nIndex ) const |* *************************************************************************/ -inline void* Container::ImpGetObject( ULONG nIndex ) const +inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const { if ( pFirstBlock && (nIndex < pFirstBlock->Count()) ) // Item innerhalb des gefundenen Blocks zurueckgeben - return pFirstBlock->GetObject( (USHORT)nIndex ); + return pFirstBlock->GetObject( (sal_uInt16)nIndex ); else return GetObject( nIndex ); } diff --git a/tools/inc/makefile.mk b/tools/inc/makefile.mk deleted file mode 100644 index a3a76dc94a11..000000000000 --- a/tools/inc/makefile.mk +++ /dev/null @@ -1,48 +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=tools -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/tools/inc/poly.h b/tools/inc/poly.h index c584a9d32700..08bb5081c726 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -31,7 +31,7 @@ #include <tools/gen.hxx> -#define MAX_64KPOINTS ((((USHORT)0xFFFF)-32)/sizeof(Point)) +#define MAX_64KPOINTS ((((sal_uInt16)0xFFFF)-32)/sizeof(Point)) // ------------------- // - ImplPolygonData - @@ -40,17 +40,10 @@ class ImplPolygonData { public: -#ifdef WIN - Point huge* mpPointAry; - BYTE* mpFlagAry; - GLOBALHANDLE mhPoints; -#else Point* mpPointAry; - BYTE* mpFlagAry; -#endif - - USHORT mnPoints; - ULONG mnRefCount; + sal_uInt8* mpFlagAry; + sal_uInt16 mnPoints; + sal_uIntPtr mnRefCount; }; // --------------- @@ -60,22 +53,22 @@ public: class ImplPolygon : public ImplPolygonData { public: - ImplPolygon( USHORT nInitSize, BOOL bFlags = FALSE ); - ImplPolygon( USHORT nPoints, const Point* pPtAry, const BYTE* pInitFlags = NULL ); + ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags = sal_False ); + ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags = NULL ); ImplPolygon( const ImplPolygon& rImplPoly ); ~ImplPolygon(); - void ImplSetSize( USHORT nSize, BOOL bResize = TRUE ); + void ImplSetSize( sal_uInt16 nSize, sal_Bool bResize = sal_True ); void ImplCreateFlagArray(); - void ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly = NULL ); - void ImplRemove( USHORT nPos, USHORT nCount ); + void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL ); + void ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount ); }; // ------------------- // - ImplPolyPolygon - // ------------------- -#define MAX_POLYGONS ((USHORT)0x3FF0) +#define MAX_POLYGONS ((sal_uInt16)0x3FF0) class Polygon; typedef Polygon* SVPPOLYGON; @@ -84,15 +77,15 @@ class ImplPolyPolygon { public: SVPPOLYGON* mpPolyAry; - ULONG mnRefCount; - USHORT mnCount; - USHORT mnSize; - USHORT mnResize; + sal_uIntPtr mnRefCount; + sal_uInt16 mnCount; + sal_uInt16 mnSize; + sal_uInt16 mnResize; - ImplPolyPolygon( USHORT nInitSize, USHORT nResize ) + ImplPolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize ) { mpPolyAry = NULL; mnCount = 0; mnRefCount = 1; mnSize = nInitSize; mnResize = nResize; } - ImplPolyPolygon( USHORT nInitSize ); + ImplPolyPolygon( sal_uInt16 nInitSize ); ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly ); ~ImplPolyPolygon(); }; diff --git a/tools/inc/tools/StringListResource.hxx b/tools/inc/tools/StringListResource.hxx index 5b45be439230..6b199d855c87 100644 --- a/tools/inc/tools/StringListResource.hxx +++ b/tools/inc/tools/StringListResource.hxx @@ -40,7 +40,7 @@ namespace tools public: StringListResource(const ResId& _aResId,::std::vector< ::rtl::OUString>& _rToFill ) : Resource(_aResId) { - USHORT i = 1; + sal_uInt16 i = 1; while( IsAvailableRes(ResId(i,*m_pResMgr).SetRT(RSC_STRING)) ) { String sStr = String(ResId(i,*m_pResMgr)); diff --git a/tools/inc/tools/agapi.hxx b/tools/inc/tools/agapi.hxx deleted file mode 100644 index 731594ad4df1..000000000000 --- a/tools/inc/tools/agapi.hxx +++ /dev/null @@ -1,69 +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. - * - ************************************************************************/ - -#ifndef _AGAPI_HXX -#define _AGAPI_HXX - -#include <tools/solar.h> - -class INetURLObject; -class ChannelList; -class AgentItem; -class String; - -class AgentApi -{ -protected: - friend class ChannelList; - - AgentItem* pChannelAgent; - virtual BOOL StartAgent() = 0; - - AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; } - -public: - virtual ~AgentApi() {} - - virtual void InitAgent() = 0; - virtual void ShutDownAgent() = 0; - - virtual BOOL NewDataPermission(const String& rChannelName) = 0; - virtual void NewData(const String& rChannelName, - const INetURLObject& rURL) = 0; - virtual void NotifyChannelObjFile(const INetURLObject& rURL, - const String& rFileName) = 0; - virtual void NotifyChannelObjData(const INetURLObject& rURL, - void* pBuffer, long nOffset, long nLen, long nTotalLen) = 0; - - virtual void RegisterChannels() = 0; - virtual void RegisterUpdateTransmitter() = 0; -}; - -#endif //_AGAPI_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/agitem.hxx b/tools/inc/tools/agitem.hxx deleted file mode 100644 index 869fb99d8510..000000000000 --- a/tools/inc/tools/agitem.hxx +++ /dev/null @@ -1,53 +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. - * - ************************************************************************/ - -#ifndef _AGITEM_HXX -#define _AGITEM_HXX - -#include <tools/solar.h> - -class String; -class INetURLObject; -class AgentApi; -class ChApi; - -class AgentItem -{ -public: - virtual const String& GetChAgentName() const = 0; - virtual const INetURLObject& GetLocation() const = 0; - virtual AgentApi* GetApi() const = 0; - virtual ChApi* GetChApi() const = 0; - - virtual void SetIsActive(BOOL bNew) = 0; - virtual BOOL IsActive() const = 0; -}; - -#endif //_AGITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx index 544b0b5ef26d..965e85fdbbdb 100644 --- a/tools/inc/tools/bigint.hxx +++ b/tools/inc/tools/bigint.hxx @@ -94,8 +94,8 @@ public: operator long() const; operator int() const; operator double() const; - operator USHORT() const; - operator ULONG() const; + operator sal_uInt16() const; + operator sal_uIntPtr() const; void Set( sal_Bool bSet ) { bIsSet = bSet; } ByteString GetByteString() const; @@ -200,10 +200,10 @@ inline BigInt::operator int() const return 0; } -inline BigInt::operator USHORT() const +inline BigInt::operator sal_uInt16() const { if ( !bIsBig && nVal >= 0 && nVal <= USHRT_MAX ) - return (USHORT)nVal; + return (sal_uInt16)nVal; else return 0; } diff --git a/tools/inc/tools/cachestr.hxx b/tools/inc/tools/cachestr.hxx index cbc16e5950b4..adb9aacc28d2 100644 --- a/tools/inc/tools/cachestr.hxx +++ b/tools/inc/tools/cachestr.hxx @@ -43,7 +43,7 @@ class TOOLS_DLLPUBLIC SvCacheStream : public SvStream { private: String aFileName; - ULONG nMaxSize; + sal_uIntPtr nMaxSize; int bPersistent; SvStream* pSwapStream; @@ -52,17 +52,17 @@ private: Link aFilenameLinkHdl; - TOOLS_DLLPRIVATE virtual ULONG GetData( void* pData, ULONG nSize ); - TOOLS_DLLPRIVATE virtual ULONG PutData( const void* pData, ULONG nSize ); - TOOLS_DLLPRIVATE virtual ULONG SeekPos( ULONG nPos ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); TOOLS_DLLPRIVATE virtual void FlushData(); - TOOLS_DLLPRIVATE virtual void SetSize( ULONG nSize ); + TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize ); public: - SvCacheStream( ULONG nMaxMemSize = 0 ); + SvCacheStream( sal_uIntPtr nMaxMemSize = 0 ); SvCacheStream( const String &rFileName, - ULONG nExpectedSize = 0, - ULONG nMaxMemSize = 0 ); + sal_uIntPtr nExpectedSize = 0, + sal_uIntPtr nMaxMemSize = 0 ); ~SvCacheStream(); void SetFilenameHdl( const Link& rLink); @@ -73,10 +73,10 @@ public: void SwapOut(); const void* GetBuffer(); - ULONG GetSize(); + sal_uIntPtr GetSize(); - BOOL IsPersistent() { return bPersistent != 0; } - void SetPersistence( BOOL b = TRUE ) { bPersistent = b; } + sal_Bool IsPersistent() { return bPersistent != 0; } + void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; } void SetSwapStream( SvStream *p ) { pSwapStream = p; } // darf nur vom FilenameHdl gerufen werden! }; diff --git a/tools/inc/tools/chapi.hxx b/tools/inc/tools/chapi.hxx deleted file mode 100644 index d83367a4a246..000000000000 --- a/tools/inc/tools/chapi.hxx +++ /dev/null @@ -1,71 +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. - * - ************************************************************************/ - -#ifndef _CHAPI_HXX -#define _CHAPI_HXX - -#include <tools/solar.h> - -class ChannelAgentItem; -class INetURLObject; -class String; - -enum RequestType { - REQTYP_LOCAL_FILE = 1, - REQTYP_MEMORY = 2 -}; - -class ChApi -{ -public: - virtual ~ChApi() {} - - virtual void ShutDownAgent() = 0; - virtual void SetLastSuccUpd() = 0; - - virtual void GetChannelObject( const INetURLObject& rURL, RequestType eStreamType, - const String& rFileName ) = 0; - virtual void AddChannelItem( const String& aChName, const INetURLObject& aTransmitter, - const String& aChannel, USHORT nUpdPeriode, - const String& rChAgentName ) = 0; - virtual void DelChannelItem( const String& aChName ) = 0; - virtual void SetChTransmitter( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChannel( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChannelName( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChUpdPeriode( const String& aChName, USHORT nUpdPeriode ) = 0; - virtual void SetChannelAgentName( const String& aChName, const String& rNewVal ) = 0; - - virtual void SetUpdateTransmitter(ChannelAgentItem* pAgent, const INetURLObject& rTransmitter) = 0; -}; - -//////////////////////////////////////////////////////////////////////////////// -// - -#endif //_CHAPI_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index a46fc60ea554..a75319d89677 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -40,24 +40,24 @@ class ResId; // - ColorCount-Types - // -------------------- -#define COLCOUNT_MONOCHROM ((ULONG)2) -#define COLCOUNT_16 ((ULONG)16) -#define COLCOUNT_256 ((ULONG)256) -#define COLCOUNT_HICOLOR1 (((ULONG)0x00007FFF)+1) -#define COLCOUNT_HICOLOR2 (((ULONG)0x0000FFFF)+1) -#define COLCOUNT_TRUECOLOR (((ULONG)0x00FFFFFF)+1) +#define COLCOUNT_MONOCHROM ((sal_uIntPtr)2) +#define COLCOUNT_16 ((sal_uIntPtr)16) +#define COLCOUNT_256 ((sal_uIntPtr)256) +#define COLCOUNT_HICOLOR1 (((sal_uIntPtr)0x00007FFF)+1) +#define COLCOUNT_HICOLOR2 (((sal_uIntPtr)0x0000FFFF)+1) +#define COLCOUNT_TRUECOLOR (((sal_uIntPtr)0x00FFFFFF)+1) // --------------- // - Color-Types - // --------------- -typedef UINT32 ColorData; -#define RGB_COLORDATA( r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)) -#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24)) -#define COLORDATA_RED( n ) ((UINT8)((n)>>16)) -#define COLORDATA_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8)) -#define COLORDATA_BLUE( n ) ((UINT8)(n)) -#define COLORDATA_TRANSPARENCY( n ) ((UINT8)((n)>>24)) +typedef sal_uInt32 ColorData; +#define RGB_COLORDATA( r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)) +#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)|(((sal_uInt32)((sal_uInt8)(t)))<<24)) +#define COLORDATA_RED( n ) ((sal_uInt8)((n)>>16)) +#define COLORDATA_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8)) +#define COLORDATA_BLUE( n ) ((sal_uInt8)(n)) +#define COLORDATA_TRANSPARENCY( n ) ((sal_uInt8)((n)>>24)) #define COLORDATA_RGB( n ) ((ColorData)((n) & 0x00FFFFFF)) #define COL_BLACK RGB_COLORDATA( 0x00, 0x00, 0x00 ) @@ -107,7 +107,7 @@ typedef UINT32 ColorData; #define COL_AUTHOR9_LIGHT RGB_COLORDATA(255, 231, 199) #define COLOR_CHANNEL_MERGE( _def_cDst, _def_cSrc, _def_cSrcTrans ) \ - ((BYTE)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L)) + ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L)) // --------- // - Color - @@ -121,9 +121,9 @@ protected: public: Color() { mnColor = COL_BLACK; } Color( ColorData nColor ) { mnColor = nColor; } - Color( UINT8 nRed, UINT8 nGreen, UINT8 nBlue ) + Color( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue ) { mnColor = RGB_COLORDATA( nRed, nGreen, nBlue ); } - Color( UINT8 nTransparency, UINT8 nRed, UINT8 nGreen, UINT8 nBlue ) + Color( sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue ) { mnColor = TRGB_COLORDATA( nTransparency, nRed, nGreen, nBlue ); } Color( const ResId& rResId ); // This ctor is defined in svtools, not tools! @@ -132,58 +132,58 @@ public: explicit Color(const ::basegfx::BColor& rBColor) { mnColor = RGB_COLORDATA( - UINT8((rBColor.getRed() * 255.0) + 0.5), - UINT8((rBColor.getGreen() * 255.0) + 0.5), - UINT8((rBColor.getBlue() * 255.0) + 0.5)); + sal_uInt8((rBColor.getRed() * 255.0) + 0.5), + sal_uInt8((rBColor.getGreen() * 255.0) + 0.5), + sal_uInt8((rBColor.getBlue() * 255.0) + 0.5)); } - void SetRed( UINT8 nRed ); - UINT8 GetRed() const { return COLORDATA_RED( mnColor ); } - void SetGreen( UINT8 nGreen ); - UINT8 GetGreen() const { return COLORDATA_GREEN( mnColor ); } - void SetBlue( UINT8 nBlue ); - UINT8 GetBlue() const { return COLORDATA_BLUE( mnColor ); } - void SetTransparency( UINT8 nTransparency ); - UINT8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); } + void SetRed( sal_uInt8 nRed ); + sal_uInt8 GetRed() const { return COLORDATA_RED( mnColor ); } + void SetGreen( sal_uInt8 nGreen ); + sal_uInt8 GetGreen() const { return COLORDATA_GREEN( mnColor ); } + void SetBlue( sal_uInt8 nBlue ); + sal_uInt8 GetBlue() const { return COLORDATA_BLUE( mnColor ); } + void SetTransparency( sal_uInt8 nTransparency ); + sal_uInt8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); } void SetColor( ColorData nColor ) { mnColor = nColor; } ColorData GetColor() const { return mnColor; } ColorData GetRGBColor() const { return COLORDATA_RGB( mnColor ); } - UINT8 GetColorError( const Color& rCompareColor ) const; + sal_uInt8 GetColorError( const Color& rCompareColor ) const; - UINT8 GetLuminance() const; - void IncreaseLuminance( UINT8 cLumInc ); - void DecreaseLuminance( UINT8 cLumDec ); + sal_uInt8 GetLuminance() const; + void IncreaseLuminance( sal_uInt8 cLumInc ); + void DecreaseLuminance( sal_uInt8 cLumDec ); - void IncreaseContrast( UINT8 cContInc ); - void DecreaseContrast( UINT8 cContDec ); + void IncreaseContrast( sal_uInt8 cContInc ); + void DecreaseContrast( sal_uInt8 cContDec ); void Invert(); - void Merge( const Color& rMergeColor, BYTE cTransparency ); + void Merge( const Color& rMergeColor, sal_uInt8 cTransparency ); - BOOL IsRGBEqual( const Color& rColor ) const; + sal_Bool IsRGBEqual( const Color& rColor ) const; // comparison with luminance thresholds - BOOL IsDark() const; - BOOL IsBright() const; + sal_Bool IsDark() const; + sal_Bool IsBright() const; // color space conversion tools // the range for h/s/b is: // Hue: 0-360 degree // Saturation: 0-100 % // Brightness: 0-100 % - static ColorData HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri ); - void RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const; + static ColorData HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri ); + void RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const; - BOOL operator==( const Color& rColor ) const + sal_Bool operator==( const Color& rColor ) const { return (mnColor == rColor.mnColor); } - BOOL operator!=( const Color& rColor ) const + sal_Bool operator!=( const Color& rColor ) const { return !(Color::operator==( rColor )); } - SvStream& Read( SvStream& rIStm, BOOL bNewFormat = TRUE ); - SvStream& Write( SvStream& rOStm, BOOL bNewFormat = TRUE ); + SvStream& Read( SvStream& rIStm, sal_Bool bNewFormat = sal_True ); + SvStream& Write( SvStream& rOStm, sal_Bool bNewFormat = sal_True ); TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Color& rColor ); TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Color& rColor ); @@ -192,43 +192,43 @@ public: ::basegfx::BColor getBColor() const { return ::basegfx::BColor(GetRed() / 255.0, GetGreen() / 255.0, GetBlue() / 255.0); } }; -inline void Color::SetRed( UINT8 nRed ) +inline void Color::SetRed( sal_uInt8 nRed ) { mnColor &= 0xFF00FFFF; - mnColor |= ((UINT32)nRed)<<16; + mnColor |= ((sal_uInt32)nRed)<<16; } -inline void Color::SetGreen( UINT8 nGreen ) +inline void Color::SetGreen( sal_uInt8 nGreen ) { mnColor &= 0xFFFF00FF; - mnColor |= ((UINT16)nGreen)<<8; + mnColor |= ((sal_uInt16)nGreen)<<8; } -inline void Color::SetBlue( UINT8 nBlue ) +inline void Color::SetBlue( sal_uInt8 nBlue ) { mnColor &= 0xFFFFFF00; mnColor |= nBlue; } -inline void Color::SetTransparency( UINT8 nTransparency ) +inline void Color::SetTransparency( sal_uInt8 nTransparency ) { mnColor &= 0x00FFFFFF; - mnColor |= ((UINT32)nTransparency)<<24; + mnColor |= ((sal_uInt32)nTransparency)<<24; } -inline BOOL Color::IsRGBEqual( const Color& rColor ) const +inline sal_Bool Color::IsRGBEqual( const Color& rColor ) const { return (COLORDATA_RGB( mnColor ) == COLORDATA_RGB( rColor.mnColor )); } -inline UINT8 Color::GetLuminance() const +inline sal_uInt8 Color::GetLuminance() const { - return( (UINT8) ( ( COLORDATA_BLUE( mnColor ) * 28UL + + return( (sal_uInt8) ( ( COLORDATA_BLUE( mnColor ) * 28UL + COLORDATA_GREEN( mnColor ) * 151UL + COLORDATA_RED( mnColor ) * 77UL ) >> 8UL ) ); } -inline void Color::Merge( const Color& rMergeColor, BYTE cTransparency ) +inline void Color::Merge( const Color& rMergeColor, sal_uInt8 cTransparency ) { SetRed( COLOR_CHANNEL_MERGE( COLORDATA_RED( mnColor ), COLORDATA_RED( rMergeColor.mnColor ), cTransparency ) ); SetGreen( COLOR_CHANNEL_MERGE( COLORDATA_GREEN( mnColor ), COLORDATA_GREEN( rMergeColor.mnColor ), cTransparency ) ); diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx index d18d410452b2..fae05fb8bc42 100644 --- a/tools/inc/tools/config.hxx +++ b/tools/inc/tools/config.hxx @@ -45,13 +45,13 @@ private: ByteString maGroupName; ImplConfigData* mpData; ImplGroupData* mpActGroup; - ULONG mnDataUpdateId; - USHORT mnLockCount; - BOOL mbPersistence; - BOOL mbDummy1; + sal_uIntPtr mnDataUpdateId; + sal_uInt16 mnLockCount; + sal_Bool mbPersistence; + sal_Bool mbDummy1; #ifdef _CONFIG_CXX - TOOLS_DLLPRIVATE BOOL ImplUpdateConfig() const; + TOOLS_DLLPRIVATE sal_Bool ImplUpdateConfig() const; TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const; #endif @@ -67,9 +67,9 @@ public: void SetGroup( const ByteString& rGroup ); const ByteString& GetGroup() const { return maGroupName; } void DeleteGroup( const ByteString& rGroup ); - ByteString GetGroupName( USHORT nGroup ) const; - USHORT GetGroupCount() const; - BOOL HasGroup( const ByteString& rGroup ) const; + ByteString GetGroupName( sal_uInt16 nGroup ) const; + sal_uInt16 GetGroupCount() const; + sal_Bool HasGroup( const ByteString& rGroup ) const; ByteString ReadKey( const ByteString& rKey ) const; UniString ReadKey( const ByteString& rKey, rtl_TextEncoding eEncoding ) const; @@ -77,19 +77,19 @@ public: void WriteKey( const ByteString& rKey, const ByteString& rValue ); void WriteKey( const ByteString& rKey, const UniString& rValue, rtl_TextEncoding eEncoding ); void DeleteKey( const ByteString& rKey ); - ByteString GetKeyName( USHORT nKey ) const; - ByteString ReadKey( USHORT nKey ) const; - USHORT GetKeyCount() const; + ByteString GetKeyName( sal_uInt16 nKey ) const; + ByteString ReadKey( sal_uInt16 nKey ) const; + sal_uInt16 GetKeyCount() const; void EnterLock(); void LeaveLock(); - BOOL IsLocked() const { return (mnLockCount != 0); } - BOOL Update(); + sal_Bool IsLocked() const { return (mnLockCount != 0); } + sal_Bool Update(); void Flush(); - void EnablePersistence( BOOL bPersistence = TRUE ) + void EnablePersistence( sal_Bool bPersistence = sal_True ) { mbPersistence = bPersistence; } - BOOL IsPersistenceEnabled() const { return mbPersistence; } + sal_Bool IsPersistenceEnabled() const { return mbPersistence; } void SetLineEnd( LineEnd eLineEnd ); LineEnd GetLineEnd() const; diff --git a/tools/inc/tools/contnr.hxx b/tools/inc/tools/contnr.hxx index d619b8979bc1..ea70c1756f3a 100644 --- a/tools/inc/tools/contnr.hxx +++ b/tools/inc/tools/contnr.hxx @@ -40,7 +40,7 @@ class CBlock; // ------------- // Maximale Blockgroesse -#define CONTAINER_MAXBLOCKSIZE ((USHORT)0x3FF0) +#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0) #define CONTAINER_APPEND ULONG_MAX #define CONTAINER_ENTRY_NOTFOUND ULONG_MAX @@ -51,11 +51,11 @@ private: CBlock* pFirstBlock; CBlock* pCurBlock; CBlock* pLastBlock; - USHORT nCurIndex; - USHORT nBlockSize; - USHORT nInitSize; - USHORT nReSize; - ULONG nCount; + sal_uInt16 nCurIndex; + sal_uInt16 nBlockSize; + sal_uInt16 nInitSize; + sal_uInt16 nReSize; + sal_uIntPtr nCount; TOOLS_DLLPRIVATE void ImpCopyContainer(Container const *); #if defined DBG_UTIL @@ -64,49 +64,49 @@ private: protected: #ifdef _IMPCONT_HXX - void ImpInsert( void* p, CBlock* pBlock, USHORT nIndex ); - void* ImpRemove( CBlock* pBlock, USHORT nIndex ); - void* ImpGetObject( ULONG nIndex ) const; + void ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex ); + void* ImpRemove( CBlock* pBlock, sal_uInt16 nIndex ); + void* ImpGetObject( sal_uIntPtr nIndex ) const; void** ImpGetOnlyNodes() const; #endif - void** GetObjectPtr( ULONG nIndex ); + void** GetObjectPtr( sal_uIntPtr nIndex ); public: - Container( USHORT nBlockSize, - USHORT nInitSize, - USHORT nReSize ); - Container( ULONG nSize ); + Container( sal_uInt16 nBlockSize, + sal_uInt16 nInitSize, + sal_uInt16 nReSize ); + Container( sal_uIntPtr nSize ); Container( const Container& rContainer ); ~Container(); void Insert( void* p ); - void Insert( void* p, ULONG nIndex ); + void Insert( void* p, sal_uIntPtr nIndex ); void Insert( void* pNew, void* pOld ); void* Remove(); - void* Remove( ULONG nIndex ); + void* Remove( sal_uIntPtr nIndex ); void* Remove( void* p ) { return Remove( GetPos( p ) ); } void* Replace( void* p ); - void* Replace( void* p, ULONG nIndex ); + void* Replace( void* p, sal_uIntPtr nIndex ); void* Replace( void* pNew, void* pOld ) { return Replace( pNew, GetPos( pOld ) ); } - void SetSize( ULONG nNewSize ); - ULONG GetSize() const { return nCount; } + void SetSize( sal_uIntPtr nNewSize ); + sal_uIntPtr GetSize() const { return nCount; } - ULONG Count() const { return nCount; } + sal_uIntPtr Count() const { return nCount; } void Clear(); void* GetCurObject() const; - ULONG GetCurPos() const; - void* GetObject( ULONG nIndex ) const; - ULONG GetPos( const void* p ) const; - ULONG GetPos( const void* p, ULONG nStartIndex, - BOOL bForward = TRUE ) const; + sal_uIntPtr GetCurPos() const; + void* GetObject( sal_uIntPtr nIndex ) const; + sal_uIntPtr GetPos( const void* p ) const; + sal_uIntPtr GetPos( const void* p, sal_uIntPtr nStartIndex, + sal_Bool bForward = sal_True ) const; - void* Seek( ULONG nIndex ); + void* Seek( sal_uIntPtr nIndex ); void* Seek( void* p ) { return Seek( GetPos( p ) ); } void* First(); @@ -116,8 +116,8 @@ public: Container& operator =( const Container& rContainer ); - BOOL operator ==( const Container& rContainer ) const; - BOOL operator !=( const Container& rContainer ) const + sal_Bool operator ==( const Container& rContainer ) const; + sal_Bool operator !=( const Container& rContainer ) const { return !(Container::operator==( rContainer )); } }; diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx index d87fa54b999f..183f6af43fbd 100644 --- a/tools/inc/tools/date.hxx +++ b/tools/inc/tools/date.hxx @@ -55,7 +55,7 @@ public: Date( sal_uInt32 _nDate ) { Date::nDate = _nDate; } Date( const Date& rDate ) { nDate = rDate.nDate; } - Date( USHORT nDay, USHORT nMonth, USHORT nYear ) + Date( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ) { nDate = ( sal_uInt32( nDay % 100 ) ) + ( ( sal_uInt32( nMonth % 100 ) ) * 100 ) + ( ( sal_uInt32( nYear % 10000 ) ) * 10000); } @@ -63,40 +63,40 @@ public: void SetDate( sal_uInt32 nNewDate ) { nDate = nNewDate; } sal_uInt32 GetDate() const { return nDate; } - void SetDay( USHORT nNewDay ); - void SetMonth( USHORT nNewMonth ); - void SetYear( USHORT nNewYear ); - USHORT GetDay() const { return (USHORT)(nDate % 100); } - USHORT GetMonth() const { return (USHORT)((nDate / 100) % 100); } - USHORT GetYear() const { return (USHORT)(nDate / 10000); } + void SetDay( sal_uInt16 nNewDay ); + void SetMonth( sal_uInt16 nNewMonth ); + void SetYear( sal_uInt16 nNewYear ); + sal_uInt16 GetDay() const { return (sal_uInt16)(nDate % 100); } + sal_uInt16 GetMonth() const { return (sal_uInt16)((nDate / 100) % 100); } + sal_uInt16 GetYear() const { return (sal_uInt16)(nDate / 10000); } DayOfWeek GetDayOfWeek() const; - USHORT GetDayOfYear() const; + sal_uInt16 GetDayOfYear() const; /** nMinimumNumberOfDaysInWeek: how many days of a week must reside in the first week of a year. */ - USHORT GetWeekOfYear( DayOfWeek eStartDay = MONDAY, + sal_uInt16 GetWeekOfYear( DayOfWeek eStartDay = MONDAY, sal_Int16 nMinimumNumberOfDaysInWeek = 4 ) const; - USHORT GetDaysInMonth() const; - USHORT GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; } - BOOL IsLeapYear() const; - BOOL IsValid() const; + sal_uInt16 GetDaysInMonth() const; + sal_uInt16 GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; } + sal_Bool IsLeapYear() const; + sal_Bool IsValid() const; - BOOL IsBetween( const Date& rFrom, const Date& rTo ) const + sal_Bool IsBetween( const Date& rFrom, const Date& rTo ) const { return ((nDate >= rFrom.nDate) && (nDate <= rTo.nDate)); } - BOOL operator ==( const Date& rDate ) const + sal_Bool operator ==( const Date& rDate ) const { return (nDate == rDate.nDate); } - BOOL operator !=( const Date& rDate ) const + sal_Bool operator !=( const Date& rDate ) const { return (nDate != rDate.nDate); } - BOOL operator >( const Date& rDate ) const + sal_Bool operator >( const Date& rDate ) const { return (nDate > rDate.nDate); } - BOOL operator <( const Date& rDate ) const + sal_Bool operator <( const Date& rDate ) const { return (nDate < rDate.nDate); } - BOOL operator >=( const Date& rDate ) const + sal_Bool operator >=( const Date& rDate ) const { return (nDate >= rDate.nDate); } - BOOL operator <=( const Date& rDate ) const + sal_Bool operator <=( const Date& rDate ) const { return (nDate <= rDate.nDate); } Date& operator =( const Date& rDate ) @@ -114,7 +114,7 @@ public: TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays ); TOOLS_DLLPUBLIC friend long operator -( const Date& rDate1, const Date& rDate2 ); - static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear ); + static long DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ); }; diff --git a/tools/inc/tools/datetime.hxx b/tools/inc/tools/datetime.hxx index 280b5d81cef7..d12a276d0f03 100644 --- a/tools/inc/tools/datetime.hxx +++ b/tools/inc/tools/datetime.hxx @@ -48,29 +48,29 @@ public: DateTime( const Date& rDate, const Time& rTime ) : Date( rDate ), Time( rTime ) {} - BOOL IsBetween( const DateTime& rFrom, + sal_Bool IsBetween( const DateTime& rFrom, const DateTime& rTo ) const; - BOOL IsEqualIgnore100Sec( const DateTime& rDateTime ) const + sal_Bool IsEqualIgnore100Sec( const DateTime& rDateTime ) const { if ( Date::operator!=( rDateTime ) ) - return FALSE; + return sal_False; return Time::IsEqualIgnore100Sec( rDateTime ); } - BOOL operator ==( const DateTime& rDateTime ) const + sal_Bool operator ==( const DateTime& rDateTime ) const { return (Date::operator==( rDateTime ) && Time::operator==( rDateTime )); } - BOOL operator !=( const DateTime& rDateTime ) const + sal_Bool operator !=( const DateTime& rDateTime ) const { return (Date::operator!=( rDateTime ) || Time::operator!=( rDateTime )); } - BOOL operator >( const DateTime& rDateTime ) const; - BOOL operator <( const DateTime& rDateTime ) const; - BOOL operator >=( const DateTime& rDateTime ) const; - BOOL operator <=( const DateTime& rDateTime ) const; + sal_Bool operator >( const DateTime& rDateTime ) const; + sal_Bool operator <( const DateTime& rDateTime ) const; + sal_Bool operator >=( const DateTime& rDateTime ) const; + sal_Bool operator <=( const DateTime& rDateTime ) const; long GetSecFromDateTime( const Date& rDate ) const; - void MakeDateTimeFromSec( const Date& rDate, ULONG nSec ); + void MakeDateTimeFromSec( const Date& rDate, sal_uIntPtr nSec ); void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx index 83587597312d..a4cec07f30c2 100644 --- a/tools/inc/tools/debug.hxx +++ b/tools/inc/tools/debug.hxx @@ -92,15 +92,15 @@ typedef void (*DbgTestSolarMutexProc)(); struct DbgData { - ULONG nTestFlags; - ULONG bOverwrite; - ULONG nTraceOut; - ULONG nWarningOut; - ULONG nErrorOut; - ULONG bHookOSLAssert; - BYTE bMemInit; - BYTE bMemBound; - BYTE bMemFree; + sal_uIntPtr nTestFlags; + sal_uIntPtr bOverwrite; + sal_uIntPtr nTraceOut; + sal_uIntPtr nWarningOut; + sal_uIntPtr nErrorOut; + sal_uIntPtr bHookOSLAssert; + sal_uInt8 bMemInit; + sal_uInt8 bMemBound; + sal_uInt8 bMemFree; sal_Char aDebugName[260]; sal_Char aInclFilter[512]; sal_Char aExclFilter[512]; @@ -137,7 +137,7 @@ struct DbgDataType #define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967 #define DBG_FUNC_UPDATEOSLHOOK 19 -TOOLS_DLLPUBLIC void* DbgFunc( USHORT nAction, void* pData = NULL ); +TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL ); inline void DbgUpdateOslHook( DbgData* pData ) { @@ -179,7 +179,7 @@ inline void DbgSetPrintTestTool( DbgPrintLine pProc ) DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc ); } -typedef USHORT DbgChannelId; +typedef sal_uInt16 DbgChannelId; /** registers a user-defined channel for emitting the diagnostic messages Note that such a user-defined channel cannot be revoked during the lifetime @@ -198,9 +198,9 @@ typedef USHORT DbgChannelId; */ TOOLS_DLLPUBLIC DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc ); -inline BOOL DbgFilterMessage( const char* pMsg ) +inline sal_Bool DbgFilterMessage( const char* pMsg ) { - return (BOOL)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg ); + return (sal_Bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg ); } inline int DbgIsAllErrorOut() @@ -218,34 +218,34 @@ inline void DbgSaveData( const DbgData& rData ) DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData ); } -inline ULONG DbgIsTraceOut() +inline sal_uIntPtr DbgIsTraceOut() { DbgData* pData = DbgGetData(); if ( pData ) return (pData->nTraceOut != DBG_OUT_NULL); else - return FALSE; + return sal_False; } -inline ULONG DbgIsWarningOut() +inline sal_uIntPtr DbgIsWarningOut() { DbgData* pData = DbgGetData(); if ( pData ) return (pData->nWarningOut != DBG_OUT_NULL); else - return FALSE; + return sal_False; } -inline ULONG DbgIsErrorOut() +inline sal_uIntPtr DbgIsErrorOut() { DbgData* pData = DbgGetData(); if ( pData ) return (pData->nErrorOut != DBG_OUT_NULL); else - return FALSE; + return sal_False; } -inline ULONG DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTions as well +inline sal_uIntPtr DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTions as well { DbgData* pData = DbgGetData(); if ( pData ) @@ -254,41 +254,41 @@ inline ULONG DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTio return DBG_OUT_NULL; } -inline ULONG DbgIsAssertWarning() +inline sal_uIntPtr DbgIsAssertWarning() { return DbgIsWarningOut(); } -inline ULONG DbgIsAssert() +inline sal_uIntPtr DbgIsAssert() { return DbgIsErrorOut(); } -inline ULONG DbgIsResource() +inline sal_uIntPtr DbgIsResource() { DbgData* pData = DbgGetData(); if ( pData ) return pData->nTestFlags & DBG_TEST_RESOURCE; else - return FALSE; + return sal_False; } -inline ULONG DbgIsDialog() +inline sal_uIntPtr DbgIsDialog() { DbgData* pData = DbgGetData(); if ( pData ) return pData->nTestFlags & DBG_TEST_DIALOG; else - return FALSE; + return sal_False; } -inline ULONG DbgIsBoldAppFont() +inline sal_uIntPtr DbgIsBoldAppFont() { DbgData* pData = DbgGetData(); if ( pData ) return pData->nTestFlags & DBG_TEST_BOLDAPPFONT; else - return FALSE; + return sal_False; } inline void DbgXtorInfo( sal_Char* pBuf ) @@ -325,8 +325,8 @@ inline void DbgPrintFile( const sal_Char* pLine ) TOOLS_DLLPUBLIC void DbgStartStackTree(); TOOLS_DLLPUBLIC void DbgEndStackTree(); -void* DbgGetStackTree( ULONG nAlloc = 0 ); -void DbgFreeStackTree( void* p, ULONG nAlloc = 0 ); +void* DbgGetStackTree( sal_uIntPtr nAlloc = 0 ); +void DbgFreeStackTree( void* p, sal_uIntPtr nAlloc = 0 ); void DbgPrintStackTree( void* p ); // --- Dbg-Output --- @@ -335,27 +335,27 @@ void DbgPrintStackTree( void* p ); #define DBG_OUT_WARNING 2 #define DBG_OUT_ERROR 3 -TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, USHORT nOutType = DBG_OUT_TRACE, - const sal_Char* pFile = NULL, USHORT nLine = 0 ); +TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, sal_uInt16 nOutType = DBG_OUT_TRACE, + const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 ); TOOLS_DLLPUBLIC void DbgPrintShell(char const * message); -TOOLS_DLLPUBLIC void DbgOutTypef( USHORT nOutType, const sal_Char* pFStr, ... ); +TOOLS_DLLPUBLIC void DbgOutTypef( sal_uInt16 nOutType, const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... ); inline void DbgTrace( const sal_Char* pMsg, - const sal_Char* pFile = NULL, USHORT nLine = 0 ) + const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 ) { DbgOut( pMsg, DBG_OUT_TRACE, pFile, nLine ); } inline void DbgWarning( const sal_Char* pMsg, - const sal_Char* pFile = NULL, USHORT nLine = 0 ) + const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 ) { DbgOut( pMsg, DBG_OUT_WARNING, pFile, nLine ); } inline void DbgError( const sal_Char* pMsg, - const sal_Char* pFile = NULL, USHORT nLine = 0 ) + const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 ) { DbgOut( pMsg, DBG_OUT_ERROR, pFile, nLine ); } @@ -372,7 +372,7 @@ inline void DbgMemTest( void* p = NULL ) #define DBG_PROF_CONTINUE 3 #define DBG_PROF_PAUSE 4 -TOOLS_DLLPUBLIC void DbgProf( USHORT nAction, DbgDataType* ); +TOOLS_DLLPUBLIC void DbgProf( sal_uInt16 nAction, DbgDataType* ); #define DBG_XTOR_CTOR 1 #define DBG_XTOR_DTOR 2 @@ -381,7 +381,7 @@ TOOLS_DLLPUBLIC void DbgProf( USHORT nAction, DbgDataType* ); #define DBG_XTOR_DTOROBJ 0x8000 TOOLS_DLLPUBLIC void DbgXtor( DbgDataType* pDbgData, - USHORT nAction, const void* pThis, DbgUsr fDbgUsr ); + sal_uInt16 nAction, const void* pThis, DbgUsr fDbgUsr ); class DbgXtorObj { @@ -389,11 +389,11 @@ private: DbgDataType* pDbgData; const void* pThis; DbgUsr fDbgUsr; - USHORT nAction; + sal_uInt16 nAction; public: DbgXtorObj( DbgDataType* pData, - USHORT nAct, const void* pThs, DbgUsr fUsr ) + sal_uInt16 nAct, const void* pThs, DbgUsr fUsr ) { DbgXtor( pData, nAct, pThs, fUsr ); pDbgData = pData; diff --git a/tools/inc/tools/download.hxx b/tools/inc/tools/download.hxx deleted file mode 100644 index 7f4363631ebf..000000000000 --- a/tools/inc/tools/download.hxx +++ /dev/null @@ -1,59 +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. - * - ************************************************************************/ - -#ifndef _DOWNLOAD_HXX -#define _DOWNLOAD_HXX - -// Forward declarations -class String; -class Link; - -#define DOWNLOAD_SUCCESS 0 -#define DOWNLOAD_CONNECT 1 -#define DOWNLOAD_LOCATION 2 -#define DOWNLOAD_ABORT 3 -#define DOWNLOAD_FILEACCESS 4 -#define DOWNLOAD_INSTALL 5 -#define DOWNLOAD_ERROR 6 - -class Downloader -/* *************************************************************************** -Purpose: Abstract base class for a file downloader -*************************************************************************** */ -{ -public: - Downloader() {}; - - virtual void Download(const String &rDestLocation, - const String &rSourceLocation, - const Link &rFinishedLink) = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx index abbd7d93d2ff..fb2fcce0d17b 100644 --- a/tools/inc/tools/dynary.hxx +++ b/tools/inc/tools/dynary.hxx @@ -45,26 +45,26 @@ public: using Container::GetSize; using Container::Clear; - DynArray( ULONG nSize = 16 ) : Container( nSize ) {} + DynArray( sal_uIntPtr nSize = 16 ) : Container( nSize ) {} DynArray( const DynArray& rAry ) : Container( rAry ) {} - void* Put( ULONG nIndex, void* p ) + void* Put( sal_uIntPtr nIndex, void* p ) { return Container::Replace( p, nIndex ); } - void* Get( ULONG nIndex ) const + void* Get( sal_uIntPtr nIndex ) const { return Container::GetObject( nIndex ); } - ULONG GetIndex( const void* p ) const + sal_uIntPtr GetIndex( const void* p ) const { return Container::GetPos( p ); } - ULONG GetIndex( const void* p, ULONG nStartIndex, - BOOL bForward = TRUE ) const + sal_uIntPtr GetIndex( const void* p, sal_uIntPtr nStartIndex, + sal_Bool bForward = sal_True ) const { return Container::GetPos( p, nStartIndex, bForward ); } DynArray& operator =( const DynArray& rAry ) { Container::operator =( rAry ); return *this; } - BOOL operator ==( const DynArray& rAry ) const + sal_Bool operator ==( const DynArray& rAry ) const { return Container::operator ==( rAry ); } - BOOL operator !=( const DynArray& rAry ) const + sal_Bool operator !=( const DynArray& rAry ) const { return Container::operator !=( rAry ); } }; @@ -80,20 +80,20 @@ public: \ using DynArray::GetSize; \ using DynArray::Clear; \ \ - ClassName( ULONG nSize = 16 ) : \ + ClassName( sal_uIntPtr nSize = 16 ) : \ DynArray( nSize ) {} \ ClassName( const ClassName& rClassName ) : \ DynArray( rClassName ) {} \ \ - Type Put( ULONG nIndex, Type p ) \ + Type Put( sal_uIntPtr nIndex, Type p ) \ { return (Type)DynArray::Put( nIndex, (void*)p ); } \ - Type Get( ULONG nIndex ) const \ + Type Get( sal_uIntPtr nIndex ) const \ { return (Type)DynArray::Get( nIndex ); } \ \ - ULONG GetIndex( const Type p ) const \ + sal_uIntPtr GetIndex( const Type p ) const \ { return DynArray::GetIndex( (const void*)p ); } \ - ULONG GetIndex( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_uIntPtr GetIndex( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return DynArray::GetIndex( (const void*)p, \ nStartIndex, \ bForward ); } \ @@ -102,9 +102,9 @@ public: \ { DynArray::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rAry ) const \ + sal_Bool operator ==( const ClassName& rAry ) const \ { return DynArray::operator ==( rAry ); } \ - BOOL operator !=( const ClassName& rAry ) const \ + sal_Bool operator !=( const ClassName& rAry ) const \ { return DynArray::operator !=( rAry ); } \ }; diff --git a/tools/inc/tools/eacopier.hxx b/tools/inc/tools/eacopier.hxx deleted file mode 100644 index 8009cd38209c..000000000000 --- a/tools/inc/tools/eacopier.hxx +++ /dev/null @@ -1,49 +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. - * - ************************************************************************/ -#ifndef _EACOPIER_HXX -#define _EACOPIER_HXX - -#include <tools/solar.h> - -class SvFileStream; - -class EA_Copier -{ - static EA_Copier* _pCopier; - -public: - static void Register( EA_Copier* pCopier ); - static EA_Copier* Get(); - - virtual ~EA_Copier(); - virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx index 35e75ca33072..f2cdf4f5e533 100644 --- a/tools/inc/tools/errcode.hxx +++ b/tools/inc/tools/errcode.hxx @@ -94,14 +94,14 @@ Warning || || | #else -typedef ULONG ErrCode; +typedef sal_uIntPtr ErrCode; -inline ULONG ERRCODE_TOERRID( ULONG x ) +inline sal_uIntPtr ERRCODE_TOERRID( sal_uIntPtr x ) { return x & ~ERRCODE_DYNAMIC_MASK; } -inline ULONG ERRCODE_TOERROR( ULONG x ) +inline sal_uIntPtr ERRCODE_TOERROR( sal_uIntPtr x ) { return ((x & ERRCODE_WARNING_MASK) ? 0 : (x & ERRCODE_ERROR_MASK)); } diff --git a/tools/inc/tools/errinf.hxx b/tools/inc/tools/errinf.hxx index 4d4779bac509..ae407e345885 100644 --- a/tools/inc/tools/errinf.hxx +++ b/tools/inc/tools/errinf.hxx @@ -48,18 +48,18 @@ class Window; class ErrorInfo { private: - ULONG lUserId; + sal_uIntPtr lUserId; public: TYPEINFO(); - ErrorInfo( ULONG lArgUserId ) : + ErrorInfo( sal_uIntPtr lArgUserId ) : lUserId( lArgUserId ){} virtual ~ErrorInfo(){} - ULONG GetErrorCode() const { return lUserId; } + sal_uIntPtr GetErrorCode() const { return lUserId; } - static ErrorInfo* GetErrorInfo(ULONG); + static ErrorInfo* GetErrorInfo(sal_uIntPtr); }; @@ -77,11 +77,11 @@ private: public: TYPEINFO(); - DynamicErrorInfo(ULONG lUserId, USHORT nMask); + DynamicErrorInfo(sal_uIntPtr lUserId, sal_uInt16 nMask); virtual ~DynamicErrorInfo(); - operator ULONG() const; - USHORT GetDialogMask() const; + operator sal_uIntPtr() const; + sal_uInt16 GetDialogMask() const; }; @@ -92,14 +92,14 @@ public: class StandardErrorInfo : public DynamicErrorInfo { private: - ULONG lExtId; + sal_uIntPtr lExtId; public: TYPEINFO(); - StandardErrorInfo( ULONG lUserId, ULONG lExtId, - USHORT nFlags = 0); - ULONG GetExtendedErrorCode() const { return lExtId; } + StandardErrorInfo( sal_uIntPtr lUserId, sal_uIntPtr lExtId, + sal_uInt16 nFlags = 0); + sal_uIntPtr GetExtendedErrorCode() const { return lExtId; } }; @@ -116,9 +116,9 @@ private: public: TYPEINFO(); - StringErrorInfo( ULONG lUserId, + StringErrorInfo( sal_uIntPtr lUserId, const String& aStringP, - USHORT nFlags = 0); + sal_uInt16 nFlags = 0); const String& GetErrorString() const { return aString; } }; @@ -132,8 +132,8 @@ private: public: TYPEINFO(); - TwoStringErrorInfo(ULONG nUserID, const String & rTheArg1, - const String & rTheArg2, USHORT nFlags = 0): + TwoStringErrorInfo(sal_uIntPtr nUserID, const String & rTheArg1, + const String & rTheArg2, sal_uInt16 nFlags = 0): DynamicErrorInfo(nUserID, nFlags), aArg1(rTheArg1), aArg2(rTheArg2) {} virtual ~TwoStringErrorInfo() {} @@ -150,10 +150,10 @@ class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo public: TYPEINFO(); - MessageInfo(ULONG UserId, USHORT nFlags = 0) : + MessageInfo(sal_uIntPtr UserId, sal_uInt16 nFlags = 0) : DynamicErrorInfo(UserId, nFlags){} - MessageInfo(ULONG UserId, const String &rArg, - USHORT nFlags = 0 ) : + MessageInfo(sal_uIntPtr UserId, const String &rArg, + sal_uInt16 nFlags = 0 ) : DynamicErrorInfo(UserId, nFlags), aArg(rArg) {} const String& GetMessageArg() const { return aArg; } @@ -179,7 +179,7 @@ public: ErrorContext(Window *pWin=0); virtual ~ErrorContext(); - virtual BOOL GetString( ULONG nErrId, String& rCtxStr ) = 0; + virtual sal_Bool GetString( sal_uIntPtr nErrId, String& rCtxStr ) = 0; Window* GetParent() { return pWin; } static ErrorContext* GetContext(); @@ -190,8 +190,8 @@ public: // - ErrorHandler - // ---------------- -typedef USHORT WindowDisplayErrorFunc( - Window *, USHORT nMask, const String &rErr, const String &rAction); +typedef sal_uInt16 WindowDisplayErrorFunc( + Window *, sal_uInt16 nMask, const String &rErr, const String &rAction); typedef void BasicDisplayErrorFunc( const String &rErr, const String &rAction); @@ -203,22 +203,22 @@ class TOOLS_DLLPUBLIC ErrorHandler private: ErrHdl_Impl* pImpl; - static USHORT HandleError_Impl( ULONG lId, - USHORT nFlags, - BOOL bJustCreateString, + static sal_uInt16 HandleError_Impl( sal_uIntPtr lId, + sal_uInt16 nFlags, + sal_Bool bJustCreateString, String & rError); protected: - virtual BOOL CreateString( const ErrorInfo *, - String &, USHORT& nMask ) const = 0; - BOOL ForwCreateString( const ErrorInfo*, - String&, USHORT& nMask ) const; + virtual sal_Bool CreateString( const ErrorInfo *, + String &, sal_uInt16& nMask ) const = 0; + sal_Bool ForwCreateString( const ErrorInfo*, + String&, sal_uInt16& nMask ) const; public: ErrorHandler(); virtual ~ErrorHandler(); - static USHORT HandleError ( ULONG lId, USHORT nMask = USHRT_MAX ); - static BOOL GetErrorString( ULONG lId, String& rStr ); + static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX ); + static sal_Bool GetErrorString( sal_uIntPtr lId, String& rStr ); static void RegisterDisplay( BasicDisplayErrorFunc* ); static void RegisterDisplay( WindowDisplayErrorFunc* ); @@ -232,8 +232,8 @@ public: class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler { protected: - virtual BOOL CreateString( const ErrorInfo*, String &, - USHORT &nMask ) const; + virtual sal_Bool CreateString( const ErrorInfo*, String &, + sal_uInt16 &nMask ) const; public: SimpleErrorHandler(); diff --git a/tools/inc/tools/fldunit.hxx b/tools/inc/tools/fldunit.hxx index 60e662e9c7a5..d98cb69185a0 100644 --- a/tools/inc/tools/fldunit.hxx +++ b/tools/inc/tools/fldunit.hxx @@ -33,7 +33,6 @@ // - FieldTypes - // -------------- -// By changes you must also change: rsc/vclrsc.hxx enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM, FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA, FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CHAR, FUNIT_LINE, FUNIT_CUSTOM, diff --git a/tools/inc/tools/fontenum.hxx b/tools/inc/tools/fontenum.hxx index d514f2b1c23c..849bb2720e5c 100644 --- a/tools/inc/tools/fontenum.hxx +++ b/tools/inc/tools/fontenum.hxx @@ -128,7 +128,7 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE, #ifndef ENUM_FONTEMPHASISMARK_DECLARED #define ENUM_FONTEMPHASISMARK_DECLARED -typedef USHORT FontEmphasisMark; +typedef sal_uInt16 FontEmphasisMark; #define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000) #define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001) #define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002) diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx index 0142de053602..b0854f58daa5 100644 --- a/tools/inc/tools/fsys.hxx +++ b/tools/inc/tools/fsys.hxx @@ -148,7 +148,7 @@ typedef int FSysAction; #define RFS_LOWER "-rfs-" #define RFS_UPPER "-RFS-" -typedef ULONG FSysError; +typedef sal_uIntPtr FSysError; // FSysExact enum FSysExact @@ -161,21 +161,10 @@ enum FSysExact // - Char-Set - // ------------ -#if defined(WIN) || defined(W30) - -// MS-Windows has different char-sets for file-system and user-interface -String Gui2FSys( const String& rStr ); -String FSys2Gui( const String& rStr ); -#define GUI2FSYS(s) Gui2FSys( s ) -#define FSYS2GUI(s) FSys2Gui( s ) - -#else - -// all other OS have the same char-set for both +// Was different for WIN, no longer needed... #define GUI2FSYS(s) s #define FSYS2GUI(s) s -#endif // ------------ // - FileStat - @@ -189,9 +178,9 @@ class TOOLS_DLLPUBLIC FileStat friend struct DirReader_Impl; friend void ImpInitFileStat( FileStat&, dirent* ); - ULONG nError; + sal_uIntPtr nError; DirEntryKind nKindFlags; - ULONG nSize; + sal_uIntPtr nSize; String aCreator; String aType; Date aDateCreated; @@ -212,16 +201,16 @@ public: FileStat(); FileStat( const DirEntry& rDirEntry, FSysAccess nAccess = FSYS_ACCESS_FLOPPY ); - BOOL Update( const DirEntry& rDirEntry, - BOOL bForceAccess = TRUE ); + sal_Bool Update( const DirEntry& rDirEntry, + sal_Bool bForceAccess = sal_True ); - ULONG GetError() const { return ERRCODE_TOERROR(nError); } - ULONG GetErrorCode() const { return nError; } + sal_uIntPtr GetError() const { return ERRCODE_TOERROR(nError); } + sal_uIntPtr GetErrorCode() const { return nError; } - ULONG GetSize() const { return nSize; } + sal_uIntPtr GetSize() const { return nSize; } DirEntryKind GetKind() const { return nKindFlags; } - BOOL IsKind( DirEntryKind nKind ) const; + sal_Bool IsKind( DirEntryKind nKind ) const; String GetType() const { return aType; } String GetCreator() const { return aCreator; } @@ -232,12 +221,12 @@ public: Time TimeModified() const { return aTimeModified; } Date DateAccessed() const { return aDateAccessed; } Time TimeAccessed() const { return aTimeAccessed; } - BOOL IsYounger( const FileStat& rIsOlder ) const; + sal_Bool IsYounger( const FileStat& rIsOlder ) const; #define TF_FSYS_READONLY_FLAG - static ULONG SetReadOnlyFlag( const DirEntry &rEntry, BOOL bRO = TRUE ); - static BOOL GetReadOnlyFlag( const DirEntry &rEntry ); - static BOOL HasReadOnlyFlag(); + static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True ); + static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry ); + static sal_Bool HasReadOnlyFlag(); static ErrCode QueryDiskSpace( const String &rPath, BigInt &rFreeBytes, BigInt &rTotalBytes ); @@ -264,7 +253,7 @@ friend class FileCopier; #endif ByteString aName; DirEntry* pParent; - ULONG nError; + sal_uIntPtr nError; DirEntryFlag eFlag; private: @@ -284,13 +273,13 @@ private: FSysPathStyle eStyle ); TOOLS_DLLPRIVATE const DirEntry* ImpGetTopPtr() const; TOOLS_DLLPRIVATE DirEntry* ImpGetTopPtr(); - TOOLS_DLLPRIVATE BOOL ImpToRel( String aStart ); + TOOLS_DLLPRIVATE sal_Bool ImpToRel( String aStart ); protected: void ImpTrim( FSysPathStyle eStyle ); const ByteString& ImpTheName() const; DirEntryFlag ImpTheFlag() const { return eFlag; }; - DirEntry* ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize = TRUE ); + DirEntry* ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize = sal_True ); DirEntry* ImpGetParent() { return pParent; } #ifdef FEAT_FSYS_DOUBLESPEED FileStat* ImpGetStat() const { return pStat; } @@ -298,7 +287,7 @@ protected: #endif protected: - void SetError( ULONG nErr ) { nError = nErr; } + void SetError( sal_uIntPtr nErr ) { nError = nErr; } DirEntry* GetParent() { return pParent; } public: DirEntry( DirEntryFlag aDirFlag = FSYS_FLAG_CURRENT ); @@ -309,11 +298,11 @@ public: FSysPathStyle eParser = FSYS_STYLE_HOST ); ~DirEntry(); - BOOL IsLongNameOnFAT() const; - BOOL IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const; + sal_Bool IsLongNameOnFAT() const; + sal_Bool IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const; - ULONG GetError() const { return nError; } - BOOL IsValid() const; + sal_uIntPtr GetError() const { return nError; } + sal_Bool IsValid() const; DirEntryFlag GetFlag() const { return eFlag; }; void SetExtension( const String& rExt, char cSep = '.' ); @@ -329,31 +318,31 @@ public: DirEntry GetDevice() const; String GetVolume() const; String GetFull( FSysPathStyle eFormatter = FSYS_STYLE_HOST, - BOOL bWithDelimiter = FALSE, - USHORT nMaxChars = STRING_MAXLEN ) const; + sal_Bool bWithDelimiter = sal_False, + sal_uInt16 nMaxChars = STRING_MAXLEN ) const; DirEntry TempName( DirEntryKind = FSYS_KIND_NONE ) const; static const DirEntry& SetTempNameBase( const String &rBaseName ); - BOOL MakeShortName( const String& rLongName, + sal_Bool MakeShortName( const String& rLongName, DirEntryKind eCreateKind = FSYS_KIND_NONE, - BOOL bUseTilde = TRUE, + sal_Bool bUseTilde = sal_True, FSysPathStyle eStyle = FSYS_STYLE_DETECT ); bool IsAbs() const; - BOOL ToAbs(); - BOOL Find( const String& rPfad, char cDelim = 0 ); - BOOL ToRel(); - BOOL ToRel( const DirEntry& rRefDir ); - USHORT CutRelParents(); + sal_Bool ToAbs(); + sal_Bool Find( const String& rPfad, char cDelim = 0 ); + sal_Bool ToRel(); + sal_Bool ToRel( const DirEntry& rRefDir ); + sal_uInt16 CutRelParents(); - BOOL SetCWD( BOOL bSloppy = FALSE ) const; - BOOL MakeDir( BOOL bSloppy = FALSE ) const; - BOOL Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const; - BOOL First(); + sal_Bool SetCWD( sal_Bool bSloppy = sal_False ) const; + sal_Bool MakeDir( sal_Bool bSloppy = sal_False ) const; + sal_Bool Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const; + sal_Bool First(); - USHORT Level() const; - const DirEntry& operator []( USHORT nParentLevel ) const; - BOOL Contains( const DirEntry &rSubEntry ) const; + sal_uInt16 Level() const; + const DirEntry& operator []( sal_uInt16 nParentLevel ) const; + sal_Bool Contains( const DirEntry &rSubEntry ) const; FSysError CopyTo( const DirEntry& rDestDir, FSysAction nActions = FSYS_ACTION_STANDARD ) const; @@ -363,8 +352,8 @@ public: DirEntry& operator =( const DirEntry& rOrigDir ); DirEntry operator +( const DirEntry& rSubDir ) const; DirEntry& operator +=( const DirEntry& rSubDir ); - BOOL operator ==( const DirEntry& rAnotherDir ) const; - BOOL operator !=( const DirEntry& rAnotherDir ) const + sal_Bool operator ==( const DirEntry& rAnotherDir ) const; + sal_Bool operator !=( const DirEntry& rAnotherDir ) const { return !(DirEntry::operator==( rAnotherDir )); } StringCompare NameCompare( const DirEntry &rWith ) const; @@ -379,11 +368,11 @@ public: static String GetAccessDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); static String GetSearchDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); - static USHORT GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); + static sal_uInt16 GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); static FSysPathStyle GetPathStyle( const String &rDevice ); static String ConvertNameToSystem( const String & rName ); static String ConvertSystemToName( const String & rName ); - static BOOL IsRFSAvailable(); + static sal_Bool IsRFSAvailable(); }; // -------------- @@ -394,10 +383,10 @@ class TOOLS_DLLPUBLIC FileCopier { DirEntry aSource; DirEntry aTarget; - ULONG nBytesTotal; - ULONG nBytesCopied; + sal_uIntPtr nBytesTotal; + sal_uIntPtr nBytesCopied; Link aProgressLink; - USHORT nBlockSize; + sal_uInt16 nBlockSize; FileCopier_Impl* pImp; private: @@ -405,7 +394,7 @@ private: const DirEntry &rSource, const DirEntry &rTarget ); protected: - virtual BOOL Progress(); + virtual sal_Bool Progress(); virtual ErrCode Error( ErrCode eErr, const DirEntry *pSource, const DirEntry *pTarget ); @@ -418,11 +407,11 @@ public: FileCopier& operator = ( const FileCopier &rCopier ); - void SetBlockSize( USHORT nBytes ) { nBlockSize = nBytes; } - USHORT GetBlockSize() const { return nBlockSize; } + void SetBlockSize( sal_uInt16 nBytes ) { nBlockSize = nBytes; } + sal_uInt16 GetBlockSize() const { return nBlockSize; } - ULONG GetBytesTotal() const { return nBytesTotal; } - ULONG GetBytesCopied() const { return nBytesCopied; } + sal_uIntPtr GetBytesTotal() const { return nBytesTotal; } + sal_uIntPtr GetBytesCopied() const { return nBytesCopied; } void SetSource( const DirEntry &rSource ) { aSource = rSource; } void SetTarget( const DirEntry &rTarget ) { aTarget = rTarget; } @@ -471,7 +460,7 @@ private: #ifndef _TOOLS_HXX protected: - BOOL ImpInsertPointReached( const DirEntry& rIsSmaller, + sal_Bool ImpInsertPointReached( const DirEntry& rIsSmaller, const FileStat& rNewStat, size_t nCurPos, size_t nSortIndex ) const; @@ -493,9 +482,9 @@ public: FSysError SetSort( FSysSort nSort, ... ); void Reset(); - USHORT Scan( USHORT nCount = 5 ); - size_t Count( BOOL bUpdated = TRUE ) const; - BOOL Update(); + sal_uInt16 Scan( sal_uInt16 nCount = 5 ); + size_t Count( sal_Bool bUpdated = sal_True ) const; + sal_Bool Update(); Dir& operator +=( const Dir& rDir ); DirEntry& operator []( size_t nIndex ) const; @@ -516,7 +505,7 @@ public: class FSysRedirector { static FSysRedirector* _pRedirector; - static BOOL _bEnabled; + static sal_Bool _bEnabled; public: /** This method must called with the one and only instance of the @@ -548,9 +537,9 @@ public: redirected (modified) path too, which can be of both formats too. - @return BOOL<BR> - TRUE, if the path is redirected - FALSE, if the path is not redirected (unchanged) + @return sal_Bool<BR> + sal_True, if the path is redirected + sal_False, if the path is not redirected (unchanged) */ static void DoRedirect( String &rPath ); }; @@ -559,7 +548,7 @@ public: //======================================================================== -void FSysEnableSysErrorBox( BOOL bEnable ); +void FSysEnableSysErrorBox( sal_Bool bEnable ); //======================================================================== diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index c4fec945e51a..6bb133d8c32e 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -85,8 +85,8 @@ public: long& A() { return nA; } long& B() { return nB; } - BOOL operator == ( const Pair& rPair ) const; - BOOL operator != ( const Pair& rPair ) const; + sal_Bool operator == ( const Pair& rPair ) const; + sal_Bool operator != ( const Pair& rPair ) const; TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Pair& rPair ); TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Pair& rPair ); @@ -103,12 +103,12 @@ inline Pair::Pair( long _nA, long _nB ) Pair::nB = _nB; } -inline BOOL Pair::operator == ( const Pair& rPair ) const +inline sal_Bool Pair::operator == ( const Pair& rPair ) const { return ((nA == rPair.nA) && (nB == rPair.nB)); } -inline BOOL Pair::operator != ( const Pair& rPair ) const +inline sal_Bool Pair::operator != ( const Pair& rPair ) const { return ((nA != rPair.nA) || (nB != rPair.nB)); } @@ -130,10 +130,10 @@ public: long& Y() { return nB; } void Move( long nHorzMove, long nVertMove ); - BOOL IsAbove( const Point& rPoint ) const; - BOOL IsBelow( const Point& rPoint ) const; - BOOL IsLeft( const Point& rPoint ) const; - BOOL IsRight( const Point& rPoint ) const; + sal_Bool IsAbove( const Point& rPoint ) const; + sal_Bool IsBelow( const Point& rPoint ) const; + sal_Bool IsLeft( const Point& rPoint ) const; + sal_Bool IsRight( const Point& rPoint ) const; Point& operator += ( const Point& rPoint ); Point& operator -= ( const Point& rPoint ); @@ -172,22 +172,22 @@ inline void Point::Move( long nHorzMove, long nVertMove ) nB += nVertMove; } -inline BOOL Point::IsAbove( const Point& rPoint ) const +inline sal_Bool Point::IsAbove( const Point& rPoint ) const { return (nB > rPoint.nB); } -inline BOOL Point::IsBelow( const Point& rPoint ) const +inline sal_Bool Point::IsBelow( const Point& rPoint ) const { return (nB < rPoint.nB); } -inline BOOL Point::IsLeft( const Point& rPoint ) const +inline sal_Bool Point::IsLeft( const Point& rPoint ) const { return (nA < rPoint.nA); } -inline BOOL Point::IsRight( const Point& rPoint ) const +inline sal_Bool Point::IsRight( const Point& rPoint ) const { return (nA > rPoint.nA); } @@ -291,7 +291,7 @@ public: long& Min() { return nA; } long& Max() { return nB; } - BOOL IsInside( long nIs ) const; + sal_Bool IsInside( long nIs ) const; void Justify(); }; @@ -304,7 +304,7 @@ inline Range::Range( long nMin, long nMax ) : Pair( nMin, nMax ) { } -inline BOOL Range::IsInside( long nIs ) const +inline sal_Bool Range::IsInside( long nIs ) const { return ((nA <= nIs) && (nIs <= nB )); } @@ -340,11 +340,11 @@ public: long& Min() { return nA; } long& Max() { return nB; } - BOOL IsInside( long nIs ) const; + sal_Bool IsInside( long nIs ) const; void Justify(); - BOOL operator !() const { return !Len(); } + sal_Bool operator !() const { return !Len(); } long getMin() const { return Min(); } long getMax() const { return Max(); } @@ -365,7 +365,7 @@ inline Selection::Selection( long nMin, long nMax ) : { } -inline BOOL Selection::IsInside( long nIs ) const +inline sal_Bool Selection::IsInside( long nIs ) const { return ((nA <= nIs) && (nIs < nB )); } @@ -436,15 +436,15 @@ public: void Justify(); - BOOL IsInside( const Point& rPOINT ) const; - BOOL IsInside( const Rectangle& rRect ) const; - BOOL IsOver( const Rectangle& rRect ) const; + sal_Bool IsInside( const Point& rPOINT ) const; + sal_Bool IsInside( const Rectangle& rRect ) const; + sal_Bool IsOver( const Rectangle& rRect ) const; void SetEmpty() { nRight = nBottom = RECT_EMPTY; } - BOOL IsEmpty() const; + sal_Bool IsEmpty() const; - BOOL operator == ( const Rectangle& rRect ) const; - BOOL operator != ( const Rectangle& rRect ) const; + sal_Bool operator == ( const Rectangle& rRect ) const; + sal_Bool operator != ( const Rectangle& rRect ) const; Rectangle& operator += ( const Point& rPt ); Rectangle& operator -= ( const Point& rPt ); @@ -502,7 +502,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& rSize ) nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY; } -inline BOOL Rectangle::IsEmpty() const +inline sal_Bool Rectangle::IsEmpty() const { return ((nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY)); } @@ -655,7 +655,7 @@ inline Rectangle Rectangle::GetIntersection( const Rectangle& rRect ) const return aTmpRect.Intersection( rRect ); } -inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const +inline sal_Bool Rectangle::operator == ( const Rectangle& rRect ) const { return ((nLeft == rRect.nLeft ) && (nTop == rRect.nTop ) && @@ -663,7 +663,7 @@ inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const (nBottom == rRect.nBottom )); } -inline BOOL Rectangle::operator != ( const Rectangle& rRect ) const +inline sal_Bool Rectangle::operator != ( const Rectangle& rRect ) const { return ((nLeft != rRect.nLeft ) || (nTop != rRect.nTop ) || diff --git a/tools/inc/tools/geninfo.hxx b/tools/inc/tools/geninfo.hxx index 97a6b963cdb0..9501ac771a83 100644 --- a/tools/inc/tools/geninfo.hxx +++ b/tools/inc/tools/geninfo.hxx @@ -63,7 +63,7 @@ public: GenericInformation( const ByteString &rKey, const ByteString &rValue, GenericInformationList *pParentList = NULL, GenericInformationList *pSubInfos = NULL ); - GenericInformation( const GenericInformation& rInf, BOOL bCopySubs = TRUE); + GenericInformation( const GenericInformation& rInf, sal_Bool bCopySubs = sal_True); ~GenericInformation(); @@ -74,18 +74,18 @@ public: void SetComment( const ByteString &rComment ) { sComment = rComment; } // this methods used to handle sub informations - BOOL InsertSubInfo( GenericInformation *pInfo ); + sal_Bool InsertSubInfo( GenericInformation *pInfo ); // siehe GenericInformationList - BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, - BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE); - void RemoveSubInfo( GenericInformation *pInfo, BOOL bDelete = FALSE ); - // void RemoveSelf( BOOL bDelete = FALSE ); // loescht sich selbst aus der Parentliste + sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, + sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False); + void RemoveSubInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False ); + // void RemoveSelf( sal_Bool bDelete = sal_False ); // loescht sich selbst aus der Parentliste // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // bei bDelete = TRUE werden auch alle Sublisten UND DIE INFO SELBST geloescht. + // bei bDelete = sal_True werden auch alle Sublisten UND DIE INFO SELBST geloescht. // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE, - BOOL bCreatePath = FALSE ); + GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False, + sal_Bool bCreatePath = sal_False ); // path can be something like this: src370/drives/o: void SetSubList( GenericInformationList *pSubList ) @@ -133,43 +133,43 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue, /* der Schreibschutz darf nur aktiviert werden, wenn * der Status auf Lesen steht */ - BOOL SetWriteLock(UINT32 nKey = 0) { return ((read==aLockState) && - (aLockState=writeonly, nLockKey=nKey, TRUE)); } + sal_Bool SetWriteLock(sal_uInt32 nKey = 0) { return ((read==aLockState) && + (aLockState=writeonly, nLockKey=nKey, sal_True)); } /* Schreibschutz darf nur geloest werden, wenn * der Schreibschutz drin ist, und * entweder der LockKey Null ist(Generalschluessel) oder der Key zum LockKey passt */ - BOOL ReleaseWriteLock(UINT32 nKey = 0) { return ((writeonly==aLockState) && + sal_Bool ReleaseWriteLock(sal_uInt32 nKey = 0) { return ((writeonly==aLockState) && (!nLockKey||nKey==nLockKey) && - (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read" - BOOL SetReadLock(UINT32 nKey = 0) { return ((read==aLockState) && - (aLockState=readonly, nLockKey=nKey, TRUE)); } - BOOL ReleaseReadLock(UINT32 nKey = 0) { return ((readonly==aLockState) && + (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read" + sal_Bool SetReadLock(sal_uInt32 nKey = 0) { return ((read==aLockState) && + (aLockState=readonly, nLockKey=nKey, sal_True)); } + sal_Bool ReleaseReadLock(sal_uInt32 nKey = 0) { return ((readonly==aLockState) && (!nLockKey||nKey==nLockKey) && - (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read" + (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read" LockState GetLockState() const { return aLockState; } - BOOL IsWriteLocked() const { return (writeonly==aLockState); } - BOOL IsReadLocked() const { return (readonly==aLockState); } - BOOL IsNotLocked() const { return (read==aLockState); } - BOOL IsLocker( UINT32 nKey ) { return (nKey==nLockKey || !nLockKey); } + sal_Bool IsWriteLocked() const { return (writeonly==aLockState); } + sal_Bool IsReadLocked() const { return (readonly==aLockState); } + sal_Bool IsNotLocked() const { return (read==aLockState); } + sal_Bool IsLocker( sal_uInt32 nKey ) { return (nKey==nLockKey || !nLockKey); } /* wenn der Schreibschutz aktiviert wurde, * und bei vorhandenem Schreibschutz die Keys stimmen * rufe die Parentmethode auf */ - BOOL InsertSubInfo( GenericInformation *pInfo, UINT32 nKey = 0 ) { + sal_Bool InsertSubInfo( GenericInformation *pInfo, sal_uInt32 nKey = 0 ) { return ((writeonly==aLockState) && (!nLockKey || nKey==nLockKey) && - (GenericInformation::InsertSubInfo( pInfo ), TRUE)); } + (GenericInformation::InsertSubInfo( pInfo ), sal_True)); } - BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, UINT32 nKey = 0, - BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE) { + sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, sal_uInt32 nKey = 0, + sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False) { return ((writeonly==aLockState) && (!nLockKey || nKey==nLockKey) && - (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), TRUE)); } + (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), sal_True)); } /* 29.jan.98: erweiterung um lesemoeglichkeit vom Lockclienten */ - GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE, - BOOL bCreatePath = FALSE, UINT32 nKey = 0 ) { + GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False, + sal_Bool bCreatePath = sal_False, sal_uInt32 nKey = 0 ) { if (writeonly==aLockState && nLockKey && nKey!=nLockKey ) return NULL; return GenericInformation::GetSubInfo(rKey, bSearchByPath, bCreatePath); } @@ -178,7 +178,7 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue, private: LockState aLockState; - UINT32 nLockKey; + sal_uInt32 nLockKey; }; // @@ -199,7 +199,7 @@ private: protected: // methods - size_t InsertSorted( GenericInformation *pInfo, BOOL bOverwrite, + size_t InsertSorted( GenericInformation *pInfo, sal_Bool bOverwrite, size_t nStart, size_t nEnd ); GenericInformation *Search( size_t &rPos, ByteString sKey, size_t nStart, size_t nEnd ); @@ -210,20 +210,19 @@ public: ~GenericInformationList(); // this methods used to handle the informations using binary search - GenericInformation *GetInfo( ByteString &rKey, BOOL bSearchByPath = FALSE, - BOOL bCreatePath = FALSE ); + GenericInformation *GetInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False, + sal_Bool bCreatePath = sal_False ); /* path can be something like this: src370/drives/o: * bCreatePath will create the neccecary paths to the GI */ - BOOL InsertInfo( GenericInformation *pInfo, BOOL bOverwrite = TRUE ); + sal_Bool InsertInfo( GenericInformation *pInfo, sal_Bool bOverwrite = sal_True ); /* legt eine GenericInformation im Baum an mit Key-Value * wenn bNewPath gesetzt, wird der nichtexistente Teil des Pfades neu kreiert * wenn bNewPath nicht gesetzt ist und ein Teil des Pfades nicht vorhanden ist, - * gibt die Methode FALSE zurueck.*/ - BOOL InsertInfo( const ByteString &rPathKey, const ByteString &rValue, - BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE); - - void RemoveInfo( GenericInformation *pInfo, BOOL bDelete = FALSE ); + * gibt die Methode sal_False zurueck.*/ + sal_Bool InsertInfo( const ByteString &rPathKey, const ByteString &rValue, + sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False); + void RemoveInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False ); GenericInformation* SetOwner( GenericInformation *pNewOwner ); diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx index cbca2169b518..552b702c4084 100644..100755 --- a/tools/inc/tools/globname.hxx +++ b/tools/inc/tools/globname.hxx @@ -38,8 +38,8 @@ *************************************************************************/ struct ImpSvGlobalName { - BYTE szData[ 16 ]; - USHORT nRefCount; + sal_uInt8 szData[ 16 ]; + sal_uInt16 nRefCount; ImpSvGlobalName() { @@ -48,7 +48,7 @@ struct ImpSvGlobalName ImpSvGlobalName( const ImpSvGlobalName & rObj ); ImpSvGlobalName( int ); - BOOL operator == ( const ImpSvGlobalName & rObj ) const; + sal_Bool operator == ( const ImpSvGlobalName & rObj ) const; }; #ifdef WNT @@ -77,9 +77,9 @@ public: pImp = pImpP; pImp->nRefCount++; } - SvGlobalName( UINT32 n1, USHORT n2, USHORT n3, - BYTE b8, BYTE b9, BYTE b10, BYTE b11, - BYTE b12, BYTE b13, BYTE b14, BYTE b15 ); + SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, + sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, + sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 ); // create SvGlobalName from a platform independent representation SvGlobalName( const ::com::sun::star::uno::Sequence< sal_Int8 >& aSeq ); @@ -90,16 +90,16 @@ public: TOOLS_DLLPUBLIC friend SvStream & operator >> ( SvStream &, SvGlobalName & ); TOOLS_DLLPUBLIC friend SvStream & operator << ( SvStream &, const SvGlobalName & ); - BOOL operator < ( const SvGlobalName & rObj ) const; - SvGlobalName & operator += ( UINT32 ); + sal_Bool operator < ( const SvGlobalName & rObj ) const; + SvGlobalName & operator += ( sal_uInt32 ); SvGlobalName & operator ++ () { return operator += ( 1 ); } - BOOL operator == ( const SvGlobalName & rObj ) const; - BOOL operator != ( const SvGlobalName & rObj ) const + sal_Bool operator == ( const SvGlobalName & rObj ) const; + sal_Bool operator != ( const SvGlobalName & rObj ) const { return !(*this == rObj); } void MakeFromMemory( void * pData ); - BOOL MakeId( const String & rId ); + sal_Bool MakeId( const String & rId ); String GetctorName() const; String GetHexName() const; String GetRegDbName() const @@ -112,7 +112,7 @@ public: SvGlobalName( const CLSID & rId ); const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; } - const BYTE* GetBytes() const { return pImp->szData; } + const sal_uInt8* GetBytes() const { return pImp->szData; } // platform independent representation of a "GlobalName" // maybe transported remotely @@ -127,9 +127,9 @@ public: ~SvGlobalNameList(); void Append( const SvGlobalName & ); - SvGlobalName GetObject( ULONG ); - BOOL IsEntry( const SvGlobalName & rName ); - ULONG Count() const { return aList.size(); } + SvGlobalName GetObject( sal_uLong ); + sal_Bool IsEntry( const SvGlobalName & rName ); + size_t Count() const { return aList.size(); } private: // nicht erlaubt SvGlobalNameList( const SvGlobalNameList & ); diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx index f02a487987ea..4c07917ebf1c 100644..100755 --- a/tools/inc/tools/inetmime.hxx +++ b/tools/inc/tools/inetmime.hxx @@ -1425,7 +1425,7 @@ public: void Clear(); - void Insert(INetContentTypeParameter * pParameter, ULONG nIndex) + void Insert(INetContentTypeParameter * pParameter, sal_uIntPtr nIndex) { maEntries.insert(maEntries.begin()+nIndex,pParameter); } @@ -1435,7 +1435,7 @@ public: maEntries.push_back(pParameter); } - inline const INetContentTypeParameter * GetObject(ULONG nIndex) const + inline const INetContentTypeParameter * GetObject(sal_uIntPtr nIndex) const { return &(maEntries[nIndex]); } diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx index 63af8114ddf8..c22e63208781 100644 --- a/tools/inc/tools/inetmsg.hxx +++ b/tools/inc/tools/inetmsg.hxx @@ -112,7 +112,7 @@ class INetMessage { List m_aHeaderList; - ULONG m_nDocSize; + sal_uIntPtr m_nDocSize; UniString m_aDocName; SvLockBytesRef m_xDocLB; @@ -121,7 +121,7 @@ class INetMessage protected: UniString GetHeaderName_Impl ( - ULONG nIndex, rtl_TextEncoding eEncoding) const + sal_uIntPtr nIndex, rtl_TextEncoding eEncoding) const { INetMessageHeader *p = (INetMessageHeader*)(m_aHeaderList.GetObject(nIndex)); @@ -132,7 +132,7 @@ protected: } UniString GetHeaderValue_Impl ( - ULONG nIndex, INetMIME::HeaderFieldType eType) const + sal_uIntPtr nIndex, INetMIME::HeaderFieldType eType) const { INetMessageHeader *p = (INetMessageHeader*)(m_aHeaderList.GetObject(nIndex)); @@ -143,7 +143,7 @@ protected: } void SetHeaderField_Impl ( - const INetMessageHeader &rHeader, ULONG &rnIndex) + const INetMessageHeader &rHeader, sal_uIntPtr &rnIndex) { INetMessageHeader *p = new INetMessageHeader (rHeader); if (m_aHeaderList.Count() <= rnIndex) @@ -162,7 +162,7 @@ protected: INetMIME::HeaderFieldType eType, const ByteString &rName, const UniString &rValue, - ULONG &rnIndex); + sal_uIntPtr &rnIndex); virtual SvStream& operator<< (SvStream& rStrm) const; virtual SvStream& operator>> (SvStream& rStrm); @@ -188,19 +188,19 @@ public: return *this; } - ULONG GetHeaderCount (void) const { return m_aHeaderList.Count(); } + sal_uIntPtr GetHeaderCount (void) const { return m_aHeaderList.Count(); } - UniString GetHeaderName (ULONG nIndex) const + UniString GetHeaderName (sal_uIntPtr nIndex) const { return GetHeaderName_Impl (nIndex, RTL_TEXTENCODING_ASCII_US); } - UniString GetHeaderValue (ULONG nIndex) const + UniString GetHeaderValue (sal_uIntPtr nIndex) const { return GetHeaderValue_Impl (nIndex, INetMIME::HEADER_FIELD_TEXT); } - INetMessageHeader GetHeaderField (ULONG nIndex) const + INetMessageHeader GetHeaderField (sal_uIntPtr nIndex) const { INetMessageHeader *p = (INetMessageHeader*)(m_aHeaderList.GetObject(nIndex)); @@ -210,16 +210,16 @@ public: return INetMessageHeader(); } - ULONG SetHeaderField ( + sal_uIntPtr SetHeaderField ( const UniString& rName, const UniString& rValue, - ULONG nIndex = LIST_APPEND); + sal_uIntPtr nIndex = LIST_APPEND); - virtual ULONG SetHeaderField ( - const INetMessageHeader &rField, ULONG nIndex = LIST_APPEND); + virtual sal_uIntPtr SetHeaderField ( + const INetMessageHeader &rField, sal_uIntPtr nIndex = LIST_APPEND); - ULONG GetDocumentSize (void) const { return m_nDocSize; } - void SetDocumentSize (ULONG nSize) { m_nDocSize = nSize; } + sal_uIntPtr GetDocumentSize (void) const { return m_nDocSize; } + void SetDocumentSize (sal_uIntPtr nSize) { m_nDocSize = nSize; } const UniString& GetDocumentName (void) const { return m_aDocName; } void SetDocumentName (const UniString& rName) { m_aDocName = rName; } @@ -247,7 +247,7 @@ public: *=====================================================================*/ class INetMessageHeaderIterator { - ULONG nValueCount; + sal_uIntPtr nValueCount; List aValueList; UniString aEmptyString; @@ -256,8 +256,8 @@ public: const INetMessage& rMsg, const UniString& rHdrName); virtual ~INetMessageHeaderIterator (void); - ULONG GetValueCount (void) const { return nValueCount; } - const UniString& GetValue (ULONG nIndex) const + sal_uIntPtr GetValueCount (void) const { return nValueCount; } + const UniString& GetValue (sal_uIntPtr nIndex) const { if (nIndex < nValueCount) { @@ -297,7 +297,7 @@ public: class TOOLS_DLLPUBLIC INetRFC822Message : public INetMessage { - ULONG m_nIndex[INETMSG_RFC822_NUMHDR]; + sal_uIntPtr m_nIndex[INETMSG_RFC822_NUMHDR]; protected: virtual SvStream& operator<< (SvStream& rStrm) const; @@ -310,14 +310,14 @@ public: INetRFC822Message& operator= (const INetRFC822Message& rMsg); - static BOOL GenerateDateField ( + static sal_Bool GenerateDateField ( const DateTime& rDateTime, UniString& rDateField); - static BOOL ParseDateField ( + static sal_Bool ParseDateField ( const UniString& rDateField, DateTime& rDateTime); using INetMessage::SetHeaderField; - virtual ULONG SetHeaderField ( - const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND); + virtual sal_uIntPtr SetHeaderField ( + const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND); /** Header fields. */ @@ -491,23 +491,23 @@ enum INetMessageContainerType class TOOLS_DLLPUBLIC INetMIMEMessage : public INetRFC822Message { - ULONG m_nIndex[INETMSG_MIME_NUMHDR]; + sal_uIntPtr m_nIndex[INETMSG_MIME_NUMHDR]; INetMIMEMessage *pParent; - ULONG nNumChildren; + sal_uIntPtr nNumChildren; List aChildren; ByteString m_aBoundary; - BOOL bHeaderParsed; + sal_Bool bHeaderParsed; friend class INetMIMEMessageStream; - void SetChildCount (ULONG nCount) { nNumChildren = nCount; } + void SetChildCount (sal_uIntPtr nCount) { nNumChildren = nCount; } const ByteString& GetMultipartBoundary (void) const { return m_aBoundary; } void SetMultipartBoundary (const ByteString& rBnd) { m_aBoundary = rBnd; } void CleanupImp (void); void CopyImp (const INetMIMEMessage& rMsg); - void SetHeaderParsed() { bHeaderParsed = TRUE; } + void SetHeaderParsed() { bHeaderParsed = sal_True; } protected: virtual SvStream& operator<< (SvStream& rStrm) const; @@ -520,14 +520,14 @@ public: INetMIMEMessage& operator= (const INetMIMEMessage& rMsg); - BOOL HeaderParsed() const { return bHeaderParsed; } + sal_Bool HeaderParsed() const { return bHeaderParsed; } virtual INetMIMEMessage* CreateMessage ( const INetMIMEMessage& rMsg) const; using INetRFC822Message::SetHeaderField; - virtual ULONG SetHeaderField ( - const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND); + virtual sal_uIntPtr SetHeaderField ( + const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND); /** Header fields. */ @@ -571,34 +571,34 @@ public: /** Message container methods. */ - BOOL IsContainer (void) const + sal_Bool IsContainer (void) const { return (IsMessage() || IsMultipart()); } - BOOL IsMessage (void) const + sal_Bool IsMessage (void) const { UniString aType (GetContentType()); return (aType.CompareIgnoreCaseToAscii("message/", 8) == 0); } - BOOL IsMultipart (void) const + sal_Bool IsMultipart (void) const { UniString aType (GetContentType()); return (aType.CompareIgnoreCaseToAscii("multipart/", 10) == 0); } - ULONG GetChildCount (void) const { return nNumChildren; } - INetMIMEMessage* GetChild (ULONG nIndex) const + sal_uIntPtr GetChildCount (void) const { return nNumChildren; } + INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const { return ((INetMIMEMessage *)(aChildren.GetObject (nIndex))); } INetMIMEMessage* GetParent (void) const { return pParent; } - BOOL EnableAttachChild ( + sal_Bool EnableAttachChild ( INetMessageContainerType eType = INETMSG_MULTIPART_MIXED); - BOOL AttachChild ( - INetMIMEMessage& rChildMsg, BOOL bOwner = TRUE); - BOOL DetachChild ( - ULONG nIndex, INetMIMEMessage& rChildMsg) const; + sal_Bool AttachChild ( + INetMIMEMessage& rChildMsg, sal_Bool bOwner = sal_True); + sal_Bool DetachChild ( + sal_uIntPtr nIndex, INetMIMEMessage& rChildMsg) const; /** Stream operators. */ diff --git a/tools/inc/tools/inetstrm.hxx b/tools/inc/tools/inetstrm.hxx index 91fb416e1544..16de7beedd98 100644 --- a/tools/inc/tools/inetstrm.hxx +++ b/tools/inc/tools/inetstrm.hxx @@ -61,13 +61,13 @@ class TOOLS_DLLPUBLIC INetIStream INetIStream& operator= (const INetIStream& rStrm); protected: - virtual int GetData (sal_Char *pData, ULONG nSize) = 0; + virtual int GetData (sal_Char *pData, sal_uIntPtr nSize) = 0; public: INetIStream (); virtual ~INetIStream (void); - int Read (sal_Char *pData, ULONG nSize); + int Read (sal_Char *pData, sal_uIntPtr nSize); static void Decode64 (SvStream& rIn, SvStream& rOut); static void Encode64 (SvStream& rIn, SvStream& rOut); @@ -84,13 +84,13 @@ class INetOStream protected: virtual int PutData ( - const sal_Char *pData, ULONG nSize) = 0; + const sal_Char *pData, sal_uIntPtr nSize) = 0; public: INetOStream (); virtual ~INetOStream (void); - int Write (const sal_Char *pData, ULONG nSize); + int Write (const sal_Char *pData, sal_uIntPtr nSize); }; /* @@ -103,7 +103,7 @@ class INetIOStream : public INetIStream, public INetOStream INetIOStream& operator= (const INetIOStream& rStrm); public: - INetIOStream (ULONG nIBufferSize = 0, ULONG nOBufferSize = 0); + INetIOStream (sal_uIntPtr nIBufferSize = 0, sal_uIntPtr nOBufferSize = 0); virtual ~INetIOStream (void); }; @@ -129,9 +129,9 @@ enum INetMessageStreamState class INetMessageIStream : public INetIStream { INetMessage *pSourceMsg; - BOOL bHeaderGenerated; + sal_Bool bHeaderGenerated; - ULONG nBufSiz; + sal_uIntPtr nBufSiz; sal_Char *pBuffer; sal_Char *pRead; sal_Char *pWrite; @@ -141,24 +141,24 @@ class INetMessageIStream : public INetIStream sal_Char *pMsgRead; sal_Char *pMsgWrite; - virtual int GetData (sal_Char *pData, ULONG nSize); + virtual int GetData (sal_Char *pData, sal_uIntPtr nSize); // Not implemented. INetMessageIStream (const INetMessageIStream& rStrm); INetMessageIStream& operator= (const INetMessageIStream& rStrm); protected: - virtual int GetMsgLine (sal_Char *pData, ULONG nSize); + virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize); public: - INetMessageIStream (ULONG nBufferSize = 2048); + INetMessageIStream (sal_uIntPtr nBufferSize = 2048); virtual ~INetMessageIStream (void); INetMessage *GetSourceMessage (void) const { return pSourceMsg; } void SetSourceMessage (INetMessage *pMsg) { pSourceMsg = pMsg; } - void GenerateHeader (BOOL bGen = TRUE) { bHeaderGenerated = !bGen; } - BOOL IsHeaderGenerated (void) const { return bHeaderGenerated; } + void GenerateHeader (sal_Bool bGen = sal_True) { bHeaderGenerated = !bGen; } + sal_Bool IsHeaderGenerated (void) const { return bHeaderGenerated; } }; /* @@ -167,20 +167,20 @@ public: class INetMessageOStream : public INetOStream { INetMessage *pTargetMsg; - BOOL bHeaderParsed; + sal_Bool bHeaderParsed; INetMessageStreamState eOState; SvMemoryStream *pMsgBuffer; - virtual int PutData (const sal_Char *pData, ULONG nSize); + virtual int PutData (const sal_Char *pData, sal_uIntPtr nSize); // Not implemented. INetMessageOStream (const INetMessageOStream& rStrm); INetMessageOStream& operator= (const INetMessageOStream& rStrm); protected: - virtual int PutMsgLine (const sal_Char *pData, ULONG nSize); + virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize); public: INetMessageOStream (void); @@ -189,8 +189,8 @@ public: INetMessage *GetTargetMessage (void) const { return pTargetMsg; } void SetTargetMessage (INetMessage *pMsg) { pTargetMsg = pMsg; } - void ParseHeader (BOOL bParse = TRUE) { bHeaderParsed = !bParse; } - BOOL IsHeaderParsed (void) const { return bHeaderParsed; } + void ParseHeader (sal_Bool bParse = sal_True) { bHeaderParsed = !bParse; } + sal_Bool IsHeaderParsed (void) const { return bHeaderParsed; } }; /* @@ -205,7 +205,7 @@ class INetMessageIOStream INetMessageIOStream& operator= (const INetMessageIOStream& rStrm); public: - INetMessageIOStream (ULONG nBufferSize = 2048); + INetMessageIOStream (sal_uIntPtr nBufferSize = 2048); virtual ~INetMessageIOStream (void); }; @@ -227,7 +227,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream { int eState; - ULONG nChildIndex; + sal_uIntPtr nChildIndex; INetMIMEMessageStream *pChildStrm; INetMessageEncoding eEncoding; @@ -244,11 +244,11 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream INetMIMEMessageStream& operator= (const INetMIMEMessageStream& rStrm); protected: - virtual int GetMsgLine (sal_Char *pData, ULONG nSize); - virtual int PutMsgLine (const sal_Char *pData, ULONG nSize); + virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize); + virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize); public: - INetMIMEMessageStream (ULONG nBufferSize = 2048); + INetMIMEMessageStream (sal_uIntPtr nBufferSize = 2048); virtual ~INetMIMEMessageStream (void); using INetMessageIStream::SetSourceMessage; diff --git a/tools/inc/tools/iparser.hxx b/tools/inc/tools/iparser.hxx index 83f4e2530bae..23f0a1b68534 100644 --- a/tools/inc/tools/iparser.hxx +++ b/tools/inc/tools/iparser.hxx @@ -73,18 +73,18 @@ key [value] #define IP_NO_ERROR 0x0000 #define IP_UNEXPECTED_EOF 0x0001 -#define REPLACE_VARIABLES TRUE +#define REPLACE_VARIABLES sal_True class TOOLS_DLLPUBLIC InformationParser { private: - BOOL bRecover; + sal_Bool bRecover; ByteString sOldLine; ByteString sCurrentComment; - BOOL bReplaceVariables; // meaning %UPD and %VERSION - USHORT nLevel; + sal_Bool bReplaceVariables; // meaning %UPD and %VERSION + sal_uInt16 nLevel; ByteString sUPD; ByteString sVersion; @@ -92,10 +92,10 @@ private: SvStream *pActStream; UniString sStreamName; - USHORT nErrorCode; - ULONG nErrorLine; + sal_uInt16 nErrorCode; + sal_uIntPtr nErrorLine; ByteString sErrorText; - ULONG nActLine; + sal_uIntPtr nActLine; // methods TOOLS_DLLPRIVATE ByteString &ReadLine(); @@ -103,15 +103,15 @@ private: inline void Recover(); protected: - BOOL Save( SvStream &rOutStream, - const GenericInformationList *pSaveList, USHORT nLevel, BOOL bStripped ); + sal_Bool Save( SvStream &rOutStream, + const GenericInformationList *pSaveList, sal_uInt16 nLevel, sal_Bool bStripped ); GenericInformationList *Execute( SvStream &rSourceStream, GenericInformationList *pExistingList ); virtual void PrintStatus( ByteString &rStatus ) { if ( aStatusLink.IsSet()) aStatusLink.Call( &rStatus ); } public: - InformationParser( BOOL bReplace = FALSE ); + InformationParser( sal_Bool bReplace = sal_False ); virtual ~InformationParser(); // the following methods return NULL if any errors are detected @@ -130,15 +130,15 @@ public: GenericInformationList *pExistingList = NULL ); // save the InfrormationList to rSourceFile - // returns FALSE on error - BOOL Save( SvFileStream &rSourceStream, + // returns sal_False on error + sal_Bool Save( SvFileStream &rSourceStream, const GenericInformationList *pSaveList ); - BOOL Save( SvMemoryStream &rSourceStream, + sal_Bool Save( SvMemoryStream &rSourceStream, const GenericInformationList *pSaveList ); - BOOL Save( const UniString &rSourceFile, + sal_Bool Save( const UniString &rSourceFile, const GenericInformationList *pSaveList ); - USHORT GetErrorCode(); + sal_uInt16 GetErrorCode(); ByteString &GetErrorText(); void SetStatusHdl( const Link &rHdl ) { aStatusLink = rHdl; } diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx index 592aeecce899..ffe1ceec69b1 100644 --- a/tools/inc/tools/line.hxx +++ b/tools/inc/tools/line.hxx @@ -61,9 +61,9 @@ public: double GetLength() const; - BOOL Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const; - BOOL Intersection( const Line& rLine, Point& rIntersection ) const; - BOOL Intersection( const Rectangle& rRect, Line& rIntersection ) const; + sal_Bool Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const; + sal_Bool Intersection( const Line& rLine, Point& rIntersection ) const; + sal_Bool Intersection( const Rectangle& rRect, Line& rIntersection ) const; double GetDistance( const double& rPtX, const double& rPtY ) const; double GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); } diff --git a/tools/inc/tools/link.hxx b/tools/inc/tools/link.hxx index 85ce0b344833..02187e339187 100644 --- a/tools/inc/tools/link.hxx +++ b/tools/inc/tools/link.hxx @@ -113,14 +113,14 @@ public: long Call( void* pCaller ) const; - BOOL IsSet() const; - BOOL operator !() const; + sal_Bool IsSet() const; + sal_Bool operator !() const; - BOOL operator==( const Link& rLink ) const; - BOOL operator!=( const Link& rLink ) const + sal_Bool operator==( const Link& rLink ) const; + sal_Bool operator!=( const Link& rLink ) const { return !(Link::operator==( rLink )); } - BOOL operator<( const Link& rLink ) const - { return ((ULONG)rLink.pFunc < (ULONG)pFunc); } + sal_Bool operator<( const Link& rLink ) const + { return ((sal_uIntPtr)rLink.pFunc < (sal_uIntPtr)pFunc); } }; inline Link::Link() @@ -140,20 +140,20 @@ inline long Link::Call(void *pCaller) const return pFunc ? (*pFunc)(pInst, pCaller) : 0; } -inline BOOL Link::IsSet() const +inline sal_Bool Link::IsSet() const { if ( pFunc ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } -inline BOOL Link::operator !() const +inline sal_Bool Link::operator !() const { if ( !pFunc ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } #endif // _LINK_HXX diff --git a/tools/inc/tools/list.hxx b/tools/inc/tools/list.hxx index dcbf54f9ae15..9f920356b489 100644 --- a/tools/inc/tools/list.hxx +++ b/tools/inc/tools/list.hxx @@ -57,18 +57,18 @@ public: using Container::Next; using Container::Prev; - List( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) : + List( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) : Container( 1024, _nInitSize, _nReSize ) {} - List( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) : + List( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) : Container( _nBlockSize, _nInitSize, _nReSize ) {} List( const List& rList ) : Container( rList ) {} List& operator =( const List& rList ) { Container::operator =( rList ); return *this; } - BOOL operator ==( const List& rList ) const + sal_Bool operator ==( const List& rList ) const { return Container::operator ==( rList ); } - BOOL operator !=( const List& rList ) const + sal_Bool operator !=( const List& rList ) const { return Container::operator !=( rList ); } }; @@ -84,16 +84,16 @@ public: \ using List::Count; \ using List::GetCurPos; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ List( _nInitSize, _nReSize ) {} \ - ClassName( USHORT _nBlockSize, USHORT _nInitSize, \ - USHORT _nReSize ) : \ + ClassName( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, \ + sal_uInt16 _nReSize ) : \ List( _nBlockSize, _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ List( rClassName ) {} \ \ - void Insert( Type p, ULONG nIndex ) \ + void Insert( Type p, sal_uIntPtr nIndex ) \ { List::Insert( (void*)p, nIndex ); } \ void Insert( Type p ) \ { List::Insert( (void*)p ); } \ @@ -101,13 +101,13 @@ public: \ { List::Insert( (void*)pNew, (void*)pOld ); } \ Type Remove() \ { return (Type)List::Remove(); } \ - Type Remove( ULONG nIndex ) \ + Type Remove( sal_uIntPtr nIndex ) \ { return (Type)List::Remove( nIndex ); } \ Type Remove( Type p ) \ { return (Type)List::Remove( (void*)p ); } \ Type Replace( Type p ) \ { return (Type)List::Replace( (void*)p ); } \ - Type Replace( Type p, ULONG nIndex ) \ + Type Replace( Type p, sal_uIntPtr nIndex ) \ { return (Type)List::Replace( (void*)p, nIndex ); } \ Type Replace( Type pNew, Type pOld ) \ { return (Type)List::Replace( (void*)pNew, \ @@ -115,16 +115,16 @@ public: \ \ Type GetCurObject() const \ { return (Type)List::GetCurObject(); } \ - Type GetObject( ULONG nIndex ) const \ + Type GetObject( sal_uIntPtr nIndex ) const \ { return (Type)List::GetObject( nIndex ); } \ - ULONG GetPos( const Type p ) const \ + sal_uIntPtr GetPos( const Type p ) const \ { return List::GetPos( (const void*)p ); } \ - ULONG GetPos( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return List::GetPos( (const void*)p, nStartIndex, \ bForward ); } \ \ - Type Seek( ULONG nIndex ) \ + Type Seek( sal_uIntPtr nIndex ) \ { return (Type)List::Seek( nIndex ); } \ Type Seek( void* p ) { return (Type)List::Seek( p ); } \ Type First() { return (Type)List::First(); } \ @@ -135,9 +135,9 @@ public: \ ClassName& operator =( const ClassName& rClassName ) \ { List::operator =( rClassName ); return *this; } \ \ - BOOL operator ==( const ClassName& rList ) const \ + sal_Bool operator ==( const ClassName& rList ) const \ { return List::operator ==( rList ); } \ - BOOL operator !=( const ClassName& rList ) const \ + sal_Bool operator !=( const ClassName& rList ) const \ { return List::operator !=( rList ); } \ }; diff --git a/tools/inc/tools/mapunit.hxx b/tools/inc/tools/mapunit.hxx index 53e9c61b8d26..e57316c8c380 100644 --- a/tools/inc/tools/mapunit.hxx +++ b/tools/inc/tools/mapunit.hxx @@ -33,7 +33,6 @@ // - MapMode-Types - // ----------------- -// By changes you must also change: rsc/vclrsc.hxx enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM, MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH, MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT, diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx index 9544f33f35fa..6bd13859c80f 100644 --- a/tools/inc/tools/mempool.hxx +++ b/tools/inc/tools/mempool.hxx @@ -42,9 +42,9 @@ class TOOLS_DLLPUBLIC FixedMemPool FixedMemPool_Impl * m_pImpl; public: - FixedMemPool( USHORT nTypeSize, - USHORT nInitSize = 512, - USHORT nGrowSize = 256 ); + FixedMemPool( sal_uInt16 nTypeSize, + sal_uInt16 nInitSize = 512, + sal_uInt16 nGrowSize = 256 ); ~FixedMemPool(); void* Alloc(); diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx index e077914c8eea..bb74783a7a35 100644 --- a/tools/inc/tools/multisel.hxx +++ b/tools/inc/tools/multisel.hxx @@ -52,17 +52,17 @@ class TOOLS_DLLPUBLIC MultiSelection private: ImpSelList aSels; // array of SV-selections Range aTotRange; // total range of indexes - ULONG nCurSubSel; // index in aSels of current selected index + sal_uIntPtr nCurSubSel; // index in aSels of current selected index long nCurIndex; // current selected entry - ULONG nSelCount; // number of selected indexes - BOOL bInverseCur;// inverse cursor - BOOL bCurValid; // are nCurIndex and nCurSubSel valid - BOOL bSelectNew; // auto-select newly inserted indexes + sal_uIntPtr nSelCount; // number of selected indexes + sal_Bool bInverseCur;// inverse cursor + sal_Bool bCurValid; // are nCurIndex and nCurSubSel valid + sal_Bool bSelectNew; // auto-select newly inserted indexes #ifdef _SV_MULTISEL_CXX TOOLS_DLLPRIVATE void ImplClear(); TOOLS_DLLPRIVATE size_t ImplFindSubSelection( long nIndex ) const; - TOOLS_DLLPRIVATE BOOL ImplMergeSubSelections( size_t nPos1, size_t nPos2 ); + TOOLS_DLLPRIVATE sal_Bool ImplMergeSubSelections( size_t nPos1, size_t nPos2 ); TOOLS_DLLPRIVATE long ImplFwdUnselected(); TOOLS_DLLPRIVATE long ImplBwdUnselected(); #endif @@ -77,18 +77,18 @@ public: ~MultiSelection(); MultiSelection& operator= ( const MultiSelection& rOrig ); - BOOL operator== ( MultiSelection& rOrig ); - BOOL operator!= ( MultiSelection& rOrig ) + sal_Bool operator== ( MultiSelection& rOrig ); + sal_Bool operator!= ( MultiSelection& rOrig ) { return !operator==( rOrig ); } - BOOL operator !() const + sal_Bool operator !() const { return nSelCount == 0; } - void SelectAll( BOOL bSelect = TRUE ); - BOOL Select( long nIndex, BOOL bSelect = TRUE ); - void Select( const Range& rIndexRange, BOOL bSelect = TRUE ); - BOOL IsSelected( long nIndex ) const; - BOOL IsAllSelected() const - { return nSelCount == ULONG(aTotRange.Len()); } + void SelectAll( sal_Bool bSelect = sal_True ); + sal_Bool Select( long nIndex, sal_Bool bSelect = sal_True ); + void Select( const Range& rIndexRange, sal_Bool bSelect = sal_True ); + sal_Bool IsSelected( long nIndex ) const; + sal_Bool IsAllSelected() const + { return nSelCount == sal_uIntPtr(aTotRange.Len()); } long GetSelectCount() const { return nSelCount; } void SetTotalRange( const Range& rTotRange ); @@ -97,9 +97,9 @@ public: void Append( long nCount = 1 ); const Range& GetTotalRange() const { return aTotRange; } - BOOL IsCurValid() const { return bCurValid; } + sal_Bool IsCurValid() const { return bCurValid; } long GetCurSelected() const { return nCurIndex; } - long FirstSelected( BOOL bInverse = FALSE ); + long FirstSelected( sal_Bool bInverse = sal_False ); long LastSelected(); long NextSelected(); long PrevSelected(); diff --git a/tools/inc/tools/ownlist.hxx b/tools/inc/tools/ownlist.hxx index f0d708a88ba8..715734f162f6 100644 --- a/tools/inc/tools/ownlist.hxx +++ b/tools/inc/tools/ownlist.hxx @@ -36,8 +36,8 @@ #define PRV_SV_DECL_OWNER_LIST(ClassName,Type) \ List aTypes; \ public: \ - ClassName( USHORT nInitSize = 16, \ - USHORT nReSize = 16 ) \ + ClassName( sal_uInt16 nInitSize = 16, \ + sal_uInt16 nReSize = 16 ) \ : aTypes( nInitSize, nReSize ) {} \ ClassName( const ClassName & rObj ) \ { *this = rObj; } \ @@ -49,18 +49,18 @@ public: \ { delete (Type *)aTypes.Remove(); } \ void Remove( Type * pObj ) \ { delete (Type *)aTypes.Remove( pObj ); } \ - void Remove( ULONG nPos ) \ + void Remove( sal_uIntPtr nPos ) \ { delete (Type *)aTypes.Remove( nPos ); } \ - Type & Insert( const Type &, ULONG nPos ); \ + Type & Insert( const Type &, sal_uIntPtr nPos ); \ Type & Insert( const Type & rType ) \ { return Insert( rType, aTypes.GetCurPos() ); } \ Type & Append( const Type & rType ) \ { return Insert( rType, LIST_APPEND ); } \ - Type & GetObject( ULONG nPos ) const \ + Type & GetObject( sal_uIntPtr nPos ) const \ { return *(Type *)aTypes.GetObject( nPos ); } \ - Type & operator []( ULONG nPos ) const \ + Type & operator []( sal_uIntPtr nPos ) const \ { return *(Type *)aTypes.GetObject( nPos ); } \ - ULONG Count() const { return aTypes.Count(); } + sal_uIntPtr Count() const { return aTypes.Count(); } #define PRV_SV_IMPL_OWNER_LIST(ClassName,Type) \ ClassName & ClassName::operator = ( const ClassName & rObj ) \ @@ -68,7 +68,7 @@ ClassName & ClassName::operator = ( const ClassName & rObj ) \ if( this != &rObj ) \ { \ Clear(); \ - for( ULONG i = 0; i < rObj.Count(); i++ ) \ + for( sal_uIntPtr i = 0; i < rObj.Count(); i++ ) \ Append( rObj.GetObject( i ) ); \ } \ return *this; \ @@ -83,7 +83,7 @@ void ClassName::Clear() \ } \ aTypes.Clear(); \ } \ -Type & ClassName::Insert( const Type & rType, ULONG nPos ) \ +Type & ClassName::Insert( const Type & rType, sal_uIntPtr nPos ) \ { \ Type * pType = new Type( rType ); \ aTypes.Insert( pType, nPos ); \ diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index 09cfeebfdb49..02d2355e5af9 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -86,16 +86,16 @@ private: enum DataType { DATA_NONE = 0, DATA_ABSOLUT = 1, DATA_PERCENT = 2 }; DataType eType; - union { ULONG mnAbsolut; USHORT mnPercent; }; + union { sal_uIntPtr mnAbsolut; sal_uInt16 mnPercent; }; public: PolyOptimizeData() : eType( DATA_NONE ) {} - PolyOptimizeData( ULONG nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {} - PolyOptimizeData( USHORT nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {} + PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {} + PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {} - ULONG GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; } - USHORT GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } + sal_uIntPtr GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; } + sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } }; // ----------- @@ -124,57 +124,57 @@ private: public: Point* ImplGetPointAry(); - BYTE* ImplGetFlagAry(); + sal_uInt8* ImplGetFlagAry(); - static void ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPercent ); + static void ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent ); void ImplRead( SvStream& rIStream ); void ImplWrite( SvStream& rOStream ) const; public: Polygon(); - Polygon( USHORT nSize ); - Polygon( USHORT nPoints, const Point* pPtAry, - const BYTE* pFlagAry = NULL ); + Polygon( sal_uInt16 nSize ); + Polygon( sal_uInt16 nPoints, const Point* pPtAry, + const sal_uInt8* pFlagAry = NULL ); Polygon( const Rectangle& rRect ); Polygon( const Rectangle& rRect, - ULONG nHorzRound, ULONG nVertRound ); + sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound ); Polygon( const Point& rCenter, long nRadX, long nRadY, - USHORT nPoints = 0 ); + sal_uInt16 nPoints = 0 ); Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle ePolyStyle = POLY_ARC ); Polygon( const Point& rBezPt1, const Point& rCtrlPt1, const Point& rBezPt2, const Point& rCtrlPt2, - USHORT nPoints = 0 ); + sal_uInt16 nPoints = 0 ); Polygon( const Polygon& rPoly ); ~Polygon(); - void SetPoint( const Point& rPt, USHORT nPos ); - const Point& GetPoint( USHORT nPos ) const; + void SetPoint( const Point& rPt, sal_uInt16 nPos ); + const Point& GetPoint( sal_uInt16 nPos ) const; - void SetFlags( USHORT nPos, PolyFlags eFlags ); - PolyFlags GetFlags( USHORT nPos ) const; + void SetFlags( sal_uInt16 nPos, PolyFlags eFlags ); + PolyFlags GetFlags( sal_uInt16 nPos ) const; sal_Bool HasFlags() const; - BOOL IsControl( USHORT nPos ) const; - BOOL IsSmooth( USHORT nPos ) const; - BOOL IsRect() const; + sal_Bool IsControl( sal_uInt16 nPos ) const; + sal_Bool IsSmooth( sal_uInt16 nPos ) const; + sal_Bool IsRect() const; - void SetSize( USHORT nNewSize ); - USHORT GetSize() const; + void SetSize( sal_uInt16 nNewSize ); + sal_uInt16 GetSize() const; void Clear(); Rectangle GetBoundRect() const; double GetArea() const; double GetSignedArea() const; - BOOL IsInside( const Point& rPt ) const; - BOOL IsRightOrientated() const; - double CalcDistance( USHORT nPt1, USHORT nPt2 ); - void Clip( const Rectangle& rRect, BOOL bPolygon = TRUE ); - void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL ); + sal_Bool IsInside( const Point& rPt ) const; + sal_Bool IsRightOrientated() const; + double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 ); + void Clip( const Rectangle& rRect, sal_Bool bPolygon = sal_True ); + void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL ); /** Adaptive subdivision of polygons with curves @@ -205,21 +205,21 @@ public: void Translate( const Point& rTrans ); void Scale( double fScaleX, double fScaleY ); void Rotate( const Point& rCenter, double fSin, double fCos ); - void Rotate( const Point& rCenter, USHORT nAngle10 ); + void Rotate( const Point& rCenter, sal_uInt16 nAngle10 ); void SlantX( long nYRef, double fSin, double fCos ); void SlantY( long nXRef, double fSin, double fCos ); void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect ); - void Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL ); - void Insert( USHORT nPos, const Polygon& rPoly ); - void Remove( USHORT nPos, USHORT nCount ); + void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL ); + void Insert( sal_uInt16 nPos, const Polygon& rPoly ); + void Remove( sal_uInt16 nPos, sal_uInt16 nCount ); - const Point& operator[]( USHORT nPos ) const { return GetPoint( nPos ); } - Point& operator[]( USHORT nPos ); + const Point& operator[]( sal_uInt16 nPos ) const { return GetPoint( nPos ); } + Point& operator[]( sal_uInt16 nPos ); Polygon& operator=( const Polygon& rPoly ); - BOOL operator==( const Polygon& rPoly ) const; - BOOL operator!=( const Polygon& rPoly ) const + sal_Bool operator==( const Polygon& rPoly ) const; + sal_Bool operator!=( const Polygon& rPoly ) const { return !(Polygon::operator==( rPoly )); } sal_Bool IsEqual( const Polygon& rPoly ) const; @@ -232,7 +232,7 @@ public: void Write( SvStream& rOStream ) const; const Point* GetConstPointAry() const; - const BYTE* GetConstFlagAry() const; + const sal_uInt8* GetConstFlagAry() const; // convert to ::basegfx::B2DPolygon and return ::basegfx::B2DPolygon getB2DPolygon() const; @@ -252,32 +252,32 @@ private: ImplPolyPolygon* mpImplPolyPolygon; - TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const; + TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const; TOOLS_DLLPRIVATE void *ImplCreateArtVpath() const; TOOLS_DLLPRIVATE void ImplSetFromArtVpath( void *pVpath ); public: - PolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 ); + PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 ); PolyPolygon( const Polygon& rPoly ); - PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry, + PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry, const Point* pPtAry ); PolyPolygon( const PolyPolygon& rPolyPoly ); ~PolyPolygon(); - void Insert( const Polygon& rPoly, USHORT nPos = POLYPOLY_APPEND ); - void Remove( USHORT nPos ); - void Replace( const Polygon& rPoly, USHORT nPos ); - const Polygon& GetObject( USHORT nPos ) const; + void Insert( const Polygon& rPoly, sal_uInt16 nPos = POLYPOLY_APPEND ); + void Remove( sal_uInt16 nPos ); + void Replace( const Polygon& rPoly, sal_uInt16 nPos ); + const Polygon& GetObject( sal_uInt16 nPos ) const; - BOOL IsRect() const; + sal_Bool IsRect() const; void Clear(); - USHORT Count() const; + sal_uInt16 Count() const; Rectangle GetBoundRect() const; void Clip( const Rectangle& rRect ); - void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL ); + void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL ); /** Adaptive subdivision of polygons with curves @@ -308,17 +308,17 @@ public: void Translate( const Point& rTrans ); void Scale( double fScaleX, double fScaleY ); void Rotate( const Point& rCenter, double fSin, double fCos ); - void Rotate( const Point& rCenter, USHORT nAngle10 ); + void Rotate( const Point& rCenter, sal_uInt16 nAngle10 ); void SlantX( long nYRef, double fSin, double fCos ); void SlantY( long nXRef, double fSin, double fCos ); void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect ); - const Polygon& operator[]( USHORT nPos ) const { return GetObject( nPos ); } - Polygon& operator[]( USHORT nPos ); + const Polygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); } + Polygon& operator[]( sal_uInt16 nPos ); PolyPolygon& operator=( const PolyPolygon& rPolyPoly ); - BOOL operator==( const PolyPolygon& rPolyPoly ) const; - BOOL operator!=( const PolyPolygon& rPolyPoly ) const + sal_Bool operator==( const PolyPolygon& rPolyPoly ) const; + sal_Bool operator!=( const PolyPolygon& rPolyPoly ) const { return !(PolyPolygon::operator==( rPolyPoly )); } sal_Bool IsEqual( const PolyPolygon& rPolyPoly ) const; diff --git a/tools/inc/tools/postsys.h b/tools/inc/tools/postsys.h index 9b7fbf729942..60c83173d6e4 100644 --- a/tools/inc/tools/postsys.h +++ b/tools/inc/tools/postsys.h @@ -35,6 +35,7 @@ #undef Polygon #undef Rectangle #undef ULONG +#undef sal_Bool #undef BYTE #undef BOOL #undef DELETE @@ -234,9 +235,9 @@ extern "C" { -WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ); -WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ); -WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ); + BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ); + BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ); + BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ); } #endif diff --git a/tools/inc/tools/presys.h b/tools/inc/tools/presys.h index fe7cc68d9460..fb88c7323019 100644 --- a/tools/inc/tools/presys.h +++ b/tools/inc/tools/presys.h @@ -28,15 +28,12 @@ /* nicht geschuetzt, darf nur einmal includet werden */ -// Konfl�kt mit den Tools-Pair vermeiden +// Konfl�kt mit den Tools-Pair vermeiden #define Pair StlPair #if defined WNT -#define BOOL WIN_BOOL -#define BYTE WIN_BYTE #define ULONG WIN_ULONG - #define Rectangle BLA_Rectangle #define Polygon BLA_Polygon #define PolyPolygon BLA_PolyPolygon diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h index bed32750929c..151b0fe46279 100644 --- a/tools/inc/tools/prex.h +++ b/tools/inc/tools/prex.h @@ -30,10 +30,6 @@ #define _PREX_H #define Window XLIB_Window -#define BYTE XLIB_BYTE -#define INT8 XLIB_INT8 -#define INT64 XLIB_INT64 -#define BOOL XLIB_BOOL #define Font XLIB_Font #define Cursor XLIB_Cursor #define String XLIB_String diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx index a435fc586539..68b4932e1e51 100644 --- a/tools/inc/tools/pstm.hxx +++ b/tools/inc/tools/pstm.hxx @@ -49,11 +49,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** ); class TOOLS_DLLPUBLIC SvClassManager { - typedef boost::unordered_map< USHORT, SvCreateInstancePersist > Map; + typedef boost::unordered_map< sal_uInt16, SvCreateInstancePersist > Map; Map aAssocTable; public: - void Register( USHORT nClassId, SvCreateInstancePersist pFunc ); - SvCreateInstancePersist Get( USHORT nClassId ); + void Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc ); + SvCreateInstancePersist Get( sal_uInt16 nClassId ); }; /************************** S v R t t i B a s e **************************/ @@ -68,11 +68,11 @@ SV_DECL_IMPL_REF(SvRttiBase) /*************************************************************************/ #define SV_DECL_PERSIST( Class, CLASS_ID ) \ TYPEINFO(); \ - static USHORT StaticClassId() { return CLASS_ID; } \ + static sal_uInt16 StaticClassId() { return CLASS_ID; } \ static void * CreateInstance( SvPersistBase ** ppBase ); \ friend SvPersistStream& operator >> ( SvPersistStream & rStm, \ Class *& rpObj); \ - virtual USHORT GetClassId() const; \ + virtual sal_uInt16 GetClassId() const; \ virtual void Load( SvPersistStream & ); \ virtual void Save( SvPersistStream & ); @@ -86,7 +86,7 @@ SV_DECL_IMPL_REF(SvRttiBase) *ppBase = p; \ return p; \ } \ - USHORT Class::GetClassId() const \ + sal_uInt16 Class::GetClassId() const \ { return StaticClassId(); } \ SvPersistStream& operator >> (SvPersistStream & rStm, Class *& rpObj)\ { \ @@ -109,7 +109,7 @@ class SvPersistStream; class SvPersistBase : public SvRttiBase { public: - virtual USHORT GetClassId() const = 0; + virtual sal_uInt16 GetClassId() const = 0; virtual void Load( SvPersistStream & ) = 0; virtual void Save( SvPersistStream & ) = 0; TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm, @@ -127,9 +127,9 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberL { public: SvPersistBaseMemberList(); - SvPersistBaseMemberList(USHORT nInitSz, USHORT nResize ); + SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize ); - void WriteObjects( SvPersistStream &, BOOL bOnlyStreamedObj = FALSE ) const; + void WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const; TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &); TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBaseMemberList &); }; @@ -163,7 +163,7 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream die im Stream vorkommen k"onnen, ben"otigt. Die Liste aller Klassen wird in einem <SvClassManager> Objekt gespeichert und dem SvPersistStream "ubergeben, wenn er erzeugt wird. - Weiterhin wird die M"oglichkeit geboten UINT32 Werte komprimiert + Weiterhin wird die M"oglichkeit geboten sal_uInt32 Werte komprimiert zu schreiben und zu lesen (<SvPersistStream::WriteCompressed>, <SvPersistStream::ReadCompressed>). Es gibt auch die drei Hilfsmethoden <SvPersistStream::WriteDummyLen>, @@ -194,49 +194,49 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream SvStream * pStm; Table aPTable; // Pointer und Key gedreht SvPersistUIdx aPUIdx; - ULONG nStartIdx; + sal_uIntPtr nStartIdx; const SvPersistStream * pRefStm; - UINT32 nFlags; + sal_uInt32 nFlags; - virtual ULONG GetData( void* pData, ULONG nSize ); - virtual ULONG PutData( const void* pData, ULONG nSize ); - virtual ULONG SeekPos( ULONG nPos ); + virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); virtual void FlushData(); protected: - ULONG GetCurMaxIndex( const SvPersistUIdx & ) const; - ULONG GetCurMaxIndex() const + sal_uIntPtr GetCurMaxIndex( const SvPersistUIdx & ) const; + sal_uIntPtr GetCurMaxIndex() const { return GetCurMaxIndex( aPUIdx ); } - void WriteObj( BYTE nHdr, SvPersistBase * pObj ); - UINT32 ReadObj( SvPersistBase * & rpObj, - BOOL bRegister ); + void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj ); + sal_uInt32 ReadObj( SvPersistBase * & rpObj, + sal_Bool bRegister ); public: - BOOL IsStreamed( SvPersistBase * pObj ) const + sal_Bool IsStreamed( SvPersistBase * pObj ) const { return 0 != GetIndex( pObj ); } virtual void ResetError(); SvPersistStream( SvClassManager &, SvStream * pStream, - UINT32 nStartIdx = 1 ); + sal_uInt32 nStartIdx = 1 ); SvPersistStream( SvClassManager &, SvStream * pStream, const SvPersistStream & rPersStm ); ~SvPersistStream(); void SetStream( SvStream * pStream ); SvStream * GetStream() const { return pStm; } - virtual USHORT IsA() const; + virtual sal_uInt16 IsA() const; - SvPersistBase * GetObject( ULONG nIdx ) const; - ULONG GetIndex( SvPersistBase * ) const; + SvPersistBase * GetObject( sal_uIntPtr nIdx ) const; + sal_uIntPtr GetIndex( SvPersistBase * ) const; - void SetContextFlags( UINT32 n ) { nFlags = n; } - UINT32 GetContextFlags() const { return nFlags; } + void SetContextFlags( sal_uInt32 n ) { nFlags = n; } + sal_uInt32 GetContextFlags() const { return nFlags; } - static void WriteCompressed( SvStream & rStm, UINT32 nVal ); - static UINT32 ReadCompressed( SvStream & rStm ); + static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal ); + static sal_uInt32 ReadCompressed( SvStream & rStm ); - UINT32 WriteDummyLen(); - void WriteLen( UINT32 nLenPos ); - UINT32 ReadLen( UINT32 * pTestPos ); + sal_uInt32 WriteDummyLen(); + void WriteLen( sal_uInt32 nLenPos ); + sal_uInt32 ReadLen( sal_uInt32 * pTestPos ); SvPersistStream& WritePointer( SvPersistBase * pObj ); SvPersistStream& ReadPointer( SvPersistBase * & rpObj ); @@ -247,8 +247,8 @@ public: // gespeichert werden. friend SvStream& operator >> ( SvStream &, SvPersistStream & ); friend SvStream& operator << ( SvStream &, SvPersistStream & ); - ULONG InsertObj( SvPersistBase * ); - ULONG RemoveObj( SvPersistBase * ); + sal_uIntPtr InsertObj( SvPersistBase * ); + sal_uIntPtr RemoveObj( SvPersistBase * ); }; #endif // _PSTM_HXX diff --git a/tools/inc/tools/queue.hxx b/tools/inc/tools/queue.hxx index 233ed20ff8ca..c32880b764d5 100644 --- a/tools/inc/tools/queue.hxx +++ b/tools/inc/tools/queue.hxx @@ -46,19 +46,19 @@ public: using Container::GetObject; using Container::GetPos; - Queue( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) : + Queue( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) : Container( _nReSize, _nInitSize, _nReSize ) {} Queue( const Queue& rQueue ) : Container( rQueue ) {} void Put( void* p ) { Container::Insert( p, CONTAINER_APPEND ); } - void* Get() { return Container::Remove( (ULONG)0 ); } + void* Get() { return Container::Remove( (sal_uIntPtr)0 ); } Queue& operator =( const Queue& rQueue ) { Container::operator =( rQueue ); return *this; } - BOOL operator ==( const Queue& rQueue ) const + sal_Bool operator ==( const Queue& rQueue ) const { return Container::operator ==( rQueue ); } - BOOL operator !=( const Queue& rQueue ) const + sal_Bool operator !=( const Queue& rQueue ) const { return Container::operator !=( rQueue ); } }; @@ -73,8 +73,8 @@ public: \ using Queue::Clear; \ using Queue::Count; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ Queue( _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ Queue( rClassName ) {} \ @@ -82,12 +82,12 @@ public: \ void Put( Type p ) { Queue::Put( (void*)p ); } \ Type Get() { return (Type)Queue::Get(); } \ \ - Type GetObject( ULONG nIndex ) const \ + Type GetObject( sal_uIntPtr nIndex ) const \ { return (Type)Queue::GetObject( nIndex ); } \ - ULONG GetPos( const Type p ) const \ + sal_uIntPtr GetPos( const Type p ) const \ { return Queue::GetPos( (const void*)p ); } \ - ULONG GetPos( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return Queue::GetPos( (const void*)p, \ nStartIndex, \ bForward ); } \ @@ -96,9 +96,9 @@ public: \ { Queue::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const Queue& rQueue ) const \ + sal_Bool operator ==( const Queue& rQueue ) const \ { return Queue::operator ==( rQueue ); } \ - BOOL operator !=( const Queue& rQueue ) const \ + sal_Bool operator !=( const Queue& rQueue ) const \ { return Queue::operator !=( rQueue ); } \ }; diff --git a/tools/inc/tools/rc.h b/tools/inc/tools/rc.h index dd6ddd8a548a..ce735d6a70e3 100644 --- a/tools/inc/tools/rc.h +++ b/tools/inc/tools/rc.h @@ -51,6 +51,7 @@ typedef short RSWND_STYLE; #define WINDOW_EXTRALONG 0x0800 #define WINDOW_UNIQUEID 0x1000 #define WINDOW_BORDER_STYLE 0x2000 +#define WINDOW_HELPID 0x4000 // Definition der Struktur die alle "WorkWindow"-Resourcen haben #define WORKWIN_SHOWNORMAL 0 diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx index 1720c96c4680..a6310197e442 100644 --- a/tools/inc/tools/rc.hxx +++ b/tools/inc/tools/rc.hxx @@ -43,7 +43,7 @@ class TOOLS_DLLPUBLIC Resource ResMgr* m_pResMgr; // check availability of Resource - BOOL IsAvailableRes( const ResId& rId ) const + sal_Bool IsAvailableRes( const ResId& rId ) const { return m_pResMgr->IsAvailable( rId, this ); } // Load a Resource @@ -57,7 +57,7 @@ class TOOLS_DLLPUBLIC Resource { return m_pResMgr->GetClass(); } // read a string from the resource - static sal_uInt32 GetStringRes( UniString& rStr, const BYTE* pStr ) + static sal_uInt32 GetStringRes( UniString& rStr, const sal_uInt8* pStr ) { return ResMgr::GetString( rStr, pStr ); } // increase the memory pointer gotten by GetClassRes() @@ -88,6 +88,9 @@ class TOOLS_DLLPUBLIC Resource // read a string from resource data and increment pointer UniString ReadStringRes() { return m_pResMgr->ReadString(); } + // read a byte string from resource data and increment pointer + rtl::OString ReadByteStringRes() + { return m_pResMgr->ReadByteString(); } // Gibt die Resource frei (this-Zeiger fuer Fehlerueberpruefung) // free the resource from m_pResMgr's stack (pass this ptr for validation) diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx index e1e20ebe5448..9ef9fd0d1776 100644 --- a/tools/inc/tools/ref.hxx +++ b/tools/inc/tools/ref.hxx @@ -73,7 +73,7 @@ public: \ inline ~ClassName##Ref(); \ inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \ inline ClassName##Ref & operator = ( ClassName * pObj ); \ - inline BOOL Is() const { return pObj != NULL; } \ + inline sal_Bool Is() const { return pObj != NULL; } \ inline ClassName * operator & () const { return pObj; } \ inline ClassName * operator -> () const { return pObj; } \ inline ClassName & operator * () const { return *pObj; } \ @@ -101,8 +101,8 @@ PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef(), AddNextRef(),\ ReleaseReference(), EMPTYARG, pObj ) #define SV_IMPL_LOCK( ClassName ) \ -PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( TRUE ), \ - OwnerLock( TRUE ), OwnerLock( FALSE ), \ +PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ), \ + OwnerLock( sal_True ), OwnerLock( sal_False ), \ EMPTYARG, pObj ) #define SV_DECL_IMPL_REF(ClassName) \ @@ -117,7 +117,7 @@ class vis CN##MemberList : public CN##List\ {\ public:\ inline CN##MemberList();\ -inline CN##MemberList(USHORT nInitSz, USHORT nResize );\ +inline CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );\ inline CN##MemberList( const CN##MemberList & rRef );\ inline ~CN##MemberList();\ inline CN##MemberList & operator =\ @@ -125,17 +125,17 @@ inline CN##MemberList & operator =\ inline void Clear();\ inline void Insert( EN p )\ { CN##List::Insert( p ); p->AddRef();}\ -inline void Insert( EN p, ULONG nIndex )\ +inline void Insert( EN p, sal_uIntPtr nIndex )\ { CN##List::Insert( p, nIndex ); p->AddRef();}\ inline void Insert( EN p, EN pOld )\ { CN##List::Insert( p, pOld ); p->AddRef();}\ inline void Append( EN p )\ { Insert( p, LIST_APPEND );}\ inline EN Remove();\ -inline EN Remove( ULONG nIndex );\ +inline EN Remove( sal_uIntPtr nIndex );\ inline EN Remove( EN p );\ inline EN Replace( EN p );\ -inline EN Replace( EN p, ULONG nIndex );\ +inline EN Replace( EN p, sal_uIntPtr nIndex );\ inline EN Replace( EN pNew, EN pOld );\ inline void Append( const CN##MemberList & );\ }; @@ -149,12 +149,12 @@ PRV_SV_DECL_REF_LIST(CN,EN,vis) /************************** S v R e f L i s t ****************************/ #define SV_IMPL_REF_LIST( CN, EN ) \ inline CN##MemberList::CN##MemberList(){}\ -inline CN##MemberList::CN##MemberList(USHORT nInitSz, USHORT nResize )\ +inline CN##MemberList::CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize )\ : CN##List( nInitSz, nResize ){}\ inline CN##MemberList::CN##MemberList( const CN##MemberList & rRef ) \ : CN##List( rRef ) \ {\ - ULONG nOldCount = Count(); \ + sal_uIntPtr nOldCount = Count(); \ EN pEntry = First(); \ while( pEntry ) \ { pEntry->AddRef(); pEntry = Next(); } \ @@ -165,7 +165,7 @@ inline CN##MemberList & CN##MemberList::operator = \ ( const CN##MemberList & rRef ) \ {\ CN##MemberList & rList = (CN##MemberList &)rRef; \ - ULONG nOldCount = rList.Count(); \ + sal_uIntPtr nOldCount = rList.Count(); \ /* Count der Objekte erhoehen */ \ EN pEntry = rList.First(); \ while( pEntry ) \ @@ -187,7 +187,7 @@ inline EN CN##MemberList::Remove() \ EN p = CN##List::Remove(); \ if( p ) p->ReleaseReference(); return p; \ }\ -inline EN CN##MemberList::Remove( ULONG nIndex ) \ +inline EN CN##MemberList::Remove( sal_uIntPtr nIndex ) \ {\ EN p = CN##List::Remove( nIndex ); \ if( p ) p->ReleaseReference(); return p; \ @@ -202,7 +202,7 @@ inline EN CN##MemberList::Replace( EN p ) \ p->AddRef(); p = CN##List::Replace( p ); \ if( p ) p->ReleaseReference(); return p; \ }\ -inline EN CN##MemberList::Replace( EN p, ULONG nIndex ) \ +inline EN CN##MemberList::Replace( EN p, sal_uIntPtr nIndex ) \ {\ p->AddRef(); p = CN##List::Replace( p, nIndex ); \ if( p ) p->ReleaseReference(); return p; \ @@ -214,7 +214,7 @@ inline EN CN##MemberList::Replace( EN pNew, EN pOld ) \ }\ inline void CN##MemberList::Append( const CN##MemberList & rList )\ {\ - for( ULONG i = 0; i < rList.Count(); i++ )\ + for( sal_uIntPtr i = 0; i < rList.Count(); i++ )\ Append( rList.GetObject( i ) );\ } @@ -226,23 +226,23 @@ inline void CN##MemberList::Append( const CN##MemberList & rList )\ /************************** S v M e m b e r L i s t **********************/ #define PRV_SV_DECL_MEMBER_LIST(Class,EntryName) \ Class##MemberList() {} \ -inline Class##MemberList(USHORT nInitSz,USHORT nResize);\ +inline Class##MemberList(sal_uInt16 nInitSz,sal_uInt16 nResize);\ inline void Insert( EntryName p ); \ -inline void Insert( EntryName p, ULONG nIndex ); \ +inline void Insert( EntryName p, sal_uIntPtr nIndex ); \ inline void Insert( EntryName p, EntryName pOld ); \ inline void Append( EntryName p ); \ inline EntryName Remove(); \ -inline EntryName Remove( ULONG nIndex ); \ +inline EntryName Remove( sal_uIntPtr nIndex ); \ inline EntryName Remove( EntryName p ); \ inline EntryName Replace( EntryName p ); \ -inline EntryName Replace( EntryName p, ULONG nIndex );\ +inline EntryName Replace( EntryName p, sal_uIntPtr nIndex );\ inline EntryName Replace( EntryName pNew, EntryName pOld );\ inline EntryName GetCurObject() const;\ -inline EntryName GetObject( ULONG nIndex ) const;\ -inline ULONG GetPos( const EntryName ) const;\ -inline ULONG GetPos( const EntryName, ULONG nStartIndex,\ - BOOL bForward = TRUE ) const;\ -inline EntryName Seek( ULONG nIndex );\ +inline EntryName GetObject( sal_uIntPtr nIndex ) const;\ +inline sal_uIntPtr GetPos( const EntryName ) const;\ +inline sal_uIntPtr GetPos( const EntryName, sal_uIntPtr nStartIndex,\ + sal_Bool bForward = sal_True ) const;\ +inline EntryName Seek( sal_uIntPtr nIndex );\ inline EntryName Seek( EntryName p );\ inline EntryName First();\ inline EntryName Last();\ @@ -252,11 +252,11 @@ inline void Append( const Class##MemberList & rList ); #define PRV_SV_IMPL_MEMBER_LIST(ClassName,EntryName,BaseList)\ inline ClassName##MemberList::ClassName##MemberList\ - (USHORT nInitSz,USHORT nResize)\ + (sal_uInt16 nInitSz,sal_uInt16 nResize)\ : BaseList( nInitSz, nResize ){}\ inline void ClassName##MemberList::Insert( EntryName p )\ {BaseList::Insert(p);}\ -inline void ClassName##MemberList::Insert( EntryName p, ULONG nIdx )\ +inline void ClassName##MemberList::Insert( EntryName p, sal_uIntPtr nIdx )\ {BaseList::Insert(p,nIdx);}\ inline void ClassName##MemberList::Insert( EntryName p, EntryName pOld )\ {BaseList::Insert(p,pOld);}\ @@ -264,21 +264,21 @@ inline void ClassName##MemberList::Append( EntryName p )\ {BaseList::Append(p);}\ inline EntryName ClassName##MemberList::Remove()\ {return (EntryName)BaseList::Remove();}\ -inline EntryName ClassName##MemberList::Remove( ULONG nIdx )\ +inline EntryName ClassName##MemberList::Remove( sal_uIntPtr nIdx )\ {return (EntryName)BaseList::Remove(nIdx);}\ inline EntryName ClassName##MemberList::Remove( EntryName p )\ {return (EntryName)BaseList::Remove(p);}\ inline EntryName ClassName##MemberList::Replace( EntryName p )\ {return (EntryName)BaseList::Replace(p);}\ -inline EntryName ClassName##MemberList::Replace( EntryName p, ULONG nIdx )\ +inline EntryName ClassName##MemberList::Replace( EntryName p, sal_uIntPtr nIdx )\ {return (EntryName)BaseList::Replace(p,nIdx);}\ inline EntryName ClassName##MemberList::Replace( EntryName p, EntryName pOld )\ {return (EntryName)BaseList::Replace(p,pOld);}\ inline EntryName ClassName##MemberList::GetCurObject() const\ {return (EntryName)BaseList::GetCurObject();}\ -inline EntryName ClassName##MemberList::GetObject( ULONG nIdx ) const\ +inline EntryName ClassName##MemberList::GetObject( sal_uIntPtr nIdx ) const\ {return (EntryName)BaseList::GetObject( nIdx );}\ -inline EntryName ClassName##MemberList::Seek( ULONG nIdx )\ +inline EntryName ClassName##MemberList::Seek( sal_uIntPtr nIdx )\ {return (EntryName)BaseList::Seek( nIdx );}\ inline EntryName ClassName##MemberList::Seek( EntryName p )\ {return (EntryName)BaseList::Seek( p );}\ @@ -292,10 +292,10 @@ inline EntryName ClassName##MemberList::Prev()\ {return (EntryName)BaseList::Prev();}\ inline void ClassName##MemberList::Append( const ClassName##MemberList & rList )\ {BaseList::Append(rList);}\ -inline ULONG ClassName##MemberList::GetPos( const EntryName p) const\ +inline sal_uIntPtr ClassName##MemberList::GetPos( const EntryName p) const\ {return BaseList::GetPos( p );}\ -inline ULONG ClassName##MemberList::GetPos\ - ( const EntryName p, ULONG nStart, BOOL bForward ) const\ +inline sal_uIntPtr ClassName##MemberList::GetPos\ + ( const EntryName p, sal_uIntPtr nStart, sal_Bool bForward ) const\ {return BaseList::GetPos( p, nStart, bForward );} #define SV_DECL_MEMBER_LIST(ClassName,EntryName)\ @@ -309,7 +309,7 @@ public:\ #define SV_NO_DELETE_REFCOUNT 0x80000000 class TOOLS_DLLPUBLIC SvRefBase { - UINT32 nRefCount; + sal_uIntPtr nRefCount; #if defined (GCC) && (defined (C281) || defined (C290) || defined (C291)) public: #else @@ -328,9 +328,9 @@ public: if( nRefCount < SV_NO_DELETE_REFCOUNT ) nRefCount += SV_NO_DELETE_REFCOUNT; } - UINT32 AddMulRef( UINT32 n ) { return nRefCount += n; } - UINT32 AddNextRef() { return ++nRefCount; } - UINT32 AddRef() + sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; } + sal_uIntPtr AddNextRef() { return ++nRefCount; } + sal_uIntPtr AddRef() { if( nRefCount >= SV_NO_DELETE_REFCOUNT ) nRefCount -= SV_NO_DELETE_REFCOUNT; @@ -341,14 +341,14 @@ public: if( !--nRefCount ) QueryDelete(); } - UINT32 ReleaseRef() + sal_uIntPtr ReleaseRef() { - UINT32 n = --nRefCount; + sal_uIntPtr n = --nRefCount; if( !n ) QueryDelete(); return n; } - UINT32 GetRefCount() const { return nRefCount; } + sal_uIntPtr GetRefCount() const { return nRefCount; } }; #ifndef EMPTYARG @@ -419,7 +419,7 @@ public: \ inline void Clear() { _xHdl.Clear(); } \ inline ClassName##Weak& operator = ( ClassName * pObj ) { \ _xHdl = pObj ? pObj->GetHdl() : 0; return *this; } \ - inline BOOL Is() const { \ + inline sal_Bool Is() const { \ return _xHdl.Is() && _xHdl->GetObj(); } \ inline ClassName * operator & () const { \ return (ClassName*) ( _xHdl.Is() ? _xHdl->GetObj() : 0 ); } \ diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx index 96109dad338e..99d0bc45b022 100644 --- a/tools/inc/tools/resid.hxx +++ b/tools/inc/tools/resid.hxx @@ -81,7 +81,7 @@ class ResId ImplInit( nId, rMgr, NULL ); } // backwards compatibility; avoid ambiguities - ResId( USHORT nId, ResMgr& rMgr ) + ResId( sal_uInt16 nId, ResMgr& rMgr ) { ImplInit( sal_uInt32(nId), rMgr, NULL ); } @@ -149,7 +149,7 @@ class ResId return *this; } - const ResId & SetAutoRelease(BOOL bRelease) const + const ResId & SetAutoRelease(sal_Bool bRelease) const { if( bRelease ) m_nResId &= ~RSC_DONTRELEASE; @@ -158,7 +158,7 @@ class ResId return *this; } - BOOL IsAutoRelease() const + sal_Bool IsAutoRelease() const { return !(m_nResId & RSC_DONTRELEASE); } sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; } diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index 26d52bebbdb4..72f8d8d2827e 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -139,7 +139,7 @@ private: // the next two methods are needed to prevent the string hook called // with the res mgr mutex locked // like GetString, but doesn't call the string hook - TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const BYTE* pStr ); + TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr ); // like ReadString but doesn't call the string hook TOOLS_DLLPRIVATE UniString ReadStringWithoutHook(); @@ -154,7 +154,7 @@ public: ~ResMgr(); // Sprachabhaengige Ressource Library - static const sal_Char* GetLang( LanguageType& eLanguage, USHORT nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx" + static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx" static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName, com::sun::star::lang::Locale& rLocale ); static ResMgr* CreateResMgr( const sal_Char* pPrefixName, @@ -166,11 +166,11 @@ public: void TestStack( const Resource * ); // ist Resource verfuegbar - BOOL IsAvailable( const ResId& rId, + sal_Bool IsAvailable( const ResId& rId, const Resource* = NULL) const; // Resource suchen und laden - BOOL GetResource( const ResId& rId, const Resource * = NULL ); + sal_Bool GetResource( const ResId& rId, const Resource * = NULL ); static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr ); // Kontext freigeben void PopContext( const Resource* = NULL ); @@ -182,20 +182,22 @@ public: static sal_uInt32 GetObjSize( RSHEADER_TYPE* pHT ) { return( pHT->GetGlobOff() ); } - // Liefert einen String aus der Resource - static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr ); + // returns a string and its length out of the resource + static sal_uInt32 GetString( UniString& rStr, const sal_uInt8* pStr ); + // returns a byte string and its length out of the resource + static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr ); // Groesse eines Strings in der Resource static sal_uInt32 GetStringSize( sal_uInt32 nLen ) { nLen++; return (nLen + nLen%2); } - static sal_uInt32 GetStringSize( const BYTE* pStr ); + static sal_uInt32 GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen ); // return a int64 static sal_uInt64 GetUInt64( void* pDatum ); // Gibt einen long zurueck - static INT32 GetLong( void * pLong ); + static sal_Int32 GetLong( void * pLong ); // return a short - static INT16 GetShort( void * pShort ); + static sal_Int16 GetShort( void * pShort ); // Gibt einen Zeiger auf die Resource zurueck void * GetClass(); @@ -207,12 +209,13 @@ public: const rtl::OUString&GetFileName() const; - INT16 ReadShort(); - INT32 ReadLong(); + sal_Int16 ReadShort(); + sal_Int32 ReadLong(); UniString ReadString(); + rtl::OString ReadByteString(); - // generate auto help id for current resource stack - ULONG GetAutoHelpId(); + // generate auto help id for current resource stack + rtl::OString GetAutoHelpId(); static void SetReadStringHook( ResHookProc pProc ); static ResHookProc GetReadStringHook(); diff --git a/tools/inc/tools/rtti.hxx b/tools/inc/tools/rtti.hxx index 98e9152502a3..34f14c59f747 100644 --- a/tools/inc/tools/rtti.hxx +++ b/tools/inc/tools/rtti.hxx @@ -39,25 +39,25 @@ typedef void* (*TypeId)(); #define TYPEINFO() \ static void* CreateType(); \ static TypeId StaticType(); \ - static BOOL IsOf( TypeId aSameOrSuperType ); \ + static sal_Bool IsOf( TypeId aSameOrSuperType ); \ virtual TypeId Type() const; \ - virtual BOOL IsA( TypeId aSameOrSuperType ) const + virtual sal_Bool IsA( TypeId aSameOrSuperType ) const #define TYPEINFO_VISIBILITY(visibility) \ visibility static void* CreateType(); \ visibility static TypeId StaticType(); \ - visibility static BOOL IsOf( TypeId aSameOrSuperType ); \ + visibility static sal_Bool IsOf( TypeId aSameOrSuperType ); \ visibility virtual TypeId Type() const; \ - visibility virtual BOOL IsA( TypeId aSameOrSuperType ) const + visibility virtual sal_Bool IsA( TypeId aSameOrSuperType ) const #define TYPEINIT_FACTORY(sType, Factory ) \ void* sType::CreateType() { return Factory; } \ TypeId sType::StaticType() { return &CreateType; } \ TypeId sType::Type() const { return &CreateType; } \ - BOOL sType::IsOf( TypeId aSameOrSuperType ) \ + sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \ { \ if ( aSameOrSuperType == StaticType() ) \ - return TRUE + return sal_True #define STATICTYPE(sType) (sType::StaticType()) @@ -68,12 +68,12 @@ typedef void* (*TypeId)(); #define SUPERTYPE(sSuper) \ if ( sSuper::IsOf(aSameOrSuperType ) ) \ - return TRUE + return sal_True #define TYPEINIT_END(sType) \ - return FALSE; \ + return sal_False; \ } \ - BOOL sType::IsA( TypeId aSameOrSuperType ) const \ + sal_Bool sType::IsA( TypeId aSameOrSuperType ) const \ { return IsOf( aSameOrSuperType ); } #define TYPEINIT0_FACTORY(sType, Factory) \ @@ -122,16 +122,16 @@ typedef void* (*TypeId)(); #define TYPEINFO_ID(id) \ static TypeId StaticType() { return (TypeId) ( id | 0xF000000L ); } \ - static BOOL IsOf( TypeId aSameOrSuperType ); \ + static sal_Bool IsOf( TypeId aSameOrSuperType ); \ virtual TypeId Type() const; \ - virtual BOOL IsA( TypeId aSameOrSuperType ) const + virtual sal_Bool IsA( TypeId aSameOrSuperType ) const #define TYPEINIT_ID(sType) \ TypeId sType::Type() const { return StaticType(); } \ - BOOL sType::IsOf( TypeId aSameOrSuperType ) \ + sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \ { \ if ( aSameOrSuperType == StaticType() ) \ - return TRUE + return sal_True #define TYPEINIT0_ID(sType) \ TYPEINIT_ID(sType); \ diff --git a/tools/inc/tools/shl.hxx b/tools/inc/tools/shl.hxx index 4a77b1d5d14f..0abf98c25c45 100644 --- a/tools/inc/tools/shl.hxx +++ b/tools/inc/tools/shl.hxx @@ -110,7 +110,7 @@ #define SHL_COUNT 64 -TOOLS_DLLPUBLIC void** GetAppData( USHORT nSharedLib ); +TOOLS_DLLPUBLIC void** GetAppData( sal_uInt16 nSharedLib ); #endif // _SHL_HXX diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 09ad054a8257..a68d32ef588a 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -35,56 +35,24 @@ /*** common solar defines ***********************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - #ifdef _SOLAR__PRIVATE #undef _SOLAR__PRIVATE #endif #define _SOLAR__PRIVATE 1 #define __REFERENCED 0 -/*** common solar types ********************************************/ -/* NOTE: these types are deprecated, or soon will be. They should */ -/* not be used in new code, and should be replaced with their */ -/* corresponding types from sal/types.h in old code when possible. */ -/* Previous typedefs from before sal convergence are in comments */ -/* to the right of the new types. */ - -typedef sal_Bool BOOL; /* typedef unsigned char BOOL; */ -typedef sal_uInt8 BYTE; /* typedef unsigned char BYTE; */ -typedef sal_uInt16 USHORT; /* typedef unsigned short USHORT; */ -typedef sal_uIntPtr ULONG; /* typedef unsigned long ULONG; */ - -#if !defined(VCL_NEED_BASETSD) || defined(__MINGW32__) -#ifndef _SOLAR_NOUINT -typedef sal_Int16 INT16; /* typedef short INT16; */ -typedef sal_uInt16 UINT16; /* typedef unsigned short UINT16; */ -#if defined(SAL_W32) -typedef sal_sChar INT8; -#else -typedef sal_Char INT8; /* typedef char INT8; */ -#endif -typedef sal_uInt8 UINT8; /* typedef unsigned char UINT8; */ -#endif /* _SOLAR_NOUINT */ -#endif - -#ifndef VCL_NEED_BASETSD -#ifndef _SOLAR_NOUINT -/* types with exact defined size (not just the minimum size) */ -typedef sal_Int64 INT64; /* typedef long INT64; previously "void" on Windows */ -typedef sal_uInt64 UINT64; /* typedef unsigned long UINT64; previously "void" on Windows */ -typedef sal_Int32 INT32; /* typedef int INT32; previously "long" on Windows */ -typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previously "unsigned long" on Windows */ -#endif /* _SOLAR_NOUINT */ -#endif +/************************************************************ + Intermediate type to solve type clash with Windows headers. + Should be removed as soon as all code parts have been reviewed + and the correct type is known. Most of the times ULONG is meant + to be a 32-Bit unsigned integer type as sal_uInt32 is often + used for data exchange or for similiar method args. +*************************************************************/ +typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */ /*** misc. macros to leverage platform and compiler differences ********/ +typedef int FASTBOOL; #define DELETEZ( p ) ( delete p,p = 0 ) #ifdef WNT @@ -110,69 +78,69 @@ typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previousl always little endian; not necessarily aligned */ -typedef BYTE SVBT8[1]; -typedef BYTE SVBT16[2]; -typedef BYTE SVBT32[4]; -typedef BYTE SVBT64[8]; +typedef sal_uInt8 SVBT8[1]; +typedef sal_uInt8 SVBT16[2]; +typedef sal_uInt8 SVBT32[4]; +typedef sal_uInt8 SVBT64[8]; #ifdef __cplusplus -inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; } -inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0] - + ((USHORT)p[1] << 8); } +inline sal_uInt8 SVBT8ToByte ( const SVBT8 p ) { return p[0]; } +inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return (sal_uInt16)p[0] + + ((sal_uInt16)p[1] << 8); } inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0] + ((sal_uInt32)p[1] << 8) + ((sal_uInt32)p[2] << 16) + ((sal_uInt32)p[3] << 24); } #if defined OSL_LITENDIAN inline double SVBT64ToDouble( const SVBT64 p ) { double n; - ((BYTE*)&n)[0] = p[0]; - ((BYTE*)&n)[1] = p[1]; - ((BYTE*)&n)[2] = p[2]; - ((BYTE*)&n)[3] = p[3]; - ((BYTE*)&n)[4] = p[4]; - ((BYTE*)&n)[5] = p[5]; - ((BYTE*)&n)[6] = p[6]; - ((BYTE*)&n)[7] = p[7]; + ((sal_uInt8*)&n)[0] = p[0]; + ((sal_uInt8*)&n)[1] = p[1]; + ((sal_uInt8*)&n)[2] = p[2]; + ((sal_uInt8*)&n)[3] = p[3]; + ((sal_uInt8*)&n)[4] = p[4]; + ((sal_uInt8*)&n)[5] = p[5]; + ((sal_uInt8*)&n)[6] = p[6]; + ((sal_uInt8*)&n)[7] = p[7]; return n; } #else inline double SVBT64ToDouble( const SVBT64 p ) { double n; - ((BYTE*)&n)[0] = p[7]; - ((BYTE*)&n)[1] = p[6]; - ((BYTE*)&n)[2] = p[5]; - ((BYTE*)&n)[3] = p[4]; - ((BYTE*)&n)[4] = p[3]; - ((BYTE*)&n)[5] = p[2]; - ((BYTE*)&n)[6] = p[1]; - ((BYTE*)&n)[7] = p[0]; + ((sal_uInt8*)&n)[0] = p[7]; + ((sal_uInt8*)&n)[1] = p[6]; + ((sal_uInt8*)&n)[2] = p[5]; + ((sal_uInt8*)&n)[3] = p[4]; + ((sal_uInt8*)&n)[4] = p[3]; + ((sal_uInt8*)&n)[5] = p[2]; + ((sal_uInt8*)&n)[6] = p[1]; + ((sal_uInt8*)&n)[7] = p[0]; return n; } #endif -inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; } -inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n; - p[1] = (BYTE)(n >> 8); } -inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (BYTE) n; - p[1] = (BYTE)(n >> 8); - p[2] = (BYTE)(n >> 16); - p[3] = (BYTE)(n >> 24); } +inline void ByteToSVBT8 ( sal_uInt8 n, SVBT8 p ) { p[0] = n; } +inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = (sal_uInt8) n; + p[1] = (sal_uInt8)(n >> 8); } +inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (sal_uInt8) n; + p[1] = (sal_uInt8)(n >> 8); + p[2] = (sal_uInt8)(n >> 16); + p[3] = (sal_uInt8)(n >> 24); } #if defined OSL_LITENDIAN -inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0]; - p[1] = ((BYTE*)&n)[1]; - p[2] = ((BYTE*)&n)[2]; - p[3] = ((BYTE*)&n)[3]; - p[4] = ((BYTE*)&n)[4]; - p[5] = ((BYTE*)&n)[5]; - p[6] = ((BYTE*)&n)[6]; - p[7] = ((BYTE*)&n)[7]; } +inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[0]; + p[1] = ((sal_uInt8*)&n)[1]; + p[2] = ((sal_uInt8*)&n)[2]; + p[3] = ((sal_uInt8*)&n)[3]; + p[4] = ((sal_uInt8*)&n)[4]; + p[5] = ((sal_uInt8*)&n)[5]; + p[6] = ((sal_uInt8*)&n)[6]; + p[7] = ((sal_uInt8*)&n)[7]; } #else -inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[7]; - p[1] = ((BYTE*)&n)[6]; - p[2] = ((BYTE*)&n)[5]; - p[3] = ((BYTE*)&n)[4]; - p[4] = ((BYTE*)&n)[3]; - p[5] = ((BYTE*)&n)[2]; - p[6] = ((BYTE*)&n)[1]; - p[7] = ((BYTE*)&n)[0]; } +inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7]; + p[1] = ((sal_uInt8*)&n)[6]; + p[2] = ((sal_uInt8*)&n)[5]; + p[3] = ((sal_uInt8*)&n)[4]; + p[4] = ((sal_uInt8*)&n)[3]; + p[5] = ((sal_uInt8*)&n)[2]; + p[6] = ((sal_uInt8*)&n)[1]; + p[7] = ((sal_uInt8*)&n)[0]; } #endif #endif #endif @@ -343,7 +311,6 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } // ----------------------------------------------------------------------- -#define NOOLDSTRING #ifndef NOREPLACESTRING #define UniString String #define XubString String @@ -355,7 +322,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #ifdef STRING32 #define xub_StrLen sal_uInt32 #else -#define xub_StrLen USHORT +#define xub_StrLen sal_uInt16 #endif // -- moved here from libcall.hxx ---------------------------------------- @@ -369,7 +336,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \ s1 s2 s3 s4 -#if defined WIN || defined WNT || defined OS2 +#if defined WNT || defined OS2 #define SVLIBRARY( Base ) \ LIBRARY_CONCAT3( Base, __DLLEXTENSION, ".DLL" ) #define SVLIBRARYLANG( Base, Lang ) \ diff --git a/tools/inc/tools/stack.hxx b/tools/inc/tools/stack.hxx index 2794c554f8d3..d3c76d1a0165 100644 --- a/tools/inc/tools/stack.hxx +++ b/tools/inc/tools/stack.hxx @@ -45,7 +45,7 @@ public: using Container::GetObject; using Container::GetPos; - Stack( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) : + Stack( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) : Container( CONTAINER_MAXBLOCKSIZE, _nInitSize, _nReSize ) {} Stack( const Stack& rStack ) : Container( rStack ) {} @@ -56,9 +56,9 @@ public: Stack& operator =( const Stack& rStack ) { Container::operator =( rStack ); return *this; } - BOOL operator ==( const Stack& rStack ) const + sal_Bool operator ==( const Stack& rStack ) const { return Container::operator ==( rStack ); } - BOOL operator !=( const Stack& rStack ) const + sal_Bool operator !=( const Stack& rStack ) const { return Container::operator !=( rStack ); } }; @@ -73,8 +73,8 @@ public: \ using Stack::Clear; \ using Stack::Count; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ Stack( _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ Stack( rClassName ) {} \ @@ -83,12 +83,12 @@ public: \ Type Pop() { return (Type)Stack::Pop(); } \ Type Top() const { return (Type)Stack::Top(); } \ \ - Type GetObject( ULONG nIndex ) const \ + Type GetObject( sal_uIntPtr nIndex ) const \ { return (Type)Stack::GetObject( nIndex ); } \ - ULONG GetPos( const Type p ) const \ + sal_uIntPtr GetPos( const Type p ) const \ { return Stack::GetPos( (const void*)p ); } \ - ULONG GetPos( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return Stack::GetPos( (const void*)p, \ nStartIndex, \ bForward ); } \ @@ -97,9 +97,9 @@ public: \ { Stack::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rStack ) const \ + sal_Bool operator ==( const ClassName& rStack ) const \ { return Stack::operator ==( rStack ); } \ - BOOL operator !=( const ClassName& rStack ) const \ + sal_Bool operator !=( const ClassName& rStack ) const \ { return Stack::operator !=( rStack ); } \ }; diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index dc34cdc2d96c..d86df43ce93c 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -141,16 +141,16 @@ protected: public: TYPEINFO(); - SvLockBytes(): m_pStream(0), m_bOwner(FALSE), m_bSync(FALSE) {} + SvLockBytes(): m_pStream(0), m_bOwner(sal_False), m_bSync(sal_False) {} - SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = FALSE): - m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(FALSE) {} + SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = sal_False): + m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(sal_False) {} virtual ~SvLockBytes() { close(); } virtual const SvStream * GetStream() const { return m_pStream; } - virtual void SetSynchronMode(sal_Bool bTheSync = TRUE) { m_bSync = bTheSync; } + virtual void SetSynchronMode(sal_Bool bTheSync = sal_True) { m_bSync = bTheSync; } virtual sal_Bool IsSynchronMode() const { return m_bSync; } @@ -182,7 +182,7 @@ class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes public: TYPEINFO(); - SvOpenLockBytes(): SvLockBytes(0, FALSE) {} + SvOpenLockBytes(): SvLockBytes(0, sal_False) {} SvOpenLockBytes(SvStream * pStream, sal_Bool bOwner): SvLockBytes(pStream, bOwner) {} @@ -212,7 +212,7 @@ public: TYPEINFO(); SvAsyncLockBytes(SvStream * pStream, sal_Bool bOwner): - SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(FALSE) {} + SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(sal_False) {} virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount, sal_Size * pRead) const; @@ -227,7 +227,7 @@ public: virtual sal_Size Seek(sal_Size nPos); - virtual void Terminate() { m_bTerminated = TRUE; } + virtual void Terminate() { m_bTerminated = sal_True; } }; SV_DECL_IMPL_REF(SvAsyncLockBytes); @@ -256,8 +256,8 @@ private: unsigned int eIOMode:2; // STREAM_IO_* // Error-Codes, Konvertierung, Komprimierung, ... - int bIsDirty:1; // TRUE: Stream != Pufferinhalt - int bIsConsistent:1;// FALSE: Buffer enthaelt Daten, die NICHT + int bIsDirty:1; // sal_True: Stream != Pufferinhalt + int bIsConsistent:1;// sal_False: Buffer enthaelt Daten, die NICHT // per PutData in den abgeleiteten Stream // geschrieben werden duerfen (siehe PutBack) int bSwap:1; @@ -461,9 +461,20 @@ public: /// Switch to no endian swapping and write 0xfeff sal_Bool StartWritingUnicodeText(); - /// Read 16bit, if 0xfeff do nothing, if 0xfffe switch - /// endian swapping, if none of them put back - sal_Bool StartReadingUnicodeText(); + + /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, + if 0xfeff do nothing (UTF-16), if 0xfffe switch endian + swapping (UTF-16), if 0xefbb or 0xbbef read another byte + and check for UTF-8. If no UTF-* BOM was detected put all + read bytes back. This means that if 2 bytes were read it + was an UTF-16 BOM, if 3 bytes were read it was an UTF-8 + BOM. There is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection! + + If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a + BOM of that encoding and switch endian swapping if UTF-16 + and 0xfffe. + */ + sal_Bool StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ); /// Read a line of Unicode sal_Bool ReadUniStringLine( String& rStr ); @@ -649,7 +660,7 @@ inline SvStream& SvStream::ReadNumber( int& rInt ) /* inline SvStream& SvStream::ReadNumber( unsigned int& rUInt ) { - ULONG nTmp; + sal_uIntPtr nTmp; ReadNumber( nTmp ); rUInt = (unsigned int)nTmp; return *this; @@ -685,7 +696,7 @@ inline SvStream& SvStream::WriteNumber( int nInt ) /* inline SvStream& SvStream::WriteNumber( unsigned int nUInt ) { - WriteNumber( (ULONG)nUInt ); + WriteNumber( (sal_uIntPtr)nUInt ); return *this; } */ @@ -825,7 +836,7 @@ public: void* SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 ); void* SetBuffer( void* pBuf, sal_Size nSize, - sal_Bool bOwnsData=TRUE, sal_Size nEOF=0 ); + sal_Bool bOwnsData=sal_True, sal_Size nEOF=0 ); void ObjectOwnsMemory( sal_Bool bOwn ) { bOwnsData = bOwn; } sal_Bool IsObjectMemoryOwner() { return bOwnsData; } diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index ad2afc842b6b..e10e7288d1e8 100644..100755 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -168,7 +168,7 @@ private: TOOLS_DLLPRIVATE void ImplUpdateStringFromUniString( sal_Unicode const *, sal_Size, rtl_TextEncoding, sal_uInt32); TOOLS_DLLPRIVATE void ImplStringConvert( - rtl_TextEncoding, rtl_TextEncoding, BOOL); + rtl_TextEncoding, rtl_TextEncoding, sal_Bool); ByteString( const int* pDummy ); // not implemented: to prevent ByteString( NULL ) ByteString(int); // not implemented; to detect misuses @@ -270,29 +270,29 @@ public: ByteString& Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); static sal_Char Convert( sal_Char c, rtl_TextEncoding eSource, rtl_TextEncoding eTarget, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); static sal_Unicode ConvertToUnicode( sal_Char c, rtl_TextEncoding eTextEncoding ); static sal_Char ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); static sal_Unicode ConvertToUnicode( const sal_Char* pChar, sal_Size* pLen, rtl_TextEncoding eTextEncoding ); static sal_Size ConvertFromUnicode( sal_Unicode c, sal_Char* pBuf, sal_Size nBufLen, rtl_TextEncoding eTextEncoding, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); ByteString& ConvertLineEnd( LineEnd eLineEnd ); ByteString& ConvertLineEnd() { return ConvertLineEnd( GetSystemLineEnd() ); } - BOOL IsLowerAscii() const; - BOOL IsUpperAscii() const; - BOOL IsAlphaAscii() const; - BOOL IsNumericAscii() const; - BOOL IsAlphaNumericAscii() const; + sal_Bool IsLowerAscii() const; + sal_Bool IsUpperAscii() const; + sal_Bool IsAlphaAscii() const; + sal_Bool IsNumericAscii() const; + sal_Bool IsAlphaNumericAscii() const; ByteString& ToLowerAscii(); ByteString& ToUpperAscii(); @@ -305,17 +305,17 @@ public: xub_StrLen nLen = STRING_LEN ) const; StringCompare CompareIgnoreCaseToAscii( const sal_Char* pCharStr, xub_StrLen nLen = STRING_LEN ) const; - BOOL Equals( const ByteString& rStr ) const; - BOOL Equals( const sal_Char* pCharStr ) const; - BOOL EqualsIgnoreCaseAscii( const ByteString& rStr ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const; - BOOL Equals( const ByteString& rStr, + sal_Bool Equals( const ByteString& rStr ) const; + sal_Bool Equals( const sal_Char* pCharStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const; + sal_Bool Equals( const ByteString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL Equals( const sal_Char* pCharStr, + sal_Bool Equals( const sal_Char* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const ByteString& rStr, + sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr, + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; xub_StrLen Match( const ByteString& rStr ) const; @@ -354,41 +354,41 @@ public: void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN ); sal_Char* AllocBuffer( xub_StrLen nLen ); - friend BOOL operator == ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator == ( const ByteString& rStr1, const ByteString& rStr2 ) { return rStr1.Equals( rStr2 ); } - friend BOOL operator == ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator == ( const ByteString& rStr, const sal_Char* pCharStr ) { return rStr.Equals( pCharStr ); } - friend BOOL operator == ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator == ( const sal_Char* pCharStr, const ByteString& rStr ) { return rStr.Equals( pCharStr ); } - friend BOOL operator != ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator != ( const ByteString& rStr1, const ByteString& rStr2 ) { return !(operator == ( rStr1, rStr2 )); } - friend BOOL operator != ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator != ( const ByteString& rStr, const sal_Char* pCharStr ) { return !(operator == ( rStr, pCharStr )); } - friend BOOL operator != ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator != ( const sal_Char* pCharStr, const ByteString& rStr ) { return !(operator == ( pCharStr, rStr )); } - friend BOOL operator < ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator < ( const ByteString& rStr1, const ByteString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); } - friend BOOL operator < ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator < ( const ByteString& rStr, const sal_Char* pCharStr ) { return (rStr.CompareTo( pCharStr ) == COMPARE_LESS); } - friend BOOL operator < ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator < ( const sal_Char* pCharStr, const ByteString& rStr ) { return (rStr.CompareTo( pCharStr ) >= COMPARE_EQUAL); } - friend BOOL operator > ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator > ( const ByteString& rStr1, const ByteString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); } - friend BOOL operator > ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator > ( const ByteString& rStr, const sal_Char* pCharStr ) { return (rStr.CompareTo( pCharStr ) == COMPARE_GREATER); } - friend BOOL operator > ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator > ( const sal_Char* pCharStr, const ByteString& rStr ) { return (rStr.CompareTo( pCharStr ) <= COMPARE_EQUAL); } - friend BOOL operator <= ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator <= ( const ByteString& rStr1, const ByteString& rStr2 ) { return !(operator > ( rStr1, rStr2 )); } - friend BOOL operator <= ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator <= ( const ByteString& rStr, const sal_Char* pCharStr ) { return !(operator > ( rStr, pCharStr )); } - friend BOOL operator <= ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator <= ( const sal_Char* pCharStr, const ByteString& rStr ) { return !(operator > ( pCharStr, rStr )); } - friend BOOL operator >= ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator >= ( const ByteString& rStr1, const ByteString& rStr2 ) { return !(operator < ( rStr1, rStr2 )); } - friend BOOL operator >= ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator >= ( const ByteString& rStr, const sal_Char* pCharStr ) { return !(operator < ( rStr, pCharStr )); } - friend BOOL operator >= ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator >= ( const sal_Char* pCharStr, const ByteString& rStr ) { return !(operator < ( pCharStr, rStr )); } }; @@ -438,14 +438,6 @@ typedef struct _UniStringData #pragma pack() #endif -// ------------------- -// - UniString-Types - -// ------------------- - -#ifndef NOOLDSTRING -#define WSTRING_MAXLEN STRING_MAXLEN -#endif - // ------------- // - UniString - // ------------- @@ -603,23 +595,23 @@ public: xub_StrLen nLen = STRING_LEN ) const; StringCompare CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr, xub_StrLen nLen = STRING_LEN ) const; - BOOL Equals( const UniString& rStr ) const; - BOOL Equals( const sal_Unicode* pCharStr ) const; - BOOL EqualsAscii( const sal_Char* pAsciiStr ) const; - BOOL EqualsIgnoreCaseAscii( const UniString& rStr ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const; - BOOL Equals( const UniString& rStr, + sal_Bool Equals( const UniString& rStr ) const; + sal_Bool Equals( const sal_Unicode* pCharStr ) const; + sal_Bool EqualsAscii( const sal_Char* pAsciiStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const; + sal_Bool Equals( const UniString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL Equals( const sal_Unicode* pCharStr, + sal_Bool Equals( const sal_Unicode* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsAscii( const sal_Char* pAsciiStr, + sal_Bool EqualsAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const UniString& rStr, + sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr, + sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr, + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex, xub_StrLen nLen ) const; xub_StrLen Match( const UniString& rStr ) const; @@ -663,17 +655,17 @@ public: void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN ); sal_Unicode* AllocBuffer( xub_StrLen nLen ); - friend BOOL operator == ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator == ( const UniString& rStr1, const UniString& rStr2 ) { return rStr1.Equals( rStr2 ); } - friend BOOL operator != ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator != ( const UniString& rStr1, const UniString& rStr2 ) { return !(operator == ( rStr1, rStr2 )); } - friend BOOL operator < ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator < ( const UniString& rStr1, const UniString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); } - friend BOOL operator > ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator > ( const UniString& rStr1, const UniString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); } - friend BOOL operator <= ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator <= ( const UniString& rStr1, const UniString& rStr2 ) { return !(operator > ( rStr1, rStr2 )); } - friend BOOL operator >= ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator >= ( const UniString& rStr1, const UniString& rStr2 ) { return !(operator < ( rStr1, rStr2 )); } }; diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx index daba02272a05..86c5feb4f4dc 100644 --- a/tools/inc/tools/svborder.hxx +++ b/tools/inc/tools/svborder.hxx @@ -43,12 +43,12 @@ public: SvBorder( const Rectangle & rOuter, const Rectangle & rInner ); SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP ) { nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; } - BOOL operator == ( const SvBorder & rObj ) const + sal_Bool operator == ( const SvBorder & rObj ) const { return nTop == rObj.nTop && nRight == rObj.nRight && nBottom == rObj.nBottom && nLeft == rObj.nLeft; } - BOOL operator != ( const SvBorder & rObj ) const + sal_Bool operator != ( const SvBorder & rObj ) const { return !(*this == rObj); } SvBorder & operator = ( const SvBorder & rBorder ) { @@ -74,7 +74,7 @@ public: Bottom() -= rBorder.Bottom(); return *this; } - BOOL IsInside( const SvBorder & rInside ) + sal_Bool IsInside( const SvBorder & rInside ) { return nTop >= rInside.nTop && nRight >= rInside.nRight && nBottom >= rInside.nBottom && nLeft >= rInside.nLeft; diff --git a/tools/inc/tools/table.hxx b/tools/inc/tools/table.hxx index b29c5a955826..bfb91fbe7dc6 100644 --- a/tools/inc/tools/table.hxx +++ b/tools/inc/tools/table.hxx @@ -41,34 +41,34 @@ class TOOLS_DLLPUBLIC Table : private Container { private: - ULONG nCount; - TOOLS_DLLPRIVATE ULONG ImplGetIndex( ULONG nKey, ULONG* pIndex = NULL ) const; + sal_uIntPtr nCount; + TOOLS_DLLPRIVATE sal_uIntPtr ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex = NULL ) const; public: - Table( USHORT nInitSize = 16, USHORT nReSize = 16 ); + Table( sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16 ); Table( const Table& rTable ) : Container( rTable ) { nCount = rTable.nCount; } - BOOL Insert( ULONG nKey, void* p ); - void* Remove( ULONG nKey ); - void* Replace( ULONG nKey, void* p ); - void* Get( ULONG nKey ) const; + sal_Bool Insert( sal_uIntPtr nKey, void* p ); + void* Remove( sal_uIntPtr nKey ); + void* Replace( sal_uIntPtr nKey, void* p ); + void* Get( sal_uIntPtr nKey ) const; void Clear() { Container::Clear(); nCount = 0; } - ULONG Count() const { return( nCount ); } + sal_uIntPtr Count() const { return( nCount ); } void* GetCurObject() const; - ULONG GetCurKey() const { return (ULONG)Container::GetCurObject(); } - ULONG GetKey( const void* p ) const; - BOOL IsKeyValid( ULONG nKey ) const; + sal_uIntPtr GetCurKey() const { return (sal_uIntPtr)Container::GetCurObject(); } + sal_uIntPtr GetKey( const void* p ) const; + sal_Bool IsKeyValid( sal_uIntPtr nKey ) const; - void* GetObject( ULONG nPos ) const + void* GetObject( sal_uIntPtr nPos ) const { return Container::GetObject( (nPos*2)+1 ); } - ULONG GetObjectKey( ULONG nPos ) const - { return (ULONG)Container::GetObject( nPos*2 ); } - ULONG GetUniqueKey( ULONG nStartKey = 1 ) const; - ULONG SearchKey( ULONG nKey, ULONG* pPos = NULL ) const; + sal_uIntPtr GetObjectKey( sal_uIntPtr nPos ) const + { return (sal_uIntPtr)Container::GetObject( nPos*2 ); } + sal_uIntPtr GetUniqueKey( sal_uIntPtr nStartKey = 1 ) const; + sal_uIntPtr SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos = NULL ) const; - void* Seek( ULONG nKey ); + void* Seek( sal_uIntPtr nKey ); void* Seek( void* p ); void* First(); void* Last(); @@ -77,9 +77,9 @@ public: Table& operator =( const Table& rTable ); - BOOL operator ==( const Table& rTable ) const + sal_Bool operator ==( const Table& rTable ) const { return Container::operator ==( rTable ); } - BOOL operator !=( const Table& rTable ) const + sal_Bool operator !=( const Table& rTable ) const { return Container::operator !=( rTable ); } }; @@ -106,30 +106,30 @@ public: \ using Table::SearchKey; \ using Table::IsKeyValid; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ Table( _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ Table( rClassName ) {} \ \ - BOOL Insert( ULONG nKey, Type p ) \ + sal_Bool Insert( sal_uIntPtr nKey, Type p ) \ { return Table::Insert( nKey, (void*)p ); } \ - Type Remove( ULONG nKey ) \ + Type Remove( sal_uIntPtr nKey ) \ { return (Type)Table::Remove( nKey ); } \ - Type Replace( ULONG nKey, Type p ) \ + Type Replace( sal_uIntPtr nKey, Type p ) \ { return (Type)Table::Replace( nKey, (void*)p ); } \ - Type Get( ULONG nKey ) const \ + Type Get( sal_uIntPtr nKey ) const \ { return (Type)Table::Get( nKey ); } \ \ Type GetCurObject() const \ { return (Type)Table::GetCurObject(); } \ - ULONG GetKey( const Type p ) const \ + sal_uIntPtr GetKey( const Type p ) const \ { return Table::GetKey( (const void*)p ); } \ \ - Type GetObject( ULONG nPos ) const \ + Type GetObject( sal_uIntPtr nPos ) const \ { return (Type)Table::GetObject( nPos ); } \ \ - Type Seek( ULONG nKey ) \ + Type Seek( sal_uIntPtr nKey ) \ { return (Type)Table::Seek( nKey ); } \ Type Seek( Type p ) \ { return (Type)Table::Seek( (void*)p ); } \ @@ -142,9 +142,9 @@ public: \ { Table::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rTable ) const \ + sal_Bool operator ==( const ClassName& rTable ) const \ { return Table::operator ==( rTable ); } \ - BOOL operator !=( const ClassName& rTable ) const \ + sal_Bool operator !=( const ClassName& rTable ) const \ { return Table::operator !=( rTable ); } \ }; diff --git a/tools/inc/tools/tenccvt.hxx b/tools/inc/tools/tenccvt.hxx index f5ca13191e49..a5840d77b34d 100644 --- a/tools/inc/tools/tenccvt.hxx +++ b/tools/inc/tools/tenccvt.hxx @@ -51,8 +51,8 @@ TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEnco // is returned (normally windows-1252). TOOLS_DLLPUBLIC rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding ); -TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 ); -TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 ); +TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 ); +TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 ); /* * Given a Unicode character, return a legacy Microsoft Encoding which diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx index 6fb93f2e718c..9b2534013af6 100644 --- a/tools/inc/tools/time.hxx +++ b/tools/inc/tools/time.hxx @@ -47,28 +47,28 @@ public: Time( const ResId & rResId ); Time( sal_Int32 _nTime ) { Time::nTime = _nTime; } Time( const Time& rTime ); - Time( ULONG nHour, ULONG nMin, - ULONG nSec = 0, ULONG n100Sec = 0 ); + Time( sal_uIntPtr nHour, sal_uIntPtr nMin, + sal_uIntPtr nSec = 0, sal_uIntPtr n100Sec = 0 ); void SetTime( sal_Int32 nNewTime ) { nTime = nNewTime; } sal_Int32 GetTime() const { return nTime; } - void SetHour( USHORT nNewHour ); - void SetMin( USHORT nNewMin ); - void SetSec( USHORT nNewSec ); - void Set100Sec( USHORT nNew100Sec ); - USHORT GetHour() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)(nTempTime / 1000000); } - USHORT GetMin() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)((nTempTime / 10000) % 100); } - USHORT GetSec() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)((nTempTime / 100) % 100); } - USHORT Get100Sec() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)(nTempTime % 100); } + void SetHour( sal_uInt16 nNewHour ); + void SetMin( sal_uInt16 nNewMin ); + void SetSec( sal_uInt16 nNewSec ); + void Set100Sec( sal_uInt16 nNew100Sec ); + sal_uInt16 GetHour() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)(nTempTime / 1000000); } + sal_uInt16 GetMin() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)((nTempTime / 10000) % 100); } + sal_uInt16 GetSec() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)((nTempTime / 100) % 100); } + sal_uInt16 Get100Sec() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)(nTempTime % 100); } sal_Int32 GetMSFromTime() const; void MakeTimeFromMS( sal_Int32 nMS ); @@ -76,27 +76,27 @@ public: /// 12 hours == 0.5 days double GetTimeInDays() const; - BOOL IsBetween( const Time& rFrom, const Time& rTo ) const + sal_Bool IsBetween( const Time& rFrom, const Time& rTo ) const { return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); } - BOOL IsEqualIgnore100Sec( const Time& rTime ) const; + sal_Bool IsEqualIgnore100Sec( const Time& rTime ) const; - BOOL operator ==( const Time& rTime ) const + sal_Bool operator ==( const Time& rTime ) const { return (nTime == rTime.nTime); } - BOOL operator !=( const Time& rTime ) const + sal_Bool operator !=( const Time& rTime ) const { return (nTime != rTime.nTime); } - BOOL operator >( const Time& rTime ) const + sal_Bool operator >( const Time& rTime ) const { return (nTime > rTime.nTime); } - BOOL operator <( const Time& rTime ) const + sal_Bool operator <( const Time& rTime ) const { return (nTime < rTime.nTime); } - BOOL operator >=( const Time& rTime ) const + sal_Bool operator >=( const Time& rTime ) const { return (nTime >= rTime.nTime); } - BOOL operator <=( const Time& rTime ) const + sal_Bool operator <=( const Time& rTime ) const { return (nTime <= rTime.nTime); } static Time GetUTCOffset(); - static ULONG GetSystemTicks(); // Elapsed time - static ULONG GetProcessTicks(); // CPU time + static sal_uIntPtr GetSystemTicks(); // Elapsed time + static sal_uIntPtr GetProcessTicks(); // CPU time void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } diff --git a/tools/inc/tools/unqid.hxx b/tools/inc/tools/unqid.hxx index 7758612556fb..9e05b44b4437 100644 --- a/tools/inc/tools/unqid.hxx +++ b/tools/inc/tools/unqid.hxx @@ -37,8 +37,8 @@ struct ImpUniqueId { - ULONG nId; - USHORT nRefCount; + sal_uIntPtr nId; + sal_uInt16 nRefCount; void Release() { nRefCount--; @@ -72,7 +72,7 @@ public: pId = rId.pId; return *this; } - ULONG GetId() const { return pId ? pId->nId : 0; } + sal_uIntPtr GetId() const { return pId ? pId->nId : 0; } }; // --------------------- @@ -81,30 +81,30 @@ public: class TOOLS_DLLPUBLIC UniqueIdContainer : private UniqueIndex { - USHORT nCollectCount; + sal_uInt16 nCollectCount; public: // Irgend etwas mit protected falsch - void Clear( BOOL bAll ); - UniqueItemId CreateIdProt( ULONG nId ); + void Clear( sal_Bool bAll ); + UniqueItemId CreateIdProt( sal_uIntPtr nId ); public: - UniqueIdContainer( ULONG _nStartIndex, - ULONG _nInitSize = 16, - ULONG _nReSize = 16 ) + UniqueIdContainer( sal_uIntPtr _nStartIndex, + sal_uIntPtr _nInitSize = 16, + sal_uIntPtr _nReSize = 16 ) : UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) , nCollectCount( 0 ) {} UniqueIdContainer( const UniqueIdContainer& ); ~UniqueIdContainer() - { Clear( TRUE ); } + { Clear( sal_True ); } UniqueIdContainer& operator = ( const UniqueIdContainer & ); - BOOL IsIndexValid( ULONG nIndex ) const + sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const { return UniqueIndex::IsIndexValid( nIndex ); } UniqueItemId CreateId(); - static UniqueItemId CreateFreeId( ULONG nId ); // freies Id + static UniqueItemId CreateFreeId( sal_uIntPtr nId ); // freies Id }; #endif // _UNQID_HXX diff --git a/tools/inc/tools/unqidx.hxx b/tools/inc/tools/unqidx.hxx index 1e957aeaa80f..74aa57d54d1a 100644 --- a/tools/inc/tools/unqidx.hxx +++ b/tools/inc/tools/unqidx.hxx @@ -41,47 +41,47 @@ class TOOLS_DLLPUBLIC UniqueIndex : private Container { private: - ULONG nReSize; - ULONG nStartIndex; - ULONG nUniqIndex; - ULONG nCount; + sal_uIntPtr nReSize; + sal_uIntPtr nStartIndex; + sal_uIntPtr nUniqIndex; + sal_uIntPtr nCount; public: using Container::GetCurObject; - UniqueIndex( ULONG nStartIndex = 0, - ULONG nInitSize = 16, - ULONG nReSize = 16 ); + UniqueIndex( sal_uIntPtr nStartIndex = 0, + sal_uIntPtr nInitSize = 16, + sal_uIntPtr nReSize = 16 ); UniqueIndex( const UniqueIndex& rIdx ); - ULONG Insert( ULONG nIndex, void* p ); - ULONG Insert( void* p ); - void* Remove( ULONG nIndex ); - void* Replace( ULONG nIndex, void* p ); - void* Get( ULONG nIndex ) const; + sal_uIntPtr Insert( sal_uIntPtr nIndex, void* p ); + sal_uIntPtr Insert( void* p ); + void* Remove( sal_uIntPtr nIndex ); + void* Replace( sal_uIntPtr nIndex, void* p ); + void* Get( sal_uIntPtr nIndex ) const; void Clear(); - ULONG Count() const { return nCount; } + sal_uIntPtr Count() const { return nCount; } - ULONG GetCurIndex() const; - ULONG GetIndex( const void* p ) const; - BOOL IsIndexValid( ULONG nIndex ) const; + sal_uIntPtr GetCurIndex() const; + sal_uIntPtr GetIndex( const void* p ) const; + sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const; - void* Seek( ULONG nIndex ); + void* Seek( sal_uIntPtr nIndex ); void* Seek( void* p ); void* First(); void* Last(); void* Next(); void* Prev(); - ULONG GetStartIndex() const { return nStartIndex; } - ULONG GetCurMaxIndex() const + sal_uIntPtr GetStartIndex() const { return nStartIndex; } + sal_uIntPtr GetCurMaxIndex() const { return (nStartIndex + Container::GetSize()); } UniqueIndex& operator =( const UniqueIndex& rIdx ); - BOOL operator ==( const UniqueIndex& rIdx ) const; - BOOL operator !=( const UniqueIndex& rIdx ) const + sal_Bool operator ==( const UniqueIndex& rIdx ) const; + sal_Bool operator !=( const UniqueIndex& rIdx ) const { return !(UniqueIndex::operator==( rIdx )); } }; @@ -107,30 +107,30 @@ public: \ using UniqueIndex::GetStartIndex; \ using UniqueIndex::GetCurMaxIndex; \ \ - ClassName( ULONG _nStartIndex = 0, \ - ULONG _nInitSize = 16, ULONG _nReSize = 16 ):\ + ClassName( sal_uIntPtr _nStartIndex = 0, \ + sal_uIntPtr _nInitSize = 16, sal_uIntPtr _nReSize = 16 ):\ UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) {}\ ClassName( const ClassName& rClassName ) : \ UniqueIndex( rClassName ) {} \ \ - ULONG Insert( ULONG nIndex, Type p ) \ + sal_uIntPtr Insert( sal_uIntPtr nIndex, Type p ) \ { return UniqueIndex::Insert( nIndex, (void*)p ); } \ - ULONG Insert( Type p ) \ + sal_uIntPtr Insert( Type p ) \ { return UniqueIndex::Insert( (void*)p ); } \ - Type Remove( ULONG nIndex ) \ + Type Remove( sal_uIntPtr nIndex ) \ { return (Type)UniqueIndex::Remove( nIndex ); } \ - Type Replace( ULONG nIndex, Type p ) \ + Type Replace( sal_uIntPtr nIndex, Type p ) \ { return (Type)UniqueIndex::Replace( nIndex, \ (void*)p ); } \ - Type Get( ULONG nIndex ) const \ + Type Get( sal_uIntPtr nIndex ) const \ { return (Type)UniqueIndex::Get( nIndex ); } \ \ Type GetCurObject() const \ { return (Type)UniqueIndex::GetCurObject(); } \ - ULONG GetIndex( const Type p ) const \ + sal_uIntPtr GetIndex( const Type p ) const \ { return UniqueIndex::GetIndex( (const void*)p ); } \ \ - Type Seek( ULONG nKey ) \ + Type Seek( sal_uIntPtr nKey ) \ { return (Type)UniqueIndex::Seek( nKey ); } \ Type Seek( Type p ) \ { return (Type)UniqueIndex::Seek( (void*)p ); } \ @@ -143,9 +143,9 @@ public: \ { UniqueIndex::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rIdx ) const \ + sal_Bool operator ==( const ClassName& rIdx ) const \ { return UniqueIndex::operator ==( rIdx ); } \ - BOOL operator !=( const ClassName& rIdx ) const \ + sal_Bool operator !=( const ClassName& rIdx ) const \ { return UniqueIndex::operator !=( rIdx ); } \ }; diff --git a/tools/inc/tools/urlkeys.hxx b/tools/inc/tools/urlkeys.hxx deleted file mode 100644 index 0182e2f2cae5..000000000000 --- a/tools/inc/tools/urlkeys.hxx +++ /dev/null @@ -1,79 +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. - * - ************************************************************************/ - -#ifndef __URLKEYS_HXX -#define __URLKEYS_HXX - -// Defines for common keys in URL files - -// ANSI version - -#define A_URLSECTION_SHORTCUT "InternetShortcut" -#define A_URLKEY_URL "URL" -#define A_URLKEY_TITLE "Title" -#define A_URLKEY_TARGET "Target" -#define A_URLKEY_FRAME "Frame" -#define A_URLKEY_OPENAS "OpenAs" -#define A_URLKEY_SOICON "SOIcon" -#define A_URLKEY_WIN_ICONFILE "IconFile" -#define A_URLKEY_WIN_ICONINDEX "IconIndex" -#define A_URLKEY_WORKDIR "WorkingDirectory" -#define A_URLKEY_ARGUMENTS "Arguments" -#define A_URLKEY_INTERN_ORIGURL "[URL]" - -// Unicode version - -#define U_URLSECTION_SHORTCUT L"InternetShortcut" -#define U_URLKEY_URL L"URL" -#define U_URLKEY_TITLE L"Title" -#define U_URLKEY_TARGET L"Target" -#define U_URLKEY_FRAME L"Frame" -#define U_URLKEY_OPENAS L"OpenAs" -#define U_URLKEY_SOICON L"SOIcon" -#define U_URLKEY_WIN_ICONFILE L"IconFile" -#define U_URLKEY_WIN_ICONINDEX L"IconIndex" -#define U_URLKEY_WORKDIR L"WorkingDirectory" -#define U_URLKEY_ARGUMENTS L"Arguments" -#define U_URLKEY_INTERN_ORIGURL L"[URL]" - -# define URLSECTION_SHORTCUT U_URLSECTION_SHORTCUT -# define URLKEY_URL U_URLKEY_URL -# define URLKEY_TITLE U_URLKEY_TITLE -# define URLKEY_TARGET U_URLKEY_TARGET -# define URLKEY_FRAME U_URLKEY_FRAME -# define URLKEY_OPENAS U_URLKEY_OPENAS -# define URLKEY_SOICON U_URLKEY_SOICON -# define URLKEY_WIN_ICONFILE U_URLKEY_WIN_ICONFILE -# define URLKEY_WIN_ICONINDEX U_URLKEY_WIN_ICONINDEX -# define URLKEY_WORKDIR U_URLKEY_WORKDIR -# define URLKEY_ARGUMENTS U_URLKEY_ARGUMENTS -# define URLKEY_INTERN_ORIGURL U_URLKEY_INTERN_ORIGURL - -#endif // __URLKEYS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx index b2a29af841a6..67342db5d161 100644 --- a/tools/inc/tools/urlobj.hxx +++ b/tools/inc/tools/urlobj.hxx @@ -82,6 +82,7 @@ namespace com { namespace sun { namespace star { namespace util { #define INET_DB_SCHEME "db:" #define INET_BUGID_SCHEME "bugid:" #define INET_TELNET_SCHEME "telnet://" +#define INET_HID_SCHEME "hid:" #define URL_PREFIX_PRIV_SOFFICE "private:" enum @@ -140,8 +141,9 @@ enum INetProtocol INET_PROT_VND_SUN_STAR_TDOC = 29, INET_PROT_GENERIC = 30, INET_PROT_SMB = 31, - INET_PROT_SFTP = 32, - INET_PROT_END = 33 + INET_PROT_HID = 32, + INET_PROT_SFTP = 33, + INET_PROT_END = 34 }; //============================================================================ diff --git a/tools/inc/tools/vcompat.hxx b/tools/inc/tools/vcompat.hxx index 8fbc897ec62c..dcac766aaf78 100644 --- a/tools/inc/tools/vcompat.hxx +++ b/tools/inc/tools/vcompat.hxx @@ -36,10 +36,10 @@ // ----------- #define COMPAT_FORMAT( char1, char2, char3, char4 ) \ - ((UINT32)((((UINT32)(char)(char1)))| \ - (((UINT32)(char)(char2))<<8UL)| \ - (((UINT32)(char)(char3))<<16UL)| \ - ((UINT32)(char)(char4))<<24UL)) + ((sal_uInt32)((((sal_uInt32)(char)(char1)))| \ + (((sal_uInt32)(char)(char2))<<8UL)| \ + (((sal_uInt32)(char)(char3))<<16UL)| \ + ((sal_uInt32)(char)(char4))<<24UL)) // -------------- // - ImplCompat - @@ -50,22 +50,22 @@ class SvStream; class TOOLS_DLLPUBLIC VersionCompat { SvStream* mpRWStm; - UINT32 mnCompatPos; - UINT32 mnTotalSize; - UINT16 mnStmMode; - UINT16 mnVersion; + sal_uInt32 mnCompatPos; + sal_uInt32 mnTotalSize; + sal_uInt16 mnStmMode; + sal_uInt16 mnVersion; VersionCompat() {} VersionCompat( const VersionCompat& ) {} VersionCompat& operator=( const VersionCompat& ) { return *this; } - BOOL operator==( const VersionCompat& ) { return FALSE; } + sal_Bool operator==( const VersionCompat& ) { return sal_False; } public: - VersionCompat( SvStream& rStm, USHORT nStreamMode, UINT16 nVersion = 1 ); + VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 ); ~VersionCompat(); - UINT16 GetVersion() const { return mnVersion; } + sal_uInt16 GetVersion() const { return mnVersion; } }; #endif // _VCOMPAT_HXX diff --git a/tools/inc/tools/vector2d.hxx b/tools/inc/tools/vector2d.hxx index e6d98b7cbb98..4b6d6473ff0b 100644 --- a/tools/inc/tools/vector2d.hxx +++ b/tools/inc/tools/vector2d.hxx @@ -88,8 +88,8 @@ public: inline Vector2D& operator/=(double t) { mfX /= t; mfY /= t; return *this; } inline Vector2D operator/(double t) const { Vector2D aNew(*this); aNew /= t; return aNew; } - inline BOOL operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); } - inline BOOL operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); } + inline sal_Bool operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); } + inline sal_Bool operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); } inline Vector2D& operator=( const Vector2D& rVec ) { mfX = rVec.mfX, mfY = rVec.mfY; return *this; } inline Vector2D& operator=( const Pair& rPair ) { mfX = rPair.nA, mfY = rPair.nB; return *this; } @@ -98,11 +98,11 @@ public: inline Vector2D& operator*=( const Pair& rPair ) { mfX *= rPair.nA, mfY *= rPair.nB; return *this; } inline Vector2D& operator/=( const Pair& rPair ) { mfX /= rPair.nA, mfY /= rPair.nB; return *this; } - inline BOOL operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); } - inline BOOL operator!=( const Pair& rPair ) const { return !( *this == rPair ); } + inline sal_Bool operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); } + inline sal_Bool operator!=( const Pair& rPair ) const { return !( *this == rPair ); } - inline BOOL IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); } - inline BOOL IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); } + inline sal_Bool IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); } + inline sal_Bool IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); } }; // ----------------------------------------------------------------------------- diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index a590183c5154..e4f0a0daf7f1 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -35,7 +35,7 @@ // - Window-Types - // ---------------- -typedef USHORT WindowType; +typedef sal_uInt16 WindowType; #define WINDOW_BASE 0x0100 #define WINDOW_FIRST (WINDOW_BASE + 0x30) #define WINDOW_MESSBOX (WINDOW_FIRST) @@ -118,14 +118,14 @@ typedef USHORT WindowType; #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f) #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50) #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51) -#define WINDOW_LAST (WINDOW_DOCKINGAREA) +#define WINDOW_RULER (WINDOW_FIRST + 0x52) +#define WINDOW_LAST (WINDOW_RULER) // --------------- // - Window-Bits - // --------------- -// By changes you must also change: rsc/vclrsc.hxx typedef sal_Int64 WinBits; // Window-Bits fuer Window @@ -241,9 +241,6 @@ typedef sal_Int64 WinBits; #define WB_SCROLL ((WinBits)0x02000000) #define WB_FORCETABCYCLE ((WinBits)0x04000000) -// Window-Bits for TabControl -#define WB_SINGLELINE ((WinBits)0x02000000) - // Window-Bits for DockingWindows #define WB_DOCKBORDER ((WinBits)0x00001000) @@ -277,9 +274,16 @@ typedef sal_Int64 WinBits; #define WB_STDPOPUP (WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_3DLOOK | WB_DIALOGCONTROL) // For TreeListBox -#define WB_HASBUTTONS ((WinBits)0x00800000) -#define WB_HASLINES ((WinBits)0x01000000) -#define WB_HASLINESATROOT ((WinBits)0x02000000) +#define WB_HASBUTTONS ((WinBits)SAL_CONST_INT64(0x000100000000)) +#define WB_HASLINES ((WinBits)SAL_CONST_INT64(0x000200000000)) +#define WB_HASLINESATROOT ((WinBits)SAL_CONST_INT64(0x000400000000)) +#define WB_HASBUTTONSATROOT ((WinBits)SAL_CONST_INT64(0x000800000000)) +#define WB_NOINITIALSELECTION ((WinBits)SAL_CONST_INT64(0x001000000000)) +#define WB_HIDESELECTION ((WinBits)SAL_CONST_INT64(0x002000000000)) +#define WB_FORCE_MAKEVISIBLE ((WinBits)SAL_CONST_INT64(0x004000000000)) +// DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW +#define WB_QUICK_SEARCH ((WinBits)SAL_CONST_INT64(0x010000000000)) + // For FileOpen Dialog #define WB_PATH ((WinBits)0x00100000) @@ -301,7 +305,6 @@ typedef sal_Int64 WinBits; // - WindowAlign - // --------------- -// By changes you must also change: rsc/vclrsc.hxx enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM }; enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM, IMAGEALIGN_LEFT_TOP, IMAGEALIGN_LEFT_BOTTOM, IMAGEALIGN_TOP_LEFT, @@ -313,7 +316,6 @@ enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT }; // - TriState - // ------------ -// By changes you must also change: rsc/vclrsc.hxx enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; @@ -321,7 +323,7 @@ enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; // - ButtonDialog-Types - // ---------------------- -typedef USHORT StandardButtonType; +typedef sal_uInt16 StandardButtonType; #define BUTTON_OK ((StandardButtonType)0) #define BUTTON_CANCEL ((StandardButtonType)1) #define BUTTON_YES ((StandardButtonType)2) diff --git a/tools/inc/tools/wldcrd.hxx b/tools/inc/tools/wldcrd.hxx index 3e200b2e7f0f..c1c6a33fcaa0 100644 --- a/tools/inc/tools/wldcrd.hxx +++ b/tools/inc/tools/wldcrd.hxx @@ -43,7 +43,7 @@ private: ByteString aWildString; char cSepSymbol; - USHORT ImpMatch( const char *pWild, const char *pStr ) const; + sal_uInt16 ImpMatch( const char *pWild, const char *pStr ) const; public: WildCard(); @@ -53,11 +53,11 @@ public: const String GetWildCard() const { return UniString( aWildString, osl_getThreadTextEncoding()); } const String operator ()() const { return UniString( aWildString, osl_getThreadTextEncoding()); } - BOOL Matches( const String& rStr ) const; + sal_Bool Matches( const String& rStr ) const; - BOOL operator ==( const String& rString ) const + sal_Bool operator ==( const String& rString ) const { return Matches( rString ); } - BOOL operator !=( const String& rString ) const + sal_Bool operator !=( const String& rString ) const { return !( Matches( rString ) ); } WildCard& operator =( const String& rString ); diff --git a/tools/inc/tools/zcodec.hxx b/tools/inc/tools/zcodec.hxx index 9d3a7e4739e2..578f367b4cdd 100644 --- a/tools/inc/tools/zcodec.hxx +++ b/tools/inc/tools/zcodec.hxx @@ -74,47 +74,47 @@ class TOOLS_DLLPUBLIC ZCodec { private: - ULONG mbInit; - BOOL mbStatus; - BOOL mbFinish; - ULONG mnMemUsage; + sal_uIntPtr mbInit; + sal_Bool mbStatus; + sal_Bool mbFinish; + sal_uIntPtr mnMemUsage; SvStream* mpIStm; - BYTE* mpInBuf; - ULONG mnInBufSize; - ULONG mnInToRead; + sal_uInt8* mpInBuf; + sal_uIntPtr mnInBufSize; + sal_uIntPtr mnInToRead; SvStream* mpOStm; - BYTE* mpOutBuf; - ULONG mnOutBufSize; + sal_uInt8* mpOutBuf; + sal_uIntPtr mnOutBufSize; - ULONG mnCRC; - ULONG mnCompressMethod; + sal_uIntPtr mnCRC; + sal_uIntPtr mnCompressMethod; void* mpsC_Stream; - void ImplInitBuf( BOOL nIOFlag ); + void ImplInitBuf( sal_Bool nIOFlag ); void ImplWriteBack( void ); public: - ZCodec( ULONG nInBuf, ULONG nOutBuf, ULONG nMemUsage = MAX_MEM_USAGE ); + ZCodec( sal_uIntPtr nInBuf, sal_uIntPtr nOutBuf, sal_uIntPtr nMemUsage = MAX_MEM_USAGE ); ZCodec( void ); virtual ~ZCodec(); - virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT ); + virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT ); virtual long EndCompression(); - BOOL IsFinished () const { return mbFinish; } + sal_Bool IsFinished () const { return mbFinish; } long Compress( SvStream& rIStm, SvStream& rOStm ); long Decompress( SvStream& rIStm, SvStream& rOStm ); - long Write( SvStream& rOStm, const BYTE* pData, ULONG nSize ); - long Read( SvStream& rIStm, BYTE* pData, ULONG nSize ); - long ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize ); + long Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize ); + long Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize ); + long ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize ); - void SetBreak( ULONG ); - ULONG GetBreak( void ); - void SetCRC( ULONG nCurrentCRC ); - ULONG UpdateCRC( ULONG nLatestCRC, ULONG nSource ); - ULONG UpdateCRC( ULONG nLatestCRC, BYTE* pSource, long nDatSize ); - ULONG GetCRC(); + void SetBreak( sal_uIntPtr ); + sal_uIntPtr GetBreak( void ); + void SetCRC( sal_uIntPtr nCurrentCRC ); + sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uIntPtr nSource ); + sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize ); + sal_uIntPtr GetCRC(); }; class GZCodec : public ZCodec @@ -123,7 +123,7 @@ class GZCodec : public ZCodec public: GZCodec(){}; ~GZCodec(){}; - virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT ); + virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT ); }; #endif // _ZCODEC_HXX |