summaryrefslogtreecommitdiff
path: root/svl/inc/svl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-11 14:24:23 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-11 14:24:23 +0100
commit67d2af6fac2d9bad52a6b1f6e0cbd1229eb88a42 (patch)
tree898019746162b464578da9c8345158a74321c904 /svl/inc/svl
parent86fb5fff88be611785b7908aac2a44475d77705f (diff)
parente2a3d487efb2bd5e582eb10e4150530c3f7377c5 (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 'svl/inc/svl')
-rw-r--r--svl/inc/svl/PasswordHelper.hxx57
-rw-r--r--svl/inc/svl/adrparse.hxx109
-rw-r--r--svl/inc/svl/aeitem.hxx30
-rw-r--r--svl/inc/svl/brdcst.hxx8
-rw-r--r--svl/inc/svl/broadcast.hxx69
-rw-r--r--svl/inc/svl/cenumitm.hxx64
-rw-r--r--svl/inc/svl/cintitem.hxx96
-rw-r--r--svl/inc/svl/cntnrsrt.hxx175
-rw-r--r--svl/inc/svl/cntwall.hxx20
-rw-r--r--svl/inc/svl/cntwids.hrc472
-rw-r--r--svl/inc/svl/converter.hxx45
-rw-r--r--svl/inc/svl/ctypeitm.hxx14
-rw-r--r--svl/inc/svl/custritm.hxx8
-rw-r--r--svl/inc/svl/dateitem.hxx16
-rw-r--r--svl/inc/svl/eitem.hxx10
-rw-r--r--svl/inc/svl/filenotation.hxx71
-rw-r--r--svl/inc/svl/filerec.hxx290
-rw-r--r--svl/inc/svl/flagitem.hxx24
-rw-r--r--svl/inc/svl/folderrestriction.hxx59
-rw-r--r--svl/inc/svl/fstathelper.hxx68
-rw-r--r--svl/inc/svl/globalnameitem.hxx6
-rw-r--r--svl/inc/svl/hint.hxx10
-rw-r--r--svl/inc/svl/httpcook.hxx10
-rw-r--r--svl/inc/svl/ilstitem.hxx6
-rw-r--r--svl/inc/svl/imageitm.hxx12
-rw-r--r--svl/inc/svl/inetdef.hxx31
-rw-r--r--svl/inc/svl/inethist.hxx12
-rw-r--r--svl/inc/svl/inetmsg.hxx31
-rw-r--r--svl/inc/svl/inetstrm.hxx31
-rw-r--r--svl/inc/svl/instrm.hxx82
-rw-r--r--svl/inc/svl/intitem.hxx48
-rw-r--r--svl/inc/svl/itemiter.hxx12
-rw-r--r--svl/inc/svl/itempool.hxx112
-rw-r--r--svl/inc/svl/itemprop.hxx16
-rw-r--r--svl/inc/svl/itemset.hxx68
-rw-r--r--svl/inc/svl/lckbitem.hxx12
-rw-r--r--svl/inc/svl/listener.hxx67
-rw-r--r--svl/inc/svl/listeneriter.hxx81
-rw-r--r--svl/inc/svl/lngmisc.hxx79
-rw-r--r--svl/inc/svl/lstner.hxx12
-rw-r--r--svl/inc/svl/macitem.hxx36
-rw-r--r--svl/inc/svl/mailenum.hxx8
-rw-r--r--svl/inc/svl/metitem.hxx4
-rw-r--r--svl/inc/svl/nfsymbol.hxx73
-rw-r--r--svl/inc/svl/nranges.hxx14
-rw-r--r--svl/inc/svl/numuno.hxx101
-rw-r--r--svl/inc/svl/outstrm.hxx68
-rw-r--r--svl/inc/svl/ownlist.hxx4
-rw-r--r--svl/inc/svl/pickerhelper.hxx72
-rw-r--r--svl/inc/svl/pickerhistory.hxx53
-rw-r--r--svl/inc/svl/pickerhistoryaccess.hxx54
-rw-r--r--svl/inc/svl/poolcach.hxx71
-rw-r--r--svl/inc/svl/poolitem.hxx65
-rw-r--r--svl/inc/svl/ptitem.hxx12
-rw-r--r--svl/inc/svl/rectitem.hxx12
-rw-r--r--svl/inc/svl/rngitem.hxx22
-rw-r--r--svl/inc/svl/sfontitm.hxx8
-rw-r--r--svl/inc/svl/slstitm.hxx14
-rw-r--r--svl/inc/svl/smplhint.hxx10
-rw-r--r--svl/inc/svl/srchitem.hxx10
-rw-r--r--svl/inc/svl/stritem.hxx8
-rw-r--r--svl/inc/svl/strmadpt.hxx137
-rw-r--r--svl/inc/svl/style.hxx120
-rw-r--r--svl/inc/svl/stylepool.hxx101
-rw-r--r--svl/inc/svl/svarray.hxx494
-rw-r--r--svl/inc/svl/svdde.hxx64
-rw-r--r--svl/inc/svl/svldata.hxx2
-rw-r--r--svl/inc/svl/svstdarr.hxx44
-rw-r--r--svl/inc/svl/szitem.hxx12
-rw-r--r--svl/inc/svl/undo.hxx377
-rw-r--r--svl/inc/svl/urihelper.hxx238
-rw-r--r--svl/inc/svl/urlbmk.hxx71
-rw-r--r--svl/inc/svl/visitem.hxx20
-rw-r--r--svl/inc/svl/whiter.hxx63
-rw-r--r--svl/inc/svl/xmlement.hxx43
-rw-r--r--svl/inc/svl/zforlist.hxx176
-rw-r--r--svl/inc/svl/zformat.hxx224
77 files changed, 3992 insertions, 1356 deletions
diff --git a/svl/inc/svl/PasswordHelper.hxx b/svl/inc/svl/PasswordHelper.hxx
new file mode 100644
index 000000000000..29f092f5fc9d
--- /dev/null
+++ b/svl/inc/svl/PasswordHelper.hxx
@@ -0,0 +1,57 @@
+/* -*- 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 _SVTOOLS_PASSWORDHELPER_HXX
+#define _SVTOOLS_PASSWORDHELPER_HXX
+
+#include "svl/svldllapi.h"
+#include "sal/types.h"
+#include "com/sun/star/uno/Sequence.hxx"
+
+class String;
+
+class SvPasswordHelper
+{
+ static void GetHashPasswordLittleEndian(com::sun::star::uno::Sequence<sal_Int8>& rPassHash, const String& sPass);
+ static void GetHashPasswordBigEndian(com::sun::star::uno::Sequence<sal_Int8>& rPassHash, const String& sPass);
+
+public:
+ SVL_DLLPUBLIC static void GetHashPassword(com::sun::star::uno::Sequence <sal_Int8>& rPassHash, const sal_Char* pPass, sal_uInt32 nLen);
+
+ SVL_DLLPUBLIC static void GetHashPassword(com::sun::star::uno::Sequence<sal_Int8>& rPassHash, const String& sPass);
+ /**
+ Use this method to compare a given string with another given Hash value.
+ This is necessary, because in older versions exists different hashs of the same string. They were endian dependent.
+ We need this to handle old files. This method will compare against big and little endian. See #101326#
+ */
+ SVL_DLLPUBLIC static bool CompareHashPassword(const com::sun::star::uno::Sequence<sal_Int8>& rOldPassHash, const String& sNewPass);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/adrparse.hxx b/svl/inc/svl/adrparse.hxx
new file mode 100644
index 000000000000..dbb671889ec3
--- /dev/null
+++ b/svl/inc/svl/adrparse.hxx
@@ -0,0 +1,109 @@
+/* -*- 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 _ADRPARSE_HXX
+#define _ADRPARSE_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/string.hxx>
+#include <vector>
+
+//============================================================================
+struct SvAddressEntry_Impl
+{
+ UniString m_aAddrSpec;
+ UniString m_aRealName;
+
+ SvAddressEntry_Impl() {};
+ SvAddressEntry_Impl(UniString const & rTheAddrSpec,
+ UniString const & rTheRealName):
+ m_aAddrSpec(rTheAddrSpec), m_aRealName(rTheRealName) {}
+};
+
+//============================================================================
+typedef ::std::vector< SvAddressEntry_Impl* > SvAddressList_Impl;
+
+//============================================================================
+class SVL_DLLPUBLIC SvAddressParser
+{
+ friend class SvAddressParser_Impl;
+
+ SvAddressEntry_Impl m_aFirst;
+ SvAddressList_Impl m_aRest;
+ bool m_bHasFirst;
+
+public:
+ SvAddressParser(UniString const & rInput);
+
+ ~SvAddressParser();
+
+ sal_Int32 Count() const { return m_bHasFirst ? m_aRest.size() + 1 : 0; }
+
+ inline UniString const & GetEmailAddress(sal_Int32 nIndex) const;
+
+ inline UniString const &GetRealName(sal_Int32 nIndex) const;
+
+ /** Create an RFC 822 <mailbox> (i.e., 'e-mail address').
+
+ @param rPhrase Either an empty string (the <mailbox> will have no
+ <phrase> an will be of the form <addr-spec>), or some text that will
+ become the <phrase> part of a <phrase route-addr> form <mailbox>. Non
+ US-ASCII characters within the text are put into a <qouted-string>
+ verbatim, so the result may actually not be a valid RFC 822 <mailbox>,
+ but a more human-readable representation.
+
+ @param rAddrSpec A valid RFC 822 <addr-spec>. (An RFC 822 <mailbox>
+ including a <route> cannot be created by this method.)
+
+ @param rMailbox If this method returns true, this parameter returns
+ the created RFC 822 <mailbox> (rather, a more human-readable
+ representation thereof). Otherwise, this parameter is not modified.
+
+ @return True, if rAddrSpec is a valid RFC 822 <addr-spec>.
+ */
+ static bool createRFC822Mailbox(String const & rPhrase,
+ String const & rAddrSpec,
+ String & rMailbox);
+};
+
+inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex)
+ const
+{
+ return nIndex == 0 ? m_aFirst.m_aAddrSpec :
+ m_aRest[ nIndex - 1 ]->m_aAddrSpec;
+}
+
+inline UniString const & SvAddressParser::GetRealName(sal_Int32 nIndex) const
+{
+ return nIndex == 0 ? m_aFirst.m_aRealName :
+ m_aRest[ nIndex - 1 ]->m_aRealName;
+}
+
+#endif // _ADRPARSE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/aeitem.hxx b/svl/inc/svl/aeitem.hxx
index 373316882829..47c437f8a177 100644
--- a/svl/inc/svl/aeitem.hxx
+++ b/svl/inc/svl/aeitem.hxx
@@ -41,32 +41,32 @@ class SVL_DLLPUBLIC SfxAllEnumItem: public SfxEnumItem
SvUShorts* pDisabledValues;
protected:
- USHORT _GetPosByValue( USHORT nValue ) const;
+ sal_uInt16 _GetPosByValue( sal_uInt16 nValue ) const;
public:
TYPEINFO();
SfxAllEnumItem();
- SfxAllEnumItem( USHORT nWhich);
- SfxAllEnumItem( USHORT nWhich, USHORT nVal );
- SfxAllEnumItem( USHORT nWhich, USHORT nVal, const XubString &rText );
- SfxAllEnumItem( USHORT nWhich, SvStream &rStream );
+ SfxAllEnumItem( sal_uInt16 nWhich);
+ SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal );
+ SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal, const XubString &rText );
+ SfxAllEnumItem( sal_uInt16 nWhich, SvStream &rStream );
SfxAllEnumItem( const SfxAllEnumItem & );
~SfxAllEnumItem();
- void InsertValue( USHORT nValue );
- void InsertValue( USHORT nValue, const XubString &rText );
- void RemoveValue( USHORT nValue );
+ void InsertValue( sal_uInt16 nValue );
+ void InsertValue( sal_uInt16 nValue, const XubString &rText );
+ void RemoveValue( sal_uInt16 nValue );
void RemoveAllValues();
- USHORT GetPosByValue( USHORT nValue ) const;
+ sal_uInt16 GetPosByValue( sal_uInt16 nValue ) const;
- virtual USHORT GetValueCount() const;
- virtual USHORT GetValueByPos( USHORT nPos ) const;
- virtual XubString GetValueTextByPos( USHORT nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual sal_uInt16 GetValueByPos( sal_uInt16 nPos ) const;
+ virtual XubString GetValueTextByPos( sal_uInt16 nPos ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual BOOL IsEnabled( USHORT ) const;
- void DisableValue( USHORT );
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual sal_Bool IsEnabled( sal_uInt16 ) const;
+ void DisableValue( sal_uInt16 );
};
#endif
diff --git a/svl/inc/svl/brdcst.hxx b/svl/inc/svl/brdcst.hxx
index 03c5a8316ee1..d8ad823ed6d8 100644
--- a/svl/inc/svl/brdcst.hxx
+++ b/svl/inc/svl/brdcst.hxx
@@ -48,7 +48,7 @@ friend class SfxListener;
SfxListenerArr_Impl aListeners;
private:
- BOOL AddListener( SfxListener& rListener );
+ sal_Bool AddListener( SfxListener& rListener );
void RemoveListener( SfxListener& rListener );
const SfxBroadcaster& operator=(const SfxBroadcaster &); // verboten
@@ -67,9 +67,9 @@ public:
void BroadcastDelayed( const SfxHint& rHint );
void BroadcastInIdle( const SfxHint& rHint );
- BOOL HasListeners() const;
- USHORT GetListenerCount() const { return aListeners.Count(); }
- SfxListener* GetListener( USHORT nNo ) const
+ sal_Bool HasListeners() const;
+ sal_uInt16 GetListenerCount() const { return aListeners.Count(); }
+ SfxListener* GetListener( sal_uInt16 nNo ) const
{ return (SfxListener*) aListeners[nNo]; }
};
diff --git a/svl/inc/svl/broadcast.hxx b/svl/inc/svl/broadcast.hxx
new file mode 100644
index 000000000000..1e4be881d271
--- /dev/null
+++ b/svl/inc/svl/broadcast.hxx
@@ -0,0 +1,69 @@
+/* -*- 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 _SVT_BROADCAST_HXX
+#define _SVT_BROADCAST_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/rtti.hxx>
+
+class SvtListener;
+class SfxHint;
+class SvtListenerBase;
+
+//-------------------------------------------------------------------------
+
+class SVL_DLLPUBLIC SvtBroadcaster
+{
+friend class SvtListener;
+friend class SvtListenerBase;
+friend class SvtListenerIter;
+ SvtListenerBase* pRoot;
+
+ const SvtBroadcaster& operator=(const SvtBroadcaster &); // verboten
+
+protected:
+ void Forward( SvtBroadcaster& rBC,
+ const SfxHint& rHint );
+ virtual void ListenersGone();
+
+public:
+ TYPEINFO();
+
+ SvtBroadcaster();
+ SvtBroadcaster( const SvtBroadcaster &rBC );
+ virtual ~SvtBroadcaster();
+
+ void Broadcast( const SfxHint &rHint );
+
+ sal_Bool HasListeners() const { return 0 != pRoot; }
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/cenumitm.hxx b/svl/inc/svl/cenumitm.hxx
index 785adccfb8e2..b74de9373f6a 100644
--- a/svl/inc/svl/cenumitm.hxx
+++ b/svl/inc/svl/cenumitm.hxx
@@ -39,7 +39,7 @@ DBG_NAMEEX(SfxEnumItemInterface)
class SVL_DLLPUBLIC SfxEnumItemInterface: public SfxPoolItem
{
protected:
- SfxEnumItemInterface(USHORT which): SfxPoolItem(which) {}
+ SfxEnumItemInterface(sal_uInt16 which): SfxPoolItem(which) {}
SfxEnumItemInterface(const SfxEnumItemInterface & rItem):
SfxPoolItem(rItem) {}
@@ -55,15 +55,15 @@ public:
const IntlWrapper * = 0)
const;
- virtual bool QueryValue(com::sun::star::uno::Any & rVal, BYTE = 0) const;
+ virtual bool QueryValue(com::sun::star::uno::Any & rVal, sal_uInt8 = 0) const;
- virtual bool PutValue(const com::sun::star::uno::Any & rVal, BYTE = 0);
+ virtual bool PutValue(const com::sun::star::uno::Any & rVal, sal_uInt8 = 0);
- virtual USHORT GetValueCount() const = 0;
+ virtual sal_uInt16 GetValueCount() const = 0;
- virtual XubString GetValueTextByPos(USHORT nPos) const;
+ virtual XubString GetValueTextByPos(sal_uInt16 nPos) const;
- virtual USHORT GetValueByPos(USHORT nPos) const;
+ virtual sal_uInt16 GetValueByPos(sal_uInt16 nPos) const;
/// Return the position of some value within this enumeration.
///
@@ -75,19 +75,19 @@ public:
///
/// @return The position of nValue within this enumeration, or USHRT_MAX
/// if not included.
- virtual USHORT GetPosByValue(USHORT nValue) const;
+ virtual sal_uInt16 GetPosByValue(sal_uInt16 nValue) const;
- virtual BOOL IsEnabled(USHORT nValue) const;
+ virtual sal_Bool IsEnabled(sal_uInt16 nValue) const;
- virtual USHORT GetEnumValue() const = 0;
+ virtual sal_uInt16 GetEnumValue() const = 0;
- virtual void SetEnumValue(USHORT nValue) = 0;
+ virtual void SetEnumValue(sal_uInt16 nValue) = 0;
virtual int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
+ virtual sal_Bool GetBoolValue() const;
- virtual void SetBoolValue(BOOL bValue);
+ virtual void SetBoolValue(sal_Bool bValue);
};
//============================================================================
@@ -95,13 +95,13 @@ DBG_NAMEEX(CntEnumItem)
class SVL_DLLPUBLIC CntEnumItem: public SfxEnumItemInterface
{
- USHORT m_nValue;
+ sal_uInt16 m_nValue;
protected:
- CntEnumItem(USHORT which = 0, USHORT nTheValue = 0):
+ CntEnumItem(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
SfxEnumItemInterface(which), m_nValue(nTheValue) {}
- CntEnumItem(USHORT which, SvStream & rStream);
+ CntEnumItem(sal_uInt16 which, SvStream & rStream);
CntEnumItem(const CntEnumItem & rItem):
SfxEnumItemInterface(rItem), m_nValue(rItem.m_nValue) {}
@@ -109,18 +109,18 @@ protected:
public:
TYPEINFO();
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
- virtual USHORT GetEnumValue() const;
+ virtual sal_uInt16 GetEnumValue() const;
- virtual void SetEnumValue(USHORT nTheValue);
+ virtual void SetEnumValue(sal_uInt16 nTheValue);
- USHORT GetValue() const { return m_nValue; }
+ sal_uInt16 GetValue() const { return m_nValue; }
- inline void SetValue(USHORT nTheValue);
+ inline void SetValue(sal_uInt16 nTheValue);
};
-inline void CntEnumItem::SetValue(USHORT nTheValue)
+inline void CntEnumItem::SetValue(sal_uInt16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntEnumItem::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -131,15 +131,15 @@ DBG_NAMEEX(CntBoolItem)
class SVL_DLLPUBLIC CntBoolItem: public SfxPoolItem
{
- BOOL m_bValue;
+ sal_Bool m_bValue;
public:
TYPEINFO();
- CntBoolItem(USHORT which = 0, BOOL bTheValue = FALSE):
+ CntBoolItem(sal_uInt16 which = 0, sal_Bool bTheValue = sal_False):
SfxPoolItem(which), m_bValue(bTheValue) {}
- CntBoolItem(USHORT nWhich, SvStream & rStream);
+ CntBoolItem(sal_uInt16 nWhich, SvStream & rStream);
CntBoolItem(const CntBoolItem & rItem):
SfxPoolItem(rItem), m_bValue(rItem.m_bValue) {}
@@ -155,23 +155,23 @@ public:
const IntlWrapper * = 0)
const;
- virtual bool QueryValue(com::sun::star::uno::Any& rVal, BYTE = 0) const;
+ virtual bool QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8 = 0) const;
- virtual bool PutValue(const com::sun::star::uno::Any& rVal, BYTE = 0);
+ virtual bool PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
- virtual UniString GetValueTextByVal(BOOL bTheValue) const;
+ virtual UniString GetValueTextByVal(sal_Bool bTheValue) const;
- BOOL GetValue() const { return m_bValue; }
+ sal_Bool GetValue() const { return m_bValue; }
- void SetValue(BOOL bTheValue) { m_bValue = bTheValue; }
+ void SetValue(sal_Bool bTheValue) { m_bValue = bTheValue; }
};
#endif // _SVTOOLS_CENUMITM_HXX
diff --git a/svl/inc/svl/cintitem.hxx b/svl/inc/svl/cintitem.hxx
index 91cb08344b22..a6725b2fcf0b 100644
--- a/svl/inc/svl/cintitem.hxx
+++ b/svl/inc/svl/cintitem.hxx
@@ -38,15 +38,15 @@ DBG_NAMEEX_VISIBILITY(CntByteItem, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem
{
- BYTE m_nValue;
+ sal_uInt8 m_nValue;
public:
TYPEINFO();
- CntByteItem(USHORT which = 0, BYTE nTheValue = 0):
+ CntByteItem(sal_uInt16 which = 0, sal_uInt8 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue) { DBG_CTOR(CntByteItem, 0); }
- CntByteItem(USHORT which, SvStream & rStream);
+ CntByteItem(sal_uInt16 which, SvStream & rStream);
CntByteItem(const CntByteItem & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -66,29 +66,29 @@ public:
const;
virtual bool QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ sal_uInt8 nMemberId = 0) const;
virtual bool PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual BYTE GetMin() const;
+ virtual sal_uInt8 GetMin() const;
- virtual BYTE GetMax() const;
+ virtual sal_uInt8 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- BYTE GetValue() const { return m_nValue; }
+ sal_uInt8 GetValue() const { return m_nValue; }
- inline void SetValue(BYTE nTheValue);
+ inline void SetValue(sal_uInt8 nTheValue);
};
-inline void CntByteItem::SetValue(BYTE nTheValue)
+inline void CntByteItem::SetValue(sal_uInt8 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntByteItem::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -99,16 +99,16 @@ DBG_NAMEEX_VISIBILITY(CntUInt16Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem
{
- UINT16 m_nValue;
+ sal_uInt16 m_nValue;
public:
TYPEINFO();
- CntUInt16Item(USHORT which = 0, UINT16 nTheValue = 0):
+ CntUInt16Item(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntUInt16Item, 0); }
- CntUInt16Item(USHORT which, SvStream & rStream);
+ CntUInt16Item(sal_uInt16 which, SvStream & rStream);
CntUInt16Item(const CntUInt16Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -128,29 +128,29 @@ public:
const;
virtual bool QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ sal_uInt8 nMemberId = 0) const;
virtual bool PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual UINT16 GetMin() const;
+ virtual sal_uInt16 GetMin() const;
- virtual UINT16 GetMax() const;
+ virtual sal_uInt16 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT16 GetValue() const { return m_nValue; }
+ sal_Int16 GetValue() const { return m_nValue; }
- inline void SetValue(UINT16 nTheValue);
+ inline void SetValue(sal_uInt16 nTheValue);
};
-inline void CntUInt16Item::SetValue(UINT16 nTheValue)
+inline void CntUInt16Item::SetValue(sal_uInt16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntUInt16Item::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -161,16 +161,16 @@ DBG_NAMEEX_VISIBILITY(CntInt32Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem
{
- INT32 m_nValue;
+ sal_Int32 m_nValue;
public:
TYPEINFO();
- CntInt32Item(USHORT which = 0, INT32 nTheValue = 0):
+ CntInt32Item(sal_uInt16 which = 0, sal_Int32 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntInt32Item, 0); }
- CntInt32Item(USHORT which, SvStream & rStream);
+ CntInt32Item(sal_uInt16 which, SvStream & rStream);
CntInt32Item(const CntInt32Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -190,29 +190,29 @@ public:
const;
virtual bool QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ sal_uInt8 nMemberId = 0) const;
virtual bool PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream &, USHORT) const;
+ virtual SvStream & Store(SvStream &, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual INT32 GetMin() const;
+ virtual sal_Int32 GetMin() const;
- virtual INT32 GetMax() const;
+ virtual sal_Int32 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT32 GetValue() const { return m_nValue; }
+ sal_Int32 GetValue() const { return m_nValue; }
- inline void SetValue(INT32 nTheValue);
+ inline void SetValue(sal_Int32 nTheValue);
};
-inline void CntInt32Item::SetValue(INT32 nTheValue)
+inline void CntInt32Item::SetValue(sal_Int32 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntInt32Item::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -223,16 +223,16 @@ DBG_NAMEEX_VISIBILITY(CntUInt32Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem
{
- UINT32 m_nValue;
+ sal_uInt32 m_nValue;
public:
TYPEINFO();
- CntUInt32Item(USHORT which = 0, UINT32 nTheValue = 0):
+ CntUInt32Item(sal_uInt16 which = 0, sal_uInt32 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntUInt32Item, 0); }
- CntUInt32Item(USHORT nWhich, SvStream & rStream);
+ CntUInt32Item(sal_uInt16 nWhich, SvStream & rStream);
CntUInt32Item(const CntUInt32Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -252,29 +252,29 @@ public:
const;
virtual bool QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ sal_uInt8 nMemberId = 0) const;
virtual bool PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual UINT32 GetMin() const;
+ virtual sal_uInt32 GetMin() const;
- virtual UINT32 GetMax() const;
+ virtual sal_uInt32 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- UINT32 GetValue() const { return m_nValue; }
+ sal_uInt32 GetValue() const { return m_nValue; }
- inline void SetValue(UINT32 nTheValue);
+ inline void SetValue(sal_uInt32 nTheValue);
};
-inline void CntUInt32Item::SetValue(UINT32 nTheValue)
+inline void CntUInt32Item::SetValue(sal_uInt32 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntUInt32Item::SetValue(): Pooled item");
m_nValue = nTheValue;
diff --git a/svl/inc/svl/cntnrsrt.hxx b/svl/inc/svl/cntnrsrt.hxx
new file mode 100644
index 000000000000..7d2c119e9fd1
--- /dev/null
+++ b/svl/inc/svl/cntnrsrt.hxx
@@ -0,0 +1,175 @@
+/* -*- 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 _CNTRSRT_HXX
+#define _CNTRSRT_HXX
+
+/***********************************************************************
+*
+* Hier folgt die Beschreibung fuer die exportierten Makros:
+*
+* DECLARE_CONTAINER_SORT( ClassName, Type )
+* IMPL_CONTAINER_SORT( ClassName, Type, SortFunc )
+*
+* Definiert eine von Container abgeleitete Klasse "ClassName",
+* in der die Elemente des Typs "Type" sortiert enthalten sind.
+* Dazu muss einer Funktion "SortFunc" definiert sein, die als
+* Paramter zwei "const Type&" erwartet und 0 zurueckgibt, wenn
+* beide gleich sind, -1 wenn der erste Paramter kleiner ist als
+* der zweite und +1 wenn der erste Paramter groesser ist als
+* der zweite.
+*
+* Die Zugriffs-Methoden entsprechen in etwa denen der Container-
+* Klasse, mit Ausnahme von Insert, DeleteAndDestroy und Seek_Entry,
+* der den SV-Pointer-Arrays entsprechen.
+*
+* DECLARE_CONTAINER_SORT_DEL( ClassName, Type )
+* IMPL_CONTAINER_SORT( ClassName, Type, SortFunc )
+*
+* Wie DECLARE_CONTAINER_SORT, nur dass beim Aufruf des Destruktors
+* alle im Conatiner vorhandenen Objekte geloescht werden.
+*/
+
+#include <tools/contnr.hxx>
+
+#define DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \
+ ClassName( const ClassName& ); \
+ ClassName& operator =( const ClassName& ); \
+public: \
+ using Container::Count; \
+ \
+ ClassName( sal_uInt16 InitSize, sal_uInt16 ReSize ) : \
+ Container( CONTAINER_MAXBLOCKSIZE, InitSize, ReSize ) {} \
+ \
+ sal_Bool Insert( Type* pObj ); \
+ \
+ Type *Remove( sal_uLong nPos ) \
+ { return (Type *)Container::Remove( nPos ); } \
+ \
+ Type *Remove( Type* pObj ); \
+ \
+ void DeleteAndDestroy( sal_uLong nPos ) \
+ { \
+ Type *pObj = Remove( nPos ); \
+ if( pObj ) \
+ delete pObj; \
+ } \
+ \
+ void DeleteAndDestroy() \
+ { while( Count() ) DeleteAndDestroy( 0 ); } \
+ \
+ Type* GetObject( sal_uLong nPos ) const \
+ { return (Type *)Container::GetObject( nPos ); } \
+ \
+ Type* operator[]( sal_uLong nPos ) const \
+ { return GetObject(nPos); } \
+ \
+ sal_Bool Seek_Entry( const Type *pObj, sal_uLong* pPos ) const; \
+ \
+ sal_uLong GetPos( const Type* pObj ) const; \
+
+
+#define DECLARE_CONTAINER_SORT( ClassName, Type ) \
+class ClassName : private Container \
+{ \
+ DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \
+ ~ClassName() {} \
+}; \
+
+
+#define DECLARE_CONTAINER_SORT_DEL( ClassName, Type ) \
+class ClassName : private Container \
+{ \
+ DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \
+ ~ClassName() { DeleteAndDestroy(); } \
+}; \
+
+
+#define IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) \
+sal_Bool ClassName::Insert( Type *pObj ) \
+{ \
+ sal_uLong nPos; \
+ sal_Bool bExist = Seek_Entry( pObj, &nPos ); \
+ if( !bExist ) \
+ Container::Insert( pObj, nPos ); \
+ return !bExist; \
+} \
+ \
+Type *ClassName::Remove( Type* pObj ) \
+{ \
+ sal_uLong nPos; \
+ if( Seek_Entry( pObj, &nPos ) ) \
+ return Remove( nPos ); \
+ else \
+ return 0; \
+} \
+ \
+sal_uLong ClassName::GetPos( const Type* pObj ) const \
+{ \
+ sal_uLong nPos; \
+ if( Seek_Entry( pObj, &nPos ) ) \
+ return nPos; \
+ else \
+ return CONTAINER_ENTRY_NOTFOUND; \
+} \
+ \
+sal_Bool ClassName::Seek_Entry( const Type* pObj, sal_uLong* pPos ) const \
+{ \
+ register sal_uLong nO = Count(), \
+ nM, \
+ nU = 0; \
+ if( nO > 0 ) \
+ { \
+ nO--; \
+ while( nU <= nO ) \
+ { \
+ nM = nU + ( nO - nU ) / 2; \
+ int nCmp = SortFunc( *GetObject(nM), *pObj ); \
+ \
+ if( 0 == nCmp ) \
+ { \
+ if( pPos ) *pPos = nM; \
+ return sal_True; \
+ } \
+ else if( nCmp < 0 ) \
+ nU = nM + 1; \
+ else if( nM == 0 ) \
+ { \
+ if( pPos ) *pPos = nU; \
+ return sal_False; \
+ } \
+ else \
+ nO = nM - 1; \
+ } \
+ } \
+ if( pPos ) *pPos = nU; \
+ return sal_False; \
+} \
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/cntwall.hxx b/svl/inc/svl/cntwall.hxx
index dc36880daa1b..5e7828641c8f 100644
--- a/svl/inc/svl/cntwall.hxx
+++ b/svl/inc/svl/cntwall.hxx
@@ -42,35 +42,35 @@ class SVL_DLLPUBLIC CntWallpaperItem : public SfxPoolItem
private:
UniString _aURL;
Color _nColor;
- USHORT _nStyle;
+ sal_uInt16 _nStyle;
public:
TYPEINFO();
- CntWallpaperItem( USHORT nWhich );
- CntWallpaperItem( USHORT nWhich, SvStream& rStream, USHORT nVersion );
+ CntWallpaperItem( sal_uInt16 nWhich );
+ CntWallpaperItem( sal_uInt16 nWhich, SvStream& rStream, sal_uInt16 nVersion );
CntWallpaperItem( const CntWallpaperItem& rCpy );
~CntWallpaperItem();
- virtual USHORT GetVersion(USHORT) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
void SetBitmapURL( const UniString& rURL ) { _aURL = rURL; }
void SetColor( Color nColor ) { _nColor = nColor; }
- void SetStyle( USHORT nStyle ) { _nStyle = nStyle; }
+ void SetStyle( sal_uInt16 nStyle ) { _nStyle = nStyle; }
const UniString& GetBitmapURL() const { return _aURL; }
Color GetColor() const { return _nColor; }
- USHORT GetStyle() const { return _nStyle; }
+ sal_uInt16 GetStyle() const { return _nStyle; }
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/svl/inc/svl/cntwids.hrc b/svl/inc/svl/cntwids.hrc
new file mode 100644
index 000000000000..d14cf590d740
--- /dev/null
+++ b/svl/inc/svl/cntwids.hrc
@@ -0,0 +1,472 @@
+/*************************************************************************
+ *
+ * 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 _CNTWIDS_HRC
+#define _CNTWIDS_HRC
+
+#define TF_NEW_TABPAGES
+#define CNT_COOL_ABO
+
+//=========================================================================
+// ARGS, MSG, ALL, FOLDER, BOXALL, BOXEXT
+//=========================================================================
+
+#define WID_CHAOS_START 500
+
+//FUNC MSG
+#define WID_MARK_THREAD_MARKED (499)
+#define WID_MARK_THREAD_UNMARKED (498)
+
+// ARGS
+#define WID_DUMMY_ARG1 (WID_CHAOS_START + 0)
+#define WID_FACTORY_NO (WID_CHAOS_START + 1)
+#define WID_FACTORY_NAME (WID_CHAOS_START + 2)
+#define WID_NEWS_XREF (WID_CHAOS_START + 3)
+#define WID_CREATION_FLAGS (WID_CHAOS_START + 4)
+#define WID_FACTORY_HELP_ID (WID_CHAOS_START + 5)
+
+//FUNC MSG
+#define WID_MSG_START (WID_CHAOS_START + 6)
+#define WID_MAIL_REPLY (WID_CHAOS_START + 6)
+#define WID_POST_REPLY (WID_CHAOS_START + 7)
+#define WID_FORWARD (WID_CHAOS_START + 8)
+#define WID_MARK_THREAD_READ (WID_CHAOS_START + 9)
+#define WID_HIDE_THREAD (WID_CHAOS_START + 10)
+#define WID_HIDE_AUTHOR (WID_CHAOS_START + 11)
+#define WID_HIDE_SUBJECT (WID_CHAOS_START + 12)
+#define WID_RESEND_MSG (WID_CHAOS_START + 13)
+#define WID_MARK_THREAD_UNREAD (WID_CHAOS_START + 14)
+
+//PROP MSG
+#define WID_PRIORITY (WID_CHAOS_START + 15)
+#define WID_RULE_APPLIED (WID_CHAOS_START + 16)
+#define WID_MSG_LOCK (WID_CHAOS_START + 17)
+#define WID_SEEN_STATUS (WID_CHAOS_START + 18)
+#define WID_REPLY_TO (WID_CHAOS_START + 19)
+#define WID_IN_REPLY_TO (WID_CHAOS_START + 20)
+
+#define WID_MESSAGE_ID (WID_CHAOS_START + 21)
+#define WID_BCC (WID_CHAOS_START + 22)
+#define WID_CC (WID_CHAOS_START + 23)
+#define WID_TO (WID_CHAOS_START + 24)
+#define WID_FROM (WID_CHAOS_START + 25)
+#define WID_TITLE (WID_CHAOS_START + 26)
+#define WID_MESSAGEBODY (WID_CHAOS_START + 27)
+
+#define WID_REFERENCES (WID_CHAOS_START + 28)
+#define WID_NEWSGROUPS (WID_CHAOS_START + 29)
+#define WID_NEWS_XREFLIST (WID_CHAOS_START + 30)
+
+#define WID_OUTMSGINTERNALSTATE (WID_CHAOS_START + 31)
+#define WID_RECIPIENTLIST (WID_CHAOS_START + 32)
+#define WID_MSG_END (WID_CHAOS_START + 32)
+
+//FUNC ALL
+#define WID_ALL_START (WID_CHAOS_START + 33)
+#define WID_DEFAULT (WID_CHAOS_START + 33)
+#define WID_OPEN (WID_CHAOS_START + 34)
+#define WID_DELETE (WID_CHAOS_START + 35)
+#define WID_CUT (WID_CHAOS_START + 36)
+#define WID_COPY (WID_CHAOS_START + 37)
+#define WID_PASTE (WID_CHAOS_START + 38)
+#define WID_RENAME (WID_CHAOS_START + 39)
+
+#define WID_HAS_DATA (WID_CHAOS_START + 40)
+#define WID_GETDATA (WID_CHAOS_START + 41)
+#define WID_PUTDATA (WID_CHAOS_START + 42)
+
+//PROP ALL
+#define WID_INTERIM_URL (WID_CHAOS_START + 43)
+#define WID_CONTENT_TYPE (WID_CHAOS_START + 44)
+
+#define WID_OWN_URL (WID_CHAOS_START + 45)
+#define WID_REAL_URL (WID_CHAOS_START + 46)
+#define WID_OBSOLETE_TITLE (WID_CHAOS_START + 47)
+#define WID_FLAG_READONLY (WID_CHAOS_START + 48)
+
+#define WID_REFERED_URL (WID_CHAOS_START + 49)
+#define WID_REFERER_COUNT (WID_CHAOS_START + 50)
+#define WID_FLAG_IS_FOLDER (WID_CHAOS_START + 51)
+#define WID_FLAG_HAS_FOLDER (WID_CHAOS_START + 52)
+#define WID_FLAG_IS_MESSAGE (WID_CHAOS_START + 53)
+#define WID_FLAG_IS_DOCUMENT (WID_FLAG_IS_MESSAGE)
+#define WID_FLAG_HAS_MESSAGES (WID_CHAOS_START + 54)
+
+#define WID_DATE_CREATED (WID_CHAOS_START + 55)
+#define WID_DATE_MODIFIED (WID_CHAOS_START + 56)
+#define WID_VIEW_DESCRIPTION (WID_CHAOS_START + 57)
+#define WID_IS_READ (WID_CHAOS_START + 58)
+#define WID_IS_MARKED (WID_CHAOS_START + 59)
+#define WID_ALL_END (WID_CHAOS_START + 59)
+
+//FUNC FOLDER
+#define WID_FOLDER_START (WID_CHAOS_START + 60)
+#define WID_SYNCHRONIZE (WID_CHAOS_START + 60)
+#define WID_CREATE_NEW (WID_CHAOS_START + 61)
+#define WID_INSERT (WID_CHAOS_START + 62)
+#define WID_UPDATE (WID_CHAOS_START + 63)
+#define WID_IMPORT (WID_CHAOS_START + 64)
+
+//PROP FOLDER VIEW
+#define WID_DUMMY_PROPFOLDERVIEW1 (WID_CHAOS_START + 65)
+#define WID_THREADING (WID_CHAOS_START + 66)
+#define WID_FOLDERVIEW_MODE (WID_CHAOS_START + 69)
+#define WID_MESSAGEVIEW_MODE (WID_CHAOS_START + 70)
+#define WID_SENTMESSAGEVIEW_MODE (WID_CHAOS_START + 71)
+#define WID_SORTING (WID_CHAOS_START + 72)
+#define WID_THREADED (WID_CHAOS_START + 73)
+#define WID_FILTERED (WID_CHAOS_START + 74)
+#define WID_RULES (WID_CHAOS_START + 75)
+#define WID_SUBSCRNEWSGROUPCOUNT (WID_CHAOS_START + 76)
+#define WID_FLAG_SUBSCRIBED (WID_CHAOS_START + 77)
+#define WID_FLAG_SUPPORTMODE (WID_CHAOS_START + 78)
+
+//PROP FOLDER DIR
+#define WID_DUMMY_FOLDERDIR1 (WID_CHAOS_START + 79)
+#define WID_TOTALCONTENTCOUNT (WID_CHAOS_START + 80)
+#define WID_KNOWN_RANGES (WID_CHAOS_START + 83)
+#define WID_IMAPFOLDERINFO (WID_CHAOS_START + 84)
+
+//PROP FOLDER USER
+#define WID_DUMMY_FOLDERUSER1 (WID_CHAOS_START + 85)
+#define WID_SEENCONTENTCOUNT (WID_CHAOS_START + 86)
+#define WID_UNREAD_ARTICLECOUNT (WID_SEENCONTENTCOUNT)
+#define WID_SENTCONTENTCOUNT (WID_SEENCONTENTCOUNT)
+#define WID_READ_RANGES (WID_CHAOS_START + 87)
+#define WID_MARK_RANGES (WID_CHAOS_START + 88)
+#define WID_FOLDER_END (WID_CHAOS_START + 88)
+
+//PROP BOXALL
+#define WID_BOXALL_START (WID_CHAOS_START + 89)
+// Used for d&d of View Storages...
+#define WID_PREPARE_MOVE (WID_CHAOS_START + 89)
+#define WID_OUTTRAY_WANTED (WID_CHAOS_START + 90)
+#define WID_USERNAME (WID_CHAOS_START + 91)
+#define WID_PASSWORD (WID_CHAOS_START + 92)
+#define WID_SERVERNAME (WID_CHAOS_START + 93)
+#define WID_SERVERPORT (WID_CHAOS_START + 94)
+#define WID_SERVERBASE (WID_CHAOS_START + 101)
+
+// -> ..._DEFAULT
+
+#define WID_AUTOUPDATE_INTERVAL (WID_CHAOS_START + 105)
+#define WID_UPDATE_ENABLED (WID_CHAOS_START + 106)
+#define WID_BOXALL_END (WID_CHAOS_START + 106)
+
+//PROP BOX RNMGR
+#define WID_BOXEXT_START (WID_CHAOS_START + 107)
+#define WID_CONNECTION_MODE (WID_CHAOS_START + 107)
+#define WID_NEWS_GROUPLIST (WID_CHAOS_START + 108)
+#define WID_MESSAGE_STOREMODE (WID_CHAOS_START + 109)
+#define WID_DELETE_ON_SERVER (WID_CHAOS_START + 110)
+
+//PROP BOX USER
+
+//PROP BOX OUT DIR
+#define WID_OUTMSGEXTERNALSTATE (WID_CHAOS_START + 111)
+
+//PROP RNM
+#define WID_RNM_UPDATETIMER_LIST (WID_CHAOS_START + 112)
+#define WID_BOXEXT_END (WID_CHAOS_START + 112)
+
+//////////////////////////////////////////////////////////////////////////
+// MISC - Added after initial pool version
+//////////////////////////////////////////////////////////////////////////
+
+// PROP BOX
+#define WID_SERVER_RANGES (WID_CHAOS_START + 113)
+#define WID_LAST_UPDATE (WID_CHAOS_START + 114)
+#define WID_LAST_MSGID (WID_CHAOS_START + 115)
+#define WID_LAST_UID (WID_CHAOS_START + 116)
+
+// FUNC ALL
+#define WID_UNDELETE (WID_CHAOS_START + 117)
+#define WID_CLOSE (WID_CHAOS_START + 118)
+#define WID_REOPEN (WID_CHAOS_START + 119)
+
+// PROP RNM
+#define WID_RNM_FILECONVERSION_LIST (WID_CHAOS_START + 120)
+
+// PROP FOLDER
+#define WID_SHOW_MSGS_HAS_TIMELIMIT (WID_CHAOS_START + 121)
+#define WID_SHOW_MSGS_TIMELIMIT (WID_CHAOS_START + 122)
+#define WID_STORE_MSGS_HAS_TIMELIMIT (WID_CHAOS_START + 123)
+#define WID_STORE_MSGS_TIMELIMIT (WID_CHAOS_START + 124)
+
+// PROP BOX
+
+//////////////////////////////////////////////////////////////////////////
+// WID's added after SO 4.0 release ( SUPD > 364 )
+//////////////////////////////////////////////////////////////////////////
+
+// PROP ALL
+#define WID_PROPERTYLIST (WID_CHAOS_START + 126)
+
+// PROP BOXALL
+#define WID_BOXALL_START2 (WID_CHAOS_START + 127)
+#define WID_SEND_PUBLIC_PROT_ID (WID_CHAOS_START + 127)
+#define WID_SEND_PRIVATE_PROT_ID (WID_CHAOS_START + 128)
+#define WID_SEND_PUBLIC_OUTBOXPROPS (WID_CHAOS_START + 129)
+#define WID_SEND_PRIVATE_OUTBOXPROPS (WID_CHAOS_START + 130)
+#define WID_SEND_SERVERNAME (WID_CHAOS_START + 131)
+#define WID_SEND_USERNAME (WID_CHAOS_START + 132)
+#define WID_SEND_PASSWORD (WID_CHAOS_START + 133)
+#define WID_SEND_REPLY_TO_DEFAULT (WID_CHAOS_START + 134)
+#define WID_SEND_FROM_DEFAULT (WID_CHAOS_START + 135)
+#define WID_VIM_POPATH (WID_CHAOS_START + 136)
+#define WID_SEND_VIM_POPATH (WID_CHAOS_START + 137)
+#define WID_PURGE (WID_CHAOS_START + 138)
+#define WID_CLEAN_CACHE (WID_CHAOS_START + 139)
+#define WID_SEARCH (WID_CHAOS_START + 140)
+#define WID_JOURNAL (WID_CHAOS_START + 141)
+#define WID_LOCALBASE (WID_CHAOS_START + 142)
+#define WID_BOXALL_END2 (WID_CHAOS_START + 142)
+
+// PROP DOCUMENT
+#define WID_DOCUMENT_HEADER (WID_CHAOS_START + 143)
+#define WID_DOCUMENT_BODY (WID_CHAOS_START + 144)
+#define WID_DOCUMENT_SIZE (WID_CHAOS_START + 145)
+
+// PROP ALL
+#define WID_SIZE WID_DOCUMENT_SIZE
+
+// PROP PROJECT
+#define WID_PRJ_MEDIUM (WID_CHAOS_START + 146)
+#define WID_PRJ_FILENAMECONVENTION (WID_CHAOS_START + 147)
+
+// PROP FSYS
+#define WID_FSYS_DISKSPACE_LEFT (WID_CHAOS_START + 148)
+#define WID_TRANSFER (WID_CHAOS_START + 149)
+
+// PROP ALL
+#define WID_KEYWORDS (WID_CHAOS_START + 150)
+#define WID_IS_PROTECTED (WID_CHAOS_START + 151)
+
+// PROP SEARCH
+#define WID_SEARCH_CRITERIA (WID_CHAOS_START + 152)
+#define WID_SEARCH_LOCATIONS (WID_CHAOS_START + 153)
+#define WID_SEARCH_RECURSIVE (WID_CHAOS_START + 154)
+#define WID_SEARCH_FOLDER_VIEW (WID_CHAOS_START + 155)
+#define WID_SEARCH_DOCUMENT_VIEW (WID_CHAOS_START + 156)
+
+// PROP Channel
+#define WID_SCHEDULE_RANGE (WID_CHAOS_START + 157)
+#define WID_ALLOWED_SCHEDULE_RANGE (WID_CHAOS_START + 158)
+#define WID_TARGET_URL (WID_CHAOS_START + 159)
+#define WID_FREQUENCY (WID_CHAOS_START + 160)
+
+// PROP HTTP
+#define WID_HTTP_CONNECTION_LIMIT (WID_CHAOS_START + 161)
+#define WID_HTTP_COOKIE_MANAGER (WID_CHAOS_START + 162)
+
+// PROP Channel
+#define WID_COLUMN_NEXT_UPD (WID_CHAOS_START + 163)
+#define WID_CRAWL_STATUS (WID_CHAOS_START + 164)
+#define WID_CRAWL_LEVEL (WID_CHAOS_START + 165)
+#define WID_CRAWL_MODE (WID_CHAOS_START + 166)
+// WID_CRAWL_MAX_VOLUME shall be removed in the future!
+// --> WID_SIZE_LIMIT
+#define WID_CRAWL_MAX_VOLUME (WID_CHAOS_START + 167)
+#define WID_CRAWL_IMAGE (WID_CHAOS_START + 168)
+#define WID_CRAWL_LINK_OUT (WID_CHAOS_START + 169)
+#define WID_NOTIFICATION_MODE (WID_CHAOS_START + 170)
+#define WID_NOTIFICATION_ADDRESS (WID_CHAOS_START + 171)
+
+// PROP BOXALL
+#define WID_ACCOUNT (WID_CHAOS_START + 172)
+
+// PROP FSYS
+#define WID_FSYS_KIND (WID_CHAOS_START + 173)
+#define WID_FSYS_FLAGS (WID_CHAOS_START + 174)
+
+// PROP FOLDER
+#define WID_VIEWDATA /* obsolete */ (WID_CHAOS_START + 175)
+
+// PROP FSYS
+#define WID_WHO_IS_MASTER (WID_CHAOS_START + 176)
+
+// FUNC HTTP
+#define WID_HTTP_POST (WID_CHAOS_START + 177)
+
+// PROP ALL
+#define WID_SUPPORTED_FUNCS (WID_CHAOS_START + 178)
+#define WID_SIZE_LIMIT (WID_CHAOS_START + 179)
+
+// PROP FOLDER
+#define WID_MARKED_DOCUMENT_COUNT (WID_CHAOS_START + 180)
+#define WID_FOLDER_COUNT (WID_CHAOS_START + 181)
+
+// PROP FSYS
+#define WID_FSYS_SHOW_HIDDEN (WID_CHAOS_START + 182)
+
+// TRASHCAN
+#define WID_TRASHCAN_START (WID_CHAOS_START + 183)
+#define WID_TRASHCAN_EMPTY_TRASH (WID_CHAOS_START + 183)
+#define WID_TRASHCAN_FLAG_AUTODELETE (WID_CHAOS_START + 184)
+#define WID_TRASHCAN_FLAG_CONFIRMEMPTY (WID_CHAOS_START + 185)
+#define WID_TRASHCAN_DUMMY1 (WID_CHAOS_START + 186)
+#define WID_TRASHCAN_DUMMY2 (WID_CHAOS_START + 187)
+#define WID_TRASHCAN_END (WID_CHAOS_START + 187)
+
+// TRASH
+#define WID_TRASH_START (WID_CHAOS_START + 188)
+#define WID_TRASH_RESTORE (WID_CHAOS_START + 188)
+#define WID_TRASH_ORIGIN (WID_CHAOS_START + 189)
+#define WID_TRASH_DUMMY2 (WID_CHAOS_START + 190)
+#define WID_TRASH_END (WID_CHAOS_START + 190)
+
+// PROP ALL
+#define WID_TARGET_FRAMES (WID_CHAOS_START + 191)
+
+// FUNC FOLDER
+#define WID_EXPORT (WID_CHAOS_START + 192)
+
+// COMPONENT
+#define WID_COMPONENT_COMMAND (WID_CHAOS_START + 193)
+#define WID_COMPONENT_MENU (WID_CHAOS_START + 194)
+
+// PROP Channel
+#define WID_HREF (WID_CHAOS_START + 195)
+
+// PROP FOLDER (VIEW)
+#define WID_VIEW_START (WID_CHAOS_START + 196)
+#define WID_VIEW_COLS_BEAMER (WID_CHAOS_START + 196)
+#define WID_VIEW_COLS_FILEDLG (WID_CHAOS_START + 197)
+#define WID_VIEW_COLS_FLDWIN (WID_CHAOS_START + 198)
+#define WID_VIEW_MODE_FLDWIN (WID_CHAOS_START + 199)
+#define WID_VIEW_LAYOUT_FLDWIN (WID_CHAOS_START + 200)
+#define WID_VIEW_ICON_POS_FLDWIN (WID_CHAOS_START + 201)
+#define WID_VIEW_SORT_BEAMER (WID_CHAOS_START + 202)
+#define WID_VIEW_SORT_FILEDLG (WID_CHAOS_START + 203)
+#define WID_VIEW_SORT_FLDWIN_DETAILS (WID_CHAOS_START + 204)
+#define WID_VIEW_SORT_FLDWIN_ICON (WID_CHAOS_START + 205)
+#define WID_VIEW_WINDOW_POS_FLDWIN (WID_CHAOS_START + 206)
+#define WID_VIEW_END (WID_CHAOS_START + 206)
+
+// PROP ALL
+#define WID_IS_INVALID (WID_CHAOS_START + 207)
+
+// PROP Channel
+#define WID_VIEW_TIPHELP (WID_CHAOS_START + 208)
+#define WID_PUBLISHER_SCHEDULE (WID_CHAOS_START + 209)
+#define WID_GETMODE (WID_CHAOS_START + 210)
+#define WID_READ_OFFLINE (WID_CHAOS_START + 211)
+
+// PROP ALL
+#define WID_ALL_START2 (WID_CHAOS_START + 212)
+#define WID_REAL_NAME (WID_CHAOS_START + 212)
+#define WID_FLAG_UPDATE_ON_OPEN (WID_CHAOS_START + 213)
+#define WID_ACTION_LIST (WID_CHAOS_START + 214)
+#define WID_EDIT_STRING (WID_CHAOS_START + 215)
+#define WID_SET_AS_DEFAULT (WID_CHAOS_START + 216)
+#define WID_ALL_END2 (WID_CHAOS_START + 216)
+
+// PROP FOLDER (VIEW)
+#define WID_VIEW2_START (WID_CHAOS_START + 217)
+#define WID_VIEW2_FLD_PIC (WID_CHAOS_START + 217)
+#define WID_FLAG_EXPANDED (WID_CHAOS_START + 218)
+#define WID_CHILD_DEFAULTS (WID_CHAOS_START + 219)
+#define WID_VIEW2_END (WID_CHAOS_START + 219)
+
+// PROP HTTP
+#define WID_HTTP_KEEP_EXPIRED (WID_CHAOS_START + 220)
+#define WID_HTTP_VERIFY_MODE (WID_CHAOS_START + 221)
+#define WID_HTTP_NOCACHE_LIST (WID_CHAOS_START + 222)
+#define WID_HTTP_REFERER (WID_CHAOS_START + 223)
+
+// PROP FSYS
+#define WID_FSYS_START (WID_CHAOS_START + 224)
+#define WID_FSYS_VALUE_FOLDER (WID_CHAOS_START + 224)
+#define WID_FSYS_SHOW_EXTENSION (WID_CHAOS_START + 225)
+#define WID_VALUE_ADDED_MODE (WID_CHAOS_START + 226)
+#define WID_FSYS_DUMMY3 (WID_CHAOS_START + 227)
+#define WID_FSYS_DUMMY4 (WID_CHAOS_START + 228)
+#define WID_FSYS_END (WID_CHAOS_START + 228)
+
+// FUNC HTTP
+#define WID_HTTP_GET_COOKIE (WID_CHAOS_START + 229)
+#define WID_HTTP_SET_COOKIE (WID_CHAOS_START + 230)
+
+// PROP HTTP
+#define WID_HTTP_COOKIE (WID_CHAOS_START + 231)
+#define WID_HTTP_DUMMY_1 (WID_CHAOS_START + 232)
+
+//////////////////////////////////////////////////////////////////////////
+// WID's added after SO 5.0 release ( SUPD > 505 )
+//////////////////////////////////////////////////////////////////////////
+
+// PROP FOLDER
+#define WID_FOLDER_START2 (WID_CHAOS_START + 233)
+#define WID_USER_SORT_CRITERIUM (WID_CHAOS_START + 233)
+#define WID_HEADER_CONFIG (WID_CHAOS_START + 234)
+#define WID_GROUPVIEW_CONFIG (WID_CHAOS_START + 235)
+#define WID_FLD_WEBVIEW_TEMPLATE (WID_CHAOS_START + 236)
+// eigene Iconpositionen fuer den Explorer, da er noch
+// keinen eigenen View-Storage hat
+#define WID_VIEW_ICON_POS_GRPWIN (WID_CHAOS_START + 237)
+#define WID_FOLDER_END2 (WID_CHAOS_START + 237)
+
+// PROP ALL
+#define WID_SHOW_IN_EXPLORER (WID_CHAOS_START + 238)
+
+// PROP FOLDER (VIEW)
+#define WID_VIEW3_START (WID_CHAOS_START + 239)
+#define WID_FLD_FONT (WID_CHAOS_START + 239)
+#define WID_FLD_WEBVIEW_USE_GLOBAL (WID_CHAOS_START + 240)
+#define WID_VIEW3_DUMMY2 (WID_CHAOS_START + 241)
+#define WID_VIEW3_DUMMY3 (WID_CHAOS_START + 242)
+#define WID_VIEW3_END (WID_CHAOS_START + 242)
+
+// PROP FTP
+#define WID_FTP_ACCOUNT (WID_CHAOS_START + 243)
+
+// PROP FOLDER
+#define WID_STORE_MARKED (WID_CHAOS_START + 244)
+
+// REPLICATION ( Currently only here to have file compatibility between
+// SO51 Client and SO51 Server, for which the functionality
+// first shall be implemented ).
+#define WID_REPLICATION_1 (WID_CHAOS_START + 245)
+#define WID_REPLICATION_2 (WID_CHAOS_START + 246)
+#define WID_REPLICATION_3 (WID_CHAOS_START + 247)
+#define WID_REPLICATION_4 (WID_CHAOS_START + 248)
+#define WID_REPLICATION_5 (WID_CHAOS_START + 249)
+
+// PROP SEARCH
+#define WID_SEARCH_INDIRECTIONS (WID_CHAOS_START + 250)
+
+// PROP ALL
+#define WID_SEND_FORMATS (WID_CHAOS_START + 251)
+#define WID_SEND_COPY_TARGET (WID_CHAOS_START + 252)
+
+// FUNC ALL
+#define WID_TRANSFER_RESULT (WID_CHAOS_START + 253)
+
+// END
+#define WID_CHAOS_END (WID_CHAOS_START + 253)
+
+#endif /* !_CNTWIDS_HRC */
diff --git a/svl/inc/svl/converter.hxx b/svl/inc/svl/converter.hxx
new file mode 100644
index 000000000000..fc2513c3b61f
--- /dev/null
+++ b/svl/inc/svl/converter.hxx
@@ -0,0 +1,45 @@
+/* -*- 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 _SV_CONVERTER_HXX_
+#define _SV_CONVERTER_HXX_
+
+#include "svl/svldllapi.h"
+#include <tools/solar.h>
+
+class SvDbaseConverter
+{
+public:
+ SVL_DLLPUBLIC static sal_Int32 ConvertPrecisionToDbase(sal_Int32 _nLen, sal_Int32 _nScale);
+ SVL_DLLPUBLIC static sal_Int32 ConvertPrecisionToOdbc(sal_Int32 _nLen, sal_Int32 _nScale);
+};
+
+#endif //_CONVERTER_HXX_
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/ctypeitm.hxx b/svl/inc/svl/ctypeitm.hxx
index 03a10d99d951..82f0bd1179c4 100644
--- a/svl/inc/svl/ctypeitm.hxx
+++ b/svl/inc/svl/ctypeitm.hxx
@@ -43,17 +43,17 @@ public:
TYPEINFO();
CntContentTypeItem();
- CntContentTypeItem( USHORT nWhich, const XubString& rType );
- CntContentTypeItem( USHORT nWhich, const INetContentType eType );
+ CntContentTypeItem( sal_uInt16 nWhich, const XubString& rType );
+ CntContentTypeItem( sal_uInt16 nWhich, const INetContentType eType );
CntContentTypeItem( const CntContentTypeItem& rOrig );
virtual SfxPoolItem* Create( SvStream& rStream,
- USHORT nItemVersion ) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ sal_uInt16 nItemVersion ) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual int operator==( const SfxPoolItem& rOrig ) const;
- virtual USHORT GetVersion(USHORT) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = NULL ) const;
@@ -70,9 +70,9 @@ public:
const IntlWrapper* pIntlWrapper = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ sal_uInt8 nMemberId = 0);
INetContentType GetEnumValue() const;
diff --git a/svl/inc/svl/custritm.hxx b/svl/inc/svl/custritm.hxx
index b84d8a8ee29b..d0346ef5d461 100644
--- a/svl/inc/svl/custritm.hxx
+++ b/svl/inc/svl/custritm.hxx
@@ -43,10 +43,10 @@ class SVL_DLLPUBLIC CntUnencodedStringItem: public SfxPoolItem
public:
TYPEINFO();
- CntUnencodedStringItem(USHORT which = 0): SfxPoolItem(which)
+ CntUnencodedStringItem(sal_uInt16 which = 0): SfxPoolItem(which)
{ DBG_CTOR(CntUnencodedStringItem, 0); }
- CntUnencodedStringItem(USHORT which, const XubString & rTheValue):
+ CntUnencodedStringItem(sal_uInt16 which, const XubString & rTheValue):
SfxPoolItem(which), m_aValue(rTheValue)
{ DBG_CTOR(CntUnencodedStringItem, 0); }
@@ -70,10 +70,10 @@ public:
const;
virtual bool QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ sal_uInt8 nMemberId = 0) const;
virtual bool PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ sal_uInt8 nMemberId = 0);
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
diff --git a/svl/inc/svl/dateitem.hxx b/svl/inc/svl/dateitem.hxx
index 51770ab651a4..e9bae366b018 100644
--- a/svl/inc/svl/dateitem.hxx
+++ b/svl/inc/svl/dateitem.hxx
@@ -47,8 +47,8 @@ private:
public:
TYPEINFO();
- SfxDateTimeItem( USHORT nWhich );
- SfxDateTimeItem( USHORT nWhich,
+ SfxDateTimeItem( sal_uInt16 nWhich );
+ SfxDateTimeItem( sal_uInt16 nWhich,
const DateTime& rDT );
SfxDateTimeItem( const SfxDateTimeItem& rCpy );
@@ -58,8 +58,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
using SfxPoolItem::Compare;
virtual int Compare( const SfxPoolItem &rWith ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -76,9 +76,9 @@ public:
aDateTime = rDT; }
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
};
class SfxColumnDateTimeItem : public SfxDateTimeItem
@@ -86,8 +86,8 @@ class SfxColumnDateTimeItem : public SfxDateTimeItem
public:
TYPEINFO();
- SfxColumnDateTimeItem( USHORT nWhich );
- SfxColumnDateTimeItem( USHORT nWhich,
+ SfxColumnDateTimeItem( sal_uInt16 nWhich );
+ SfxColumnDateTimeItem( sal_uInt16 nWhich,
const DateTime& rDT );
SfxColumnDateTimeItem( const SfxDateTimeItem& rCpy );
diff --git a/svl/inc/svl/eitem.hxx b/svl/inc/svl/eitem.hxx
index c678ec9ab30a..ea715c349922 100644
--- a/svl/inc/svl/eitem.hxx
+++ b/svl/inc/svl/eitem.hxx
@@ -36,10 +36,10 @@
class SVL_DLLPUBLIC SfxEnumItem: public CntEnumItem
{
protected:
- SfxEnumItem(USHORT which = 0, USHORT nValue = 0):
+ SfxEnumItem(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntEnumItem(which, nValue) {}
- SfxEnumItem(USHORT which, SvStream & rStream):
+ SfxEnumItem(sal_uInt16 which, SvStream & rStream):
CntEnumItem(which, rStream) {}
public:
@@ -53,13 +53,13 @@ class SVL_DLLPUBLIC SfxBoolItem: public CntBoolItem
public:
TYPEINFO();
- SfxBoolItem(USHORT which = 0, BOOL bValue = FALSE):
+ SfxBoolItem(sal_uInt16 which = 0, sal_Bool bValue = sal_False):
CntBoolItem(which, bValue) {}
- SfxBoolItem(USHORT which, SvStream & rStream):
+ SfxBoolItem(sal_uInt16 which, SvStream & rStream):
CntBoolItem(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxBoolItem(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
diff --git a/svl/inc/svl/filenotation.hxx b/svl/inc/svl/filenotation.hxx
new file mode 100644
index 000000000000..65f28659e056
--- /dev/null
+++ b/svl/inc/svl/filenotation.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * 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 SVTOOLS_FILENOTATION_HXX
+#define SVTOOLS_FILENOTATION_HXX
+
+#include "svl/svldllapi.h"
+#include <rtl/ustring.hxx>
+
+//.........................................................................
+namespace svt
+{
+//.........................................................................
+
+ //=====================================================================
+ //= OFileNotation
+ //=====================================================================
+ class SVL_DLLPUBLIC OFileNotation
+ {
+ protected:
+ ::rtl::OUString m_sSystem;
+ ::rtl::OUString m_sFileURL;
+
+ public:
+ enum NOTATION
+ {
+ N_SYSTEM,
+ N_URL
+ };
+
+ OFileNotation( const ::rtl::OUString& _rUrlOrPath );
+ OFileNotation( const ::rtl::OUString& _rUrlOrPath, NOTATION _eInputNotation );
+
+ ::rtl::OUString get(NOTATION _eOutputNotation);
+
+ private:
+ SVL_DLLPRIVATE void construct( const ::rtl::OUString& _rUrlOrPath );
+ SVL_DLLPRIVATE bool implInitWithSystemNotation( const ::rtl::OUString& _rSystemPath );
+ SVL_DLLPRIVATE bool implInitWithURLNotation( const ::rtl::OUString& _rURL );
+ };
+
+//.........................................................................
+} // namespace svt
+//.........................................................................
+
+#endif // SVTOOLS_FILENOTATION_HXX
+
diff --git a/svl/inc/svl/filerec.hxx b/svl/inc/svl/filerec.hxx
index ca17a939fc60..6b7ff27ba506 100644
--- a/svl/inc/svl/filerec.hxx
+++ b/svl/inc/svl/filerec.hxx
@@ -36,22 +36,22 @@
#include <tools/stream.hxx>
#include <svl/svarray.hxx>
-SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
+SV_DECL_VARARR( SfxUINT32s, sal_uInt32, 8, 8 )
//------------------------------------------------------------------------
-#define SFX_REC_PRETAG_EXT BYTE(0x00) // Pre-Tag f"ur Extended-Records
-#define SFX_REC_PRETAG_EOR BYTE(0xFF) // Pre-Tag f"ur End-Of-Records
-
-#define SFX_REC_TYPE_NONE BYTE(0x00) // unbekannter Record-Typ
-#define SFX_REC_TYPE_FIRST BYTE(0x01)
-#define SFX_REC_TYPE_SINGLE BYTE(0x01) // Single-Content-Record
-#define SFX_REC_TYPE_FIXSIZE BYTE(0x02) // Fix-Size-Multi-Content-Record
-#define SFX_REC_TYPE_VARSIZE_RELOC BYTE(0x03) // variable Rec-Size
-#define SFX_REC_TYPE_VARSIZE BYTE(0x04) // alt (nicht verschiebbar)
-#define SFX_REC_TYPE_MIXTAGS_RELOC BYTE(0x07) // Mixed Tag Content-Record
-#define SFX_REC_TYPE_MIXTAGS BYTE(0x08) // alt (nicht verschiebbar)
-#define SFX_REC_TYPE_LAST BYTE(0x08)
+#define SFX_REC_PRETAG_EXT sal_uInt8(0x00) // Pre-Tag f"ur Extended-Records
+#define SFX_REC_PRETAG_EOR sal_uInt8(0xFF) // Pre-Tag f"ur End-Of-Records
+
+#define SFX_REC_TYPE_NONE sal_uInt8(0x00) // unbekannter Record-Typ
+#define SFX_REC_TYPE_FIRST sal_uInt8(0x01)
+#define SFX_REC_TYPE_SINGLE sal_uInt8(0x01) // Single-Content-Record
+#define SFX_REC_TYPE_FIXSIZE sal_uInt8(0x02) // Fix-Size-Multi-Content-Record
+#define SFX_REC_TYPE_VARSIZE_RELOC sal_uInt8(0x03) // variable Rec-Size
+#define SFX_REC_TYPE_VARSIZE sal_uInt8(0x04) // alt (nicht verschiebbar)
+#define SFX_REC_TYPE_MIXTAGS_RELOC sal_uInt8(0x07) // Mixed Tag Content-Record
+#define SFX_REC_TYPE_MIXTAGS sal_uInt8(0x08) // alt (nicht verschiebbar)
+#define SFX_REC_TYPE_LAST sal_uInt8(0x08)
#define SFX_REC_TYPE_MINI 0x100 // Mini-Record
#define SFX_REC_TYPE_DRAWENG 0x400 // Drawing-Engine-Record
#define SFX_REC_TYPE_EOR 0xF00 // End-Of-Records
@@ -123,9 +123,9 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
Struktur des Mini-Records:
- 1 BYTE Pre-Tag
- 3 BYTE OffsetToEndOfRec
- OffsetToEndOfRec* 1 BYTE Content
+ 1 sal_uInt8 Pre-Tag
+ 3 sal_uInt8 OffsetToEndOfRec
+ OffsetToEndOfRec* 1 sal_uInt8 Content
Bei den Extended-Reords folgt auf diesen 4-Byte-Header ein erweiterter
Header, der zun"achst den o.g. Record-Typ, dann eine Versions-Kennung
@@ -133,13 +133,13 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
Struktur des Extended-Records:
- 1 BYTE Pre-Tag (==0x00)
- 3 BYTE OffsetToEndOfRec
- OffsetToEndOfRec* 1 BYTE Content
- 1 BYTE Record-Type
- 1 BYTE Version
- 2 BYTE Tag
- ContentSize* 1 BYTE Content
+ 1 sal_uInt8 Pre-Tag (==0x00)
+ 3 sal_uInt8 OffsetToEndOfRec
+ OffsetToEndOfRec* 1 sal_uInt8 Content
+ 1 sal_uInt8 Record-Type
+ 1 sal_uInt8 Version
+ 2 sal_uInt8 Tag
+ ContentSize* 1 sal_uInt8 Content
(ContentSize = OffsetToEndOfRec - 8)
@@ -159,7 +159,7 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
m"ussen.
=> die Bytes 2-4 werden bei allen Records als Offset zum Ende des
Records interpretiert, so da\s die Gesamt-Recors-Size sich wie
- folgt berechnet: sizeof(UINT32) + OffsetToEndOfRec
+ folgt berechnet: sizeof(sal_uInt32) + OffsetToEndOfRec
Die Records sollten einfach zu parsen un einheitlich aufgebaut sein.
=> Sie bauen aufeinander auf, so ist z.B. der SfxMiniRecord in jedem
@@ -190,7 +190,7 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
/* [Beschreibung]
Mit Instanzen dieser Klasse kann ein einfacher Record in einen Stream
- geschrieben werden, der sich durch ein BYTE-Tag identifiziert, sowie
+ geschrieben werden, der sich durch ein sal_uInt8-Tag identifiziert, sowie
seine eigene L"ange speichert und somit auch von "alteren Versionen
bzw. Readern, die diesen Record-Type (Tag) nicht kennen, "ubersprungen
werden kann. Es wird keine Version-Nummer gespeichert.
@@ -205,9 +205,9 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
[Fileformat]
- 1* BYTE Content-Tag (!= 0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- SizeOfContent* BYTE Content
+ 1* sal_uInt8 Content-Tag (!= 0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ SizeOfContent* sal_uInt8 Content
[Beispiel]
@@ -221,15 +221,15 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
{
protected:
SvStream* _pStream; // <SvStream>, in dem der Record liegt
- UINT32 _nStartPos; // Start-Position des Gesamt-Records im Stream
+ sal_uInt32 _nStartPos; // Start-Position des Gesamt-Records im Stream
bool _bHeaderOk; /* TRUE, wenn der Header schon geschrieben ist; */
- BYTE _nPreTag; // in den Header zu schreibendes 'Pre-Tag'
+ sal_uInt8 _nPreTag; // in den Header zu schreibendes 'Pre-Tag'
public:
inline SfxMiniRecordWriter( SvStream *pStream,
- BYTE nTag );
- inline SfxMiniRecordWriter( SvStream *pStream, BYTE nTag,
- UINT32 nSize );
+ sal_uInt8 nTag );
+ inline SfxMiniRecordWriter( SvStream *pStream, sal_uInt8 nTag,
+ sal_uInt32 nSize );
inline ~SfxMiniRecordWriter();
@@ -237,7 +237,7 @@ public:
inline void Reset();
- UINT32 Close( bool bSeekToEndOfRec = true );
+ sal_uInt32 Close( bool bSeekToEndOfRec = true );
private:
// not implementend, not allowed
@@ -276,35 +276,35 @@ class SVL_DLLPUBLIC SfxMiniRecordReader
{
protected:
SvStream* _pStream; // <SvStream>, aus dem gelesen wird
- UINT32 _nEofRec; // Position direkt hinter dem Record
+ sal_uInt32 _nEofRec; // Position direkt hinter dem Record
bool _bSkipped; // TRUE: der Record wurde explizit geskippt
- BYTE _nPreTag; // aus dem Header gelesenes Pre-Tag
+ sal_uInt8 _nPreTag; // aus dem Header gelesenes Pre-Tag
// Drei-Phasen-Ctor f"ur Subklassen
SfxMiniRecordReader() {}
- void Construct_Impl( SvStream *pStream, BYTE nTag )
+ void Construct_Impl( SvStream *pStream, sal_uInt8 nTag )
{
_pStream = pStream;
- _bSkipped = FALSE;
+ _bSkipped = sal_False;
_nPreTag = nTag;
}
- inline bool SetHeader_Impl( UINT32 nHeader );
+ inline bool SetHeader_Impl( sal_uInt32 nHeader );
// als ung"ultig markieren und zur"uck-seeken
- void SetInvalid_Impl( UINT32 nRecordStartPos )
+ void SetInvalid_Impl( sal_uInt32 nRecordStartPos )
{
_nPreTag = SFX_REC_PRETAG_EOR;
_pStream->Seek( nRecordStartPos );
}
public:
- static USHORT ScanRecordType( SvStream *pStream );
+ static sal_uInt16 ScanRecordType( SvStream *pStream );
SfxMiniRecordReader( SvStream *pStream );
- SfxMiniRecordReader( SvStream *pStream, BYTE nTag );
+ SfxMiniRecordReader( SvStream *pStream, sal_uInt8 nTag );
inline ~SfxMiniRecordReader();
- inline BYTE GetTag() const;
+ inline sal_uInt8 GetTag() const;
inline bool IsValid() const;
inline SvStream& operator*() const;
@@ -324,8 +324,8 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
/* [Beschreibung]
Mit Instanzen dieser Klasse kann ein Record in einen Stream geschrieben
- werden, dessen einziger Inhalt sich durch ein UINT16-Tag und eine
- BYTE-Versions-Nummer identifiziert, sowie seine eigene L"ange speichert
+ werden, dessen einziger Inhalt sich durch ein sal_uInt16-Tag und eine
+ sal_uInt8-Versions-Nummer identifiziert, sowie seine eigene L"ange speichert
und somit auch von "alteren Versionen bzw. Readern, die diesen
Record-Type (Tag) nicht kennen, "ubersprungen werden kann.
@@ -339,12 +339,12 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (!= 0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_SINGLE)
- 1* BYTE Content-Version
- 1* USHORT Content-Tag
- SizeOfContent* BYTE Content
+ 1* sal_uInt8 Pre-Tag (!= 0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_SINGLE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ SizeOfContent* sal_uInt8 Content
[Beispiel]
@@ -357,20 +357,20 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
{
protected:
- SfxSingleRecordWriter( BYTE nRecordType,
+ SfxSingleRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- UINT16 nTag, BYTE nCurVer );
+ sal_uInt16 nTag, sal_uInt8 nCurVer );
public:
SfxSingleRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer );
+ sal_uInt16 nTag, sal_uInt8 nCurVer );
SfxSingleRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nSize );
inline void Reset();
- UINT32 Close( bool bSeekToEndOfRec = true );
+ sal_uInt32 Close( bool bSeekToEndOfRec = true );
};
//------------------------------------------------------------------------
@@ -405,9 +405,9 @@ class SVL_DLLPUBLIC SfxSingleRecordReader: public SfxMiniRecordReader
{
protected:
- UINT16 _nRecordTag; // Art des Gesamt-Inhalts
- BYTE _nRecordVer; // Version des Gesamt-Inhalts
- BYTE _nRecordType; // Record Type aus dem Header
+ sal_uInt16 _nRecordTag; // Art des Gesamt-Inhalts
+ sal_uInt8 _nRecordVer; // Version des Gesamt-Inhalts
+ sal_uInt8 _nRecordType; // Record Type aus dem Header
// Drei-Phasen-Ctor f"ur Subklassen
SfxSingleRecordReader() {}
@@ -416,17 +416,17 @@ protected:
SfxMiniRecordReader::Construct_Impl(
pStream, SFX_REC_PRETAG_EXT );
}
- bool FindHeader_Impl( UINT16 nTypes, UINT16 nTag );
- bool ReadHeader_Impl( USHORT nTypes );
+ bool FindHeader_Impl( sal_uInt16 nTypes, sal_uInt16 nTag );
+ bool ReadHeader_Impl( sal_uInt16 nTypes );
public:
SfxSingleRecordReader( SvStream *pStream );
- SfxSingleRecordReader( SvStream *pStream, USHORT nTag );
+ SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag );
- inline UINT16 GetTag() const;
+ inline sal_uInt16 GetTag() const;
- inline BYTE GetVersion() const;
- inline bool HasVersion( USHORT nVersion ) const;
+ inline sal_uInt8 GetVersion() const;
+ inline bool HasVersion( sal_uInt16 nVersion ) const;
};
//------------------------------------------------------------------------
@@ -454,22 +454,22 @@ class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_FIXSIZE)
- 1* BYTE Content-Version
- 1* UINT16 Content-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 SizeOfEachContent
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_FIXSIZE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 SizeOfEachContent
NumberOfContents* (
- SizeOfEachContent BYTE Content
+ SizeOfEachContent sal_uInt8 Content
)
[Beispiel]
{
SfxMultiFixRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION );
- for ( USHORT n = 0; n < Count(); ++n )
+ for ( sal_uInt16 n = 0; n < Count(); ++n )
{
aRecord.NewContent();
*aRecord << aMember1[n];
@@ -480,28 +480,28 @@ class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
{
protected:
- UINT32 _nContentStartPos; /* Startposition des jeweiligen
+ sal_uInt32 _nContentStartPos; /* Startposition des jeweiligen
Contents - nur bei DBG_UTIL
und f"ur Subklassen */
- UINT32 _nContentSize; // Gr"o\se jedes Contents
- UINT16 _nContentCount; // jeweilige Anzahl der Contents
+ sal_uInt32 _nContentSize; // Gr"o\se jedes Contents
+ sal_uInt16 _nContentCount; // jeweilige Anzahl der Contents
- SfxMultiFixRecordWriter( BYTE nRecordType,
+ SfxMultiFixRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nContentSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nContentSize );
public:
SfxMultiFixRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nContentSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nContentSize );
inline ~SfxMultiFixRecordWriter();
inline void NewContent();
inline void Reset();
- UINT32 Close( bool bSeekToEndOfRec = true );
+ sal_uInt32 Close( bool bSeekToEndOfRec = true );
};
//------------------------------------------------------------------------
@@ -527,23 +527,23 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_FILETYPE_TYPE_VARSIZE)
- 1* BYTE Content-Version
- 1* USHORT Content-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 OffsetToOfsTable
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_FILETYPE_TYPE_VARSIZE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 OffsetToOfsTable
NumberOfContents* (
- ContentSize* BYTE Content
+ ContentSize* sal_uInt8 Content
)
- NumberOfContents* UINT32 ContentOfs (je per <<8 verschoben)
+ NumberOfContents* sal_uInt32 ContentOfs (je per <<8 verschoben)
[Beispiel]
{
SfxMultiVarRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION );
- for ( USHORT n = 0; n < Count(); ++n )
+ for ( sal_uInt16 n = 0; n < Count(); ++n )
{
aRecord.NewContent();
*aRecord << aMember1[n];
@@ -555,24 +555,24 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter
{
protected:
SfxUINT32s _aContentOfs;
- USHORT _nContentVer; // nur f"ur SfxMultiMixRecordWriter
+ sal_uInt16 _nContentVer; // nur f"ur SfxMultiMixRecordWriter
- SfxMultiVarRecordWriter( BYTE nRecordType,
+ SfxMultiVarRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
void FlushContent_Impl();
public:
SfxMultiVarRecordWriter( SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
virtual ~SfxMultiVarRecordWriter();
void NewContent();
- virtual UINT32 Close( bool bSeekToEndOfRec = true );
+ virtual sal_uInt32 Close( bool bSeekToEndOfRec = true );
};
//------------------------------------------------------------------------
@@ -597,27 +597,27 @@ class SVL_DLLPUBLIC SfxMultiMixRecordWriter: public SfxMultiVarRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_MIXTAGS)
- 1* BYTE Content-Version
- 1* USHORT Record-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 OffsetToOfsTable
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_MIXTAGS)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Record-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 OffsetToOfsTable
NumberOfContents* (
- 1* USHORT Content-Tag
- ContentSize* BYTE Content
+ 1* sal_uInt16 Content-Tag
+ ContentSize* sal_uInt8 Content
)
- NumberOfContents* UINT32 ( ContentOfs << 8 + Version )
+ NumberOfContents* sal_uInt32 ( ContentOfs << 8 + Version )
*/
{
public:
inline SfxMultiMixRecordWriter( SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
- void NewContent( USHORT nTag, BYTE nVersion );
+ void NewContent( sal_uInt16 nTag, sal_uInt8 nVersion );
// private: geht nicht, da einige Compiler dann auch vorherige privat machen
void NewContent()
@@ -642,7 +642,7 @@ class SVL_DLLPUBLIC SfxMultiRecordReader: public SfxSingleRecordReader
{
SfxMultiRecordReader aRecord( pStream );
- for ( USHORT nRecNo = 0; aRecord.GetContent(); ++nRecNo )
+ for ( sal_uInt16 nRecNo = 0; aRecord.GetContent(); ++nRecNo )
{
switch ( aRecord.GetTag() )
{
@@ -661,30 +661,30 @@ class SVL_DLLPUBLIC SfxMultiRecordReader: public SfxSingleRecordReader
*/
{
- UINT32 _nStartPos; // Start-Position des Records
- UINT32* _pContentOfs; // Offsets der Startpositionen
- UINT32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos
- UINT16 _nContentCount; // Anzahl der Contents im Record
- UINT16 _nContentNo; /* der Index des aktuellen Contents
+ sal_uInt32 _nStartPos; // Start-Position des Records
+ sal_uInt32* _pContentOfs; // Offsets der Startpositionen
+ sal_uInt32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos
+ sal_uInt16 _nContentCount; // Anzahl der Contents im Record
+ sal_uInt16 _nContentNo; /* der Index des aktuellen Contents
enth"alt jeweils den Index des
Contents, der beim n"achsten
GetContent() geholt wird */
- UINT16 _nContentTag; // Art-Kennung des aktuellen Contents
- BYTE _nContentVer; // Versions-Kennung des akt. Contents
+ sal_uInt16 _nContentTag; // Art-Kennung des aktuellen Contents
+ sal_uInt8 _nContentVer; // Versions-Kennung des akt. Contents
bool ReadHeader_Impl();
public:
SfxMultiRecordReader( SvStream *pStream );
- SfxMultiRecordReader( SvStream *pStream, UINT16 nTag );
+ SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag );
~SfxMultiRecordReader();
bool GetContent();
- inline UINT16 GetContentTag();
- inline BYTE GetContentVersion() const;
- inline bool HasContentVersion( USHORT nVersion ) const;
+ inline sal_uInt16 GetContentTag();
+ inline sal_uInt8 GetContentVersion() const;
+ inline bool HasContentVersion( sal_uInt16 nVersion ) const;
- inline UINT32 ContentCount() const;
+ inline sal_uInt32 ContentCount() const;
};
//=========================================================================
@@ -692,7 +692,7 @@ public:
inline SfxMiniRecordWriter::SfxMiniRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- BYTE nTag // Record-Tag zwischen 0x01 und 0xFE
+ sal_uInt8 nTag // Record-Tag zwischen 0x01 und 0xFE
)
/* [Beschreibung]
@@ -718,8 +718,8 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter
inline SfxMiniRecordWriter::SfxMiniRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- BYTE nTag, // Record-Tag zwischen 0x01 und 0xFE
- UINT32 nSize // Gr"o\se der Daten in Bytes
+ sal_uInt8 nTag, // Record-Tag zwischen 0x01 und 0xFE
+ sal_uInt32 nSize // Gr"o\se der Daten in Bytes
)
/* [Beschreibung]
@@ -809,12 +809,12 @@ inline void SfxMiniRecordReader::Skip()
{
_pStream->Seek(_nEofRec);
- _bSkipped = TRUE;
+ _bSkipped = sal_True;
}
//-------------------------------------------------------------------------
-inline BYTE SfxMiniRecordReader::GetTag() const
+inline sal_uInt8 SfxMiniRecordReader::GetTag() const
/* [Beschreibung]
@@ -861,18 +861,18 @@ inline SvStream& SfxMiniRecordReader::operator*() const
//=========================================================================
-inline UINT32 SfxSingleRecordWriter::Close( bool bSeekToEndOfRec )
+inline sal_uInt32 SfxSingleRecordWriter::Close( bool bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter::Close(bool)>
{
- UINT32 nRet = 0;
+ sal_uInt32 nRet = 0;
// wurde der Header noch nicht geschrieben?
if ( !_bHeaderOk )
{
// Basisklassen-Header schreiben
- UINT32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec );
+ sal_uInt32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec );
// ggf. ans Ende des eigenen Headers seeken oder hinter Rec bleiben
if ( !bSeekToEndOfRec )
@@ -901,7 +901,7 @@ inline void SfxSingleRecordWriter::Reset()
//=========================================================================
-inline UINT16 SfxSingleRecordReader::GetTag() const
+inline sal_uInt16 SfxSingleRecordReader::GetTag() const
/* [Beschreibung]
@@ -914,7 +914,7 @@ inline UINT16 SfxSingleRecordReader::GetTag() const
//-------------------------------------------------------------------------
-inline BYTE SfxSingleRecordReader::GetVersion() const
+inline sal_uInt8 SfxSingleRecordReader::GetVersion() const
/* [Beschreibung]
@@ -927,7 +927,7 @@ inline BYTE SfxSingleRecordReader::GetVersion() const
//-------------------------------------------------------------------------
-inline bool SfxSingleRecordReader::HasVersion( USHORT nVersion ) const
+inline bool SfxSingleRecordReader::HasVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -969,7 +969,7 @@ inline void SfxMultiFixRecordWriter::NewContent()
{
#ifdef DBG_UTIL
- ULONG nOldStartPos;
+ sal_uLong nOldStartPos;
// Startposition des aktuellen Contents merken - Achtung Subklassen!
nOldStartPos = _nContentStartPos;
#endif
@@ -994,8 +994,8 @@ inline void SfxMultiFixRecordWriter::NewContent()
inline SfxMultiMixRecordWriter::SfxMultiMixRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- USHORT nRecordTag, // Gesamt-Record-Art-Kennung
- BYTE nRecordVer // Gesamt-Record-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Record-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Record-Versions-Kennung
)
/* [Beschreibung]
@@ -1022,7 +1022,7 @@ inline void SfxMultiFixRecordWriter::Reset()
//=========================================================================
-inline UINT16 SfxMultiRecordReader::GetContentTag()
+inline sal_uInt16 SfxMultiRecordReader::GetContentTag()
/* [Beschreibung]
@@ -1036,7 +1036,7 @@ inline UINT16 SfxMultiRecordReader::GetContentTag()
//-------------------------------------------------------------------------
-inline BYTE SfxMultiRecordReader::GetContentVersion() const
+inline sal_uInt8 SfxMultiRecordReader::GetContentVersion() const
/* [Beschreibung]
@@ -1050,7 +1050,7 @@ inline BYTE SfxMultiRecordReader::GetContentVersion() const
//-------------------------------------------------------------------------
-inline bool SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const
+inline bool SfxMultiRecordReader::HasContentVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -1065,7 +1065,7 @@ inline bool SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const
//-------------------------------------------------------------------------
-inline UINT32 SfxMultiRecordReader::ContentCount() const
+inline sal_uInt32 SfxMultiRecordReader::ContentCount() const
/* [Beschreibung]
diff --git a/svl/inc/svl/flagitem.hxx b/svl/inc/svl/flagitem.hxx
index e424372d52c9..f64efc455867 100644
--- a/svl/inc/svl/flagitem.hxx
+++ b/svl/inc/svl/flagitem.hxx
@@ -35,7 +35,7 @@
class SvStream;
-extern USHORT nSfxFlagVal[16];
+extern sal_uInt16 nSfxFlagVal[16];
// -----------------------------------------------------------------------
@@ -43,24 +43,24 @@ DBG_NAMEEX_VISIBILITY(SfxFlagItem, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC SfxFlagItem: public SfxPoolItem
{
- USHORT nVal;
+ sal_uInt16 nVal;
public:
TYPEINFO();
- SfxFlagItem( USHORT nWhich = 0, USHORT nValue = 0 );
- SfxFlagItem( USHORT nWhich, SvStream & );
+ SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0 );
+ SfxFlagItem( sal_uInt16 nWhich, SvStream & );
SfxFlagItem( const SfxFlagItem& );
~SfxFlagItem() {
DBG_DTOR(SfxFlagItem, 0); }
- virtual BYTE GetFlagCount() const;
- virtual XubString GetFlagText( BYTE nFlag ) const;
+ virtual sal_uInt8 GetFlagCount() const;
+ virtual XubString GetFlagText( sal_uInt8 nFlag ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -68,14 +68,14 @@ public:
SfxMapUnit ePresMetric,
XubString &rText,
const IntlWrapper * = 0 ) const;
- USHORT GetValue() const { return nVal; }
- void SetValue( USHORT nNewVal ) {
+ sal_uInt16 GetValue() const { return nVal; }
+ void SetValue( sal_uInt16 nNewVal ) {
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nVal = nNewVal;
}
- int GetFlag( BYTE nFlag ) const {
+ int GetFlag( sal_uInt8 nFlag ) const {
return ( (nVal & nSfxFlagVal[nFlag]) != 0 ); }
- void SetFlag( BYTE nFlag, int bVal );
+ void SetFlag( sal_uInt8 nFlag, int bVal );
};
#endif
diff --git a/svl/inc/svl/folderrestriction.hxx b/svl/inc/svl/folderrestriction.hxx
new file mode 100644
index 000000000000..e39c5aeb84d3
--- /dev/null
+++ b/svl/inc/svl/folderrestriction.hxx
@@ -0,0 +1,59 @@
+/* -*- 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 SVTOOLS_FOLDER_RESTRICTION_HXX
+#define SVTOOLS_FOLDER_RESTRICTION_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/string.hxx>
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+
+//........................................................................
+namespace svt
+{
+//........................................................................
+
+ /** retrieves a list of folders which's access is not restricted.
+
+ <p>Note that this is not meant as security feature, but only as
+ method to restrict some UI presentation, such as browsing
+ in the file open dialog.</p>
+ */
+ SVL_DLLPUBLIC void getUnrestrictedFolders( ::std::vector< String >& _rFolders );
+
+//........................................................................
+} // namespace svt
+//........................................................................
+
+#endif // SVTOOLS_FOLDER_RESTRICTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/fstathelper.hxx b/svl/inc/svl/fstathelper.hxx
new file mode 100644
index 000000000000..fcc71502e639
--- /dev/null
+++ b/svl/inc/svl/fstathelper.hxx
@@ -0,0 +1,68 @@
+/* -*- 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 _SVTOOLS_FSTATHELPER_HXX
+#define _SVTOOLS_FSTATHELPER_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/solar.h>
+
+class UniString;
+class Date;
+class Time;
+
+namespace FStatHelper {
+
+/** Return the modified time and date stamp for this URL.
+
+ @param URL the asking URL
+
+ @param pDate if unequal 0, the function set the date stamp
+
+ @param pTime if unequal 0, the function set the time stamp
+
+ @return it was be able to get the date/time stamp
+*/
+SVL_DLLPUBLIC sal_Bool GetModifiedDateTimeOfFile( const UniString& rURL,
+ Date* pDate, Time* pTime );
+
+/** Return if under the URL a document exist. This is only a wrapper for the
+ UCB.IsContent.
+*/
+SVL_DLLPUBLIC sal_Bool IsDocument( const UniString& rURL );
+
+/** Return if under the URL a folder exist. This is only a wrapper for the
+ UCB.isFolder.
+*/
+SVL_DLLPUBLIC sal_Bool IsFolder( const UniString& rURL );
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/globalnameitem.hxx b/svl/inc/svl/globalnameitem.hxx
index 2db51b22999e..478b530f3510 100644
--- a/svl/inc/svl/globalnameitem.hxx
+++ b/svl/inc/svl/globalnameitem.hxx
@@ -43,7 +43,7 @@ class SVL_DLLPUBLIC SfxGlobalNameItem: public SfxPoolItem
public:
TYPEINFO();
SfxGlobalNameItem();
- SfxGlobalNameItem( USHORT nWhich, const SvGlobalName& );
+ SfxGlobalNameItem( sal_uInt16 nWhich, const SvGlobalName& );
~SfxGlobalNameItem();
virtual int operator==( const SfxPoolItem& ) const;
@@ -51,9 +51,9 @@ public:
SvGlobalName GetValue() const { return m_aName; }
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/hint.hxx b/svl/inc/svl/hint.hxx
index 49ab106e45e3..ce840500b4ab 100644
--- a/svl/inc/svl/hint.hxx
+++ b/svl/inc/svl/hint.hxx
@@ -45,26 +45,26 @@ public:
class Visibility Name: public SfxHint \
{ \
Type* pObj; \
- BOOL bIsOwner; \
+ sal_Bool bIsOwner; \
\
public: \
TYPEINFO(); \
- Name( Type* Object, BOOL bOwnedByHint = FALSE ); \
+ Name( Type* Object, sal_Bool bOwnedByHint = sal_False ); \
~Name(); \
\
Type* GetObject() const { return pObj; } \
- BOOL IsOwner() const { return bIsOwner; } \
+ sal_Bool IsOwner() const { return bIsOwner; } \
}
#define IMPL_PTRHINT_AUTODELETE(Name, Type) \
TYPEINIT1(Name, SfxHint); \
- Name::Name( Type* pObject, BOOL bOwnedByHint ) \
+ Name::Name( Type* pObject, sal_Bool bOwnedByHint ) \
{ pObj = pObject; bIsOwner = bOwnedByHint; } \
Name::~Name() { if ( bIsOwner ) delete pObj; }
#define IMPL_PTRHINT(Name, Type) \
TYPEINIT1(Name, SfxHint); \
- Name::Name( Type* pObject, BOOL bOwnedByHint ) \
+ Name::Name( Type* pObject, sal_Bool bOwnedByHint ) \
{ pObj = pObject; bIsOwner = bOwnedByHint; } \
Name::~Name() {}
diff --git a/svl/inc/svl/httpcook.hxx b/svl/inc/svl/httpcook.hxx
index ab5dc857ef7f..2d5d434592af 100644
--- a/svl/inc/svl/httpcook.hxx
+++ b/svl/inc/svl/httpcook.hxx
@@ -62,8 +62,8 @@ struct CntHTTPCookie
String m_aDomain;
String m_aPath;
DateTime m_aExpires;
- USHORT m_nFlags;
- USHORT m_nPolicy;
+ sal_uInt16 m_nFlags;
+ sal_uInt16 m_nPolicy;
CntHTTPCookie (void)
: m_aExpires (Date(0), Time(0)),
@@ -71,14 +71,14 @@ struct CntHTTPCookie
m_nPolicy (CNTHTTP_COOKIE_POLICY_INTERACTIVE)
{}
- BOOL replaces (const CntHTTPCookie& rOther) const
+ sal_Bool replaces (const CntHTTPCookie& rOther) const
{
return ((m_aDomain == rOther.m_aDomain) &&
(m_aPath == rOther.m_aPath ) &&
(m_aName == rOther.m_aName ) );
}
- BOOL operator== (const CntHTTPCookie& rOther) const
+ sal_Bool operator== (const CntHTTPCookie& rOther) const
{
return ((m_aName == rOther.m_aName ) &&
(m_aValue == rOther.m_aValue ) &&
@@ -137,7 +137,7 @@ struct CntHTTPCookieRequest
const String& m_rURL;
List& m_rCookieList;
CntHTTPCookieRequestType m_eType;
- USHORT m_nRet;
+ sal_uInt16 m_nRet;
CntHTTPCookieRequest (
const String& rURL,
diff --git a/svl/inc/svl/ilstitem.hxx b/svl/inc/svl/ilstitem.hxx
index abe4100407ce..a0527cec556c 100644
--- a/svl/inc/svl/ilstitem.hxx
+++ b/svl/inc/svl/ilstitem.hxx
@@ -43,7 +43,7 @@ public:
TYPEINFO();
SfxIntegerListItem();
- SfxIntegerListItem( USHORT nWhich, const SvULongs& rList );
+ SfxIntegerListItem( sal_uInt16 nWhich, const SvULongs& rList );
SfxIntegerListItem( const SfxIntegerListItem& rItem );
~SfxIntegerListItem();
@@ -56,8 +56,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual bool PutValue ( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual bool PutValue ( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
};
#endif // _SFXINTITEM_HXX
diff --git a/svl/inc/svl/imageitm.hxx b/svl/inc/svl/imageitm.hxx
index 7e6bbf3d0a1e..e6cd1d552fd1 100644
--- a/svl/inc/svl/imageitm.hxx
+++ b/svl/inc/svl/imageitm.hxx
@@ -40,20 +40,20 @@ class SVL_DLLPUBLIC SfxImageItem : public SfxInt16Item
SfxImageItem_Impl* pImp;
public:
TYPEINFO();
- SfxImageItem( USHORT nWhich = 0, UINT16 nImage = 0 );
- SfxImageItem( USHORT nWhich, const String& rURL );
+ SfxImageItem( sal_uInt16 nWhich = 0, sal_uInt16 nImage = 0 );
+ SfxImageItem( sal_uInt16 nWhich, const String& rURL );
SfxImageItem( const SfxImageItem& );
virtual ~SfxImageItem();
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetRotation( long nValue );
long GetRotation() const;
- void SetMirrored( BOOL bSet );
- BOOL IsMirrored() const;
+ void SetMirrored( sal_Bool bSet );
+ sal_Bool IsMirrored() const;
String GetURL() const;
};
diff --git a/svl/inc/svl/inetdef.hxx b/svl/inc/svl/inetdef.hxx
new file mode 100644
index 000000000000..3984dcced8f6
--- /dev/null
+++ b/svl/inc/svl/inetdef.hxx
@@ -0,0 +1,31 @@
+/* -*- 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.
+ *
+ ************************************************************************/
+
+#include <tools/inetdef.hxx>
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/inethist.hxx b/svl/inc/svl/inethist.hxx
index 8dbc20c51324..982ad1d25f43 100644
--- a/svl/inc/svl/inethist.hxx
+++ b/svl/inc/svl/inethist.hxx
@@ -63,7 +63,7 @@ class INetURLHistory : public SfxBroadcaster
static void NormalizeUrl_Impl (INetURLObject &rUrl);
SVL_DLLPUBLIC void PutUrl_Impl (const INetURLObject &rUrl);
- SVL_DLLPUBLIC BOOL QueryUrl_Impl (const INetURLObject &rUrl);
+ SVL_DLLPUBLIC sal_Bool QueryUrl_Impl (const INetURLObject &rUrl);
/** Not implemented.
*/
@@ -77,7 +77,7 @@ public:
/** QueryProtocol.
*/
- BOOL QueryProtocol (INetProtocol eProto) const
+ sal_Bool QueryProtocol (INetProtocol eProto) const
{
return ((eProto == INET_PROT_FILE ) ||
(eProto == INET_PROT_FTP ) ||
@@ -87,22 +87,22 @@ public:
/** QueryUrl.
*/
- BOOL QueryUrl (const INetURLObject &rUrl)
+ sal_Bool QueryUrl (const INetURLObject &rUrl)
{
if (QueryProtocol (rUrl.GetProtocol()))
return QueryUrl_Impl (rUrl);
else
- return FALSE;
+ return sal_False;
}
- BOOL QueryUrl (const String &rUrl)
+ sal_Bool QueryUrl (const String &rUrl)
{
INetProtocol eProto =
INetURLObject::CompareProtocolScheme (rUrl);
if (QueryProtocol (eProto))
return QueryUrl_Impl (INetURLObject (rUrl));
else
- return FALSE;
+ return sal_False;
}
/** PutUrl.
diff --git a/svl/inc/svl/inetmsg.hxx b/svl/inc/svl/inetmsg.hxx
new file mode 100644
index 000000000000..049c54219bb1
--- /dev/null
+++ b/svl/inc/svl/inetmsg.hxx
@@ -0,0 +1,31 @@
+/* -*- 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.
+ *
+ ************************************************************************/
+
+#include <tools/inetmsg.hxx>
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/inetstrm.hxx b/svl/inc/svl/inetstrm.hxx
new file mode 100644
index 000000000000..f1d7812f623f
--- /dev/null
+++ b/svl/inc/svl/inetstrm.hxx
@@ -0,0 +1,31 @@
+/* -*- 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.
+ *
+ ************************************************************************/
+
+#include <tools/inetstrm.hxx>
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/instrm.hxx b/svl/inc/svl/instrm.hxx
new file mode 100644
index 000000000000..8e97babaf372
--- /dev/null
+++ b/svl/inc/svl/instrm.hxx
@@ -0,0 +1,82 @@
+/* -*- 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 SVTOOLS_INSTRM_HXX
+#define SVTOOLS_INSTRM_HXX
+
+#include "svl/svldllapi.h"
+#include <com/sun/star/uno/Reference.h>
+#include <tools/stream.hxx>
+
+namespace com { namespace sun { namespace star { namespace io {
+ class XInputStream;
+ class XSeekable;
+} } } }
+
+class SvDataPipe_Impl;
+
+//============================================================================
+class SVL_DLLPUBLIC SvInputStream: public SvStream
+{
+ com::sun::star::uno::Reference< com::sun::star::io::XInputStream >
+ m_xStream;
+ com::sun::star::uno::Reference< com::sun::star::io::XSeekable >
+ m_xSeekable;
+ SvDataPipe_Impl * m_pPipe;
+ sal_uLong m_nSeekedFrom;
+
+ SVL_DLLPRIVATE bool open();
+
+ SVL_DLLPRIVATE virtual sal_uLong GetData(void * pData, sal_uLong nSize);
+
+ SVL_DLLPRIVATE virtual sal_uLong PutData(void const *, sal_uLong);
+
+ SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong nPos);
+
+ SVL_DLLPRIVATE virtual void FlushData();
+
+ SVL_DLLPRIVATE virtual void SetSize(sal_uLong);
+
+public:
+ SvInputStream(
+ com::sun::star::uno::Reference< com::sun::star::io::XInputStream >
+ const &
+ rTheStream);
+
+ virtual ~SvInputStream();
+
+ virtual sal_uInt16 IsA() const;
+
+ virtual void AddMark(sal_uLong nPos);
+
+ virtual void RemoveMark(sal_uLong nPos);
+};
+
+#endif // SVTOOLS_INSTRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/intitem.hxx b/svl/inc/svl/intitem.hxx
index d6f7239df0ce..9ecb9a904dc5 100644
--- a/svl/inc/svl/intitem.hxx
+++ b/svl/inc/svl/intitem.hxx
@@ -38,13 +38,13 @@ class SVL_DLLPUBLIC SfxByteItem: public CntByteItem
public:
TYPEINFO();
- SfxByteItem(USHORT which = 0, BYTE nValue = 0):
+ SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0):
CntByteItem(which, nValue) {}
- SfxByteItem(USHORT which, SvStream & rStream):
+ SfxByteItem(sal_uInt16 which, SvStream & rStream):
CntByteItem(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
{ return new SfxByteItem(*this); }
@@ -55,16 +55,16 @@ DBG_NAMEEX_VISIBILITY(SfxInt16Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC SfxInt16Item: public SfxPoolItem
{
- INT16 m_nValue;
+ sal_Int16 m_nValue;
public:
TYPEINFO();
- SfxInt16Item(USHORT which = 0, INT16 nTheValue = 0):
+ SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(SfxInt16Item, 0); }
- SfxInt16Item(USHORT nWhich, SvStream & rStream);
+ SfxInt16Item(sal_uInt16 nWhich, SvStream & rStream);
SfxInt16Item(const SfxInt16Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -84,29 +84,29 @@ public:
const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual INT16 GetMin() const;
+ virtual sal_Int16 GetMin() const;
- virtual INT16 GetMax() const;
+ virtual sal_Int16 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT16 GetValue() const { return m_nValue; }
+ sal_Int16 GetValue() const { return m_nValue; }
- inline void SetValue(INT16 nTheValue);
+ inline void SetValue(sal_Int16 nTheValue);
};
-inline void SfxInt16Item::SetValue(INT16 nTheValue)
+inline void SfxInt16Item::SetValue(sal_Int16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "SfxInt16Item::SetValue(); Pooled item");
m_nValue = nTheValue;
@@ -118,13 +118,13 @@ class SVL_DLLPUBLIC SfxUInt16Item: public CntUInt16Item
public:
TYPEINFO();
- SfxUInt16Item(USHORT which = 0, UINT16 nValue = 0):
+ SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntUInt16Item(which, nValue) {}
- SfxUInt16Item(USHORT which, SvStream & rStream):
+ SfxUInt16Item(sal_uInt16 which, SvStream & rStream):
CntUInt16Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxUInt16Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
@@ -137,13 +137,13 @@ class SVL_DLLPUBLIC SfxInt32Item: public CntInt32Item
public:
TYPEINFO();
- SfxInt32Item(USHORT which = 0, INT32 nValue = 0):
+ SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0):
CntInt32Item(which, nValue) {}
- SfxInt32Item(USHORT which, SvStream & rStream):
+ SfxInt32Item(sal_uInt16 which, SvStream & rStream):
CntInt32Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxInt32Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
@@ -157,13 +157,13 @@ class SVL_DLLPUBLIC SfxUInt32Item: public CntUInt32Item
public:
TYPEINFO();
- SfxUInt32Item(USHORT which = 0, UINT32 nValue = 0):
+ SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0):
CntUInt32Item(which, nValue) {}
- SfxUInt32Item(USHORT which, SvStream & rStream):
+ SfxUInt32Item(sal_uInt16 which, SvStream & rStream):
CntUInt32Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxUInt32Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
diff --git a/svl/inc/svl/itemiter.hxx b/svl/inc/svl/itemiter.hxx
index a98f2da24d55..55ad0e7b02a5 100644
--- a/svl/inc/svl/itemiter.hxx
+++ b/svl/inc/svl/itemiter.hxx
@@ -40,7 +40,7 @@ class SVL_DLLPUBLIC SfxItemIter
{
// Item-Feld - Start & Ende
const SfxItemSet& _rSet;
- USHORT _nStt, _nEnd, _nAkt;
+ sal_uInt16 _nStt, _nEnd, _nAkt;
public:
SfxItemIter( const SfxItemSet& rSet );
@@ -58,12 +58,12 @@ public:
const SfxPoolItem* NextItem();
const SfxPoolItem* PrevItem();
- BOOL IsAtStart() const { return _nAkt == _nStt; }
- BOOL IsAtEnd() const { return _nAkt == _nEnd; }
+ sal_Bool IsAtStart() const { return _nAkt == _nStt; }
+ sal_Bool IsAtEnd() const { return _nAkt == _nEnd; }
- USHORT GetCurPos() const { return _nAkt; }
- USHORT GetFirstPos() const { return _nStt; }
- USHORT GetLastPos() const { return _nEnd; }
+ sal_uInt16 GetCurPos() const { return _nAkt; }
+ sal_uInt16 GetFirstPos() const { return _nStt; }
+ sal_uInt16 GetLastPos() const { return _nEnd; }
};
#endif
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index 04ae4f07d29b..3cec7f75dee2 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -71,8 +71,8 @@ DBG_NAMEEX(SfxItemPool)
struct SfxItemInfo
{
- USHORT _nSID;
- USHORT _nFlags;
+ sal_uInt16 _nSID;
+ sal_uInt16 _nFlags;
};
//====================================================================
@@ -105,23 +105,23 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, USHORT nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, sal_uInt16 nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** pArr);
UniString aName;
- USHORT nStart, nEnd;
- USHORT _nFileFormatVersion;
+ sal_uInt16 nStart, nEnd;
+ sal_uInt16 _nFileFormatVersion;
#ifdef TF_POOLABLE
const SfxItemInfo* pItemInfos;
#else
- USHORT* pSlotIds;
+ sal_uInt16* pSlotIds;
#endif
SfxItemPool_Impl* pImp;
SfxPoolItem** ppStaticDefaults;
SfxPoolItem** ppPoolDefaults;
SfxItemPool* pSecondary;
SfxItemPool* pMaster;
- USHORT* _pPoolRanges;
+ sal_uInt16* _pPoolRanges;
bool bPersistentRefCounts;
private:
@@ -138,16 +138,16 @@ public:
friend class SfxPoolWhichMap;
private:
- inline USHORT GetIndex_Impl(USHORT nWhich) const;
- inline USHORT GetSize_Impl() const { return nEnd - nStart + 1; }
+ inline sal_uInt16 GetIndex_Impl(sal_uInt16 nWhich) const;
+ inline sal_uInt16 GetSize_Impl() const { return nEnd - nStart + 1; }
SVL_DLLPRIVATE SvStream& Load1_Impl( SvStream &rStream );
- SVL_DLLPRIVATE bool IsItemFlag_Impl( USHORT nWhich, USHORT nFlag ) const;
+ SVL_DLLPRIVATE bool IsItemFlag_Impl( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
public:
// fuer dflt. SfxItemSet::CTOR, setze dflt. WhichRanges
- void FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const;
- const USHORT* GetFrozenIdRanges() const
+ void FillItemIdRanges_Impl( sal_uInt16*& pWhichRanges ) const;
+ const sal_uInt16* GetFrozenIdRanges() const
{ return _pPoolRanges; }
bool IsVer2_Impl() const;
@@ -155,21 +155,21 @@ public:
//---------------------------------------------------------------------
protected:
- static inline void SetRefCount( SfxPoolItem& rItem, ULONG n );
- static inline ULONG AddRef( const SfxPoolItem& rItem, ULONG n = 1 );
- static inline ULONG ReleaseRef( const SfxPoolItem& rItem, ULONG n = 1);
+ static inline void SetRefCount( SfxPoolItem& rItem, sal_uLong n );
+ static inline sal_uLong AddRef( const SfxPoolItem& rItem, sal_uLong n = 1 );
+ static inline sal_uLong ReleaseRef( const SfxPoolItem& rItem, sal_uLong n = 1);
public:
SfxItemPool( const SfxItemPool &rPool,
- BOOL bCloneStaticDefaults = FALSE );
+ sal_Bool bCloneStaticDefaults = sal_False );
SfxItemPool( const UniString &rName,
- USHORT nStart, USHORT nEnd,
+ sal_uInt16 nStart, sal_uInt16 nEnd,
#ifdef TF_POOLABLE
const SfxItemInfo *pItemInfos,
#endif
SfxPoolItem **pDefaults = 0,
#ifndef TF_POOLABLE
- USHORT *pSlotIds = 0,
+ sal_uInt16 *pSlotIds = 0,
#endif
bool bLoadRefCounts = true );
protected:
@@ -180,14 +180,14 @@ public:
SfxBroadcaster& BC();
void SetPoolDefaultItem( const SfxPoolItem& );
- const SfxPoolItem* GetPoolDefaultItem( USHORT nWhich ) const;
- void ResetPoolDefaultItem( USHORT nWhich );
+ const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich ) const;
+ void ResetPoolDefaultItem( sal_uInt16 nWhich );
void SetDefaults( SfxPoolItem **pDefaults );
- void ReleaseDefaults( BOOL bDelete = FALSE );
- static void ReleaseDefaults( SfxPoolItem **pDefaults, USHORT nCount, BOOL bDelete = FALSE );
+ void ReleaseDefaults( sal_Bool bDelete = sal_False );
+ static void ReleaseDefaults( SfxPoolItem **pDefaults, sal_uInt16 nCount, sal_Bool bDelete = sal_False );
- virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
+ virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const;
void SetDefaultMetric( SfxMapUnit eNewMetric );
virtual SfxItemPresentation GetPresentation( const SfxPoolItem& rItem,
SfxItemPresentation ePresentation,
@@ -198,9 +198,9 @@ public:
virtual SfxItemPool* Clone() const;
UniString const & GetName() const { return aName; }
- virtual const SfxPoolItem& Put( const SfxPoolItem&, USHORT nWhich = 0 );
+ virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 );
virtual void Remove( const SfxPoolItem& );
- virtual const SfxPoolItem& GetDefaultItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem& GetDefaultItem( sal_uInt16 nWhich ) const;
const SfxPoolItem* LoadItem( SvStream &rStream,
bool bDirect = false,
@@ -209,11 +209,11 @@ public:
const SfxPoolItem &rItem,
bool bDirect = false ) const;
- USHORT GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem(USHORT nWhich, USHORT nSurrogate) const;
- USHORT GetItemCount(USHORT nWhich) const;
+ sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
+ const SfxPoolItem * GetItem2(sal_uInt16 nWhich, sal_uInt32 nSurrogate) const;
+ sal_uInt32 GetItemCount2(sal_uInt16 nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
- USHORT &rWhich, USHORT nSlotId,
+ sal_uInt16 &rWhich, sal_uInt16 nSlotId,
const SfxItemPool* pRefPool = 0 );
bool StoreSurrogate(SvStream& rStream,
const SfxPoolItem *pItem ) const;
@@ -224,14 +224,14 @@ public:
return bPersistentRefCounts; }
void LoadCompleted();
- USHORT GetFirstWhich() const { return nStart; }
- USHORT GetLastWhich() const { return nEnd; }
- bool IsInRange( USHORT nWhich ) const {
+ sal_uInt16 GetFirstWhich() const { return nStart; }
+ sal_uInt16 GetLastWhich() const { return nEnd; }
+ bool IsInRange( sal_uInt16 nWhich ) const {
return nWhich >= nStart &&
nWhich <= nEnd; }
- bool IsInVersionsRange( USHORT nWhich ) const;
- bool IsInStoringRange( USHORT nWhich ) const;
- void SetStoringRange( USHORT nFrom, USHORT nTo );
+ bool IsInVersionsRange( sal_uInt16 nWhich ) const;
+ bool IsInStoringRange( sal_uInt16 nWhich ) const;
+ void SetStoringRange( sal_uInt16 nFrom, sal_uInt16 nTo );
void SetSecondaryPool( SfxItemPool *pPool );
SfxItemPool* GetSecondaryPool() const {
return pSecondary; }
@@ -243,35 +243,35 @@ public:
void Delete();
#ifdef TF_POOLABLE
- bool IsItemFlag( USHORT nWhich, USHORT nFlag ) const;
- bool IsItemFlag( const SfxPoolItem &rItem, USHORT nFlag ) const
+ bool IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
+ bool IsItemFlag( const SfxPoolItem &rItem, sal_uInt16 nFlag ) const
{ return IsItemFlag( rItem.Which(), nFlag ); }
void SetItemInfos( const SfxItemInfo *pInfos )
{ pItemInfos = pInfos; }
#else
int HasMap() const { return 0 != pSlotIds; }
- void SetMap( USHORT *pNewSlotIds )
+ void SetMap( sal_uInt16 *pNewSlotIds )
{ pSlotIds = pNewSlotIds; }
#endif
- USHORT GetWhich( USHORT nSlot, BOOL bDeep = TRUE ) const;
- USHORT GetSlotId( USHORT nWhich, BOOL bDeep = TRUE ) const;
- USHORT GetTrueWhich( USHORT nSlot, BOOL bDeep = TRUE ) const;
- USHORT GetTrueSlotId( USHORT nWhich, BOOL bDeep = TRUE ) const;
-
- void SetVersionMap( USHORT nVer,
- USHORT nOldStart, USHORT nOldEnd,
- USHORT *pWhichIdTab );
- USHORT GetNewWhich( USHORT nOldWhich ) const;
- USHORT GetVersion() const;
- USHORT GetFileFormatVersion() const
+ sal_uInt16 GetWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetSlotId( sal_uInt16 nWhich, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich, sal_Bool bDeep = sal_True ) const;
+
+ void SetVersionMap( sal_uInt16 nVer,
+ sal_uInt16 nOldStart, sal_uInt16 nOldEnd,
+ sal_uInt16 *pWhichIdTab );
+ sal_uInt16 GetNewWhich( sal_uInt16 nOldWhich ) const;
+ sal_uInt16 GetVersion() const;
+ sal_uInt16 GetFileFormatVersion() const
{ return _nFileFormatVersion; }
- void SetFileFormatVersion( USHORT nFileFormatVersion );
- USHORT GetLoadingVersion() const;
+ void SetFileFormatVersion( sal_uInt16 nFileFormatVersion );
+ sal_uInt16 GetLoadingVersion() const;
bool IsCurrentVersionLoading() const;
- static int IsWhich(USHORT nId) {
+ static int IsWhich(sal_uInt16 nId) {
return nId && nId <= SFX_WHICH_MAX; }
- static int IsSlot(USHORT nId) {
+ static int IsSlot(sal_uInt16 nId) {
return nId && nId > SFX_WHICH_MAX; }
static const SfxItemPool* GetStoringPool();
@@ -284,19 +284,19 @@ private:
// --------------- Inline Implementierungen ------------------------------
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, ULONG n )
+inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, sal_uLong n )
{
rItem.SetRefCount(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::AddRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uLong SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uLong n )
{
return rItem.AddRef(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uLong SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, sal_uLong n )
{
return rItem.ReleaseRef(n);
}
diff --git a/svl/inc/svl/itemprop.hxx b/svl/inc/svl/itemprop.hxx
index 46dce586bb94..aeaa9e26c2d9 100644
--- a/svl/inc/svl/itemprop.hxx
+++ b/svl/inc/svl/itemprop.hxx
@@ -44,20 +44,20 @@
struct SfxItemPropertyMapEntry
{
const char* pName;
- USHORT nNameLen;
- USHORT nWID;
+ sal_uInt16 nNameLen;
+ sal_uInt16 nWID;
const com::sun::star::uno::Type* pType;
long nFlags;
- BYTE nMemberId;
+ sal_uInt8 nMemberId;
};
struct SfxItemPropertySimpleEntry
{
- USHORT nWID;
+ sal_uInt16 nWID;
const com::sun::star::uno::Type* pType;
long nFlags;
- BYTE nMemberId;
+ sal_uInt8 nMemberId;
SfxItemPropertySimpleEntry() :
nWID( 0 ),
@@ -65,8 +65,8 @@ struct SfxItemPropertySimpleEntry
nFlags( 0 ),
nMemberId( 0 ){}
- SfxItemPropertySimpleEntry(USHORT _nWID, const com::sun::star::uno::Type* _pType,
- long _nFlags, BYTE _nMemberId) :
+ SfxItemPropertySimpleEntry(sal_uInt16 _nWID, const com::sun::star::uno::Type* _pType,
+ long _nFlags, sal_uInt8 _nMemberId) :
nWID( _nWID ),
pType( _pType ),
nFlags( _nFlags ),
@@ -114,7 +114,7 @@ class SVL_DLLPUBLIC SfxItemPropertySet
SfxItemPropertyMap m_aMap;
mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
protected:
- virtual BOOL FillItem(SfxItemSet& rSet, USHORT nWhich, BOOL bGetProperty) const;
+ virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const;
public:
SfxItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
diff --git a/svl/inc/svl/itemset.hxx b/svl/inc/svl/itemset.hxx
index 8a4f3248a06c..b3dea2cfa08b 100644
--- a/svl/inc/svl/itemset.hxx
+++ b/svl/inc/svl/itemset.hxx
@@ -47,8 +47,8 @@ typedef SfxPoolItem const** SfxItemArray;
#ifndef DBG
#ifdef DBG_UTILx
#define DBG(s) s
-#define _pChildCount(THIS) ( *(USHORT**)SfxPointerServer::GetServer()->GetPointer(THIS) )
-#define _pChildCountCtor ( (*(USHORT**)SfxPointerServer::GetServer()->CreatePointer(this)) = new USHORT )
+#define _pChildCount(THIS) ( *(sal_uInt16**)SfxPointerServer::GetServer()->GetPointer(THIS) )
+#define _pChildCountCtor ( (*(sal_uInt16**)SfxPointerServer::GetServer()->CreatePointer(this)) = new sal_uInt16 )
#define _pChildCountDtor ( SfxPointerServer::GetServer()->ReleasePointer(this) )
#else
#define DBG(s)
@@ -76,8 +76,8 @@ class SVL_DLLPUBLIC SfxItemSet
SfxItemPool* _pPool; // der verwendete Pool
const SfxItemSet* _pParent; // Ableitung
SfxItemArray _aItems; // Item-Feld
- USHORT* _pWhichRanges; // Array von Which-Bereichen
- USHORT _nCount; // Anzahl Items
+ sal_uInt16* _pWhichRanges; // Array von Which-Bereichen
+ sal_uInt16 _nCount; // Anzahl Items
//---------------------------------------------------------------------
#ifndef _SFXITEMS_HXX
@@ -87,9 +87,9 @@ friend class SfxAllItemSet;
friend const char *DbgCheckItemSet( const void* );
private:
- SVL_DLLPRIVATE void InitRanges_Impl(const USHORT *nWhichPairTable);
- SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, USHORT n1, USHORT n2, USHORT n3);
- SVL_DLLPRIVATE void InitRanges_Impl(USHORT nWh1, USHORT nWh2);
+ SVL_DLLPRIVATE void InitRanges_Impl(const sal_uInt16 *nWhichPairTable);
+ SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, sal_uInt16 n1, sal_uInt16 n2, sal_uInt16 n3);
+ SVL_DLLPRIVATE void InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2);
public:
SfxItemArray GetItems_Impl() const { return _aItems; }
@@ -110,59 +110,59 @@ protected:
public:
SfxItemSet( const SfxItemSet& );
- SfxItemSet( SfxItemPool&, BOOL bTotalPoolRanges = FALSE );
- SfxItemSet( SfxItemPool&, USHORT nWhich1, USHORT nWhich2 );
+ SfxItemSet( SfxItemPool&, sal_Bool bTotalPoolRanges = sal_False );
+ SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
SfxItemSet( SfxItemPool&, USHORT_ARG nWh1, USHORT_ARG nWh2, USHORT_ARG nNull, ... );
- SfxItemSet( SfxItemPool&, const USHORT* nWhichPairTable );
+ SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable );
virtual ~SfxItemSet();
- virtual SfxItemSet * Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+ virtual SfxItemSet * Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const;
// Items erfragen
- USHORT Count() const { return _nCount; }
- USHORT TotalCount() const;
+ sal_uInt16 Count() const { return _nCount; }
+ sal_uInt16 TotalCount() const;
- virtual const SfxPoolItem& Get( USHORT nWhich, BOOL bSrchInParent = TRUE ) const;
- const SfxPoolItem* GetItem( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ virtual const SfxPoolItem& Get( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True ) const;
+ const SfxPoolItem* GetItem( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
TypeId aItemType = 0 ) const;
// Which-Wert des Items an der Position nPos erfragen
- USHORT GetWhichByPos(USHORT nPos) const;
+ sal_uInt16 GetWhichByPos(sal_uInt16 nPos) const;
// Item-Status erfragen
- SfxItemState GetItemState( USHORT nWhich,
- BOOL bSrchInParent = TRUE,
+ SfxItemState GetItemState( sal_uInt16 nWhich,
+ sal_Bool bSrchInParent = sal_True,
const SfxPoolItem **ppItem = 0 ) const;
- virtual void DisableItem(USHORT nWhich);
- virtual void InvalidateItem( USHORT nWhich );
- virtual USHORT ClearItem( USHORT nWhich = 0);
- virtual void ClearInvalidItems( BOOL bHardDefault = FALSE );
+ virtual void DisableItem(sal_uInt16 nWhich);
+ virtual void InvalidateItem( sal_uInt16 nWhich );
+ virtual sal_uInt16 ClearItem( sal_uInt16 nWhich = 0);
+ virtual void ClearInvalidItems( sal_Bool bHardDefault = sal_False );
void InvalidateAllItems(); HACK(via nWhich = 0)
inline void SetParent( const SfxItemSet* pNew );
// Items hinzufuegen, loeschen etc.
- virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich );
+ virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich );
const SfxPoolItem* Put( const SfxPoolItem& rItem )
{ return Put(rItem, rItem.Which()); }
virtual int Put( const SfxItemSet&,
- BOOL bInvalidAsDefault = TRUE );
+ sal_Bool bInvalidAsDefault = sal_True );
void PutExtended( const SfxItemSet&,
SfxItemState eDontCareAs = SFX_ITEM_UNKNOWN,
SfxItemState eDefaultAs = SFX_ITEM_UNKNOWN );
- virtual int Set( const SfxItemSet&, BOOL bDeep = TRUE );
+ virtual int Set( const SfxItemSet&, sal_Bool bDeep = sal_True );
virtual void Intersect( const SfxItemSet& rSet );
- virtual void MergeValues( const SfxItemSet& rSet, BOOL bOverwriteDefaults = FALSE );
+ virtual void MergeValues( const SfxItemSet& rSet, sal_Bool bOverwriteDefaults = sal_False );
virtual void Differentiate( const SfxItemSet& rSet );
- virtual void MergeValue( const SfxPoolItem& rItem, BOOL bOverwriteDefaults = FALSE );
+ virtual void MergeValue( const SfxPoolItem& rItem, sal_Bool bOverwriteDefaults = sal_False );
SfxItemPool* GetPool() const { return _pPool; }
- const USHORT* GetRanges() const { return _pWhichRanges; }
- void SetRanges( const USHORT *pRanges );
- void MergeRange( USHORT nFrom, USHORT nTo );
+ const sal_uInt16* GetRanges() const { return _pWhichRanges; }
+ void SetRanges( const sal_uInt16 *pRanges );
+ void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo );
const SfxItemSet* GetParent() const { return _pParent; }
virtual SvStream & Load( SvStream &, bool bDirect = false,
@@ -191,19 +191,19 @@ class SVL_DLLPUBLIC SfxAllItemSet: public SfxItemSet
{
SfxVoidItem aDefault;
- USHORT nFree;
+ sal_uInt16 nFree;
public:
SfxAllItemSet( SfxItemPool &rPool );
SfxAllItemSet( const SfxItemSet & );
SfxAllItemSet( const SfxAllItemSet & );
- virtual SfxItemSet * Clone( BOOL bItems = TRUE, SfxItemPool *pToPool = 0 ) const;
- virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich );
+ virtual SfxItemSet * Clone( sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0 ) const;
+ virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich );
const SfxPoolItem* Put( const SfxPoolItem& rItem )
{ return Put(rItem, rItem.Which()); }
virtual int Put( const SfxItemSet&,
- BOOL bInvalidAsDefault = TRUE );
+ sal_Bool bInvalidAsDefault = sal_True );
};
#endif // #ifndef _SFXITEMSET_HXX
diff --git a/svl/inc/svl/lckbitem.hxx b/svl/inc/svl/lckbitem.hxx
index 015b72264da2..3b41c834010f 100644
--- a/svl/inc/svl/lckbitem.hxx
+++ b/svl/inc/svl/lckbitem.hxx
@@ -43,23 +43,23 @@ class SVL_DLLPUBLIC SfxLockBytesItem : public SfxPoolItem
public:
TYPEINFO();
SfxLockBytesItem();
- SfxLockBytesItem( USHORT nWhich,
+ SfxLockBytesItem( sal_uInt16 nWhich,
SvLockBytes *pLockBytes );
- SfxLockBytesItem( USHORT nWhich, SvStream & );
+ SfxLockBytesItem( sal_uInt16 nWhich, SvStream & );
SfxLockBytesItem( const SfxLockBytesItem& );
~SfxLockBytesItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
SvLockBytes* GetValue() const { return _xVal; }
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/listener.hxx b/svl/inc/svl/listener.hxx
new file mode 100644
index 000000000000..87bf85426747
--- /dev/null
+++ b/svl/inc/svl/listener.hxx
@@ -0,0 +1,67 @@
+/* -*- 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 _SVT_LISTENER_HXX
+#define _SVT_LISTENER_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/rtti.hxx>
+
+class SvtBroadcaster;
+class SfxHint;
+class SvtListenerBase;
+
+//-------------------------------------------------------------------------
+
+class SVL_DLLPUBLIC SvtListener
+{
+ friend class SvtListenerBase;
+ SvtListenerBase *pBrdCastLst;
+
+ const SvtListener& operator=(const SvtListener &); // n.i., ist verboten
+
+public:
+ TYPEINFO();
+
+ SvtListener();
+ SvtListener( const SvtListener &rCopy );
+ virtual ~SvtListener();
+
+ sal_Bool StartListening( SvtBroadcaster& rBroadcaster );
+ sal_Bool EndListening( SvtBroadcaster& rBroadcaster );
+ void EndListeningAll();
+ sal_Bool IsListening( SvtBroadcaster& rBroadcaster ) const;
+
+ sal_Bool HasBroadcaster() const { return 0 != pBrdCastLst; }
+
+ virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/listeneriter.hxx b/svl/inc/svl/listeneriter.hxx
new file mode 100644
index 000000000000..0dcdec811250
--- /dev/null
+++ b/svl/inc/svl/listeneriter.hxx
@@ -0,0 +1,81 @@
+/* -*- 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 _SVT_LISTENERITER_HXX
+#define _SVT_LISTENERITER_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/rtti.hxx>
+
+class SvtListener;
+class SvtListenerBase;
+class SvtBroadcaster;
+
+//-------------------------------------------------------------------------
+
+class SVL_DLLPUBLIC SvtListenerIter
+{
+ friend class SvtListenerBase;
+
+ SvtBroadcaster& rRoot;
+ SvtListenerBase *pAkt, *pDelNext;
+
+ // for the update of all iterator's, if a listener is added or removed
+ // at the same time.
+ static SvtListenerIter *pListenerIters;
+ SvtListenerIter *pNxtIter;
+ TypeId aSrchId; // fuer First/Next - suche diesen Type
+
+ SVL_DLLPRIVATE static void RemoveListener( SvtListenerBase& rDel,
+ SvtListenerBase* pNext );
+
+public:
+ SvtListenerIter( SvtBroadcaster& );
+ ~SvtListenerIter();
+
+ const SvtBroadcaster& GetBroadcaster() const { return rRoot; }
+ SvtBroadcaster& GetBroadcaster() { return rRoot; }
+
+ SvtListener* GoNext(); // to the next
+ SvtListener* GoPrev(); // to the previous
+
+ SvtListener* GoStart(); // to the start of the list
+ SvtListener* GoEnd(); // to the end of the list
+
+ SvtListener* GoRoot(); // to the root
+ SvtListener* GetCurr() const; // returns the current
+
+ int IsChanged() const { return pDelNext != pAkt; }
+
+ SvtListener* First( TypeId nType );
+ SvtListener* Next();
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
new file mode 100644
index 000000000000..9e6c5c242451
--- /dev/null
+++ b/svl/inc/svl/lngmisc.hxx
@@ -0,0 +1,79 @@
+/* -*- 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 _SVTOOLS_LNGMISC_HXX_
+#define _SVTOOLS_LNGMISC_HXX_
+
+#include "svl/svldllapi.h"
+#include <tools/solar.h>
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+#include <tools/string.hxx>
+
+///////////////////////////////////////////////////////////////////////////
+
+#define SVT_SOFT_HYPHEN ((sal_Unicode) 0x00AD)
+#define SVT_HARD_HYPHEN ((sal_Unicode) 0x2011)
+
+// the non-breaking space
+#define SVT_HARD_SPACE ((sal_Unicode) 0x00A0)
+
+namespace linguistic
+{
+
+inline sal_Bool IsHyphen( sal_Unicode cChar )
+{
+ return cChar == SVT_SOFT_HYPHEN || cChar == SVT_HARD_HYPHEN;
+}
+
+
+inline sal_Bool IsControlChar( sal_Unicode cChar )
+{
+ return cChar < (sal_Unicode) ' ';
+}
+
+
+inline sal_Bool HasHyphens( const rtl::OUString &rTxt )
+{
+ return rTxt.indexOf( SVT_SOFT_HYPHEN ) != -1 ||
+ rTxt.indexOf( SVT_HARD_HYPHEN ) != -1;
+}
+
+SVL_DLLPUBLIC sal_Int32 GetNumControlChars( const rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Bool RemoveHyphens( rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Bool RemoveControlChars( rtl::OUString &rTxt );
+
+SVL_DLLPUBLIC sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' );
+
+SVL_DLLPUBLIC String GetThesaurusReplaceText( const String &rText );
+
+} // namespace linguistic
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/lstner.hxx b/svl/inc/svl/lstner.hxx
index a129cf588b91..c87d88ac890c 100644
--- a/svl/inc/svl/lstner.hxx
+++ b/svl/inc/svl/lstner.hxx
@@ -58,15 +58,15 @@ public:
SfxListener( const SfxListener &rCopy );
virtual ~SfxListener();
- BOOL StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDups = FALSE );
- BOOL EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups = FALSE );
- void EndListening( USHORT nNo );
+ sal_Bool StartListening( SfxBroadcaster& rBroadcaster, sal_Bool bPreventDups = sal_False );
+ sal_Bool EndListening( SfxBroadcaster& rBroadcaster, sal_Bool bAllDups = sal_False );
+ void EndListening( sal_uInt16 nNo );
void EndListeningAll();
- BOOL IsListening( SfxBroadcaster& rBroadcaster ) const;
+ sal_Bool IsListening( SfxBroadcaster& rBroadcaster ) const;
- USHORT GetBroadcasterCount() const
+ sal_uInt16 GetBroadcasterCount() const
{ return aBCs.Count(); }
- SfxBroadcaster* GetBroadcasterJOE( USHORT nNo ) const
+ SfxBroadcaster* GetBroadcasterJOE( sal_uInt16 nNo ) const
{ return (SfxBroadcaster*) aBCs.GetObject(nNo); }
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
diff --git a/svl/inc/svl/macitem.hxx b/svl/inc/svl/macitem.hxx
index 35290e6558e4..2bc93a177539 100644
--- a/svl/inc/svl/macitem.hxx
+++ b/svl/inc/svl/macitem.hxx
@@ -92,7 +92,7 @@ public:
ScriptType GetScriptType() const { return eType; }
- BOOL HasMacro() const { return aMacName.Len() ? TRUE : FALSE; }
+ sal_Bool HasMacro() const { return aMacName.Len() ? sal_True : sal_False; }
#ifdef SOLAR_JAVA
// JavaScript-Function-Objekt holen
@@ -124,7 +124,7 @@ DECLARE_TABLE( _SvxMacroTableDtor, SvxMacro* )
class SVL_DLLPUBLIC SvxMacroTableDtor : public _SvxMacroTableDtor
{
public:
- inline SvxMacroTableDtor( const USHORT nInitSz = 0, const USHORT nReSz = 1 );
+ inline SvxMacroTableDtor( const sal_uInt16 nInitSz = 0, const sal_uInt16 nReSz = 1 );
inline SvxMacroTableDtor( const SvxMacroTableDtor &rCpy ) : _SvxMacroTableDtor() { *this = rCpy; }
inline ~SvxMacroTableDtor() { DelDtor(); }
SvxMacroTableDtor& operator=( const SvxMacroTableDtor &rCpy );
@@ -132,14 +132,14 @@ public:
// loescht alle Eintraege
void DelDtor();
- SvStream& Read( SvStream &, USHORT nVersion = SVX_MACROTBL_AKTVERSION );
+ SvStream& Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION );
SvStream& Write( SvStream & ) const;
- USHORT GetVersion() const { return SVX_MACROTBL_AKTVERSION; }
+ sal_uInt16 GetVersion() const { return SVX_MACROTBL_AKTVERSION; }
};
-inline SvxMacroTableDtor::SvxMacroTableDtor( const USHORT nInitSz,
- const USHORT nReSz)
+inline SvxMacroTableDtor::SvxMacroTableDtor( const sal_uInt16 nInitSz,
+ const sal_uInt16 nReSz)
: _SvxMacroTableDtor( nInitSz, nReSz )
{}
@@ -153,7 +153,7 @@ class SVL_DLLPUBLIC SvxMacroItem: public SfxPoolItem
public:
TYPEINFO();
- inline SvxMacroItem ( const USHORT nId /*= ITEMID_MACRO*/ );
+ inline SvxMacroItem ( const sal_uInt16 nId /*= ITEMID_MACRO*/ );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -163,17 +163,17 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
inline const SvxMacroTableDtor& GetMacroTable() const { return aMacroTable;}
inline void SetMacroTable( const SvxMacroTableDtor& rTbl ) { aMacroTable = rTbl; }
- inline const SvxMacro& GetMacro( USHORT nEvent ) const;
- inline BOOL HasMacro( USHORT nEvent ) const;
- void SetMacro( USHORT nEvent, const SvxMacro& );
- inline BOOL DelMacro( USHORT nEvent );
+ inline const SvxMacro& GetMacro( sal_uInt16 nEvent ) const;
+ inline sal_Bool HasMacro( sal_uInt16 nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& );
+ inline sal_Bool DelMacro( sal_uInt16 nEvent );
private:
SvxMacroTableDtor aMacroTable;
@@ -182,7 +182,7 @@ private:
SvxMacroItem &operator=( const SvxMacroItem & );
};
-inline SvxMacroItem::SvxMacroItem( const USHORT nId )
+inline SvxMacroItem::SvxMacroItem( const sal_uInt16 nId )
: SfxPoolItem( nId )
{}
inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
@@ -190,15 +190,15 @@ inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
aMacroTable( rCpy.GetMacroTable() )
{}
-inline BOOL SvxMacroItem::HasMacro( USHORT nEvent ) const
+inline sal_Bool SvxMacroItem::HasMacro( sal_uInt16 nEvent ) const
{
return aMacroTable.IsKeyValid( nEvent );
}
-inline const SvxMacro& SvxMacroItem::GetMacro( USHORT nEvent ) const
+inline const SvxMacro& SvxMacroItem::GetMacro( sal_uInt16 nEvent ) const
{
return *(aMacroTable.Get(nEvent));
}
-inline BOOL SvxMacroItem::DelMacro( USHORT nEvent )
+inline sal_Bool SvxMacroItem::DelMacro( sal_uInt16 nEvent )
{
SvxMacro *pMacro = aMacroTable.Remove( nEvent );
delete pMacro;
diff --git a/svl/inc/svl/mailenum.hxx b/svl/inc/svl/mailenum.hxx
index 1302499f6777..87f66299bd33 100644
--- a/svl/inc/svl/mailenum.hxx
+++ b/svl/inc/svl/mailenum.hxx
@@ -86,10 +86,10 @@ enum MailAction
// Textformat zum Versenden von Nachrichten ------------------------------
-#define TXTFORMAT_ASCII ((BYTE)0x01)
-#define TXTFORMAT_HTML ((BYTE)0x02)
-#define TXTFORMAT_RTF ((BYTE)0x04)
-#define TXTFORMAT_OFFICE ((BYTE)0x08)
+#define TXTFORMAT_ASCII ((sal_uInt8)0x01)
+#define TXTFORMAT_HTML ((sal_uInt8)0x02)
+#define TXTFORMAT_RTF ((sal_uInt8)0x04)
+#define TXTFORMAT_OFFICE ((sal_uInt8)0x08)
#endif
diff --git a/svl/inc/svl/metitem.hxx b/svl/inc/svl/metitem.hxx
index e53008c12f35..92f46002d5ee 100644
--- a/svl/inc/svl/metitem.hxx
+++ b/svl/inc/svl/metitem.hxx
@@ -39,8 +39,8 @@ class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item
{
public:
TYPEINFO();
- SfxMetricItem( USHORT nWhich = 0, UINT32 nValue = 0 );
- SfxMetricItem( USHORT nWhich, SvStream & );
+ SfxMetricItem( sal_uInt16 nWhich = 0, sal_uInt32 nValue = 0 );
+ SfxMetricItem( sal_uInt16 nWhich, SvStream & );
SfxMetricItem( const SfxMetricItem& );
~SfxMetricItem() {
DBG_DTOR(SfxMetricItem, 0); }
diff --git a/svl/inc/svl/nfsymbol.hxx b/svl/inc/svl/nfsymbol.hxx
new file mode 100644
index 000000000000..57b2ddde339e
--- /dev/null
+++ b/svl/inc/svl/nfsymbol.hxx
@@ -0,0 +1,73 @@
+/* -*- 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 INCLUDED_SVTOOLS_NFSYMBOL_HXX
+#define INCLUDED_SVTOOLS_NFSYMBOL_HXX
+
+/* ATTENTION! If new types arrive that had its content previously handled as
+ * SYMBOLTYPE_STRING, they have to be added at several places in zforscan.cxx
+ * and/or zformat.cxx, and in xmloff/source/style/xmlnumfe.cxx. Mostly these
+ * are places where already NF_SYMBOLTYPE_STRING together with
+ * NF_SYMBOLTYPE_CURRENCY or NF_SYMBOLTYPE_DATESEP are used in the same case of
+ * a switch respectively an if-condition.
+ */
+
+namespace svt {
+
+/// Number formatter's symbol types of a token, if not key words, which are >0
+enum NfSymbolType
+{
+ NF_SYMBOLTYPE_STRING = -1, // literal string in output
+ NF_SYMBOLTYPE_DEL = -2, // special character
+ NF_SYMBOLTYPE_BLANK = -3, // blank for '_'
+ NF_SYMBOLTYPE_STAR = -4, // *-character
+ NF_SYMBOLTYPE_DIGIT = -5, // digit place holder
+ NF_SYMBOLTYPE_DECSEP = -6, // decimal separator
+ NF_SYMBOLTYPE_THSEP = -7, // group AKA thousand separator
+ NF_SYMBOLTYPE_EXP = -8, // exponent E
+ NF_SYMBOLTYPE_FRAC = -9, // fraction /
+ NF_SYMBOLTYPE_EMPTY = -10, // deleted symbols
+ NF_SYMBOLTYPE_FRACBLANK = -11, // delimiter between integer and fraction
+ NF_SYMBOLTYPE_COMMENT = -12, // comment is following
+ NF_SYMBOLTYPE_CURRENCY = -13, // currency symbol
+ NF_SYMBOLTYPE_CURRDEL = -14, // currency symbol delimiter [$]
+ NF_SYMBOLTYPE_CURREXT = -15, // currency symbol extension -xxx
+ NF_SYMBOLTYPE_CALENDAR = -16, // calendar ID
+ NF_SYMBOLTYPE_CALDEL = -17, // calendar delimiter [~]
+ NF_SYMBOLTYPE_DATESEP = -18, // date separator
+ NF_SYMBOLTYPE_TIMESEP = -19, // time separator
+ NF_SYMBOLTYPE_TIME100SECSEP = -20, // time 100th seconds separator
+ NF_SYMBOLTYPE_PERCENT = -21, // percent %
+ NF_SYMBOLTYPE_FRAC_FDIV = -22 // forced divisors
+};
+
+} // namespace svt
+
+#endif // INCLUDED_SVTOOLS_NFSYMBOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/nranges.hxx b/svl/inc/svl/nranges.hxx
index f9548bc78cbb..2654a2125f99 100644
--- a/svl/inc/svl/nranges.hxx
+++ b/svl/inc/svl/nranges.hxx
@@ -36,12 +36,12 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxNumRanges SfxUShortRanges
#include <svl/nranges.hxx>
#undef NUMTYPE
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SfxNumRanges SfxULongRanges
#include <svl/nranges.hxx>
@@ -67,8 +67,8 @@ public:
~SfxNumRanges()
{ delete [] _pRanges; }
- BOOL operator == ( const SfxNumRanges & ) const;
- BOOL operator != ( const SfxNumRanges & rRanges ) const
+ sal_Bool operator == ( const SfxNumRanges & ) const;
+ sal_Bool operator != ( const SfxNumRanges & rRanges ) const
{ return !( *this == rRanges ); }
SfxNumRanges& operator = ( const SfxNumRanges & );
@@ -78,10 +78,10 @@ public:
SfxNumRanges& operator /= ( const SfxNumRanges & );
NUMTYPE Count() const;
- BOOL IsEmpty() const
+ sal_Bool IsEmpty() const
{ return !_pRanges || 0 == *_pRanges; }
- BOOL Contains( NUMTYPE n ) const;
- BOOL Intersects( const SfxNumRanges & ) const;
+ sal_Bool Contains( NUMTYPE n ) const;
+ sal_Bool Intersects( const SfxNumRanges & ) const;
operator const NUMTYPE* () const
{ return _pRanges; }
diff --git a/svl/inc/svl/numuno.hxx b/svl/inc/svl/numuno.hxx
new file mode 100644
index 000000000000..85db8c5906b9
--- /dev/null
+++ b/svl/inc/svl/numuno.hxx
@@ -0,0 +1,101 @@
+/* -*- 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 _NUMUNO_HXX
+#define _NUMUNO_HXX
+
+#include "svl/svldllapi.h"
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase2.hxx>
+
+class SvNumberFormatter;
+class SvNumFmtSuppl_Impl;
+
+namespace comphelper
+{
+ class SharedMutex;
+}
+
+//------------------------------------------------------------------
+
+// SvNumberFormatterServiceObj must be registered as service somewhere
+
+com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
+ SvNumberFormatterServiceObj_NewInstance(
+ const com::sun::star::uno::Reference<
+ com::sun::star::lang::XMultiServiceFactory>& rSMgr );
+
+//------------------------------------------------------------------
+
+// SvNumberFormatsSupplierObj: aggregate to document,
+// construct with SvNumberFormatter
+
+class SVL_DLLPUBLIC SvNumberFormatsSupplierObj : public cppu::WeakAggImplHelper2<
+ com::sun::star::util::XNumberFormatsSupplier,
+ com::sun::star::lang::XUnoTunnel>
+{
+private:
+ SvNumFmtSuppl_Impl* pImpl;
+
+public:
+ SvNumberFormatsSupplierObj();
+ SvNumberFormatsSupplierObj(SvNumberFormatter* pForm);
+ virtual ~SvNumberFormatsSupplierObj();
+
+ void SetNumberFormatter(SvNumberFormatter* pNew);
+ SvNumberFormatter* GetNumberFormatter() const;
+
+ // ueberladen, um Attribute im Dokument anzupassen
+ virtual void NumberFormatDeleted(sal_uInt32 nKey);
+ // ueberladen, um evtl. neu zu formatieren
+ virtual void SettingsChanged();
+
+ // XNumberFormatsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL
+ getNumberFormatSettings()
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL
+ getNumberFormats()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
+ sal_Int8 >& aIdentifier )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
+ static SvNumberFormatsSupplierObj* getImplementation( const com::sun::star::uno::Reference<
+ com::sun::star::util::XNumberFormatsSupplier> xObj );
+
+ ::comphelper::SharedMutex& getSharedMutex() const;
+};
+
+#endif // #ifndef _NUMUNO_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/outstrm.hxx b/svl/inc/svl/outstrm.hxx
new file mode 100644
index 000000000000..dba7c2847c5e
--- /dev/null
+++ b/svl/inc/svl/outstrm.hxx
@@ -0,0 +1,68 @@
+/* -*- 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 SVTOOLS_OUTSTRM_HXX
+#define SVTOOLS_OUTSTRM_HXX
+
+#include "svl/svldllapi.h"
+#include <com/sun/star/uno/Reference.h>
+#include <tools/stream.hxx>
+
+namespace com { namespace sun { namespace star { namespace io {
+ class XOutputStream;
+} } } }
+
+//============================================================================
+class SVL_DLLPUBLIC SvOutputStream: public SvStream
+{
+ com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >
+ m_xStream;
+
+ SVL_DLLPRIVATE virtual sal_uLong GetData(void *, sal_uLong);
+
+ SVL_DLLPRIVATE virtual sal_uLong PutData(void const * pData, sal_uLong nSize);
+
+ SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong);
+
+ SVL_DLLPRIVATE virtual void FlushData();
+
+ SVL_DLLPRIVATE virtual void SetSize(sal_uLong);
+
+public:
+ SvOutputStream(com::sun::star::uno::Reference<
+ com::sun::star::io::XOutputStream > const &
+ rTheStream);
+
+ virtual ~SvOutputStream();
+
+ virtual sal_uInt16 IsA() const;
+};
+
+#endif // SVTOOLS_OUTSTRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/ownlist.hxx b/svl/inc/svl/ownlist.hxx
index 051cf18bf9e4..9dc31764c53c 100644
--- a/svl/inc/svl/ownlist.hxx
+++ b/svl/inc/svl/ownlist.hxx
@@ -87,10 +87,10 @@ class SVL_DLLPUBLIC SvCommandList
{
PRV_SV_DECL_OWNER_LIST(SvCommandList,SvCommand);
SvCommand & Append( const String & rCommand, const String & rArg );
- BOOL AppendCommands( const String & rCmd, USHORT * pEaten );
+ sal_Bool AppendCommands( const String & rCmd, sal_uInt16 * pEaten );
String GetCommands() const;
- BOOL FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
+ sal_Bool FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
void FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
SVL_DLLPUBLIC friend SvStream& operator >> ( SvStream& rStm, SvCommandList & );
diff --git a/svl/inc/svl/pickerhelper.hxx b/svl/inc/svl/pickerhelper.hxx
new file mode 100644
index 000000000000..bf877722f541
--- /dev/null
+++ b/svl/inc/svl/pickerhelper.hxx
@@ -0,0 +1,72 @@
+/* -*- 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 _PICKERHELPER_HXX
+#define _PICKERHELPER_HXX
+
+#include "svl/svldllapi.h"
+#include "sal/types.h"
+#include "com/sun/star/uno/Reference.hxx"
+
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace ui
+ {
+ namespace dialogs
+ {
+ class XFilePicker;
+ class XFolderPicker;
+ }
+ }
+ }
+ }
+}
+
+
+namespace svt
+{
+
+ SVL_DLLPUBLIC void SetDialogHelpId(
+ ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > _mxFileDlg,
+ sal_Int32 _nHelpId );
+
+ SVL_DLLPUBLIC void SetDialogHelpId(
+ ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFolderPicker > _mxFileDlg,
+ sal_Int32 _nHelpId );
+
+}
+
+//-----------------------------------------------------------------------------
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/pickerhistory.hxx b/svl/inc/svl/pickerhistory.hxx
new file mode 100644
index 000000000000..45f9ab15c33b
--- /dev/null
+++ b/svl/inc/svl/pickerhistory.hxx
@@ -0,0 +1,53 @@
+/* -*- 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 SVTOOLS_PICKERHISTORY_HXX
+#define SVTOOLS_PICKERHISTORY_HXX
+
+#include "svl/svldllapi.h"
+#include <com/sun/star/uno/XInterface.hpp>
+
+//.........................................................................
+namespace svt
+{
+//.........................................................................
+
+ // --------------------------------------------------------------------
+ SVL_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetTopMostFolderPicker( );
+
+ SVL_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetTopMostFilePicker( );
+
+//.........................................................................
+} // namespace svt
+//.........................................................................
+
+#endif // SVTOOLS_PICKERHISTORY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/pickerhistoryaccess.hxx b/svl/inc/svl/pickerhistoryaccess.hxx
new file mode 100644
index 000000000000..392933a431a4
--- /dev/null
+++ b/svl/inc/svl/pickerhistoryaccess.hxx
@@ -0,0 +1,54 @@
+/* -*- 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 SVTOOLS_PICKERHISTORYACCESS_HXX
+#define SVTOOLS_PICKERHISTORYACCESS_HXX
+
+#include "svl/svldllapi.h"
+
+#include <com/sun/star/uno/Reference.hxx>
+
+//.........................................................................
+namespace svt
+{
+//.........................................................................
+
+ // --------------------------------------------------------------------
+ SVL_DLLPUBLIC void addFolderPicker(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxPicker );
+
+ SVL_DLLPUBLIC void addFilePicker(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxPicker );
+
+//.........................................................................
+} // namespace svt
+//.........................................................................
+
+#endif // SVTOOLS_PICKERHISTORYACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/poolcach.hxx b/svl/inc/svl/poolcach.hxx
new file mode 100644
index 000000000000..c8b1b87ee3ef
--- /dev/null
+++ b/svl/inc/svl/poolcach.hxx
@@ -0,0 +1,71 @@
+/* -*- 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 _SFXPOOLCACH_HXX
+#define _SFXPOOLCACH_HXX
+
+#include "svl/svldllapi.h"
+#include <tools/solar.h>
+#include <vector>
+
+//------------------------------------------------------------------------
+
+class SfxItemPool;
+class SfxItemSet;
+class SfxPoolItem;
+class SfxSetItem;
+
+struct SfxItemModifyImpl
+{
+ const SfxSetItem *pOrigItem;
+ SfxSetItem *pPoolItem;
+};
+
+typedef std::vector<SfxItemModifyImpl> SfxItemModifyArr_Impl;
+
+
+class SVL_DLLPUBLIC SfxItemPoolCache
+{
+ SfxItemPool *pPool;
+ SfxItemModifyArr_Impl *pCache;
+ const SfxItemSet *pSetToPut;
+ const SfxPoolItem *pItemToPut;
+
+public:
+ SfxItemPoolCache( SfxItemPool *pPool,
+ const SfxPoolItem *pPutItem );
+ SfxItemPoolCache( SfxItemPool *pPool,
+ const SfxItemSet *pPutSet );
+ ~SfxItemPoolCache();
+
+ const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, sal_Bool bNew = sal_False );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index eb922a99fe25..0101720da14d 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -51,8 +51,9 @@ class IntlWrapper;
namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
-#define SFX_ITEMS_DIRECT 0xffff
-#define SFX_ITEMS_NULL 0xfff0 // anstelle StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DIRECT= 0xffffffff;
+static const sal_uInt32 SFX_ITEMS_NULL= 0xfffffff0; // instead StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DEFAULT= 0xfffffffe;
#define SFX_ITEMS_POOLDEFAULT 0xffff
#define SFX_ITEMS_STATICDEFAULT 0xfffe
@@ -143,7 +144,7 @@ enum SfxItemPresentation
// -----------------------------------------------------------------------
-typedef USHORT SfxItemState;
+typedef sal_uInt16 SfxItemState;
#define SFX_ITEM_UNKNOWN 0x0000
@@ -183,31 +184,31 @@ friend class SfxItemPoolCache;
friend class SfxItemSet;
friend class SfxVoidItem;
- ULONG nRefCount; // Referenzzaehler
- USHORT nWhich;
- USHORT nKind;
+ sal_uLong nRefCount; // Referenzzaehler
+ sal_uInt16 nWhich;
+ sal_uInt16 nKind;
private:
- inline void SetRefCount( ULONG n );
- inline void SetKind( USHORT n );
+ inline void SetRefCount( sal_uLong n );
+ inline void SetKind( sal_uInt16 n );
public:
- inline ULONG AddRef( ULONG n = 1 ) const;
+ inline sal_uLong AddRef( sal_uLong n = 1 ) const;
private:
- inline ULONG ReleaseRef( ULONG n = 1 ) const;
+ inline sal_uLong ReleaseRef( sal_uLong n = 1 ) const;
SVL_DLLPRIVATE long Delete_Impl(void*);
protected:
- SfxPoolItem( USHORT nWhich = 0 );
+ SfxPoolItem( sal_uInt16 nWhich = 0 );
SfxPoolItem( const SfxPoolItem& );
public:
TYPEINFO();
virtual ~SfxPoolItem();
- void SetWhich( USHORT nId ) {
+ void SetWhich( sal_uInt16 nId ) {
DBG_CHKTHIS(SfxPoolItem, 0);
nWhich = nId; }
- USHORT Which() const {
+ sal_uInt16 Which() const {
DBG_CHKTHIS(SfxPoolItem, 0);
return nWhich; }
virtual int operator==( const SfxPoolItem& ) const = 0;
@@ -222,19 +223,19 @@ public:
XubString &rText,
const IntlWrapper * pIntlWrapper = 0 ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
virtual bool ScaleMetrics( long lMult, long lDiv );
virtual bool HasMetrics() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem* Create( SvStream &, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const = 0;
- ULONG GetRefCount() const { return nRefCount; }
- inline USHORT GetKind() const { return nKind; }
+ sal_uLong GetRefCount() const { return nRefCount; }
+ inline sal_uInt16 GetKind() const { return nKind; }
/** Read in a Unicode string from a streamed byte string representation.
@@ -289,21 +290,21 @@ private:
// -----------------------------------------------------------------------
-inline void SfxPoolItem::SetRefCount( ULONG n )
+inline void SfxPoolItem::SetRefCount( sal_uLong n )
{
DBG_CHKTHIS( SfxPoolItem, 0 );
nRefCount = n;
nKind = 0;
}
-inline void SfxPoolItem::SetKind( USHORT n )
+inline void SfxPoolItem::SetKind( sal_uInt16 n )
{
DBG_CHKTHIS( SfxPoolItem, 0 );
nRefCount = SFX_ITEMS_SPECIAL;
nKind = n;
}
-inline ULONG SfxPoolItem::AddRef( ULONG n ) const
+inline sal_uLong SfxPoolItem::AddRef( sal_uLong n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -311,7 +312,7 @@ inline ULONG SfxPoolItem::AddRef( ULONG n ) const
return ( ((SfxPoolItem *)this)->nRefCount += n );
}
-inline ULONG SfxPoolItem::ReleaseRef( ULONG n ) const
+inline sal_uLong SfxPoolItem::ReleaseRef( sal_uLong n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -354,8 +355,8 @@ class SVL_DLLPUBLIC SfxVoidItem: public SfxPoolItem
SfxVoidItem & operator=( const SfxVoidItem& ); // not implemented.
public:
TYPEINFO();
- SfxVoidItem( USHORT nWhich );
- SfxVoidItem( USHORT nWhich, SvStream & );
+ SfxVoidItem( sal_uInt16 nWhich );
+ SfxVoidItem( sal_uInt16 nWhich, SvStream & );
SfxVoidItem( const SfxVoidItem& );
~SfxVoidItem();
@@ -369,7 +370,7 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- void SetWhich(USHORT nWh) { nWhich = nWh; }
+ void SetWhich(sal_uInt16 nWh) { nWhich = nWh; }
};
// -----------------------------------------------------------------------
@@ -382,8 +383,8 @@ class SVL_DLLPUBLIC SfxSetItem: public SfxPoolItem
public:
TYPEINFO();
- SfxSetItem( USHORT nWhich, SfxItemSet *pSet );
- SfxSetItem( USHORT nWhich, const SfxItemSet &rSet );
+ SfxSetItem( sal_uInt16 nWhich, SfxItemSet *pSet );
+ SfxSetItem( sal_uInt16 nWhich, const SfxItemSet &rSet );
SfxSetItem( const SfxSetItem&, SfxItemPool *pPool = 0 );
~SfxSetItem();
@@ -397,8 +398,8 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const = 0;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const = 0;
- virtual SvStream& Store(SvStream &, USHORT nVer) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const = 0;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nVer) const;
const SfxItemSet& GetItemSet() const
{ return *pSet; }
@@ -411,7 +412,7 @@ public:
class SVL_DLLPUBLIC SfxItemHandle
{
- USHORT *pRef;
+ sal_uInt16 *pRef;
SfxPoolItem *pItem;
public:
SfxItemHandle( SfxPoolItem& );
diff --git a/svl/inc/svl/ptitem.hxx b/svl/inc/svl/ptitem.hxx
index ce613d582909..46963d8b7ade 100644
--- a/svl/inc/svl/ptitem.hxx
+++ b/svl/inc/svl/ptitem.hxx
@@ -45,8 +45,8 @@ class SVL_DLLPUBLIC SfxPointItem: public SfxPoolItem
public:
TYPEINFO();
SfxPointItem();
- SfxPointItem( USHORT nWhich, const Point& rVal );
- SfxPointItem( USHORT nWhich, SvStream & );
+ SfxPointItem( sal_uInt16 nWhich, const Point& rVal );
+ SfxPointItem( sal_uInt16 nWhich, SvStream & );
SfxPointItem( const SfxPointItem& );
~SfxPointItem() {
DBG_DTOR(SfxPointItem, 0); }
@@ -60,8 +60,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Point& GetValue() const { return aVal; }
void SetValue( const Point& rNewVal ) {
@@ -70,9 +70,9 @@ public:
}
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/svl/inc/svl/rectitem.hxx b/svl/inc/svl/rectitem.hxx
index 6e4f1132ebf6..31f5717ee1f1 100644
--- a/svl/inc/svl/rectitem.hxx
+++ b/svl/inc/svl/rectitem.hxx
@@ -46,8 +46,8 @@ class SVL_DLLPUBLIC SfxRectangleItem: public SfxPoolItem
public:
TYPEINFO();
SfxRectangleItem();
- SfxRectangleItem( USHORT nWhich, const Rectangle& rVal );
- SfxRectangleItem( USHORT nWhich, SvStream & );
+ SfxRectangleItem( sal_uInt16 nWhich, const Rectangle& rVal );
+ SfxRectangleItem( sal_uInt16 nWhich, SvStream & );
SfxRectangleItem( const SfxRectangleItem& );
~SfxRectangleItem() {
DBG_DTOR(SfxRectangleItem, 0); }
@@ -60,8 +60,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Rectangle& GetValue() const { return aVal; }
void SetValue( const Rectangle& rNewVal ) {
@@ -69,9 +69,9 @@ public:
aVal = rNewVal;
}
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 0962f3bc8370..0a90af8c16d5 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -30,7 +30,7 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxXRangeItem SfxRangeItem
#define SfxXRangesItem SfxUShortRangesItem
#include <svl/rngitem.hxx>
@@ -39,7 +39,7 @@
#undef SfxXRangesItem
#ifndef _SFXITEMS_HXX
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SfxXRangeItem SfxULongRangeItem
#define SfxXRangesItem SfxULongRangesItem
#include <svl/rngitem.hxx>
@@ -66,8 +66,8 @@ private:
public:
TYPEINFO();
SfxXRangeItem();
- SfxXRangeItem( USHORT nWID, NUMTYPE nFrom, NUMTYPE nTo );
- SfxXRangeItem( USHORT nWID, SvStream &rStream );
+ SfxXRangeItem( sal_uInt16 nWID, NUMTYPE nFrom, NUMTYPE nTo );
+ SfxXRangeItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangeItem( const SfxXRangeItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -80,9 +80,9 @@ public:
inline NUMTYPE From() const { return nFrom; }
inline NUMTYPE& To() { return nTo; }
inline NUMTYPE To() const { return nTo; }
- inline BOOL HasRange() const { return nTo>nFrom; }
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ inline sal_Bool HasRange() const { return nTo>nFrom; }
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
// -----------------------------------------------------------------------
@@ -95,8 +95,8 @@ private:
public:
TYPEINFO();
SfxXRangesItem();
- SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges );
- SfxXRangesItem( USHORT nWID, SvStream &rStream );
+ SfxXRangesItem( sal_uInt16 nWID, const NUMTYPE *pRanges );
+ SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangesItem( const SfxXRangesItem& rItem );
virtual ~SfxXRangesItem();
virtual int operator==( const SfxPoolItem& ) const;
@@ -107,8 +107,8 @@ public:
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
inline const NUMTYPE* GetRanges() const { return _pRanges; }
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
#endif
diff --git a/svl/inc/svl/sfontitm.hxx b/svl/inc/svl/sfontitm.hxx
index 01be43ffb76f..ac1e30061c05 100644
--- a/svl/inc/svl/sfontitm.hxx
+++ b/svl/inc/svl/sfontitm.hxx
@@ -63,12 +63,12 @@ class SfxFontItem: public SfxPoolItem
public:
TYPEINFO();
- inline SfxFontItem(USHORT nWhich);
+ inline SfxFontItem(sal_uInt16 nWhich);
virtual int operator ==(const SfxPoolItem & rItem) const;
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
{ return new SfxFontItem(*this); }
@@ -116,7 +116,7 @@ public:
inline void setLanguage(LanguageType nTheLanguage);
};
-inline SfxFontItem::SfxFontItem(USHORT which):
+inline SfxFontItem::SfxFontItem(sal_uInt16 which):
SfxPoolItem(which),
m_nCharSet(RTL_TEXTENCODING_DONTKNOW),
m_nLanguage(LANGUAGE_DONTKNOW),
diff --git a/svl/inc/svl/slstitm.hxx b/svl/inc/svl/slstitm.hxx
index f946d29faf88..e72a5ffde911 100644
--- a/svl/inc/svl/slstitm.hxx
+++ b/svl/inc/svl/slstitm.hxx
@@ -45,8 +45,8 @@ public:
TYPEINFO();
SfxStringListItem();
- SfxStringListItem( USHORT nWhich, const List* pList=NULL );
- SfxStringListItem( USHORT nWhich, SvStream& rStream );
+ SfxStringListItem( sal_uInt16 nWhich, const List* pList=NULL );
+ SfxStringListItem( sal_uInt16 nWhich, SvStream& rStream );
SfxStringListItem( const SfxStringListItem& rItem );
~SfxStringListItem();
@@ -73,14 +73,14 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
- void Sort( BOOL bAscending = TRUE, List* pParallelList = 0 );
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
+ void Sort( sal_Bool bAscending = sal_True, List* pParallelList = 0 );
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/smplhint.hxx b/svl/inc/svl/smplhint.hxx
index 0d3cc374a02e..1ce98191a059 100644
--- a/svl/inc/svl/smplhint.hxx
+++ b/svl/inc/svl/smplhint.hxx
@@ -69,11 +69,11 @@
class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
{
private:
- ULONG nId;
+ sal_uLong nId;
public:
TYPEINFO();
- SfxSimpleHint( ULONG nId );
- ULONG GetId() const { return nId; }
+ SfxSimpleHint( sal_uLong nId );
+ sal_uLong GetId() const { return nId; }
};
//--------------------------------------------------------------------
@@ -85,14 +85,14 @@ public:
\
public: \
TYPEINFO(); \
- Name( USHORT nId, const Type& rObject ); \
+ Name( sal_uInt16 nId, const Type& rObject ); \
~Name(); \
const Type& GetObject() const { return aObj; } \
}
#define IMPL_OBJHINT(Name, Type) \
TYPEINIT1(Name, SfxSimpleHint); \
- Name::Name( USHORT nID, const Type& rObject ): \
+ Name::Name( sal_uInt16 nID, const Type& rObject ): \
SfxSimpleHint( nID ), aObj(rObject) \
{ } \
Name::~Name() {}
diff --git a/svl/inc/svl/srchitem.hxx b/svl/inc/svl/srchitem.hxx
index 01e7250c9f6d..7a0be711147b 100644
--- a/svl/inc/svl/srchitem.hxx
+++ b/svl/inc/svl/srchitem.hxx
@@ -91,8 +91,8 @@ public:
SvxSearchItem( const SvxSearchItem& rItem );
virtual ~SvxSearchItem();
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual int operator == ( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -239,7 +239,7 @@ sal_Bool SvxSearchItem::IsLEVRelaxed() const
sal_uInt16 SvxSearchItem::GetLEVOther() const
{
- return (INT16) aSearchOpt.changedChars;
+ return (sal_Int16) aSearchOpt.changedChars;
}
void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
@@ -249,7 +249,7 @@ void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
sal_uInt16 SvxSearchItem::GetLEVShorter() const
{
- return (INT16) aSearchOpt.insertedChars;
+ return (sal_Int16) aSearchOpt.insertedChars;
}
void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
@@ -259,7 +259,7 @@ void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
sal_uInt16 SvxSearchItem::GetLEVLonger() const
{
- return (INT16) aSearchOpt.deletedChars;
+ return (sal_Int16) aSearchOpt.deletedChars;
}
void SvxSearchItem::SetLEVLonger( sal_uInt16 nVal )
diff --git a/svl/inc/svl/stritem.hxx b/svl/inc/svl/stritem.hxx
index fd20b9719a9e..ddcb4dfa8b63 100644
--- a/svl/inc/svl/stritem.hxx
+++ b/svl/inc/svl/stritem.hxx
@@ -40,14 +40,14 @@ public:
SfxStringItem() {}
- SfxStringItem(USHORT which, const XubString & rValue):
+ SfxStringItem(sal_uInt16 which, const XubString & rValue):
CntUnencodedStringItem(which, rValue) {}
- SfxStringItem(USHORT nWhich, SvStream & rStream);
+ SfxStringItem(sal_uInt16 nWhich, SvStream & rStream);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
};
diff --git a/svl/inc/svl/strmadpt.hxx b/svl/inc/svl/strmadpt.hxx
new file mode 100644
index 000000000000..eceb68a3b1aa
--- /dev/null
+++ b/svl/inc/svl/strmadpt.hxx
@@ -0,0 +1,137 @@
+/* -*- 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 SVTOOLS_STRMADPT_HXX
+#define SVTOOLS_STRMADPT_HXX
+
+#include "svl/svldllapi.h"
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <cppuhelper/weak.hxx>
+#include <tools/stream.hxx>
+
+//============================================================================
+class SVL_DLLPUBLIC SvOutputStreamOpenLockBytes: public SvOpenLockBytes
+{
+ com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >
+ m_xOutputStream;
+ sal_uInt32 m_nPosition;
+
+public:
+ TYPEINFO();
+
+ SvOutputStreamOpenLockBytes(
+ const com::sun::star::uno::Reference<
+ com::sun::star::io::XOutputStream > &
+ rTheOutputStream):
+ m_xOutputStream(rTheOutputStream), m_nPosition(0) {}
+
+ virtual ErrCode ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *) const;
+
+ virtual ErrCode WriteAt(sal_uLong nPos, const void * pBuffer, sal_uLong nCount,
+ sal_uLong * pWritten);
+
+ virtual ErrCode Flush() const;
+
+ virtual ErrCode SetSize(sal_uLong);
+
+ virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const;
+
+ virtual ErrCode FillAppend(const void * pBuffer, sal_uLong nCount,
+ sal_uLong * pWritten);
+
+ virtual sal_uLong Tell() const;
+
+ virtual sal_uLong Seek(sal_uLong);
+
+ virtual void Terminate();
+};
+
+//============================================================================
+class SVL_DLLPUBLIC SvLockBytesInputStream: public cppu::OWeakObject,
+ public com::sun::star::io::XInputStream,
+ public com::sun::star::io::XSeekable
+{
+ SvLockBytesRef m_xLockBytes;
+ sal_Int64 m_nPosition;
+ bool m_bDone;
+
+public:
+ SvLockBytesInputStream(SvLockBytes * pTheLockBytes):
+ m_xLockBytes(pTheLockBytes), m_nPosition(0), m_bDone(false) {}
+
+ virtual com::sun::star::uno::Any SAL_CALL
+ queryInterface(const com::sun::star::uno::Type & rType)
+ throw (com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw();
+
+ virtual void SAL_CALL release() throw();
+
+ virtual sal_Int32 SAL_CALL
+ readBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData,
+ sal_Int32 nBytesToRead)
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL
+ readSomeBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData,
+ sal_Int32 nMaxBytesToRead)
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip)
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL available()
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL closeInput()
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL seek(sal_Int64 nLocation)
+ throw (com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int64 SAL_CALL getPosition()
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int64 SAL_CALL getLength()
+ throw (com::sun::star::io::IOException,
+ com::sun::star::uno::RuntimeException);
+};
+
+#endif // SVTOOLS_STRMADPT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx
index 7950915fb38d..615d5d690aba 100644
--- a/svl/inc/svl/style.hxx
+++ b/svl/inc/svl/style.hxx
@@ -75,7 +75,7 @@ SfxSimpleHint(SFX_HINT_DYING) from:
SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName,
- SfxStyleFamily eFam, USHORT mask, USHORT nPos)
+ SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
@@ -99,17 +99,17 @@ protected:
rtl::OUString maDisplayName;
String aHelpFile; // Name der Hilfedatei
SfxItemSet* pSet; // ItemSet
- USHORT nMask; // Flags
+ sal_uInt16 nMask; // Flags
- ULONG nHelpId; // Hilfe-ID
+ sal_uLong nHelpId; // Hilfe-ID
- BOOL bMySet; // TRUE: Set loeschen im dtor
+ sal_Bool bMySet; // sal_True: Set loeschen im dtor
SfxStyleSheetBase(); // do not use!
- SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, USHORT mask );
+ SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, sal_uInt16 mask );
SfxStyleSheetBase( const SfxStyleSheetBase& );
virtual ~SfxStyleSheetBase();
- virtual void Load( SvStream&, USHORT );
+ virtual void Load( SvStream&, sal_uInt16 );
virtual void Store( SvStream& );
public:
@@ -119,7 +119,7 @@ public:
virtual const UniString& GetName() const;
// sets the internal name of this style
- virtual BOOL SetName( const UniString& );
+ virtual sal_Bool SetName( const UniString& );
/** returns the display name of this style, it is used at the user interface.
If the display name is empty, this method returns the internal name. */
@@ -129,13 +129,13 @@ public:
virtual void SetDisplayName( const rtl::OUString& );
virtual const UniString& GetParent() const;
- virtual BOOL SetParent( const UniString& );
+ virtual sal_Bool SetParent( const UniString& );
virtual const UniString& GetFollow() const;
- virtual BOOL SetFollow( const UniString& );
- virtual BOOL HasFollowSupport() const; // Default TRUE
- virtual BOOL HasParentSupport() const; // Default TRUE
- virtual BOOL HasClearParentSupport() const; // Default FALSE
- virtual BOOL IsUsed() const; // Default TRUE
+ virtual sal_Bool SetFollow( const UniString& );
+ virtual sal_Bool HasFollowSupport() const; // Default sal_True
+ virtual sal_Bool HasParentSupport() const; // Default sal_True
+ virtual sal_Bool HasClearParentSupport() const; // Default sal_False
+ virtual sal_Bool IsUsed() const; // Default sal_True
// Default aus dem Itemset; entweder dem uebergebenen
// oder aus dem per GetItemSet() zurueckgelieferten Set
virtual UniString GetDescription();
@@ -143,16 +143,16 @@ public:
SfxStyleSheetBasePool& GetPool() { return rPool; }
SfxStyleFamily GetFamily() const { return nFamily; }
- USHORT GetMask() const { return nMask; }
- void SetMask( USHORT mask) { nMask = mask; }
- BOOL IsUserDefined() const
- { return BOOL( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
+ sal_uInt16 GetMask() const { return nMask; }
+ void SetMask( sal_uInt16 mask) { nMask = mask; }
+ sal_Bool IsUserDefined() const
+ { return sal_Bool( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
- virtual ULONG GetHelpId( String& rFile );
- virtual void SetHelpId( const String& r, ULONG nId );
+ virtual sal_uLong GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_uLong nId );
virtual SfxItemSet& GetItemSet();
- virtual USHORT GetVersion() const;
+ virtual sal_uInt16 GetVersion() const;
};
//=========================================================================
@@ -172,11 +172,11 @@ class SVL_DLLPUBLIC SfxStyleSheetIterator
{
public:
SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
- SfxStyleFamily eFam, USHORT n=0xFFFF );
- virtual USHORT GetSearchMask() const;
+ SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ virtual sal_uInt16 GetSearchMask() const;
virtual SfxStyleFamily GetSearchFamily() const;
- virtual USHORT Count();
- virtual SfxStyleSheetBase *operator[](USHORT nIdx);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase *operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
virtual SfxStyleSheetBase* Find(const UniString& rStr);
@@ -186,18 +186,18 @@ protected:
SfxStyleSheetBasePool* pBasePool;
SfxStyleFamily nSearchFamily;
- USHORT nMask;
- BOOL SearchUsed() const { return bSearchUsed; }
+ sal_uInt16 nMask;
+ sal_Bool SearchUsed() const { return bSearchUsed; }
private:
- USHORT GetPos(){return nAktPosition;}
- SVL_DLLPRIVATE BOOL IsTrivialSearch();
- SVL_DLLPRIVATE BOOL DoesStyleMatch(SfxStyleSheetBase *pStyle);
+ sal_uInt16 GetPos(){return nAktPosition;}
+ SVL_DLLPRIVATE sal_Bool IsTrivialSearch();
+ SVL_DLLPRIVATE sal_Bool DoesStyleMatch(SfxStyleSheetBase *pStyle);
void* pImp;
SfxStyleSheetBase* pAktStyle;
- USHORT nAktPosition;
- BOOL bSearchUsed;
+ sal_uInt16 nAktPosition;
+ sal_Bool bSearchUsed;
friend class SfxStyleSheetBasePool;
};
@@ -214,18 +214,18 @@ friend class SfxStyleSheetBase;
SfxStyleSheetBasePool_Impl *pImp;
private:
- SVL_DLLPRIVATE BOOL Load1_Impl( SvStream& );
+ SVL_DLLPRIVATE sal_Bool Load1_Impl( SvStream& );
SVL_DLLPRIVATE SfxStyleSheetIterator& GetIterator_Impl();
protected:
String aAppName;
SfxItemPool& rPool;
SfxStyles aStyles;
SfxStyleFamily nSearchFamily;
- USHORT nMask;
+ sal_uInt16 nMask;
SfxStyleSheetBase& Add( SfxStyleSheetBase& );
- void ChangeParent( const UniString&, const UniString&, BOOL bVirtual = TRUE );
- virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, USHORT );
+ void ChangeParent( const UniString&, const UniString&, sal_Bool bVirtual = sal_True );
+ virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, sal_uInt16 );
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
~SfxStyleSheetBasePool();
@@ -241,14 +241,14 @@ public:
SfxItemPool& GetPool();
const SfxItemPool& GetPool() const;
- virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, USHORT nMask);
- virtual USHORT Count();
- virtual SfxStyleSheetBase* operator[](USHORT nIdx);
+ virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, sal_uInt16 nMask);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase* operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase& Make(const UniString&,
SfxStyleFamily eFam,
- USHORT nMask = 0xffff ,
- USHORT nPos = 0xffff);
+ sal_uInt16 nMask = 0xffff ,
+ sal_uInt16 nPos = 0xffff);
virtual void Replace(
SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget );
@@ -264,21 +264,21 @@ public:
const SfxStyles& GetStyles();
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
- virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, USHORT n=0xFFFF );
+ virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
- virtual BOOL SetParent(SfxStyleFamily eFam,
+ virtual sal_Bool SetParent(SfxStyleFamily eFam,
const UniString &rStyle,
const UniString &rParent);
SfxStyleSheetBase* Find(const UniString& rStr)
{ return Find(rStr, nSearchFamily, nMask); }
- void SetSearchMask(SfxStyleFamily eFam, USHORT n=0xFFFF );
- USHORT GetSearchMask() const;
+ void SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ sal_uInt16 GetSearchMask() const;
SfxStyleFamily GetSearchFamily() const { return nSearchFamily; }
- BOOL Load( SvStream& );
- BOOL Store( SvStream&, BOOL bUsed = TRUE );
+ sal_Bool Load( SvStream& );
+ sal_Bool Store( SvStream&, sal_Bool bUsed = sal_True );
};
//=========================================================================
@@ -289,11 +289,11 @@ class SVL_DLLPUBLIC SfxStyleSheet: public SfxStyleSheetBase,
public:
TYPEINFO();
- SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, USHORT );
+ SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, sal_uInt16 );
SfxStyleSheet( const SfxStyleSheet& );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual BOOL SetParent( const UniString& );
+ virtual sal_Bool SetParent( const UniString& );
protected:
SfxStyleSheet(); // do not use!
@@ -306,13 +306,13 @@ class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool
{
protected:
using SfxStyleSheetBasePool::Create;
- virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, USHORT mask);
+ virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, sal_uInt16 mask);
virtual SfxStyleSheetBase* Create(const SfxStyleSheet &);
public:
SfxStyleSheetPool( SfxItemPool const& );
-// virtual BOOL CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName);
+// virtual sal_Bool CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName);
};
//=========================================================================
@@ -332,13 +332,13 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint
{
- USHORT nHint;
+ sal_uInt16 nHint;
public:
TYPEINFO();
- SfxStyleSheetPoolHint(USHORT nArgHint) : nHint(nArgHint){}
- USHORT GetHint() const
+ SfxStyleSheetPoolHint(sal_uInt16 nArgHint) : nHint(nArgHint){}
+ sal_uInt16 GetHint() const
{ return nHint; }
};
@@ -347,16 +347,16 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{
SfxStyleSheetBase* pStyleSh;
- USHORT nHint;
+ sal_uInt16 nHint;
public:
TYPEINFO();
- SfxStyleSheetHint( USHORT );
- SfxStyleSheetHint( USHORT, SfxStyleSheetBase& );
+ SfxStyleSheetHint( sal_uInt16 );
+ SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; }
- USHORT GetHint() const
+ sal_uInt16 GetHint() const
{ return nHint; }
};
@@ -368,9 +368,9 @@ public:
TYPEINFO();
SfxStyleSheetHintExtended(
- USHORT, const String& rOld );
+ sal_uInt16, const String& rOld );
SfxStyleSheetHintExtended(
- USHORT, const String& rOld,
+ sal_uInt16, const String& rOld,
SfxStyleSheetBase& );
const String& GetOldName() { return aName; }
};
@@ -378,7 +378,7 @@ public:
class SVL_DLLPUBLIC SfxUnoStyleSheet : public ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel >
{
public:
- SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, USHORT _nMaske );
+ SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske );
SfxUnoStyleSheet( const SfxStyleSheet& _rSheet );
static SfxUnoStyleSheet* getUnoStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle >& xStyle );
diff --git a/svl/inc/svl/stylepool.hxx b/svl/inc/svl/stylepool.hxx
new file mode 100644
index 000000000000..c6db7d42c707
--- /dev/null
+++ b/svl/inc/svl/stylepool.hxx
@@ -0,0 +1,101 @@
+/* -*- 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 INCLUDED_SVTOOLS_STYLEPOOL_HXX
+#define INCLUDED_SVTOOLS_STYLEPOOL_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <rtl/ustring.hxx>
+#include <svl/itemset.hxx>
+
+class StylePoolImpl;
+class StylePoolIterImpl;
+class IStylePoolIteratorAccess;
+
+class SVL_DLLPUBLIC StylePool
+{
+private:
+ StylePoolImpl *pImpl;
+public:
+ typedef boost::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t;
+
+ explicit StylePool( SfxItemSet* pIgnorableItems = 0 );
+
+ /** Insert a SfxItemSet into the style pool.
+
+ The pool makes a copy of the provided SfxItemSet.
+
+ @param SfxItemSet
+ the SfxItemSet to insert
+
+ @return a shared pointer to the SfxItemSet
+ */
+ virtual SfxItemSet_Pointer_t insertItemSet( const SfxItemSet& rSet );
+
+ /** Create an iterator
+
+ The iterator walks through the StylePool
+ OD 2008-03-07 #i86923#
+ introduce optional parameter to control, if unused SfxItemsSet are skipped or not
+ introduce optional parameter to control, if ignorable items are skipped or not
+
+ @attention every change, e.g. destruction, of the StylePool could cause undefined effects.
+
+ @param bSkipUnusedItemSets
+ input parameter - boolean, indicating if unused SfxItemSets are skipped or not
+
+ @param bSkipIgnorableItems
+ input parameter - boolean, indicating if ignorable items are skipped or not
+
+ @postcond the iterator "points before the first" SfxItemSet of the pool.
+ The first StylePoolIterator::getNext() call will deliver the first SfxItemSet.
+ */
+ virtual IStylePoolIteratorAccess* createIterator( const bool bSkipUnusedItemSets = false,
+ const bool bSkipIgnorableItems = false );
+
+ /** Returns the number of styles
+ */
+ virtual sal_Int32 getCount() const;
+
+ virtual ~StylePool();
+
+ static ::rtl::OUString nameOf( SfxItemSet_Pointer_t pSet );
+};
+
+class SVL_DLLPUBLIC IStylePoolIteratorAccess
+{
+public:
+ /** Delivers a shared pointer to the next SfxItemSet of the pool
+ If there is no more SfxItemSet, the delivered share_pointer is empty.
+ */
+ virtual StylePool::SfxItemSet_Pointer_t getNext() = 0;
+ virtual ::rtl::OUString getName() = 0;
+ virtual ~IStylePoolIteratorAccess() {};
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 76f6020cd824..e216cd08c746 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -39,12 +39,6 @@
* enthaelt. (Sie werden im Speicher verschoben, koennen also
* z.B. keine String sein)
*
-* SV_DECL_OBJARR(nm, AE, IS, GS)
-* SV_IMPL_OBJARR( nm, AE )
-* definiere/implementiere ein Array das Objecte enthaelt.
-* (Hier koennen es auch Strings sein)
-*
-*
* SV_DECL_PTRARR(nm, AE, IS, GS)
* SV_IMPL_PTRARR(nm, AE)
* definiere/implementiere ein Array das Pointer haelt. Diese
@@ -86,10 +80,6 @@
* Basiert auf einem VARARR.
* Sortierung mit Hilfe der Object-operatoren "<" und "=="
*
-* JP 23.12.94 neu:
-* SV_DECL_PTRARR_STACK(nm, AE, IS, GS)
-* ein Stack mit einem PtrArray als Grundlage.
-*
* JP 09.10.96: vordefinierte Arrays:
* VarArr: SvULongs, SvUShorts, SvLongs
* PtrArr: SvStrings, SvStringsDtor
@@ -127,15 +117,15 @@ inline void operator delete( void*, DummyType* ) {}
#if defined(PRODUCT)
#define _SVVARARR_DEF_GET_OP_INLINE( nm, ArrElem ) \
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
+ArrElem& operator[](sal_uInt16 nP) const { return *(pData+nP); }\
\
-void Insert( const nm * pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
+void Insert( const nm * pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX )\
{\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
+ Insert( (const ArrElem*)pI->pData+nS, (sal_uInt16)nE-nS, nP );\
}
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )
@@ -143,71 +133,69 @@ void Insert( const nm * pI, USHORT nP,\
#else
#define _SVVARARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
+ArrElem& operator[](sal_uInt16 nP) const;\
+void Insert( const nm *pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX );
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
+ArrElem& nm::operator[](sal_uInt16 nP) const\
{\
DBG_ASSERT( pData && nP < nA,"Op[]");\
return *(pData+nP);\
}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE)\
+void nm::Insert( const nm *pI, sal_uInt16 nP, sal_uInt16 nStt, sal_uInt16 nE)\
{\
DBG_ASSERT(nP<=nA,"Ins,Ar[Start.End]");\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
+ Insert( (const ArrElem*)pI->pData+nStt, (sal_uInt16)nE-nStt, nP );\
}
#endif
#define _SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm\
{\
protected:\
AE *pData;\
- USHORT nFree;\
- USHORT nA;\
+ sal_uInt16 nFree;\
+ sal_uInt16 nA;\
\
void _resize(size_t n);\
\
public:\
- nm( USHORT= IS, BYTE= GS );\
+ nm( sal_uInt16= IS, sal_uInt8= GS );\
~nm() { rtl_freeMemory( pData ); }\
\
_SVVARARR_DEF_GET_OP_INLINE(nm, AE )\
- AERef GetObject(USHORT nP) const { return (*this)[nP]; } \
-\
- void Insert( const AERef aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Replace( const AERef aE, USHORT nP );\
- void Replace( const AE *pE, USHORT nL, USHORT nP );\
- USHORT Count() const { return nA; }\
+ AERef GetObject(sal_uInt16 nP) const { return (*this)[nP]; } \
+\
+ void Insert( const AERef aE, sal_uInt16 nP );\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Replace( const AERef aE, sal_uInt16 nP );\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ sal_uInt16 Count() const { return nA; }\
const AE* GetData() const { return (const AE*)pData; }\
\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, fnForEach, pArgs );\
}\
\
- void _ForEach( USHORT nStt, USHORT nE, \
+ void _ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
\
#define _SV_DECL_VARARR(nm, AE, IS, GS ) \
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE & )
-#define _SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE )
#define SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
@@ -218,17 +206,12 @@ nm& operator=( const nm& );\
#define SV_DECL_VARARR(nm, AE, IS, GS ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
-#define SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, )
#define SV_DECL_VARARR_VISIBILITY(nm, AE, IS, GS, vis ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
-#define SV_DECL_VARARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, vis )
-
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
-nm::nm( USHORT nInit, BYTE )\
+nm::nm( sal_uInt16 nInit, sal_uInt8 )\
: pData (0),\
nFree (nInit),\
nA (0)\
@@ -242,7 +225,7 @@ nm::nm( USHORT nInit, BYTE )\
\
void nm::_resize (size_t n)\
{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
+ sal_uInt16 nL = ((n < USHRT_MAX) ? sal_uInt16(n) : USHRT_MAX);\
AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
if ((pE != 0) || (nL == 0))\
{\
@@ -251,7 +234,7 @@ void nm::_resize (size_t n)\
}\
}\
\
-void nm::Insert( const AERef aE, USHORT nP )\
+void nm::Insert( const AERef aE, sal_uInt16 nP )\
{\
DBG_ASSERT(nP <= nA && nA < USHRT_MAX, "Ins 1");\
if (nFree < 1)\
@@ -262,7 +245,7 @@ void nm::Insert( const AERef aE, USHORT nP )\
++nA; --nFree;\
}\
\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
+void nm::Insert( const AE* pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
DBG_ASSERT(nP<=nA && ((long)nA+nL)<USHRT_MAX,"Ins n");\
if (nFree < nL)\
@@ -274,13 +257,13 @@ void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
nA = nA + nL; nFree = nFree - nL;\
}\
\
-void nm::Replace( const AERef aE, USHORT nP )\
+void nm::Replace( const AERef aE, sal_uInt16 nP )\
{\
if( nP < nA )\
*(pData+nP) = (AE&)aE;\
}\
\
-void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
+void nm::Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
if( pE && nP < nA )\
{\
@@ -294,7 +277,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
else \
{\
- USHORT nTmpLen = nA + nFree - nP; \
+ sal_uInt16 nTmpLen = nA + nFree - nP; \
memcpy( pData + nP, pE, nTmpLen * sizeof( AE ));\
nA = nA + nFree; \
nFree = 0; \
@@ -303,7 +286,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
}\
\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( !nL )\
return;\
@@ -315,7 +298,7 @@ void nm::Remove( USHORT nP, USHORT nL )\
_resize (nA);\
}\
\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
+void nm::_ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
{\
if( nStt >= nE || nE > nA )\
@@ -328,227 +311,39 @@ _SVVARARR_IMPL_GET_OP_INLINE(nm, AE )\
#define SV_IMPL_VARARR( nm, AE ) \
SV_IMPL_VARARR_GEN( nm, AE, AE & )
-#define SV_IMPL_VARARR_PLAIN( nm, AE ) \
-SV_IMPL_VARARR_GEN( nm, AE, AE )
-
-#if defined(PRODUCT)
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
-\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
-{\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
-}
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )
-
-#else
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem ) \
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
-{\
- DBG_ASSERT( pData && nP < nA,"Op[]");\
- return *(pData+nP);\
-}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE )\
-{\
- DBG_ASSERT( nP <= nA,"Ins,Ar[Start.End]");\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
-}
-
-#endif
-
-#define _SV_DECL_OBJARR(nm, AE, IS, GS)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
-class nm\
-{\
-protected:\
- AE *pData;\
- USHORT nFree;\
- USHORT nA;\
-\
- void _resize(size_t n);\
- void _destroy();\
-\
-public:\
- nm( USHORT= IS, BYTE= GS );\
- ~nm() { _destroy(); }\
-\
- _SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
- AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
-\
- void Insert( const AE &aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- USHORT Count() const { return nA; }\
- const AE* GetData() const { return (const AE*)pData; }\
-\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, fnForEach, pArgs );\
- }\
- void ForEach( USHORT nS, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, fnForEach, pArgs );\
- }\
-\
- void _ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
-\
-
-#define SV_DECL_OBJARR(nm, AE, IS, GS)\
-_SV_DECL_OBJARR(nm, AE, IS, GS)\
-private:\
-nm( const nm& );\
-nm& operator=( const nm& );\
-};
-
-#define SV_IMPL_OBJARR( nm, AE )\
-nm::nm( USHORT nInit, BYTE )\
- : pData (0),\
- nFree (nInit),\
- nA (0)\
-{\
- if( nInit )\
- {\
- pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
- DBG_ASSERT( pData, "CTOR, allocate");\
- }\
-}\
-\
-void nm::_destroy()\
-{\
- if(pData)\
- {\
- AE* pTmp=pData;\
- for(USHORT n=0; n < nA; n++,pTmp++ )\
- {\
- pTmp->~AE();\
- }\
- rtl_freeMemory(pData);\
- pData = 0;\
- }\
-}\
-\
-void nm::_resize (size_t n)\
-{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
- AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
- if ((pE != 0) || (nL == 0))\
- {\
- pData = pE;\
- nFree = nL - nA;\
- }\
-}\
-\
-void nm::Insert( const AE &aE, USHORT nP )\
-{\
- DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
- if (nFree < 1)\
- _resize (nA + ((nA > 1) ? nA : 1));\
- if( pData && nP < nA )\
- memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
- AE* pTmp = pData+nP;\
- new( (DummyType*) pTmp ) AE( (AE&)aE );\
- ++nA; --nFree;\
-}\
-\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
-{\
- DBG_ASSERT(nP<=nA && ((long)nA+nL) < USHRT_MAX, "Ins n");\
- if (nFree < nL)\
- _resize (nA + ((nA > nL) ? nA : nL));\
- if( pData && nP < nA )\
- memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
- if( pE )\
- {\
- AE* pTmp = pData+nP;\
- for( USHORT n = 0; n < nL; n++, pTmp++, pE++)\
- {\
- new( (DummyType*) pTmp ) AE( (AE&)*pE );\
- }\
- }\
- nA = nA + nL; nFree = nFree - nL;\
-}\
-\
-void nm::Remove( USHORT nP, USHORT nL )\
-{\
- if( !nL )\
- return;\
- DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- AE* pTmp=pData+nP;\
- USHORT nCtr = nP;\
- for(USHORT n=0; n < nL; n++,pTmp++,nCtr++)\
- {\
- if( nCtr < nA )\
- pTmp->~AE();\
- }\
- if( pData && nP+1 < nA )\
- memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
- nA = nA - nL; nFree = nFree + nL;\
- if (nFree > nA) \
- _resize (nA);\
-}\
-\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
-{\
- if( nStt >= nE || nE > nA )\
- return;\
- for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++)\
- ;\
-}\
-\
-_SVOBJARR_IMPL_GET_OP_INLINE(nm, AE)\
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
-USHORT GetPos( const AERef aE ) const;\
+sal_uInt16 GetPos( const AERef aE ) const;\
};
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
-#define _SV_DECL_PTRARR_DEF_PLAIN( nm, AE, IS, GS, vis )\
-_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert( (const VPRef )aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr*)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -558,20 +353,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject(USHORT nP) const { \
+ AE GetObject(sal_uInt16 nP) const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -579,39 +374,35 @@ private:\
#define SV_DECL_PTRARR(nm, AE, IS, GS )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
-#define SV_DECL_PTRARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
~nm() { DeleteAndDestroy( 0, Count() ); }\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert((const VPRef)aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr *)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -621,20 +412,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject( USHORT nP )const { \
+ AE GetObject( sal_uInt16 nP )const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
} \
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -642,20 +433,16 @@ private:\
#define SV_DECL_PTRARR_DEL(nm, AE, IS, GS )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_DEL_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_DEL_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
-#define SV_DECL_PTRARR_DEL_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
-void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
+void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )\
{ \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
Base::Remove( nP, nL ); \
} \
@@ -663,37 +450,34 @@ void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
#define SV_IMPL_PTRARR(nm, AE )\
SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarr )
-#define SV_IMPL_PTRARR_PLAIN(nm, AE )\
-SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarrPlain )
typedef void* VoidPtr;
_SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
-_SV_DECL_PTRARR_DEF_PLAIN( SvPtrarrPlain, VoidPtr, 0, 1, SVL_DLLPUBLIC )
// SORTARR - Begin
#define _SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AE&, void* );\
class vis nm : private nm##_SAR \
{\
public:\
- nm(USHORT nSize = IS, BYTE nG = GS)\
+ nm(sal_uInt16 nSize = IS, sal_uInt8 nG = GS)\
: nm##_SAR(nSize,nG) {}\
- void Insert( const nm *pI, USHORT nS=0, USHORT nE=USHRT_MAX );\
- BOOL Insert( const AE& aE );\
- BOOL Insert( const AE& aE, USHORT& rP );\
- void Insert( const AE *pE, USHORT nL );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Remove( const AE& aE, USHORT nL = 1 );\
- USHORT Count() const { return nm##_SAR::Count(); }\
+ void Insert( const nm *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );\
+ sal_Bool Insert( const AE& aE );\
+ sal_Bool Insert( const AE& aE, sal_uInt16& rP );\
+ void Insert( const AE *pE, sal_uInt16 nL );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Remove( const AE& aE, sal_uInt16 nL = 1 );\
+ sal_uInt16 Count() const { return nm##_SAR::Count(); }\
const AE* GetData() const { return (const AE*)pData; }\
\
/* Das Ende stehe im DECL-Makro !!! */
#define _SV_SEEK_PTR(nm,AE)\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -706,27 +490,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( (long)*(pData + nM) == rCmp )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( (long)*(pData+ nM) < (long)aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_PTR_TO_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -738,27 +522,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( *(*((AE*)pData + nM)) == *(aE) )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(*((AE*)pData + nM)) < *(aE) )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE & aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -770,29 +554,29 @@ BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
if( *(pData + nM) == aE )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(pData + nM) < aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_IMPL_SORTAR_ALG(nm, AE)\
-void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
+void nm::Insert( const nm * pI, sal_uInt16 nS, sal_uInt16 nE )\
{\
if( USHRT_MAX == nE )\
nE = pI->Count();\
- USHORT nP;\
+ sal_uInt16 nP;\
const AE * pIArr = pI->GetData();\
for( ; nS < nE; ++nS )\
{\
@@ -806,68 +590,68 @@ void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
}\
}\
\
-BOOL nm::Insert( const AE & aE )\
+sal_Bool nm::Insert( const AE & aE )\
{\
- USHORT nP;\
- BOOL bExist;\
+ sal_uInt16 nP;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &nP );\
if( ! bExist )\
nm##_SAR::Insert( aE, nP );\
return !bExist;\
}\
-BOOL nm::Insert( const AE & aE, USHORT& rP )\
+sal_Bool nm::Insert( const AE & aE, sal_uInt16& rP )\
{\
- BOOL bExist;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &rP );\
if( ! bExist )\
nm##_SAR::Insert( aE, rP );\
return !bExist;\
}\
-void nm::Insert( const AE* pE, USHORT nL)\
+void nm::Insert( const AE* pE, sal_uInt16 nL)\
{\
- USHORT nP;\
- for( USHORT n = 0; n < nL; ++n )\
+ sal_uInt16 nP;\
+ for( sal_uInt16 n = 0; n < nL; ++n )\
if( ! Seek_Entry( *(pE+n), &nP ))\
nm##_SAR::Insert( *(pE+n), nP );\
}\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( nL )\
nm##_SAR::Remove( nP, nL);\
}\
\
-void nm::Remove( const AE &aE, USHORT nL )\
+void nm::Remove( const AE &aE, sal_uInt16 nL )\
{\
- USHORT nP;\
+ sal_uInt16 nP;\
if( nL && Seek_Entry( aE, &nP ) ) \
nm##_SAR::Remove( nP, nL);\
}\
#define _SORTARR_BLC_CASTS(nm, AE )\
- USHORT GetPos( const AE& aE ) const { \
+ sal_uInt16 GetPos( const AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}
#define _SV_DECL_PTRARR_SORT_ALG(nm, AE, IS, GS, vis)\
SV_DECL_PTRARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
- AE operator[](USHORT nP) const {\
+ AE operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- AE GetObject(USHORT nP) const {\
+ AE GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 ); \
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); \
_SORTARR_BLC_CASTS(nm, AE )\
\
/* Das Ende stehe im DECL-Makro !!! */
@@ -903,18 +687,18 @@ _SV_DECL_PTRARR_SORT_DEL(nm, AE, IS, GS, vis)
#define _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)\
SV_DECL_VARARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis) \
- const AE& operator[](USHORT nP) const {\
+ const AE& operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- const AE& GetObject(USHORT nP) const {\
+ const AE& GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE & aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE & aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
@@ -932,10 +716,10 @@ _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)
#define SV_IMPL_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
@@ -944,10 +728,10 @@ _SV_SEEK_PTR( nm, AE )
#define SV_IMPL_OP_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
@@ -959,69 +743,21 @@ SV_IMPL_VARARR(nm##_SAR, AE)\
_SV_IMPL_SORTAR_ALG( nm,AE )\
_SV_SEEK_OBJECT( nm,AE )
-#define SV_DECL_PTRARR_STACK(nm, AE, IS, GS)\
-class nm: private SvPtrarr \
-{\
-public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
- : SvPtrarr(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
- SvPtrarr::Insert( pI, nP, nS, nE ); \
- }\
- void Remove( USHORT nP, USHORT nL = 1 ) {\
- SvPtrarr::Remove( nP, nL ); \
- }\
- void Push( const AE &aE ) {\
- SvPtrarr::Insert( (const VoidPtr &)aE, SvPtrarr::Count() );\
- }\
- USHORT Count() const { return SvPtrarr::Count(); }\
- AE operator[](USHORT nP) const {\
- return (AE)SvPtrarr::operator[]( nP );\
- }\
- AE GetObject(USHORT nP) const {\
- return (AE)SvPtrarr::GetObject( nP );\
- }\
- AE Pop(){\
- AE pRet = 0;\
- if( SvPtrarr::Count() ){\
- pRet = GetObject( SvPtrarr::Count()-1 );\
- SvPtrarr::Remove(Count()-1);\
- }\
- return pRet;\
- }\
- AE Top() const {\
- AE pRet = 0;\
- if( SvPtrarr::Count() )\
- pRet = GetObject( SvPtrarr::Count()-1 ); \
- return pRet;\
- }\
-};
-
#if defined (C40) || defined (C41) || defined (C42) || defined(C50) || defined(C52)
#define C40_INSERT( c, p, n) Insert( (c const *) p, n )
-#define C40_PUSH( c, p) Push( (c const *) p )
#define C40_PTR_INSERT( c, p) Insert( (c const *) p )
-#define C40_REMOVE( c, p ) Remove( (c const *) p )
#define C40_REPLACE( c, p, n) Replace( (c const *) p, n )
-#define C40_PTR_REPLACE( c, p) Replace( (c const *) p )
#define C40_GETPOS( c, r) GetPos( (c const *)r )
#else
#if defined ICC || (defined GCC && __GNUC__ >= 3) || (defined(WNT) && _MSC_VER >= 1400)
#define C40_INSERT( c, p, n ) Insert( (c const *&) p, n )
-#define C40_PUSH( c, p) Push( (c const *&) p )
#define C40_PTR_INSERT( c, p ) Insert( (c const *&) p )
-#define C40_REMOVE( c, p ) Remove( (c const *&) p )
#define C40_REPLACE( c, p, n ) Replace( (c const *&) p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( (c const *&) p )
#define C40_GETPOS( c, r) GetPos( (c const *&) r )
#else
#define C40_INSERT( c, p, n ) Insert( p, n )
-#define C40_PUSH( c, p) Push( p )
#define C40_PTR_INSERT( c, p ) Insert( p )
-#define C40_REMOVE( c, p) Remove( p )
#define C40_REPLACE( c, p, n ) Replace( p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( p )
#define C40_GETPOS( c, r) GetPos( r )
#endif
#endif
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index de8601c979d4..d60ef0094723 100644
--- a/svl/inc/svl/svdde.hxx
+++ b/svl/inc/svl/svdde.hxx
@@ -84,11 +84,11 @@ class SVL_DLLPUBLIC DdeData
SVL_DLLPRIVATE void Lock();
- void SetFormat( ULONG nFmt );
+ void SetFormat( sal_uLong nFmt );
public:
DdeData();
- DdeData( const void*, long, ULONG = FORMAT_STRING );
+ DdeData( const void*, long, sal_uLong = FORMAT_STRING );
DdeData( const String& );
DdeData( const DdeData& );
~DdeData();
@@ -96,12 +96,12 @@ public:
operator const void*() const;
operator long() const;
- ULONG GetFormat() const;
+ sal_uLong GetFormat() const;
DdeData& operator = ( const DdeData& );
- static ULONG GetExternalFormat( ULONG nFmt );
- static ULONG GetInternalFormat( ULONG nFmt );
+ static sal_uLong GetExternalFormat( sal_uLong nFmt );
+ static sal_uLong GetInternalFormat( sal_uLong nFmt );
};
// ------------------
@@ -112,7 +112,7 @@ class SVL_DLLPUBLIC DdeTransaction
{
public:
virtual void Data( const DdeData* );
- virtual void Done( BOOL bDataValid );
+ virtual void Done( sal_Bool bDataValid );
protected:
DdeConnection& rDde;
DdeData aDdeData;
@@ -122,14 +122,14 @@ protected:
long nTime;
Link aData;
Link aDone;
- BOOL bBusy;
+ sal_Bool bBusy;
DdeTransaction( DdeConnection&, const String&, long = 0 );
public:
virtual ~DdeTransaction();
- BOOL IsBusy() { return bBusy; }
+ sal_Bool IsBusy() { return bBusy; }
const String& GetName() const;
void Execute();
@@ -140,8 +140,8 @@ public:
void SetDoneHdl( const Link& rLink ) { aDone = rLink; }
const Link& GetDoneHdl() const { return aDone; }
- void SetFormat( ULONG nFmt ) { aDdeData.SetFormat( nFmt ); }
- ULONG GetFormat() const { return aDdeData.GetFormat(); }
+ void SetFormat( sal_uLong nFmt ) { aDdeData.SetFormat( nFmt ); }
+ sal_uLong GetFormat() const { return aDdeData.GetFormat(); }
long GetError();
@@ -209,7 +209,7 @@ class SVL_DLLPUBLIC DdePoke : public DdeTransaction
{
public:
DdePoke( DdeConnection&, const String&, const char*, long,
- ULONG = FORMAT_STRING, long = 0 );
+ sal_uLong = FORMAT_STRING, long = 0 );
DdePoke( DdeConnection&, const String&, const DdeData&, long = 0 );
DdePoke( DdeConnection&, const String&, const String&, long = 0 );
};
@@ -246,7 +246,7 @@ public:
static const DdeConnections& GetConnections();
- BOOL IsConnected();
+ sal_Bool IsConnected();
const String& GetServiceName();
const String& GetTopicName();
@@ -268,11 +268,11 @@ class SVL_DLLPUBLIC DdeItem
DdeTopic* pMyTopic;
DdeItemImp* pImpData;
- void IncMonitor( ULONG );
- void DecMonitor( ULONG );
+ void IncMonitor( sal_uLong );
+ void DecMonitor( sal_uLong );
protected:
- BYTE nType;
+ sal_uInt8 nType;
public:
DdeItem( const sal_Unicode* );
@@ -296,9 +296,9 @@ public:
DdeGetPutItem( const String& rStr );
DdeGetPutItem( const DdeItem& rItem );
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual void AdviseLoop( BOOL ); // AdviseLoop starten/stoppen
+ virtual DdeData* Get( sal_uLong );
+ virtual sal_Bool Put( const DdeData* );
+ virtual void AdviseLoop( sal_Bool ); // AdviseLoop starten/stoppen
};
// ------------
@@ -312,16 +312,16 @@ class SVL_DLLPUBLIC DdeTopic
public:
virtual void Connect( long );
virtual void Disconnect( long );
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual BOOL Execute( const String* );
+ virtual DdeData* Get( sal_uLong );
+ virtual sal_Bool Put( const DdeData* );
+ virtual sal_Bool Execute( const String* );
// evt. ein neues anlegen; return 0 -> es konnte nicht angelegt werden
- virtual BOOL MakeItem( const String& rItem );
+ virtual sal_Bool MakeItem( const String& rItem );
// es wird ein Warm-/Hot-Link eingerichtet. Return-Wert
// besagt ob es geklappt hat
- virtual BOOL StartAdviseLoop();
- virtual BOOL StopAdviseLoop();
+ virtual sal_Bool StartAdviseLoop();
+ virtual sal_Bool StopAdviseLoop();
private:
friend class DdeInternal;
@@ -357,7 +357,7 @@ public:
const Link& GetExecuteHdl() const { return aExecLink; }
void NotifyClient( const String& );
- BOOL IsSystemTopic();
+ sal_Bool IsSystemTopic();
void InsertItem( DdeItem* ); // fuer eigene Ableitungen!
DdeItem* AddItem( const DdeItem& ); // werden kopiert !
@@ -379,10 +379,10 @@ class SVL_DLLPUBLIC DdeService
friend class DdeInternal;
public:
- virtual BOOL IsBusy();
+ virtual sal_Bool IsBusy();
virtual String GetHelp();
// evt. ein neues anlegen; return 0 -> es konnte nicht angelegt werden
- virtual BOOL MakeTopic( const String& rItem );
+ virtual sal_Bool MakeTopic( const String& rItem );
protected:
virtual String Topics();
@@ -390,7 +390,7 @@ protected:
virtual String SysItems();
virtual String Status();
virtual String SysTopicGet( const String& );
- virtual BOOL SysTopicExecute( const String* );
+ virtual sal_Bool SysTopicExecute( const String* );
const DdeTopic* GetSysTopic() const { return pSysTopic; }
private:
@@ -401,7 +401,7 @@ private:
ConvList* pConv;
short nStatus;
- SVL_DLLPRIVATE BOOL HasCbFormat( USHORT );
+ SVL_DLLPRIVATE sal_Bool HasCbFormat( sal_uInt16 );
public:
DdeService( const String& );
@@ -416,9 +416,9 @@ public:
void AddTopic( const DdeTopic& );
void RemoveTopic( const DdeTopic& );
- void AddFormat( ULONG );
- void RemoveFormat( ULONG );
- BOOL HasFormat( ULONG );
+ void AddFormat( sal_uLong );
+ void RemoveFormat( sal_uLong );
+ sal_Bool HasFormat( sal_uLong );
private:
// DdeService( const DdeService& );
diff --git a/svl/inc/svl/svldata.hxx b/svl/inc/svl/svldata.hxx
index 952f09db75e0..1a869b5a5a1f 100644
--- a/svl/inc/svl/svldata.hxx
+++ b/svl/inc/svl/svldata.hxx
@@ -62,7 +62,7 @@ class SvtSimpleResId
String m_sValue;
public:
- SvtSimpleResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale) : m_sValue(ImpSvlData::GetSvlData().GetSimpleRM(aLocale)->ReadString(nId)) { };
+ SvtSimpleResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale) : m_sValue(ImpSvlData::GetSvlData().GetSimpleRM(aLocale)->ReadString(nId)) { };
operator String () const { return m_sValue; }
};
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 6551b63e2c55..3f68af6e9d98 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -41,55 +41,56 @@
#include "svl/svldllapi.h"
#include <svl/svarray.hxx>
+#include <deque>
#ifndef _SVSTDARR_ULONGS_DECL
-SV_DECL_VARARR_VISIBILITY( SvULongs, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvULongs, sal_uLong, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_ULONGS_DECL
#endif
#ifndef _SVSTDARR_ULONGSSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvULongsSort, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_SORT_VISIBILITY( SvULongsSort, sal_uLong, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_ULONGSSORT_DECL
#endif
#ifndef _SVSTDARR_USHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvUShorts, USHORT, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvUShorts, sal_uInt16, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_USHORTS_DECL
#endif
#ifndef _SVSTDARR_USHORTSSORT_DECL
-typedef BOOL (*FnForEach_SvUShortsSort)( const USHORT&, void* );
+typedef sal_Bool (*FnForEach_SvUShortsSort)( const sal_uInt16&, void* );
class SVL_DLLPUBLIC SvUShortsSort : private SvUShorts
{
public:
- SvUShortsSort(BYTE nSize = 1, BYTE nG = 1)
+ SvUShortsSort(sal_uInt8 nSize = 1, sal_uInt8 nG = 1)
: SvUShorts(nSize,nG) {}
- void Insert( const SvUShortsSort *pI, USHORT nS=0, USHORT nE=USHRT_MAX );
- BOOL Insert( const USHORT aE );
- BOOL Insert( const USHORT aE, USHORT& rP );
- void Insert( const USHORT *pE, USHORT nL );
+ void Insert( const SvUShortsSort *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );
+ sal_Bool Insert( const sal_uInt16 aE );
+ sal_Bool Insert( const sal_uInt16 aE, sal_uInt16& rP );
+ void Insert( const sal_uInt16 *pE, sal_uInt16 nL );
// remove ab Pos
- void RemoveAt( const USHORT nP, USHORT nL = 1 );
+ void RemoveAt( const sal_uInt16 nP, sal_uInt16 nL = 1 );
// remove ab dem Eintrag
- void Remove( const USHORT nP, USHORT nL = 1 );
- BOOL Seek_Entry( const USHORT aE, USHORT* pP = 0 ) const;
+ void Remove( const sal_uInt16 nP, sal_uInt16 nL = 1 );
+ sal_Bool Seek_Entry( const sal_uInt16 aE, sal_uInt16* pP = 0 ) const;
- USHORT Count() const { return SvUShorts::Count(); }
- const USHORT* GetData() const { return (const USHORT*)pData; }
+ sal_uInt16 Count() const { return SvUShorts::Count(); }
+ const sal_uInt16* GetData() const { return (const sal_uInt16*)pData; }
- const USHORT& operator[](USHORT nP) const {
+ const sal_uInt16& operator[](sal_uInt16 nP) const {
return SvUShorts::operator[]( nP );
}
- const USHORT& GetObject(USHORT nP) const {
+ const sal_uInt16& GetObject(sal_uInt16 nP) const {
return SvUShorts::GetObject( nP );
}
void ForEach( FnForEach_SvUShortsSort fnForEach, void* pArgs = 0 )
{
_ForEach( 0, nA, (FnForEach_SvUShorts)fnForEach, pArgs );
}
- void ForEach( USHORT nS, USHORT nE,
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE,
FnForEach_SvUShortsSort fnForEach, void* pArgs = 0 )
{
_ForEach( nS, nE, (FnForEach_SvUShorts)fnForEach, pArgs );
@@ -178,14 +179,5 @@ SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1,
#define _SVSTDARR_BYTESTRINGSISORTDTOR_DECL
#endif
-#ifndef _SVSTDARR_XUB_STRLEN_DECL
-SV_DECL_VARARR_VISIBILITY( SvXub_StrLens, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLEN_DECL
-#endif
-
-#ifndef _SVSTDARR_XUB_STRLENSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvXub_StrLensSort, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLENSORT_DECL
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/szitem.hxx b/svl/inc/svl/szitem.hxx
index cd8a40d33e55..b3b78d9e8891 100644
--- a/svl/inc/svl/szitem.hxx
+++ b/svl/inc/svl/szitem.hxx
@@ -47,8 +47,8 @@ private:
public:
TYPEINFO();
SfxSizeItem();
- SfxSizeItem( USHORT nWhich, const Size& rVal );
- SfxSizeItem( USHORT nWhich, SvStream & );
+ SfxSizeItem( sal_uInt16 nWhich, const Size& rVal );
+ SfxSizeItem( sal_uInt16 nWhich, SvStream & );
SfxSizeItem( const SfxSizeItem& );
~SfxSizeItem() { DBG_DTOR(SfxSizeItem, 0); }
@@ -60,13 +60,13 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Size& GetValue() const { return aVal; }
void SetValue( const Size& rNewVal ) {
diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx
index aaf3fa3ce60c..e3f964864eb8 100644
--- a/svl/inc/svl/undo.hxx
+++ b/svl/inc/svl/undo.hxx
@@ -33,6 +33,10 @@
#include <tools/string.hxx>
#include <svl/svarray.hxx>
+#include <boost/scoped_ptr.hpp>
+
+#include <vector>
+
//====================================================================
class SVL_DLLPUBLIC SfxRepeatTarget
@@ -44,26 +48,36 @@ public:
//====================================================================
+class SVL_DLLPUBLIC SfxUndoContext
+{
+public:
+ virtual ~SfxUndoContext() = 0;
+};
+
+//====================================================================
+
class SVL_DLLPUBLIC SfxUndoAction
{
- BOOL bLinked;
+ sal_Bool bLinked;
public:
TYPEINFO();
SfxUndoAction();
virtual ~SfxUndoAction();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked = TRUE );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked = sal_True );
virtual void Undo();
+ virtual void UndoWithContext( SfxUndoContext& i_context );
virtual void Redo();
+ virtual void RedoWithContext( SfxUndoContext& i_context );
virtual void Repeat(SfxRepeatTarget&);
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
+ virtual sal_uInt16 GetId() const;
private:
SfxUndoAction& operator=( const SfxUndoAction& ); // n.i.!!
@@ -71,19 +85,67 @@ private:
//========================================================================
-SV_DECL_PTRARR( SfxUndoActions, SfxUndoAction*, 20, 8 )
+/// is a mark on the Undo stack
+typedef sal_Int32 UndoStackMark;
+#define MARK_INVALID ::std::numeric_limits< UndoStackMark >::max()
+
+//========================================================================
+
+struct MarkedUndoAction
+{
+ SfxUndoAction* pAction;
+ ::std::vector< UndoStackMark > aMarks;
+
+ MarkedUndoAction( SfxUndoAction* i_action )
+ :pAction( i_action )
+ ,aMarks()
+ {
+ }
+};
+
+class SfxUndoActions
+{
+private:
+ ::std::vector< MarkedUndoAction > m_aActions;
+
+public:
+ SfxUndoActions()
+ {
+ }
+
+ bool empty() const { return m_aActions.empty(); }
+ size_t size() const { return m_aActions.size(); }
+
+ const MarkedUndoAction& operator[]( size_t i ) const { return m_aActions[i]; }
+ MarkedUndoAction& operator[]( size_t i ) { return m_aActions[i]; }
+
+ void Remove( size_t i_pos )
+ {
+ m_aActions.erase( m_aActions.begin() + i_pos );
+ }
+
+ void Remove( size_t i_pos, size_t i_count )
+ {
+ m_aActions.erase( m_aActions.begin() + i_pos, m_aActions.begin() + i_pos + i_count );
+ }
+
+ void Insert( SfxUndoAction* i_action, size_t i_pos )
+ {
+ m_aActions.insert( m_aActions.begin() + i_pos, MarkedUndoAction( i_action ) );
+ }
+};
//====================================================================
-/** do not make use of this implementation details, unless you
+/** do not make use of these implementation details, unless you
really really have to! */
struct SVL_DLLPUBLIC SfxUndoArray
{
SfxUndoActions aUndoActions;
- USHORT nMaxUndoActions;
- USHORT nCurUndoAction;
+ size_t nMaxUndoActions;
+ size_t nCurUndoAction;
SfxUndoArray *pFatherUndoArray;
- SfxUndoArray(USHORT nMax=0):
+ SfxUndoArray(size_t nMax=0):
nMaxUndoActions(nMax), nCurUndoAction(0),
pFatherUndoArray(0) {}
~SfxUndoArray();
@@ -91,7 +153,7 @@ struct SVL_DLLPUBLIC SfxUndoArray
//=========================================================================
-/** do not make use of this implementation details, unless you
+/** do not make use of these implementation details, unless you
really really have to! */
class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArray
@@ -110,87 +172,260 @@ class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArra
TYPEINFO();
SfxListUndoAction( const UniString &rComment,
- const UniString rRepeatComment, USHORT Id, SfxUndoArray *pFather);
+ const UniString rRepeatComment, sal_uInt16 Id, SfxUndoArray *pFather);
virtual void Undo();
+ virtual void UndoWithContext( SfxUndoContext& i_context );
virtual void Redo();
+ virtual void RedoWithContext( SfxUndoContext& i_context );
virtual void Repeat(SfxRepeatTarget&);
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
+ virtual sal_uInt16 GetId() const;
void SetComment( const UniString& rComment );
private:
- USHORT nId;
- UniString aComment, aRepeatComment;
+ sal_uInt16 nId;
+ UniString aComment;
+ UniString aRepeatComment;
};
//=========================================================================
-class SVL_DLLPUBLIC SfxUndoManager
+/** is a callback interface for notifications about state changes of an SfxUndoManager
+*/
+class SAL_NO_VTABLE SfxUndoListener
{
- friend class SfxLinkUndoAction;
+public:
+ virtual void actionUndone( const String& i_actionComment ) = 0;
+ virtual void actionRedone( const String& i_actionComment ) = 0;
+ virtual void undoActionAdded( const String& i_actionComment ) = 0;
+ virtual void cleared() = 0;
+ virtual void clearedRedo() = 0;
+ virtual void resetAll() = 0;
+ virtual void listActionEntered( const String& i_comment ) = 0;
+ virtual void listActionLeft( const String& i_comment ) = 0;
+ virtual void listActionLeftAndMerged() = 0;
+ virtual void listActionCancelled() = 0;
+ virtual void undoManagerDying() = 0;
+};
- SfxUndoArray *pUndoArray;
- SfxUndoArray *pActUndoArray;
- SfxUndoArray *pFatherUndoArray;
+//=========================================================================
- bool mbUndoEnabled;
-public:
- SfxUndoManager( USHORT nMaxUndoActionCount = 20 );
- virtual ~SfxUndoManager();
+namespace svl
+{
+ class SAL_NO_VTABLE IUndoManager
+ {
+ public:
+ enum
+ {
+ CurrentLevel = true,
+ TopLevel = false
+ };
- virtual void SetMaxUndoActionCount( USHORT nMaxUndoActionCount );
- virtual USHORT GetMaxUndoActionCount() const;
- virtual void Clear();
+ virtual ~IUndoManager() { };
+
+ virtual void SetMaxUndoActionCount( size_t nMaxUndoActionCount ) = 0;
+ virtual size_t GetMaxUndoActionCount() const = 0;
+
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False ) = 0;
+
+ virtual size_t GetUndoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual sal_uInt16 GetUndoActionId() const = 0;
+ virtual UniString GetUndoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const = 0;
- virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
+ virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual UniString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
- virtual USHORT GetUndoActionCount() const;
- virtual USHORT GetUndoActionId(USHORT nNo=0) const;
- virtual UniString GetUndoActionComment( USHORT nNo=0 ) const;
- /** returns the nNo'th undo action from the top */
- SfxUndoAction* GetUndoAction( USHORT nNo=0 ) const;
+ virtual sal_Bool Undo() = 0;
+ virtual sal_Bool Redo() = 0;
- virtual BOOL Undo( USHORT nCount=1 );
- virtual void Undo( SfxUndoAction &rAction );
+ /** clears both the Redo and the Undo stack.
- virtual USHORT GetRedoActionCount() const;
- virtual USHORT GetRedoActionId(USHORT nNo=0) const;
- virtual UniString GetRedoActionComment( USHORT nNo=0 ) const;
+ Will assert and bail out when called while within a list action (<member>IsInListAction</member>).
+ */
+ virtual void Clear() = 0;
- virtual BOOL Redo( USHORT nCount=1 );
- virtual void Redo( SfxUndoAction &rAction );
+ /** clears the Redo stack.
+
+ Will assert and bail out when called while within a list action (<member>IsInListAction</member>).
+ */
+ virtual void ClearRedo() = 0;
+
+ /** leaves any possible open list action (<member>IsInListAction</member>), and clears both the Undo and the
+ Redo stack.
+
+ Effectively, calling this method is equivalent to <code>while ( IsInListAction() ) LeaveListAction();</code>,
+ followed by <code>Clear()</code>. The only difference to this calling sequence is that Reset is an
+ atomar operation, also resulting in only one notification.
+ */
+ virtual void Reset() = 0;
+
+ /** determines whether an Undo or Redo is currently running
+ */
+ virtual bool IsDoing() const = 0;
+
+ virtual size_t GetRepeatActionCount() const = 0;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget) const = 0;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget ) = 0;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget ) const = 0;
+
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0) = 0;
+
+ /** leaves the list action entered with EnterListAction
+ @return the number of the sub actions in the list which has just been left. Note that in case no such
+ actions exist, the list action does not contribute to the Undo stack, but is silently removed.
+ */
+ virtual size_t LeaveListAction() = 0;
+
+ /** leaves the list action entered with EnterListAction, and forcefully merges the previous
+ action on the stack into the newly created list action.
+
+ Say you have an Undo action A on the stack, then call EnterListAction, followed by one or more calls to
+ AddUndoAction, followed by a call to LeaveAndMergeListAction. In opposite to LeaveListAction, your Undo
+ stack will now still contain one undo action: the newly created list action, whose first child is the
+ original A, whose other children are those you added via AddUndoAction, and whose comment is the same as
+ the comment of A.
+
+ Effectively, this means that all actions added between EnterListAction and LeaveAndMergeListAction are
+ hidden from the user.
+
+ @return the number of the sub actions in the list which has just been left. Note that in case no such
+ actions exist, the list action does not contribute to the Undo stack, but is silently removed.
+ */
+ virtual size_t LeaveAndMergeListAction() = 0;
+
+ /// determines whether we're within a ListAction context, i.e. a LeaveListAction/LeaveAndMergeListAction call is pending
+ virtual bool IsInListAction() const = 0;
+
+ /// determines how many nested list actions are currently open
+ virtual size_t GetListActionDepth() const = 0;
+
+ /** clears the redo stack and removes the top undo action */
+ virtual void RemoveLastUndoAction() = 0;
+
+ // enables (true) or disables (false) recording of undo actions
+ // If undo actions are added while undo is disabled, they are deleted.
+ // Disabling undo does not clear the current undo buffer!
+ virtual void EnableUndo( bool bEnable ) = 0;
+
+ // returns true if undo is currently enabled
+ // This returns false if undo was disabled using EnableUndo( false ) and
+ // also during the runtime of the Undo() and Redo() methods.
+ virtual bool IsUndoEnabled() const = 0;
+
+ /// adds a new listener to be notified about changes in the UndoManager's state
+ virtual void AddUndoListener( SfxUndoListener& i_listener ) = 0;
+ virtual void RemoveUndoListener( SfxUndoListener& i_listener ) = 0;
+ };
+}
+
+//=========================================================================
+
+namespace svl { namespace undo { namespace impl
+{
+ class UndoManagerGuard;
+ class LockGuard;
+} } }
+
+struct SfxUndoManager_Data;
+class SVL_DLLPUBLIC SfxUndoManager : public ::svl::IUndoManager
+{
+ friend class SfxLinkUndoAction;
+
+ ::boost::scoped_ptr< SfxUndoManager_Data >
+ m_pData;
+public:
+ SfxUndoManager( size_t nMaxUndoActionCount = 20 );
+ virtual ~SfxUndoManager();
+
+ // IUndoManager overridables
+ virtual void SetMaxUndoActionCount( size_t nMaxUndoActionCount );
+ virtual size_t GetMaxUndoActionCount() const;
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
+ virtual size_t GetUndoActionCount( bool const i_currentLevel = CurrentLevel ) const;
+ virtual sal_uInt16 GetUndoActionId() const;
+ virtual UniString GetUndoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const;
+ virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const;
+ virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const;
+ virtual UniString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const;
+ virtual sal_Bool Undo();
+ virtual sal_Bool Redo();
+ virtual void Clear();
virtual void ClearRedo();
+ virtual void Reset();
+ virtual bool IsDoing() const;
+ virtual size_t GetRepeatActionCount() const;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget) const;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget );
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget ) const;
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0);
+ virtual size_t LeaveListAction();
+ virtual size_t LeaveAndMergeListAction();
+ virtual bool IsInListAction() const;
+ virtual size_t GetListActionDepth() const;
+ virtual void RemoveLastUndoAction();
+ virtual void EnableUndo( bool bEnable );
+ virtual bool IsUndoEnabled() const;
+ virtual void AddUndoListener( SfxUndoListener& i_listener );
+ virtual void RemoveUndoListener( SfxUndoListener& i_listener );
+
+ /** marks the current top-level element of the Undo stack, and returns a unique ID for it
+ */
+ UndoStackMark MarkTopUndoAction();
+
+ /** removes a mark given by its ID.
+ After the call, the mark ID is invalid.
+ */
+ void RemoveMark( UndoStackMark const i_mark );
+
+ /** determines whether the top action on the Undo stack has a given mark
+ */
+ bool HasTopUndoActionMark( UndoStackMark const i_mark );
+
+ /** removes the oldest Undo actions from the stack
+ */
+ void RemoveOldestUndoActions( size_t const i_count );
+
+protected:
+ sal_Bool UndoWithContext( SfxUndoContext& i_context );
+ sal_Bool RedoWithContext( SfxUndoContext& i_context );
- virtual USHORT GetRepeatActionCount() const;
- virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget, USHORT nNo = 0) const;
- virtual BOOL Repeat( SfxRepeatTarget &rTarget, USHORT nFrom=0, USHORT nCount=1 );
- virtual void Repeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction );
- virtual BOOL CanRepeat( SfxRepeatTarget &rTarget, USHORT nNo = 0 ) const;
- virtual BOOL CanRepeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction ) const;
+ void ImplClearRedo_NoLock( bool const i_currentLevel );
- virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
- virtual void LeaveListAction();
+ /** clears all undo actions on the current level, plus all undo actions on superordinate levels,
+ as soon as those levels are reached.
- /** clears the redo stack and removes the top undo action */
- void RemoveLastUndoAction();
+ If no list action is active currently, i.e. we're on the top level already, this method is equivalent to
+ ->Clear.
- // enables (true) or disables (false) recording of undo actions
- // If undo actions are added while undo is disabled, they are deleted.
- // Disabling undo does not clear the current undo buffer!
- void EnableUndo( bool bEnable );
+ Otherwise, the Undo actions on the current level are removed. Upon leaving the current list action, all
+ undo actions on the then-current level are removed, too. This is continued until the top level is reached.
+ */
+ void ClearAllLevels();
- // returns true if undo is currently enabled
- // This returns false if undo was disabled using EnableUndo( false ) and
- // also during the runtime of the Undo() and Redo() methods.
- bool IsUndoEnabled() const { return mbUndoEnabled; }
+private:
+ size_t ImplLeaveListAction( const bool i_merge, ::svl::undo::impl::UndoManagerGuard& i_guard );
+ bool ImplAddUndoAction_NoNotify( SfxUndoAction* pAction, bool bTryMerge, bool bClearRedo, ::svl::undo::impl::UndoManagerGuard& i_guard );
+ void ImplClearRedo( ::svl::undo::impl::UndoManagerGuard& i_guard, bool const i_currentLevel );
+ void ImplClearUndo( ::svl::undo::impl::UndoManagerGuard& i_guard );
+ void ImplClearCurrentLevel_NoNotify( ::svl::undo::impl::UndoManagerGuard& i_guard );
+ size_t ImplGetRedoActionCount_Lock( bool const i_currentLevel = CurrentLevel ) const;
+ bool ImplIsUndoEnabled_Lock() const;
+ bool ImplIsInListAction_Lock() const;
+ void ImplEnableUndo_Lock( bool const i_enable );
+
+ sal_Bool ImplUndo( SfxUndoContext* i_contextOrNull );
+ sal_Bool ImplRedo( SfxUndoContext* i_contextOrNull );
+
+ friend class ::svl::undo::impl::LockGuard;
};
//=========================================================================
@@ -214,23 +449,23 @@ class SVL_DLLPUBLIC SfxLinkUndoAction : public SfxUndoAction
{
public:
TYPEINFO();
- SfxLinkUndoAction(SfxUndoManager *pManager);
+ SfxLinkUndoAction(::svl::IUndoManager *pManager);
~SfxLinkUndoAction();
virtual void Undo();
virtual void Redo();
- virtual BOOL CanRepeat(SfxRepeatTarget& r) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& r) const;
virtual void Repeat(SfxRepeatTarget&r);
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&r) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&r) const;
+ virtual sal_uInt16 GetId() const;
SfxUndoAction* GetAction() const { return pAction; }
protected:
- SfxUndoManager *pUndoManager;
+ ::svl::IUndoManager *pUndoManager;
SfxUndoAction *pAction;
};
diff --git a/svl/inc/svl/urihelper.hxx b/svl/inc/svl/urihelper.hxx
new file mode 100644
index 000000000000..3baab37f7896
--- /dev/null
+++ b/svl/inc/svl/urihelper.hxx
@@ -0,0 +1,238 @@
+/* -*- 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 SVTOOLS_URIHELPER_HXX
+#define SVTOOLS_URIHELPER_HXX
+
+#include "svl/svldllapi.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <rtl/textenc.h>
+#include <tools/link.hxx>
+#include <tools/solar.h>
+#include <tools/urlobj.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace uno { class XComponentContext; }
+ namespace uri { class XUriReference; }
+} } }
+namespace rtl { class OUString; }
+class ByteString;
+class CharClass;
+class UniString;
+
+//============================================================================
+namespace URIHelper {
+
+/**
+ @ATT
+ Calling this function with defaulted arguments rMaybeFileHdl = Link() and
+ bCheckFileExists = true often leads to results that are not intended:
+ Whenever the given rTheBaseURIRef is a file URL, the given rTheRelURIRef is
+ relative, and rTheRelURIRef could also be smart-parsed as a non-file URL
+ (e.g., the relative URL "foo/bar" can be smart-parsed as "http://foo/bar"),
+ then SmartRel2Abs called with rMaybeFileHdl = Link() and bCheckFileExists =
+ true returns the non-file URL interpretation. To avoid this, either pass
+ some non-null rMaybeFileHdl if you want to check generated file URLs for
+ existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false
+ if you want to generate file URLs without checking for their existence.
+*/
+SVL_DLLPUBLIC UniString
+SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
+ ByteString const & rTheRelURIRef,
+ Link const & rMaybeFileHdl = Link(),
+ bool bCheckFileExists = true,
+ bool bIgnoreFragment = false,
+ INetURLObject::EncodeMechanism eEncodeMechanism
+ = INetURLObject::WAS_ENCODED,
+ INetURLObject::DecodeMechanism eDecodeMechanism
+ = INetURLObject::DECODE_TO_IURI,
+ rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
+ bool bRelativeNonURIs = false,
+ INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
+
+/**
+ @ATT
+ Calling this function with defaulted arguments rMaybeFileHdl = Link() and
+ bCheckFileExists = true often leads to results that are not intended:
+ Whenever the given rTheBaseURIRef is a file URL, the given rTheRelURIRef is
+ relative, and rTheRelURIRef could also be smart-parsed as a non-file URL
+ (e.g., the relative URL "foo/bar" can be smart-parsed as "http://foo/bar"),
+ then SmartRel2Abs called with rMaybeFileHdl = Link() and bCheckFileExists =
+ true returns the non-file URL interpretation. To avoid this, either pass
+ some non-null rMaybeFileHdl if you want to check generated file URLs for
+ existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false
+ if you want to generate file URLs without checking for their existence.
+*/
+SVL_DLLPUBLIC UniString
+SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
+ UniString const & rTheRelURIRef,
+ Link const & rMaybeFileHdl = Link(),
+ bool bCheckFileExists = true,
+ bool bIgnoreFragment = false,
+ INetURLObject::EncodeMechanism eEncodeMechanism
+ = INetURLObject::WAS_ENCODED,
+ INetURLObject::DecodeMechanism eDecodeMechanism
+ = INetURLObject::DECODE_TO_IURI,
+ rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
+ bool bRelativeNonURIs = false,
+ INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
+
+//============================================================================
+SVL_DLLPUBLIC void SetMaybeFileHdl(Link const & rTheMaybeFileHdl);
+
+//============================================================================
+SVL_DLLPUBLIC Link GetMaybeFileHdl();
+
+/**
+ Converts a URI reference to a relative one, ignoring certain differences (for
+ example, treating file URLs for case-ignoring file systems
+ case-insensitively).
+
+ @param context a component context; must not be null
+
+ @param baseUriReference a base URI reference
+
+ @param uriReference a URI reference
+
+ @return a URI reference representing the given uriReference relative to the
+ given baseUriReference; if the given baseUriReference is not an absolute,
+ hierarchical URI reference, or the given uriReference is not a valid URI
+ reference, null is returned
+
+ @exception std::bad_alloc if an out-of-memory condition occurs
+
+ @exception com::sun::star::uno::RuntimeException if any error occurs
+ */
+SVL_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uri::XUriReference >
+normalizedMakeRelative(
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ const & context,
+ rtl::OUString const & baseUriReference, rtl::OUString const & uriReference);
+
+/**
+ A variant of normalizedMakeRelative with a simplified interface.
+
+ Internally calls normalizedMakeRelative with the default component context.
+
+ @param baseUriReference a base URI reference, passed to
+ normalizedMakeRelative
+
+ @param uriReference a URI reference, passed to normalizedMakeRelative
+
+ @return if the XUriReference returnd by normalizedMakeRelative is empty,
+ uriReference is returned unmodified; otherwise, the result of calling
+ XUriReference::getUriReference on the XUriReference returnd by
+ normalizedMakeRelative is returned
+
+ @exception std::bad_alloc if an out-of-memory condition occurs
+
+ @exception com::sun::star::uno::RuntimeException if any error occurs
+
+ @deprecated
+ No code should rely on the default component context.
+*/
+SVL_DLLPUBLIC rtl::OUString simpleNormalizedMakeRelative(
+ rtl::OUString const & baseUriReference, rtl::OUString const & uriReference);
+
+//============================================================================
+SVL_DLLPUBLIC UniString
+FindFirstURLInText(UniString const & rText,
+ xub_StrLen & rBegin,
+ xub_StrLen & rEnd,
+ CharClass const & rCharClass,
+ INetURLObject::EncodeMechanism eMechanism
+ = INetURLObject::WAS_ENCODED,
+ rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
+ INetURLObject::FSysStyle eStyle
+ = INetURLObject::FSYS_DETECT);
+
+//============================================================================
+/** Remove any password component from both absolute and relative URLs.
+
+ @ATT The current implementation will not remove a password from a
+ relative URL that has an authority component (e.g., the password is not
+ removed from the relative ftp URL <//user:password@domain/path>). But
+ since our functions to translate between absolute and relative URLs never
+ produce relative URLs with authority components, this is no real problem.
+
+ @ATT For relative URLs (or anything not recognized as an absolute URI),
+ the current implementation will return the input unmodified, not applying
+ any translations implied by the encode/decode parameters.
+
+ @param rURI An absolute or relative URI reference.
+
+ @param eEncodeMechanism See the general discussion for INetURLObject set-
+ methods.
+
+ @param eDecodeMechanism See the general discussion for INetURLObject get-
+ methods.
+
+ @param eCharset See the general discussion for INetURLObject get- and
+ set-methods.
+
+ @return The input URI with any password component removed.
+ */
+SVL_DLLPUBLIC UniString
+removePassword(UniString const & rURI,
+ INetURLObject::EncodeMechanism eEncodeMechanism
+ = INetURLObject::WAS_ENCODED,
+ INetURLObject::DecodeMechanism eDecodeMechanism
+ = INetURLObject::DECODE_TO_IURI,
+ rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
+
+//============================================================================
+/** Query the notational conventions used in the file system provided by some
+ file content provider.
+
+ @param rFileUrl This file URL determines which file content provider is
+ used to query the desired information. (The UCB's usual mapping from URLs
+ to content providers is used.)
+
+ @param bAddConvenienceStyles If true, the return value contains not only
+ the style bit corresponding to the queried content provider's conventions,
+ but may also contain additional style bits that make using this function
+ more convenient in certain situations. Currently, the effect is that
+ FSYS_UNX is extended with FSYS_VOS, and both FSYS_DOS and FSYS_MAC are
+ extended with FSYS_VOS and FSYS_UNX (i.e., the---unambiguous---detection
+ of VOS style and Unix style file system paths is always enabled); also, in
+ case the content provider's conventions cannot be determined, FSYS_DETECT
+ is returned instead of FSysStyle(0).
+
+ @return The style bit corresponding to the queried content provider's
+ conventions, or FSysStyle(0) if these cannot be determined.
+ */
+SVL_DLLPUBLIC INetURLObject::FSysStyle queryFSysStyle(UniString const & rFileUrl,
+ bool bAddConvenienceStyles = true)
+ throw (com::sun::star::uno::RuntimeException);
+
+}
+
+#endif // SVTOOLS_URIHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/urlbmk.hxx b/svl/inc/svl/urlbmk.hxx
new file mode 100644
index 000000000000..8922dbb4feb9
--- /dev/null
+++ b/svl/inc/svl/urlbmk.hxx
@@ -0,0 +1,71 @@
+/* -*- 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 _URLBMK_HXX
+#define _URLBMK_HXX
+
+
+#include <tools/string.hxx>
+
+//=========================================================================
+
+class INetBookmark
+
+/* [Beschreibung]
+
+ Diese Klasse stellt ein Bookmark dar, welches aus einer URL und
+ einem dazuge"horigen Beschreibungstext besteht.
+
+ Es gibt ein eigenes Clipboardformat und Hilfsmethoden zum Kopieren
+ und Einf"ugen in und aus Clipboard und DragServer.
+*/
+
+{
+ String aUrl;
+ String aDescr;
+
+protected:
+
+ void SetURL( const String& rS ) { aUrl = rS; }
+ void SetDescription( const String& rS ) { aDescr = rS; }
+
+public:
+ INetBookmark( const String &rUrl, const String &rDescr )
+ : aUrl( rUrl ), aDescr( rDescr )
+ {}
+ INetBookmark()
+ {}
+
+ const String& GetURL() const { return aUrl; }
+ const String& GetDescription() const { return aDescr; }
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/visitem.hxx b/svl/inc/svl/visitem.hxx
index b818376a45db..70f3ce994754 100644
--- a/svl/inc/svl/visitem.hxx
+++ b/svl/inc/svl/visitem.hxx
@@ -44,14 +44,14 @@ class SVL_DLLPUBLIC SfxVisibilityItem: public SfxPoolItem
public:
TYPEINFO();
- SfxVisibilityItem(USHORT which = 0, sal_Bool bVisible = sal_True):
+ SfxVisibilityItem(sal_uInt16 which = 0, sal_Bool bVisible = sal_True):
SfxPoolItem(which)
{
m_nValue.bVisible = bVisible;
DBG_CTOR(SfxVisibilityItem, 0);
}
- SfxVisibilityItem(USHORT which, SvStream & rStream);
+ SfxVisibilityItem(sal_uInt16 which, SvStream & rStream);
SfxVisibilityItem(const SfxVisibilityItem & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -71,24 +71,24 @@ public:
const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
- virtual UniString GetValueTextByVal(BOOL bTheValue) const;
+ virtual UniString GetValueTextByVal(sal_Bool bTheValue) const;
- BOOL GetValue() const { return m_nValue.bVisible; }
+ sal_Bool GetValue() const { return m_nValue.bVisible; }
- void SetValue(BOOL bVisible) { m_nValue.bVisible = bVisible; }
+ void SetValue(sal_Bool bVisible) { m_nValue.bVisible = bVisible; }
};
#endif // _SFXVISIBILITYITEM_HXX
diff --git a/svl/inc/svl/whiter.hxx b/svl/inc/svl/whiter.hxx
new file mode 100644
index 000000000000..bb3936eb6961
--- /dev/null
+++ b/svl/inc/svl/whiter.hxx
@@ -0,0 +1,63 @@
+/* -*- 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 _SFX_WHITER_HXX
+#define _SFX_WHITER_HXX
+
+#include "svl/svldllapi.h"
+
+#ifndef INCLUDED_LIMITS_H
+#include <limits.h>
+#define INCLUDED_LIMITS_H
+#endif
+#include <tools/solar.h>
+
+class SfxItemSet;
+
+
+// INCLUDE ---------------------------------------------------------------
+
+class SVL_DLLPUBLIC SfxWhichIter
+{
+ const sal_uInt16 *pRanges, *pStart;
+ sal_uInt16 nOfst, nFrom, nTo;
+
+public:
+ SfxWhichIter( const SfxItemSet& rSet, sal_uInt16 nFrom = 0, sal_uInt16 nTo = USHRT_MAX );
+ ~SfxWhichIter();
+
+ sal_uInt16 GetCurWhich() const { return *pRanges + nOfst; }
+ sal_uInt16 NextWhich();
+ sal_uInt16 PrevWhich();
+
+ sal_uInt16 FirstWhich();
+ sal_uInt16 LastWhich();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/xmlement.hxx b/svl/inc/svl/xmlement.hxx
new file mode 100644
index 000000000000..779bad3f3c55
--- /dev/null
+++ b/svl/inc/svl/xmlement.hxx
@@ -0,0 +1,43 @@
+/* -*- 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 _SVTOOLS_XMLEMENT_HXX
+#define _SVTOOLS_XMLEMENT_HXX
+
+#include <sal/types.h>
+
+struct SvXMLEnumMapEntry
+{
+ const sal_Char *pName;
+ sal_uInt16 nValue;
+};
+
+
+#endif // _SVTOOLS_XMLEMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index a5b516fd8d69..25e06a9237e2 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -237,9 +237,9 @@ class SVL_DLLPUBLIC NfCurrencyEntry
String aSymbol; /// currency symbol
String aBankSymbol; /// currency abbreviation
LanguageType eLanguage; /// language/country value
- USHORT nPositiveFormat; /// position of symbol
- USHORT nNegativeFormat; /// position of symbol and type and position of negative sign
- USHORT nDigits; /// count of decimal digits
+ sal_uInt16 nPositiveFormat; /// position of symbol
+ sal_uInt16 nNegativeFormat; /// position of symbol and type and position of negative sign
+ sal_uInt16 nDigits; /// count of decimal digits
sal_Unicode cZeroChar; /// which character is used for zeros as last decimal digits
/// not implemented, prevent usage
@@ -252,7 +252,7 @@ private:
// nDecimalFormat := 0, 1, 2
// #,##0 or #,##0.00 or #,##0.-- are assigned
SVL_DLLPRIVATE void Impl_BuildFormatStringNumChars( String&,
- const LocaleDataWrapper&, USHORT nDecimalFormat ) const;
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat ) const;
public:
@@ -266,11 +266,11 @@ public:
~NfCurrencyEntry() {}
/// Symbols and language identical
- BOOL operator==( const NfCurrencyEntry& r ) const;
+ sal_Bool operator==( const NfCurrencyEntry& r ) const;
/// Set this format to be the EURo entry, overwrite other settings
void SetEuro();
- BOOL IsEuro() const;
+ sal_Bool IsEuro() const;
/** Apply format information (nPositiveFormat,
nNegativeFormat, nDigits, cZeroChar) of another format. */
@@ -279,43 +279,43 @@ public:
const String& GetSymbol() const { return aSymbol; }
const String& GetBankSymbol() const { return aBankSymbol; }
LanguageType GetLanguage() const { return eLanguage; }
- USHORT GetPositiveFormat() const { return nPositiveFormat; }
- USHORT GetNegativeFormat() const { return nNegativeFormat; }
- USHORT GetDigits() const { return nDigits; }
+ sal_uInt16 GetPositiveFormat() const { return nPositiveFormat; }
+ sal_uInt16 GetNegativeFormat() const { return nNegativeFormat; }
+ sal_uInt16 GetDigits() const { return nDigits; }
sal_Unicode GetZeroChar() const { return cZeroChar; }
- /** [$DM-407] (bBank==FALSE) or [$DEM] (bBank==TRUE)
- is assigned to rStr, if bBank==FALSE and
- bWithoutExtension==TRUE only [$DM] */
- void BuildSymbolString( String& rStr, BOOL bBank,
- BOOL bWithoutExtension = FALSE ) const;
+ /** [$DM-407] (bBank==sal_False) or [$DEM] (bBank==sal_True)
+ is assigned to rStr, if bBank==sal_False and
+ bWithoutExtension==sal_True only [$DM] */
+ void BuildSymbolString( String& rStr, sal_Bool bBank,
+ sal_Bool bWithoutExtension = sal_False ) const;
/** #,##0.00 [$DM-407] is assigned to rStr, separators
from rLoc, incl. minus sign but without [RED] */
- void BuildPositiveFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper&, USHORT nDecimalFormat = 1 ) const;
- void BuildNegativeFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper&, USHORT nDecimalFormat = 1 ) const;
+ void BuildPositiveFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
+ void BuildNegativeFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
- /** [$DM-407] (or [$DEM] if bBank==TRUE)
+ /** [$DM-407] (or [$DEM] if bBank==sal_True)
is appended/prepended to rStr, incl. minus sign */
- void CompletePositiveFormatString( String& rStr, BOOL bBank,
- USHORT nPosiFormat ) const;
- void CompleteNegativeFormatString( String& rStr, BOOL bBank,
- USHORT nNegaFormat ) const;
+ void CompletePositiveFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nPosiFormat ) const;
+ void CompleteNegativeFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nNegaFormat ) const;
/// rSymStr is appended/prepended to rStr, incl. minus sign
static void CompletePositiveFormatString( String& rStr,
- const String& rSymStr, USHORT nPosiFormat );
+ const String& rSymStr, sal_uInt16 nPosiFormat );
static void CompleteNegativeFormatString( String& rStr,
- const String& rSymStr, USHORT nNegaFormat );
+ const String& rSymStr, sal_uInt16 nNegaFormat );
/** Representation of a currency (symbol position and
negative sign) in other language settings */
- static USHORT GetEffectivePositiveFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank );
- static USHORT GetEffectiveNegativeFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank );
+ static sal_uInt16 GetEffectivePositiveFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank );
+ static sal_uInt16 GetEffectiveNegativeFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank );
/// General Unicode Euro symbol
static inline sal_Unicode GetEuroSymbol() { return sal_Unicode(0x20AC); }
@@ -361,23 +361,23 @@ public:
/// Set CallBack to ColorTable
void SetColorLink( const Link& rColorTableCallBack ) { aColorLink = rColorTableCallBack; }
/// Do the CallBack to ColorTable
- Color* GetUserDefColor(USHORT nIndex);
+ Color* GetUserDefColor(sal_uInt16 nIndex);
/// Change language/country, also input and format scanner
void ChangeIntl( LanguageType eLnge );
/// Change the reference null date
- void ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear);
+ void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear);
/// Change standard precision
void ChangeStandardPrec(short nPrec);
/// Set zero value suppression
- void SetNoZero(BOOL bNZ) { bNoZero = bNZ; }
+ void SetNoZero(sal_Bool bNZ) { bNoZero = bNZ; }
/** The language with which the formatter was initialized (system setting),
NOT the current language after a ChangeIntl() */
LanguageType GetLanguage() const { return IniLnge; }
// Determine whether two format types are input compatible or not
- BOOL IsCompatible(short eOldType, short eNewType);
+ sal_Bool IsCompatible(short eOldType, short eNewType);
/** Get table of formats of a specific type of a locale. A format FIndex is
tested whether it has the type and locale requested, if it doesn't
@@ -416,7 +416,7 @@ public:
nType contains the type of the format.
nKey contains the index key of the format.
*/
- BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
+ sal_Bool PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
LanguageType eLnge = LANGUAGE_DONTKNOW );
bool PutEntry( rtl::OUString& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
@@ -425,7 +425,7 @@ public:
/** Same as <method>PutEntry</method> but the format code string is
considered to be of language/country eLnge and is converted to
language/country eNewLnge */
- BOOL PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
+ sal_Bool PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
@@ -433,7 +433,7 @@ public:
is considered to be of the System language/country eLnge and is
converted to another System language/country eNewLnge. In this case
the automatic currency is converted too. */
- BOOL PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
+ sal_Bool PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
@@ -471,20 +471,20 @@ public:
was empty, could not be converted or has errors, the eLnge locale's
standard number format is chosen instead. The index key is
guaranteed to represent some valid number format. If
- rNewInserted==FALSE and rCheckPos>0 the format code has errors
+ rNewInserted==sal_False and rCheckPos>0 the format code has errors
and/or could not be converted.
*/
sal_uInt32 GetIndexPuttingAndConverting( String & rString, LanguageType eLnge,
LanguageType eSysLnge, short & rType,
- BOOL & rNewInserted,
+ sal_Bool & rNewInserted,
xub_StrLen & rCheckPos );
/** Create a format code string using format nIndex as a template and
applying other settings (passed from the dialog) */
void GenerateFormat( String& sString, sal_uInt32 nIndex,
LanguageType eLnge = LANGUAGE_DONTKNOW,
- BOOL bThousand = FALSE, BOOL IsRed = FALSE,
- USHORT nPrecision = 0, USHORT nAnzLeading = 1 );
+ sal_Bool bThousand = sal_False, sal_Bool IsRed = sal_False,
+ sal_uInt16 nPrecision = 0, sal_uInt16 nAnzLeading = 1 );
/** Analyze an input string
@return
@@ -493,7 +493,7 @@ public:
returned in fOutNumber
<FALSE/> if input is not a number
*/
- BOOL IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
+ sal_Bool IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
/// Format a number according to a format index, return string and color
void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex,
@@ -515,13 +515,13 @@ public:
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
- BOOL GetPreviewString( const String& sFormatString, double fPreviewNumber,
+ sal_Bool GetPreviewString( const String& sFormatString, double fPreviewNumber,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Same as <method>GetPreviewString</method> but the format code string
may be either language/country eLnge or en_US english US */
- BOOL GetPreviewStringGuess( const String& sFormatString, double fPreviewNumber,
+ sal_Bool GetPreviewStringGuess( const String& sFormatString, double fPreviewNumber,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -530,7 +530,7 @@ public:
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
- BOOL GetPreviewString( const String& sFormatString, const String& sPreviewString,
+ sal_Bool GetPreviewString( const String& sFormatString, const String& sPreviewString,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -542,14 +542,14 @@ public:
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Whether format index nFIndex is of type text or not
- BOOL IsTextFormat(sal_uInt32 nFIndex) const;
+ sal_Bool IsTextFormat(sal_uInt32 nFIndex) const;
/// Whether the 4th string subcode of format index nFIndex is present
- BOOL HasTextFormat(sal_uInt32 nFIndex) const;
+ sal_Bool HasTextFormat(sal_uInt32 nFIndex) const;
/// Load all formats from a stream
- BOOL Load( SvStream& rStream );
+ sal_Bool Load( SvStream& rStream );
/// Save all formats to a stream
- BOOL Save( SvStream& rStream ) const;
+ sal_Bool Save( SvStream& rStream ) const;
/// Reset of "Used" flags
void PrepareSave();
@@ -557,11 +557,11 @@ public:
void SetFormatUsed(sal_uInt32 nFIndex);
/// Get additional info of a format index, e.g. for dialog box
- void GetFormatSpecialInfo(sal_uInt32 nFormat, BOOL& bThousand, BOOL& IsRed,
- USHORT& nPrecision, USHORT& nAnzLeading);
+ void GetFormatSpecialInfo(sal_uInt32 nFormat, sal_Bool& bThousand, sal_Bool& IsRed,
+ sal_uInt16& nPrecision, sal_uInt16& nAnzLeading);
/// Count of decimals
- USHORT GetFormatPrecision( sal_uInt32 nFormat ) const;
+ sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat ) const;
/** Get additional info of a format code string, e.g. for dialog box.
Uses a temporary parse, if possible use only if format code is not
@@ -570,12 +570,12 @@ public:
0 if format code string parsed without errors, otherwise error
position (like nCheckPos on <method>PutEntry</method>)
*/
- sal_uInt32 GetFormatSpecialInfo( const String&, BOOL& bThousand, BOOL& IsRed,
- USHORT& nPrecision, USHORT& nAnzLeading,
+ sal_uInt32 GetFormatSpecialInfo( const String&, sal_Bool& bThousand, sal_Bool& IsRed,
+ sal_uInt16& nPrecision, sal_uInt16& nAnzLeading,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Check if format code string may be deleted by user
- BOOL IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
+ sal_Bool IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Return the format index of the format code string for language/country,
or NUMBERFORMAT_ENTRY_NOT_FOUND */
@@ -603,14 +603,14 @@ public:
LanguageType eLnge );
/// Whether nFIndex is a special builtin format
- BOOL IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
+ sal_Bool IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
/// Return the reference date
Date* GetNullDate();
/// Return the standard decimal precision
sal_uInt16 GetStandardPrec();
/// Return whether zero suppression is switched on
- BOOL GetNoZero() { return bNoZero; }
+ sal_Bool GetNoZero() { return bNoZero; }
/** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry),
but with NUMBERFORMAT_DEFINED masked out */
short GetType(sal_uInt32 nFIndex);
@@ -621,7 +621,7 @@ public:
SvNumberFormatterIndexTable* MergeFormatter(SvNumberFormatter& rNewTable);
/// Whether a merge table is present or not
- inline BOOL HasMergeFmtTbl() const;
+ inline sal_Bool HasMergeFmtTbl() const;
/// Return the new format index for an old format index, if a merge table exists
inline sal_uInt32 GetMergeFmtIndex( sal_uInt32 nOldFmt ) const;
@@ -631,7 +631,7 @@ public:
SvNumberFormatterMergeMap ConvertMergeTableToMap();
/// Return the last used position ever of a language/country combination
- USHORT GetLastInsertKey(sal_uInt32 CLOffset);
+ sal_uInt16 GetLastInsertKey(sal_uInt32 CLOffset);
/** Return the format index of a builtin format for a specific language/country.
If nFormat is not a builtin format nFormat is returned. */
@@ -664,12 +664,12 @@ public:
The name Year2000 is kept although the actual functionality is now a
TwoDigitYearStart which might be in any century.
*/
- void SetYear2000( USHORT nVal );
- USHORT GetYear2000() const;
- static USHORT GetYear2000Default();
+ void SetYear2000( sal_uInt16 nVal );
+ sal_uInt16 GetYear2000() const;
+ static sal_uInt16 GetYear2000Default();
- USHORT ExpandTwoDigitYear( USHORT nYear ) const;
- inline static USHORT ExpandTwoDigitYear( USHORT nYear, USHORT nTwoDigitYearStart );
+ sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear ) const;
+ inline static sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart );
/// DEPRICATED: Return first character of the decimal separator of the current language/country
sal_Unicode GetDecSep() const { return GetNumDecimalSep().GetChar(0); }
@@ -734,16 +734,16 @@ public:
@return
position of default format
*/
- USHORT GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
- BOOL bBank ) const;
+ sal_uInt16 GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
+ sal_Bool bBank ) const;
/** Whether nFormat is of type NUMBERFORMAT_CURRENCY and the format code
contains a new SYMBOLTYPE_CURRENCY and if so which one [$xxx-nnn].
If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is
returned, even if the format code only contains [$xxx] !
*/
- BOOL GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
- const NfCurrencyEntry** ppEntry = NULL, BOOL* pBank = NULL ) const;
+ sal_Bool GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
+ const NfCurrencyEntry** ppEntry = NULL, sal_Bool* pBank = NULL ) const;
/** Look up the corresponding <type>NfCurrencyEntry</type> matching
rSymbol (may be CurrencySymbol or CurrencyAbbreviation) and possibly
@@ -781,9 +781,9 @@ public:
The matching entry if unique (in which case bFoundBank is set),
else <NULL/>.
*/
- static const NfCurrencyEntry* GetCurrencyEntry( BOOL & bFoundBank,
+ static const NfCurrencyEntry* GetCurrencyEntry( sal_Bool & bFoundBank,
const String& rSymbol, const String& rExtension,
- LanguageType eFormatLanguage, BOOL bOnlyStringLanguage = FALSE );
+ LanguageType eFormatLanguage, sal_Bool bOnlyStringLanguage = sal_False );
/// Get compatibility ("automatic" old style) currency from I18N locale data
void GetCompatibilityCurrency( String& rSymbol, String& rAbbrev ) const;
@@ -796,7 +796,7 @@ public:
/** Return a keyword for a language/country and <type>NfKeywordIndex</type>
for XML import, to generate number format strings. */
- String GetKeyword( LanguageType eLnge, USHORT nIndex );
+ String GetKeyword( LanguageType eLnge, sal_uInt16 nIndex );
/** Return the GENERAL keyword in proper case ("General") for a
language/country, used in XML import */
@@ -826,7 +826,7 @@ private:
LanguageType IniLnge; // Initialized setting language/country
LanguageType ActLnge; // Current setting language/country
NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation
- BOOL bNoZero; // Zero value suppression
+ sal_Bool bNoZero; // Zero value suppression
// cached locale data items needed almost any time
String aDecimalSep;
@@ -835,8 +835,8 @@ private:
#ifdef _ZFORLIST_CXX // ----- private Methoden -----
- SVL_DLLPRIVATE static BOOL bCurrencyTableInitialized;
- SVL_DLLPRIVATE static USHORT nSystemCurrencyPosition;
+ SVL_DLLPRIVATE static sal_Bool bCurrencyTableInitialized;
+ SVL_DLLPRIVATE static sal_uInt16 nSystemCurrencyPosition;
SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl* pFormatterRegistry;
// get the registry, create one if none exists
@@ -847,29 +847,29 @@ private:
// Changes initialized language/country, clears the entries and generates
// new ones, may ONLY be called by the binary file format load
- SVL_DLLPRIVATE void ImpChangeSysCL( LanguageType eLnge, BOOL bLoadingSO5 );
+ SVL_DLLPRIVATE void ImpChangeSysCL( LanguageType eLnge, sal_Bool bLoadingSO5 );
// Generate builtin formats provided by i18n behind CLOffset,
- // if bLoadingSO5==FALSE also generate additional i18n formats.
- SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 );
+ // if bLoadingSO5==sal_False also generate additional i18n formats.
+ SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadingSO5 );
// Generate additional formats provided by i18n
SVL_DLLPRIVATE void ImpGenerateAdditionalFormats(
sal_uInt32 CLOffset,
NumberFormatCodeWrapper& rNumberFormatCode,
- BOOL bAfterLoadingSO5 );
+ sal_Bool bAfterLoadingSO5 );
SVL_DLLPRIVATE SvNumberformat* ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
sal_uInt32 nPos,
- BOOL bAfterLoadingSO5 = FALSE,
+ sal_Bool bAfterLoadingSO5 = sal_False,
sal_Int16 nOrgIndex = 0 );
// ImpInsertNewStandardFormat for new (since version ...) builtin formats
SVL_DLLPRIVATE SvNumberformat* ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
sal_uInt32 nPos,
- USHORT nVersion,
- BOOL bAfterLoadingSO5 = FALSE,
+ sal_uInt16 nVersion,
+ sal_Bool bAfterLoadingSO5 = sal_False,
sal_Int16 nOrgIndex = 0 );
// Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country
@@ -882,7 +882,7 @@ private:
LanguageType eLnge );
// Create builtin formats for language/country if necessary, return CLOffset
- SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 = FALSE );
+ SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, sal_Bool bLoadingSO5 = sal_False );
// Build negative currency format, old compatibility style
SVL_DLLPRIVATE void ImpGetNegCurrFormat( String& sNegStr, const String& rCurrSymbol );
@@ -919,16 +919,16 @@ private:
// FormatElement group.
SVL_DLLPRIVATE sal_Int32 ImpAdjustFormatCodeDefault(
::com::sun::star::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCount, BOOL bCheckCorrectness = TRUE
+ sal_Int32 nCount, sal_Bool bCheckCorrectness = sal_True
);
// used as a loop body inside of GetNewCurrencySymbolString() and GetCurrencyEntry()
#ifndef DBG_UTIL
inline
#endif
- static BOOL ImpLookupCurrencyEntryLoopBody(
- const NfCurrencyEntry*& pFoundEntry, BOOL& bFoundBank,
- const NfCurrencyEntry* pData, USHORT nPos, const String& rSymbol );
+ static sal_Bool ImpLookupCurrencyEntryLoopBody(
+ const NfCurrencyEntry*& pFoundEntry, sal_Bool& bFoundBank,
+ const NfCurrencyEntry* pData, sal_uInt16 nPos, const String& rSymbol );
// link to be set at <method>SvtSysLocaleOptions::SetCurrencyChangeLink()</method>
DECL_DLLPRIVATE_STATIC_LINK( SvNumberFormatter, CurrencyChangeLink, void* );
@@ -1011,15 +1011,15 @@ inline sal_uInt32 SvNumberFormatter::GetMergeFmtIndex( sal_uInt32 nOldFmt ) cons
return pU ? *pU : nOldFmt;
}
-inline BOOL SvNumberFormatter::HasMergeFmtTbl() const
+inline sal_Bool SvNumberFormatter::HasMergeFmtTbl() const
{
return pMergeTable && (0 != pMergeTable->Count());
}
// static
-inline USHORT SvNumberFormatter::ExpandTwoDigitYear(
- USHORT nYear, USHORT nTwoDigitYearStart )
+inline sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear(
+ sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart )
{
if ( nYear < 100 )
{
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx
index a4222a4757c9..aa84528b96d5 100644
--- a/svl/inc/svl/zformat.hxx
+++ b/svl/inc/svl/zformat.hxx
@@ -79,16 +79,16 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo
{
String* sStrArray; // Array of symbols
short* nTypeArray; // Array of infos
- USHORT nThousand; // Count of group separator sequences
- USHORT nCntPre; // Count of digits before decimal point
- USHORT nCntPost; // Count of digits after decimal point
- USHORT nCntExp; // Count of exponent digits, or AM/PM
+ sal_uInt16 nThousand; // Count of group separator sequences
+ sal_uInt16 nCntPre; // Count of digits before decimal point
+ sal_uInt16 nCntPost; // Count of digits after decimal point
+ sal_uInt16 nCntExp; // Count of exponent digits, or AM/PM
short eScannedType; // Type determined by scan
- BOOL bThousand; // Has group (AKA thousand) separator
+ sal_Bool bThousand; // Has group (AKA thousand) separator
- void Copy( const ImpSvNumberformatInfo& rNumFor, USHORT nAnz );
- void Load(SvStream& rStream, USHORT nAnz);
- void Save(SvStream& rStream, USHORT nAnz) const;
+ void Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz );
+ void Load(SvStream& rStream, sal_uInt16 nAnz);
+ void Save(SvStream& rStream, sal_uInt16 nAnz) const;
};
// NativeNumber, represent numbers using CJK or other digits if nNum>0,
@@ -96,32 +96,32 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo
class SvNumberNatNum
{
LanguageType eLang;
- BYTE nNum;
- BOOL bDBNum :1; // DBNum, to be converted to NatNum
- BOOL bDate :1; // Used in date? (needed for DBNum/NatNum mapping)
- BOOL bSet :1; // If set, since NatNum0 is possible
+ sal_uInt8 nNum;
+ sal_Bool bDBNum :1; // DBNum, to be converted to NatNum
+ sal_Bool bDate :1; // Used in date? (needed for DBNum/NatNum mapping)
+ sal_Bool bSet :1; // If set, since NatNum0 is possible
public:
- static BYTE MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDate );
- static BYTE MapNatNumToDBNum( BYTE nNatNum, LanguageType eLang, BOOL bDate );
+ static sal_uInt8 MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, sal_Bool bDate );
+ static sal_uInt8 MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, sal_Bool bDate );
SvNumberNatNum() : eLang( LANGUAGE_DONTKNOW ), nNum(0),
bDBNum(0), bDate(0), bSet(0) {}
- BOOL IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
- BYTE GetRawNum() const { return nNum; }
- BYTE GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
- BYTE GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
+ sal_Bool IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
+ sal_uInt8 GetRawNum() const { return nNum; }
+ sal_uInt8 GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
+ sal_uInt8 GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
LanguageType GetLang() const { return eLang; }
void SetLang( LanguageType e ) { eLang = e; }
- void SetNum( BYTE nNumber, BOOL bDBNumber )
+ void SetNum( sal_uInt8 nNumber, sal_Bool bDBNumber )
{
nNum = nNumber;
bDBNum = bDBNumber;
- bSet = TRUE;
+ bSet = sal_True;
}
- BOOL IsSet() const { return bSet; }
- void SetDate( BOOL bDateP ) { bDate = (bDateP != 0); }
+ sal_Bool IsSet() const { return bSet; }
+ void SetDate( sal_Bool bDateP ) { bDate = (bDateP != 0); }
};
class CharClass;
@@ -132,7 +132,7 @@ public:
ImpSvNumFor(); // Ctor without filling the Info
~ImpSvNumFor();
- void Enlarge(USHORT nAnz); // Init of arrays to the right size
+ void Enlarge(sal_uInt16 nAnz); // Init of arrays to the right size
void Load( SvStream& rStream, ImpSvNumberformatScan& rSc,
String& rLoadedColorName);
void Save( SvStream& rStream ) const;
@@ -145,7 +145,7 @@ public:
const ImpSvNumberformatInfo& Info() const { return aI; }
// Get count of substrings (symbols)
- USHORT GetCount() const { return nAnzStrings;}
+ sal_uInt16 GetCount() const { return nAnzStrings;}
Color* GetColor() const { return pColor; }
void SetColor( Color* pCol, String& rName )
@@ -153,22 +153,22 @@ public:
const String& GetColorName() const { return sColorName; }
// new SYMBOLTYPE_CURRENCY in subformat?
- BOOL HasNewCurrency() const;
- BOOL GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
+ sal_Bool HasNewCurrency() const;
+ sal_Bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
void SaveNewCurrencyMap( SvStream& rStream ) const;
void LoadNewCurrencyMap( SvStream& rStream );
// [NatNum1], [NatNum2], ...
- void SetNatNumNum( BYTE nNum, BOOL bDBNum ) { aNatNum.SetNum( nNum, bDBNum ); }
+ void SetNatNumNum( sal_uInt8 nNum, sal_Bool bDBNum ) { aNatNum.SetNum( nNum, bDBNum ); }
void SetNatNumLang( LanguageType eLang ) { aNatNum.SetLang( eLang ); }
- void SetNatNumDate( BOOL bDate ) { aNatNum.SetDate( bDate ); }
+ void SetNatNumDate( sal_Bool bDate ) { aNatNum.SetDate( bDate ); }
const SvNumberNatNum& GetNatNum() const { return aNatNum; }
private:
ImpSvNumberformatInfo aI; // Hilfsstruct fuer die restlichen Infos
String sColorName; // color name
Color* pColor; // pointer to color of subformat
- USHORT nAnzStrings; // count of symbols
+ sal_uInt16 nAnzStrings; // count of symbols
SvNumberNatNum aNatNum; // DoubleByteNumber
};
@@ -197,7 +197,7 @@ public:
ImpSvNumberInputScan* pISc,
xub_StrLen& nCheckPos,
LanguageType& eLan,
- BOOL bStand = FALSE );
+ sal_Bool bStand = sal_False );
// Copy ctor
SvNumberformat( SvNumberformat& rFormat );
@@ -215,16 +215,16 @@ public:
void SetType(const short eSetType) { eType = eSetType; }
// Standard means the I18N defined standard format of this type
- void SetStandard() { bStandard = TRUE; }
- BOOL IsStandard() const { return bStandard; }
+ void SetStandard() { bStandard = sal_True; }
+ sal_Bool IsStandard() const { return bStandard; }
// For versions before version nVer it is UserDefined, for newer versions
// it is builtin. nVer of SV_NUMBERFORMATTER_VERSION_...
- void SetNewStandardDefined( USHORT nVer )
+ void SetNewStandardDefined( sal_uInt16 nVer )
{ nNewStandardDefined = nVer; eType |= NUMBERFORMAT_DEFINED; }
- USHORT GetNewStandardDefined() const { return nNewStandardDefined; }
- BOOL IsAdditionalStandardDefined() const
+ sal_uInt16 GetNewStandardDefined() const { return nNewStandardDefined; }
+ sal_Bool IsAdditionalStandardDefined() const
{ return nNewStandardDefined == SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS; }
LanguageType GetLanguage() const { return maLocale.meLanguage;}
@@ -234,12 +234,12 @@ public:
// Build a format string of application defined keywords
String GetMappedFormatstring( const NfKeywordTable& rKeywords,
const LocaleDataWrapper& rLoc,
- BOOL bDontQuote = FALSE ) const;
+ sal_Bool bDontQuote = sal_False ) const;
- void SetUsed(const BOOL b) { bIsUsed = b; }
- BOOL GetUsed() const { return bIsUsed; }
- BOOL IsStarFormatSupported() const { return bStarFlag; }
- void SetStarFormatSupport( BOOL b ) { bStarFlag = b; }
+ void SetUsed(const sal_Bool b) { bIsUsed = b; }
+ sal_Bool GetUsed() const { return bIsUsed; }
+ sal_Bool IsStarFormatSupported() const { return bStarFlag; }
+ void SetStarFormatSupport( sal_Bool b ) { bStarFlag = b; }
NfHackConversion Load( SvStream& rStream, ImpSvNumMultipleReadHeader& rHdr,
SvNumberFormatter* pConverter, ImpSvNumberInputScan& rISc );
@@ -255,54 +255,54 @@ public:
*/
bool GetOutputString( double fNumber, sal_uInt16 nCharCount, String& rOutString ) const;
- BOOL GetOutputString( double fNumber, String& OutString, Color** ppColor );
- BOOL GetOutputString( String& sString, String& OutString, Color** ppColor );
+ sal_Bool GetOutputString( double fNumber, String& OutString, Color** ppColor );
+ sal_Bool GetOutputString( String& sString, String& OutString, Color** ppColor );
// True if type text
- BOOL IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
+ sal_Bool IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
// True if 4th subformat present
- BOOL HasTextFormat() const
+ sal_Bool HasTextFormat() const
{
return (NumFor[3].GetCount() > 0) ||
(NumFor[3].Info().eScannedType == NUMBERFORMAT_TEXT);
}
- void GetFormatSpecialInfo(BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading) const;
+ void GetFormatSpecialInfo(sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading) const;
/// Count of decimal precision
- USHORT GetFormatPrecision() const { return NumFor[0].Info().nCntPost; }
+ sal_uInt16 GetFormatPrecision() const { return NumFor[0].Info().nCntPost; }
- //! Read/write access on a special USHORT component, may only be used on the
+ //! Read/write access on a special sal_uInt16 component, may only be used on the
//! standard format 0, 5000, ... and only by the number formatter!
- USHORT GetLastInsertKey() const
+ sal_uInt16 GetLastInsertKey() const
{ return NumFor[0].Info().nThousand; }
- void SetLastInsertKey(USHORT nKey)
+ void SetLastInsertKey(sal_uInt16 nKey)
{ NumFor[0].Info().nThousand = nKey; }
//! Only onLoad: convert from stored to current system language/country
void ConvertLanguage( SvNumberFormatter& rConverter,
- LanguageType eConvertFrom, LanguageType eConvertTo, BOOL bSystem = FALSE );
+ LanguageType eConvertFrom, LanguageType eConvertTo, sal_Bool bSystem = sal_False );
// Substring of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==TRUE: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- const String* GetNumForString( USHORT nNumFor, USHORT nPos,
- BOOL bString = FALSE ) const;
+ // bString==sal_True: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
+ const String* GetNumForString( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString = sal_False ) const;
// Subtype of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==TRUE: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- short GetNumForType( USHORT nNumFor, USHORT nPos, BOOL bString = FALSE ) const;
+ // bString==sal_True: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
+ short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, sal_Bool bString = sal_False ) const;
/** If the count of string elements (substrings, ignoring [modifiers] and
so on) in a subformat code nNumFor (0..3) is equal to the given number.
Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
format. */
- BOOL IsNumForStringElementCountEqual( USHORT nNumFor, USHORT nAllCount,
- USHORT nNumCount ) const
+ sal_Bool IsNumForStringElementCountEqual( sal_uInt16 nNumFor, sal_uInt16 nAllCount,
+ sal_uInt16 nNumCount ) const
{
if ( nNumFor < 4 )
{
@@ -311,19 +311,19 @@ public:
// strings of the format were matched and not just the starting
// sequence, so we don't have to check if GetnAnz() includes
// [modifiers] or anything else if both counts are equal.
- USHORT nCnt = NumFor[nNumFor].GetCount();
+ sal_uInt16 nCnt = NumFor[nNumFor].GetCount();
if ( nAllCount == nCnt )
- return TRUE;
+ return sal_True;
if ( nAllCount < nCnt ) // check ignoring [modifiers] and so on
return ImpGetNumForStringElementCount( nNumFor ) ==
(nAllCount - nNumCount);
}
- return FALSE;
+ return sal_False;
}
// Whether the second subformat code is really for negative numbers
// or another limit set.
- BOOL IsNegativeRealNegative() const
+ sal_Bool IsNegativeRealNegative() const
{
return fLimit1 == 0.0 && fLimit2 == 0.0 &&
( (eOp1 == NUMBERFORMAT_OP_GE && eOp2 == NUMBERFORMAT_OP_NO) ||
@@ -332,41 +332,41 @@ public:
}
// Whether the negative format is without a sign or not
- BOOL IsNegativeWithoutSign() const;
+ sal_Bool IsNegativeWithoutSign() const;
- BOOL IsNegativeInBracket() const;
+ sal_Bool IsNegativeInBracket() const;
- BOOL HasPositiveBracketPlaceholder() const;
+ sal_Bool HasPositiveBracketPlaceholder() const;
// Whether a new SYMBOLTYPE_CURRENCY is contained in the format
- BOOL HasNewCurrency() const;
+ sal_Bool HasNewCurrency() const;
// Build string from NewCurrency for saving it SO50 compatible
void Build50Formatstring( String& rStr ) const;
// strip [$-yyy] from all [$xxx-yyy] leaving only xxx's,
- // if bQuoteSymbol==TRUE the xxx will become "xxx"
+ // if bQuoteSymbol==sal_True the xxx will become "xxx"
static String StripNewCurrencyDelimiters( const String& rStr,
- BOOL bQuoteSymbol );
+ sal_Bool bQuoteSymbol );
// If a new SYMBOLTYPE_CURRENCY is contained if the format is of type
// NUMBERFORMAT_CURRENCY, and if so the symbol xxx and the extension nnn
// of [$xxx-nnn] are returned
- BOOL GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
+ sal_Bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
- static BOOL HasStringNegativeSign( const String& rStr );
+ static sal_Bool HasStringNegativeSign( const String& rStr );
/**
Whether a character at position nPos is somewhere between two matching
cQuote or not.
- If nPos points to a cQuote, a TRUE is returned on an opening cQuote,
- a FALSE is returned on a closing cQuote.
+ If nPos points to a cQuote, a sal_True is returned on an opening cQuote,
+ a sal_False is returned on a closing cQuote.
A cQuote between quotes may be escaped by a cEscIn, a cQuote outside of
quotes may be escaped by a cEscOut.
The default '\0' results in no escapement possible.
Defaults are set right according to the "unlogic" of the Numberformatter
*/
- static BOOL IsInQuote( const String& rString, xub_StrLen nPos,
+ static sal_Bool IsInQuote( const String& rString, xub_StrLen nPos,
sal_Unicode cQuote = '"',
sal_Unicode cEscIn = '\0', sal_Unicode cEscOut = '\\' );
@@ -418,23 +418,23 @@ public:
// used in XML export
void GetConditions( SvNumberformatLimitOps& rOper1, double& rVal1,
SvNumberformatLimitOps& rOper2, double& rVal2 ) const;
- Color* GetColor( USHORT nNumFor ) const;
- void GetNumForInfo( USHORT nNumFor, short& rScannedType,
- BOOL& bThousand, USHORT& nPrecision, USHORT& nAnzLeading ) const;
+ Color* GetColor( sal_uInt16 nNumFor ) const;
+ void GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,
+ sal_Bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nAnzLeading ) const;
// rAttr.Number not empty if NatNum attributes are to be stored
void GetNatNumXml(
::com::sun::star::i18n::NativeNumberXmlAttributes& rAttr,
- USHORT nNumFor ) const;
+ sal_uInt16 nNumFor ) const;
/** @returns <TRUE/> if E,EE,R,RR,AAA,AAAA in format code of subformat
nNumFor (0..3) and <b>no</b> preceding calendar was specified and the
currently loaded calendar is "gregorian". */
- BOOL IsOtherCalendar( USHORT nNumFor ) const
+ sal_Bool IsOtherCalendar( sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpIsOtherCalendar( NumFor[nNumFor] );
- return FALSE;
+ return sal_False;
}
/** Switches to the first non-"gregorian" calendar, but only if the current
@@ -456,13 +456,13 @@ public:
<TRUE/> if a calendar was specified and switched to,
<FALSE/> else.
*/
- BOOL SwitchToSpecifiedCalendar( String& rOrgCalendar, double& fOrgDateTime,
- USHORT nNumFor ) const
+ sal_Bool SwitchToSpecifiedCalendar( String& rOrgCalendar, double& fOrgDateTime,
+ sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpSwitchToSpecifiedCalendar( rOrgCalendar,
fOrgDateTime, NumFor[nNumFor] );
- return FALSE;
+ return sal_False;
}
private:
@@ -475,17 +475,17 @@ private:
LocaleType maLocale; // Language/country of the format, numeral shape and calendar type from Excel.
SvNumberformatLimitOps eOp1; // Operator for first condition
SvNumberformatLimitOps eOp2; // Operator for second condition
- USHORT nNewStandardDefined; // new builtin formats as of version 6
+ sal_uInt16 nNewStandardDefined; // new builtin formats as of version 6
short eType; // Type of format
- BOOL bStarFlag; // Take *n format as ESC n
- BOOL bStandard; // If this is a default standard format
- BOOL bIsUsed; // Flag as used for storing
+ sal_Bool bStarFlag; // Take *n format as ESC n
+ sal_Bool bStandard; // If this is a default standard format
+ sal_Bool bIsUsed; // Flag as used for storing
- SVL_DLLPRIVATE USHORT ImpGetNumForStringElementCount( USHORT nNumFor ) const;
+ SVL_DLLPRIVATE sal_uInt16 ImpGetNumForStringElementCount( sal_uInt16 nNumFor ) const;
- SVL_DLLPRIVATE BOOL ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const;
+ SVL_DLLPRIVATE sal_Bool ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const;
- SVL_DLLPRIVATE BOOL ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
+ SVL_DLLPRIVATE sal_Bool ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
double& fOrgDateTime, const ImpSvNumFor& rNumFor ) const;
#ifdef _ZFORMAT_CXX // ----- private implementation methods -----
@@ -542,25 +542,25 @@ private:
double& fLimit,
SvNumberformatLimitOps eOp);
- SVL_DLLPRIVATE ULONG ImpGGT(ULONG x, ULONG y);
- SVL_DLLPRIVATE ULONG ImpGGTRound(ULONG x, ULONG y);
+ SVL_DLLPRIVATE sal_uLong ImpGGT(sal_uLong x, sal_uLong y);
+ SVL_DLLPRIVATE sal_uLong ImpGGTRound(sal_uLong x, sal_uLong y);
// Helper function for number strings
// append string symbols, insert leading 0 or ' ', or ...
- SVL_DLLPRIVATE BOOL ImpNumberFill( String& sStr,
+ SVL_DLLPRIVATE sal_Bool ImpNumberFill( String& sStr,
double& rNumber,
xub_StrLen& k,
- USHORT& j,
- USHORT nIx,
+ sal_uInt16& j,
+ sal_uInt16 nIx,
short eSymbolType );
// Helper function to fill in the integer part and the group (AKA thousand) separators
- SVL_DLLPRIVATE BOOL ImpNumberFillWithThousands( String& sStr,
+ SVL_DLLPRIVATE sal_Bool ImpNumberFillWithThousands( String& sStr,
double& rNumber,
xub_StrLen k,
- USHORT j,
- USHORT nIx,
- USHORT nDigCnt );
+ sal_uInt16 j,
+ sal_uInt16 nIx,
+ sal_uInt16 nDigCnt );
// Hilfsfunktion zum Auffuellen der Vor-
// kommazahl auch mit Tausenderpunkt
@@ -569,18 +569,18 @@ private:
SVL_DLLPRIVATE void ImpDigitFill( String& sStr,
xub_StrLen nStart,
xub_StrLen& k,
- USHORT nIx,
+ sal_uInt16 nIx,
xub_StrLen & nDigitCount,
utl::DigitGroupingIterator & );
- SVL_DLLPRIVATE BOOL ImpGetDateOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetDateOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
- SVL_DLLPRIVATE BOOL ImpGetTimeOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetTimeOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
- SVL_DLLPRIVATE BOOL ImpGetDateTimeOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetDateTimeOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
// Switches to the "gregorian" calendar if the current calendar is
@@ -588,7 +588,7 @@ private:
// know a "before" era (like zh_TW ROC or ja_JP Gengou). If switched and
// rOrgCalendar was "gregorian" the string is emptied. If rOrgCalendar was
// empty the previous calendar name and date/time are returned.
- SVL_DLLPRIVATE BOOL ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime );
+ SVL_DLLPRIVATE sal_Bool ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime );
// Append a "G" short era string of the given calendar. In the case of a
// Gengou calendar this is a one character abbreviation, for other
@@ -596,8 +596,8 @@ private:
SVL_DLLPRIVATE static void ImpAppendEraG( String& OutString, const CalendarWrapper& rCal,
sal_Int16 nNatNum );
- SVL_DLLPRIVATE BOOL ImpGetNumberOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetNumberOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
SVL_DLLPRIVATE void ImpCopyNumberformat( const SvNumberformat& rFormat );
@@ -605,9 +605,9 @@ private:
// normal digits or other digits, depending on ImpSvNumFor.aNatNum,
// [NatNum1], [NatNum2], ...
SVL_DLLPRIVATE String ImpGetNatNumString( const SvNumberNatNum& rNum, sal_Int32 nVal,
- USHORT nMinDigits = 0 ) const;
+ sal_uInt16 nMinDigits = 0 ) const;
- String ImpIntToString( USHORT nIx, sal_Int32 nVal, USHORT nMinDigits = 0 ) const
+ String ImpIntToString( sal_uInt16 nIx, sal_Int32 nVal, sal_uInt16 nMinDigits = 0 ) const
{
const SvNumberNatNum& rNum = NumFor[nIx].GetNatNum();
if ( nMinDigits || rNum.IsComplete() )