summaryrefslogtreecommitdiff
path: root/toolkit/source/awt
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 /toolkit/source/awt
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 'toolkit/source/awt')
-rwxr-xr-xtoolkit/source/awt/animatedimagespeer.cxx538
-rw-r--r--toolkit/source/awt/asynccallback.cxx7
-rw-r--r--toolkit/source/awt/makefile.mk84
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx12
-rw-r--r--toolkit/source/awt/vclxdialog.cxx4
-rw-r--r--toolkit/source/awt/vclxdialog.hxx2
-rw-r--r--toolkit/source/awt/vclxfont.cxx10
-rw-r--r--toolkit/source/awt/vclxmenu.cxx8
-rw-r--r--toolkit/source/awt/vclxplugin.hxx2
-rw-r--r--toolkit/source/awt/vclxregion.cxx2
-rw-r--r--toolkit/source/awt/vclxtabcontrol.cxx32
-rw-r--r--toolkit/source/awt/vclxtabpagecontainer.cxx233
-rw-r--r--toolkit/source/awt/vclxtabpagemodel.cxx150
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx78
-rw-r--r--toolkit/source/awt/vclxwindow.cxx122
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx135
-rw-r--r--toolkit/source/awt/xsimpleanimation.cxx116
-rw-r--r--toolkit/source/awt/xthrobber.cxx75
19 files changed, 1194 insertions, 418 deletions
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
new file mode 100755
index 000000000000..69c08ee51520
--- /dev/null
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -0,0 +1,538 @@
+/*************************************************************************
+ * 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 "precompiled_toolkit.hxx"
+
+#include "toolkit/awt/animatedimagespeer.hxx"
+#include "toolkit/helper/property.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XAnimatedImages.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
+#include <vcl/throbber.hxx>
+
+#include <limits>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::awt::XAnimatedImages;
+ using ::com::sun::star::awt::Size;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::graphic::XGraphicProvider;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::graphic::XGraphic;
+ /** === end UNO using === **/
+ namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
+
+ //==================================================================================================================
+ //= AnimatedImagesPeer_Data
+ //==================================================================================================================
+ struct CachedImage
+ {
+ ::rtl::OUString sImageURL;
+ mutable Reference< XGraphic > xGraphic;
+
+ CachedImage()
+ :sImageURL()
+ ,xGraphic()
+ {
+ }
+
+ CachedImage( ::rtl::OUString const& i_imageURL )
+ :sImageURL( i_imageURL )
+ ,xGraphic()
+ {
+ }
+ };
+
+ struct AnimatedImagesPeer_Data
+ {
+ AnimatedImagesPeer& rAntiImpl;
+ ::std::vector< ::std::vector< CachedImage > > aCachedImageSets;
+
+ AnimatedImagesPeer_Data( AnimatedImagesPeer& i_antiImpl )
+ :rAntiImpl( i_antiImpl )
+ ,aCachedImageSets()
+ {
+ }
+ };
+
+ //==================================================================================================================
+ //= helper
+ //==================================================================================================================
+ namespace
+ {
+ //--------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString lcl_getHighContrastURL( ::rtl::OUString const& i_imageURL )
+ {
+ INetURLObject aURL( i_imageURL );
+ if ( aURL.GetProtocol() != INET_PROT_PRIV_SOFFICE )
+ {
+ OSL_VERIFY( aURL.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hicontrast" ) ), false, 0 ) );
+ return aURL.GetMainURL( INetURLObject::NO_DECODE );
+ }
+ // the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the
+ // segment
+ const sal_Int32 separatorPos = i_imageURL.indexOf( '/' );
+ ENSURE_OR_RETURN( separatorPos != -1, "lcl_getHighContrastURL: unsipported URL scheme - cannot automatically determine HC version!", i_imageURL );
+
+ ::rtl::OUStringBuffer composer;
+ composer.append( i_imageURL.copy( 0, separatorPos ) );
+ composer.appendAscii( "/hicontrast" );
+ composer.append( i_imageURL.copy( separatorPos ) );
+ return composer.makeStringAndClear();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ bool lcl_ensureImage_throw( Reference< XGraphicProvider > const& i_graphicProvider, const bool i_isHighContrast, const CachedImage& i_cachedImage )
+ {
+ if ( !i_cachedImage.xGraphic.is() )
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ if ( i_isHighContrast )
+ {
+ // try (to find) the high-contrast version of the graphic first
+ aMediaProperties.put( "URL", lcl_getHighContrastURL( i_cachedImage.sImageURL ) );
+ i_cachedImage.xGraphic.set( i_graphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
+ }
+ if ( !i_cachedImage.xGraphic.is() )
+ {
+ aMediaProperties.put( "URL", i_cachedImage.sImageURL );
+ i_cachedImage.xGraphic.set( i_graphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
+ }
+ }
+ return i_cachedImage.xGraphic.is();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ Size lcl_getGraphicSizePixel( Reference< XGraphic > const& i_graphic )
+ {
+ Size aSizePixel;
+ try
+ {
+ if ( i_graphic.is() )
+ {
+ const Reference< XPropertySet > xGraphicProps( i_graphic, UNO_QUERY_THROW );
+ OSL_VERIFY( xGraphicProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SizePixel" ) ) ) >>= aSizePixel );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return aSizePixel;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void lcl_init( Sequence< ::rtl::OUString > const& i_imageURLs, ::std::vector< CachedImage >& o_images )
+ {
+ o_images.resize(0);
+ size_t count = size_t( i_imageURLs.getLength() );
+ o_images.reserve( count );
+ for ( size_t i = 0; i < count; ++i )
+ {
+ o_images.push_back( CachedImage( i_imageURLs[i] ) );
+ }
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data )
+ {
+ Throbber* pThrobber = dynamic_cast< Throbber* >( i_data.rAntiImpl.GetWindow() );
+ if ( pThrobber == NULL )
+ return;
+
+ try
+ {
+ // collect the image sizes of the different image sets
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ const Reference< XGraphicProvider > xGraphicProvider( aContext.createComponent( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW );
+
+ const bool isHighContrast = pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ sal_Int32 nPreferredSet = -1;
+ const size_t nImageSetCount = i_data.aCachedImageSets.size();
+ if ( nImageSetCount < 2 )
+ {
+ nPreferredSet = sal_Int32( nImageSetCount ) - 1;
+ }
+ else
+ {
+ ::std::vector< Size > aImageSizes( nImageSetCount );
+ for ( sal_Int32 nImageSet = 0; size_t( nImageSet ) < nImageSetCount; ++nImageSet )
+ {
+ ::std::vector< CachedImage > const& rImageSet( i_data.aCachedImageSets[ nImageSet ] );
+ if ( ( rImageSet.empty() )
+ || ( !lcl_ensureImage_throw( xGraphicProvider, isHighContrast, rImageSet[0] ) )
+ )
+ {
+ aImageSizes[ nImageSet ] = Size( ::std::numeric_limits< long >::max(), ::std::numeric_limits< long >::max() );
+ }
+ else
+ {
+ aImageSizes[ nImageSet ] = lcl_getGraphicSizePixel( rImageSet[0].xGraphic );
+ }
+ }
+
+ // find the set with the smallest difference between window size and image size
+ const ::Size aWindowSizePixel = pThrobber->GetSizePixel();
+ long nMinimalDistance = ::std::numeric_limits< long >::max();
+ for ( ::std::vector< Size >::const_iterator check = aImageSizes.begin();
+ check != aImageSizes.end();
+ ++check
+ )
+ {
+ if ( ( check->Width > aWindowSizePixel.Width() )
+ || ( check->Height > aWindowSizePixel.Height() )
+ )
+ // do not use an image set which doesn't fit into the window
+ continue;
+
+ const sal_Int64 distance =
+ ( aWindowSizePixel.Width() - check->Width ) * ( aWindowSizePixel.Width() - check->Width )
+ + ( aWindowSizePixel.Height() - check->Height ) * ( aWindowSizePixel.Height() - check->Height );
+ if ( distance < nMinimalDistance )
+ {
+ nMinimalDistance = distance;
+ nPreferredSet = check - aImageSizes.begin();
+ }
+ }
+ }
+
+ // found a set?
+ Sequence< Reference< XGraphic > > aImages;
+ if ( ( nPreferredSet >= 0 ) && ( size_t( nPreferredSet ) < nImageSetCount ) )
+ {
+ // => set the images
+ ::std::vector< CachedImage > const& rImageSet( i_data.aCachedImageSets[ nPreferredSet ] );
+ aImages.realloc( rImageSet.size() );
+ sal_Int32 imageIndex = 0;
+ for ( ::std::vector< CachedImage >::const_iterator cachedImage = rImageSet.begin();
+ cachedImage != rImageSet.end();
+ ++cachedImage, ++imageIndex
+ )
+ {
+ lcl_ensureImage_throw( xGraphicProvider, isHighContrast, *cachedImage );
+ aImages[ imageIndex ] = cachedImage->xGraphic;
+ }
+ }
+ pThrobber->setImageList( aImages );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data, const Reference< XAnimatedImages >& i_images )
+ {
+ try
+ {
+ const sal_Int32 nImageSetCount = i_images->getImageSetCount();
+ i_data.aCachedImageSets.resize(0);
+ for ( sal_Int32 set = 0; set < nImageSetCount; ++set )
+ {
+ const Sequence< ::rtl::OUString > aImageURLs( i_images->getImageSet( set ) );
+ ::std::vector< CachedImage > aImages;
+ lcl_init( aImageURLs, aImages );
+ i_data.aCachedImageSets.push_back( aImages );
+ }
+
+ lcl_updateImageList_nothrow( i_data );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
+
+ //==================================================================================================================
+ //= AnimatedImagesPeer
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesPeer::AnimatedImagesPeer()
+ :AnimatedImagesPeer_Base()
+ ,m_pData( new AnimatedImagesPeer_Data( *this ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesPeer::~AnimatedImagesPeer()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::startAnimation( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->start();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::stopAnimation( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->stop();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL AnimatedImagesPeer::isAnimationRunning( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ return pThrobber->isRunning();
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::setProperty( const ::rtl::OUString& i_propertyName, const Any& i_value ) throw(RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ {
+ VCLXWindow::setProperty( i_propertyName, i_value );
+ return;
+ }
+
+ const sal_uInt16 nPropertyId = GetPropertyId( i_propertyName );
+ switch ( nPropertyId )
+ {
+ case BASEPROPERTY_STEP_TIME:
+ {
+ sal_Int32 nStepTime( 0 );
+ if ( i_value >>= nStepTime )
+ pThrobber->setStepTime( nStepTime );
+ break;
+ }
+ case BASEPROPERTY_AUTO_REPEAT:
+ {
+ sal_Bool bRepeat( sal_True );
+ if ( i_value >>= bRepeat )
+ pThrobber->setRepeat( bRepeat );
+ break;
+ }
+
+ case BASEPROPERTY_IMAGE_SCALE_MODE:
+ {
+ sal_Int16 nScaleMode( ImageScaleMode::Anisotropic );
+ ImageControl* pImageControl = dynamic_cast< ImageControl* >( GetWindow() );
+ if ( pImageControl && ( i_value >>= nScaleMode ) )
+ {
+ pImageControl->SetScaleMode( nScaleMode );
+ }
+ }
+ break;
+
+ default:
+ AnimatedImagesPeer_Base::setProperty( i_propertyName, i_value );
+ break;
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL AnimatedImagesPeer::getProperty( const ::rtl::OUString& i_propertyName ) throw(RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ Any aReturn;
+
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ return VCLXWindow::getProperty( i_propertyName );
+
+ const sal_uInt16 nPropertyId = GetPropertyId( i_propertyName );
+ switch ( nPropertyId )
+ {
+ case BASEPROPERTY_STEP_TIME:
+ aReturn <<= pThrobber->getStepTime();
+ break;
+
+ case BASEPROPERTY_AUTO_REPEAT:
+ aReturn <<= pThrobber->getRepeat();
+ break;
+
+ case BASEPROPERTY_IMAGE_SCALE_MODE:
+ {
+ ImageControl const* pImageControl = dynamic_cast< ImageControl* >( GetWindow() );
+ aReturn <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::Anisotropic );
+ }
+ break;
+
+ default:
+ aReturn = AnimatedImagesPeer_Base::getProperty( i_propertyName );
+ break;
+ }
+
+ return aReturn;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void AnimatedImagesPeer::ProcessWindowEvent( const VclWindowEvent& i_windowEvent )
+ {
+ switch ( i_windowEvent.GetId() )
+ {
+ case VCLEVENT_WINDOW_RESIZE:
+ lcl_updateImageList_nothrow( *m_pData );
+ break;
+ }
+
+ AnimatedImagesPeer_Base::ProcessWindowEvent( i_windowEvent );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void AnimatedImagesPeer::impl_updateImages_nolck( const Reference< XInterface >& i_animatedImages )
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
+
+ sal_Int32 nPosition(0);
+ OSL_VERIFY( i_event.Accessor >>= nPosition );
+ size_t position = size_t( nPosition );
+ if ( position > m_pData->aCachedImageSets.size() )
+ {
+ OSL_ENSURE( false, "AnimatedImagesPeer::elementInserted: illegal accessor/index!" );
+ lcl_updateImageList_nothrow( *m_pData, xAnimatedImages );
+ }
+
+ Sequence< ::rtl::OUString > aImageURLs;
+ OSL_VERIFY( i_event.Element >>= aImageURLs );
+ ::std::vector< CachedImage > aImages;
+ lcl_init( aImageURLs, aImages );
+ m_pData->aCachedImageSets.insert( m_pData->aCachedImageSets.begin() + position, aImages );
+ lcl_updateImageList_nothrow( *m_pData );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
+
+ sal_Int32 nPosition(0);
+ OSL_VERIFY( i_event.Accessor >>= nPosition );
+ size_t position = size_t( nPosition );
+ if ( position >= m_pData->aCachedImageSets.size() )
+ {
+ OSL_ENSURE( false, "AnimatedImagesPeer::elementRemoved: illegal accessor/index!" );
+ lcl_updateImageList_nothrow( *m_pData, xAnimatedImages );
+ }
+
+ m_pData->aCachedImageSets.erase( m_pData->aCachedImageSets.begin() + position );
+ lcl_updateImageList_nothrow( *m_pData );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
+
+ sal_Int32 nPosition(0);
+ OSL_VERIFY( i_event.Accessor >>= nPosition );
+ size_t position = size_t( nPosition );
+ if ( position >= m_pData->aCachedImageSets.size() )
+ {
+ OSL_ENSURE( false, "AnimatedImagesPeer::elementReplaced: illegal accessor/index!" );
+ lcl_updateImageList_nothrow( *m_pData, xAnimatedImages );
+ }
+
+ Sequence< ::rtl::OUString > aImageURLs;
+ OSL_VERIFY( i_event.Element >>= aImageURLs );
+ ::std::vector< CachedImage > aImages;
+ lcl_init( aImageURLs, aImages );
+ m_pData->aCachedImageSets[ position ] = aImages;
+ lcl_updateImageList_nothrow( *m_pData );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::disposing( const EventObject& i_event ) throw (RuntimeException)
+ {
+ VCLXWindow::disposing( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::modified( const EventObject& i_event ) throw (RuntimeException)
+ {
+ impl_updateImages_nolck( i_event.Source );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::dispose( ) throw(RuntimeException)
+ {
+ AnimatedImagesPeer_Base::dispose();
+ ::osl::MutexGuard aGuard( GetMutex() );
+ m_pData->aCachedImageSets.resize(0);
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx
index e912e83bd12e..672c939d8fd4 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -194,10 +194,5 @@ void * SAL_CALL comp_AsyncCallback_component_getFactory(
implName, serviceManager, registryKey, entries);
}
-sal_Bool SAL_CALL comp_AsyncCallback_component_writeInfo(
- void * serviceManager, void * registryKey)
-{
- return ::cppu::component_writeInfoHelper(serviceManager, registryKey, entries);
-}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk
deleted file mode 100644
index 88b40a597410..000000000000
--- a/toolkit/source/awt/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=toolkit
-TARGET=awt
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(GUIBASE)"=="aqua"
-CFLAGSCXX+=$(OBJCXXFLAGS)
-.ENDIF # "$(GUIBASE)"=="aqua"
-
-SLOFILES= \
- $(SLO)$/stylesettings.obj \
- $(SLO)$/vclxaccessiblecomponent.obj \
- $(SLO)$/vclxbitmap.obj \
- $(SLO)$/vclxcontainer.obj \
- $(SLO)$/vclxdevice.obj \
- $(SLO)$/vclxfont.obj \
- $(SLO)$/vclxgraphics.obj \
- $(SLO)$/vclxmenu.obj \
- $(SLO)$/vclxpointer.obj \
- $(SLO)$/vclxprinter.obj \
- $(SLO)$/vclxregion.obj \
- $(SLO)$/vclxsystemdependentwindow.obj \
- $(SLO)$/vclxtoolkit.obj \
- $(SLO)$/vclxtopwindow.obj \
- $(SLO)$/vclxwindow.obj \
- $(SLO)$/vclxwindow1.obj \
- $(SLO)$/vclxwindows.obj \
- $(SLO)$/vclxspinbutton.obj \
- $(SLO)$/xsimpleanimation.obj \
- $(SLO)$/xthrobber.obj \
- $(SLO)$/asynccallback.obj\
- $(SLO)/vclxbutton.obj\
- $(SLO)/vclxdialog.obj\
- $(SLO)/vclxfixedline.obj\
- $(SLO)/vclxplugin.obj\
- $(SLO)/vclxscroller.obj\
- $(SLO)/vclxsplitter.obj\
- $(SLO)/vclxtabcontrol.obj\
- $(SLO)/vclxtabpage.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES=\
- xthrobber.src
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index e8626333aad5..66a2a4bf1cb3 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -249,9 +249,9 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
Window* pWindow = (Window*) rVclWindowEvent.GetData();
DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDDESTROYED - Window=?" );
- if ( pWindow->GetAccessible( FALSE ).is() )
+ if ( pWindow->GetAccessible( sal_False ).is() )
{
- aOldValue <<= pWindow->GetAccessible( FALSE );
+ aOldValue <<= pWindow->GetAccessible( sal_False );
NotifyAccessibleEvent( accessibility::AccessibleEventId::CHILD, aOldValue, aNewValue );
}
}
@@ -446,7 +446,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
Window* pWindow = GetWindow();
if ( pWindow )
{
- Window *pLabeledBy = pWindow->GetLabeledBy();
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
if ( pLabeledBy && pLabeledBy != pWindow )
{
uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -454,7 +454,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
}
- Window* pLabelFor = pWindow->GetLabelFor();
+ Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor();
if ( pLabelFor && pLabelFor != pWindow )
{
uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -569,7 +569,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi
uno::Reference< accessibility::XAccessible > xAcc;
if ( GetWindow() )
{
- Window* pChild = GetWindow()->GetAccessibleChildWindow( (USHORT)i );
+ Window* pChild = GetWindow()->GetAccessibleChildWindow( (sal_uInt16)i );
if ( pChild )
xAcc = pChild->GetAccessible();
}
@@ -621,7 +621,7 @@ sal_Int32 VCLXAccessibleComponent::getAccessibleIndexInParent( ) throw (uno::Ru
if ( pParent )
{
/*
- for ( USHORT n = pParent->GetAccessibleChildWindowCount(); n; )
+ for ( sal_uInt16 n = pParent->GetAccessibleChildWindowCount(); n; )
{
Window* pChild = pParent->GetAccessibleChildWindow( --n );
if ( pChild == GetWindow() )
diff --git a/toolkit/source/awt/vclxdialog.cxx b/toolkit/source/awt/vclxdialog.cxx
index d75ada7de73e..066cadc06978 100644
--- a/toolkit/source/awt/vclxdialog.cxx
+++ b/toolkit/source/awt/vclxdialog.cxx
@@ -202,13 +202,13 @@ void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star
pWindow->SetText( Title );
}
-void VCLXDialog::setHelpId( sal_Int32 id ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXDialog::setHelpId( const rtl::OUString& rId ) throw(::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
Window* pWindow = GetWindow();
if ( pWindow )
- pWindow->SetHelpId( id );
+ pWindow->SetHelpId( rtl::OUStringToOString( rId, RTL_TEXTENCODING_UTF8 ) );
}
::rtl::OUString VCLXDialog::getTitle() throw(::com::sun::star::uno::RuntimeException)
diff --git a/toolkit/source/awt/vclxdialog.hxx b/toolkit/source/awt/vclxdialog.hxx
index e7d92aad59c7..785f6b3b7e48 100644
--- a/toolkit/source/awt/vclxdialog.hxx
+++ b/toolkit/source/awt/vclxdialog.hxx
@@ -98,7 +98,7 @@ public:
// ::com::sun::star::awt::XDialog2
void SAL_CALL endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setHelpId( sal_Int32 id ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setHelpId( const rtl::OUString& id ) throw(::com::sun::star::uno::RuntimeException);
};
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 66461db68e77..28224c30232d 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -63,7 +63,7 @@ void VCLXFont::Init( ::com::sun::star::awt::XDevice& rxDev, const Font& rFont )
maFont = rFont;
}
-BOOL VCLXFont::ImplAssertValidFontMetric()
+sal_Bool VCLXFont::ImplAssertValidFontMetric()
{
if ( !mpFontMetric && mxDevice.is() )
{
@@ -76,7 +76,7 @@ BOOL VCLXFont::ImplAssertValidFontMetric()
pOutDev->SetFont( aOldFont );
}
}
- return mpFontMetric ? TRUE : FALSE;
+ return mpFontMetric ? sal_True : sal_False;
}
@@ -150,7 +150,7 @@ sal_Int16 VCLXFont::getCharWidth( sal_Unicode c ) throw(::com::sun::star::uno::R
sal_Int16 nCount = nLast-nFirst + 1;
aSeq = ::com::sun::star::uno::Sequence<sal_Int16>( nCount );
- for ( USHORT n = 0; n < nCount; n++ )
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
aSeq.getArray()[n] = sal::static_int_cast< sal_Int16 >(
pOutDev->GetTextWidth(
@@ -205,7 +205,7 @@ void VCLXFont::getKernPairs( ::com::sun::star::uno::Sequence< sal_Unicode >& rnC
Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
- ULONG nPairs = pOutDev->GetKerningPairCount();
+ sal_uLong nPairs = pOutDev->GetKerningPairCount();
if ( nPairs )
{
KerningPair* pData = new KerningPair[ nPairs ];
@@ -219,7 +219,7 @@ void VCLXFont::getKernPairs( ::com::sun::star::uno::Sequence< sal_Unicode >& rnC
sal_Unicode* pChars2 = rnChars2.getArray();
sal_Int16* pKerns = rnKerns.getArray();
- for ( ULONG n = 0; n < nPairs; n++ )
+ for ( sal_uLong n = 0; n < nPairs; n++ )
{
pChars1[n] = pData[n].nChar1;
pChars2[n] = pData[n].nChar2;
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 3257da29fb49..919986fa49f6 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -108,7 +108,7 @@ VCLXMenu::~VCLXMenu()
}
}
-BOOL VCLXMenu::IsPopupMenu() const
+sal_Bool VCLXMenu::IsPopupMenu() const
{
return (mpMenu && ! mpMenu->IsMenuBar());
}
@@ -721,7 +721,7 @@ namespace
sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 );
sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 );
sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 );
- USHORT nKey = (USHORT)aAWTKey.KeyCode;
+ sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode;
return KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
}
@@ -1089,7 +1089,7 @@ DBG_NAME(VCLXMenuBar);
VCLXMenuBar::VCLXMenuBar()
{
DBG_CTOR( VCLXMenuBar, 0 );
- ImplCreateMenu( FALSE );
+ ImplCreateMenu( sal_False );
}
VCLXMenuBar::VCLXMenuBar( MenuBar* pMenuBar ) : VCLXMenu( (Menu *)pMenuBar )
@@ -1106,7 +1106,7 @@ DBG_NAME(VCLXPopupMenu);
VCLXPopupMenu::VCLXPopupMenu()
{
DBG_CTOR( VCLXPopupMenu, 0 );
- ImplCreateMenu( TRUE );
+ ImplCreateMenu( sal_True );
}
VCLXPopupMenu::VCLXPopupMenu( PopupMenu* pPopMenu ) : VCLXMenu( (Menu *)pPopMenu )
diff --git a/toolkit/source/awt/vclxplugin.hxx b/toolkit/source/awt/vclxplugin.hxx
index 340fa453441f..458fef360d57 100644
--- a/toolkit/source/awt/vclxplugin.hxx
+++ b/toolkit/source/awt/vclxplugin.hxx
@@ -30,7 +30,7 @@
#define LAYOUT_AWT_VCLXPLUGIN_HXX
#include <toolkit/awt/vclxwindow.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
class Control;
namespace layoutimpl
diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx
index 99a1924cecd1..f7df2a3291b3 100644
--- a/toolkit/source/awt/vclxregion.cxx
+++ b/toolkit/source/awt/vclxregion.cxx
@@ -155,7 +155,7 @@ void VCLXRegion::xOrRegion( const ::com::sun::star::uno::Reference< ::com::sun::
{
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- ULONG nRects = maRegion.GetRectCount();
+ sal_uLong nRects = maRegion.GetRectCount();
::com::sun::star::uno::Sequence< ::com::sun::star::awt::Rectangle > aRects( nRects );
Rectangle aRect;
diff --git a/toolkit/source/awt/vclxtabcontrol.cxx b/toolkit/source/awt/vclxtabcontrol.cxx
index 40566b886676..cc3940c92784 100644
--- a/toolkit/source/awt/vclxtabcontrol.cxx
+++ b/toolkit/source/awt/vclxtabcontrol.cxx
@@ -123,7 +123,7 @@ TabControl *VCLXTabControl::getTabControl() const throw (uno::RuntimeException)
sal_Int32 SAL_CALL VCLXTabControl::insertTab() throw (uno::RuntimeException)
{
TabControl *pTabControl = getTabControl();
- USHORT id = sal::static_int_cast< USHORT >( mTabId++ );
+ sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ );
rtl::OUString title (RTL_CONSTASCII_USTRINGPARAM( "" ) );
pTabControl->InsertPage( id, title.getStr(), TAB_APPEND );
pTabControl->SetTabPage( id, new TabPage( pTabControl ) );
@@ -133,17 +133,17 @@ sal_Int32 SAL_CALL VCLXTabControl::insertTab() throw (uno::RuntimeException)
void SAL_CALL VCLXTabControl::removeTab( sal_Int32 ID ) throw (uno::RuntimeException, IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
- pTabControl->RemovePage( sal::static_int_cast< USHORT >( ID ) );
+ pTabControl->RemovePage( sal::static_int_cast< sal_uInt16 >( ID ) );
}
void SAL_CALL VCLXTabControl::activateTab( sal_Int32 ID ) throw (uno::RuntimeException, IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
- pTabControl->SelectTabPage( sal::static_int_cast< USHORT >( ID ) );
+ pTabControl->SelectTabPage( sal::static_int_cast< sal_uInt16 >( ID ) );
}
sal_Int32 SAL_CALL VCLXTabControl::getActiveTabID() throw (uno::RuntimeException)
@@ -181,7 +181,7 @@ void SAL_CALL VCLXTabControl::removeTabListener( const uno::Reference< awt::XTab
void SAL_CALL VCLXTabControl::setTabProps( sal_Int32 ID, const uno::Sequence< NamedValue >& Properties ) throw (uno::RuntimeException, IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
for ( int i = 0; i < Properties.getLength(); i++ )
@@ -192,7 +192,7 @@ void SAL_CALL VCLXTabControl::setTabProps( sal_Int32 ID, const uno::Sequence< Na
if ( name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) )
{
rtl::OUString title = value.get<rtl::OUString>();
- pTabControl->SetPageText( sal::static_int_cast< USHORT >( ID ), title.getStr() );
+ pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() );
}
}
}
@@ -201,7 +201,7 @@ uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID )
throw (IndexOutOfBoundsException, uno::RuntimeException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
#define ADD_PROP( seq, i, name, val ) { \
@@ -212,8 +212,8 @@ uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID )
}
uno::Sequence< NamedValue > props( 2 );
- ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< USHORT >( ID ) ) ) );
- ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< USHORT >( ID ) ) );
+ ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) ) ) );
+ ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) ) );
#undef ADD_PROP
return props;
}
@@ -224,7 +224,7 @@ void SAL_CALL VCLXTabControl::draw( sal_Int32 nX, sal_Int32 nY ) throw(uno::Runt
SolarMutexGuard aGuard;
TabControl *pTabControl = getTabControl();
- TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< USHORT >( getActiveTabID() ) );
+ TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( getActiveTabID() ) );
if ( pTabPage )
{
::Point aPos( nX, nY );
@@ -385,8 +385,8 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area)
if ( active )
{
- ::Rectangle label_rect = pTabControl->GetTabBounds( sal::static_int_cast< USHORT >( i+1 ) );
- ::Rectangle page_rect = pTabControl->GetTabPageBounds( sal::static_int_cast< USHORT >( i+1 ) );
+ ::Rectangle label_rect = pTabControl->GetTabBounds( sal::static_int_cast< sal_uInt16 >( i+1 ) );
+ ::Rectangle page_rect = pTabControl->GetTabPageBounds( sal::static_int_cast< sal_uInt16 >( i+1 ) );
awt::Rectangle childRect;
childRect.X = page_rect.Left();
@@ -419,7 +419,7 @@ awt::Size SAL_CALL VCLXTabControl::getMinimumSize()
if ( child->mxChild.is() )
{
// set the title prop here...
- pTabControl->SetPageText( sal::static_int_cast< USHORT >( i+1 ), child->maTitle.getStr() );
+ pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( i+1 ), child->maTitle.getStr() );
awt::Size childSize( child->mxChild->getMinimumSize() );
childrenSize.Width = SAL_MAX( childSize.Width, childrenSize.Width );
@@ -459,7 +459,7 @@ void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent
case VCLEVENT_TABPAGE_REMOVEDALL:
case VCLEVENT_TABPAGE_PAGETEXTCHANGED:
{
- ULONG page = (ULONG) _rVclWindowEvent.GetData();
+ sal_uLong page = (sal_uLong) _rVclWindowEvent.GetData();
for ( std::list< uno::Reference
< awt::XTabListener > >::iterator it
= mxTabListeners.begin(); it != mxTabListeners.end(); ++it )
@@ -485,7 +485,7 @@ void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent
case VCLEVENT_TABPAGE_REMOVEDALL:
for ( int i = 1; i < mTabId; i++)
{
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( i ) ) )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( i ) ) )
listener->removed( i );
}
break;
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
new file mode 100644
index 000000000000..01f6fddd10d8
--- /dev/null
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * 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 "precompiled_toolkit.hxx"
+
+#include <toolkit/awt/vclxtabpagecontainer.hxx>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/helper/tkresmgr.hxx>
+#include <cppuhelper/typeprovider.hxx>
+
+using ::rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::view;
+// ----------------------------------------------------
+// class VCLXTabPageContainer
+// ----------------------------------------------------
+void VCLXTabPageContainer::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
+{
+ VCLXWindow::ImplGetPropertyIds( rIds );
+}
+
+VCLXTabPageContainer::VCLXTabPageContainer() :
+ m_aTabPageListeners( *this )
+{
+}
+
+VCLXTabPageContainer::~VCLXTabPageContainer()
+{
+#ifndef __SUNPRO_CC
+ OSL_TRACE ("%s", __FUNCTION__);
+#endif
+}
+
+void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ TabControl* pTabControl = (TabControl*)GetWindow();
+ if ( pTabControl )
+ {
+ TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( pTabControl->GetCurPageId( ) ) );
+ if ( pTabPage )
+ {
+ ::Point aPos( nX, nY );
+ ::Size aSize = pTabPage->GetSizePixel();
+
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ aPos = pDev->PixelToLogic( aPos );
+ aSize = pDev->PixelToLogic( aSize );
+
+ pTabPage->Draw( pDev, aPos, aSize, 0 );
+ }
+ }
+
+ VCLXWindow::draw( nX, nY );
+/*
+ if ( pWindow )
+ {
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ if ( !pDev )
+ pDev = pWindow->GetParent();
+
+ Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() );
+ Point aPos = pDev->PixelToLogic( Point( nX, nY ) );
+
+ pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS );
+ }
+*/
+}
+
+::com::sun::star::awt::DeviceInfo VCLXTabPageContainer::getInfo() throw(RuntimeException)
+{
+ ::com::sun::star::awt::DeviceInfo aInfo = VCLXDevice::getInfo();
+ return aInfo;
+}
+
+void SAL_CALL VCLXTabPageContainer::setProperty(const ::rtl::OUString& PropertyName, const Any& Value ) throw(RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ TabControl* pTabPage = (TabControl*)GetWindow();
+ if ( pTabPage )
+ {
+ VCLXWindow::setProperty( PropertyName, Value );
+ }
+}
+::sal_Int16 SAL_CALL VCLXTabPageContainer::getActiveTabPageID() throw (RuntimeException)
+{
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ return pTabCtrl != NULL ? pTabCtrl->GetCurPageId( ) : 0;
+}
+void SAL_CALL VCLXTabPageContainer::setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (RuntimeException)
+{
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ if ( pTabCtrl )
+ pTabCtrl->SelectTabPage(_activetabpageid);
+}
+::sal_Int32 SAL_CALL VCLXTabPageContainer::getTabPageCount( ) throw (RuntimeException)
+{
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ return pTabCtrl != NULL ? pTabCtrl->GetPageCount() : 0;
+}
+::sal_Bool SAL_CALL VCLXTabPageContainer::isTabPageActive( ::sal_Int16 tabPageIndex ) throw (RuntimeException)
+{
+ return (getActiveTabPageID() == tabPageIndex);
+}
+Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer::getTabPage( ::sal_Int16 tabPageIndex ) throw (RuntimeException)
+{
+ return (tabPageIndex >= 0 && tabPageIndex < static_cast<sal_Int16>(m_aTabPages.size())) ? m_aTabPages[tabPageIndex] : NULL;
+}
+Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer::getTabPageByID( ::sal_Int16 tabPageID ) throw (RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage;
+ ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aIter = m_aTabPages.begin();
+ ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aEnd = m_aTabPages.end();
+ for(;aIter != aEnd;++aIter)
+ {
+ Reference< awt::XControl > xControl(*aIter,UNO_QUERY );
+ Reference< awt::tab::XTabPageModel > xP( xControl->getModel(), UNO_QUERY );
+ if ( tabPageID == xP->getTabPageID() )
+ {
+ xTabPage = *aIter;
+ break;
+ }
+ }
+ return xTabPage;
+}
+void SAL_CALL VCLXTabPageContainer::addTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+{
+ m_aTabPageListeners.addInterface( listener );
+}
+void SAL_CALL VCLXTabPageContainer::removeTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+{
+ m_aTabPageListeners.removeInterface( listener );
+}
+
+void VCLXTabPageContainer::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ TabControl* pTabControl = static_cast< TabControl* >( GetWindow() );
+ if ( pTabControl )
+ {
+ switch ( _rVclWindowEvent.GetId() )
+ {
+ case VCLEVENT_TABPAGE_ACTIVATE:
+ {
+// allocateArea( maAllocation );
+ sal_uLong page = (sal_uLong)_rVclWindowEvent.GetData();
+ awt::tab::TabPageActivatedEvent aEvent(NULL,page);
+ m_aTabPageListeners.tabPageActivated(aEvent);
+ break;
+ }
+ default:
+ aGuard.clear();
+ VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
+ break;
+ }
+ }
+}
+void SAL_CALL VCLXTabPageContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY);
+ if ( pTabCtrl && xTabPage.is() )
+ {
+ Reference< awt::XControl > xControl(xTabPage,UNO_QUERY );
+ Reference< awt::tab::XTabPageModel > xP( xControl->getModel(), UNO_QUERY );
+ sal_Int16 nPageID = xP->getTabPageID();
+
+ Window* pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+ TabPage* pPage = (TabPage*)pWindow;
+ pTabCtrl->InsertPage(nPageID,pPage->GetText());
+
+ pPage->Hide();
+ pTabCtrl->SetTabPage(nPageID,pPage);
+ pTabCtrl->SetHelpText(nPageID,xP->getTooltip());
+ pTabCtrl->SetPageImage(nPageID,TkResMgr::getImageFromURL(xP->getImageURL()));
+ pTabCtrl->SelectTabPage(nPageID);
+ m_aTabPages.push_back(xTabPage);
+ }
+}
+void SAL_CALL VCLXTabPageContainer::elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY);
+ if ( pTabCtrl && xTabPage.is() )
+ {
+ Reference< awt::XControl > xControl(xTabPage,UNO_QUERY );
+ Reference< awt::tab::XTabPageModel > xP( xControl->getModel(), UNO_QUERY );
+ pTabCtrl->RemovePage(xP->getTabPageID());
+ m_aTabPages.erase(::std::remove(m_aTabPages.begin(),m_aTabPages.end(),xTabPage));
+ }
+}
+void SAL_CALL VCLXTabPageContainer::elementReplaced( const ::com::sun::star::container::ContainerEvent& /*Event*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
diff --git a/toolkit/source/awt/vclxtabpagemodel.cxx b/toolkit/source/awt/vclxtabpagemodel.cxx
new file mode 100644
index 000000000000..c7145992bd7f
--- /dev/null
+++ b/toolkit/source/awt/vclxtabpagemodel.cxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * 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 "precompiled_toolkit.hxx"
+
+#include <toolkit/awt/vclxtabpagemodel.hxx>
+#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <cppuhelper/typeprovider.hxx>
+// ----------------------------------------------------
+// class VCLXDialog
+// ----------------------------------------------------
+
+VCLXTabPageModel::VCLXTabPageModel()
+{
+}
+
+VCLXTabPageModel::~VCLXTabPageModel()
+{
+#ifndef __SUNPRO_CC
+ OSL_TRACE ("%s", __FUNCTION__);
+#endif
+}
+
+void SAL_CALL VCLXTabPageModel::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Window* pWindow = GetWindow();
+
+ if ( pWindow )
+ {
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ if ( !pDev )
+ pDev = pWindow->GetParent();
+
+ Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() );
+ Point aPos = pDev->PixelToLogic( Point( nX, nY ) );
+
+ pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS );
+ }
+}
+
+::com::sun::star::awt::DeviceInfo VCLXTabPageModel::getInfo() throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::awt::DeviceInfo aInfo;// = VCLXDevice::getInfo();
+ return aInfo;
+}
+
+
+void SAL_CALL VCLXTabPageModel::setProperty(
+ const ::rtl::OUString& /*PropertyName*/,
+ const ::com::sun::star::uno::Any& /*Value*/ )
+throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ /*TabPage* pTabPage = (TabPage*)GetWindow();
+ if ( pTabPage )
+ {
+ VCLXWindow::setProperty( PropertyName, Value );
+ }*/
+}
+//XTabPageModel
+::sal_Int16 SAL_CALL VCLXTabPageModel::getTabPageID() throw (::com::sun::star::uno::RuntimeException)
+{
+ return 0;
+}
+::sal_Bool SAL_CALL VCLXTabPageModel::getEnabled() throw (::com::sun::star::uno::RuntimeException)
+{
+ return false;
+}
+void SAL_CALL VCLXTabPageModel::setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //TabControl* pTabControl = (TabControl*)GetWindow();
+ //if ( pTabControl )
+ // pTabControl->EnablePage(0, true);
+}
+::rtl::OUString SAL_CALL VCLXTabPageModel::getTitle() throw (::com::sun::star::uno::RuntimeException)
+{
+ //TabControl* pTabControl = (TabControl*)GetWindow();
+ //if ( pTabControl )
+ // return pTabControl->GetPageText(0);
+ //else
+ return ::rtl::OUString::createFromAscii("");
+}
+void SAL_CALL VCLXTabPageModel::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //TabControl* pTabControl = (TabControl*)GetWindow();
+ //if ( pTabControl )
+ // pTabControl->SetPageText(0, _title);
+
+}
+::rtl::OUString SAL_CALL VCLXTabPageModel::getImageURL() throw (::com::sun::star::uno::RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii("");
+}
+void SAL_CALL VCLXTabPageModel::setImageURL( const ::rtl::OUString& /*_imageurl*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //m_sImageURL = _imageurl;
+}
+::rtl::OUString SAL_CALL VCLXTabPageModel::getTooltip() throw (::com::sun::star::uno::RuntimeException)
+{
+ //return m_sTooltip;
+ return ::rtl::OUString::createFromAscii("");
+}
+void SAL_CALL VCLXTabPageModel::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
+{
+ (void)_tooltip;
+}
+::cppu::IPropertyArrayHelper& VCLXTabPageModel::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ com::sun::star::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > VCLXTabPageModel::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index cdac85f86885..72b9e05688c8 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -35,6 +35,7 @@
#include <tools/svwin.h>
#include <stdio.h>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/WindowClass.hpp>
@@ -69,9 +70,12 @@
#include <toolkit/awt/vclxsystemdependentwindow.hxx>
#include <toolkit/awt/vclxregion.hxx>
#include <toolkit/awt/vclxtoolkit.hxx>
+#include <toolkit/awt/vclxtabpagecontainer.hxx>
+#include <toolkit/awt/vclxtabpagemodel.hxx>
#include <toolkit/awt/xsimpleanimation.hxx>
#include <toolkit/awt/xthrobber.hxx>
+#include <toolkit/awt/animatedimagespeer.hxx>
#include <toolkit/awt/vclxtopwindow.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -113,6 +117,7 @@
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
+#include <vcl/throbber.hxx>
#include "toolkit/awt/vclxspinbutton.hxx"
#include <tools/debug.hxx>
@@ -313,6 +318,7 @@ static ComponentInfo aComponentInfos [] =
{ "scrollbar", WINDOW_SCROLLBAR },
{ "scrollbarbox", WINDOW_SCROLLBARBOX },
{ "simpleanimation", WINDOW_CONTROL },
+ { "animatedimages", WINDOW_CONTROL },
{ "spinbutton", WINDOW_SPINBUTTON },
{ "spinfield", WINDOW_SPINFIELD },
{ "throbber", WINDOW_CONTROL },
@@ -329,7 +335,9 @@ static ComponentInfo aComponentInfos [] =
{ "tristatebox", WINDOW_TRISTATEBOX },
{ "warningbox", WINDOW_WARNINGBOX },
{ "window", WINDOW_WINDOW },
- { "workwindow", WINDOW_WORKWINDOW }
+ { "workwindow", WINDOW_WORKWINDOW },
+ { "tabpagecontainer", WINDOW_CONTROL },
+ { "tabpagemodel", WINDOW_TABPAGE }
};
extern "C"
@@ -384,7 +392,7 @@ sal_uInt16 ImplGetComponentType( const String& rServiceName )
// ----------------------------------------------------
static sal_Int32 nVCLToolkitInstanceCount = 0;
-static BOOL bInitedByVCLToolkit = sal_False;
+static sal_Bool bInitedByVCLToolkit = sal_False;
//static cppu::OInterfaceContainerHelper * pToolkits = 0;
static osl::Mutex & getInitMutex()
@@ -687,7 +695,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_CURRENCYFIELD:
pNewWindow = new CurrencyField( pParent, nWinBits );
- static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXNumericField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(CurrencyField*)pNewWindow );
break;
@@ -696,7 +704,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_DATEFIELD:
pNewWindow = new DateField( pParent, nWinBits );
- static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXDateField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pNewWindow );
break;
@@ -738,7 +746,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
*ppNewComp = new VCLXFrame;
// Frame control needs to recieve
// Mouse events
- pGroupBox->SetMouseTransparent( FALSE );
+ pGroupBox->SetMouseTransparent( sal_False );
}
}
break;
@@ -811,7 +819,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_NUMERICFIELD:
pNewWindow = new NumericField( pParent, nWinBits );
- static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXNumericField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(NumericField*)pNewWindow );
break;
@@ -843,12 +851,12 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
// Since the VCLXRadioButton really cares for it's RadioCheck settings, this is important:
// if we enable it, the VCLXRadioButton will use RadioButton::Check instead of RadioButton::SetState
// This leads to a strange behaviour if the control is newly created: when settings the initial
- // state to "checked", the RadioButton::Check (called because RadioCheck=TRUE) will uncheck
+ // state to "checked", the RadioButton::Check (called because RadioCheck=sal_True) will uncheck
// _all_other_ radio buttons in the same group. However, at this moment the grouping of the controls
// is not really valid: the controls are grouped after they have been created, but we're still in
// the creation process, so the RadioButton::Check relies on invalid grouping information.
// 07.08.2001 - #87254# - frank.schoenheit@sun.com
- static_cast<RadioButton*>(pNewWindow)->EnableRadioCheck( FALSE );
+ static_cast<RadioButton*>(pNewWindow)->EnableRadioCheck( sal_False );
break;
case WINDOW_SCROLLBAR:
pNewWindow = new ScrollBar( pParent, nWinBits );
@@ -886,15 +894,26 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
pNewWindow = new TabDialog( pParent, nWinBits );
break;
case WINDOW_TABPAGE:
- pNewWindow = new TabPage( pParent, nWinBits );
- *ppNewComp = new VCLXTabPage;
+ /*
+ if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
+ ::rtl::OUString::createFromAscii("tabpagemodel") ) )
+ {
+ pNewWindow = new TabControl( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPageContainer;
+ }
+ else
+ */
+ {
+ pNewWindow = new TabPage( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPage;
+ }
break;
case WINDOW_TIMEBOX:
pNewWindow = new TimeBox( pParent, nWinBits );
break;
case WINDOW_TIMEFIELD:
pNewWindow = new TimeField( pParent, nWinBits );
- static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXTimeField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(TimeField*)pNewWindow );
break;
@@ -1002,22 +1021,35 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
}
break;
case WINDOW_CONTROL:
- if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("simpleanimation")) ) )
+ if ( aServiceName.EqualsAscii( "simpleanimation" ) )
{
- nWinBits |= WB_SCALE;
- pNewWindow = new FixedImage( pParent, nWinBits );
+ pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE );
+ ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic );
+ // (compatibility)
*ppNewComp = new ::toolkit::XSimpleAnimation;
}
- else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("throbber")) ) )
+ else if ( aServiceName.EqualsAscii( "throbber" ) )
{
- nWinBits |= WB_SCALE;
- pNewWindow = new FixedImage( pParent, nWinBits );
+ pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE );
+ ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic );
+ // (compatibility)
*ppNewComp = new ::toolkit::XThrobber;
}
+ else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
+ ::rtl::OUString::createFromAscii("tabpagecontainer") ) )
+ {
+ pNewWindow = new TabControl( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPageContainer;
+ }
+ else if ( aServiceName.EqualsAscii( "animatedimages" ) )
+ {
+ pNewWindow = new Throbber( pParent, nWinBits );
+ *ppNewComp = new ::toolkit::AnimatedImagesPeer;
+ }
break;
- default: DBG_ERRORFILE( "UNO3!" );
+ default:
+ OSL_ENSURE( false, "VCLXToolkit::ImplCreateWindow: unknown window type!" );
+ break;
}
}
@@ -1061,7 +1093,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
// try to load the lib
if ( !fnSvtCreateWindow && !hSvToolsLib )
{
- ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName( "svt", TRUE );
+ ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName( "svt", sal_True );
hSvToolsLib = osl_loadModuleRelative(
&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( hSvToolsLib )
@@ -1108,11 +1140,11 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
}
else
{
- pNewComp->SetCreatedWithToolkit( TRUE );
+ pNewComp->SetCreatedWithToolkit( sal_True );
xRef = pNewComp;
pNewWindow->SetComponentInterface( xRef );
}
- DBG_ASSERT( pNewWindow->GetComponentInterface( FALSE ) == xRef,
+ DBG_ASSERT( pNewWindow->GetComponentInterface( sal_False ) == xRef,
"VCLXToolkit::createWindow: did #133706# resurge?" );
if ( rDescriptor.WindowAttributes & ::com::sun::star::awt::WindowAttribute::SHOW )
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 243f682f1097..2169203e5916 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -66,8 +66,9 @@
#include <vcl/tabpage.hxx>
#include <vcl/button.hxx>
#include <comphelper/asyncnotification.hxx>
+#include <comphelper/flagguard.hxx>
#include "stylesettings.hxx"
-
+#include <tools/urlobj.hxx>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
#include <boost/bind.hpp>
@@ -93,32 +94,6 @@ namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
//====================================================================
-//= misc helpers
-//====================================================================
-namespace
-{
- //................................................................
- //. FlagGuard
- //................................................................
- class FlagGuard
- {
- private:
- bool& m_rFlag;
-
- public:
- FlagGuard( bool& _rFlag )
- :m_rFlag( _rFlag )
- {
- m_rFlag = true;
- }
- ~FlagGuard()
- {
- m_rFlag = false;
- }
- };
-}
-
-//====================================================================
//= VCLXWindowImpl
//====================================================================
class SAL_DLLPRIVATE VCLXWindowImpl
@@ -148,7 +123,7 @@ private:
TopWindowListenerMultiplexer maTopWindowListeners;
CallbackArray maCallbackEvents;
- ULONG mnCallbackEventId;
+ sal_uLong mnCallbackEventId;
public:
bool mbDisposing : 1;
@@ -156,7 +131,7 @@ public:
bool mbSynthesizingVCLEvent : 1;
bool mbWithDefaultProps : 1;
- ULONG mnListenerLockLevel;
+ sal_uLong mnListenerLockLevel;
sal_Int16 mnWritingMode;
sal_Int16 mnContextWritingMode;
@@ -889,7 +864,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( mpImpl->getDockableWindowListeners().getLength() )
{
- BOOL *p_bFloating = (BOOL*)rVclWindowEvent.GetData();
+ sal_Bool *p_bFloating = (sal_Bool*)rVclWindowEvent.GetData();
::com::sun::star::lang::EventObject aEvent;
aEvent.Source = (::cppu::OWeakObject*)this;
@@ -948,7 +923,7 @@ void VCLXWindow::SetSynthesizingVCLEvent( sal_Bool _b )
mpImpl->mbSynthesizingVCLEvent = _b;
}
-BOOL VCLXWindow::IsSynthesizingVCLEvent() const
+sal_Bool VCLXWindow::IsSynthesizingVCLEvent() const
{
return mpImpl->mbSynthesizingVCLEvent;
}
@@ -1089,7 +1064,7 @@ void VCLXWindow::setEnable( sal_Bool bEnable ) throw(::com::sun::star::uno::Runt
Window* pWindow = GetWindow();
if ( pWindow )
{
- pWindow->Enable( bEnable, FALSE ); // #95824# without children!
+ pWindow->Enable( bEnable, sal_False ); // #95824# without children!
pWindow->EnableInput( bEnable );
}
}
@@ -1114,7 +1089,7 @@ void VCLXWindow::addWindowListener( const ::com::sun::star::uno::Reference< ::co
// #100119# Get all resize events, even if height or width 0, or invisible
if ( GetWindow() )
- GetWindow()->EnableAllResize( TRUE );
+ GetWindow()->EnableAllResize( sal_True );
}
void VCLXWindow::removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
@@ -1347,7 +1322,7 @@ namespace toolkit
(aStyleSettings.*pSetter)( Color( nColor ) );
aSettings.SetStyleSettings( aStyleSettings );
- _pWindow->SetSettings( aSettings, TRUE );
+ _pWindow->SetSettings( aSettings, sal_True );
}
}
@@ -1423,11 +1398,11 @@ namespace
{
void lcl_updateWritingMode( Window& _rWindow, const sal_Int16 _nWritingMode, const sal_Int16 _nContextWritingMode )
{
- BOOL bEnableRTL = FALSE;
+ sal_Bool bEnableRTL = sal_False;
switch ( _nWritingMode )
{
- case WritingMode2::LR_TB: bEnableRTL = FALSE; break;
- case WritingMode2::RL_TB: bEnableRTL = TRUE; break;
+ case WritingMode2::LR_TB: bEnableRTL = sal_False; break;
+ case WritingMode2::RL_TB: bEnableRTL = sal_True; break;
case WritingMode2::CONTEXT:
{
// consult our ContextWritingMode. If it has an explicit RTL/LTR value, then use
@@ -1435,8 +1410,8 @@ namespace
// own window for its RTL mode
switch ( _nContextWritingMode )
{
- case WritingMode2::LR_TB: bEnableRTL = FALSE; break;
- case WritingMode2::RL_TB: bEnableRTL = TRUE; break;
+ case WritingMode2::LR_TB: bEnableRTL = sal_False; break;
+ case WritingMode2::RL_TB: bEnableRTL = sal_True; break;
case WritingMode2::CONTEXT:
{
const Window* pParent = _rWindow.GetParent();
@@ -1507,7 +1482,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
AllSettings aSettings = pWindow->GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
- USHORT nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY );
+ sal_uInt16 nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY );
switch ( nWheelBehavior )
{
case MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MOUSE_WHEEL_DISABLE; break;
@@ -1519,7 +1494,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aMouseSettings.SetWheelBehavior( nVclBehavior );
aSettings.SetMouseSettings( aMouseSettings );
- pWindow->SetSettings( aSettings, TRUE );
+ pWindow->SetSettings( aSettings, sal_True );
}
break;
@@ -1594,17 +1569,11 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
::rtl::OUString aURL;
if ( Value >>= aURL )
{
- String aHelpURL( aURL );
- String aPattern( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
- if ( aHelpURL.CompareIgnoreCaseToAscii( aPattern, aPattern.Len() ) == COMPARE_EQUAL )
- {
- String aID = aHelpURL.Copy( aPattern.Len() );
- pWindow->SetHelpId( aID.ToInt32() );
- }
+ INetURLObject aHelpURL( aURL );
+ if ( aHelpURL.GetProtocol() == INET_PROT_HID )
+ pWindow->SetHelpId( rtl::OUStringToOString( aHelpURL.GetURLPath(), RTL_TEXTENCODING_UTF8 ) );
else
- {
- pWindow->SetSmartHelpId( SmartId( aHelpURL ) );
- }
+ pWindow->SetHelpId( rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ) );
}
}
break;
@@ -1680,7 +1649,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
// support transparency only for special controls
pWindow->SetBackground();
pWindow->SetControlBackground();
- pWindow->SetPaintTransparent( TRUE );
+ pWindow->SetPaintTransparent( sal_True );
break;
}
@@ -1713,7 +1682,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case WINDOW_RADIOBUTTON:
case WINDOW_GROUPBOX:
case WINDOW_FIXEDLINE:
- pWindow->SetPaintTransparent( FALSE );
+ pWindow->SetPaintTransparent( sal_False );
default: ;
}
pWindow->Invalidate(); // Falls das Control nicht drauf reagiert
@@ -1945,7 +1914,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case BASEPROPERTY_REPEAT:
{
- sal_Bool bRepeat( FALSE );
+ sal_Bool bRepeat( sal_False );
Value >>= bRepeat;
WinBits nStyle = pWindow->GetStyle();
@@ -1968,7 +1937,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aMouseSettings.SetButtonRepeat( nRepeatDelay );
aSettings.SetMouseSettings( aMouseSettings );
- pWindow->SetSettings( aSettings, TRUE );
+ pWindow->SetSettings( aSettings, sal_True );
}
}
break;
@@ -2023,7 +1992,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:
{
- USHORT nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
+ sal_uInt16 nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
sal_Int16 nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY;
switch ( nVclBehavior )
{
@@ -2075,19 +2044,8 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
break;
case BASEPROPERTY_HELPURL:
{
- SmartId aSmartId = GetWindow()->GetSmartHelpId();
- if( aSmartId.HasString() )
- {
- String aStrHelpId = aSmartId.GetStr();
- aProp <<= ::rtl::OUString( aStrHelpId );
- }
- else
- {
- ::rtl::OUStringBuffer aURL;
- aURL.appendAscii( "HID:" );
- aURL.append( (sal_Int32) GetWindow()->GetHelpId() );
- aProp <<= aURL.makeStringAndClear();
- }
+ rtl::OUString aHelpId( rtl::OStringToOUString( GetWindow()->GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ aProp <<= ::rtl::OUString( aHelpId );
}
break;
case BASEPROPERTY_FONTDESCRIPTOR:
@@ -2358,9 +2316,9 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
// #i40647# / 2005-01-18 / frank.schoenheit@sun.com
if ( !mpImpl->getDrawingOntoParent_ref() )
{
- FlagGuard aDrawingflagGuard( mpImpl->getDrawingOntoParent_ref() );
+ ::comphelper::FlagGuard aDrawingflagGuard( mpImpl->getDrawingOntoParent_ref() );
- BOOL bWasVisible = pWindow->IsVisible();
+ sal_Bool bWasVisible = pWindow->IsVisible();
Point aOldPos( pWindow->GetPosPixel() );
if ( bWasVisible && aOldPos == aPos )
@@ -2385,7 +2343,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
pWindow->SetPosPixel( aOldPos );
if ( bWasVisible )
- pWindow->Show( TRUE );
+ pWindow->Show( sal_True );
}
}
else if ( pDev )
@@ -2404,12 +2362,12 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
}
else
{
- BOOL bOldNW =pWindow->IsNativeWidgetEnabled();
+ sal_Bool bOldNW =pWindow->IsNativeWidgetEnabled();
if( bOldNW )
- pWindow->EnableNativeWidget(FALSE);
+ pWindow->EnableNativeWidget(sal_False);
pWindow->PaintToDevice( pDev, aP, aSz );
if( bOldNW )
- pWindow->EnableNativeWidget(TRUE);
+ pWindow->EnableNativeWidget(sal_True);
}
}
}
@@ -2505,7 +2463,7 @@ sal_Bool SAL_CALL VCLXWindow::isFloating( ) throw (::com::sun::star::uno::Runti
if( pWindow )
return Window::GetDockingManager()->IsFloating( pWindow );
else
- return FALSE;
+ return sal_False;
}
void SAL_CALL VCLXWindow::setFloatingMode( sal_Bool bFloating ) throw (::com::sun::star::uno::RuntimeException)
@@ -2525,7 +2483,7 @@ sal_Bool SAL_CALL VCLXWindow::isLocked( ) throw (::com::sun::star::uno::Runtime
if( pWindow )
return Window::GetDockingManager()->IsLocked( pWindow );
else
- return FALSE;
+ return sal_False;
}
void SAL_CALL VCLXWindow::lock( ) throw (::com::sun::star::uno::RuntimeException)
@@ -2556,7 +2514,7 @@ sal_Bool SAL_CALL VCLXWindow::isInPopupMode( ) throw (::com::sun::star::uno::Ru
{
// TODO: remove interface in the next incompatible build
SolarMutexGuard aGuard;
- return FALSE;
+ return sal_False;
}
@@ -2598,7 +2556,7 @@ sal_Bool SAL_CALL VCLXWindow::isVisible( ) throw (::com::sun::star::uno::Runtim
if( GetWindow() )
return GetWindow()->IsVisible();
else
- return FALSE;
+ return sal_False;
}
sal_Bool SAL_CALL VCLXWindow::isActive( ) throw (::com::sun::star::uno::RuntimeException)
@@ -2607,7 +2565,7 @@ sal_Bool SAL_CALL VCLXWindow::isActive( ) throw (::com::sun::star::uno::Runtime
if( GetWindow() )
return GetWindow()->IsActive();
else
- return FALSE;
+ return sal_False;
}
@@ -2617,7 +2575,7 @@ sal_Bool SAL_CALL VCLXWindow::isEnabled( ) throw (::com::sun::star::uno::Runtim
if( GetWindow() )
return GetWindow()->IsEnabled();
else
- return FALSE;
+ return sal_False;
}
sal_Bool SAL_CALL VCLXWindow::hasFocus( ) throw (::com::sun::star::uno::RuntimeException)
@@ -2626,7 +2584,7 @@ sal_Bool SAL_CALL VCLXWindow::hasFocus( ) throw (::com::sun::star::uno::Runtime
if( GetWindow() )
return GetWindow()->HasFocus();
else
- return FALSE;
+ return sal_False;
}
// ::com::sun::star::beans::XPropertySetInfo
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 5f1640a69139..de6be4c34ef7 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -93,7 +93,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
// create system parent data
SystemParentData aSysParentData;
aSysParentData.nSize = sizeof ( SystemParentData );
-#if defined( WIN ) || defined( WNT ) || defined ( OS2 )
+#if defined( WNT ) || defined ( OS2 )
aSysParentData.hWnd = (HWND) nHandle;
#elif defined( QUARTZ )
aSysParentData.pView = reinterpret_cast<NSView*>(nHandle);
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 3031cb70b6cc..cb1dbff80386 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -38,6 +38,7 @@
#include <toolkit/helper/imagealign.hxx>
#include <toolkit/helper/accessibilityclient.hxx>
#include <toolkit/helper/fixedhyperbase.hxx>
+#include <toolkit/helper/tkresmgr.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/awt/VisualEffect.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -61,6 +62,7 @@
#include <vcl/scrbar.hxx>
#include <vcl/svapp.hxx>
#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
#include <tools/diagnose_ex.h>
#include <boost/bind.hpp>
@@ -134,24 +136,24 @@ namespace toolkit
sal_Int32 nWhiteLuminance = Color( COL_WHITE ).GetLuminance();
Color aLightShadow( nBackgroundColor );
- aLightShadow.IncreaseLuminance( (UINT8)( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
+ aLightShadow.IncreaseLuminance( (sal_uInt8)( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
aStyleSettings.SetLightBorderColor( aLightShadow );
Color aLight( nBackgroundColor );
- aLight.IncreaseLuminance( (UINT8)( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
+ aLight.IncreaseLuminance( (sal_uInt8)( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
aStyleSettings.SetLightColor( aLight );
Color aShadow( nBackgroundColor );
- aShadow.DecreaseLuminance( (UINT8)( nBackgroundLuminance * 1 / 3 ) );
+ aShadow.DecreaseLuminance( (sal_uInt8)( nBackgroundLuminance * 1 / 3 ) );
aStyleSettings.SetShadowColor( aShadow );
Color aDarkShadow( nBackgroundColor );
- aDarkShadow.DecreaseLuminance( (UINT8)( nBackgroundLuminance * 2 / 3 ) );
+ aDarkShadow.DecreaseLuminance( (sal_uInt8)( nBackgroundLuminance * 2 / 3 ) );
aStyleSettings.SetDarkShadowColor( aDarkShadow );
}
aSettings.SetStyleSettings( aStyleSettings );
- _pWindow->SetSettings( aSettings, TRUE );
+ _pWindow->SetSettings( aSettings, sal_True );
}
Any getButtonLikeFaceColor( const Window* _pWindow )
@@ -172,7 +174,7 @@ namespace toolkit
_pWindow->SetStyle( nStyle );
}
- static void setVisualEffect( const Any& _rValue, Window* _pWindow, void (StyleSettings::*pSetter)( USHORT ), sal_Int16 _nFlatBits, sal_Int16 _n3DBits )
+ static void setVisualEffect( const Any& _rValue, Window* _pWindow )
{
AllSettings aSettings = _pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
@@ -182,22 +184,22 @@ namespace toolkit
switch ( nStyle )
{
case FLAT:
- (aStyleSettings.*pSetter)( _nFlatBits );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() & ~STYLE_OPTION_MONO );
break;
case LOOK3D:
default:
- (aStyleSettings.*pSetter)( _n3DBits );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO );
}
aSettings.SetStyleSettings( aStyleSettings );
_pWindow->SetSettings( aSettings );
}
- static Any getVisualEffect( Window* _pWindow, USHORT (StyleSettings::*pGetter)( ) const, sal_Int16 _nFlatBits )
+ static Any getVisualEffect( Window* _pWindow )
{
Any aEffect;
StyleSettings aStyleSettings = _pWindow->GetSettings().GetStyleSettings();
- if ( (aStyleSettings.*pGetter)() == _nFlatBits )
+ if ( (aStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
aEffect <<= (sal_Int16)FLAT;
else
aEffect <<= (sal_Int16)LOOK3D;
@@ -218,7 +220,7 @@ void VCLXGraphicControl::ImplSetNewImage()
{
OSL_PRECOND( GetWindow(), "VCLXGraphicControl::ImplSetNewImage: window is required to be not-NULL!" );
Button* pButton = static_cast< Button* >( GetWindow() );
- pButton->SetModeBitmap( GetBitmap() );
+ pButton->SetModeImage( GetImage() );
}
void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) throw(::com::sun::star::uno::RuntimeException)
@@ -658,14 +660,14 @@ void VCLXImageControl::ImplSetNewImage()
{
OSL_PRECOND( GetWindow(), "VCLXImageControl::ImplSetNewImage: window is required to be not-NULL!" );
ImageControl* pControl = static_cast< ImageControl* >( GetWindow() );
- pControl->SetBitmap( GetBitmap() );
+ pControl->SetImage( GetImage() );
}
::com::sun::star::awt::Size VCLXImageControl::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
- Size aSz = GetBitmap().GetSizePixel();
+ Size aSz = GetImage().GetSizePixel();
aSz = ImplCalcWindowSize( aSz );
return AWTSize(aSz);
@@ -959,7 +961,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com
switch ( nPropType )
{
case BASEPROPERTY_VISUALEFFECT:
- ::toolkit::setVisualEffect( Value, pCheckBox, &StyleSettings::SetCheckBoxStyle, STYLE_CHECKBOX_MONO, STYLE_CHECKBOX_WIN );
+ ::toolkit::setVisualEffect( Value, pCheckBox );
break;
case BASEPROPERTY_TRISTATE:
@@ -996,7 +998,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com
switch ( nPropType )
{
case BASEPROPERTY_VISUALEFFECT:
- aProp = ::toolkit::getVisualEffect( pCheckBox, &StyleSettings::GetCheckBoxStyle, STYLE_CHECKBOX_MONO );
+ aProp = ::toolkit::getVisualEffect( pCheckBox );
break;
case BASEPROPERTY_TRISTATE:
aProp <<= (sal_Bool)pCheckBox->IsTriStateEnabled();
@@ -1131,7 +1133,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::
switch ( nPropType )
{
case BASEPROPERTY_VISUALEFFECT:
- ::toolkit::setVisualEffect( Value, pButton, &StyleSettings::SetRadioButtonStyle, STYLE_RADIOBUTTON_MONO, STYLE_RADIOBUTTON_WIN );
+ ::toolkit::setVisualEffect( Value, pButton );
break;
case BASEPROPERTY_STATE:
@@ -1139,7 +1141,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::
sal_Int16 n = sal_Int16();
if ( Value >>= n )
{
- BOOL b = n ? sal_True : sal_False;
+ sal_Bool b = n ? sal_True : sal_False;
if ( pButton->IsRadioCheckEnabled() )
pButton->Check( b );
else
@@ -1174,7 +1176,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::
switch ( nPropType )
{
case BASEPROPERTY_VISUALEFFECT:
- aProp = ::toolkit::getVisualEffect( pButton, &StyleSettings::GetRadioButtonStyle, STYLE_RADIOBUTTON_MONO );
+ aProp = ::toolkit::getVisualEffect( pButton );
break;
case BASEPROPERTY_STATE:
aProp <<= (sal_Int16) ( pButton->IsChecked() ? 1 : 0 );
@@ -1307,11 +1309,11 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
aEvent.ActionCommand = maActionCommand;
maActionListeners.actionPerformed( aEvent );
}
- ImplClickedOrToggled( FALSE );
+ ImplClickedOrToggled( sal_False );
break;
case VCLEVENT_RADIOBUTTON_TOGGLE:
- ImplClickedOrToggled( TRUE );
+ ImplClickedOrToggled( sal_True );
break;
default:
@@ -1320,7 +1322,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
}
}
-void VCLXRadioButton::ImplClickedOrToggled( BOOL bToggled )
+void VCLXRadioButton::ImplClickedOrToggled( sal_Bool bToggled )
{
// In the formulars, RadioChecked is not enabled, call itemStateChanged only for click
// In the dialog editor, RadioChecked is enabled, call itemStateChanged only for bToggled
@@ -1712,14 +1714,14 @@ void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int1
ListBox* pBox = (ListBox*) GetWindow();
if ( pBox )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
for ( sal_uInt16 n = (sal_uInt16)aPositions.getLength(); n; )
{
- USHORT nPos = (USHORT) aPositions.getConstArray()[--n];
+ sal_uInt16 nPos = (sal_uInt16) aPositions.getConstArray()[--n];
if ( pBox->IsEntryPosSelected( nPos ) != bSelect )
{
pBox->SelectEntryPos( nPos, bSelect );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -2063,34 +2065,32 @@ void VCLXListBox::ImplCallItemListeners()
maItemListeners.itemStateChanged( aEvent );
}
}
-
namespace
{
- Image lcl_getImageFromURL( const ::rtl::OUString& i_rImageURL )
- {
- if ( !i_rImageURL.getLength() )
- return Image();
+ Image lcl_getImageFromURL( const ::rtl::OUString& i_rImageURL )
+ {
+ if ( !i_rImageURL.getLength() )
+ return Image();
try
{
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- Reference< XGraphicProvider > xProvider;
- if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
- {
- ::comphelper::NamedValueCollection aMediaProperties;
- aMediaProperties.put( "URL", i_rImageURL );
- Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XGraphicProvider > xProvider;
+ if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ aMediaProperties.put( "URL", i_rImageURL );
+ Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
return Image( xGraphic );
- }
- }
- catch( const uno::Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return Image();
- }
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return Image();
+ }
}
-
void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
@@ -2102,7 +2102,7 @@ void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) thr
"VCLXListBox::listItemInserted: illegal (inconsistent) item position!" );
pListBox->InsertEntry(
i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString(),
- i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
+ i_rEvent.ItemImageURL.IsPresent ? TkResMgr::getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
i_rEvent.ItemPosition );
}
@@ -2132,7 +2132,7 @@ void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) thr
// VCL's ListBox does not support changing an entry's text or image, so remove and re-insert
const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString( pListBox->GetEntry( i_rEvent.ItemPosition ) );
- const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) );
+ const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? TkResMgr::getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) );
pListBox->RemoveEntry( i_rEvent.ItemPosition );
pListBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
@@ -2322,13 +2322,13 @@ void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result ) throw (RuntimeExcept
pDialog->EndDialog( i_result );
}
-void SAL_CALL VCLXDialog::setHelpId( ::sal_Int32 i_id ) throw (RuntimeException)
+void SAL_CALL VCLXDialog::setHelpId( const ::rtl::OUString& rId ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
Window* pWindow = GetWindow();
if ( pWindow )
- pWindow->SetHelpId( i_id );
+ pWindow->SetHelpId( rtl::OUStringToOString( rId, RTL_TEXTENCODING_UTF8 ) );
}
void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException)
@@ -2672,10 +2672,10 @@ sal_Int32 SAL_CALL VCLXMultiPage::insertTab() throw (uno::RuntimeException)
return static_cast< sal_Int32 >( insertTab( pTab, title ) );
}
-USHORT VCLXMultiPage::insertTab( TabPage* pPage, rtl::OUString& sTitle )
+sal_uInt16 VCLXMultiPage::insertTab( TabPage* pPage, rtl::OUString& sTitle )
{
TabControl *pTabControl = getTabControl();
- USHORT id = sal::static_int_cast< USHORT >( mTabId++ );
+ sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ );
pTabControl->InsertPage( id, sTitle.getStr(), TAB_APPEND );
pTabControl->SetTabPage( id, pPage );
return id;
@@ -2684,18 +2684,18 @@ USHORT VCLXMultiPage::insertTab( TabPage* pPage, rtl::OUString& sTitle )
void SAL_CALL VCLXMultiPage::removeTab( sal_Int32 ID ) throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw lang::IndexOutOfBoundsException();
- pTabControl->RemovePage( sal::static_int_cast< USHORT >( ID ) );
+ pTabControl->RemovePage( sal::static_int_cast< sal_uInt16 >( ID ) );
}
void SAL_CALL VCLXMultiPage::activateTab( sal_Int32 ID ) throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
OSL_TRACE("Attempting to activate tab %d, active tab is %d, numtabs is %d", ID, getActiveTabID(), getWindows().getLength() );
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw lang::IndexOutOfBoundsException();
- pTabControl->SelectTabPage( sal::static_int_cast< USHORT >( ID ) );
+ pTabControl->SelectTabPage( sal::static_int_cast< sal_uInt16 >( ID ) );
}
sal_Int32 SAL_CALL VCLXMultiPage::getActiveTabID() throw (uno::RuntimeException)
@@ -2719,7 +2719,7 @@ void SAL_CALL VCLXMultiPage::setTabProps( sal_Int32 ID, const uno::Sequence< bea
{
SolarMutexGuard aGuard;
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw lang::IndexOutOfBoundsException();
for ( int i = 0; i < Properties.getLength(); i++ )
@@ -2730,7 +2730,7 @@ void SAL_CALL VCLXMultiPage::setTabProps( sal_Int32 ID, const uno::Sequence< bea
if ( name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) )
{
rtl::OUString title = value.get<rtl::OUString>();
- pTabControl->SetPageText( sal::static_int_cast< USHORT >( ID ), title.getStr() );
+ pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() );
}
}
}
@@ -2740,7 +2740,7 @@ uno::Sequence< beans::NamedValue > SAL_CALL VCLXMultiPage::getTabProps( sal_Int3
{
SolarMutexGuard aGuard;
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw lang::IndexOutOfBoundsException();
#define ADD_PROP( seq, i, name, val ) { \
@@ -2751,8 +2751,8 @@ uno::Sequence< beans::NamedValue > SAL_CALL VCLXMultiPage::getTabProps( sal_Int3
}
uno::Sequence< beans::NamedValue > props( 2 );
- ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< USHORT >( ID ) ) ) );
- ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< USHORT >( ID ) ) );
+ ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) ) ) );
+ ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) ) );
#undef ADD_PROP
return props;
}
@@ -2763,14 +2763,14 @@ void VCLXMultiPage::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
case VCLEVENT_TABPAGE_DEACTIVATE:
{
- ULONG nPageID = (ULONG)( rVclWindowEvent.GetData() );
+ sal_uLong nPageID = (sal_uLong)( rVclWindowEvent.GetData() );
maTabListeners.deactivated( nPageID );
break;
}
case VCLEVENT_TABPAGE_ACTIVATE:
{
- ULONG nPageID = (ULONG)( rVclWindowEvent.GetData() );
+ sal_uLong nPageID = (sal_uLong)( rVclWindowEvent.GetData() );
maTabListeners.activated( nPageID );
break;
}
@@ -2888,6 +2888,15 @@ throw(::com::sun::star::uno::RuntimeException)
}
}
break;
+ case BASEPROPERTY_TITLE:
+ {
+ ::rtl::OUString sTitle;
+ if ( Value >>= sTitle )
+ {
+ pTabPage->SetText(sTitle);
+ }
+ }
+ break;
default:
{
@@ -3594,7 +3603,7 @@ void VCLXScrollBar::setProperty( const ::rtl::OUString& PropertyName, const ::co
}
AllSettings aSettings( pScrollBar->GetSettings() );
StyleSettings aStyle( aSettings.GetStyleSettings() );
- ULONG nDragOptions = aStyle.GetDragFullOptions();
+ sal_uLong nDragOptions = aStyle.GetDragFullOptions();
if ( bDo )
nDragOptions |= DRAGFULL_OPTION_SCROLL;
else
diff --git a/toolkit/source/awt/xsimpleanimation.cxx b/toolkit/source/awt/xsimpleanimation.cxx
index f11dd3f547a5..b67768ddfebf 100644
--- a/toolkit/source/awt/xsimpleanimation.cxx
+++ b/toolkit/source/awt/xsimpleanimation.cxx
@@ -30,9 +30,8 @@
#include "precompiled_toolkit.hxx"
#include "toolkit/awt/xsimpleanimation.hxx"
#include "toolkit/helper/property.hxx"
-#include "toolkit/helper/throbberimpl.hxx"
#include <tools/debug.hxx>
-
+#include <vcl/throbber.hxx>
#include <vcl/svapp.hxx>
//........................................................................
@@ -51,53 +50,40 @@ namespace toolkit
XSimpleAnimation::XSimpleAnimation()
{
DBG_CTOR( XSimpleAnimation, NULL );
- mbRepeat = sal_True;
- mnStepTime = 100;
- mpThrobber = new Throbber_Impl( this, mnStepTime, mbRepeat );
}
//--------------------------------------------------------------------
XSimpleAnimation::~XSimpleAnimation()
{
DBG_DTOR( XSimpleAnimation, NULL );
- delete mpThrobber;
}
//--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XINTERFACE2( XSimpleAnimation, VCLXWindow, XSimpleAnimation_Base )
-
- //--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XTYPEPROVIDER2( XSimpleAnimation, VCLXWindow, XSimpleAnimation_Base )
-
- //--------------------------------------------------------------------
void SAL_CALL XSimpleAnimation::start() throw ( uno::RuntimeException )
{
- mpThrobber->start();
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->start();
}
//--------------------------------------------------------------------
void SAL_CALL XSimpleAnimation::stop() throw ( uno::RuntimeException )
{
- mpThrobber->stop();
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->stop();
}
//--------------------------------------------------------------------
void SAL_CALL XSimpleAnimation::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList )
throw ( uno::RuntimeException )
{
- mpThrobber->setImageList( rImageList );
- }
-
- //--------------------------------------------------------------------
- void XSimpleAnimation::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
- {
- // TODO: XSimpleAnimation::ProcessWindowEvent
- //Reference< XSimpleAnimation > xKeepAlive( this );
- //SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
- //if ( !pSpinButton )
- // return;
-
- VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->setImageList( rImageList );
}
//--------------------------------------------------------------------
@@ -106,33 +92,31 @@ namespace toolkit
{
SolarMutexGuard aGuard;
- if ( GetWindow() )
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ {
+ VCLXWindow::setProperty( PropertyName, Value );
+ return;
+ }
+
+ sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
+ switch ( nPropertyId )
{
- sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
- switch ( nPropertyId )
- {
- case BASEPROPERTY_STEP_TIME: {
- sal_Int32 nStepTime( 0 );
- if ( Value >>= nStepTime )
- {
- mnStepTime = nStepTime;
- mpThrobber->setStepTime( mnStepTime );
- }
-
- break;
- }
- case BASEPROPERTY_REPEAT: {
- sal_Bool bRepeat( sal_True );
- if ( Value >>= bRepeat )
- {
- mbRepeat = bRepeat;
- mpThrobber->setRepeat( mbRepeat );
- }
- break;
- }
- default:
- VCLXWindow::setProperty( PropertyName, Value );
+ case BASEPROPERTY_STEP_TIME: {
+ sal_Int32 nStepTime( 0 );
+ if ( Value >>= nStepTime )
+ pThrobber->setStepTime( nStepTime );
+
+ break;
}
+ case BASEPROPERTY_REPEAT: {
+ sal_Bool bRepeat( sal_True );
+ if ( Value >>= bRepeat )
+ pThrobber->setRepeat( bRepeat );
+ break;
+ }
+ default:
+ VCLXWindow::setProperty( PropertyName, Value );
}
}
@@ -142,22 +126,22 @@ namespace toolkit
{
SolarMutexGuard aGuard;
- uno::Any aReturn;
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ return VCLXWindow::getProperty( PropertyName );
- if ( GetWindow() )
+ uno::Any aReturn;
+ sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
+ switch ( nPropertyId )
{
- sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
- switch ( nPropertyId )
- {
- case BASEPROPERTY_STEP_TIME:
- aReturn <<= mnStepTime;
- break;
- case BASEPROPERTY_REPEAT:
- aReturn <<= mbRepeat;
- break;
- default:
- aReturn = VCLXWindow::getProperty( PropertyName );
- }
+ case BASEPROPERTY_STEP_TIME:
+ aReturn <<= pThrobber->getStepTime();
+ break;
+ case BASEPROPERTY_REPEAT:
+ aReturn <<= pThrobber->getRepeat();
+ break;
+ default:
+ aReturn = VCLXWindow::getProperty( PropertyName );
}
return aReturn;
}
diff --git a/toolkit/source/awt/xthrobber.cxx b/toolkit/source/awt/xthrobber.cxx
index 5f015953132c..bc96712eb0ef 100644
--- a/toolkit/source/awt/xthrobber.cxx
+++ b/toolkit/source/awt/xthrobber.cxx
@@ -31,13 +31,13 @@
#include "toolkit/awt/xthrobber.hxx"
#include "toolkit/helper/property.hxx"
#include <toolkit/helper/tkresmgr.hxx>
-#include <toolkit/helper/throbberimpl.hxx>
#include "xthrobber.hrc"
#include <tools/debug.hxx>
#include <vcl/fixed.hxx>
#include <vcl/timer.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/throbber.hxx>
//........................................................................
namespace toolkit
@@ -55,88 +55,49 @@ namespace toolkit
XThrobber::XThrobber()
{
DBG_CTOR( XThrobber, NULL );
-
- mpThrobber = new Throbber_Impl( this, 100, sal_True );
-
- InitImageList();
}
//--------------------------------------------------------------------
XThrobber::~XThrobber()
{
DBG_DTOR( XThrobber, NULL );
- delete mpThrobber;
}
//--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XINTERFACE2( XThrobber, VCLXWindow, XThrobber_Base )
-
- //--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XTYPEPROVIDER2( XThrobber, VCLXWindow, XThrobber_Base )
-
- //--------------------------------------------------------------------
void SAL_CALL XThrobber::start() throw ( uno::RuntimeException )
{
- mpThrobber->start();
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->start();
}
//--------------------------------------------------------------------
void SAL_CALL XThrobber::stop() throw ( uno::RuntimeException )
{
- mpThrobber->stop();
- }
-
- //--------------------------------------------------------------------
- void XThrobber::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
- {
- static bool bInit = false;
- if ( !bInit )
- {
- // Images won't be shown if set too early
- mpThrobber->initImage();
- bInit = true;
- }
- // TODO: XSimpleAnimation::ProcessWindowEvent
- //Reference< XSimpleAnimation > xKeepAlive( this );
- //SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
- //if ( !pSpinButton )
- // return;
-
- VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL XThrobber::setProperty( const ::rtl::OUString& PropertyName, const uno::Any& Value )
- throw( uno::RuntimeException )
- {
SolarMutexGuard aGuard;
-
- if ( GetWindow() )
- {
- VCLXWindow::setProperty( PropertyName, Value );
- }
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->stop();
}
//--------------------------------------------------------------------
- uno::Any SAL_CALL XThrobber::getProperty( const ::rtl::OUString& PropertyName )
- throw( uno::RuntimeException )
+ void XThrobber::SetWindow( Window* pWindow )
{
- SolarMutexGuard aGuard;
-
- uno::Any aReturn;
-
- if ( GetWindow() )
- {
- aReturn = VCLXWindow::getProperty( PropertyName );
- }
- return aReturn;
+ XThrobber_Base::SetWindow( pWindow );
+ InitImageList();
}
//--------------------------------------------------------------------
void SAL_CALL XThrobber::InitImageList()
throw( uno::RuntimeException )
{
- SolarMutexGuard aGuard;
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL)
+ return;
+
uno::Sequence< uno::Reference< graphic::XGraphic > > aImageList(12);
sal_uInt16 nIconIdStart = RID_TK_ICON_THROBBER_START;
@@ -146,7 +107,7 @@ namespace toolkit
aImageList[i] = aImage.GetXGraphic();
}
- mpThrobber->setImageList( aImageList );
+ pThrobber->setImageList( aImageList );
}
//........................................................................