67d2af6fac
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
1128 lines
45 KiB
C++
1128 lines
45 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*************************************************************************
|
|
*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* This file is part of OpenOffice.org.
|
|
*
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
* only, as published by the Free Software Foundation.
|
|
*
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License version 3 for more details
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
* <http://www.openoffice.org/license.html>
|
|
* for a copy of the LGPLv3 License.
|
|
*
|
|
************************************************************************/
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
#include "precompiled_svtools.hxx"
|
|
#include <stdio.h>
|
|
#include <cppuhelper/servicefactory.hxx>
|
|
#include <comphelper/processfactory.hxx>
|
|
|
|
#include <unotools/calendarwrapper.hxx>
|
|
#include <unotools/localedatawrapper.hxx>
|
|
|
|
#include <vcl/wrkwin.hxx>
|
|
#include <vcl/dialog.hxx>
|
|
#include <vcl/msgbox.hxx>
|
|
#include <vcl/print.hxx>
|
|
#include <vcl/svapp.hxx>
|
|
#include <vcl/help.hxx>
|
|
#include <vcl/fixed.hxx>
|
|
#include <vcl/button.hxx>
|
|
#include <vcl/scrbar.hxx>
|
|
#include <vcl/slider.hxx>
|
|
#include <vcl/group.hxx>
|
|
#include <vcl/toolbox.hxx>
|
|
#include <vcl/status.hxx>
|
|
#include <stdmenu.hxx>
|
|
#include <ctrltool.hxx>
|
|
#include <ctrlbox.hxx>
|
|
#include <tabbar.hxx>
|
|
#include <svtools/valueset.hxx>
|
|
#include <svtools/headbar.hxx>
|
|
#include <prgsbar.hxx>
|
|
#include <calendar.hxx>
|
|
#include <svtools/prnsetup.hxx>
|
|
#include <svtools/printdlg.hxx>
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class MyApp : public Application
|
|
{
|
|
public:
|
|
void Main();
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class ShowBitmap : public WorkWindow
|
|
{
|
|
Bitmap aBmp;
|
|
|
|
public:
|
|
ShowBitmap( Window* pParent, const Bitmap& rBmp );
|
|
|
|
virtual void Paint( const Rectangle& );
|
|
virtual sal_Bool Close();
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class ShowFont : public Control
|
|
{
|
|
public:
|
|
ShowFont( Window* pParent );
|
|
|
|
virtual void Paint( const Rectangle& );
|
|
void SetFont( const Font& rFont )
|
|
{ Invalidate(); Control::SetFont( rFont ); }
|
|
};
|
|
|
|
// --- class OrientSlider ------------------------------------------------
|
|
|
|
class OrientSlider : public Slider
|
|
{
|
|
public:
|
|
OrientSlider( Window* pParent );
|
|
|
|
short GetOrientation() const { return (short)GetThumbPos(); }
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
OrientSlider::OrientSlider( Window* pParent ) :
|
|
Slider( pParent, WB_HORZ | WB_DRAG )
|
|
{
|
|
SetThumbPos( 0 );
|
|
SetLineSize( 10 );
|
|
SetPageSize( 100 );
|
|
SetRange( Range( 0, 3600 ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class MyFontDialog : public ModalDialog
|
|
{
|
|
private:
|
|
FontList* pList;
|
|
Font aCurFont;
|
|
Printer aPrinter;
|
|
FontNameBox aFontBox;
|
|
FontStyleBox aStyleBox;
|
|
FontSizeBox aSizeBox;
|
|
ListBox aUnderlineBox;
|
|
ListBox aStrikeoutBox;
|
|
CheckBox aWordLineBox;
|
|
CheckBox aShadowBox;
|
|
CheckBox aOutlineBox;
|
|
ColorListBox aColorBox;
|
|
GroupBox aEffectBox;
|
|
OrientSlider aLineOrientSlider;
|
|
ShowFont aShowFont;
|
|
GroupBox aSampleBox;
|
|
FixedText aMapText;
|
|
OKButton aOKBtn;
|
|
CancelButton aCancelBtn;
|
|
|
|
public:
|
|
MyFontDialog( Window* pParent );
|
|
|
|
DECL_LINK( SelectFont, ComboBox* );
|
|
DECL_LINK( SelectStyle, ComboBox* );
|
|
DECL_LINK( AttrHdl, Window * );
|
|
void SetAttr();
|
|
short Execute();
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class MyTabBar : public TabBar
|
|
{
|
|
public:
|
|
MyTabBar( Window* pParent,
|
|
WinBits nWinStyle = WB_STDTABBAR ) :
|
|
TabBar( pParent, nWinStyle ) {}
|
|
|
|
virtual long DeactivatePage();
|
|
virtual long AllowRenaming();
|
|
virtual void Split();
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class MyCalendar : public WorkWindow
|
|
{
|
|
MenuBar aMenuBar;
|
|
PopupMenu aWeekStartMenu;
|
|
PopupMenu aWeekCountMenu;
|
|
Calendar aCalendar;
|
|
Color aInfoColor;
|
|
Color aHolidayColor;
|
|
Color aFrameColor;
|
|
|
|
public:
|
|
MyCalendar( Window* pParent );
|
|
~MyCalendar();
|
|
|
|
DECL_LINK( RequestDateInfoHdl, Calendar* );
|
|
DECL_LINK( DoubleClickHdl, Calendar* );
|
|
DECL_LINK( MenuSelectHdl, Menu* );
|
|
|
|
void Resize();
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
class MyWin : public WorkWindow
|
|
{
|
|
private:
|
|
Printer aPrn;
|
|
ToolBox aBox;
|
|
StatusBar aBar;
|
|
HeaderBar aHeadBar;
|
|
ColorListBox aColorList;
|
|
LineListBox aLineList;
|
|
ValueSet aValueSet;
|
|
CalendarField aCalendarField;
|
|
CalendarField aCalendarField2;
|
|
MyTabBar aTabBar;
|
|
ProgressBar aPrgsBar;
|
|
PushButton aFontBtn;
|
|
PushButton aCalendarBtn;
|
|
PushButton aPrnSetupBtn;
|
|
PushButton aPrnDlgBtn;
|
|
Size aBoxSize;
|
|
MyCalendar* pCalendar;
|
|
PopupMenu* pMenu;
|
|
FontNameMenu* pNameMenu;
|
|
FontStyleMenu* pStyleMenu;
|
|
FontSizeMenu* pSizeMenu;
|
|
|
|
public:
|
|
MyWin( Window* pParent, WinBits aWinStyle );
|
|
~MyWin();
|
|
|
|
DECL_LINK( Test, PushButton* );
|
|
DECL_LINK( SelectHdl, Window* );
|
|
DECL_LINK( CalSelectHdl, CalendarField* );
|
|
void ContextMenu( const Point& rPos );
|
|
|
|
void Command( const CommandEvent& rCEvt );
|
|
void MouseButtonDown( const MouseEvent& rMEvt );
|
|
void KeyInput( const KeyEvent& rKEvt );
|
|
void Paint( const Rectangle& rRect );
|
|
void Resize();
|
|
};
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyApp::Main()
|
|
{
|
|
try
|
|
{
|
|
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
|
|
xMSF = cppu::createRegistryServiceFactory(
|
|
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
|
|
|
|
::comphelper::setProcessServiceFactory( xMSF );
|
|
|
|
Help aHelp;
|
|
SetHelp( &aHelp );
|
|
Help::EnableContextHelp();
|
|
Help::EnableExtHelp();
|
|
Help::EnableBalloonHelp();
|
|
Help::EnableQuickHelp();
|
|
|
|
MyWin aMainWin( NULL, WinBits( WB_APP | WB_STDWORK | WB_CLIPCHILDREN ) );
|
|
aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "SVTOOLS - Workbench" ) ) );
|
|
aMainWin.GrabFocus();
|
|
aMainWin.Show();
|
|
|
|
Execute();
|
|
}
|
|
catch ( com::sun::star::uno::Exception & e )
|
|
{
|
|
fprintf( stderr, "Error during bootstrapping servicemanager: %s\n" ,
|
|
rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
|
|
}
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
ShowBitmap::ShowBitmap( Window* pParent, const Bitmap& rBmp ) :
|
|
WorkWindow( pParent, WB_STDWORK ),
|
|
aBmp( rBmp )
|
|
{
|
|
SetOutputSizePixel( rBmp.GetSizePixel() );
|
|
SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Bitmap-Viewer" ) ) );
|
|
Show();
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void ShowBitmap::Paint( const Rectangle& )
|
|
{
|
|
DrawBitmap( Point(), GetOutputSizePixel(), aBmp );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
sal_Bool ShowBitmap::Close()
|
|
{
|
|
Hide();
|
|
delete this;
|
|
return sal_True;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
ShowFont::ShowFont( Window* pParent ) :
|
|
Control( pParent, WB_BORDER )
|
|
{
|
|
SetMapMode( MapMode( MAP_POINT, Point(),
|
|
Fraction( 1, 10 ), Fraction( 1, 10 ) ) );
|
|
SetBackground( Wallpaper( Color( COL_WHITE ) ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void ShowFont::Paint( const Rectangle& )
|
|
{
|
|
const Font& rFont = GetFont();
|
|
String aText;
|
|
Size aWindowSize( GetOutputSize() );
|
|
long x,y;
|
|
|
|
if ( rFont.GetOrientation() )
|
|
{
|
|
aText.Append( String::CreateFromInt32( rFont.GetOrientation()/10 ) );
|
|
aText.AppendAscii( " degree." );
|
|
|
|
x = aWindowSize.Width()/2;
|
|
y = aWindowSize.Height()/2;
|
|
}
|
|
else
|
|
{
|
|
aText = rFont.GetName();
|
|
if ( !aText.Len() )
|
|
aText.AssignAscii( "Sample" );
|
|
|
|
x = aWindowSize.Width()/2 - GetTextWidth( aText )/2;
|
|
y = aWindowSize.Height()/2 - GetTextHeight()/2;
|
|
}
|
|
|
|
DrawText( Point( x, y ), aText );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
MyFontDialog::MyFontDialog( Window* pParent ) :
|
|
ModalDialog( pParent, WB_3DLOOK | WB_STDMODAL ),
|
|
aFontBox( this ),
|
|
aStyleBox( this ),
|
|
aSizeBox( this ),
|
|
aUnderlineBox( this, WB_DROPDOWN ),
|
|
aStrikeoutBox( this, WB_DROPDOWN ),
|
|
aWordLineBox( this ),
|
|
aShadowBox( this ),
|
|
aOutlineBox( this ),
|
|
aColorBox( this, WB_DROPDOWN ),
|
|
aEffectBox( this ),
|
|
aLineOrientSlider( this ),
|
|
aShowFont( this ),
|
|
aSampleBox( this ),
|
|
aMapText( this, WB_LEFT | WB_WORDBREAK ),
|
|
aOKBtn( this, WB_DEFBUTTON ),
|
|
aCancelBtn( this )
|
|
{
|
|
pList = NULL;
|
|
|
|
aFontBox.EnableWYSIWYG( sal_True );
|
|
aFontBox.EnableSymbols( sal_True );
|
|
aFontBox.SetPosSizePixel( Point( 10, 10 ), Size( 140, 140 ) );
|
|
aFontBox.SetSelectHdl( LINK( this, MyFontDialog, SelectFont ) );
|
|
aFontBox.SetLoseFocusHdl( LINK( this, MyFontDialog, SelectFont ) );
|
|
aFontBox.Show();
|
|
|
|
aStyleBox.SetPosSizePixel( Point( 160, 10 ), Size( 100, 140 ) );
|
|
aStyleBox.SetSelectHdl( LINK( this, MyFontDialog, SelectStyle ) );
|
|
aStyleBox.SetLoseFocusHdl( LINK( this, MyFontDialog, SelectStyle ) );
|
|
aStyleBox.Show();
|
|
|
|
aSizeBox.SetPosSizePixel( Point( 270, 10 ), Size( 60, 140 ) );
|
|
aSizeBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aSizeBox.SetLoseFocusHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aSizeBox.Show();
|
|
|
|
aUnderlineBox.SetPosSizePixel( Point( 15, 180 ), Size( 130, 100 ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_NONE" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_SINGLE" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DOUBLE" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DOTTED" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DONTKNOW" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DASH" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_LONGDASH" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DASHDOT" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DASHDOTDOT" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_SMALLWAVE" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_WAVE" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_DOUBLEWAVE" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLD" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDOTTED" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDASH" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDLONGDASH" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDASHDOT" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDDASHDOTDOT" ) ) );
|
|
aUnderlineBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "UNDERLINE_BOLDWAVE" ) ) );
|
|
aUnderlineBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aUnderlineBox.Show();
|
|
|
|
aStrikeoutBox.SetPosSizePixel( Point( 15, 210 ), Size( 130, 100 ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_NONE" ) ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_SINGLE" ) ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_DOUBLE" ) ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_DONTKNOW" ) ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_BOLD" ) ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_SLASH" ) ) );
|
|
aStrikeoutBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "STRIKEOUT_X" ) ) );
|
|
aStrikeoutBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aStrikeoutBox.Show();
|
|
|
|
aWordLineBox.SetPosSizePixel( Point( 15, 240 ), Size( 130, 19 ) );
|
|
aWordLineBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Only ~Words" ) ) );
|
|
aWordLineBox.SetClickHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aWordLineBox.Show();
|
|
|
|
aShadowBox.SetPosSizePixel( Point( 15, 260 ), Size( 130, 19 ) );
|
|
aShadowBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Shadow" ) ) );
|
|
aShadowBox.SetClickHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aShadowBox.Show();
|
|
|
|
aOutlineBox.SetPosSizePixel( Point( 15, 280 ), Size( 130, 19 ) );
|
|
aOutlineBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Outline" ) ) );
|
|
aOutlineBox.SetClickHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aOutlineBox.Show();
|
|
|
|
{
|
|
aColorBox.SetPosSizePixel( Point( 15, 305 ), Size( 130, 100 ) );
|
|
aColorBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aColorBox.SetUpdateMode( sal_False );
|
|
aColorBox.InsertEntry( Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_CYAN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_RED ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_MAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_BROWN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_GRAY ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_LIGHTGRAY ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGray" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_LIGHTBLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightBlue" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_LIGHTGREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGreen" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_LIGHTCYAN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightCyan" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_LIGHTRED ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightRed" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
|
|
aColorBox.InsertEntry( Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
|
|
aColorBox.SetUpdateMode( sal_True );
|
|
aColorBox.Show();
|
|
}
|
|
|
|
aEffectBox.SetPosSizePixel( Point( 10, 160 ), Size( 140, 175 ) );
|
|
aEffectBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Effects" ) ) );
|
|
aEffectBox.Show();
|
|
|
|
Size aSliderSize = aLineOrientSlider.GetSizePixel();
|
|
aLineOrientSlider.SetPosSizePixel( Point( 160, 335-aSliderSize.Height() ),
|
|
Size( 250, aSliderSize.Height() ) );
|
|
aLineOrientSlider.SetSlideHdl( LINK( this, MyFontDialog, AttrHdl ) );
|
|
aLineOrientSlider.Show();
|
|
|
|
aShowFont.SetPosSizePixel( Point( 165, 180 ), Size( 240, 70 ) );
|
|
aShowFont.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Sample" ) ) );
|
|
aShowFont.Show();
|
|
|
|
aSampleBox.SetPosSizePixel( Point( 160, 160 ), Size( 250, 100 ) );
|
|
aSampleBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Sample" ) ) );
|
|
aSampleBox.Show();
|
|
|
|
aMapText.SetPosSizePixel( Point( 160, 270 ), Size( 250, 35 ) );
|
|
aMapText.Show();
|
|
|
|
aOKBtn.SetPosSizePixel( Point( 340, 10 ), Size( 70, 25 ) );
|
|
aOKBtn.Show();
|
|
|
|
aCancelBtn.SetPosSizePixel( Point( 340, 40 ), Size( 70, 25 ) );
|
|
aCancelBtn.Show();
|
|
|
|
SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "FontDialog" ) ) );
|
|
SetOutputSizePixel( Size( 420, 345 ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyFontDialog, SelectFont, ComboBox*, EMPTYARG )
|
|
{
|
|
aStyleBox.Fill( aFontBox.GetText(), pList );
|
|
FontInfo aInfo = pList->Get( aFontBox.GetText(), aStyleBox.GetText() );
|
|
aSizeBox.Fill( &aInfo, pList );
|
|
SetAttr();
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyFontDialog, SelectStyle, ComboBox*, EMPTYARG )
|
|
{
|
|
FontInfo aInfo = pList->Get( aFontBox.GetText(), aStyleBox.GetText() );
|
|
aSizeBox.Fill( &aInfo, pList );
|
|
SetAttr();
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyFontDialog, AttrHdl, Window*, EMPTYARG )
|
|
{
|
|
SetAttr();
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyFontDialog::SetAttr()
|
|
{
|
|
FontInfo aFont( pList->Get( aFontBox.GetText(), aStyleBox.GetText() ) );
|
|
aFont.SetSize( Size( 0, aSizeBox.GetValue() ) );
|
|
aFont.SetUnderline( (FontUnderline)aUnderlineBox.GetSelectEntryPos() );
|
|
aFont.SetStrikeout( (FontStrikeout)aStrikeoutBox.GetSelectEntryPos() );
|
|
aFont.SetColor( Color( (ColorData)aColorBox.GetSelectEntryPos() ) );
|
|
aFont.SetWordLineMode( aWordLineBox.IsChecked() );
|
|
aFont.SetShadow( aShadowBox.IsChecked() );
|
|
aFont.SetOutline( aOutlineBox.IsChecked() );
|
|
aFont.SetOrientation( aLineOrientSlider.GetOrientation() );
|
|
aFont.SetTransparent( sal_True );
|
|
aMapText.SetText( pList->GetFontMapText( aFont ) );
|
|
aShowFont.SetFont( aFont );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
short MyFontDialog::Execute()
|
|
{
|
|
pList = new FontList( &aPrinter, this );
|
|
aFontBox.Fill( pList );
|
|
aSizeBox.SetValue( 120 );
|
|
aUnderlineBox.SelectEntryPos( 0 );
|
|
aStrikeoutBox.SelectEntryPos( 0 );
|
|
aColorBox.SelectEntryPos( 0 );
|
|
SelectFont( &aFontBox );
|
|
short nRet = ModalDialog::Execute();
|
|
delete pList;
|
|
return nRet;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
long MyTabBar::DeactivatePage()
|
|
{
|
|
if ( GetCurPageId() == 6 )
|
|
{
|
|
QueryBox aQueryBox( this, WB_YES_NO | WB_DEF_YES,
|
|
XubString( RTL_CONSTASCII_USTRINGPARAM( "Deactivate" ) ) );
|
|
if ( aQueryBox.Execute() == RET_YES )
|
|
return sal_True;
|
|
else
|
|
return sal_False;
|
|
}
|
|
else
|
|
return sal_True;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
long MyTabBar::AllowRenaming()
|
|
{
|
|
XubString aStr( RTL_CONSTASCII_USTRINGPARAM( "Allow renaming: " ) );
|
|
aStr += GetEditText();
|
|
QueryBox aQueryBox( this, WB_YES_NO_CANCEL | WB_DEF_YES, aStr );
|
|
long nRet = aQueryBox.Execute();
|
|
if ( nRet == RET_YES )
|
|
return TAB_RENAMING_YES;
|
|
else if ( nRet == RET_NO )
|
|
return TAB_RENAMING_NO;
|
|
else // ( nRet == RET_CANCEL )
|
|
return TAB_RENAMING_CANCEL;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyTabBar::Split()
|
|
{
|
|
Size aSize = GetSizePixel();
|
|
long nWidth = GetSplitSize();
|
|
long nMaxWidth = GetParent()->GetOutputSizePixel().Width()-50;
|
|
if ( nWidth < GetMinSize() )
|
|
nWidth = GetMinSize();
|
|
else if ( nWidth > nMaxWidth )
|
|
nWidth = nMaxWidth;
|
|
SetSizePixel( Size( nWidth, aSize.Height() ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
MyCalendar::MyCalendar( Window* pParent ) :
|
|
WorkWindow( pParent, WB_STDWORK ),
|
|
aCalendar( this, WB_TABSTOP | WB_WEEKNUMBER | WB_BOLDTEXT | WB_FRAMEINFO | WB_MULTISELECT ),
|
|
aInfoColor( COL_LIGHTBLUE ),
|
|
aHolidayColor( COL_LIGHTRED ),
|
|
aFrameColor( COL_LIGHTRED )
|
|
{
|
|
const CalendarWrapper& rCal = aCalendar.GetCalendarWrapper();
|
|
aMenuBar.InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Wochen~anfang" ) ) );
|
|
aMenuBar.InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Erste Woche" ) ) );
|
|
aMenuBar.SetPopupMenu( 1, &aWeekStartMenu );
|
|
aMenuBar.SetPopupMenu( 2, &aWeekCountMenu );
|
|
sal_Int16 nDays = rCal.getNumberOfDaysInWeek();
|
|
uno::Sequence< i18n::CalendarItem> xItems = rCal.getDays();
|
|
const i18n::CalendarItem* pArr = xItems.getArray();
|
|
for ( sal_Int16 i = 0; i < nDays; i++ )
|
|
aWeekStartMenu.InsertItem( 10+(sal_uInt16)i, pArr[i].FullName, MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekStartMenu.CheckItem( 10+(sal_uInt16)rCal.getFirstDayOfWeek() );
|
|
aWeekCountMenu.InsertItem( 20, XubString( RTL_CONSTASCII_USTRINGPARAM( "~1. Januar" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekCountMenu.InsertItem( 21, XubString( RTL_CONSTASCII_USTRINGPARAM( "~2 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekCountMenu.InsertItem( 22, XubString( RTL_CONSTASCII_USTRINGPARAM( "~3 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekCountMenu.InsertItem( 23, XubString( RTL_CONSTASCII_USTRINGPARAM( "Erste 4 ~Tage-Woche" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekCountMenu.InsertItem( 24, XubString( RTL_CONSTASCII_USTRINGPARAM( "~5 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekCountMenu.InsertItem( 25, XubString( RTL_CONSTASCII_USTRINGPARAM( "~6 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
aWeekCountMenu.InsertItem( 26, XubString( RTL_CONSTASCII_USTRINGPARAM( "Erste ~volle Woche" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
|
|
//was: one of 0, 1, 2; aWeekCountMenu.CheckItem( 20+(sal_uInt16)rIntn.GetWeekCountStart() );
|
|
aWeekCountMenu.CheckItem( 20+(sal_uInt16)rCal.getMinimumNumberOfDaysForFirstWeek() );
|
|
aMenuBar.SetSelectHdl( LINK( this, MyCalendar, MenuSelectHdl ) );
|
|
SetMenuBar( &aMenuBar );
|
|
|
|
Date aCurDate = aCalendar.GetCurDate();
|
|
aCalendar.SetRequestDateInfoHdl( LINK( this, MyCalendar, RequestDateInfoHdl ) );
|
|
aCalendar.SetDoubleClickHdl( LINK( this, MyCalendar, DoubleClickHdl ) );
|
|
aCalendar.SetSaturdayColor( Color( COL_LIGHTGREEN ) );
|
|
aCalendar.SetSundayColor( aHolidayColor );
|
|
aCalendar.AddDateInfo( Date( 1, 1, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Neujahr" ) ), &aHolidayColor, NULL );
|
|
aCalendar.AddDateInfo( Date( 24, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Heiligabend" ) ), &aInfoColor, NULL );
|
|
aCalendar.AddDateInfo( Date( 25, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "1. Weihnachttag" ) ), &aHolidayColor, NULL );
|
|
aCalendar.AddDateInfo( Date( 26, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "2. Weihnachttag" ) ), &aHolidayColor, NULL );
|
|
aCalendar.AddDateInfo( Date( 31, 12, 0 ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Silvester" ) ), &aInfoColor, NULL );
|
|
aCalendar.SetPosPixel( Point() );
|
|
aCalendar.SetFirstDate( Date( 1, 1, aCurDate.GetYear() ) );
|
|
aCalendar.Show();
|
|
|
|
SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Calendar" ) ) );
|
|
SetOutputSizePixel( aCalendar.CalcWindowSizePixel( 3, 4 ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
MyCalendar::~MyCalendar()
|
|
{
|
|
SetMenuBar( NULL );
|
|
aMenuBar.SetPopupMenu( 1, NULL );
|
|
aMenuBar.SetPopupMenu( 2, NULL );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyCalendar, RequestDateInfoHdl, Calendar*, EMPTYARG )
|
|
{
|
|
sal_uInt16 nRequestYear = aCalendar.GetRequestYear();
|
|
if ( (nRequestYear >= 1954) && (nRequestYear <= 1989) )
|
|
aCalendar.AddDateInfo( Date( 17, 6, nRequestYear ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Tag der deutschen Einheit" ) ), &aHolidayColor, NULL );
|
|
else if ( nRequestYear >= 1990 )
|
|
aCalendar.AddDateInfo( Date( 3, 10, nRequestYear ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Tag der deutschen Einheit" ) ), &aHolidayColor, NULL );
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyCalendar, DoubleClickHdl, Calendar*, EMPTYARG )
|
|
{
|
|
Date aDate = aCalendar.GetCurDate();
|
|
String aStr( RTL_CONSTASCII_USTRINGPARAM( "Info: " ) );
|
|
aStr += Application::GetAppLocaleDataWrapper().getDate( aDate );
|
|
aCalendar.AddDateInfo( aDate, aStr, NULL, &aFrameColor, DIB_BOLD );
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyCalendar, MenuSelectHdl, Menu*, pMenu )
|
|
{
|
|
sal_uInt16 nItemId = pMenu->GetCurItemId();
|
|
|
|
if ( (nItemId >= 10) && (nItemId <= 19) )
|
|
aCalendar.SetWeekStart( nItemId-10 );
|
|
else if ( (nItemId >= 20) && (nItemId <= 29) )
|
|
aCalendar.SetMinimumNumberOfDaysInWeek( nItemId-20 );
|
|
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyCalendar::Resize()
|
|
{
|
|
aCalendar.SetSizePixel( GetOutputSizePixel() );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
|
|
WorkWindow(pParent, aWinStyle | WB_3DLOOK ),
|
|
aBox( this, WB_BORDER | WB_3DLOOK ),
|
|
aBar( this, WB_BORDER | WB_3DLOOK | WB_RIGHT ),
|
|
aHeadBar( this, WB_BORDER | WB_3DLOOK | WB_DRAG | WB_BUTTONSTYLE ),
|
|
aColorList( this ),
|
|
aLineList( this ),
|
|
aValueSet( this, WB_TABSTOP | WB_NAMEFIELD | WB_NONEFIELD | WB_BORDER | WB_ITEMBORDER | WB_VSCROLL /* | WB_FLATVALUESET */ ),
|
|
aCalendarField( this, WB_TABSTOP | WB_SPIN | WB_REPEAT | WB_DROPDOWN | WB_BORDER ),
|
|
aCalendarField2( this, WB_TABSTOP | WB_SPIN | WB_REPEAT | WB_DROPDOWN | WB_BORDER ),
|
|
aTabBar( this, WB_BORDER | WB_MULTISELECT | WB_SCROLL | WB_SIZEABLE | WB_DRAG ),
|
|
aPrgsBar( this ),
|
|
aFontBtn( this ),
|
|
aCalendarBtn( this ),
|
|
aPrnSetupBtn( this ),
|
|
aPrnDlgBtn( this )
|
|
{
|
|
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFaceColor() ) );
|
|
|
|
pCalendar = NULL;
|
|
pMenu = NULL;
|
|
|
|
Bitmap aBmp;
|
|
aBox.InsertItem( 1, aBmp );
|
|
aBox.InsertItem( 2, aBmp );
|
|
aBox.InsertItem( 3, aBmp );
|
|
aBox.InsertItem( 4, aBmp );
|
|
aBox.InsertSeparator();
|
|
aBox.InsertItem( 5, aBmp );
|
|
aBox.InsertItem( 6, aBmp );
|
|
aBox.InsertItem( 7, aBmp );
|
|
aBox.InsertItem( 8, aBmp );
|
|
aBox.InsertSpace();
|
|
aBox.InsertItem( 9, aBmp );
|
|
aBox.SetPosPixel( Point( 0, 0 ) );
|
|
aBoxSize = aBox.GetSizePixel();
|
|
aBox.Show();
|
|
|
|
aBar.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Ready" ) ) );
|
|
aBar.InsertItem( 1, 35 );
|
|
aBar.InsertItem( 2, 55 );
|
|
aBar.InsertItem( 3, 55 );
|
|
aBar.SetItemText( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ) );
|
|
aBar.SetItemText( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "21.01.93" ) ) );
|
|
aBar.SetItemText( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "12:00:00" ) ) );
|
|
aBar.Show();
|
|
|
|
long nY = aBox.GetSizePixel().Height()+10;
|
|
{
|
|
aHeadBar.SetPosPixel( Point( 0, nY ) );
|
|
aHeadBar.InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Sender" ) ), 150 );
|
|
aHeadBar.InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Subject" ) ), 150, HIB_CENTER | HIB_VCENTER | HIB_CLICKABLE );
|
|
aHeadBar.InsertItem( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) ), 75 );
|
|
aHeadBar.InsertItem( 4, XubString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), 60, HIB_RIGHT | HIB_VCENTER | HIB_CLICKABLE );
|
|
aHeadBar.InsertItem( 9999, String(), HEADERBAR_FULLSIZE, HIB_RIGHT | HIB_VCENTER | HIB_FIXEDPOS );
|
|
aHeadBar.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
|
|
aHeadBar.Show();
|
|
nY += aHeadBar.GetSizePixel().Height() += 10;
|
|
}
|
|
|
|
{
|
|
aColorList.SetPosSizePixel( Point( 10, nY ), Size( 130, 180 ) );
|
|
aColorList.SetUpdateMode( sal_False );
|
|
aColorList.InsertEntry( Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
|
|
aColorList.InsertEntry( Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
|
|
aColorList.InsertEntry( Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
|
|
aColorList.InsertEntry( Color( COL_CYAN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
|
|
aColorList.InsertEntry( Color( COL_RED ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
|
|
aColorList.InsertEntry( Color( COL_MAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
|
|
aColorList.InsertEntry( Color( COL_BROWN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
|
|
aColorList.InsertEntry( Color( COL_GRAY ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
|
|
aColorList.InsertEntry( Color( COL_LIGHTGRAY ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGray" ) ) );
|
|
aColorList.InsertEntry( Color( COL_LIGHTBLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightBlue" ) ) );
|
|
aColorList.InsertEntry( Color( COL_LIGHTGREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGreen" ) ) );
|
|
aColorList.InsertEntry( Color( COL_LIGHTCYAN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightCyan" ) ) );
|
|
aColorList.InsertEntry( Color( COL_LIGHTRED ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightRed" ) ) );
|
|
aColorList.InsertEntry( Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
|
|
aColorList.InsertEntry( Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
|
|
aColorList.InsertEntry( Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
|
|
aColorList.SetUpdateMode( sal_True );
|
|
aColorList.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
|
|
aColorList.Show();
|
|
}
|
|
|
|
{
|
|
aLineList.SetPosSizePixel( Point( 150, nY ), Size( 130, 180 ) );
|
|
aLineList.SetUnit( FUNIT_POINT );
|
|
aLineList.SetSourceUnit( FUNIT_TWIP );
|
|
aLineList.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Hairline" ) ) );
|
|
aLineList.InsertEntry( 1500 );
|
|
aLineList.InsertEntry( 3000 );
|
|
aLineList.InsertEntry( 4500 );
|
|
aLineList.InsertEntry( 6000 );
|
|
aLineList.InsertEntry( 7500 );
|
|
aLineList.InsertEntry( 9000 );
|
|
aLineList.InsertEntry( 1500, 1500, 1500 );
|
|
aLineList.InsertEntry( 3000, 1500, 1500 );
|
|
aLineList.InsertEntry( 4500, 1500, 1500 );
|
|
aLineList.InsertEntry( 3000, 3000, 1500 );
|
|
aLineList.InsertEntry( 4500, 3000, 1500 );
|
|
aLineList.InsertEntry( 4500, 4500, 1500 );
|
|
aLineList.Show();
|
|
}
|
|
|
|
{
|
|
aValueSet.SetPosSizePixel( Point( 290, nY ), Size( 130, 180 ) );
|
|
aValueSet.InsertItem( 9, Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
|
|
aValueSet.InsertItem( 10, Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
|
|
aValueSet.InsertItem( 11, Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
|
|
aValueSet.InsertItem( 12, Color( COL_CYAN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Cyan" ) ) );
|
|
aValueSet.InsertItem( 13, Color( COL_RED ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
|
|
aValueSet.InsertItem( 14, Color( COL_MAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Magenta" ) ) );
|
|
aValueSet.InsertItem( 15, Color( COL_BROWN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Brown" ) ) );
|
|
aValueSet.InsertItem( 16, Color( COL_GRAY ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Gray" ) ) );
|
|
aValueSet.InsertItem( 17, Color( COL_LIGHTGRAY ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGray" ) ) );
|
|
aValueSet.InsertItem( 18, Color( COL_LIGHTBLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightBlue" ) ) );
|
|
aValueSet.InsertItem( 19, Color( COL_LIGHTGREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightGreen" ) ) );
|
|
aValueSet.InsertItem( 20, Color( COL_LIGHTCYAN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightCyan" ) ) );
|
|
aValueSet.InsertItem( 21, Color( COL_LIGHTRED ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightRed" ) ) );
|
|
aValueSet.InsertItem( 22, Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
|
|
aValueSet.InsertItem( 23, Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
|
|
aValueSet.InsertItem( 24, Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
|
|
aValueSet.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) );
|
|
aValueSet.SetColCount( 4 );
|
|
aValueSet.SetLineCount( 4 );
|
|
aValueSet.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
|
|
aValueSet.Show();
|
|
}
|
|
|
|
{
|
|
aCalendarField.EnableEmptyFieldValue( sal_True );
|
|
aCalendarField.SetCalendarStyle( aCalendarField.GetCalendarStyle() | WB_RANGESELECT );
|
|
aCalendarField.SetSelectHdl( LINK( this, MyWin, CalSelectHdl ) );
|
|
// aCalendarField.SetDate( Date() );
|
|
aCalendarField.SetEmptyDate();
|
|
aCalendarField.EnableToday();
|
|
aCalendarField.EnableNone();
|
|
aCalendarField.SetPosSizePixel( Point( 430, nY ), Size( 130, 20 ) );
|
|
aCalendarField.Show();
|
|
}
|
|
|
|
{
|
|
aCalendarField2.SetDate( Date() );
|
|
aCalendarField2.SetPosSizePixel( Point( 570, nY ), Size( 130, 20 ) );
|
|
aCalendarField2.Show();
|
|
}
|
|
|
|
nY += 200;
|
|
{
|
|
aTabBar.SetPosSizePixel( Point( 10, nY ),
|
|
Size( 300, aTabBar.GetSizePixel().Height() ) );
|
|
aTabBar.InsertPage( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 1" ) ) );
|
|
aTabBar.InsertPage( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 2" ) ) );
|
|
aTabBar.InsertPage( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 3" ) ) );
|
|
aTabBar.InsertPage( 4, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 4" ) ) );
|
|
aTabBar.InsertPage( 5, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 5" ) ) );
|
|
aTabBar.InsertPage( 6, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 6" ) ) );
|
|
aTabBar.InsertPage( 7, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 7" ) ) );
|
|
aTabBar.InsertPage( 8, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 8" ) ) );
|
|
aTabBar.InsertPage( 9, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 9" ) ) );
|
|
aTabBar.InsertPage( 10, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 10" ) ) );
|
|
aTabBar.InsertPage( 11, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 11" ) ) );
|
|
aTabBar.InsertPage( 12, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 12" ) ) );
|
|
aTabBar.InsertPage( 13, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 13" ) ) );
|
|
aTabBar.InsertPage( 14, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 14" ) ) );
|
|
aTabBar.InsertPage( 15, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 15" ) ) );
|
|
aTabBar.InsertPage( 16, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 16" ) ) );
|
|
aTabBar.InsertPage( 17, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 17" ) ) );
|
|
aTabBar.InsertPage( 18, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 18" ) ) );
|
|
aTabBar.InsertPage( 19, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 19" ) ) );
|
|
aTabBar.InsertPage( 20, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 20" ) ) );
|
|
aTabBar.InsertPage( 21, XubString( RTL_CONSTASCII_USTRINGPARAM( "This is a long Page Text" ) ) );
|
|
aTabBar.InsertPage( 22, XubString( RTL_CONSTASCII_USTRINGPARAM( "Short Text" ) ) );
|
|
aTabBar.InsertPage( 23, XubString( RTL_CONSTASCII_USTRINGPARAM( "And now a very very long Page Text" ) ) );
|
|
aTabBar.InsertPage( 24, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 24" ) ) );
|
|
aTabBar.InsertPage( 25, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 25" ) ) );
|
|
aTabBar.InsertPage( 26, XubString( RTL_CONSTASCII_USTRINGPARAM( "And now a very long Page Text" ) ) );
|
|
aTabBar.InsertPage( 27, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 27" ) ) );
|
|
aTabBar.InsertPage( 28, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 28" ) ) );
|
|
aTabBar.InsertPage( 29, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 29" ) ) );
|
|
aTabBar.InsertPage( 30, XubString( RTL_CONSTASCII_USTRINGPARAM( "Page 30" ) ) );
|
|
aTabBar.EnableEditMode();
|
|
aTabBar.Show();
|
|
}
|
|
|
|
nY += 35;
|
|
{
|
|
aPrgsBar.SetPosPixel( Point( 10, nY ) );
|
|
aPrgsBar.Show();
|
|
}
|
|
|
|
nY += 40;
|
|
{
|
|
aFontBtn.SetPosSizePixel( Point( 10, nY ), Size( 100, 30 ) );
|
|
aFontBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Font..." ) ) );
|
|
aFontBtn.SetClickHdl( LINK( this, MyWin, Test ) );
|
|
aFontBtn.Show();
|
|
|
|
aCalendarBtn.SetPosSizePixel( Point( 120, nY ), Size( 100, 30 ) );
|
|
aCalendarBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Calendar" ) ) );
|
|
aCalendarBtn.SetClickHdl( LINK( this, MyWin, Test ) );
|
|
aCalendarBtn.Show();
|
|
|
|
aPrnSetupBtn.SetPosSizePixel( Point( 230, nY ), Size( 100, 30 ) );
|
|
aPrnSetupBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "PrnSetup..." ) ) );
|
|
aPrnSetupBtn.SetClickHdl( LINK( this, MyWin, Test ) );
|
|
aPrnSetupBtn.Show();
|
|
|
|
aPrnDlgBtn.SetPosSizePixel( Point( 340, nY ), Size( 100, 30 ) );
|
|
aPrnDlgBtn.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Print...." ) ) );
|
|
aPrnDlgBtn.SetClickHdl( LINK( this, MyWin, Test ) );
|
|
aPrnDlgBtn.Show();
|
|
}
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
MyWin::~MyWin()
|
|
{
|
|
if ( pCalendar )
|
|
delete pCalendar;
|
|
|
|
if ( pMenu )
|
|
{
|
|
delete pMenu;
|
|
delete pNameMenu;
|
|
delete pStyleMenu;
|
|
delete pSizeMenu;
|
|
}
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyWin, Test, PushButton*, pBtn )
|
|
{
|
|
if ( pBtn == &aFontBtn )
|
|
{
|
|
MyFontDialog* pDlg = new MyFontDialog( this );
|
|
pDlg->Execute();
|
|
delete pDlg;
|
|
}
|
|
else if ( pBtn == &aCalendarBtn )
|
|
{
|
|
if ( !pCalendar )
|
|
pCalendar = new MyCalendar( this );
|
|
pCalendar->ToTop();
|
|
pCalendar->Show();
|
|
}
|
|
else if ( pBtn == &aPrnSetupBtn )
|
|
{
|
|
PrinterSetupDialog* pDlg = new PrinterSetupDialog( this );
|
|
pDlg->SetPrinter( &aPrn );
|
|
pDlg->Execute();
|
|
delete pDlg;
|
|
}
|
|
else if ( pBtn == &aPrnDlgBtn )
|
|
{
|
|
PrintDialog* pDlg = new PrintDialog( this, false );
|
|
pDlg->SetPrinter( &aPrn );
|
|
pDlg->EnableRange( PRINTDIALOG_ALL );
|
|
pDlg->EnableRange( PRINTDIALOG_RANGE );
|
|
pDlg->Execute();
|
|
delete pDlg;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyWin, SelectHdl, Window*, pCtrl )
|
|
{
|
|
if ( pCtrl == &aColorList )
|
|
{
|
|
Color aColor = aColorList.GetSelectEntryColor();
|
|
aValueSet.SetColor( aColor );
|
|
aLineList.SetColor( aColor );
|
|
}
|
|
else if ( pCtrl == &aValueSet )
|
|
{
|
|
sal_uInt16 nId = aValueSet.GetSelectItemId();
|
|
if ( nId > 8 )
|
|
{
|
|
Color aColor = aValueSet.GetItemColor( nId );
|
|
aValueSet.SetFillColor( aColor );
|
|
}
|
|
}
|
|
else if ( pCtrl == &aHeadBar )
|
|
{
|
|
sal_uInt16 nCurItemId = aHeadBar.GetCurItemId();
|
|
for ( sal_uInt16 i = 0; i < aHeadBar.GetItemCount(); i++ )
|
|
{
|
|
sal_uInt16 nItemId = aHeadBar.GetItemId( i );
|
|
HeaderBarItemBits nBits = aHeadBar.GetItemBits( nItemId );
|
|
if ( nItemId == nCurItemId )
|
|
{
|
|
HeaderBarItemBits nOldBits = nBits;
|
|
nBits &= ~(HIB_DOWNARROW | HIB_UPARROW);
|
|
if ( nOldBits & HIB_DOWNARROW )
|
|
nBits |= HIB_UPARROW;
|
|
else
|
|
nBits |= HIB_DOWNARROW;
|
|
}
|
|
else
|
|
nBits &= ~(HIB_DOWNARROW | HIB_UPARROW);
|
|
aHeadBar.SetItemBits( nItemId, nBits );
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK( MyWin, CalSelectHdl, CalendarField*, pCtrl )
|
|
{
|
|
if ( pCtrl == &aCalendarField )
|
|
{
|
|
Calendar* l_pCalendar = pCtrl->GetCalendar();
|
|
aCalendarField2.SetDate( l_pCalendar->GetSelectDate( l_pCalendar->GetSelectDateCount()-1 ) );
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyWin::ContextMenu( const Point& rPos )
|
|
{
|
|
FontList aList( this );
|
|
|
|
if ( !pMenu )
|
|
{
|
|
pMenu = new PopupMenu;
|
|
pNameMenu = new FontNameMenu;
|
|
pStyleMenu = new FontStyleMenu;
|
|
pSizeMenu = new FontSizeMenu;
|
|
|
|
pMenu->InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "Font" ) ) );
|
|
pMenu->InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Attribute" ) ) );
|
|
pMenu->InsertItem( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) );
|
|
pMenu->SetPopupMenu( 1, pNameMenu );
|
|
pMenu->SetPopupMenu( 2, pStyleMenu );
|
|
pMenu->SetPopupMenu( 3, pSizeMenu );
|
|
|
|
pNameMenu->Fill( &aList );
|
|
pNameMenu->SetCurName( aList.GetFontName( 0 ).GetName() );
|
|
|
|
pStyleMenu->InsertSeparator();
|
|
pStyleMenu->InsertItem( 1, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Underline" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
|
|
pStyleMenu->InsertItem( 2, XubString( RTL_CONSTASCII_USTRINGPARAM( "Stri~keout" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
|
|
pStyleMenu->InsertItem( 3, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Shadow" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
|
|
pStyleMenu->InsertItem( 4, XubString( RTL_CONSTASCII_USTRINGPARAM( "~Outline" ) ), MIB_CHECKABLE | MIB_AUTOCHECK );
|
|
}
|
|
|
|
pStyleMenu->Fill( pNameMenu->GetCurName(), &aList );
|
|
pSizeMenu->Fill( aList.Get( pNameMenu->GetCurName(),
|
|
pStyleMenu->GetCurStyle() ), &aList );
|
|
|
|
pMenu->Execute( this, rPos );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyWin::Command( const CommandEvent& rCEvt )
|
|
{
|
|
if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
|
|
ContextMenu( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
|
|
{
|
|
aValueSet.StartSelection();
|
|
WorkWindow::MouseButtonDown( rMEvt );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyWin::KeyInput( const KeyEvent& rKEvt )
|
|
{
|
|
if ( rKEvt.GetKeyCode().GetCode() == KEY_P )
|
|
{
|
|
for ( sal_uInt16 i = 0; i <= 130; i += 2 )
|
|
{
|
|
for ( sal_uInt16 j = 0; j < 6000; j++ )
|
|
{
|
|
aPrgsBar.SetValue( i );
|
|
Application::Reschedule();
|
|
}
|
|
}
|
|
}
|
|
else if ( rKEvt.GetCharCode() == '+' )
|
|
aHeadBar.SetOffset( aHeadBar.GetOffset()+1 );
|
|
else if ( rKEvt.GetCharCode() == '-' )
|
|
aHeadBar.SetOffset( aHeadBar.GetOffset()-1 );
|
|
|
|
WorkWindow::KeyInput( rKEvt );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyWin::Paint( const Rectangle& rRect )
|
|
{
|
|
WorkWindow::Paint( rRect );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void MyWin::Resize()
|
|
{
|
|
Size aWinSize = GetOutputSizePixel();
|
|
|
|
aBox.SetSizePixel( Size( aWinSize.Width(), aBoxSize.Height() ) );
|
|
|
|
Size aSize = aBar.GetSizePixel();
|
|
aBar.SetPosSizePixel( Point( 0, aWinSize.Height()-aSize.Height() ),
|
|
Size( aWinSize.Width(), aSize.Height() ) );
|
|
|
|
Size aBarSize = aSize;
|
|
Point aPos = aHeadBar.GetPosPixel();
|
|
aSize = aHeadBar.GetSizePixel();
|
|
aHeadBar.SetSizePixel( Size( aWinSize.Width(), aSize.Height() ) );
|
|
aHeadBar.SetDragSize( aWinSize.Height() - aSize.Height() - aPos.Y() - aBarSize.Height() );
|
|
|
|
aPos = aPrgsBar.GetPosPixel();
|
|
aSize = aPrgsBar.GetSizePixel();
|
|
if ( aPos.X() < aWinSize.Width()-10 )
|
|
aPrgsBar.SetSizePixel( Size( aWinSize.Width()-aPos.X()-10, aSize.Height() ) );
|
|
}
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
MyApp aMyApp;
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|